/* ===================================
   CLICK & COLLECT — order.css
   =================================== */

/* Prevent horizontal scroll */
.order-page {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Nav back link */
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  transition: color 0.25s;
}
.nav-back:hover { color: var(--gold); }

/* ===================================
   ORDER HERO
   =================================== */

.order-hero {
  background: var(--black);
  color: var(--white);
  padding: 7rem 0 3rem;
  text-align: center;
}

.order-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.order-hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.order-hero-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.5);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

/* Steps bar */
.order-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 500px;
  margin: 0 auto;
}

.order-step {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  transition: color 0.3s;
  white-space: nowrap;
}

.order-step.active { color: var(--gold); }
.order-step.done { color: rgba(255,255,255,0.6); }

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1.5px solid rgba(255,255,255,0.15);
  transition: all 0.3s;
}

.order-step.active .step-num {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.order-step.done .step-num {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.order-step-line {
  width: 50px;
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.8rem;
}

/* ===================================
   ORDER LAYOUT
   =================================== */

.order-section { padding: 2.5rem 0 4rem; }

.order-step-content { display: none; }
.order-step-content.active { display: block; }

.order-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 2.5rem;
  align-items: start;
}

/* ===================================
   CATALOG
   =================================== */

.cat-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.cat-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 100px;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  white-space: nowrap;
}

.cat-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

.cat-btn.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.cat-section { display: none; }
.cat-section.active { display: block; }

.cat-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--black);
}

.cat-empty {
  color: var(--gray-500);
  font-size: 0.92rem;
  line-height: 1.7;
  padding: 2rem;
  text-align: center;
  background: var(--cream-dark);
  border-radius: var(--r-md);
}

.cat-empty a { color: var(--gold-dark); font-weight: 600; }

/* ===================================
   PRODUCT CARDS
   =================================== */

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--r-md);
  transition: all 0.25s var(--ease-smooth);
}

.product-card:hover {
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.product-card.added {
  border-color: var(--gold);
  background: rgba(196,162,101,0.04);
}

.product-info h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.1rem;
}

.product-desc {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin-bottom: 0.2rem;
}

.product-price {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gold-dark);
}

.product-add {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-300);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease-smooth);
  flex-shrink: 0;
}

.product-add:hover {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.product-card.added .product-add {
  background: var(--gold-dark);
  color: var(--white);
  border-color: var(--gold-dark);
}

/* ===================================
   CART SIDEBAR
   =================================== */

.cart-sidebar {
  position: sticky;
  top: 5rem;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 7rem);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.cart-header h2 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
}

.cart-count {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--cream-dark);
  color: var(--gray-700);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
}

.cart-count.has-items {
  background: var(--gold-dark);
  color: var(--white);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.cart-empty {
  text-align: center;
  padding: 2rem 0;
  color: var(--gray-500);
}

.cart-empty svg {
  color: var(--gray-300);
  margin-bottom: 1rem;
}

.cart-empty p {
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
}

.cart-empty span {
  font-size: 0.8rem;
}

/* Cart item */
.cart-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  animation: cartSlideIn 0.3s var(--ease-out);
}

.cart-item:last-child { border-bottom: none; }

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.78rem;
  color: var(--gold-dark);
  font-weight: 500;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: var(--cream-dark);
  border-color: var(--gray-500);
}

.qty-value {
  font-size: 0.88rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

/* Cart footer */
.cart-footer {
  padding: 1.2rem 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  background: var(--cream);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.cart-total span { font-size: 0.9rem; color: var(--gray-700); }
.cart-total strong { font-family: var(--font-display); font-size: 1.3rem; color: var(--black); }

.cart-payment-note {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-bottom: 1rem;
  text-align: center;
}

.btn-full { width: 100%; justify-content: center; }

/* ===================================
   MOBILE CART TOGGLE
   =================================== */

.cart-toggle {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 1rem 2rem;
  display: none;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  transition: all 0.3s var(--ease-out);
}

.cart-toggle:hover { background: var(--gold-dark); }

.cart-toggle-count {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================
   PICKUP / STEP 2
   =================================== */

.pickup-layout, .confirm-layout {
  max-width: 640px;
  margin: 0 auto;
}

.pickup-form h2, .confirm-form h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pickup-info, .confirm-info {
  color: var(--gray-700);
  font-size: 0.92rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* Form */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--black);
  background: var(--white);
  transition: border-color 0.25s;
  outline: none;
}

.form-input:focus {
  border-color: var(--gold);
}

.form-input::placeholder { color: var(--gray-300); }

.form-hint {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-top: 0.3rem;
  display: block;
}

.form-input.error { border-color: var(--gold-dark); }

textarea.form-input { resize: vertical; min-height: 80px; }

/* ===================================
   CUSTOM CALENDAR
   =================================== */

.custom-calendar {
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--r-md);
  padding: 1.2rem;
  user-select: none;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-month {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
  text-transform: capitalize;
}

.cal-nav {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--black);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cal-nav:hover {
  background: var(--cream-dark);
  border-color: var(--black);
}

.cal-nav:disabled {
  opacity: 0.3;
  cursor: default;
}

.cal-nav:disabled:hover {
  background: var(--white);
  border-color: var(--gray-300);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-weekday {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-500);
  padding: 0.4rem 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-closed-label {
  color: var(--gold-dark) !important;
}

.cal-day {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 50%;
  border: none;
  background: none;
  color: var(--black);
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.cal-day:hover:not(.cal-day--disabled):not(.cal-day--closed):not(.cal-day--empty) {
  background: var(--cream-dark);
}

.cal-day--today {
  font-weight: 700;
  color: var(--gold-dark);
}

.cal-day--today::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.cal-day--selected {
  background: var(--black) !important;
  color: var(--white) !important;
  font-weight: 700;
}

.cal-day--selected::after {
  display: none;
}

span.cal-day--disabled,
span.cal-day--closed,
span.cal-day--empty {
  pointer-events: none;
  cursor: default;
}

.cal-day--disabled {
  color: var(--gray-300);
}

.cal-day--closed {
  color: var(--gray-300);
  text-decoration: line-through;
  text-decoration-color: var(--gold-dark);
}

button.cal-day {
  z-index: 1;
  position: relative;
}

@media (max-width: 600px) {
  .cal-day {
    width: 36px;
    height: 36px;
    font-size: 0.82rem;
  }

  .custom-calendar {
    padding: 1rem 0.8rem;
  }

  .cal-weekdays span {
    font-size: 0.65rem;
  }
}

/* Pickup recap */
.pickup-recap, .final-recap {
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 1.5rem;
  margin: 2rem 0;
}

.pickup-recap h3, .final-recap h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--black);
}

.recap-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.4rem 0;
  color: var(--gray-700);
}

.recap-item span:last-child { font-weight: 600; color: var(--black); }

.pickup-recap-total, .final-recap-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.8rem;
  margin-top: 0.8rem;
  border-top: 1.5px solid rgba(0,0,0,0.08);
}

.pickup-recap-total span, .final-recap-total span {
  font-size: 0.88rem;
  color: var(--gray-700);
}

.pickup-recap-total strong, .final-recap-total strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--black);
}

.final-recap-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0;
  font-size: 0.88rem;
  color: var(--gray-700);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.final-recap-row svg { color: var(--gold-dark); flex-shrink: 0; }

/* Actions */
.pickup-actions, .confirm-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.btn-confirm {
  background: var(--gold-dark) !important;
  font-size: 0.95rem !important;
  padding: 1rem 2.5rem !important;
}

.btn-confirm:hover {
  background: var(--gold) !important;
}

/* ===================================
   SUCCESS / STEP 4
   =================================== */

.success-layout {
  max-width: 550px;
  margin: 0 auto;
  text-align: center;
}

.success-card {
  background: var(--white);
  border-radius: var(--r-xl);
  padding: 3rem;
  box-shadow: 0 4px 30px rgba(0,0,0,0.04);
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(76, 175, 80, 0.1);
  color: #4CAF50;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.success-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.success-card > p {
  font-size: 0.95rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.success-recap {
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.success-note {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ===================================
   ANIMATIONS
   =================================== */

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

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 900px) {
  .order-layout {
    grid-template-columns: 1fr;
  }

  .cart-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 950;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 70vh;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
  }

  .cart-sidebar.open {
    transform: translateY(0);
  }

  .cart-toggle {
    display: flex;
  }

  .order-hero { padding: 6rem 0 2rem; }
  .order-hero h1 { font-size: 2rem; }
  .order-hero-sub { font-size: 0.88rem; padding: 0 0.5rem; }

  .order-section { padding: 1.5rem 0 3rem; }

  .cat-nav {
    gap: 0.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .cat-btn {
    padding: 0.5rem 1rem;
    font-size: 0.78rem;
  }

  .product-card {
    padding: 0.8rem 1rem;
  }

  .product-info h3 {
    font-size: 0.92rem;
  }

  .pickup-layout, .confirm-layout {
    padding: 0 0.3rem;
  }
}

@media (max-width: 600px) {
  .order-hero h1 { font-size: 1.7rem; }

  .order-steps-bar { gap: 0; padding: 0 0.5rem; }
  .order-step { font-size: 0.68rem; }
  .step-num { width: 22px; height: 22px; font-size: 0.65rem; }
  .order-step-line { width: 20px; margin: 0 0.3rem; }

  .form-row { grid-template-columns: 1fr; }

  .pickup-actions, .confirm-actions {
    flex-direction: column;
  }

  .pickup-actions .btn, .confirm-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .success-card { padding: 2rem 1.5rem; }
  .success-card h2 { font-size: 1.4rem; }

  .cart-toggle {
    padding: 0.85rem 1.5rem;
    font-size: 0.82rem;
    bottom: 1rem;
  }

  .recap-item {
    font-size: 0.82rem;
  }

  .pickup-recap, .final-recap {
    padding: 1.2rem;
  }

  .btn-confirm {
    padding: 0.9rem 1.5rem !important;
    font-size: 0.88rem !important;
  }
}
