/*  *//* ============================================================
   ORDER PAGE -- DasuNuts
   Extends dasunuts.css theme (dark/gold)
============================================================ */

/* --- Page Base --- */
body {
  background: #000;
  color: #BBB;
  font-family: 'Lato', sans-serif;
  min-height: 100vh;
  margin: 0;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* --- Container --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.col-lg-7, .col-lg-5, .col-md-12, .col-md-6, .col-md-4, .col-md-8 {
  padding: 0 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-4  { width: 33.333%; }
  .col-md-6  { width: 50%; }
  .col-md-8  { width: 66.666%; }
  .col-md-12 { width: 100%; }
}

@media (min-width: 992px) {
  .col-lg-5 { width: 41.666%; }
  .col-lg-7 { width: 58.333%; }
}

.g-3 > * { margin-bottom: 16px; }
.mb-3 { margin-bottom: 16px; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.align-items-end { align-items: flex-end; }

/* ============================================================
   HEADER
============================================================ */
#order-header {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.12);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.order-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-back-link {
  color: #C9A84C;
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  transition: opacity 0.3s ease;
}

.order-back-link:hover { opacity: 0.7; }

.order-back-link i { margin-right: 6px; }

.order-logo img {
  height: 50px;
  width: auto;
}

/* ============================================================
   PAGE TITLE
============================================================ */
.order-heading {
  text-align: center;
  padding: 48px 0 32px;
}

.order-heading .before-heading {
  display: block;
  font-family: 'Nothing You Could Do', cursive;
  font-size: 20px;
  color: #C9A84C;
  margin-bottom: 8px;
}

.order-heading h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: #DDD;
  margin: 0 0 12px;
  background: linear-gradient(90deg, #C9A84C, #F0DFA0, #C9A84C);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.order-heading h2 i {
  -webkit-text-fill-color: #C9A84C;
  margin-right: 10px;
}

.order-subtitle {
  color: #888;
  font-size: 15px;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   ORDER CARDS (Glassmorphism)
============================================================ */
.order-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 16px;
  padding: 28px 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease;
}

.order-card:hover {
  border-color: rgba(201, 168, 76, 0.25);
}

.order-card-title {
  font-family: 'Playfair Display', serif;
  color: #C9A84C;
  font-size: 20px;
  margin: 0 0 20px;
  font-weight: 400;
}

.order-card-title i {
  margin-right: 8px;
}

/* ============================================================
   FORM ELEMENTS
============================================================ */
.order-label {
  color: #DDD;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 6px;
  display: block;
}

.order-select,
.form-control {
  display: block;
  width: 100%;
  background-color: #141414;
  border: 1px solid #2a2a2a;
  color: #e0e0e0;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Lato', sans-serif;
  font-size: 14px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  appearance: auto;
}

textarea.form-control {
  resize: vertical;
}

.order-select:focus,
.form-control:focus {
  border-color: #C9A84C;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
  outline: none;
}

.order-select:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.form-control.is-invalid {
  border-color: #e74c3c;
}

.field-error {
  color: #e74c3c;
  font-size: 12px;
  min-height: 18px;
  margin-top: 4px;
}

/* ============================================================
   ITEM PREVIEW STRIP
============================================================ */
.item-preview {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #DDD;
  font-size: 14px;
  gap: 12px;
}

#preview-price {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #C9A84C;
  white-space: nowrap;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #C9A84C, #E2C97E);
  color: #111;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
}

.btn-gold:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 168, 76, 0.3);
}

.btn-gold:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-place-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #C9A84C, #E2C97E);
  color: #111;
  border: none;
  border-radius: 12px;
  padding: 18px 40px;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  transition: all 0.3s ease;
  animation: buttonGlow 3s ease-in-out infinite;
}

@keyframes buttonGlow {
  0%, 100% { box-shadow: 0 0 8px rgba(201, 168, 76, 0.2); }
  50% { box-shadow: 0 0 20px rgba(201, 168, 76, 0.4); }
}

.btn-place-order:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(201, 168, 76, 0.5);
}

.btn-place-order:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  animation: none;
}

.checkout-note {
  margin-top: 12px;
  font-size: 12px;
  color: #666;
}

.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.btn-outline-danger:hover {
  background: rgba(231, 76, 60, 0.1);
  border-color: #e74c3c;
}

/* ============================================================
   CART
============================================================ */
.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.cart-empty i {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  opacity: 0.3;
}

.cart-table-wrap {
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  color: #C9A84C;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  text-align: left;
  font-weight: 600;
}

.cart-table td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
  color: #DDD;
  vertical-align: middle;
}

.cart-table .item-name {
  font-size: 13px;
  line-height: 1.4;
}

.cart-table .item-name small {
  color: #888;
  font-size: 11px;
}

.cart-table .item-price {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  white-space: nowrap;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(201, 168, 76, 0.3);
  background: transparent;
  color: #C9A84C;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.qty-btn:hover {
  background: rgba(201, 168, 76, 0.15);
}

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  color: #DDD;
}

.btn-remove {
  background: transparent;
  border: none;
  color: #e74c3c;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: transform 0.2s ease;
}

.btn-remove:hover {
  transform: scale(1.2);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 8px;
  border-top: 2px solid rgba(201, 168, 76, 0.3);
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #DDD;
}

.cart-total-amount {
  font-family: 'Montserrat', sans-serif;
  color: #C9A84C;
  font-size: 22px;
}

/* ============================================================
   TOAST
============================================================ */
.order-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid rgba(201, 168, 76, 0.3);
  backdrop-filter: blur(10px);
  color: #E2C97E;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 200;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.order-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============================================================
   CONFIRM DIALOG
============================================================ */
.confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1100;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: confirmFadeIn 0.2s ease;
}

.confirm-overlay.show { display: flex; }

@keyframes confirmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes confirmFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.confirm-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: confirmFadeUp 0.25s ease;
}

.confirm-msg {
  font-size: 15px;
  color: #e0e0e0;
  line-height: 1.6;
  margin: 0 0 28px;
}

.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.confirm-btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Lato', sans-serif;
  letter-spacing: 0.3px;
}

.confirm-btn-cancel {
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #888;
}

.confirm-btn-cancel:hover {
  border-color: rgba(201, 168, 76, 0.3);
  color: #e0e0e0;
  background: rgba(201, 168, 76, 0.05);
}

.confirm-btn-ok {
  background: linear-gradient(135deg, #9A7B2F, #C9A84C);
  border: none;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.confirm-btn-ok:hover {
  background: linear-gradient(135deg, #C9A84C, #E2C97E);
  box-shadow: 0 4px 16px rgba(201, 168, 76, 0.25);
}

.confirm-btn-ok.confirm-btn-danger {
  background: linear-gradient(135deg, #c0392b, #e74c3c);
}

.confirm-btn-ok.confirm-btn-danger:hover {
  background: linear-gradient(135deg, #e74c3c, #e95c4f);
  box-shadow: 0 4px 16px rgba(231, 76, 60, 0.25);
}

/* ============================================================
   ORDER CONFIRMATION
============================================================ */
.order-success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.order-success-overlay.show { display: flex; }

.order-success-card {
  background: #141414;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 20px;
  padding: 48px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: confirmFadeUp 0.4s ease;
}

.success-icon { margin-bottom: 24px; }

.success-circle {
  stroke-dasharray: 214;
  stroke-dashoffset: 214;
  animation: drawCircle 0.6s ease 0.2s forwards;
}

.success-check {
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: drawCheck 0.4s ease 0.7s forwards;
}

@keyframes drawCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

.success-title {
  font-family: 'Playfair Display', serif;
  color: #C9A84C;
  font-size: 28px;
  margin: 0 0 12px;
}

.success-message {
  color: #BBB;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 28px;
}

/* ============================================================
   CART ADD ANIMATION
============================================================ */
@keyframes cartPulse {
  0% { border-color: rgba(201, 168, 76, 0.1); box-shadow: 0 0 0 rgba(201, 168, 76, 0); }
  30% { border-color: rgba(201, 168, 76, 0.6); box-shadow: 0 0 20px rgba(201, 168, 76, 0.15); }
  100% { border-color: rgba(201, 168, 76, 0.1); box-shadow: 0 0 0 rgba(201, 168, 76, 0); }
}

.order-card.cart-pulse {
  animation: cartPulse 0.6s ease-out;
}

@keyframes addBtnPop {
  0% { transform: scale(1); }
  50% { transform: scale(0.93); }
  100% { transform: scale(1); }
}

.btn-gold.btn-pop {
  animation: addBtnPop 0.2s ease;
}

/* ============================================================
   FOOTER
============================================================ */
#order-footer {
  padding: 40px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 60px;
}

.footer-logo-small {
  width: 80px;
  margin-bottom: 16px;
  opacity: 0.8;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  border-color: #C9A84C;
  color: #C9A84C;
}

.footer-copy {
  color: #555;
  font-size: 13px;
  margin-top: 12px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 991px) {
  .order-card { padding: 20px 16px; }
  .order-heading h2 { font-size: 28px; }
  .order-heading { padding: 36px 0 24px; }
}

@media (max-width: 576px) {
  .order-heading h2 { font-size: 24px; }
  .order-subtitle { font-size: 13px; }
  .cart-table .item-name { font-size: 11px; }
  .cart-table .item-name small { font-size: 10px; }
  .btn-place-order { font-size: 15px; padding: 14px 20px; letter-spacing: 1px; }
  .item-preview { flex-direction: column; gap: 4px; text-align: center; }
  .cart-total-amount { font-size: 18px; }
}
