/* Font thương hiệu: CHỈ dùng cho tiêu đề banner. Mọi chỗ khác dùng font hệ thống. */
@font-face {
  font-family: 'Cherry Bomb One';
  src: url('/fonts/CherryBombOne-Regular.ttf') format('truetype');
  font-display: swap;
}


:root {
  /* thương hiệu cũ (fallback cho nút/hint dùng trong các bước form) */
  --brand: #1fb6ac;
  --brand-dark: #128a82;
  --brand-light: #e8fbf8;
  --ink: #16241f;
  --ink-soft: #5c6b64;
  --line: #ece4de;
  --bg: #fffaf6;
  --card: #ffffff;
  --success: #2b8a3e;
  --danger: #e03131;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(22,36,31,0.08), 0 1px 2px rgba(22,36,31,0.06);

  /* theme mới theo mockup landing (mặc định: So.ngon - xanh lá đậm) */
  --hero-dark: #142723;
  --hero-dark-2: #0f1e1a;
  --cyan: #35d6c4;
  --cyan-dark: #1fb6ac;
  --cyan-glow: rgba(53,214,196,.35);
  --cyan-glow-2: rgba(53,214,196,.28);
  --cream: #f2ead2;
  --cream-2: #fbf6e8;
  color-scheme: light;
}

/* ---------- Theme brand: So.fe (tím trên nền đen/xám đen) ---------- */
.hero-title-img { display: block; width: min(100%, 420px); height: auto; }
.theme-violet {
  --hero-dark: #1a1626;
  --hero-dark-2: #0d0d10;
  --cyan: #a78bfa;
  --cyan-dark: #8b5cf6;
  --cyan-glow: rgba(167,139,250,.35);
  --cyan-glow-2: rgba(139,92,246,.32);
  --cream: #efe9e2;
  --cream-2: #f8f5f0;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--sx-font);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }
a { color: inherit; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  transition: max-width .2s ease;
}
.app.wide { max-width: 1320px; }

/* ---------- Header ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar h1 { font-size: 18px; margin: 0; font-weight: 800; letter-spacing: .2px; }
.topbar .sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.topbar-brand { flex: 1; min-width: 0; }
.topbar-logo { height: 36px; width: auto; display: block; }
html:not([data-brand-ready]) #heroBanner .hero-inner { visibility: hidden; }
.back-btn {
  border: none; background: var(--brand-light); color: var(--brand-dark);
  width: 36px; height: 36px; border-radius: 12px; font-size: 18px;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0;
}
.topbar-nav { display: none; }
.topbar-phone { display: none; }
.topbar-phone.has-phone {
  display: none; align-items: center; gap: 6px; text-decoration: none; color: var(--cyan-dark);
  font-weight: 800; font-size: 13px; background: var(--brand-light); padding: 8px 12px; border-radius: 999px;
  flex-shrink: 0; white-space: nowrap;
}
.topbar-phone .icon { font-size: 14px; }

/* ---------- Hero (chỉ hiện ở bước Menu) ---------- */
.hero {
  background: radial-gradient(120% 140% at 10% 0%, var(--hero-dark) 0%, var(--hero-dark-2) 65%);
  color: #fdf9ee;
  padding: 28px 20px 110px;
  position: relative;
  overflow: hidden; /* mascot nằm gọn trong hero, không cần đẩy z-index cả banner lên trên chips */
}
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 90px; height: 90px;
  background-image: radial-gradient(currentColor 2.4px, transparent 2.6px);
  background-size: 18px 18px;
  color: var(--cyan-glow);
  opacity: .8;
}
.hero::before { top: 18px; right: 14px; }
.hero::after { bottom: 30px; left: 10px; }
.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 250px;
}
.hero-text { max-width: 54%; padding-right: 8px; }
.hero-text h2 {
  font-family: 'Cherry Bomb One', var(--sx-font);
  font-weight: 400;
  font-size: clamp(26px, 6vw, 40px);
  line-height: 1.08;
  margin: 0 0 10px;
}
.hero-text h2 .accent { color: var(--cyan); display: block; }
.hero-text p {
  font-size: 13.5px;
  color: #d9e5df;
  line-height: 1.5;
  margin: 0 0 16px;
  max-width: 32ch;
}
.hero-cta {
  display: inline-block;
  background: var(--cyan);
  color: #0c1f1c;
  font-weight: 800;
  font-size: 14.5px;
  border: none;
  border-radius: 999px;
  padding: 13px 26px;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--cyan-glow-2);
}
/* Mascot: đặt tuyệt đối ở 1/3 phải banner, cao ~3/4 chiều cao hero. bottom:0 để nằm gọn trong hero, không lấn xuống vùng category chips */
.hero-mascot {
  position: absolute;
  right: 0%;
  bottom: 0;
  height: 96%;
  min-height: 240px;
  width: auto;
  z-index: 2;
  pointer-events: none;
}
/* Ảnh gốc quay mặt sang phải (ra ngoài) — lật lại để quay vào trong hero */
.hero-mascot img { height: 100%; width: auto; display: block; transform: scaleX(-1); filter: drop-shadow(0 12px 18px rgba(0,0,0,.35)); }
/* Một số ảnh mascot (VD: So.fe) đã có chữ/logo in sẵn trên đồ — không được lật ngang vì sẽ làm ngược chữ */
.hero-mascot.no-flip img { transform: none; }

/* ---------- Category cards (full-width row, đè lên mép dưới hero) ---------- */
.category-scroll {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 16px;
  max-width: 320px;
  margin: -40px auto 0;
  position: relative;
  z-index: 15;
}
.category-scroll::-webkit-scrollbar { display: none; }
.chip {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  border-radius: 12px;
  border: 1px solid rgba(20,39,35,.06);
  background: var(--cream-2);
  font-size: 10.5px; font-weight: 800; color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow);
  text-align: center;
  overflow: hidden;
}
.chip .chip-icon {
  width: 100%; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--cream); display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.chip .chip-icon img { width: 100%; height: 100%; object-fit: cover; }
.chip-label { display: block; padding: 6px 3px 8px; line-height: 1.3; }
.chip-sub { display: block; text-align: center; font-weight: 700; opacity: .75; font-size: .9em; margin-top: 1px; }
.chip.active { background: var(--hero-dark); color: #fdf9ee; }
.chip.active .chip-icon { background: rgba(255,255,255,.12); }

/* ---------- Menu grid (flexbox để không để lại khoảng trắng chết khi ít món) ---------- */
.menu-list {
  padding: 20px 16px 130px; flex: 1; background: var(--cream-2);
  display: flex; flex-wrap: wrap; gap: 14px; align-content: flex-start;
}
.menu-section-title {
  flex-basis: 100%; width: 100%;
  font-size: 20px; font-weight: 900; margin: 10px 2px 0; color: var(--ink);
}
.menu-item {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 12px; box-shadow: var(--shadow);
  flex: 1 1 100%; max-width: 100%;
}
.menu-item img {
  order: 1;
  width: 100%; aspect-ratio: 4 / 3; max-height: 220px; border-radius: 14px;
  object-fit: cover; background: var(--cream); flex-shrink: 0;
  margin-bottom: 10px;
}
.menu-item .info { order: 2; flex: 1; min-width: 0; }
.menu-item .name { font-weight: 800; font-size: 15px; margin-bottom: 3px; }
.menu-item .desc { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.menu-item .price { font-weight: 900; color: var(--cyan-dark); font-size: 15px; }

.qty-control { order: 3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 17px; font-weight: 700; color: var(--cyan-dark); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-btn.add { background: var(--cyan); color: #0c1f1c; border-color: var(--cyan); }
.qty-num { min-width: 18px; text-align: center; font-weight: 700; font-size: 14px; }

/* ---------- Sticky cart bar ---------- */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto;
  background: var(--hero-dark); color: #fff; padding: 14px 16px; border-radius: 18px 18px 0 0;
  display: flex; align-items: center; justify-content: space-between; box-shadow: 0 -6px 20px rgba(0,0,0,0.2);
  transform: translateY(120%); transition: transform .28s ease, opacity .2s, visibility .28s; cursor: pointer; z-index: 30;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.cart-bar.show { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
.cart-bar .left { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.cart-badge { background: var(--cyan); color: #0c1f1c; border-radius: 999px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
.cart-bar .right { font-weight: 800; font-size: 15px; color: var(--cyan); }

/* ---------- Sliding steps (menu -> cart -> address -> payment) ---------- */
.steps-track { display: flex; width: 400%; flex-shrink: 0; height: 100%; transition: transform .32s cubic-bezier(.4,0,.2,1); }
.step-pane { width: 25%; flex-shrink: 0; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.steps-viewport { flex: 1; overflow: hidden; position: relative; display: flex; min-height: 0; }

/* ---------- Generic panels ---------- */
.panel { padding: 16px; padding-bottom: 40px; max-width: 480px; margin: 0 auto; width: 100%; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px;
  background: #fff; color: var(--ink); font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan-dark); box-shadow: 0 0 0 3px var(--brand-light); }
.field textarea { resize: vertical; min-height: 64px; }
.hint { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* Cart line items */
.cart-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-line .name { flex: 1; font-weight: 600; font-size: 14px; }
.cart-line .line-price { font-weight: 700; font-size: 14px; }

.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; color: var(--ink-soft); }
.summary-row.total { font-size: 17px; font-weight: 800; color: var(--ink); border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.promo-badge { display: inline-block; background: #ebfbee; color: var(--success); font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-left: 6px; }

/* ---------- Buttons ---------- */
.btn-primary {
  width: 100%; background: var(--cyan); color: #0c1f1c; border: none; border-radius: 14px;
  padding: 15px; font-size: 15.5px; font-weight: 800; cursor: pointer; box-shadow: var(--shadow);
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary:active { transform: scale(.98); }
/* Nút CTA được JS chuyển vào cuối .panel hiện tại nên nằm ngay dưới nội dung, không còn dính đáy màn hình */
.bottom-cta { position: static; margin-top: 8px; padding: 0 0 calc(8px + env(safe-area-inset-bottom)); }

/* ---------- Payment / QR ---------- */
.qr-wrap { text-align: center; padding: 10px 0 6px; }
.qr-wrap img { width: 220px; height: 220px; margin: 0 auto 12px; border-radius: 14px; border: 1px solid var(--line); }
.amount-big { font-size: 26px; font-weight: 900; color: var(--cyan-dark); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--brand-light); color: var(--cyan-dark); }
.status-pill.paid { background: #ebfbee; color: var(--success); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.success-box { text-align: center; padding: 30px 10px; }
.success-box .emoji { font-size: 52px; margin-bottom: 10px; }

.skeleton { background: linear-gradient(90deg,#f1ebe6 25%,#f8f3ef 37%,#f1ebe6 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { 0%{background-position:100% 0} 100%{background-position:0 0} }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 13px;
  font-weight: 600; transition: all .25s ease; z-index: 60; pointer-events: none; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--hero-dark); margin-top: 8px; }
.site-footer-inner {
  max-width: 1320px; margin: 0 auto; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.site-footer-logo { height: 22px; width: auto; opacity: .9; }
.site-footer-text { font-size: 11.5px; color: rgba(253,249,238,.6); }
@media (min-width: 992px) {
  .site-footer-inner { flex-direction: row; justify-content: space-between; padding: 26px 40px; }
}

/* ---------- Info modal (Giới thiệu / Liên hệ) ---------- */
.info-modal { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; padding: 20px; }
.info-modal.show { display: flex; }
.info-modal-backdrop { position: absolute; inset: 0; background: rgba(15,30,26,.55); }
.info-modal-box {
  position: relative; background: var(--cream-2); border-radius: 20px; padding: 26px 22px;
  max-width: 420px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.info-modal-box h2 { margin: 0 0 10px; font-size: 20px; }
.info-modal-box p { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.info-modal-box a { color: var(--cyan-dark); font-weight: 700; }
.info-modal-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 999px;
  border: none; background: #fff; cursor: pointer; font-size: 14px;
}

/* =====================================================
   Responsive: tablet (>=640px) & desktop (>=992px)
   Mobile-first, tablet 2 cột, desktop landing đầy đủ
   ===================================================== */
@media (min-width: 640px) {
  .app { max-width: 720px; }
  .menu-item { flex-basis: calc(50% - 7px); max-width: calc(50% - 7px); }
  .hero { padding: 34px 32px 120px; border-radius: 0 0 28px 28px; }
  .hero-mascot { height: 96%; min-height: 280px; }
  .category-scroll { grid-template-columns: repeat(4, 1fr); padding: 0 32px; max-width: 640px; margin: -44px auto 0; }
  .menu-list { padding-left: 32px; padding-right: 32px; }
  .panel { max-width: 560px; }
  .topbar-phone.has-phone { display: flex; }
}

@media (min-width: 992px) {
  .app { max-width: 1320px; }
  .topbar { padding: 18px 40px; gap: 24px; }
  .topbar-nav { display: flex; gap: 24px; flex-shrink: 0; }
  .nav-link { text-decoration: none; color: var(--ink); font-weight: 700; font-size: 14px; }
  .nav-link:hover { color: var(--cyan-dark); }
  .hero { padding: 46px 40px 40px; }
  .hero-inner { max-width: 1240px; margin: 0 auto; align-items: flex-start; }
  .hero-text { padding-top: 30px; }
  .hero-text p { max-width: 44ch; }
  .hero-mascot { height: 98%; min-height: 380px; right: 2%; }
  .category-scroll {
    max-width: 760px; margin: -50px auto 0; padding: 0 40px;
    grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px;
  }
  .chip { border-radius: 16px; }
  .chip-label { padding: 8px 6px 12px; font-size: 11.5px; }
  .menu-list {
    padding: 20px 40px 60px; gap: 22px;
    max-width: 1320px; margin: 0 auto;
  }
  .menu-item { flex-basis: calc(25% - 16.5px); max-width: calc(25% - 16.5px); }
  .cart-bar { max-width: 420px; right: 40px; left: auto; border-radius: 18px; bottom: 24px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
  .panel { max-width: 560px; }
}

/* ===== Mascot v2: neo vào .hero (không phải .hero-inner) để luôn hiển thị trọn vẹn,
   chiếm 1/3 phải banner, đáy nằm trên vùng ô menu đè lên mép hero ===== */
.hero-inner { position: static; }
.hero-text { position: relative; z-index: 3; }
.hero-mascot {
  position: absolute; top: 14px; bottom: 58px; right: 3%;
  width: 40%; height: auto; min-height: 0;
  display: flex; align-items: flex-end; justify-content: center;
}
.hero-mascot img { width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
@media (min-width: 640px) {
  .hero { min-height: 360px; }
  .hero-mascot { top: 18px; bottom: 60px; width: 36%; height: auto; min-height: 0; right: 3%; }
}
@media (min-width: 992px) {
  .hero { min-height: 470px; padding-bottom: 90px; }
  .hero-mascot { top: 22px; bottom: 66px; width: 36%; height: auto; min-height: 0; right: 3%; }
}

/* Gợi ý địa chỉ */
.addr-suggest{display:none;position:absolute;left:0;right:0;z-index:50;margin-top:4px;background:#fff;border:1px solid #e5e5e5;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.12);overflow:hidden;max-height:280px;overflow-y:auto}
.addr-opt{display:block;width:100%;text-align:left;padding:10px 12px;border:0;border-bottom:1px solid #f1f1f1;background:none;font:inherit;font-size:14px;color:#222;cursor:pointer}
.addr-opt:last-child{border-bottom:0}
.addr-opt:hover{background:#f3faf8}
.theme-violet .addr-suggest{background:#1e1b26;border-color:#3a3350}
.theme-violet .addr-opt{color:#eee;border-color:#2c2738}
.theme-violet .addr-opt:hover{background:#2c2440}

/* ---------- Nav trang con: hamburger trên mobile/tablet ---------- */
.topbar { position: sticky; }
.topbar .sx-burger { color: var(--ink); order: 5; }
.nav-link.active { color: var(--cyan-dark) !important; }
@media (max-width: 991px) {
  .topbar .sx-burger { display: block; }
  .topbar-nav {
    position: absolute; top: 100%; right: 12px; left: 12px; margin-top: 6px;
    flex-direction: column; background: var(--card); border-radius: 14px; padding: 6px;
    box-shadow: 0 14px 36px rgba(0,0,0,.18); z-index: 40;
  }
  .sx-nav-open .topbar-nav { display: flex; }
  .topbar-nav .nav-link { display: block; padding: 12px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; }
  .topbar-nav .nav-link:active { background: var(--brand-light); }
}

/* ---------- Popup khuyến mãi ship (động theo giỏ hàng) ---------- */
.promo-nudge {
  position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%);
  width: min(92vw, 440px); z-index: 45; padding: 12px 38px 12px 14px;
  background: var(--card); color: var(--ink); border-radius: 16px;
  box-shadow: 0 12px 34px rgba(0,0,0,.2); border: 2px solid var(--cyan);
  font-size: 13.5px; line-height: 1.4; transition: transform .35s cubic-bezier(.2,.9,.3,1.2), bottom .25s;
  pointer-events: none; opacity: 0;
}
.promo-nudge.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.promo-nudge.with-cart { bottom: 92px; }
@media (min-width: 900px) {
  .promo-nudge { left: 24px; transform: translate(0, 140%); }
  .promo-nudge.show { transform: translate(0, 0); }
  .promo-nudge.pop { animation: none; }
}
.promo-nudge.pop { animation: promoPop .6s ease; }
@keyframes promoPop { 0% { transform: translate(-50%,0) scale(1); } 35% { transform: translate(-50%,-6px) scale(1.04); } 100% { transform: translate(-50%,0) scale(1); } }
.promo-bar { height: 6px; background: var(--line); border-radius: 99px; margin-top: 8px; overflow: hidden; }
.promo-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan-dark), var(--cyan)); border-radius: 99px; transition: width .4s ease; }
.promo-nudge.done { border-color: #2b8a3e; }
.promo-nudge.done .promo-bar span { background: #2b8a3e; }
.promo-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 14px; cursor: pointer; color: var(--ink-soft); padding: 4px; }
@media (prefers-reduced-motion: reduce) { .promo-nudge, .promo-nudge.pop { transition: none; animation: none; } }

/* Sửa món trong giỏ */
.cart-line { flex-wrap: wrap; }
.cart-qty { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; }
.cart-qty button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card, #fff); color: inherit; font-size: 15px; font-weight: 700; cursor: pointer; line-height: 1; }
.cart-qty .del { width: auto; border-radius: 999px; padding: 0 10px; font-size: 12px; font-weight: 600; color: #e03131; }
.cart-item-note { flex-basis: 100%; margin-left: 54px; width: calc(100% - 54px); padding: 7px 10px; border: 1px dashed var(--line); border-radius: 10px; font-size: 13px; background: transparent; color: inherit; }
.pay-lines { font-size: 13.5px; margin: 6px 0 10px; }
.pay-lines div { padding: 3px 0; }
.pay-lines .n { color: var(--ink-soft); font-size: 12.5px; }
.edit-cart-btn { background: none; border: 0; color: var(--cyan-dark); font-weight: 700; cursor: pointer; padding: 4px 0; font-size: 13.5px; }
@media (max-width: 480px) { .topbar-logo { height: 30px; } }

/* ===== Mobile: lưới 2 món / hàng ===== */
@media (max-width: 639px) {
  .menu-list { gap: 10px; padding-left: 12px; padding-right: 12px; }
  .menu-item { flex: 0 0 calc(50% - 5px); max-width: calc(50% - 5px); padding: 8px; border-radius: 14px; }
  .menu-item img { aspect-ratio: 1 / 1; max-height: none; border-radius: 10px; margin-bottom: 8px; }
  .menu-item .name { font-size: 13.5px; line-height: 1.25; }
  .menu-item .desc { font-size: 11.5px; margin-bottom: 6px; }
  .menu-item .price { font-size: 13.5px; }
  .qty-control { margin-top: 6px; gap: 6px; }
}
/* Safari cũ (iPhone XS Max iOS < 15) không hỗ trợ aspect-ratio -> dùng padding-top */
.chip .chip-icon { position: relative; height: 0; padding-top: 75%; aspect-ratio: auto; }
.chip .chip-icon img { position: absolute; inset: 0; top: 0; left: 0; }
.chip .chip-icon > :not(img) { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.chip { justify-content: flex-start; }
@supports not (aspect-ratio: 1 / 1) {
  .menu-item img { height: 42vw; max-height: 220px; }
  @media (min-width: 640px) { .menu-item img { height: 200px; } }
}

/* Món chay ngoài ngày bán */
.section-note { font-size: 12px; font-weight: 600; color: var(--ink-soft); margin-top: 4px; }
.section-note.off { color: #c2410c; }
.menu-item.is-off img { filter: grayscale(1); opacity: .55; }
.menu-item.is-off .name, .menu-item.is-off .price { opacity: .55; }
.off-tag { font-size: 11.5px; font-weight: 700; color: #868e96; background: rgba(0,0,0,.05); padding: 5px 10px; border-radius: 999px; }
.hero-hours { font-size: 13px; margin: -6px 0 14px; opacity: .9; }
.hero-hours .open { color: #40c057; } .hero-hours .closed { color: #ff8787; }

/* Popup ghi chú món */
.note-pop { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.note-pop-bg { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: npFade .2s; }
.note-pop-box { position: relative; width: min(100%, 440px); background: var(--card, #fff); color: var(--ink); border-radius: 20px 20px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); animation: npUp .25s ease; }
@media (min-width: 640px) { .note-pop { align-items: center; } .note-pop-box { border-radius: 20px; } }
.note-pop-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.note-pop-head img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.note-pop-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.np-chip { border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.np-chip.on { background: var(--cyan); border-color: var(--cyan); color: #0c1f1c; font-weight: 700; }
.note-pop textarea { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 14px; background: transparent; color: inherit; resize: vertical; }
.note-pop-actions { display: flex; gap: 10px; margin-top: 12px; }
.note-pop-actions button { flex: 1; border-radius: 999px; padding: 12px; font-weight: 800; font-size: 15px; cursor: pointer; border: 1px solid var(--line); background: transparent; color: inherit; }
.note-pop-actions .np-ok { flex: 2; background: var(--cyan); border-color: var(--cyan); color: #0c1f1c; }
@keyframes npUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes npFade { from { opacity: 0; } }
.theme-violet .np-chip.on, .theme-violet .note-pop-actions .np-ok { color: #fff; }

/* Thời gian giao + tạm tính ship */
.dl-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dl-opt { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.dl-opt:has(input:checked) { border-color: var(--cyan-dark); background: var(--cyan-glow, rgba(53,214,196,.15)); }
.dl-opt:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.dl-pick { gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dl-pick input, .dl-pick select { flex: 1 1 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; background: transparent; color: inherit; }
.ship-quote { font-size: 14px; }
.field .dl-opt { flex-direction: row; margin: 0; }
.field .dl-opt input { width: auto; margin: 0; padding: 0; flex: none; }
