/* ═══════════════════════════════════════
   ORDER PAGE — uses :root vars from style.css
   ═══════════════════════════════════════ */

.order-hero {
  background: var(--ddcol);
  padding: 3.5rem 5vw 2.5rem;
  color: white;
}

.order-hero .section-label {
  color: var(--black);
  opacity: 0.9;
}

.order-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.order-hero p {
  opacity: 0.85;
  font-size: 1rem;
  max-width: 1000px;
}

.order-wrap {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  padding: 2.5rem 5vw 4rem;
  align-items: start;
}

.order-section {
  margin-bottom: 3rem;
}

.order-section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--ddcol);
  margin-bottom: 0.4rem;
}

.order-section-desc {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  margin-top: 0.5rem;
  max-width: 1000px;
}

/* ── Size picker ── */
.size-picker {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.size-btn {
  padding: 0.6rem 1.1rem;
  border: 1.5px solid var(--sand);
  border-radius: 2rem;
  background: white;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-mid);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.size-btn:hover { border-color: var(--ddcol-light); }

.size-btn.active {
  background: var(--ddcol);
  color: white;
  border-color: var(--ddcol);
}

/* ── Flavour grid ── */
.flavour-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.flavour-card {
  border: 1.5px solid var(--sand);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
  background: white;
}

.flavour-card:hover { border-color: var(--ddcol-light); }

.flavour-card.selected {
  border-color: var(--ddcol);
  background: var(--ddcol-pale);
}

.flavour-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f5f5f5;
}

.flavour-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-dark);
  display: block;
}

.flavour-stock-tag {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-block;
  margin-top: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
}

.flavour-stock-tag.low {
  background: #FEF3E0;
  color: #b8860b;
}

.flavour-stock-tag.out {
  background: #fde8e8;
  color: #c0392b;
}

.btn-add-item {
  background: var(--ddcol);
  color: white;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-add-item:hover:not(:disabled) { background: var(--ddcol-light); }

.btn-add-item:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* ── Beach basket cards ── */
.basket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.basket-card {
  border: 1.5px solid var(--sand);
  border-radius: 12px;
  padding: 1.25rem;
  background: white;
}

.basket-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.basket-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--ddcol);
}

.basket-price {
  font-weight: 500;
  color: var(--ddcol);
}

.basket-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.btn-add-basket {
  width: 100%;
  background: white;
  border: 1.5px solid var(--ddcol);
  color: var(--ddcol);
  padding: 0.55rem;
  border-radius: 2rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}

.btn-add-basket:hover { background: var(--ddcol); color: white; }

/* ── Sidebar cart ── */
.order-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
}

.cart-box {
  border: 1.5px solid var(--sand);
  border-radius: 16px;
  padding: 1.5rem;
  background: white;
}

.cart-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--ddcol);
  margin-bottom: 1rem;
}

.cart-items {
  margin-bottom: 1rem;
  max-height: 280px;
  overflow-y: auto;
}

.cart-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 0.5rem;
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
}

.cart-item-detail {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.cart-item-price {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ddcol);
  white-space: nowrap;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.2rem;
  line-height: 1;
}

.cart-item-remove:hover { color: #c0392b; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-dark);
  padding-top: 0.75rem;
  border-top: 1.5px solid var(--sand);
  margin-bottom: 0.3rem;
}

.cart-tax-note {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ── Checkout form ── */
.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-mid);
  margin-bottom: 0.3rem;
  margin-top: 0.9rem;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--sand);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--ddcol);
}

.checkout-form textarea {
  resize: vertical;
  min-height: 60px;
}

.btn-submit-order {
  width: 100%;
  background: var(--ddcol);
  color: white;
  border: none;
  padding: 0.9rem;
  border-radius: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  margin-top: 1.25rem;
  transition: background 0.2s;
  font-family: 'DM Sans', sans-serif;
}

.btn-submit-order:hover:not(:disabled) { background: var(--ddcol-light); }

.btn-submit-order:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.checkout-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.4;
}

/* ── Confirmation modal ── */
.order-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

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

.order-modal {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 380px;
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ddcol);
  color: white;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.order-modal h2 {
  font-family: 'Playfair Display', serif;
  color: var(--ddcol);
  margin-bottom: 0.6rem;
}

.order-modal p {
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .order-wrap {
    grid-template-columns: 1fr;
    padding: 1.5rem 5vw 3rem;
  }
  .order-sidebar {
    position: static;
    order: -1;
  }
  .order-hero { padding: 2rem 5vw 1.75rem; }
  .order-hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
}

/* Date picker styling — matches other form inputs */
.checkout-form input[type="date"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--sand);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
  cursor: pointer;
}

.checkout-form input[type="date"]:focus {
  outline: none;
  border-color: var(--ddcol);
}

/* ── DATE STRIP — horizontal scroll, clean pill cards ── */
.date-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.date-strip::-webkit-scrollbar { height: 5px; }
.date-strip::-webkit-scrollbar-thumb { background: var(--sand); border-radius: 3px; }

.date-card {
  flex: 0 0 auto;
  width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.65rem 0.4rem;
  border: 1.5px solid var(--sand);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.15s;
}

.date-card:hover { border-color: var(--ddcol-light); }

.date-card.selected {
  background: var(--ddcol);
  border-color: var(--ddcol);
}

.date-card-dow {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.date-card.selected .date-card-dow { color: rgba(255,255,255,0.8); }

.date-card-day {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.date-card.selected .date-card-day { color: white; }

.date-card-mon {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.date-card.selected .date-card-mon { color: rgba(255,255,255,0.8); }

/* ── TIME PILL GRID ── */
.time-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.time-pill {
  padding: 0.5rem 0.95rem;
  border: 1.5px solid var(--sand);
  border-radius: 2rem;
  background: white;
  font-size: 0.83rem;
  color: var(--text-mid);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.12s;
}

.time-pill:hover { border-color: var(--ddcol-light); color: var(--ddcol); }

.time-pill.selected {
  background: var(--ddcol);
  color: white;
  border-color: var(--ddcol);
}

.time-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Styled native date input + time dropdown ── */
.styled-date-input,
.styled-time-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--sand);
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-dark);
  background: white;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.styled-time-select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239C8E84' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.styled-date-input:focus,
.styled-time-select:focus {
  outline: none;
  border-color: var(--ddcol);
}

.styled-date-input::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.6;
  filter: invert(38%) sepia(57%) saturate(914%) hue-rotate(165deg);
}

/* ── Optional field label tag ── */
.form-label-optional {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Receipt modal ── */
.order-modal-receipt {
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
}

.receipt-box {
  text-align: left;
  background: #fafafa;
  border: 1px solid var(--sand);
  border-radius: 10px;
  padding: 1.1rem;
  margin: 1rem 0;
  font-size: 0.82rem;
}

.receipt-header { font-size: 0.85rem; color: var(--ddcol); margin-bottom: 0.75rem; line-height: 1.5; }
.receipt-meta { font-size: 0.8rem; color: var(--text-mid); line-height: 1.7; margin-bottom: 0.85rem; padding-bottom: 0.85rem; border-bottom: 1px dashed var(--sand); }
.receipt-items { margin-bottom: 0.75rem; }
.receipt-item { padding: 0.5rem 0; border-bottom: 1px solid #f0f0f0; }
.receipt-item-top { display: flex; justify-content: space-between; font-weight: 500; color: var(--text-dark); }
.receipt-item-detail { font-size: 0.74rem; color: var(--text-muted); margin-top: 0.2rem; line-height: 1.4; }
.receipt-total { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.95rem; color: var(--text-dark); padding-top: 0.6rem; border-top: 1.5px solid var(--sand); }
.receipt-footnote { font-size: 0.72rem; color: var(--text-muted); font-style: italic; margin-top: 0.6rem; text-align: center; }

.confirm-modal-actions { display: flex; gap: 0.6rem; }
.confirm-modal-actions .btn-primary { flex: 1; }
.btn-ghost-action { flex: 1; background: white; border: 1.5px solid var(--ddcol); color: var(--ddcol); padding: 0.75rem 1rem; border-radius: 2rem; font-size: 0.88rem; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; }
.btn-ghost-action:hover { background: var(--ddcol-pale); }

/* ════════════════════════════════════════
   ACCORDION SECTIONS
   ════════════════════════════════════════ */
.accordion-section {
  border: 1.5px solid var(--sand);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
  background: white;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  background: white;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}

.accordion-header:hover { background: #f9f9f9; }

.accordion-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: var(--ddcol);
  flex-shrink: 0;
}

.accordion-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
}

.accordion-chevron {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.accordion-body {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--sand);
}

/* ════════════════════════════════════════
   MOBILE STICKY CART BAR
   ════════════════════════════════════════ */
.mobile-cart-bar {
  display: none;
}

@media (max-width: 768px) {
  /* Push body up so content isn't hidden under sticky bar */
  body { padding-bottom: 72px; }

  .mobile-cart-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--ddcol);
    padding: 0.85rem 1.25rem;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
  }

  .mobile-cart-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
  }

  .mobile-cart-summary {
    display: flex;
    flex-direction: column;
    color: white;
  }

  .mobile-cart-count {
    font-size: 0.78rem;
    opacity: 0.8;
  }

  .mobile-cart-total {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
  }

  .mobile-cart-btn {
    background: white;
    color: var(--ddcol);
    border: none;
    padding: 0.65rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    white-space: nowrap;
  }

  /* ── Mobile cart slide-up panel ── */
  .mobile-cart-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
    align-items: flex-end;
  }

  .mobile-cart-overlay.show { display: flex; }

  .mobile-cart-panel {
    background: white;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
  }

  .mobile-cart-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem 1rem;
    border-bottom: 1px solid var(--sand);
    flex-shrink: 0;
  }

  .mobile-cart-panel-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--ddcol);
  }

  .mobile-cart-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
  }

  .mobile-cart-panel-body {
    overflow-y: auto;
    padding: 1rem 1.5rem 2rem;
    flex: 1;
  }

  /* On mobile, hide the desktop sidebar cart */
  .order-sidebar {
    display: none;
  }

  /* Accordion adjustments on mobile */
  .accordion-header { padding: 0.9rem 1rem; }
  .accordion-meta { display: none; }
  .accordion-body { padding: 0 1rem 1rem; }

  /* Order wrap single column */
  .order-wrap {
    grid-template-columns: 1fr;
    padding: 1rem 4vw 5rem;
    gap: 0;
  }
}
