/* order.css — /order pre-order page + confirmation + modifier modal + sticky cart */

/* ── Layout ─────────────────────────────────────────────────────────────── */
.order-page { background: #faf8f5; min-height: 100vh; padding-bottom: 120px; }

.order-steps-bar {
  background: #fff;
  border-bottom: 1px solid #e8ddd5;
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.order-steps {
  display: flex;
  align-items: center;
  max-width: 480px;
  margin: 0 auto;
}
.order-step {
  display: flex;
  align-items: center;
  gap: 7px;
  opacity: 0.4;
  transition: opacity 0.2s;
  flex: 1;
}
.order-step.active { opacity: 1; }
.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e8ddd5;
  color: #7a6a5a;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}
.order-step.active .step-num { background: #c4956a; color: #fff; }
.step-label { font-size: 13px; font-weight: 500; color: #5a4a3a; white-space: nowrap; }
.step-connector { flex: 1; height: 1px; background: #e8ddd5; margin: 0 8px; }

/* Reserve mode banner */
.reserve-mode-banner {
  background: #fff8f0;
  border: 1px solid #f5e4d0;
  border-left: 3px solid #c4956a;
  padding: 10px 20px;
  font-size: 13px;
  color: #5a4a3a;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 700px;
  margin: 16px auto;
  border-radius: 6px;
}

/* ── Section containers ───────────────────────────────────────────────── */
.order-section {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 20px;
}
.order-section.hidden { display: none; }
.order-section-header { margin-bottom: 24px; }
.order-heading { font-family: 'Playfair Display', serif; font-size: 28px; color: #2c1810; margin: 0 0 6px; }
.order-subheading { color: #7a6a5a; font-size: 14px; margin: 0; }

/* ── Step nav buttons ────────────────────────────────────────────────── */
.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  justify-content: flex-end;
}
.btn-primary {
  background: #2c1810;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary:hover:not(:disabled) { background: #c4956a; }
.btn-ghost {
  background: transparent;
  color: #2c1810;
  border: 1px solid #d4c5b5;
  border-radius: 8px;
  padding: 12px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-ghost:hover { border-color: #c4956a; color: #c4956a; }
.full-width { width: 100%; }

/* ── Menu tabs ───────────────────────────────────────────────────────── */
.menu-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.menu-tab {
  background: #fff;
  border: 1px solid #d4c5b5;
  border-radius: 20px;
  padding: 7px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  color: #5a4a3a;
}
.menu-tab.active {
  background: #2c1810;
  border-color: #2c1810;
  color: #fff;
}
.menu-category-panel { display: none; }
.menu-category-panel.active { display: block; }

/* ── Menu item cards ─────────────────────────────────────────────────── */
.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.menu-card {
  background: #fff;
  border: 1px solid #e8ddd5;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
}
.menu-card:hover { box-shadow: 0 4px 16px rgba(44,24,16,0.08); border-color: #c4956a; }
.menu-card.added { animation: card-flash 0.5s ease; }
@keyframes card-flash { 0% { background: #fff; } 30% { background: #fff8f0; } 100% { background: #fff; } }
.menu-card-body { flex: 1; margin-bottom: 12px; }
.menu-card-name { font-weight: 600; font-size: 15px; color: #2c1810; margin-bottom: 4px; }
.menu-card-desc { font-size: 13px; color: #7a6a5a; line-height: 1.45; }
.menu-card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.diet-tag { background: #f0ebe5; color: #7a6a5a; border-radius: 4px; padding: 2px 7px; font-size: 11px; }
.menu-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0e8e0;
  padding-top: 10px;
}
.menu-card-price { font-size: 15px; font-weight: 600; color: #c4956a; }
.add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2c1810;
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.add-btn:hover { background: #c4956a; }

/* ── Slot picker ─────────────────────────────────────────────────────── */
.slot-date-picker, .slot-time-picker { margin-bottom: 24px; }
.slot-picker-label { font-size: 14px; font-weight: 600; color: #2c1810; margin: 0 0 10px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.date-chip {
  background: #fff;
  border: 1px solid #d4c5b5;
  border-radius: 8px;
  padding: 9px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #5a4a3a;
}
.date-chip.selected { background: #2c1810; border-color: #2c1810; color: #fff; }
.date-chip:hover:not(.selected) { border-color: #c4956a; color: #c4956a; }
.time-slots { display: flex; flex-wrap: wrap; gap: 8px; }
.time-slot {
  background: #fff;
  border: 1px solid #d4c5b5;
  border-radius: 8px;
  padding: 10px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  color: #5a4a3a;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 100px;
}
.time-slot.selected { background: #2c1810; border-color: #2c1810; color: #fff; }
.time-slot:hover:not(.full):not(.selected) { border-color: #c4956a; }
.time-slot.full { opacity: 0.4; cursor: not-allowed; }
.slot-availability { font-size: 11px; opacity: 0.7; }
.slots-loading, .no-slots-msg { color: #7a6a5a; font-size: 13px; padding: 12px 0; }
.slot-time-picker.hidden { display: none; }

/* ── Checkout form ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #2c1810; margin-bottom: 6px; }
.form-group input, .form-group textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d4c5b5;
  border-radius: 8px;
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #2c1810;
  background: #fff;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #c4956a; }
.form-hint { display: block; font-size: 12px; color: #9a8a7a; margin-top: 4px; }
.req { color: #c4956a; }
.optional { color: #9a8a7a; font-weight: 400; font-size: 12px; }
.form-error {
  background: #fee;
  border: 1px solid #fcc;
  border-radius: 8px;
  padding: 12px 16px;
  color: #c00;
  font-size: 14px;
  margin-bottom: 16px;
}
.form-error.hidden { display: none; }

/* ── Order summary box ───────────────────────────────────────────────── */
.order-summary-box {
  background: #fff;
  border: 1px solid #e8ddd5;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}
.summary-title { font-family: 'Playfair Display', serif; font-size: 16px; margin: 0 0 12px; color: #2c1810; }
.summary-item { display: flex; justify-content: space-between; font-size: 14px; color: #5a4a3a; margin-bottom: 6px; }
.summary-pickup { font-size: 13px; color: #7a6a5a; margin: 10px 0; border-top: 1px solid #f0e8e0; padding-top: 10px; }
.summary-total { display: flex; justify-content: space-between; font-size: 16px; font-weight: 700; color: #2c1810; border-top: 1px solid #e8ddd5; padding-top: 10px; margin-top: 8px; }
.summary-pay-note { font-size: 12px; color: #7a6a5a; margin-top: 8px 0 0; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modifier modal ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
@media (min-width: 500px) {
  .modal-overlay { align-items: center; }
  .modal-box { border-radius: 16px; max-height: 90vh; }
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  cursor: pointer; color: #7a6a5a;
  padding: 4px;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; margin: 0 0 4px; color: #2c1810; padding-right: 32px; }
.modal-price { font-size: 16px; color: #c4956a; font-weight: 600; margin: 0 0 20px; }
.mod-group { margin-bottom: 20px; }
.mod-group-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: #7a6a5a; margin: 0 0 8px; }
.mod-options { display: flex; flex-wrap: wrap; gap: 8px; }
.mod-option {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: #f5ece4;
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  color: #5a4a3a;
  transition: all 0.15s;
}
.mod-option input { display: none; }
.mod-option:has(input:checked) {
  background: #2c1810;
  color: #fff;
  border-color: #2c1810;
}
.modal-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f0e8e0;
  padding-top: 16px;
  margin: 20px 0 20px;
}
.qty-label { font-size: 14px; font-weight: 600; color: #2c1810; }
.qty-controls { display: flex; align-items: center; gap: 16px; }
.qty-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f5ece4;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #2c1810;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.qty-btn:hover { background: #c4956a; color: #fff; }
.qty-value { font-size: 18px; font-weight: 700; min-width: 24px; text-align: center; }
.modal-add-btn { width: 100%; padding: 14px; font-size: 16px; }

/* ── Sticky cart ─────────────────────────────────────────────────────── */
.sticky-cart {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 150;
  width: calc(100% - 40px);
  max-width: 420px;
}
.sticky-cart.hidden { display: none; }
.sticky-cart-inner {
  background: #2c1810;
  color: #fff;
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(44,24,16,0.25);
  transition: background 0.2s;
}
.sticky-cart-inner:hover { background: #c4956a; }
.cart-icon-wrap { position: relative; flex-shrink: 0; }
.cart-badge {
  position: absolute;
  top: -8px; right: -8px;
  background: #c4956a;
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.sticky-cart-inner:hover .cart-badge { background: #fff; color: #c4956a; }
.cart-label { flex: 1; font-size: 15px; font-weight: 500; }
.cart-total { font-size: 15px; font-weight: 700; }

/* ── Cart drawer ─────────────────────────────────────────────────────── */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 160;
}
.cart-drawer-overlay.hidden { display: none; }
.cart-drawer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 170;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(44,24,16,0.12);
}
.cart-drawer.hidden { display: none; }
@media (min-width: 600px) {
  .cart-drawer { max-width: 400px; left: auto; right: 24px; bottom: 24px; border-radius: 16px; }
}
.cart-drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #f0e8e0;
  flex-shrink: 0;
}
.cart-drawer-header h3 { font-family: 'Playfair Display', serif; margin: 0; font-size: 18px; color: #2c1810; }
.cart-drawer-header button { background: none; border: none; cursor: pointer; color: #7a6a5a; padding: 4px; }
.cart-drawer-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.cart-empty-msg { color: #9a8a7a; font-size: 13px; text-align: center; padding: 24px 0; }
.cart-item { display: flex; align-items: flex-start; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #f5ece4; gap: 8px; }
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 500; color: #2c1810; }
.cart-item-mods { font-size: 12px; color: #9a8a7a; display: block; margin-top: 2px; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.qty-btn-sm {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f5ece4;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #2c1810;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn-sm:hover { background: #c4956a; color: #fff; }
.cart-item-qty { font-size: 14px; font-weight: 600; min-width: 18px; text-align: center; }
.cart-item-price { font-size: 13px; color: #5a4a3a; min-width: 48px; text-align: right; }
.cart-remove-btn { background: none; border: none; color: #d4c5b5; cursor: pointer; font-size: 16px; padding: 0 2px; }
.cart-remove-btn:hover { color: #c00; }
.cart-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid #f0e8e0;
  flex-shrink: 0;
}
.cart-subtotal { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 12px; color: #2c1810; }

/* ── Confirmation page ───────────────────────────────────────────────── */
.confirmation-page { display: flex; justify-content: center; padding: 32px 20px 80px; }
.confirmation-card { max-width: 480px; width: 100%; text-align: center; }
.confirm-icon { margin: 0 auto 20px; }
.confirm-heading { font-family: 'Playfair Display', serif; font-size: 32px; color: #2c1810; margin: 0 0 8px; }
.confirm-subheading { color: #7a6a5a; font-size: 15px; margin: 0 0 28px; }
.confirm-code-box {
  background: #fff8f0;
  border: 2px dashed #c4956a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.confirm-code-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: #9a8a7a; }
.confirm-code { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: #2c1810; letter-spacing: 2px; }
.confirm-code-hint { font-size: 12px; color: #9a8a7a; }
.confirm-details {
  background: #fff;
  border: 1px solid #e8ddd5;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: left;
}
.confirm-detail-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #f5ece4; }
.confirm-detail-row:last-child { border-bottom: none; }
.confirm-detail-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #9a8a7a; white-space: nowrap; }
.confirm-detail-value { font-size: 14px; color: #2c1810; text-align: right; }
.confirm-items {
  background: #fff;
  border: 1px solid #e8ddd5;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: left;
}
.confirm-items-heading { font-family: 'Playfair Display', serif; font-size: 16px; color: #2c1810; margin: 0 0 12px; }
.confirm-item-row { display: flex; justify-content: space-between; font-size: 14px; color: #5a4a3a; padding: 5px 0; }
.confirm-item-mods { font-size: 12px; color: #9a8a7a; padding-left: 8px; margin-bottom: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.confirm-item-mods span::after { content: '·'; margin-left: 6px; }
.confirm-item-mods span:last-child::after { content: ''; }
.confirm-total-row { display: flex; justify-content: space-between; font-size: 15px; border-top: 1px solid #e8ddd5; padding-top: 10px; margin-top: 8px; }
.confirm-pay-note { font-size: 12px; color: #9a8a7a; margin-top: 10px 0 0; }
.confirm-notes { background: #faf5f0; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; text-align: left; font-size: 14px; color: #5a4a3a; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; margin: 24px 0 16px; flex-wrap: wrap; }
.confirm-footer-note { font-size: 12px; color: #9a8a7a; }
.confirm-footer-note a { color: #c4956a; text-decoration: none; }
