/* =========================================================
   TOBI Tea House – Stylesheet chung
   Modern Tea House: kem nhạt · xanh rêu · nâu trà · be
   ========================================================= */
:root {
  --moss: #2F5D3A;
  --moss-dark: #1F3F27;
  --moss-deep: #16301D;
  --tea: #6E9B4F;
  --tea-soft: #DCE8CF;
  --brown: #8B5E3C;
  --brown-soft: #C9A27E;
  --beige: #E9DCC5;
  --cream: #FAF6EE;
  --cream-2: #F3ECDF;
  --white: #FFFFFF;
  --ink: #1E2A22;
  --ink-2: #4B5A50;
  --muted: #7C877F;
  --line: #E4DCCD;
  --danger: #B5462F;
  --warning: #C98A1B;

  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(31, 63, 39, .08);
  --shadow-lg: 0 24px 60px rgba(31, 63, 39, .16);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --header-h: 76px;
  --topbar-h: 38px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; color: var(--moss-deep); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
em.serif, .serif { font-family: var(--serif); font-style: italic; font-weight: 500; }
::selection { background: var(--tea); color: #fff; }
:focus-visible { outline: 3px solid var(--tea); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-alt { background: var(--cream-2); }
.section-dark { background: var(--moss-deep); color: #E8EFE3; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 680px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brown); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head.center .eyebrow::after { content: ''; width: 26px; height: 2px; background: currentColor; border-radius: 2px; }
.section-sub { color: var(--ink-2); font-size: 1.05rem; }
.section-dark .section-sub { color: #BFD0B9; }
.section-dark .eyebrow { color: var(--brown-soft); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  border: 1.5px solid transparent; transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s, border-color .3s;
  white-space: nowrap; line-height: 1.2;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { background: var(--moss); color: #fff; box-shadow: 0 8px 22px rgba(47, 93, 58, .28); }
.btn-primary:hover { background: var(--moss-dark); }
.btn-outline { border-color: var(--moss); color: var(--moss); }
.btn-outline:hover { background: var(--moss); color: #fff; }
.btn-light { background: #fff; color: var(--moss-deep); }
.btn-light:hover { background: var(--beige); }
.btn-brown { background: var(--brown); color: #fff; }
.btn-brown:hover { background: #754E31; }
.btn-ghost { color: var(--moss); padding-left: 0; padding-right: 0; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .arrow { transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: inline-grid; place-items: center; position: relative;
  transition: background .25s, color .25s;
  font-size: 1.05rem;
}
.icon-btn:hover { background: rgba(47, 93, 58, .1); }

/* ---------- Topbar (thông báo khuyến mãi) ---------- */
.topbar {
  position: relative; z-index: 60; height: var(--topbar-h);
  background: var(--moss-deep); color: #F1E9D8; font-size: .82rem; overflow: hidden;
  display: flex; align-items: center;
}
.topbar-track { display: flex; white-space: nowrap; width: max-content; animation: marquee2 60s linear infinite; }
.topbar-track > span { padding-right: 56px; }
.topbar:hover .topbar-track { animation-play-state: paused; }
.topbar b { color: #fff; }
.topbar .hl { color: #E7C49B; font-weight: 700; }
.topbar-close { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; color: #F1E9D8; background: var(--moss-deep); }
.topbar-close:hover { background: rgba(255, 255, 255, .12); }
body.no-topbar .topbar { display: none; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: rgba(250, 246, 238, .9); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: background .35s, border-color .35s;
}
.site-header.is-scrolled { border-color: var(--line); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand svg { height: 40px; width: auto; }
.main-nav { margin: 0 auto; }
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.main-nav > ul > li { position: relative; }
.main-nav a.nav-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 999px;
  font-weight: 500; font-size: .95rem; color: var(--ink); transition: color .25s, background .25s;
}
.main-nav a.nav-link:hover, .main-nav a.nav-link.active { color: var(--moss); background: rgba(47, 93, 58, .08); }
.main-nav a.nav-link.active { font-weight: 700; }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; min-width: 260px; padding: 10px;
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: all .3s var(--ease);
}
.has-dropdown:hover .nav-dropdown, .has-dropdown:focus-within .nav-dropdown { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-dropdown a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; font-size: .92rem; }
.nav-dropdown a:hover { background: var(--cream); color: var(--moss); }
.nav-dropdown img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.nav-dropdown small { display: block; color: var(--muted); font-size: .75rem; }
.header-actions { display: flex; align-items: center; gap: 2px; }
.cart-count {
  position: absolute; top: 3px; right: 1px; min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--brown); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1; transform: scale(0); transition: transform .35s var(--ease);
}
.cart-count.show { transform: scale(1); }
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }
.burger { display: none; }
.user-chip { font-size: .8rem; font-weight: 600; color: var(--moss); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { overflow-x: clip; }
/* Trang chủ: thanh thông báo nằm đè lên hero để hero luôn cao đúng 1 màn hình */
body.home .topbar { position: absolute; top: 0; left: 0; right: 0; }
/* Header trong suốt ở trang chủ */
body.home .site-header { position: fixed; left: 0; right: 0; top: var(--topbar-h); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.home.no-topbar .site-header { top: 0; }
body.home .site-header.is-scrolled { top: 0; background: rgba(250, 246, 238, .92); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 90; background: var(--moss-deep); color: #F3EEE3;
  display: flex; flex-direction: column; padding: 90px 28px 32px;
  clip-path: circle(0% at calc(100% - 40px) 40px); transition: clip-path .7s var(--ease); visibility: hidden;
}
.mobile-menu.open { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { overflow: hidden; }
.mobile-menu a.m-link {
  display: flex; align-items: baseline; gap: 14px; font-size: clamp(1.9rem, 8vw, 2.6rem); font-weight: 700; padding: 6px 0;
  transform: translateY(110%); transition: transform .6s var(--ease); color: #fff;
}
.mobile-menu a.m-link small { font-size: .8rem; font-weight: 500; color: var(--brown-soft); font-family: var(--serif); font-style: italic; }
.mobile-menu.open a.m-link { transform: none; }
.mobile-menu.open li:nth-child(2) a { transition-delay: .05s; }
.mobile-menu.open li:nth-child(3) a { transition-delay: .1s; }
.mobile-menu.open li:nth-child(4) a { transition-delay: .15s; }
.mobile-menu.open li:nth-child(5) a { transition-delay: .2s; }
.mobile-menu.open li:nth-child(6) a { transition-delay: .25s; }
.mobile-menu.open li:nth-child(7) a { transition-delay: .3s; }
.mobile-menu-foot { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; font-size: .9rem; color: #BFD0B9; }
.mobile-menu-close { position: absolute; top: 18px; right: 18px; color: #fff; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; z-index: 95; background: rgba(22, 48, 29, .55); backdrop-filter: blur(6px);
  display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-box { width: 100%; max-width: 640px; background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; transform: translateY(-14px); transition: transform .4s var(--ease); }
.search-overlay.open .search-box { transform: none; }
.search-field { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.search-field input { flex: 1; border: 0; outline: 0; font-size: 1.1rem; background: transparent; min-width: 0; }
.search-results { max-height: 52vh; overflow-y: auto; padding: 8px; }
.search-results a { display: flex; gap: 14px; align-items: center; padding: 10px 12px; border-radius: 14px; }
.search-results a:hover, .search-results a.focus { background: var(--cream); }
.search-results img { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; }
.search-results .s-name { font-weight: 600; }
.search-results .s-meta { font-size: .82rem; color: var(--muted); }
.search-empty { padding: 22px; text-align: center; color: var(--muted); }
.search-tags { padding: 14px 20px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.search-tags button { padding: 6px 14px; border-radius: 999px; background: var(--cream); font-size: .85rem; }
.search-tags button:hover { background: var(--tea-soft); }

/* ---------- Page hero (trang con) ---------- */
.page-hero {
  position: relative; padding: clamp(70px, 10vw, 120px) 0 clamp(50px, 7vw, 80px); overflow: hidden;
  background: var(--moss-deep); color: #EAF0E5; isolation: isolate;
}
.page-hero .ph-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; z-index: -2; transform: scale(1.08); animation: heroZoom 12s var(--ease) forwards; }
.page-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22, 48, 29, .95) 0%, rgba(22, 48, 29, .55) 100%); z-index: -1; }
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.page-hero p { max-width: 620px; color: #C9D8C2; margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; color: #A9BDA2; margin-bottom: 18px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-right: 8px; opacity: .6; }
.breadcrumb a:hover { color: #fff; }
@keyframes heroZoom { to { transform: scale(1); } }

/* ---------- Product card ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 26px; }
.p-card {
  background: #fff; border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.p-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.p-thumb { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--cream-2); display: block; }
.p-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.p-card:hover .p-thumb img { transform: scale(1.07); }
.p-badges { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.badge { display: inline-block; padding: 5px 11px; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; background: #fff; color: var(--moss-deep); }
.badge-sale { background: var(--danger); color: #fff; }
.badge-best { background: var(--moss); color: #fff; }
.badge-new { background: var(--brown); color: #fff; }
.p-quick {
  position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 11px; border-radius: 999px; background: rgba(255, 255, 255, .95);
  font-weight: 600; font-size: .88rem; color: var(--moss-deep); text-align: center;
  transform: translateY(140%); transition: transform .45s var(--ease);
}
.p-card:hover .p-quick { transform: none; }
.p-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.p-cat { font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--brown); margin-bottom: 6px; }
.p-name { font-size: 1.08rem; margin: 0 0 6px; color: var(--ink); }
.p-name a:hover { color: var(--moss); }
.p-desc { font-size: .88rem; color: var(--ink-2); margin: 0 0 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-meta { display: flex; gap: 12px; font-size: .78rem; color: var(--muted); margin-bottom: 12px; }
.p-meta .star { color: #E0A526; }
.p-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.p-price .now { font-weight: 800; font-size: 1.15rem; color: var(--moss); }
.p-price .old { font-size: .85rem; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.add-btn {
  width: 46px; height: 46px; border-radius: 50%; background: var(--moss); color: #fff; display: grid; place-items: center;
  font-size: 1.05rem; flex-shrink: 0; transition: transform .35s var(--ease), background .3s;
}
.add-btn:hover { background: var(--brown); transform: rotate(90deg); }

/* ---------- Chips / filter ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 30px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab {
  padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .9rem;
  transition: all .25s;
}
.tab:hover { border-color: var(--moss); color: var(--moss); }
.tab.active { background: var(--moss); border-color: var(--moss); color: #fff; }
.filter-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.input, .select, textarea.input {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; outline: 0;
  transition: border-color .25s, box-shadow .25s; font-size: .95rem;
}
.input:focus, .select:focus { border-color: var(--tea); box-shadow: 0 0 0 4px rgba(110, 155, 79, .15); }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon .input { padding-left: 42px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.empty-state .big-icon { font-size: 3rem; color: var(--beige); margin-bottom: 14px; }

/* ---------- Options (size / đường / đá / topping) ---------- */
.opt-group { margin-bottom: 20px; }
.opt-group h4 { font-size: .92rem; margin: 0 0 10px; color: var(--ink); display: flex; justify-content: space-between; align-items: baseline; }
.opt-group h4 small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: .88rem; cursor: pointer; transition: all .2s; user-select: none;
}
.chip span small { color: var(--muted); font-size: .76rem; }
.chip:hover span { border-color: var(--tea); }
.chip input:checked + span { border-color: var(--moss); background: var(--moss); color: #fff; }
.chip input:checked + span small { color: #CFE0C5; }
.chip input:focus-visible + span { outline: 3px solid var(--tea); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.size-chip span { flex-direction: column; gap: 0; min-width: 76px; padding: 8px 12px; line-height: 1.25; }
.size-chip b { font-size: 1.05rem; }
.topping-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.topping-list .chip span { width: 100%; justify-content: space-between; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; }
.qty button:hover { background: var(--cream); color: var(--moss); }
.qty input { width: 40px; text-align: center; border: 0; outline: 0; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty.sm button { width: 32px; height: 32px; }
.qty.sm input { width: 32px; font-size: .9rem; }
.opt-footer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px dashed var(--line); }
.opt-total { margin-left: auto; text-align: right; }
.opt-total small { display: block; color: var(--muted); font-size: .78rem; }
.opt-total strong { font-size: 1.5rem; color: var(--moss); font-weight: 800; }
.price-flash { animation: priceFlash .5s var(--ease); }
@keyframes priceFlash { 40% { transform: scale(1.12); color: var(--brown); } }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(22, 48, 29, .55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .35s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative; width: 100%; max-width: 920px; max-height: calc(100vh - 32px); background: var(--cream); border-radius: 28px; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.25fr; box-shadow: var(--shadow-lg);
  transform: translateY(30px) scale(.97); opacity: 0; transition: transform .45s var(--ease), opacity .35s;
}
.modal.open .modal-panel { transform: none; opacity: 1; }
.modal-media { position: relative; background: var(--cream-2); }
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-content { padding: 30px 30px 24px; overflow-y: auto; max-height: calc(100vh - 32px); overscroll-behavior: contain; }
.modal-content h3 { font-size: 1.5rem; margin-bottom: 6px; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; background: #fff; box-shadow: var(--shadow); }
.modal-simple .modal-panel { grid-template-columns: 1fr; max-width: 480px; }
body.modal-open { overflow: hidden; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; z-index: 120; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px; background: var(--moss-deep); color: #fff;
  box-shadow: var(--shadow-lg); font-size: .92rem; animation: toastIn .45s var(--ease); width: 100%;
}
.toast img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.toast .t-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tea); flex-shrink: 0; }
.toast.error .t-icon { background: var(--danger); }
.toast a { margin-left: auto; color: #E7C49B; font-weight: 700; white-space: nowrap; }
.toast.out { animation: toastOut .35s var(--ease) forwards; }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* ---------- Floating widgets ---------- */
.float-actions { position: fixed; right: 18px; bottom: 96px; z-index: 70; display: flex; flex-direction: column; gap: 10px; }
.float-btn {
  width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow-lg); position: relative;
  transition: transform .3s var(--ease); font-size: 1.15rem;
}
.float-btn:hover { transform: scale(1.08); }
.float-btn.zalo { background: #0068FF; font-weight: 800; font-size: .72rem; letter-spacing: .02em; }
.float-btn.phone { background: var(--brown); }
.float-btn.phone::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brown); animation: ring 1.8s infinite; }
.float-btn.top { background: #fff; color: var(--moss); opacity: 0; pointer-events: none; transform: translateY(10px); }
.float-btn.top.show { opacity: 1; pointer-events: auto; transform: none; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.chat-fab {
  position: fixed; right: 18px; bottom: 22px; z-index: 75; height: 58px; padding: 0 22px 0 8px; border-radius: 999px; background: var(--moss); color: #fff;
  display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 30px rgba(47, 93, 58, .4); font-weight: 600; font-size: .92rem;
  transition: transform .3s var(--ease);
}
.chat-fab:hover { transform: translateY(-3px); }
.chat-fab .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; }
.chat-fab .avatar svg { width: 30px; height: 30px; }
.chat-fab .dot { position: absolute; top: 6px; left: 42px; width: 12px; height: 12px; border-radius: 50%; background: #5BD16E; border: 2px solid var(--moss); }
.chat-panel {
  position: fixed; right: 18px; bottom: 92px; z-index: 80; width: min(370px, calc(100vw - 36px)); height: min(540px, calc(100vh - 130px));
  background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right; transform: scale(.85) translateY(20px); opacity: 0; visibility: hidden; transition: all .35s var(--ease);
}
.chat-panel.open { transform: none; opacity: 1; visibility: visible; }
.chat-head { background: var(--moss); color: #fff; padding: 16px 18px; display: flex; align-items: center; gap: 12px; }
.chat-head .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--cream); display: grid; place-items: center; flex-shrink: 0; }
.chat-head .avatar svg { width: 28px; }
.chat-head b { display: block; }
.chat-head small { color: #CFE0C5; font-size: .78rem; }
.chat-head .icon-btn { margin-left: auto; color: #fff; }
.chat-head .icon-btn:hover { background: rgba(255, 255, 255, .15); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--cream); overscroll-behavior: contain; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 18px; font-size: .9rem; line-height: 1.5; animation: toastIn .35s var(--ease); }
.msg.bot { background: #fff; border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--moss); color: #fff; border-bottom-right-radius: 6px; align-self: flex-end; }
.msg a { color: var(--moss); font-weight: 700; text-decoration: underline; }
.msg.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.msg.typing span:nth-child(2) { animation-delay: .15s; }
.msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 50% { transform: translateY(-5px); opacity: .5; } }
.chat-quick { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 14px 0; background: #fff; }
.chat-quick button { padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--line); font-size: .8rem; }
.chat-quick button:hover { border-color: var(--moss); color: var(--moss); }
.chat-form { display: flex; gap: 8px; padding: 12px 14px 14px; background: #fff; }
.chat-form input { flex: 1; min-width: 0; padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line); outline: 0; }
.chat-form input:focus { border-color: var(--tea); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--moss); color: #fff; flex-shrink: 0; }

/* ---------- Share ---------- */
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share span { font-size: .85rem; color: var(--muted); margin-right: 4px; }
.share a, .share button {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: .9rem; color: var(--ink-2);
  transition: all .25s;
}
.share a:hover, .share button:hover { background: var(--moss); color: #fff; border-color: var(--moss); }
.share .zalo-txt { font-size: .62rem; font-weight: 800; }

/* ---------- Footer ---------- */
.site-footer { background: var(--moss-deep); color: #BFD0B9; padding: 80px 0 0; position: relative; overflow: hidden; }
.footer-big {
  font-weight: 800; font-size: clamp(5rem, 22vw, 18rem); line-height: .8; color: rgba(255, 255, 255, .05); letter-spacing: -.04em;
  position: absolute; bottom: -.08em; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none; user-select: none;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; position: relative; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; letter-spacing: .02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand svg { height: 56px; width: auto; margin-bottom: 16px; }
.footer-brand p { font-size: .92rem; max-width: 300px; }
.footer-contact li { display: flex; gap: 10px; }
.footer-contact i { color: var(--brown-soft); margin-top: 5px; width: 16px; }
.socials { display: flex; gap: 10px; margin-top: 18px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .18); color: #fff; transition: all .25s; font-size: .95rem; }
.socials a:hover { background: var(--brown); border-color: var(--brown); }
.socials .zalo-txt { font-size: .62rem; font-weight: 800; }
.newsletter { display: flex; gap: 8px; margin-top: 14px; }
.newsletter input { flex: 1; min-width: 0; padding: 12px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); color: #fff; outline: 0; }
.newsletter input::placeholder { color: #8FA788; }
.footer-bottom { position: relative; margin-top: 60px; padding: 22px 0 120px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: .82rem; }
.pay-icons { display: flex; gap: 8px; align-items: center; }
.pay-icons span { padding: 4px 10px; border-radius: 6px; background: rgba(255, 255, 255, .08); font-size: .75rem; font-weight: 700; color: #E8EFE3; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
[data-reveal="left"] { transform: translateX(-50px); }
[data-reveal="right"] { transform: translateX(50px); }
[data-reveal="zoom"] { transform: scale(.92); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Forms / cards ---------- */
.card { background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); padding: clamp(20px, 3vw, 32px); }
.card h2 { font-size: 1.35rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field label .req { color: var(--danger); }
.field-error { display: none; color: var(--danger); font-size: .8rem; margin-top: 6px; }
.field.invalid .input { border-color: var(--danger); }
.field.invalid .field-error { display: block; }
.radio-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: all .25s; background: #fff; }
.radio-card:hover { border-color: var(--tea); }
.radio-card input { accent-color: var(--moss); width: 18px; height: 18px; }
.radio-card.checked { border-color: var(--moss); background: #F5F9F1; }
.radio-card .rc-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--cream); display: grid; place-items: center; color: var(--moss); font-size: 1.1rem; flex-shrink: 0; }
.radio-card b { display: block; }
.radio-card small { color: var(--muted); }
.note { padding: 12px 16px; border-radius: 14px; background: #FFF6E5; color: #7A5410; font-size: .85rem; border: 1px solid #F1DDB2; }
.note.green { background: #EFF6E9; color: var(--moss-dark); border-color: var(--tea-soft); }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* ---------- Cart / summary ---------- */
.layout-2 { display: grid; grid-template-columns: 1fr 380px; gap: 30px; align-items: start; }
.sticky-col { position: sticky; top: calc(var(--header-h) + 20px); }
.cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-item:first-child { padding-top: 0; }
.cart-item img { width: 96px; height: 96px; border-radius: 18px; object-fit: cover; }
.cart-item h3 { font-size: 1rem; margin-bottom: 4px; }
.ci-opts { font-size: .82rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.ci-opts span b { color: var(--ink); font-weight: 600; }
.ci-note { font-size: .8rem; color: var(--muted); font-style: italic; margin-top: 4px; }
.ci-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ci-price { font-weight: 800; color: var(--moss); }
.ci-remove { font-size: .8rem; color: var(--muted); }
.ci-remove:hover { color: var(--danger); }
.ci-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .95rem; }
.sum-row.total { font-size: 1.2rem; font-weight: 800; color: var(--moss-deep); border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 14px; }
.sum-row.discount { color: var(--danger); }
.coupon { display: flex; gap: 8px; margin: 14px 0 6px; }
.coupon .input { text-transform: uppercase; }
.coupon-msg { font-size: .82rem; min-height: 1.2em; }
.coupon-msg.ok { color: var(--moss); }
.coupon-msg.err { color: var(--danger); }
.coupon-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.coupon-hints button { font-size: .75rem; padding: 4px 10px; border-radius: 8px; border: 1px dashed var(--brown-soft); color: var(--brown); background: #FBF5EC; }
.mini-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.mini-item img { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.mini-item .mi-qty { position: relative; }
.mini-item .mi-qty b { position: absolute; top: -6px; right: -6px; background: var(--moss); color: #fff; font-size: .7rem; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; }
.mini-item .mi-name { font-weight: 600; }
.mini-item .mi-opt { color: var(--muted); font-size: .78rem; }
.mini-item .mi-price { margin-left: auto; font-weight: 700; white-space: nowrap; }
.qr-box { text-align: center; padding: 20px; border-radius: 20px; background: var(--cream); border: 1px dashed var(--brown-soft); }
.qr-box img { width: 230px; height: auto; margin: 0 auto 12px; border-radius: 12px; background: #fff; padding: 8px; }
.qr-info { font-size: .88rem; display: grid; gap: 4px; }
.qr-info b { color: var(--moss-deep); }

/* ---------- Order tracking ---------- */
.timeline { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin: 30px 0 10px; }
.timeline::before { content: ''; position: absolute; top: 25px; left: 10%; right: 10%; height: 4px; background: var(--line); border-radius: 4px; }
.timeline-bar { position: absolute; top: 25px; left: 10%; height: 4px; background: var(--moss); border-radius: 4px; transition: width 1s var(--ease); width: 0; }
.tl-step { position: relative; text-align: center; padding: 0 4px; }
.tl-dot {
  width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; background: #fff; border: 3px solid var(--line); display: grid; place-items: center;
  color: var(--muted); font-size: 1.1rem; position: relative; z-index: 1; transition: all .5s var(--ease);
}
.tl-step.done .tl-dot { background: var(--moss); border-color: var(--moss); color: #fff; }
.tl-step.current .tl-dot { background: var(--brown); border-color: var(--brown); color: #fff; box-shadow: 0 0 0 8px rgba(139, 94, 60, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 14px rgba(139, 94, 60, .06); } }
.tl-step b { display: block; font-size: .86rem; }
.tl-step small { color: var(--muted); font-size: .75rem; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.st-new { background: #E8F0FB; color: #1F5AA6; }
.st-confirmed { background: #F1EAFB; color: #6A3FB0; }
.st-brewing { background: #FFF1DD; color: #A3630B; }
.st-shipping { background: #E2F4F1; color: #12756A; }
.st-done { background: #E5F2DD; color: var(--moss); }
.st-cancelled { background: #FBE6E2; color: var(--danger); }
.order-card { border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; background: #fff; display: grid; gap: 6px; transition: box-shadow .3s; }
.order-card:hover { box-shadow: var(--shadow); }
.order-card .oc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.order-card .oc-code { font-weight: 800; color: var(--moss-deep); letter-spacing: .04em; }
.order-card .oc-meta { font-size: .84rem; color: var(--muted); }
.table-wrap { overflow-x: auto; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 760px; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--cream-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Product detail ---------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.pd-media { position: sticky; top: calc(var(--header-h) + 20px); border-radius: 32px; overflow: hidden; aspect-ratio: 1; background: var(--cream-2); }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-media .p-badges { top: 20px; left: 20px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin: 12px 0 18px; }
.pd-price .now { font-size: 2rem; font-weight: 800; color: var(--moss); }
.pd-price .old { color: var(--muted); text-decoration: line-through; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: .88rem; color: var(--ink-2); margin-bottom: 18px; }
.pd-meta .star { color: #E0A526; }
.pd-desc { color: var(--ink-2); font-size: 1.02rem; }
.pd-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0; }
.pd-perks div { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; font-size: .8rem; text-align: center; }
.pd-perks i { color: var(--moss); font-size: 1.2rem; display: block; margin-bottom: 6px; }

/* ---------- Account ---------- */
.auth-wrap { max-width: 480px; margin: 0 auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--cream-2); border-radius: 999px; padding: 5px; margin-bottom: 24px; }
.auth-tabs button { padding: 11px; border-radius: 999px; font-weight: 700; color: var(--ink-2); transition: all .3s; }
.auth-tabs button.active { background: #fff; color: var(--moss); box-shadow: var(--shadow); }
.acc-grid { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }
.acc-side { text-align: center; }
.acc-avatar { width: 92px; height: 92px; border-radius: 50%; background: var(--moss); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; margin: 0 auto 12px; }
.acc-menu { display: grid; gap: 4px; margin-top: 18px; text-align: left; }
.acc-menu button { padding: 12px 14px; border-radius: 12px; text-align: left; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.acc-menu button:hover { background: var(--cream); }
.acc-menu button.active { background: var(--moss); color: #fff; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; }
.contact-items { display: grid; gap: 14px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border-radius: 20px; background: #fff; border: 1px solid var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-item .ci-icon { width: 50px; height: 50px; border-radius: 14px; background: var(--moss); color: #fff; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.contact-item .ci-icon.zalo { background: #0068FF; font-size: .72rem; font-weight: 800; }
.contact-item .ci-icon.fb { background: #1877F2; }
.contact-item b { display: block; color: var(--moss-deep); }
.contact-item span { color: var(--ink-2); font-size: .92rem; }
.map-frame { width: 100%; height: 100%; min-height: 380px; border: 0; border-radius: 24px; }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.split-img { border-radius: 32px; overflow: hidden; aspect-ratio: 4 / 5; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.value { background: #fff; border-radius: 24px; padding: 28px; border: 1px solid var(--line); }
.value .v-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--tea-soft); color: var(--moss); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 18px; }
.brand-board { display: grid; grid-template-columns: 1.2fr 1fr; gap: 22px; }
.brand-board .card { display: flex; flex-direction: column; justify-content: center; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.swatch { border-radius: 16px; height: 90px; display: flex; align-items: flex-end; padding: 10px; font-size: .72rem; font-weight: 700; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(15, 26, 18, .92); display: flex; align-items: center; justify-content: center; padding: 30px; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-height: 84vh; max-width: 100%; border-radius: 18px; }
.lightbox p { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: #E8EFE3; font-size: .9rem; margin: 0; }
.lightbox .icon-btn { position: absolute; color: #fff; background: rgba(255, 255, 255, .1); }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; }
.lb-next { right: 18px; top: 50%; }

/* =========================================================
   TRANG CHỦ
   ========================================================= */
/* Intro loader */
.intro {
  position: fixed; inset: 0; z-index: 200; background: var(--cream); display: grid; place-items: center;
}
.intro-inner { text-align: center; }
.intro-logo { width: min(320px, 64vw); margin: 0 auto; overflow: visible; }
.intro-logo .draw { fill: transparent; stroke: var(--moss); stroke-width: 1.4; }
.intro-logo .leaf, .intro-logo .pearl, .intro-logo .tag { opacity: 0; }
.intro-tag { margin-top: 18px; font-family: var(--serif); font-style: italic; color: var(--brown); font-size: 1.15rem; opacity: 0; }
.intro-count { position: absolute; left: 28px; bottom: 22px; font-size: clamp(3rem, 9vw, 6rem); font-weight: 800; color: var(--moss); line-height: 1; letter-spacing: -.04em; }
.intro-bar { position: absolute; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--moss); transform-origin: left; transform: scaleX(0); }
.intro-skip { position: absolute; right: 26px; bottom: 26px; font-size: .85rem; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.intro-skip:hover { color: var(--moss); }
.intro-panel { position: fixed; inset: 0; z-index: 199; background: var(--moss); transform: translateY(100%); pointer-events: none; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--cream); }
.hero-bg { position: absolute; inset: 0; background: url('../img/gallery/khong-gian-1.jpg') center/cover no-repeat; transform: scale(1.1); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250, 246, 238, .86) 0%, rgba(250, 246, 238, .78) 60%, rgba(250, 246, 238, .92) 100%); }
.hero-word {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-46%);
  display: flex; justify-content: center; align-items: flex-start; gap: 2.2vw; padding: 0 2vw; margin: 0;
  --lh: min(56vh, 36vw);
}
.hw-break { display: none; }
.hero-word .letter { height: var(--lh); width: auto; overflow: visible; }
.hero-word .letter path, .hero-word .letter rect { fill: var(--moss); }
.hero-word .letter .pearl { fill: var(--brown); }
.letter-mask { overflow: hidden; display: block; padding-top: 2px; }
.o-slot { position: relative; height: var(--lh); aspect-ratio: 73 / 80; }
.o-ring { position: absolute; width: 100%; aspect-ratio: 1; left: 0; top: calc(var(--lh) * 7.5 / 80); overflow: visible; }
.o-ring .ring { fill: none; stroke: var(--moss); }
.o-ring .ring-text { fill: #F3EEE3; font-family: var(--font); font-weight: 500; letter-spacing: .08em; }
.o-ring .spin { transform-origin: 50% 50%; animation: spin 26s linear infinite; }
.o-ring .ring-label { fill: #fff; font-family: var(--serif); font-style: italic; font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-reveal {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  clip-path: circle(0px at 50% 50%);
}
.hero-reveal-img { position: absolute; inset: 0; background: url('../img/gallery/ban-cafe-nang.jpg') center 40%/cover no-repeat; }
.hero-o-img { position: absolute; border-radius: 50%; background: url('../img/products/tra-sua-tobi.jpg') center/cover no-repeat; }
body.home .float-actions, body.home .chat-fab { transition: opacity .4s, visibility .4s, transform .4s var(--ease); }
body.home:not(.past-hero) .float-actions, body.home:not(.past-hero) .chat-fab { opacity: 0; visibility: hidden; transform: translateY(20px); }
.hero-reveal-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22, 48, 29, .1) 30%, rgba(22, 48, 29, .7) 100%); opacity: 0; }
.hero-reveal-text { position: absolute; left: 0; right: 0; bottom: 12vh; text-align: center; color: #fff; padding: 0 20px; opacity: 0; }
.hero-reveal-text h2 { color: #fff; font-size: clamp(2.6rem, 8vw, 6.5rem); line-height: 1; letter-spacing: -.03em; margin-bottom: 26px; }
.hero-reveal-text h2 em { font-family: var(--serif); font-weight: 500; color: #F0D9B5; }
.hero-reveal-text .eyebrow { color: #F0D9B5; }
.hero-reveal.is-open { pointer-events: auto; }
.hero-index { position: absolute; left: 28px; top: calc(var(--topbar-h) + var(--header-h) + 8px); z-index: 2; font-size: .9rem; letter-spacing: .08em; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.hero-index i { font-family: var(--serif); }
.hero-index .play { width: 18px; height: 18px; border-radius: 50%; background: var(--moss); display: grid; place-items: center; }
.hero-index .play::after { content: ''; border-left: 6px solid #fff; border-top: 4px solid transparent; border-bottom: 4px solid transparent; margin-left: 2px; }
.hero-desc { position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%); width: min(720px, calc(100% - 40px)); z-index: 2; font-family: var(--serif); font-style: italic; font-size: clamp(.92rem, 1.25vw, 1.05rem); color: var(--ink-2); text-align: center; margin: 0; }
.hero-scroll { position: absolute; left: 28px; bottom: 4vh; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: .78rem; color: var(--ink-2); letter-spacing: .1em; }
.hero-scroll .line { width: 1.5px; height: 56px; background: rgba(47, 93, 58, .2); position: relative; overflow: hidden; }
.hero-scroll .line::after { content: ''; position: absolute; left: 0; top: -40%; width: 100%; height: 40%; background: var(--moss); animation: scrollLine 1.8s var(--ease) infinite; }
@keyframes scrollLine { to { top: 100%; } }
.order-badge {
  position: fixed; right: 26px; bottom: 26px; z-index: 72; width: 112px; height: 112px; border-radius: 50%; background: var(--moss); color: #fff;
  display: grid; place-items: center; box-shadow: 0 16px 40px rgba(31, 63, 39, .35); transition: transform .4s var(--ease);
}
.order-badge:hover { transform: scale(1.06) rotate(-6deg); }
.order-badge svg.txt { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.order-badge svg.txt text { fill: #F3EEE3; font-size: 10.5px; font-weight: 600; letter-spacing: 2.5px; }
.order-badge .cup { width: 42px; height: 42px; }
.order-badge { transition: transform .4s var(--ease), opacity .4s, visibility .4s; }
body.home.past-hero .order-badge { opacity: 0; visibility: hidden; transform: scale(.6); }

/* Statement */
.statement { padding: clamp(90px, 14vw, 180px) 0 clamp(60px, 8vw, 100px); }
.statement-text { font-size: clamp(1.6rem, 3.6vw, 3.1rem); line-height: 1.28; font-weight: 600; color: var(--moss-deep); letter-spacing: -.02em; max-width: 1100px; margin: 0; }
.statement-text .w { opacity: .14; transition: opacity .2s; }
.statement-text em { font-family: var(--serif); font-weight: 500; color: var(--brown); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 70px; border-top: 1px solid var(--line); padding-top: 34px; }
.stat b { display: block; font-size: clamp(2rem, 4.4vw, 3.4rem); font-weight: 800; color: var(--moss); line-height: 1; letter-spacing: -.03em; }
.stat span { color: var(--ink-2); font-size: .92rem; }

/* Marquee */
.marquee { overflow: hidden; background: var(--moss); color: var(--cream); padding: 22px 0; transform: rotate(-2deg) scale(1.04); margin: 30px 0; }
.marquee.alt { background: var(--beige); color: var(--moss-deep); transform: rotate(1.5deg) scale(1.04); }
.marquee-track { display: flex; width: max-content; animation: marquee2 30s linear infinite; }
.marquee-track span { font-size: clamp(1.6rem, 3.4vw, 2.8rem); font-weight: 800; letter-spacing: -.01em; padding: 0 22px; display: flex; align-items: center; gap: 44px; white-space: nowrap; }
.marquee-track span::after { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--brown-soft); }
.marquee-track em { font-family: var(--serif); font-weight: 500; }
@keyframes marquee2 { to { transform: translateX(-50%); } }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.cat-card { position: relative; display: block; text-align: center; }
.cat-img { aspect-ratio: 3 / 4; border-radius: 200px 200px 28px 28px; overflow: hidden; position: relative; background: var(--cream-2); }
.cat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.cat-card:hover .cat-img img { transform: scale(1.08); }
.cat-img::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(22, 48, 29, .55)); }
.cat-count { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 1; color: #fff; font-size: .8rem; font-weight: 600; background: rgba(255, 255, 255, .18); backdrop-filter: blur(6px); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.cat-card h3 { margin: 16px 0 2px; font-size: 1.08rem; }
.cat-card p { font-size: .84rem; color: var(--muted); margin: 0; }

/* Flash sale */
.flash { background: var(--moss-deep); color: #E8EFE3; border-radius: 36px; padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden; }
.flash::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 80px solid rgba(255, 255, 255, .04); right: -160px; top: -200px; }
.flash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 34px; position: relative; }
.flash-head h2 { color: #fff; margin: 0; display: flex; align-items: center; gap: 14px; }
.flash-head h2 .bolt { width: 52px; height: 52px; border-radius: 16px; background: var(--brown); display: grid; place-items: center; font-size: 1.4rem; animation: wiggle 2.4s infinite; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 90% { transform: rotate(12deg); } 95% { transform: rotate(-6deg); } }
.countdown { display: flex; gap: 10px; align-items: center; }
.countdown div { background: #fff; color: var(--moss-deep); border-radius: 16px; min-width: 70px; padding: 10px 8px; text-align: center; }
.countdown b { display: block; font-size: 1.7rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.countdown .sep { font-size: 1.6rem; font-weight: 800; color: var(--brown-soft); background: none; min-width: 0; padding: 0; }
.flash .p-grid { position: relative; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.flash .p-card { border: 0; }
.sold-bar { height: 8px; border-radius: 8px; background: var(--cream-2); overflow: hidden; margin-bottom: 6px; }
.sold-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brown-soft), var(--danger)); border-radius: 8px; }
.sold-text { font-size: .75rem; color: var(--muted); margin-bottom: 12px; }

/* Featured horizontal */
.featured { overflow: hidden; }
.featured-pin { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 86px 0 36px; }
.featured .section-head { margin-bottom: 22px !important; }
.featured .p-desc { -webkit-line-clamp: 1; }
.featured-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.h-track { display: flex; gap: 26px; padding: 10px 20px 20px max(20px, calc((100vw - 1200px) / 2)); width: max-content; will-change: transform; }
.h-track .p-card { width: clamp(240px, min(22vw, 40vh), 310px); flex-shrink: 0; }
.h-track .h-end { width: clamp(240px, min(22vw, 40vh), 310px); flex-shrink: 0; border-radius: var(--radius-lg); background: var(--moss); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 34px; gap: 14px; }
.h-track .h-end h3 { color: #fff; font-size: 1.8rem; }
.h-progress { height: 3px; background: var(--line); border-radius: 3px; margin: 30px 20px 0; max-width: 1200px; overflow: hidden; }
.h-progress i { display: block; height: 100%; width: 100%; background: var(--moss); transform-origin: left; transform: scaleX(0); }

/* Promo */
.promo { position: relative; border-radius: 36px; overflow: hidden; min-height: 460px; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--beige); }
.promo-text { padding: clamp(30px, 5vw, 64px); display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 1; }
.promo-text h2 { font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: 1; }
.promo-text h2 em { font-family: var(--serif); font-weight: 500; color: var(--brown); }
.promo-date { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px; background: var(--moss); color: #fff; font-weight: 700; font-size: .85rem; align-self: flex-start; margin-bottom: 18px; }
.promo-code { display: inline-flex; align-items: center; gap: 12px; margin: 6px 0 24px; padding: 10px 10px 10px 18px; border: 2px dashed var(--brown); border-radius: 16px; background: rgba(255, 255, 255, .6); align-self: flex-start; font-weight: 800; letter-spacing: .1em; color: var(--brown); }
.promo-img { position: relative; }
.promo-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo-sticker { position: absolute; top: 24px; left: -40px; z-index: 2; width: 130px; height: 130px; border-radius: 50%; background: var(--brown); color: #fff; display: grid; place-items: center; text-align: center; font-weight: 800; line-height: 1.1; transform: rotate(-12deg); box-shadow: var(--shadow-lg); animation: float 4s ease-in-out infinite; }
.promo-sticker small { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .1em; }
.promo-sticker b { font-size: 1.9rem; }
@keyframes float { 50% { transform: rotate(-6deg) translateY(-10px); } }
.promo .countdown div { background: rgba(255, 255, 255, .75); }

/* Commitments */
.commit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.commit { padding: 30px 26px; border-radius: 28px; background: #fff; border: 1px solid var(--line); position: relative; overflow: hidden; transition: transform .45s var(--ease), background .45s, color .45s; }
.commit:hover { transform: translateY(-6px); background: var(--moss); color: #E8EFE3; }
.commit:hover h3 { color: #fff; }
.commit:hover .c-icon { background: rgba(255, 255, 255, .14); color: #fff; }
.commit .c-num { position: absolute; right: 20px; top: 14px; font-size: 3.4rem; font-weight: 800; color: rgba(47, 93, 58, .07); line-height: 1; }
.commit:hover .c-num { color: rgba(255, 255, 255, .08); }
.c-icon { width: 60px; height: 60px; border-radius: 18px; background: var(--tea-soft); color: var(--moss); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: 20px; transition: all .45s; }
.commit p { font-size: .92rem; margin: 0; }

/* Process */
.process { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.process-line { position: absolute; top: 46px; left: 12.5%; right: 12.5%; height: 3px; background: rgba(255, 255, 255, .12); border-radius: 3px; }
.process-line i { display: block; height: 100%; background: var(--brown-soft); border-radius: 3px; transform-origin: left; transform: scaleX(0); }
.step { text-align: center; position: relative; }
.step-icon { width: 92px; height: 92px; margin: 0 auto 22px; border-radius: 50%; background: var(--moss); border: 6px solid var(--moss-deep); display: grid; place-items: center; font-size: 1.8rem; color: #fff; position: relative; z-index: 1; transition: transform .4s var(--ease), background .4s; }
.step:hover .step-icon { transform: scale(1.08); background: var(--brown); }
.step-icon b { position: absolute; top: -4px; right: -4px; width: 30px; height: 30px; border-radius: 50%; background: var(--brown-soft); color: var(--moss-deep); font-size: .82rem; display: grid; place-items: center; }
.step h3 { font-size: 1.15rem; }
.step p { font-size: .9rem; color: #B5C8AE; max-width: 240px; margin: 0 auto; }

/* Reviews */
.reviews-track { display: flex; gap: 22px; width: max-content; animation: marquee2 50s linear infinite; padding: 10px 0; }
.reviews-wrap { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.reviews-wrap:hover .reviews-track { animation-play-state: paused; }
.review { width: 360px; flex-shrink: 0; background: #fff; border-radius: 26px; padding: 26px; border: 1px solid var(--line); }
.review .stars { color: #E0A526; margin-bottom: 12px; letter-spacing: 2px; }
.review p { font-size: .95rem; color: var(--ink-2); }
.review-who { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.review-who .av { width: 46px; height: 46px; border-radius: 50%; background: var(--tea-soft); color: var(--moss); display: grid; place-items: center; font-weight: 800; }
.review-who b { display: block; font-size: .95rem; }
.review-who small { color: var(--muted); }
.rating-sum { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rating-sum b { font-size: 3.4rem; font-weight: 800; color: var(--moss); line-height: 1; }

/* Gallery */
.gallery { columns: 4 240px; column-gap: 16px; }
.gallery figure { margin: 0 0 16px; break-inside: avoid; border-radius: 22px; overflow: hidden; position: relative; cursor: zoom-in; }
.gallery img { width: 100%; height: auto; transition: transform 1s var(--ease); }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .9); font-size: .8rem; font-weight: 600; transform: translateY(150%); transition: transform .45s var(--ease); }
.gallery figure:hover figcaption { transform: none; }

/* CTA contact */
.cta { text-align: center; }
.cta h2 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1; letter-spacing: -.03em; }
.cta h2 em { font-family: var(--serif); font-weight: 500; color: var(--brown); }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
  .main-nav { display: none; }
  .burger { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .commit-grid { grid-template-columns: repeat(2, 1fr); }
  .layout-2 { grid-template-columns: 1fr; }
  .sticky-col { position: static; }
  .values { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  :root { --header-h: 66px; }
  .modal-panel { grid-template-columns: 1fr; overflow-y: auto; }
  .modal-media { aspect-ratio: 16 / 9; }
  .modal-content { max-height: none; overflow: visible; }
  .pd, .split, .contact-grid, .acc-grid, .brand-board { grid-template-columns: 1fr; }
  .pd-media { position: relative; top: 0; }
  .promo { grid-template-columns: 1fr; }
  .promo-img { min-height: 280px; }
  .promo-sticker { left: auto; right: 20px; top: -30px; }
  .process { grid-template-columns: 1fr 1fr; row-gap: 40px; }
  .process-line { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .featured-pin { min-height: 0; padding: 70px 0 40px; }
  .h-wrap { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .h-wrap::-webkit-scrollbar { display: none; }
  .h-track { padding-left: 20px; }
  .h-track > * { scroll-snap-align: start; }
  .h-progress { display: none; }
  .timeline { grid-template-columns: 1fr; gap: 14px; }
  .timeline::before { left: 26px; top: 10px; bottom: 10px; width: 4px; height: auto; right: auto; }
  .timeline-bar { left: 26px; top: 10px; width: 4px !important; height: 0; transition: height 1s var(--ease); }
  .tl-step { display: flex; align-items: center; gap: 16px; text-align: left; }
  .tl-dot { margin: 0; flex-shrink: 0; }
  .hero-index { display: none; }
  .order-badge { width: 92px; height: 92px; right: 16px; bottom: 16px; }
  .order-badge svg.txt text { font-size: 10px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .container { padding: 0 16px; }
  .brand svg { height: 34px; }
  .header-inner { gap: 10px; }
  .icon-btn { width: 40px; height: 40px; }
  .user-chip { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cat-grid .cat-card:last-child { grid-column: 1 / -1; }
  .cat-grid .cat-card:last-child .cat-img { aspect-ratio: 16 / 9; border-radius: 28px; }
  .commit-grid { grid-template-columns: 1fr; }
  .p-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .p-body { padding: 12px 12px 14px; }
  .p-name { font-size: .95rem; }
  .p-desc, .p-meta { display: none; }
  .p-price .now { font-size: 1rem; }
  .p-price .old { display: block; margin: 0; font-size: .75rem; }
  .add-btn { width: 38px; height: 38px; font-size: .9rem; }
  .p-quick { display: none; }
  .badge { font-size: .64rem; padding: 4px 8px; }
  .p-badges { top: 8px; left: 8px; }
  .flash .p-grid { grid-template-columns: 1fr 1fr; }
  .countdown div { min-width: 56px; padding: 8px 4px; }
  .countdown b { font-size: 1.3rem; }
  .form-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item img { width: 72px; height: 72px; border-radius: 14px; }
  .ci-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .pd-perks { grid-template-columns: 1fr 1fr 1fr; }
  .values { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(3, 1fr); }
  .review { width: 290px; }
  .process { grid-template-columns: 1fr; }
  .hero-word { gap: 3vw; --lh: min(54vw, 30vh); flex-wrap: wrap; row-gap: 4vw; top: 45%; transform: translateY(-50%); }
  .hw-break { display: block; flex-basis: 100%; height: 0; }
  .hero-desc { bottom: 13vh; font-size: .88rem; }
  .hero-scroll { display: none; }
  .chat-fab .label { display: none; }
  .chat-fab { padding: 0; justify-content: center; }
  .chat-fab .dot { left: 36px; top: 4px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 4px; width: calc(100% + 32px); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; }
  .filter-tools { width: 100%; flex-wrap: nowrap; }
  .filter-tools .input-icon { flex: 1; min-width: 0 !important; }
  .filter-tools .select { max-width: 46%; }
  .float-actions { right: 12px; bottom: 80px; gap: 8px; }
  .float-btn { width: 42px; height: 42px; font-size: .95rem; }
  .chat-fab { right: 12px; bottom: 18px; height: 52px; width: 52px; }
  .chat-fab .avatar { width: 42px; height: 42px; }
  .chat-panel { right: 12px; bottom: 80px; }
  .modal { padding: 0; align-items: flex-end; }
  .modal-panel { border-radius: 26px 26px 0 0; max-height: 92vh; }
  .modal-content { padding: 22px 18px 18px; }
  .modal .opt-footer { position: sticky; bottom: 0; z-index: 2; background: var(--cream); margin: 0 -18px -18px; padding: 12px 18px 16px; box-shadow: 0 -10px 24px rgba(31, 63, 39, .08); }
  .topbar { font-size: .76rem; }
}
/* Website trình diễn hiệu ứng nên vẫn giữ chuyển động; chỉ tắt cuộn mượt của CSS */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
