/* ==========================================================================
   MATA — matcha latte & cold brew | Design system
   Phong cách: "sticker cute" — viền mực dày, bo góc mập, đổ bóng cứng,
   nền kem + xanh matcha. Tối ưu cho Gen Z & dân văn phòng TP.HCM.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --ink:        #3B2314;
  --ink-soft:   #6B4F3A;
  --matcha-900: #2F6B3A;
  --matcha-700: #4E8C3E;
  --matcha-500: #6FAE55;
  --matcha-300: #8CC96E;
  --matcha-100: #DCEFD0;
  --matcha-50:  #EFF7E7;

  --cream:      #FFFBF2;
  --cream-100:  #FFF6E6;
  --paper:      #FFFFFF;

  --orange:     #FF8C42;
  --orange-100: #FFE3C7;
  --lemon:      #F2C94C;
  --lemon-100:  #FBEFAF;
  --coco:       #C79355;

  --danger:     #E4572E;
  --danger-ink: #C0401A;   /* bản đậm hơn để làm màu chữ, đủ tương phản trên nền trắng */
  --ok:         #4E8C3E;

  /* Type */
  --font-display: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --font-sans: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Shape */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;
  --r-pill: 999px;

  --bd: 3px solid var(--ink);
  --shadow: 5px 6px 0 var(--ink);
  --shadow-sm: 3px 4px 0 var(--ink);
  --shadow-lg: 8px 9px 0 var(--ink);
  --shadow-soft: 0 12px 30px rgba(59, 35, 20, .12);

  /* Layout */
  --wrap: 1140px;
  --gutter: 20px;
  --nav-h: 70px;

  --ease: cubic-bezier(.2, .8, .3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip — chặn tràn ngang do drawer nằm ngoài màn hình,
   nhưng không biến <html> thành vùng cuộn (giữ được position: sticky). */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  overflow-x: clip;
}
/* height:auto để thuộc tính width/height trên <img> không ghi đè aspect-ratio */
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display); margin: 0 0 .5em;
  font-weight: 800; letter-spacing: -.01em; text-wrap: balance;
  /* 1.25+ để dấu mũ/dấu thanh tiếng Việt không chạm dòng trên */
  line-height: 1.25;
}
h3, h4 { line-height: 1.32; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 4.4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.55rem); }
p  { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--matcha-700); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.section { padding: clamp(56px, 9vw, 96px) 0; }
.center { text-align: center; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.hide { display: none !important; }

/* ---------- Bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .12em;
  background: var(--lemon); color: var(--ink);
  border: var(--bd); border-radius: var(--r-pill);
  padding: 6px 16px; box-shadow: var(--shadow-sm);
  line-height: 1.4; margin-bottom: 18px;
}
.squiggle { display: block; margin: -2px auto 14px; width: 132px; height: 12px; }
.lead { font-size: clamp(1rem, 2vw, 1.15rem); color: var(--ink-soft); max-width: 60ch; text-wrap: pretty; }
.center .lead { margin-inline: auto; }

.badge {
  display: inline-block; font-family: var(--font-display); font-weight: 700;
  font-size: .78rem; letter-spacing: .04em;
  padding: 3px 12px; border-radius: var(--r-pill);
  border: 2px solid var(--ink); background: var(--paper);
}
.badge--hot   { background: var(--orange); }
.badge--new   { background: var(--matcha-300); }
.badge--best  { background: var(--lemon); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--matcha-500);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  padding: 13px 26px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--ink);
  border: var(--bd); box-shadow: var(--shadow);
  cursor: pointer; text-align: center;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .5; cursor: not-allowed; transform: none; box-shadow: var(--shadow-sm);
}
.btn--ghost  { --btn-bg: var(--paper); }
.btn--ink    { --btn-bg: var(--ink); color: var(--cream); }
.btn--orange { --btn-bg: var(--orange); }
.btn--lemon  { --btn-bg: var(--lemon); }
.btn--lg  { padding: 16px 34px; font-size: 1.1rem; }
.btn--sm  { padding: 9px 16px; font-size: .9rem; box-shadow: var(--shadow-sm); }
.btn--block { display: flex; width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: var(--cream-100);
  border-bottom: var(--bd);
}
.nav__in {
  display: flex; align-items: center; gap: 14px;
  min-height: var(--nav-h);
}
.nav__logo img { height: 40px; width: auto; }
.nav__links { display: flex; gap: 6px; margin-left: auto; }
.nav__links a {
  font-family: var(--font-display); font-weight: 700;
  padding: 8px 14px; border-radius: var(--r-pill);
  border: 2px solid transparent;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] {
  background: var(--matcha-100); border-color: var(--ink);
}
.nav__cart { position: relative; margin-left: 6px; }
.nav__cart .cart-count {
  position: absolute; top: -8px; right: -8px;
  min-width: 24px; height: 24px; padding: 0 5px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: .8rem;
  background: var(--orange); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-pill);
}
.cart-count.is-pop { animation: pop .42s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.5) rotate(-8deg); } 100% { transform: scale(1); } }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__links--m {
    display: flex; margin: 0; padding: 8px 0 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    border-top: 2px dashed rgba(59,35,20,.25);
  }
  .nav__links--m a { white-space: nowrap; }
}
@media (min-width: 761px) { .nav__links--m { display: none; } }

/* ---------- Marquee ---------- */
.marquee {
  background: var(--matcha-900); color: var(--cream);
  border-bottom: var(--bd); overflow: hidden; padding: 9px 0;
}
.marquee__track {
  display: flex; gap: 40px; width: max-content;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  letter-spacing: .04em;
  animation: slide 26s linear infinite;
}
.marquee span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, var(--lemon-100) 0 24%, transparent 24.5%),
    radial-gradient(circle at 88% 78%, var(--orange-100) 0 20%, transparent 20.5%),
    var(--matcha-50);
  border-bottom: var(--bd);
}
.hero__in {
  display: grid; gap: 34px; align-items: center;
  padding: clamp(40px, 7vw, 80px) 0 clamp(50px, 7vw, 86px);
}
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.05fr .95fr; gap: 48px; } }
.hero h1 .hl {
  background: var(--lemon); padding: 0 .18em; border-radius: 10px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px;
  list-style: none; padding: 0;
}
.hero__facts li {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--r-pill); padding: 6px 14px;
  font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-sm);
}
.hero__art { position: relative; }
.hero__art img { margin-inline: auto; max-width: 400px; width: 100%; }
.hero__art .float-1, .hero__art .float-2 {
  position: absolute; font-family: var(--font-display); font-weight: 800;
  background: var(--paper); border: var(--bd); border-radius: var(--r-md);
  padding: 8px 15px; box-shadow: var(--shadow-sm); font-size: .9rem;
}
.hero__art .float-1 { top: 6%; left: 0; transform: rotate(-7deg); background: var(--orange); }
.hero__art .float-2 { bottom: 10%; right: 0; transform: rotate(6deg); background: var(--matcha-300); }
.floaty { animation: floaty 4.5s ease-in-out infinite; }
.floaty--slow { animation-duration: 6s; animation-delay: -1.5s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Menu cards ---------- */
.menu-grid {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  margin-top: 40px;
}
.drink {
  display: flex; flex-direction: column;
  background: var(--paper); border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--shadow); overflow: hidden;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.drink:hover { transform: translate(-3px, -4px); box-shadow: var(--shadow-lg); }
.drink__media { position: relative; background: var(--matcha-50); border-bottom: var(--bd); }
.drink__media img { width: 100%; aspect-ratio: 5 / 6; object-fit: contain; }
.drink:hover .drink__media img { animation: wiggle .6s var(--ease); }
@keyframes wiggle { 0%,100% { transform: rotate(0); } 30% { transform: rotate(-3deg) scale(1.03); } 65% { transform: rotate(2.5deg) scale(1.03); } }
.drink__tags { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.drink__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.drink__name { font-size: 1.22rem; margin-bottom: 4px; }
.drink__desc { font-size: .93rem; color: var(--ink-soft); margin-bottom: 14px; flex: 1; }
.drink__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  font-size: .78rem; font-weight: 600; padding: 3px 10px;
  background: var(--matcha-50); border: 2px solid var(--matcha-300);
  border-radius: var(--r-pill);
}
.drink__price {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px;
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--matcha-900);
}
.drink__price s { font-size: .95rem; font-weight: 600; color: var(--ink-soft); }
.drink__actions { display: grid; gap: 9px; }
.drink__actions .btn { white-space: nowrap; }

/* ---------- Steps / how it works ---------- */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 40px; }
.step {
  background: var(--paper); border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 24px 20px; position: relative;
}
.step__no {
  width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  background: var(--lemon); border: var(--bd); border-radius: var(--r-pill);
  margin-bottom: 14px;
}
.step h3 { font-size: 1.12rem; }
.step p { font-size: .93rem; color: var(--ink-soft); margin: 0; }

/* ---------- Panels ---------- */
.panel {
  background: var(--paper); border: var(--bd); border-radius: var(--r-xl);
  box-shadow: var(--shadow); padding: clamp(22px, 4vw, 38px);
}
.panel--matcha { background: var(--matcha-50); }
.panel--cream  { background: var(--cream-100); }

.band { background: var(--matcha-900); color: var(--cream); border-block: var(--bd); }
.band h2, .band h3 { color: var(--cream); }
.band .lead { color: #E6EFD9; }

/* Thẻ nền sáng nằm trong .band phải tự khai báo lại màu chữ,
   nếu không sẽ thừa kế màu kem của band → chữ trắng trên nền trắng. */
.panel, .ship-card, .step, .value, .tl, .drink, .faq details { color: var(--ink); }
.band .panel h2, .band .panel h3,
.band .ship-card h3, .band .step h3, .band .value h3 { color: var(--ink); }
.band .panel .lead, .band .ship-card p, .band .step p, .band .value p { color: var(--ink-soft); }

/* ---------- Ship / notes ---------- */
.ship-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 32px; }
.ship-card {
  background: var(--paper); border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 22px; text-align: center;
}
.ship-card__icon { font-size: 2.2rem; line-height: 1; margin-bottom: 10px; }
.ship-card strong {
  font-family: var(--font-display); font-size: 1.2rem;
  display: block; color: var(--ink); margin-bottom: 4px;
}
.ship-card p { margin: 0; font-size: .94rem; }
.ship-card b { color: var(--matcha-900); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 34px auto 0; display: grid; gap: 12px; }
.faq details {
  background: var(--paper); border: var(--bd); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm); padding: 14px 18px;
}
.faq summary {
  font-family: var(--font-display); font-weight: 700; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Cart drawer ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(59, 35, 20, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); z-index: 70;
}
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 80;
  width: min(420px, 100%); height: 100dvh;
  background: var(--cream); border-left: var(--bd);
  display: flex; flex-direction: column;
  transform: translateX(105%); transition: transform .3s var(--ease);
}
.drawer.is-open { transform: translateX(0); }
.drawer__head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px; border-bottom: var(--bd); background: var(--matcha-100);
}
.drawer__head h2 { margin: 0; font-size: 1.3rem; }
.drawer__close {
  margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--paper); border: var(--bd); border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm); cursor: pointer; font-size: 1.1rem; font-weight: 700;
}
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.drawer__foot { border-top: var(--bd); padding: 18px 20px; background: var(--cream-100); }

.line {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px;
  align-items: center; padding: 12px 0; border-bottom: 2px dashed rgba(59,35,20,.2);
}
.line:last-child { border-bottom: 0; }
.line__img { width: 64px; height: 64px; border: 2px solid var(--ink); border-radius: var(--r-sm); background: var(--matcha-50); }
.line__name { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.line__opt { font-size: .82rem; color: var(--ink-soft); }
.line__price { font-weight: 700; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--ink); border-radius: var(--r-pill); overflow: hidden; background: var(--paper); }
.qty button {
  width: 32px; height: 32px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1;
}
.qty button:hover { background: var(--matcha-100); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; }

.totals { display: grid; gap: 8px; margin-bottom: 14px; }
.totals div { display: flex; justify-content: space-between; gap: 12px; font-size: .95rem; }
.totals .grand {
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem;
  color: var(--matcha-900); padding-top: 10px; border-top: 2px solid var(--ink);
}
.freeship-hint {
  background: var(--lemon-100); border: 2px solid var(--ink); border-radius: var(--r-md);
  padding: 10px 14px; font-size: .88rem; font-weight: 600; margin-bottom: 14px;
}
.freeship-hint.is-hit { background: var(--matcha-100); }
.empty { text-align: center; padding: 40px 10px; color: var(--ink-soft); }
.empty .big { font-size: 3rem; line-height: 1.1; margin-bottom: 10px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label { font-family: var(--font-display); font-weight: 700; font-size: .95rem; }
.field .req { color: var(--danger-ink); }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px;
  background: var(--paper); color: var(--ink);
  border: var(--bd); border-radius: var(--r-md);
  transition: box-shadow .16s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #A08D7C; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; box-shadow: var(--shadow-sm);
}
.field .hint { font-size: .82rem; color: var(--ink-soft); }
.field .err { font-size: .85rem; font-weight: 600; color: var(--danger-ink); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.grid-2 { display: grid; gap: 18px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.pick { display: flex; flex-wrap: wrap; gap: 10px; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick label {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: var(--bd); border-radius: var(--r-pill);
  background: var(--paper); cursor: pointer; font-weight: 600; font-size: .92rem;
  transition: background .16s var(--ease), transform .16s var(--ease);
}
.pick label:hover { transform: translateY(-2px); }
.pick input:checked + label { background: var(--matcha-300); box-shadow: var(--shadow-sm); }
.pick input:focus-visible + label { outline: 3px solid var(--matcha-700); outline-offset: 2px; }
.pick input:disabled + label { opacity: .45; cursor: not-allowed; }
.pick input:disabled + label:hover { transform: none; }
/* Nhãn 2 dòng: tên mốc + chú thích nhỏ (ngày, ETA…) */
.pick label .pk { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.pick label .pk b { font-weight: 700; }
.pick label .pk small { font-size: .76rem; font-weight: 600; opacity: .65; }
.pick label:has(.pk) { padding-block: 8px; }

/* ---------- Checkout layout ---------- */
.checkout { display: grid; gap: 26px; align-items: start; }
@media (min-width: 940px) { .checkout { grid-template-columns: 1.25fr .85fr; } }
.summary { position: sticky; top: calc(var(--nav-h) + 18px); }

.stepper { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; }
.stepper__i {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: .9rem;
  padding: 7px 16px; border: var(--bd); border-radius: var(--r-pill);
  background: var(--paper); opacity: .55;
}
.stepper__i.is-on { background: var(--matcha-300); opacity: 1; box-shadow: var(--shadow-sm); }
.stepper__i.is-done { background: var(--matcha-100); opacity: 1; }
.stepper__sep { width: 22px; height: 3px; background: var(--ink); border-radius: 3px; }
@media (max-width: 560px) { .stepper__sep { display: none; } }

/* ---------- Payment / QR ---------- */
.pay { display: grid; gap: 26px; align-items: start; }
@media (min-width: 900px) { .pay { grid-template-columns: .95fr 1.05fr; } }
.qr-box { text-align: center; }
.qr-frame {
  display: inline-block; padding: 14px; background: var(--paper);
  border: var(--bd); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.qr-frame img { width: 100%; max-width: 280px; aspect-ratio: 1 / 1; object-fit: contain; }
.bank-rows { display: grid; gap: 10px; margin-top: 22px; }
.bank-row {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--paper); border: 2px solid var(--ink); border-radius: var(--r-md);
  padding: 11px 14px;
}
.bank-row .k { font-size: .8rem; color: var(--ink-soft); display: block; }
.bank-row .v { font-family: var(--font-display); font-weight: 800; font-size: 1.02rem; word-break: break-all; }
.bank-row .v.amount { color: var(--matcha-900); font-size: 1.2rem; }
.copy {
  margin-left: auto; flex-shrink: 0; padding: 7px 13px;
  background: var(--lemon); border: 2px solid var(--ink); border-radius: var(--r-pill);
  font-family: var(--font-display); font-weight: 700; font-size: .82rem; cursor: pointer;
  transition: background .16s var(--ease);
}
.copy:hover { background: var(--matcha-300); }
.copy.is-ok { background: var(--matcha-300); }
.note-box {
  background: var(--lemon-100); border: var(--bd); border-radius: var(--r-md);
  padding: 14px 16px; font-size: .92rem;
}
.note-box strong { font-family: var(--font-display); }

/* ---------- Story ---------- */
.story-hero {
  background:
    radial-gradient(circle at 85% 15%, var(--lemon-100) 0 22%, transparent 22.5%),
    var(--matcha-50);
  border-bottom: var(--bd);
  padding: clamp(46px, 7vw, 84px) 0;
}
.timeline { display: grid; gap: 20px; margin-top: 40px; max-width: 800px; margin-inline: auto; }
.tl {
  display: grid; grid-template-columns: 78px 1fr; gap: 18px; align-items: start;
  background: var(--paper); border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 20px;
}
.tl__year {
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  background: var(--lemon); border: 2px solid var(--ink); border-radius: var(--r-sm);
  padding: 7px 4px; text-align: center;
}
.tl h3 { font-size: 1.15rem; margin-bottom: 6px; }
.tl p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
@media (max-width: 520px) {
  .tl { grid-template-columns: 1fr; }
  .tl__year { justify-self: start; padding: 6px 16px; }
}
.values { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 38px; }
.value {
  background: var(--paper); border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 24px 22px;
}
.value__icon { font-size: 2.3rem; line-height: 1; margin-bottom: 10px; }
.value h3 { font-size: 1.1rem; }
.value p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.duo { display: grid; gap: 22px; margin-top: 38px; }
@media (min-width: 820px) { .duo { grid-template-columns: 1fr 1fr; } }
.duo__card {
  border: var(--bd); border-radius: var(--r-xl); box-shadow: var(--shadow);
  padding: 26px; display: grid; gap: 14px;
}
.duo__card img { max-width: 190px; margin-inline: auto; }
.duo__card--matcha { background: var(--matcha-50); }
.duo__card--brew   { background: var(--orange-100); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--cream); padding: 52px 0 26px; }
.footer a { color: var(--lemon); text-decoration: underline; text-underline-offset: 3px; }
.footer__grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer h4 { font-family: var(--font-display); font-size: 1.05rem; margin: 0 0 10px; color: var(--cream); }
.footer p, .footer li { color: #E3D8CB; font-size: .93rem; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer__bar {
  margin-top: 34px; padding-top: 18px; border-top: 2px solid rgba(255, 251, 242, .2);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: .85rem; color: #C9BCAE;
}

/* ---------- Sticky mobile bar ---------- */
.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--cream-100); border-top: var(--bd);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: none; align-items: center; gap: 12px;
  box-shadow: 0 -6px 20px rgba(59, 35, 20, .12);
}
.sticky-bar strong { font-family: var(--font-display); font-size: 1.05rem; }
.sticky-bar .btn { margin-left: auto; }
@media (max-width: 760px) { .sticky-bar.is-on { display: flex; } body.has-bar { padding-bottom: 82px; } }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  z-index: 95; display: grid; gap: 8px; width: min(380px, calc(100% - 32px));
}
.toast {
  background: var(--ink); color: var(--cream);
  border-radius: var(--r-pill); padding: 12px 20px;
  font-weight: 600; font-size: .92rem; text-align: center;
  box-shadow: var(--shadow-soft);
  animation: toast-in .3s var(--ease);
}
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Closed-day banner ---------- */
.openbar {
  background: var(--lemon); border-bottom: var(--bd);
  padding: 10px 0; font-weight: 600; font-size: .92rem; text-align: center;
}
.openbar.is-closed { background: var(--orange-100); }
.openbar strong { font-family: var(--font-display); }

/* ---------- Print (hoá đơn) ---------- */
@media print {
  .nav, .marquee, .footer, .sticky-bar, .drawer, .drawer-backdrop, .openbar, .no-print { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; }
}

/* ---------- Chọn đá / đường trên thẻ menu ---------- */
.drink__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.drink__sel {
  width: 100%; padding: 8px 10px; font-size: .85rem; font-weight: 600;
  background: var(--matcha-50); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--r-sm);
  cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 13px center, right 8px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
}
.drink__sel:hover { background-color: var(--matcha-100); }

/* ---------- Bảng tóm tắt đơn ---------- */
.sum-line {
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
  padding: 10px 0; border-bottom: 2px dashed rgba(59, 35, 20, .18);
  font-size: .94rem;
}
.sum-line:last-of-type { border-bottom: 0; }
.sum-line .n { font-weight: 600; }
.sum-line .o { font-size: .8rem; color: var(--ink-soft); }

/* Emoji cỡ lớn đứng trên tiêu đề — cần line-height + margin riêng,
   nếu không dấu tiếng Việt của tiêu đề sẽ dính vào emoji. */
.emoji-xl { font-size: clamp(2.8rem, 8vw, 3.4rem); line-height: 1.1; margin-bottom: 12px; }

/* ---------- Phiếu xác nhận đơn ---------- */
.order-code {
  display: inline-block;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 5vw, 2.1rem); letter-spacing: .06em; line-height: 1.3;
  color: var(--matcha-900); background: var(--matcha-100);
  border: var(--bd); border-radius: var(--r-md);
  padding: 8px 24px; box-shadow: var(--shadow-sm);
}
.next-steps { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 10px; }
.next-steps li { font-size: .94rem; }
.next-steps li::marker { font-family: var(--font-display); font-weight: 800; color: var(--matcha-900); }

/* ---------- Lịch sử đơn ---------- */
.orders { display: grid; gap: 18px; max-width: 760px; margin: 34px auto 0; }
.order-card {
  background: var(--paper); color: var(--ink);
  border: var(--bd); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.order-card__head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px; background: var(--matcha-50); border-bottom: 2px dashed rgba(59, 35, 20, .22);
}
.order-card__code {
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem;
  color: var(--matcha-900); letter-spacing: .04em; line-height: 1.3;
}
.order-card__when { font-size: .82rem; color: var(--ink-soft); }
.order-card__right { text-align: right; display: grid; gap: 6px; justify-items: end; }
.order-card__total { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1.3; }

.opill {
  display: inline-block; font-size: .78rem; font-weight: 700;
  padding: 3px 12px; border-radius: var(--r-pill); border: 2px solid var(--ink);
  line-height: 1.5;
}
.opill--paid { background: var(--matcha-300); }
.opill--wait { background: var(--lemon); }

.order-card details { border-top: 0; }
.order-card summary {
  padding: 12px 20px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: .95rem;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.order-card summary::-webkit-details-marker { display: none; }
.order-card summary::after { content: "▾"; font-size: 1rem; }
.order-card details[open] summary::after { content: "▴"; }
.order-card summary:hover { background: var(--cream-100); }
.order-card__body { padding: 4px 20px 20px; border-top: 2px dashed rgba(59, 35, 20, .18); }
.order-card__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.order-card__actions .btn { flex: 1 1 180px; }
