/* ── RESET & BRAND VARIABLES ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,500&family=Be+Vietnam+Pro:wght@300;400;500;600&family=Noto+Serif+JP:wght@400;600&display=swap');

:root {
  /* ── Mitsu brand palette ── */
  --surface-hover: var(--surface-2);
  --border:      var(--line);
  --border-lt:   var(--line-soft);
  --coral:       var(--seal);
  --coral-dk:    var(--accent-deep);
  --teal:        var(--accent);
  --teal-dk:     var(--bg);
  --teal-mid:    var(--surface);
  --teal-lt:     var(--surface-2);
  --cream:       var(--text);
  --cream-dim:   var(--text-dim);
  --cream-faint: var(--text-muted);
  --earth:       var(--moss);
  --gold:        var(--accent-deep);
  --gold-lt:     rgba(198,138,62,.18);

  --radius:    8px;
  --radius-sm: 4px;
  --shadow:    0 4px 20px rgba(0,0,0,.15);
  --shadow-lg: 0 8px 36px rgba(0,0,0,.25);

  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%; overflow: hidden;
  background: var(--bg) url('img/mitsu/pattern-honeycomb.svg') repeat;
  background-size: 56px 98px;
}
#app {
  height: 100%; display: flex; flex-direction: column; overflow: hidden; position: relative;
  background: var(--bg) url('img/mitsu/pattern-honeycomb.svg') repeat;
  background-size: 56px 98px;
}

button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input  { font: inherit; }

/* ── HEADER ──────────────────────────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  background: var(--teal-dk);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative; z-index: 10;
}
.header-home-btn {
  display: flex; align-items: center; gap: 8px;
  color: var(--cream); text-decoration: none;
  font-family: 'Noto Serif JP', serif;
  font-size: .95rem; font-weight: 500; letter-spacing: .08em;
  transition: opacity .15s;
}
.header-home-btn:hover { opacity: .8; }
.header-home-btn svg { opacity: .85; flex-shrink: 0; }

.back-btn {
  font-size: .88rem; color: var(--cream-dim);
  padding: 4px 0; min-width: 70px;
  font-family: var(--body);
}
.back-btn:hover { color: var(--cream); }

.table-chip {
  background: color-mix(in srgb, var(--coral) 22%, transparent);
  border: 1px solid color-mix(in srgb, var(--coral) 40%, transparent);
  color: #F5C4BB;
  padding: 3px 11px; border-radius: 20px;
  font-size: .72rem; letter-spacing: .06em;
  font-family: var(--body);
}
.header-logo {
  font-family: 'Noto Serif JP', serif;
  font-size: .95rem; color: var(--cream);
  letter-spacing: .06em;
}

/* ── CATEGORY PILLS ──────────────────────────────────────────────────────── */
.cat-scroll {
  overflow-x: auto; flex-shrink: 0;
  background: var(--teal-dk);
  border-bottom: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-pills { display: flex; gap: 7px; padding: 10px 14px; width: max-content; }
.cat-pill {
  padding: 6px 14px; border-radius: 20px;
  background: transparent;
  border: 1px solid var(--border-lt);
  font-size: .77rem; white-space: nowrap;
  color: var(--cream-dim); letter-spacing: .04em;
  transition: all .15s;
  font-family: var(--body);
}
.cat-pill.active {
  background: var(--coral); color: #fff;
  border-color: var(--coral);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--coral) 35%, transparent);
}
.cat-pill:not(.active):hover { border-color: var(--border-lt); color: var(--cream); }

/* ── MENU LIST ───────────────────────────────────────────────────────────── */
.menu-list { flex: 1; overflow-y: auto; padding: 0 0 110px; }

.group-header {
  padding: 18px 16px 7px;
  font-size: .68rem; font-weight: 400; letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--disp);
  background: var(--bg);
  position: sticky; top: 0; z-index: 2;
  border-bottom: 1px solid var(--border);
}

/* ── ITEM CARD — base ─────────────────────────────────────────────────────── */
.item-card {
  display: flex; align-items: center;
  padding: 14px 16px;
  background: transparent;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  gap: 13px;
  position: relative;
  transition: background .15s;
  border-left: 3px solid transparent;
}
.item-card:active { background: var(--surface-hover); }

/* Hero — sản phẩm cần đẩy mạnh, lãi cao */
.item-card[data-role="hero"] {
  background: rgba(200,150,62,.06);
  border-left-color: var(--gold);
}
.item-card[data-role="hero"]:active { background: rgba(200,150,62,.12); }

/* Signature — đặc trưng quán */
.item-card[data-role="signature"] {
  background: color-mix(in srgb, var(--coral) 5%, transparent);
  border-left-color: var(--coral);
}
.item-card[data-role="signature"]:active { background: color-mix(in srgb, var(--coral) 10%, transparent); }

/* Trend — đang hot */
.item-card[data-role="trend"] {
  border-left-color: var(--accent-deep);
}

/* Seasonal — giới hạn */
.item-card[data-role="seasonal"] {
  border-left-color: var(--moss);
}

/* ── ITEM EMOJI ───────────────────────────────────────────────────────────── */
.item-emoji {
  font-size: 2rem; flex-shrink: 0;
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cream-faint);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.item-card[data-role="hero"] .item-emoji {
  background: rgba(200,150,62,.14);
  border-color: rgba(200,150,62,.3);
}
.item-card[data-role="signature"] .item-emoji {
  background: color-mix(in srgb, var(--coral) 10%, transparent);
  border-color: color-mix(in srgb, var(--coral) 25%, transparent);
}

/* ── ITEM INFO ────────────────────────────────────────────────────────────── */
.item-info { flex: 1; min-width: 0; }

.item-name-row { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.item-name {
  font-family: var(--body);
  font-weight: 600; font-size: .95rem;
  color: var(--cream); line-height: 1.3;
}
.item-card[data-role="hero"] .item-name { color: #F8EDD6; }

.item-jp {
  font-family: 'Noto Serif JP', serif;
  font-size: .7rem; color: var(--text-muted);
  margin-top: 2px; letter-spacing: .02em;
}
.item-story {
  font-size: .77rem; color: var(--text-dim);
  margin-top: 3px; font-style: italic;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.item-price {
  margin-top: 6px; font-size: .88rem;
  color: var(--coral); font-weight: 600;
  font-family: var(--disp);
}
.item-card[data-role="hero"] .item-price { color: var(--gold); }
.price-sep { color: var(--border-lt); margin: 0 3px; }
.size-hint { font-size: .7rem; color: var(--text-muted); font-weight: 400; }

/* ── ROLE BADGES ──────────────────────────────────────────────────────────── */
.role-badge {
  font-size: .62rem; font-weight: 600; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 10px;
  vertical-align: middle; white-space: nowrap;
  font-family: var(--body);
}
.role-badge-hero {
  background: rgba(200,150,62,.22);
  color: var(--gold);
  border: 1px solid rgba(200,150,62,.4);
}
.role-badge-signature {
  background: color-mix(in srgb, var(--coral) 15%, transparent);
  color: #F5A090;
  border: 1px solid color-mix(in srgb, var(--coral) 30%, transparent);
}
.role-badge-trend {
  background: rgba(217,123,74,.15);
  color: #EAA070;
  border: 1px solid rgba(217,123,74,.3);
}
.role-badge-seasonal {
  background: rgba(107,158,114,.15);
  color: #90C498;
  border: 1px solid rgba(107,158,114,.3);
}
.role-badge-default {
  background: var(--cream-faint);
  color: var(--cream-dim);
  border: 1px solid var(--border);
}

/* ── ADD BUTTON ───────────────────────────────────────────────────────────── */
.add-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--coral); color: #fff;
  font-size: 1.35rem; line-height: 1;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--coral) 40%, transparent);
}
.add-btn:active { transform: scale(.88); box-shadow: none; }

/* Hero items get a slightly larger, golden add button */
.item-card[data-role="hero"] .add-btn {
  background: var(--gold);
  box-shadow: 0 2px 10px rgba(200,150,62,.45);
}

.empty { padding: 40px 16px; text-align: center; color: var(--text-muted); }

/* ── CART FAB ────────────────────────────────────────────────────────────── */
.cart-fab {
  position: fixed; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: var(--coral); color: #fff;
  padding: 14px 28px; border-radius: 50px;
  box-shadow: 0 6px 28px color-mix(in srgb, var(--coral) 50%, transparent), 0 2px 8px rgba(0,0,0,.3);
  display: flex; align-items: center; gap: 10px;
  font-size: .94rem; font-weight: 600;
  z-index: 50; transition: transform .15s, box-shadow .15s;
  white-space: nowrap;
  font-family: var(--body);
}
.cart-fab:active { transform: translateX(-50%) scale(.96); box-shadow: 0 3px 14px color-mix(in srgb, var(--coral) 40%, transparent); }
.cart-badge {
  background: rgba(255,255,255,.25); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.cart-fab-total { font-size: .84rem; opacity: .9; }

/* ── BOTTOM SHEET ────────────────────────────────────────────────────────── */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 100;
  animation: fade-in .2s ease;
  backdrop-filter: blur(3px);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.bottom-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--teal-dk);
  border: 1px solid var(--border-lt);
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow-lg);
  z-index: 101;
  display: flex; flex-direction: column;
  max-height: 90vh;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.32,1,.5,1);
}
.bottom-sheet.open { transform: translateY(0); }
.sheet-tall { max-height: 85vh; }

.sheet-handle {
  width: 38px; height: 4px; border-radius: 2px;
  background: var(--border-lt);
  margin: 12px auto 4px; flex-shrink: 0;
}
.sheet-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 8px 20px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sheet-title {
  font-family: var(--disp);
  font-size: 1.05rem; font-weight: 600; color: var(--cream);
}
.sheet-subtitle {
  font-family: 'Noto Serif JP', serif;
  font-size: .75rem; color: var(--text-muted); margin-top: 3px;
}
.sheet-close { font-size: 1.1rem; color: var(--text-muted); padding: 4px; }
.sheet-close:hover { color: var(--cream); }

.sheet-body {
  overflow-y: auto; flex: 1;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
}
.item-story-full {
  font-size: .84rem; color: var(--text-dim);
  margin-bottom: 14px; font-style: italic;
  font-family: var(--disp);
  line-height: 1.6;
}
.allergen {
  font-size: .78rem; color: #F5A090;
  background: color-mix(in srgb, var(--coral) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--coral) 25%, transparent);
  padding: 7px 11px;
  border-radius: var(--radius-sm); margin-bottom: 14px;
}

/* Options */
.opt-group  { margin-bottom: 18px; }
.opt-label  {
  font-size: .7rem; font-weight: 400; letter-spacing: .18em;
  color: var(--text-muted); text-transform: uppercase;
  margin-bottom: 9px;
  font-family: var(--body);
}
.opt-chips  { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 15px; border-radius: 20px;
  border: 1.5px solid var(--border-lt);
  font-size: .83rem; color: var(--text-dim);
  background: var(--cream-faint);
  transition: all .12s;
  font-family: var(--body);
}
.chip.active {
  border-color: var(--coral);
  background: color-mix(in srgb, var(--coral) 15%, transparent);
  color: var(--cream);
}

/* Qty stepper */
.qty-row { display: flex; align-items: center; justify-content: space-between; }
.stepper { display: flex; align-items: center; gap: 14px; }
.step-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border-lt);
  font-size: 1.2rem; color: var(--cream-dim);
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.step-btn:active { background: var(--coral); color: #fff; border-color: var(--coral); }
.qty-val {
  font-size: 1.1rem; font-weight: 700; min-width: 26px;
  text-align: center; color: var(--cream);
  font-family: var(--body);
}

.stepper-sm .step-btn { width: 28px; height: 28px; font-size: 1rem; }
.stepper-sm .qty-val  { font-size: .9rem; }

/* Sheet footer */
.sheet-footer {
  padding: 14px 20px 28px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Cart rows */
.cart-body   { padding: 0 !important; }
.cart-row    {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1px solid var(--border); gap: 12px;
}
.cart-item-info  { flex: 1; min-width: 0; }
.cart-item-name  {
  font-weight: 600; font-size: .9rem; color: var(--cream);
  font-family: var(--body);
}
.cart-item-mods  { font-size: .77rem; color: var(--text-muted); margin-top: 2px; }
.cart-item-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.cart-item-price {
  font-size: .9rem; font-weight: 600;
  color: var(--coral); min-width: 70px; text-align: right;
  font-family: var(--disp);
}
.empty-cart { text-align: center; padding: 40px 20px; color: var(--text-muted); line-height: 2; }

.total-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: .9rem; color: var(--text-dim);
  font-family: var(--body);
}
.total-row strong { font-size: 1.08rem; color: var(--coral); }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: block; width: 100%;
  padding: 15px; border-radius: var(--radius);
  background: var(--coral); color: #fff;
  font-size: .92rem; font-weight: 600; letter-spacing: .06em;
  text-align: center;
  transition: opacity .15s, box-shadow .15s;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--coral) 40%, transparent);
  font-family: var(--body);
}
.btn-primary:disabled { opacity: .45; box-shadow: none; }
.btn-primary:active   { opacity: .82; box-shadow: none; }
.btn-secondary {
  display: block; width: 100%;
  padding: 14px; border-radius: var(--radius);
  border: 1.5px solid var(--border-lt); color: var(--cream-dim);
  font-size: .9rem; font-weight: 600; text-align: center;
  margin-top: 12px; transition: all .15s;
  font-family: var(--body);
}
.btn-secondary:active { background: var(--surface); color: var(--cream); }

/* ── CHECKOUT ────────────────────────────────────────────────────────────── */
.checkout-form {
  flex: 1; overflow-y: auto;
  padding: 20px 20px 40px;
  display: flex; flex-direction: column; gap: 0;
}
.form-section  { margin-bottom: 18px; }

/* Bộ nhớ đệm — chip điền nhanh dưới ô SĐT / địa chỉ (mỗi ô 3 cái gần nhất) */
.recall-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.recall-chip {
  background: rgba(220,135,10,0.1); color: var(--accent);
  border: 1px solid rgba(220,135,10,0.3); border-radius: 20px;
  padding: 6px 12px; font-size: .8rem; font-weight: 600; cursor: pointer;
  white-space: nowrap; transition: background .2s ease;
}
.recall-chip:hover, .recall-chip:active { background: rgba(220,135,10,0.2); }
.form-label    {
  display: block; font-size: .7rem; font-weight: 400; letter-spacing: .16em;
  color: var(--text-muted); text-transform: uppercase;
  margin-bottom: 7px; font-family: var(--body);
}
.req { color: var(--coral); }
.form-input {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border-lt); border-radius: var(--radius-sm);
  font-size: .95rem;
  background: var(--surface); color: var(--cream);
  transition: border-color .15s;
  font-family: var(--body);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--coral); }

.table-row   { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-input { flex: 1; min-width: 120px; }
.table-chip-lg {
  background: color-mix(in srgb, var(--coral) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--coral) 40%, transparent);
  color: #F5C4BB;
  padding: 7px 16px; border-radius: 20px;
  font-size: .84rem; font-weight: 600;
  font-family: var(--body);
}

.order-summary {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border-lt);
  padding: 14px 16px; margin-bottom: 20px;
}
.summary-title {
  font-size: .68rem; font-weight: 400; letter-spacing: .18em;
  color: var(--text-muted); text-transform: uppercase;
  margin-bottom: 10px; font-family: var(--body);
}
.summary-row {
  display: flex; justify-content: space-between;
  font-size: .87rem; color: var(--text-dim); margin-bottom: 6px;
  font-family: var(--body);
}
.summary-total {
  display: flex; justify-content: space-between;
  font-size: .92rem; color: var(--cream);
  border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px;
  font-family: var(--body);
}
.summary-total strong { font-size: 1.05rem; color: var(--coral); }

.form-label-hint {
  font-size: .68rem; color: var(--text-muted);
  font-weight: 400; letter-spacing: .04em;
  text-transform: none; margin-left: 2px;
}

.address-region-hint {
  margin-top: 7px;
  font-size: .78rem; color: var(--text-muted);
  font-family: var(--body);
}
.address-region-hint strong { color: var(--earth); }

.delivery-chips, .payment-chips { margin-top: 0; }
.delivery-chips .chip, .payment-chips .chip { flex: 1; text-align: center; justify-content: center; }

.delivery-confirm-note {
  background: rgba(200,150,62,.12);
  border: 1px solid rgba(200,150,62,.3);
  color: var(--earth);
  padding: 14px 18px; border-radius: var(--radius);
  font-size: .9rem; line-height: 1.6;
  margin-bottom: 20px;
  font-family: var(--body);
  text-align: center;
}

.error-msg {
  color: #F5A090; font-size: .84rem; margin-bottom: 12px;
  background: color-mix(in srgb, var(--coral) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--coral) 25%, transparent);
  padding: 10px 14px; border-radius: var(--radius-sm);
}
.btn-submit { margin-top: 0; }

/* ── SUCCESS SCREEN ──────────────────────────────────────────────────────── */
.success-screen {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 28px 40px; text-align: center;
}
.success-icon  { font-size: 3.5rem; margin-bottom: 16px; }
.success-title {
  font-size: 1.55rem; font-weight: 600; color: var(--cream);
  margin-bottom: 8px;
  font-family: var(--disp);
}
.success-sub   { font-size: .9rem; color: var(--text-dim); margin-bottom: 20px; font-style: italic; }
.order-id-chip {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  padding: 8px 20px; border-radius: 20px;
  font-size: .88rem; font-weight: 600; font-family: monospace;
  margin-bottom: 28px; color: var(--earth);
}
.qr-block {
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  text-align: center;
}
.qr-label      { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; letter-spacing: .04em; text-transform: uppercase; }
.qr-img        {
  width: 200px; height: 200px;
  border-radius: var(--radius);
  border: 3px solid var(--border-lt);
  background: #fff;
  margin-bottom: 12px;
}
.bank-info-text {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 12px;
}
.bank-name-badge {
  display: inline-block;
  background: var(--teal);
  color: var(--cream);
  font-size: .75rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 10px; border-radius: 20px;
  margin-bottom: 8px;
}
.bank-acct  { font-size: 1.3rem; font-weight: 700; font-family: monospace; color: var(--cream); letter-spacing: .08em; }
.bank-owner { font-size: .82rem; color: var(--text-muted); margin-top: 4px; }
.ck-instruction { font-size: .78rem; color: var(--text-muted); margin-bottom: 6px; }
.ck-code {
  font-size: 3rem; font-weight: 800; font-family: monospace;
  color: var(--coral);
  letter-spacing: .12em;
  line-height: 1;
  margin: 6px 0 10px;
}
.ck-amount { font-size: .88rem; color: var(--text-dim); }
.ck-amount strong { color: var(--gold); }
.payment-note  {
  background: rgba(200,150,62,.1);
  border: 1px solid rgba(200,150,62,.25);
  padding: 16px 20px; border-radius: var(--radius);
  font-size: .9rem; color: var(--earth); line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}

/* ── UPSELL SHEET ────────────────────────────────────────────────────────── */
.upsell-title { font-size: 1rem; }

.upsell-body { padding: 12px 16px !important; display: flex; flex-direction: column; gap: 10px; }

.upsell-card {
  display: flex; align-items: center; gap: 13px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border-lt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  position: relative;
  border-left: 3px solid var(--border-lt);
}
.upsell-card:active { background: var(--surface-hover); }
.upsell-card.in-cart {
  background: rgba(107,158,114,.1);
  border-color: rgba(107,158,114,.35);
  border-left-color: var(--moss);
}

.upsell-emoji {
  font-size: 1.8rem; flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(200,150,62,.1);
  border: 1px solid rgba(200,150,62,.22);
  border-radius: var(--radius-sm);
}
.upsell-card.in-cart .upsell-emoji {
  background: rgba(107,158,114,.15);
  border-color: rgba(107,158,114,.3);
}

.upsell-info { flex: 1; min-width: 0; }
.upsell-name {
  font-family: var(--body); font-weight: 600;
  font-size: .92rem; color: var(--cream);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upsell-jp {
  font-family: 'Noto Serif JP', serif;
  font-size: .68rem; color: var(--text-muted); margin-top: 1px;
}
.upsell-story {
  font-size: .75rem; color: var(--text-dim);
  font-style: italic; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upsell-price {
  font-size: .85rem; font-weight: 600;
  color: var(--gold); margin-top: 4px;
  font-family: var(--disp);
}

.upsell-btn {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold); color: #fff;
  font-size: 1.25rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(200,150,62,.4);
  transition: transform .12s, background .15s;
  pointer-events: none; /* click gắn trên card */
}
.upsell-btn.added {
  background: var(--moss);
  box-shadow: 0 2px 8px rgba(107,158,114,.4);
  font-size: 1rem;
}
.upsell-card:active .upsell-btn { transform: scale(.86); }

.upsell-skip-btn {
  font-size: .88rem; color: var(--text-muted);
  border-color: var(--border);
  letter-spacing: .04em;
}
.upsell-skip-btn:active { color: var(--cream); }

/* ── TOAST ───────────────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 90px; left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--teal-dk);
  border: 1px solid var(--border-lt);
  color: var(--cream);
  padding: 10px 22px; border-radius: 24px;
  font-size: .86rem; font-weight: 500;
  z-index: 200; opacity: 0;
  transition: opacity .2s, transform .2s;
  white-space: nowrap; pointer-events: none;
  box-shadow: var(--shadow);
  font-family: var(--body);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── SCROLLBAR ───────────────────────────────────────────────────────────── */
.menu-list::-webkit-scrollbar,
.sheet-body::-webkit-scrollbar,
.checkout-form::-webkit-scrollbar { width: 3px; }
.menu-list::-webkit-scrollbar-thumb,
.sheet-body::-webkit-scrollbar-thumb,
.checkout-form::-webkit-scrollbar-thumb {
  background: var(--border-lt); border-radius: 2px;
}

/* ── SAFE AREA (iPhone notch/home bar) ───────────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .sheet-footer   { padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
  .btn-submit     { padding-bottom: calc(15px + env(safe-area-inset-bottom)); }
  .cart-fab       { bottom: calc(20px + env(safe-area-inset-bottom)); }
  .success-screen { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
}

/* ── PROMO BANNER ── */
.promo-banner {
  background: linear-gradient(90deg, var(--coral-dk) 0%, var(--coral) 50%, var(--coral-dk) 100%);
  color: #fff;
  padding: 9px 16px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 99;
  flex-shrink: 0;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--coral) 25%, transparent);
  font-family: var(--body);
  letter-spacing: 0.02em;
}
.promo-countdown {
  background: rgba(0, 0, 0, 0.28);
  padding: 3px 10px;
  border-radius: 20px;
  font-family: monospace;
  font-weight: bold;
  font-size: 0.92rem;
  display: inline-block;
  min-width: 80px;
  letter-spacing: 0.05em;
  text-align: center;
}
@keyframes urgent-blink {
  0%, 100% { opacity: 1; transform: scale(1); background: rgba(180, 0, 0, 0.8); box-shadow: 0 0 6px rgba(255,0,0,0.8); }
  50% { opacity: 0.4; transform: scale(1.04); background: rgba(255, 0, 0, 0.95); box-shadow: 0 0 14px rgba(255,0,0,1); }
}
.promo-countdown.urgent {
  animation: urgent-blink 0.8s infinite;
  color: #fff;
}

/* ── PRICE OLD (CROSSED OUT) ── */
.price-old {
  text-decoration: line-through;
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-right: 6px;
  font-weight: 400;
  opacity: 0.65;
}

.hidden { display: none !important; }

/* ── LOYALTY STAMP CARD ────────────────────────────────────────────────── */
.loyalty-container {
  margin-top: 10px;
  background: var(--surface);
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn .3s ease;
  margin-bottom: 18px;
}
.loyalty-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.loyalty-title {
  font-family: var(--body);
  font-size: .8rem;
  font-weight: bold;
  letter-spacing: .12em;
  color: var(--coral);
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.loyalty-subtitle {
  font-size: .75rem;
  color: var(--text-dim);
  line-height: 1.3;
}
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 6px 0;
}
.stamp-slot {
  aspect-ratio: 1;
  background: var(--surface-2);
  border: 1.5px dashed var(--border-lt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all .25s ease;
  overflow: hidden;
}
.stamp-slot.active {
  border-style: solid;
  border-color: var(--coral);
  background: color-mix(in srgb, var(--coral) 10%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--coral) 15%, transparent);
}
.stamp-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* ảnh ong dọc → lấy phần mặt cho ô tròn */
  border-radius: 50%;
  animation: stampPop .35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.stamp-number {
  font-size: .7rem;
  color: var(--text-muted);
  font-weight: bold;
}
.stamp-slot.active .stamp-number {
  display: none;
}
.reward-box {
  background: color-mix(in srgb, var(--coral) 8%, transparent);
  border: 1.5px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  animation: pulseLight 2s infinite alternate;
}
.reward-checkbox-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  width: 100%;
}
.reward-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1.5px solid var(--coral);
  background: var(--bg);
  accent-color: var(--coral);
  cursor: pointer;
}
.reward-text-container {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.reward-title {
  font-family: var(--body);
  font-size: .85rem;
  font-weight: bold;
  color: var(--cream);
}
.reward-desc {
  font-size: .72rem;
  color: var(--text-dim);
}
.reward-badge-gift {
  font-size: 1.4rem;
  animation: wobble 1s infinite alternate;
}

@keyframes stampPop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulseLight {
  0% { box-shadow: 0 0 5px color-mix(in srgb, var(--coral) 10%, transparent); }
  100% { box-shadow: 0 0 15px color-mix(in srgb, var(--coral) 30%, transparent); }
}

@keyframes wobble {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(5deg); }
}

/* ── CUSTOMER SUGGESTION BANNER ─────────────────────────────────────────── */
.customer-suggestion-banner {
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--border-lt);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideDown .4s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
}
.cs-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-avatar {
  font-size: 1.6rem;
  animation: hoverbee 2s infinite alternate;
}
.cs-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cs-title {
  font-family: var(--body);
  font-size: .85rem;
  color: var(--cream);
}
.cs-desc {
  font-size: .75rem;
  color: var(--text-dim);
}
.cs-btn {
  background: var(--coral);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: .75rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--coral) 30%, transparent);
  transition: transform .2s, opacity .2s;
  white-space: nowrap;
}
.cs-btn:active {
  transform: scale(0.95);
}

@keyframes slideDown {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes hoverbee {
  0% { transform: translateY(0) scale(1); }
  55% { transform: translateY(-4px) rotate(-3deg); }
  100% { transform: translateY(0) scale(1); }
}

/* ── MITSU GALLERY & CAROUSEL STYLES ────────────────────────────────────────── */

/* View toggle */
.menu-view-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.menu-view-toggle button {
  font-family: var(--body);
  font-size: .8rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.menu-view-toggle button.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 500;
}

/* Honeycomb Grid View */
#gallery-container {
  padding: 24px 10px 110px;
  overflow-y: auto;
  flex: 1;
}
.hrow {
  display: flex;
  justify-content: center;
  gap: 12px;
  position: relative;
}
.hrow:nth-child(1) { z-index: 50; }
.hrow:nth-child(2) { z-index: 49; }
.hrow:nth-child(3) { z-index: 48; }
.hrow:nth-child(4) { z-index: 47; }
.hrow:nth-child(5) { z-index: 46; }
.hrow:nth-child(6) { z-index: 45; }
.hrow:nth-child(7) { z-index: 44; }
.hrow:nth-child(8) { z-index: 43; }
.hrow:nth-child(9) { z-index: 42; }
.hrow:nth-child(10) { z-index: 41; }
.hrow:nth-child(11) { z-index: 40; }
.hrow:nth-child(12) { z-index: 39; }
.hrow:nth-child(13) { z-index: 38; }
.hrow:nth-child(14) { z-index: 37; }
.hrow:nth-child(15) { z-index: 36; }
.hrow:nth-child(16) { z-index: 35; }
.hrow:nth-child(17) { z-index: 34; }
.hrow:nth-child(18) { z-index: 33; }
.hrow:nth-child(19) { z-index: 32; }
.hrow:nth-child(20) { z-index: 31; }
.hrow:nth-child(21) { z-index: 30; }
.hrow:nth-child(22) { z-index: 29; }
.hrow:nth-child(23) { z-index: 28; }
.hrow:nth-child(24) { z-index: 27; }
.hrow:nth-child(25) { z-index: 26; }
.hrow:nth-child(26) { z-index: 25; }
.hrow:nth-child(27) { z-index: 24; }
.hrow:nth-child(28) { z-index: 23; }
.hrow:nth-child(29) { z-index: 22; }
.hrow:nth-child(30) { z-index: 21; }
.hrow:nth-child(31) { z-index: 20; }
.hrow:nth-child(32) { z-index: 19; }
.hrow:nth-child(33) { z-index: 18; }
.hrow:nth-child(34) { z-index: 17; }
.hrow:nth-child(35) { z-index: 16; }
.hrow:nth-child(36) { z-index: 15; }
.hrow:nth-child(37) { z-index: 14; }
.hrow:nth-child(38) { z-index: 13; }
.hrow:nth-child(39) { z-index: 12; }
.hrow:nth-child(40) { z-index: 11; }
.hrow:nth-child(41) { z-index: 10; }
.hrow:nth-child(42) { z-index: 9; }
.hrow:nth-child(43) { z-index: 8; }
.hrow:nth-child(44) { z-index: 7; }
.hrow:nth-child(45) { z-index: 6; }
.hrow:nth-child(46) { z-index: 5; }
.hrow:nth-child(47) { z-index: 4; }
.hrow:nth-child(48) { z-index: 3; }
.hrow:nth-child(49) { z-index: 2; }
.hrow:nth-child(50) { z-index: 1; }
.hrow + .hrow {
  margin-top: -26px;
}
.hrow.odd {
  transform: none;
}
.ghex {
  position: relative;
  width: 140px;
  aspect-ratio: 1.1547/1;
}
.ghex .hex {
  position: absolute;
  inset: 0;
}
.ghex .cap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  padding: 4px 6px 12px;
  background: transparent;
  pointer-events: none;
}
.ghex .cap .n {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.25;
  display: block;
  white-space: normal;
  word-wrap: break-word;
  overflow: visible;
  text-overflow: clip;
  padding: 0 4px;
  text-shadow: 0 1px 2px var(--bg), 0 0 4px var(--bg);
}
.hex {
  position: relative;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: conic-gradient(from var(--shimmer, 0deg), var(--accent-deep), var(--accent), #F8DDA0, #FFF1CF, #F8DDA0, var(--accent), var(--accent-deep));
  animation: hexspin 4.5s linear infinite;
  cursor: pointer;
}
.hex .in {
  position: absolute;
  inset: 2px;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.hex .photo {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 18%, color-mix(in srgb,var(--accent) 38%,var(--surface)) 0%, var(--surface) 70%);
}
.hex .photo::after {
  content: attr(data-k);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--jp);
  font-size: 2.2rem;
  font-weight: 600;
  color: color-mix(in srgb,var(--seal) 20%,transparent);
}
.hex .cap {
  position: relative;
  width: 100%;
  padding: 4px 6px 8px;
  text-align: center;
  background: linear-gradient(to top, color-mix(in srgb,var(--bg) 92%,transparent), transparent);
}
.hex .cap .n {
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text);
  line-height: 1.2;
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  width: 100%;
}
.hex .cap .p {
  font-family: var(--disp);
  font-size: .75rem;
  color: var(--accent);
}

@keyframes hexspin {
  to { --shimmer: 360deg; }
}

/* 3D Carousel Overlay */
.ov {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
}
.ov.on {
  display: flex;
  animation: ovin .3s ease both;
}
@keyframes ovin {
  from { opacity: 0; }
  to { opacity: 1; }
}
.ov-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ov-close:hover {
  color: var(--accent);
}
.stage {
  width: 100%;
  max-width: 760px;
  height: 50vh;
  perspective: 1200px;
  position: relative;
  margin-top: -6vh;
}
.ov.on .stage {
  animation: stageZoomIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes stageZoomIn {
  from {
    transform: scale(0.25);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.ring {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.22,.61,.36,1), opacity .6s cubic-bezier(.22,.61,.36,1);
}
.ccell {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  aspect-ratio: 1.1547/1;
  margin: -78px 0 0 -90px;
  transition: opacity .5s, filter .5s;
  backface-visibility: hidden;
}
.ccell .ccell-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  transform: scale(1);
}
.ccell-wrapper .hex {
  position: absolute;
  inset: 0;
}
.ccell:not(.active) {
  opacity: .38;
  filter: saturate(.7) brightness(.9);
}
.ccell:not(.active) .ccell-wrapper {
  transform: translateY(36px);
}
.ccell.active {
  filter: drop-shadow(0 14px 30px color-mix(in srgb, var(--accent) 45%, transparent));
  z-index: 10;
}
.ccell.active .ccell-wrapper {
  transform: scale(2.05);
}
.ccell.active .cap {
  display: none;
}
.ccell:not(.active) .cap {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  background: transparent;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ccell:not(.active) .cap .n {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: normal;
  word-wrap: break-word;
  text-shadow: 0 1px 2px var(--bg), 0 0 4px var(--bg);
  text-align: center;
  width: auto;
}
.ccell:not(.active) .cap .p {
  color: var(--accent);
  font-family: var(--disp);
  font-size: 0.75rem;
  font-weight: 500;
  text-shadow: 0 1px 2px var(--bg), 0 0 4px var(--bg);
  margin-top: 2px;
}
.ccell .photo::after {
  font-size: 3.2rem;
}
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent);
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.arrow:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}
.arrow.prev { left: 4vw; }
.arrow.next { right: 4vw; }

.detail {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8vh;
  text-align: center;
  padding: 0 24px;
  animation: dfade .4s ease both;
}
@keyframes dfade {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:none; }
}
.detail .dk {
  font-family: var(--jp);
  color: var(--seal);
  font-size: .9rem;
}
.detail .dn {
  font-family: var(--disp);
  font-size: 1.8rem;
  color: var(--text);
  margin-top: 4px;
}
.detail .dp {
  font-family: var(--disp);
  font-size: 1.2rem;
  color: var(--accent);
  margin-top: 4px;
}
.detail .dd {
  font-size: .88rem;
  color: var(--text-dim);
  max-width: 44ch;
  margin: 10px auto 0;
}
.detail .dadd {
  margin-top: 20px;
  font-family: var(--body);
  font-size: .84rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 30px;
  cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.detail .dadd:hover {
  background: var(--accent-deep);
}

@media(max-width: 600px) {
  .ghex {
    width: 100px;
  }
  .hrow {
    gap: 10px;
  }
  .hrow.odd {
    transform: none;
  }
  .hrow + .hrow {
    margin-top: -21px;
  }
}

/* ── DOTTED MENU (mi style matching landing page) ── */
.item-card.mi {
  display: flex;
  align-items: baseline;
  gap: 8px;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--cream);
  cursor: pointer;
  padding: 16px 16px;
  border-bottom: 1px dotted var(--border-lt);
  border-left: none; /* remove color indicator border for clean list look */
}
.item-card.mi:hover {
  background: var(--surface-hover);
}
.item-card.mi .mi-left {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
  flex-shrink: 1;
}
.item-card.mi .mi-name {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--cream);
}
.item-card.mi .mi-note {
  font-size: .76rem;
  color: var(--cream-faint);
}
.item-card.mi .mi-dots {
  flex: 1;
  border-bottom: 1px dotted var(--border);
  transform: translateY(-4px);
  min-width: 12px;
}
.item-card.mi .mi-price-area {
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.item-card.mi .mi-price {
  font-family: var(--disp);
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.item-card.mi .mi-price .price-old {
  text-decoration: line-through;
  opacity: .5;
  font-size: .85rem;
  margin-right: 6px;
}
.item-card.mi .mi-price .price-sep {
  opacity: 0.6;
  font-size: 0.9rem;
}
.item-card.mi .mi-price .size-hint {
  font-size: 0.72rem;
  color: var(--cream-faint);
  font-weight: normal;
}
.item-card.mi .add-btn {
  margin-left: 8px;
  align-self: center;
}

/* ── CAROUSEL OPTIONS AREA ── */
.carousel-options-scroll {
  max-height: 25vh;
  overflow-y: auto;
  margin-top: 15px;
  padding: 0 10px;
  text-align: left;
  border-top: 1px solid var(--border-lt);
  border-bottom: 1px solid var(--border-lt);
  -webkit-overflow-scrolling: touch;
}
.carousel-options-scroll .opt-group {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* ── CART DROPDOWN POPUP ── */
.cart-pop {
  position: absolute;
  top: 65px;
  right: 16px;
  width: 320px;
  max-height: 400px;
  background: color-mix(in srgb, var(--surface) 95%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-lt);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 16px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.cart-pop.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cart-pop-header {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border-lt);
  padding-bottom: 8px;
}
.cart-pop-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 220px;
}
.cart-pop-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-pop-thumb {
  width: 44px;
  height: 38px;
  flex-shrink: 0;
}
.cart-pop-thumb .hex {
  width: 100%;
  height: 100%;
  animation: none;
  cursor: default;
}
.cart-pop-thumb .hex .photo::after {
  font-size: 1.15rem;
  color: var(--accent);
  opacity: 0.85;
}
.cart-pop-info {
  flex: 1;
  min-width: 0;
}
.cart-pop-name {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-pop-details {
  font-size: 0.72rem;
  color: var(--text-dim);
}
.cart-pop-subtotal {
  font-family: var(--disp);
  font-size: 0.88rem;
  color: var(--text);
  font-weight: 600;
  margin-left: auto;
}
.cart-pop-footer {
  border-top: 1px solid var(--border-lt);
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-pop-total-lbl {
  font-size: 0.82rem;
  color: var(--text-dim);
}
.cart-pop-total-val {
  font-family: var(--disp);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 700;
}
.cart-pop-action {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.82rem;
  text-align: center;
}

/* TRACKING UI */
.order-track { margin: 45px 0 30px; max-width: 400px; width: 100%; position: relative; }
.track-line { height: 4px; background: var(--border); border-radius: 2px; position: absolute; top: 18px; left: 10%; right: 10%; z-index: 1; }
.track-progress { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.6s ease; }
.track-dots { display: flex; justify-content: space-between; position: relative; z-index: 2; }
.track-dot { display: flex; flex-direction: column; align-items: center; color: var(--text-dim); font-size: 0.75rem; font-weight: 500; opacity: 0.6; transition: opacity 0.4s ease; }
.track-dot.active { opacity: 1; color: var(--text); font-weight: 700; }
.track-icon { width: 40px; height: 40px; border-radius: 20px; background: var(--surface); border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 6px; transition: all 0.4s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.track-dot.active .track-icon { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.1); box-shadow: 0 4px 12px rgba(220,135,10,0.4); text-shadow: none; }

/* Customer Bee Sticker */
.order-track .bee-sticker {
  position: absolute;
  top: -44px; /* con trực tiếp của .order-track (line ở top:18px) → -44 giữ đúng vị trí cũ */
  width: 44px; height: auto;
  transform: translateX(-50%);
  transition: left 1s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column; align-items: center;
  z-index: 5; /* > track-dots(2): sticker ĐÈ LÊN icon trạng thái */
  animation: floatycustbee 2.5s ease-in-out infinite;
}
.order-track .bee-sticker img { width: 100%; height: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.order-track .bee-code {
  background: var(--sumi, #1C1C1A);
  color: var(--gold, #C68A3E);
  font-family: monospace; font-weight: 700; font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 3px;
  margin-bottom: -4px; /* Pull image up slightly to overlap with the tag */
  border: 1px solid var(--gold, #C68A3E);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
  z-index: 4;
}
@keyframes floatycustbee { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }

/* Tracking FAB */
.tracking-fab {
  position: fixed;
  bottom: 20px;
  right: 16px;
  background: var(--gold, #C68A3E);
  color: #fff;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 18px rgba(198,138,62,0.45), 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 50;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  font-family: var(--body);
}
.tracking-fab:active {
  transform: scale(0.96);
  box-shadow: 0 2px 8px rgba(198,138,62,0.3);
}
.tracking-badge-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Adjust tracking-fab position if cart-fab is present on mobile screens */
@media (max-width: 480px) {
  .tracking-fab {
    bottom: calc(20px + env(safe-area-inset-bottom));
  }
}

/* Collapsible QR styling */
.qr-collapsible {
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  overflow: hidden;
}
.qr-collapsible.hidden {
  display: none !important;
}

/* Tracking card styling inside popup */
.tracking-order-card {
  transition: all 0.3s ease;
}

