/* ============================================================
   兩嚿飯 learn9rice.com — Design System
   Based on DESIGN.md specification
   ============================================================ */

/* --- A. CSS Custom Properties -------------------------------- */

:root {
  /* Colors: Primary */
  --olive: #758055;
  --olive-hover: #64703F;
  --olive-active: #546832;
  --olive-light: #8F9B6F;
  --olive-pale: #E8EBDF;
  --warm-white: #FAFAF7;
  --charcoal: #2D2A26;
  --sand: #F5F0E8;

  /* Colors: Surfaces (intentionally pure white for lift on warm-white bg) */
  --card-bg: #FFFFFF;
  --nav-bg: #FFFFFF;

  /* Colors: Functional */
  --whatsapp: #25D366;
  --whatsapp-hover: #1FAF54;
  --error: #D94F4F;
  --success: #4CAF50;
  --warning: #F0A500;
  --info: #5B9BD5;

  /* Colors: Neutral Scale */
  --gray-800: #3D3A36;
  --gray-600: #6B6560;
  --gray-400: #A39E98;
  --gray-200: #E0DCD7;
  --gray-100: #F0EDE8;

  /* Typography: Font Families */
  --font-zh: "Noto Sans HK", "PingFang HK", "Microsoft JhengHei", "Heiti TC", sans-serif;
  --font-en: "DM Sans", "Noto Sans HK", -apple-system, system-ui, sans-serif;
  --font-mono: "DM Mono", "SF Mono", "Menlo", monospace;

  /* Typography: Sizes */
  --text-hero: 2.25rem;
  --text-section: 1.75rem;
  --text-card: 1.25rem;
  --text-subhead: 1.125rem;
  --text-body-lg: 1.063rem;
  --text-body: 0.938rem;
  --text-caption: 0.813rem;
  --text-badge: 0.75rem;

  /* Spacing (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-20: 80px;

  /* Border Radius */
  --radius-micro: 4px;
  --radius-input: 10px;
  --radius-btn: 12px;
  --radius-card: 16px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-2: 0 2px 8px rgba(45, 42, 38, 0.06);
  --shadow-3: 0 4px 16px rgba(45, 42, 38, 0.10);
  --shadow-4: 0 8px 32px rgba(45, 42, 38, 0.15);

  /* Layout */
  --content-max: 480px;
  --desktop-max: 960px;
  --nav-height: 60px;
  --page-padding: 20px;

  /* Borders */
  --border: 1px solid var(--gray-200);
}

/* --- B. Reset + Base ----------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  background-color: var(--warm-white);
  font-family: var(--font-zh);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.60;
  color: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--olive);
  text-decoration: none;
}
a:hover {
  color: var(--olive-hover);
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px; /* prevent iOS zoom */
}

:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

/* --- C. Typography ------------------------------------------- */

.text-hero {
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.5px;
  color: var(--charcoal);
}

.text-section {
  font-size: var(--text-section);
  font-weight: 700;
  line-height: 1.30;
  letter-spacing: 0.25px;
  color: var(--charcoal);
}

.text-card {
  font-size: var(--text-card);
  font-weight: 700;
  line-height: 1.35;
}

.text-subhead {
  font-size: var(--text-subhead);
  font-weight: 600;
  line-height: 1.40;
}

.text-body-lg {
  font-size: var(--text-body-lg);
  font-weight: 400;
  line-height: 1.65;
}

.text-body {
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.60;
}

.text-body-bold {
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1.60;
}

.text-caption {
  font-size: var(--text-caption);
  font-weight: 400;
  line-height: 1.50;
  letter-spacing: 0.25px;
  color: var(--gray-600);
}

.text-price {
  font-family: var(--font-mono);
  font-size: var(--text-card);
  font-weight: 500;
  line-height: 1.00;
  letter-spacing: -0.5px;
  color: var(--charcoal);
}

.text-price-sm {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.00;
  letter-spacing: -0.25px;
}

.text-badge {
  font-size: var(--text-badge);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.5px;
}

/* --- D. Layout ----------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

@media (min-width: 960px) {
  .container {
    max-width: var(--desktop-max);
  }
}

.section {
  padding-top: var(--sp-12);
  padding-bottom: var(--sp-12);
}

@media (min-width: 960px) {
  .section {
    padding-top: var(--sp-16);
    padding-bottom: var(--sp-16);
  }
}

.section--sand {
  background-color: var(--sand);
}

.section--white {
  background-color: var(--warm-white);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 600px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- E. Buttons ---------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: none;
  cursor: pointer;
  font-family: var(--font-zh);
  font-size: var(--text-body);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-btn);
  transition: background-color 0.15s, transform 0.1s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled,
.btn[disabled] {
  background-color: var(--gray-400);
  color: var(--gray-600);
  cursor: not-allowed;
  pointer-events: none;
  border-color: transparent;
}

/* Primary CTA (Olive) */
.btn-primary {
  background-color: var(--olive);
  color: #FFFFFF;
  padding: 14px 28px;
  min-height: 44px;
}
.btn-primary:hover {
  background-color: var(--olive-hover);
}
.btn-primary:active {
  background-color: var(--olive-active);
}

/* WhatsApp CTA */
.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #FFFFFF;
  padding: 14px 28px;
  font-weight: 700;
  min-height: 44px;
}
.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
}

/* Secondary Button (Outline) */
.btn-secondary {
  background-color: transparent;
  color: var(--olive);
  border: 1.5px solid var(--olive);
  padding: 12px 24px;
  min-height: 44px;
}
.btn-secondary:hover {
  background-color: var(--olive-pale);
}

/* Ghost Button */
.btn-ghost {
  background-color: transparent;
  color: var(--gray-600);
  padding: 8px 16px;
  font-weight: 400;
}
.btn-ghost:hover {
  color: var(--olive);
  text-decoration: underline;
}

/* Full-width button */
.btn--full {
  width: 100%;
}

/* Loading state */
.btn--loading {
  color: transparent;
  position: relative;
  pointer-events: none;
}
.btn--loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* Quantity Stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}

.stepper__btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--charcoal);
  background: var(--card-bg);
  transition: border-color 0.15s, color 0.15s;
  min-height: 36px;
}
.stepper__btn:hover {
  border-color: var(--olive);
  color: var(--olive);
}
.stepper__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.stepper__value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
}

/* --- F. Cards ------------------------------------------------ */

/* Product Card */
.product-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.product-card:hover {
  box-shadow: var(--shadow-3);
}

.product-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.product-card__body {
  padding: var(--sp-4);
}

.product-card__title {
  font-size: var(--text-card);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: var(--sp-2);
}

.product-card__desc {
  font-size: var(--text-body);
  color: var(--gray-600);
  line-height: 1.60;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-3);
}

.product-card__price {
  font-family: var(--font-mono);
  font-size: var(--text-card);
  font-weight: 500;
  letter-spacing: -0.5px;
}

/* Group Meal Card (extends product card) */
.product-card--group .product-card__img {
  aspect-ratio: 16 / 9;
}

.product-card__badge {
  display: inline-block;
  background-color: var(--olive-pale);
  color: var(--olive);
  font-size: var(--text-badge);
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* Order Status Card */
.order-card {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius-btn);
  padding: var(--sp-4);
  border-left: 4px solid var(--gray-400);
}

.order-card--pending   { border-left-color: var(--warning); }
.order-card--confirmed { border-left-color: var(--olive); }
.order-card--paid      { border-left-color: var(--olive-light); }
.order-card--preparing { border-left-color: var(--info); }
.order-card--ready     { border-left-color: var(--success); }
.order-card--completed { border-left-color: var(--success); }
.order-card--cancelled { border-left-color: var(--error); }

.order-card__number {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: var(--sp-2);
}

.order-card__summary {
  font-size: var(--text-body);
  line-height: 1.60;
}

/* --- G. Forms ------------------------------------------------ */

.form-field {
  margin-bottom: var(--sp-4);
}

.form-label {
  display: block;
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background-color: var(--gray-100);
  color: var(--charcoal);
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 16px; /* 16px specifically to prevent iOS Safari auto-zoom on focus */
  font-weight: 400;
  line-height: 1.60;
  min-height: 48px;
  transition: border-color 0.15s, background-color 0.15s;
}

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

.form-input:focus {
  border-color: var(--olive);
  background-color: var(--card-bg);
  outline: none;
}

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

.form-error {
  font-size: var(--text-caption);
  color: var(--error);
  margin-top: var(--sp-1);
}

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

/* --- H. Selectors -------------------------------------------- */

/* Radio / Option Selector (sauce picker etc.) */
.option-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.option-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-input);
  padding: 12px 16px;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.option-item:hover {
  border-color: var(--gray-400);
}

.option-item--selected {
  border: 2px solid var(--olive);
  background-color: var(--olive-pale);
}
.option-item--selected .option-item__label {
  font-weight: 600;
}

.option-item__label {
  font-size: var(--text-body);
  font-weight: 400;
}

.option-item__price {
  font-family: var(--font-mono);
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--gray-600);
}

/* Date Picker Pills */
.date-pills {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-1);
}
.date-pills::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex-shrink: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: var(--text-body);
  font-weight: 400;
  color: var(--charcoal);
  background: var(--card-bg);
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.date-pill:hover {
  border-color: var(--olive);
}

.date-pill--selected {
  background-color: var(--olive);
  color: #FFFFFF;
  border-color: var(--olive);
}

.date-pill--disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

/* Delivery Method Selector */
.delivery-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}

@media (max-width: 399px) {
  .delivery-cards {
    grid-template-columns: 1fr;
  }
}

.delivery-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-btn);
  padding: var(--sp-5);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background-color 0.15s;
}
.delivery-card:hover {
  border-color: var(--gray-400);
}

.delivery-card--selected {
  border: 2px solid var(--olive);
  background-color: var(--olive-pale);
}

.delivery-card__icon {
  font-size: 32px;
  margin-bottom: var(--sp-2);
}

.delivery-card__title {
  font-size: var(--text-subhead);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.delivery-card__desc {
  font-size: var(--text-caption);
  color: var(--gray-600);
}

/* --- I. Navigation ------------------------------------------- */

.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--nav-bg);
  height: var(--nav-height);
  border-bottom: var(--border);
}

.top-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.top-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.top-nav__logo img {
  height: 32px;
}
.top-nav__logo-text {
  font-size: var(--text-subhead);
  font-weight: 700;
  color: var(--charcoal);
  margin-left: var(--sp-2);
}

.top-nav__links {
  display: none;
  align-items: center;
  gap: var(--sp-6);
}

@media (min-width: 960px) {
  .top-nav__links {
    display: flex;
  }
}

.top-nav__link {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  padding: 4px 0;
}
.top-nav__link:hover {
  color: var(--olive);
  text-decoration: none;
}

.top-nav__link--active {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.top-nav__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--charcoal);
}

@media (min-width: 960px) {
  .top-nav__hamburger {
    display: none;
  }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}

.mobile-menu--open {
  pointer-events: all;
  visibility: visible;
}

.mobile-menu__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-menu--open .mobile-menu__overlay {
  opacity: 1;
}

.mobile-menu__panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 280px;
  background: var(--card-bg);
  box-shadow: var(--shadow-4);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
}
.mobile-menu--open .mobile-menu__panel {
  transform: translateX(0);
}

.mobile-menu__close {
  align-self: flex-end;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--gray-600);
  margin-bottom: var(--sp-6);
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.mobile-menu__link {
  font-size: var(--text-subhead);
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  padding: var(--sp-3) 0;
  border-bottom: var(--border);
}
.mobile-menu__link:hover {
  color: var(--olive);
  text-decoration: none;
}

.mobile-menu__link--active {
  color: var(--olive);
}

/* --- J. Cutoff Countdown Banner ------------------------------ */

.cutoff-banner {
  width: 100%;
  background-color: var(--olive);
  color: #FFFFFF;
  text-align: center;
  padding: var(--sp-3) var(--page-padding);
  font-size: var(--text-caption);
  font-weight: 600;
  line-height: 1.50;
}

.cutoff-banner--warning {
  background-color: var(--warning);
  color: var(--charcoal);
}

.cutoff-banner--closed {
  background-color: var(--gray-200);
  color: var(--gray-600);
}

/* --- K. Trust Bar -------------------------------------------- */

.trust-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4) var(--sp-6);
  padding: var(--sp-5) var(--page-padding);
}

.trust-bar__item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-caption);
  color: var(--gray-600);
  white-space: nowrap;
}

.trust-bar__icon {
  font-size: 20px;
  color: var(--olive);
}

/* --- L. Footer ----------------------------------------------- */

.footer {
  background-color: var(--charcoal);
  color: var(--gray-400);
  padding: var(--sp-12) var(--page-padding);
}

.footer__inner {
  max-width: var(--desktop-max);
  margin: 0 auto;
}

.footer__logo {
  margin-bottom: var(--sp-6);
}
.footer__logo img {
  height: 32px;
}

.footer__info {
  font-size: var(--text-body);
  line-height: 1.80;
  margin-bottom: var(--sp-6);
}

.footer__link {
  color: var(--gray-400);
  text-decoration: none;
}
.footer__link:hover {
  color: #FFFFFF;
  text-decoration: none;
}

.footer__divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: var(--sp-6) 0;
}

.footer__copyright {
  font-size: var(--text-caption);
  color: var(--gray-400);
}

.footer__pwa-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--gray-400);
  font-size: var(--text-body);
  text-decoration: none;
  margin-top: var(--sp-4);
}
.footer__pwa-link:hover {
  color: #FFFFFF;
}

/* --- M. Badges ----------------------------------------------- */

.badge {
  display: inline-block;
  font-size: var(--text-badge);
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  line-height: 1.25;
}

.badge--pending {
  background-color: #FFF3D0;
  color: #8B6914;
}
.badge--confirmed {
  background-color: var(--olive-pale);
  color: var(--olive);
}
.badge--paid {
  background-color: #D4EDDA;
  color: #1B5E20;
}
.badge--preparing {
  background-color: #D6EAF8;
  color: #1A5276;
}
.badge--ready {
  background-color: #D4EDDA;
  color: #1B5E20;
}
.badge--completed {
  background-color: var(--gray-100);
  color: var(--gray-600);
}
.badge--cancelled {
  background-color: #FDDEDE;
  color: #8B1A1A;
}

/* --- N. Utilities -------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }

/* Confirmation Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--page-padding);
}
.modal-overlay--open {
  display: flex;
}

.modal-box {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: var(--sp-8) var(--sp-5);
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-4);
  animation: modal-pop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Toast */
.toast {
  position: fixed;
  bottom: var(--sp-5);
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--charcoal);
  color: #FFFFFF;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-btn);
  font-size: var(--text-body);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 400;
}
.toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast--error {
  background: var(--error);
}
.toast--success {
  background: var(--success);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-5);
  color: var(--gray-400);
}
.empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--sp-4);
}
.empty-state__text {
  font-size: var(--text-body-lg);
  color: var(--gray-600);
}

/* Skeleton loading */
@keyframes skeleton-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-input);
}

/* --- O. Hero Section ----------------------------------------- */

.hero {
  padding: var(--sp-8) 0 var(--sp-12);
  text-align: center;
}

@media (min-width: 960px) {
  .hero {
    padding: var(--sp-12) 0 var(--sp-16);
    text-align: left;
  }
}

.hero__image {
  margin: 0 calc(var(--page-padding) * -1) var(--sp-6);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

@media (min-width: 600px) {
  .hero__image {
    margin: 0 0 var(--sp-6);
    border-radius: var(--radius-card);
  }
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.5px;
  color: var(--charcoal);
  margin-bottom: var(--sp-3);
}

.hero__subtitle {
  font-size: var(--text-body-lg);
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: var(--sp-6);
}

/* --- P. Food Image Placeholder (Phase 7 換真實相) ------------- */

.food-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  background: linear-gradient(135deg, var(--olive-pale) 0%, var(--sand) 100%);
  color: var(--olive);
  user-select: none;
}

.food-placeholder--16-9 {
  aspect-ratio: 16 / 9;
  font-size: 56px;
}

.food-placeholder--outlet {
  background: linear-gradient(135deg, #FFE5C7 0%, #F5DAB8 100%);
}

.food-placeholder--group {
  background: linear-gradient(135deg, #E8EBDF 0%, #D4DCC0 100%);
}

.food-placeholder--sous-vide {
  background: linear-gradient(135deg, #E3EEF5 0%, #CFE0ED 100%);
}

/* --- Q. Entry Card (首頁 3 入口) ------------------------------ */

.entry-card {
  display: block;
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-2);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.1s;
}
.entry-card:hover {
  box-shadow: var(--shadow-3);
  text-decoration: none;
  color: inherit;
}
.entry-card:active {
  transform: scale(0.99);
}

.entry-card__body {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.entry-card__text {
  flex: 1;
}

.entry-card__title {
  font-size: var(--text-card);
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: var(--sp-1);
}

.entry-card__desc {
  font-size: var(--text-body);
  color: var(--gray-600);
  line-height: 1.50;
}

.entry-card__arrow {
  font-size: var(--text-card);
  color: var(--olive);
  flex-shrink: 0;
}

/* --- R. Shop Info Card --------------------------------------- */

.shop-info {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius-card);
  padding: var(--sp-5);
  box-shadow: var(--shadow-2);
}

.shop-info__row {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
  border-bottom: var(--border);
}
.shop-info__row:last-child {
  border-bottom: none;
}

.shop-info__icon {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.shop-info__label {
  font-size: var(--text-caption);
  color: var(--gray-600);
  margin-bottom: 2px;
}

.shop-info__value {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--charcoal);
}

.shop-info__value a {
  color: var(--charcoal);
  text-decoration: none;
}
.shop-info__value a:hover {
  color: var(--olive);
}

/* --- S. FAQ Accordion (原生 <details>) ------------------------ */

.faq {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.faq__item {
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius-btn);
  overflow: hidden;
}

.faq__item[open] {
  box-shadow: var(--shadow-2);
}

.faq__summary {
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
}
.faq__summary::-webkit-details-marker {
  display: none;
}

.faq__summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--olive);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq__item[open] .faq__summary::after {
  content: "−";
}

.faq__answer {
  padding: 0 var(--sp-5) var(--sp-4);
  color: var(--gray-600);
  font-size: var(--text-body);
  line-height: 1.65;
}

/* --- T. Info List (預訂須知 等) ------------------------------- */

.info-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.info-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) 0;
}

.info-list__icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.info-list__text {
  font-size: var(--text-body);
  line-height: 1.60;
  color: var(--charcoal);
}

/* --- U. Sauce Selector (sous-vide form) ---------------------- */

.sauce-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.sauce-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--card-bg);
  border: var(--border);
  border-radius: var(--radius-input);
}

.sauce-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sauce-row__name {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--charcoal);
}

.sauce-row__price {
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  color: var(--gray-600);
}

/* --- V. Delivery Address (conditional) ----------------------- */

.delivery-address {
  display: none;
  margin-top: var(--sp-3);
}

.delivery-address--visible {
  display: block;
}

/* --- W. Subtotal Display ------------------------------------- */

.subtotal-display {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: var(--sp-4) 0;
  border-top: var(--border);
  margin-top: var(--sp-4);
}

.subtotal-display__label {
  font-size: var(--text-body-lg);
  font-weight: 600;
  color: var(--charcoal);
}

.subtotal-display__amount {
  font-family: var(--font-mono);
  font-size: var(--text-section);
  font-weight: 500;
  letter-spacing: -0.5px;
  color: var(--charcoal);
}

/* --- X. Form Step Grouping ----------------------------------- */

.form-step {
  margin-bottom: var(--sp-8);
}

.form-step__title {
  font-size: var(--text-subhead);
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid var(--olive-pale);
}

.form-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0;
}

.form-qty-row__label {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--charcoal);
}

/* --- Y. Confirmation Modal Content --------------------------- */

.modal-box__icon {
  font-size: 56px;
  margin-bottom: var(--sp-3);
}

.modal-box__title {
  font-size: var(--text-card);
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: var(--sp-5);
}

.modal-box__row {
  display: flex;
  justify-content: space-between;
  padding: var(--sp-3) 0;
  border-bottom: var(--border);
  text-align: left;
}
.modal-box__row:last-of-type {
  border-bottom: none;
}

.modal-box__label {
  font-size: var(--text-body);
  color: var(--gray-600);
}

.modal-box__value {
  font-size: var(--text-body);
  font-weight: 600;
  color: var(--charcoal);
}

.modal-box__value--mono {
  font-family: var(--font-mono);
  letter-spacing: -0.25px;
}

.modal-box__note {
  font-size: var(--text-body);
  color: var(--gray-600);
  margin: var(--sp-5) 0;
  line-height: 1.65;
}

.modal-box__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* --- Z. My Orders Page --------------------------------------- */

.query-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}

@media (min-width: 600px) {
  .query-form {
    flex-direction: row;
    align-items: flex-end;
  }
}

.query-form__field {
  flex: 1;
}

.query-form__btn {
  flex-shrink: 0;
}

@media (min-width: 600px) {
  .query-form__btn {
    min-width: 120px;
    height: 48px;
  }
}

/* Order Card sub-components */

.order-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: var(--border);
}

.order-card__items {
  font-size: var(--text-body);
  line-height: 1.60;
  margin-bottom: var(--sp-2);
}

.order-card__sauces {
  font-size: var(--text-caption);
  color: var(--gray-600);
  line-height: 1.60;
  margin-bottom: var(--sp-3);
}

.order-card__price {
  font-family: var(--font-mono);
  font-size: var(--text-card);
  font-weight: 500;
  letter-spacing: -0.5px;
  color: var(--charcoal);
  margin-bottom: var(--sp-3);
}

.order-card__detail-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-body);
  color: var(--charcoal);
  padding: var(--sp-1) 0;
}

.order-card__meta {
  font-size: var(--text-caption);
  color: var(--gray-600);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: var(--border);
}

/* Results header (count + refresh) */

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-4);
}

.results-header__count {
  font-size: var(--text-body);
  color: var(--gray-600);
}

.refresh-link {
  font-size: var(--text-body);
  color: var(--olive);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-weight: 600;
  font-family: inherit;
}
.refresh-link:hover {
  text-decoration: underline;
}
.refresh-link:disabled {
  color: var(--gray-400);
  cursor: not-allowed;
}

.order-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
