/* =========================================================
   79FOOD – Đặc sản Nha Trang | style.css
   ========================================================= */
/* Bộ màu nhận diện 79Food: cam chính #F56622 · xanh biển #54AEE6 · cam đất #EB723F
   Các sắc đậm/nhạt (-700, -900, -50) được pha từ chính 3 màu này để chữ luôn đủ tương phản. */
:root {
  --sea: #54aee6;        /* XANH BIỂN thương hiệu – nền thanh menu, nút, hero */
  --sea-700: #2a85c2;    /* xanh đậm hơn cho chữ/link trên nền trắng */
  --sea-900: #17507a;    /* xanh sâu cho topbar, footer */
  --sea-50: #eaf6fd;
  --sky: #54aee6;
  --sun: #f56622;        /* CAM CHÍNH thương hiệu – nút mua, CTA */
  --sun-600: #d9500f;
  --sun-50: #fff0e8;
  --coral: #eb723f;      /* CAM ĐẤT thương hiệu – giảm giá, hotline, badge */
  --leaf: #eb723f;       /* dải slogan "Hàng Việt chính hãng" */
  --leaf-700: #c4541f;
  --sand: #fffaf1;
  --paper: #ffffff;
  --ink: #1b2b38;
  --muted: #5f6f7c;
  --line: #f0e4cf;
  --ok: #2e9e4a;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(11, 61, 99, .06), 0 6px 20px rgba(11, 61, 99, .07);
  --shadow-lg: 0 18px 50px rgba(11, 61, 99, .18);
  --font: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink); background: var(--sand); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 15px; transition: background .15s, color .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sun); color: #fff; }
.btn-primary:hover { background: var(--sun-600); }
.btn-sea { background: var(--sea); color: #fff; }
.btn-sea:hover { background: var(--sea-700); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--sea); color: var(--sea); }
.btn-light { background: #fff; color: var(--sea-900); }
.btn-block { width: 100%; }
.btn-lg { height: 52px; font-size: 16px; padding: 0 28px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link { color: var(--sea-700); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { color: var(--sun-600); }

/* ---------- Demo bar (chỉ hiện khi SHOP.demo = true) ---------- */
.demo-bar { background: var(--sun); color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }

/* ---------- Topbar & header ---------- */
.topbar { background: var(--sea-900); color: #d6ebf8; font-size: 13px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; height: 36px; }
.topbar a { color: #fff; font-weight: 600; }
.topbar .tb-right { display: flex; gap: 18px; }
.header { background: #fff; position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 0 var(--line); }
.header-main { display: flex; align-items: center; gap: 24px; height: 76px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo img { height: 54px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-family: var(--serif); font-size: 22px; color: var(--sea-900); }
.logo-text small { font-size: 12px; color: var(--muted); }
.search { flex: 1; display: flex; max-width: 520px; height: 46px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--sand); overflow: hidden; transition: border-color .15s; }
.search:focus-within { border-color: var(--sea); background: #fff; }
.search input { flex: 1; border: 0; background: transparent; padding: 0 18px; outline: none; min-width: 0; }
.search button { border: 0; background: var(--sea); color: #fff; width: 54px; display: grid; place-items: center; }
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.hotline { display: flex; align-items: center; gap: 10px; }
.hotline .ic { width: 42px; height: 42px; border-radius: 50%; background: var(--sun-50); color: var(--sun-600); display: grid; place-items: center; }
.hotline small { display: block; font-size: 12px; color: var(--muted); }
.hotline b { color: var(--coral); font-size: 17px; }
.cart-btn { position: relative; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 999px; background: var(--sun); color: #fff; border: 0; font-weight: 600; }
.cart-btn:hover { background: var(--sun-600); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--sea-700); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.cart-count[data-n="0"] { display: none; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: var(--sand); border-radius: 12px; place-items: center; }

.nav { background: var(--sea); color: #fff; }
.nav .wrap { display: flex; align-items: stretch; height: 50px; }
.nav-cats { position: relative; width: 260px; flex: none; }
.nav-cats > button { width: 100%; height: 100%; display: flex; align-items: center; gap: 10px; padding: 0 18px; background: var(--sea); color: #fff; border: 0; font-weight: 600; text-align: left; }
.nav-cats .dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #fff; color: var(--ink); box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius); display: none; z-index: 40; padding: 6px 0; }
.nav-cats:hover .dropdown, .nav-cats:focus-within .dropdown { display: block; }
.home .nav-cats .dropdown.pinned { display: none; }
.cat-link { display: flex; align-items: center; gap: 12px; padding: 11px 18px; font-weight: 500; transition: background .12s, color .12s; }
.cat-link:hover { background: var(--sun-50); color: var(--sun-600); }
.cat-link .cat-ic { width: 32px; height: 32px; border-radius: 10px; background: var(--sea-50); color: var(--sea-700); display: grid; place-items: center; flex: none; }
.cat-link .cat-ic .icon { width: 18px; height: 18px; }
.nav-links { display: flex; align-items: stretch; margin-left: 8px; }
.nav-links a { display: flex; align-items: center; padding: 0 14px; white-space: nowrap; font-weight: 600; color: #fff; text-shadow: 0 1px 1px rgba(23,80,122,.35); transition: color .12s, background .12s; }
.nav-links a:hover { color: #fff; background: rgba(23,80,122,.18); }
.nav-links a.active { color: #fff; box-shadow: inset 0 -3px 0 var(--sun); }

/* Mobile drawer nav */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(6, 40, 59, .45); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; width: min(400px, 92vw); background: #fff; z-index: 100; display: flex; flex-direction: column; transition: transform .25s ease; }
.drawer.left { left: 0; transform: translateX(-100%); }
.drawer.right { right: 0; transform: translateX(100%); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 18px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--sand); display: grid; place-items: center; }
.icon-btn:hover { background: var(--line); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 0; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 18px; display: grid; gap: 10px; }
.m-nav a { display: block; padding: 13px 20px; font-weight: 500; border-bottom: 1px solid var(--sand); }
.m-nav .m-title { padding: 16px 20px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }

/* Mini cart */
.mc-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 18px; align-items: center; }
.mc-item img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--sand); }
.mc-item .t { font-weight: 600; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-item .v { font-size: 13px; color: var(--muted); }
.mc-item .p { font-weight: 700; color: var(--coral); font-size: 14px; }
.mc-remove { border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; }
.mc-remove:hover { color: var(--coral); background: var(--sun-50); }
.mc-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; }
.mc-total b { color: var(--coral); }
.freeship-bar { font-size: 13px; color: var(--muted); }
.freeship-bar .bar { height: 6px; border-radius: 6px; background: var(--sea-50); margin-top: 6px; overflow: hidden; }
.freeship-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sun), var(--coral)); border-radius: 6px; transition: width .3s; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { width: 56px; height: 56px; stroke-width: 1.2; color: var(--line); margin: 0 auto 12px; }

/* ---------- Hero ---------- */
.hero { padding: 20px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 260px 1fr; gap: 20px; }
.hero-cats { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 0; align-self: start; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--sea-900); aspect-ratio: 2.1 / 1; min-height: 340px; box-shadow: var(--shadow); }
.slides { display: flex; height: 100%; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.slide { flex: 0 0 100%; height: 100%; position: relative; }
.slide > img { width: 100%; height: 100%; object-fit: cover; }
.slide-hero { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; background: radial-gradient(120% 140% at 85% 20%, var(--sea) 0%, var(--sea-700) 50%, var(--sea-900) 100%); color: #fff; padding: 0 0 0 48px; overflow: hidden; }
.slide-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #ffe1cf; }
.slide-hero h1 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 44px); margin: 10px 0 12px; font-weight: 700; }
.slide-hero h1 em { color: var(--sun); font-style: italic; }
.slide-hero p { color: #d6ebf8; max-width: 420px; margin: 0 0 22px; }
.slide-hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: relative; height: 100%; }
.hero-art img { position: absolute; border-radius: 18px; object-fit: cover; box-shadow: 0 20px 40px rgba(0,0,0,.35); border: 4px solid rgba(255,255,255,.9); }
.hero-art .a1 { width: 58%; aspect-ratio: 1; top: 12%; left: 8%; transform: rotate(-5deg); }
.hero-art .a2 { width: 44%; aspect-ratio: 1; top: 44%; right: 6%; transform: rotate(6deg); }
.hero-art .a3 { width: 34%; aspect-ratio: 1; top: 6%; right: 4%; transform: rotate(4deg); }
.waves { position: absolute; left: 0; right: 0; bottom: -2px; height: 46px; opacity: .25; }
.slider-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.slider-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: rgba(255,255,255,.5); padding: 0; transition: width .2s, background .2s; }
.slider-dots button.on { width: 28px; background: var(--sun); }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: var(--sea-900); display: grid; place-items: center; z-index: 2; opacity: 0; transition: opacity .2s; }
.slider:hover .slider-arrow { opacity: 1; }
.slider-arrow.prev { left: 14px; } .slider-arrow.next { right: 14px; }

/* ---------- Commit strip ---------- */
.commits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 20px 0 8px; }
.commit { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.commit .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--sun-50); color: var(--sun-600); display: grid; place-items: center; flex: none; }
.commit b { display: block; font-size: 14px; }
.commit small { color: var(--muted); font-size: 13px; display: block; }
@media (min-width: 1200px) { .commit small { white-space: nowrap; font-size: 12.5px; } }

/* ---------- Sections ---------- */
.section { padding: 34px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); color: var(--sea-900); margin: 0; position: relative; }
.sec-head .kicker { display: block; font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--sun-600); margin-bottom: 4px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab { height: 38px; padding: 0 16px; white-space: nowrap; flex: none; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: var(--muted); }
.tab:hover { border-color: var(--sea); color: var(--sea); }
.tab.on { background: var(--sun); border-color: var(--sun); color: #fff; }

/* Category tiles */
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cat-tile { background: #fff; border-radius: var(--radius); padding: 14px 10px 16px; text-align: center; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cat-tile img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 10px; border: 3px solid var(--sun-50); }
.cat-tile b { font-size: 14px; display: block; line-height: 1.3; }

/* ---------- Product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 1; background: var(--sand); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s, opacity .3s; }
.card-img .alt { position: absolute; inset: 0; opacity: 0; }
.card:hover .card-img .alt { opacity: 1; }
.badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 1; }
.badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; color: #fff; background: var(--sea-700); letter-spacing: .02em; width: max-content; }
.badge.sale { background: var(--coral); }
.badge.best { background: var(--sun); }
.badge.new { background: var(--leaf); }
.badge.gift { background: var(--leaf-700); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-cat { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-title { font-weight: 600; font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-title:hover { color: var(--sea); }
.price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.price b { color: var(--coral); font-size: 17px; font-weight: 700; }
.price s { color: var(--muted); font-size: 13px; }
.card-variants { font-size: 12px; color: var(--muted); }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.card-foot .card-variants { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot-info { display: grid; gap: 4px; min-width: 0; }
.card-add { flex: none; width: 40px; height: 40px; border-radius: 10px; border: 0; background: #eb723f; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .1s; }
.card-add:hover { background: var(--sun-600); color: #fff; }
.card-add:active { transform: scale(.94); }
.card-add .icon { width: 20px; height: 20px; }

/* ---------- Promo band ---------- */
.promo { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.promo-card { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; }
.promo-card img { width: 100%; height: 100%; object-fit: cover; }
.promo-gift { background: linear-gradient(135deg, var(--sun), var(--coral)); color: #fff; padding: 32px; display: flex; flex-direction: column; justify-content: center; border-radius: var(--radius); position: relative; overflow: hidden; }
.promo-gift h3 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 10px; }
.promo-gift p { color: #ffe6d8; margin: 0 0 20px; max-width: 380px; }
.promo-gift .coupon { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,.14); border: 1.5px dashed rgba(255,255,255,.6); border-radius: 12px; padding: 10px 14px; margin-bottom: 20px; width: max-content; max-width: 100%; }
.promo-gift .coupon code { font-family: var(--font); font-weight: 800; font-size: 18px; letter-spacing: .08em; }
.promo-gift .coupon button { border: 0; background: #fff; color: var(--coral); border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; }

/* ---------- Story ---------- */
.story { background: var(--sea-900); color: #d6e7ef; border-radius: 22px; padding: 44px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; overflow: hidden; position: relative; }
.story h2 { font-family: var(--serif); color: #fff; font-size: clamp(24px, 2.6vw, 34px); }
.story h2 em { color: var(--sun); }
.story ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.story li { display: flex; gap: 12px; }
.story li .icon { color: var(--sun); margin-top: 3px; }
.story li b { color: #fff; }
.story-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.story-imgs img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; }
.story-imgs img:first-child { grid-row: span 2; aspect-ratio: auto; height: 100%; }

/* ---------- Blog cards ---------- */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-cover { aspect-ratio: 16 / 10; position: relative; overflow: hidden; background: var(--sea); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover .tag { position: absolute; top: 12px; left: 12px; background: #fff; color: var(--sea-900); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.post-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-body h3 { font-family: var(--serif); font-size: 19px; margin: 0; color: var(--sea-900); }
.post-body p { margin: 0; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { font-size: 13px; color: var(--muted); display: flex; gap: 14px; }
.theme-cover { width: 100%; height: 100%; display: grid; place-items: center; color: #fff; text-align: center; padding: 20px; }
.theme-cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.theme-cover span { position: relative; font-family: var(--serif); font-size: 22px; font-weight: 700; text-shadow: 0 2px 12px rgba(0,0,0,.25); max-width: 80%; }

/* ---------- Page header / breadcrumb ---------- */
.page-head { padding-top: 22px; padding-bottom: 6px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a:hover { color: var(--sea); }
.crumbs span.sep { opacity: .5; }
.page-title { font-family: var(--serif); color: var(--sea-900); font-size: clamp(24px, 3vw, 34px); margin: 8px 0 0; }

/* ---------- Shop page ---------- */
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding-top: 18px; padding-bottom: 50px; }
.filter { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 0; align-self: start; position: sticky; top: 140px; }
.filter h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 18px 6px; margin: 0; }
.filter a { display: flex; justify-content: space-between; padding: 9px 18px; font-weight: 500; font-size: 14.5px; }
.filter a:hover { color: var(--sea); background: var(--sand); }
.filter a.on { color: var(--sea-700); background: var(--sea-50); box-shadow: inset 3px 0 0 var(--sea); font-weight: 700; }
.filter a small { color: var(--muted); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .count { color: var(--muted); }
.select { height: 42px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; padding: 0 14px; }
.cat-intro { background: #fff; border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); color: var(--muted); }
.cat-intro b { color: var(--ink); }
.mobile-cats { display: none; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: none; }
.mobile-cats::-webkit-scrollbar { display: none; }

/* ---------- Product detail ---------- */
.pd { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 28px; margin-top: 16px; }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.thumbs button { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: var(--sand); }
.thumbs button.on { border-color: var(--sun); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info h1 { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); color: var(--sea-900); }
.pd-short { color: var(--muted); margin: 0 0 16px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; background: var(--sun-50); border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; flex-wrap: wrap; }
.pd-price b { font-size: 28px; color: var(--coral); }
.pd-price s { color: var(--muted); }
.pd-price .off { background: var(--coral); color: #fff; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; }
.opt-label { font-weight: 600; margin-bottom: 8px; display: block; }
.variants { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.variant { min-height: 42px; padding: 6px 16px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; }
.variant:hover { border-color: var(--sea); }
.variant.on { border-color: var(--sun); background: var(--sun-50); color: var(--sun-600); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; height: 46px; overflow: hidden; background: #fff; }
.qty button { width: 42px; height: 100%; border: 0; background: none; font-size: 20px; color: var(--sea-700); }
.qty button:hover { background: var(--sand); }
.qty input { width: 44px; text-align: center; border: 0; outline: none; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm { height: 36px; } .qty.sm button { width: 32px; font-size: 17px; } .qty.sm input { width: 34px; font-size: 14px; }
.pd-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.pd-actions .btn { flex: 1; min-width: 160px; }
.pd-perks { display: grid; gap: 10px; border-top: 1px dashed var(--line); padding-top: 16px; font-size: 14px; }
.pd-perks div { display: flex; gap: 10px; align-items: center; }
.pd-perks .icon { color: var(--sea-700); }
.pd-desc { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 28px; margin: 20px 0; }
.pd-desc h2 { font-family: var(--serif); color: var(--sea-900); font-size: 22px; }
.prose { font-size: 16px; line-height: 1.75; }
.prose h2 { font-family: var(--serif); color: var(--sea-900); font-size: 23px; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 18px; margin: 1.3em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose blockquote { margin: 1.4em 0; padding: 16px 20px; background: var(--sun-50); border-left: 4px solid var(--sun); border-radius: 0 12px 12px 0; font-style: italic; }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; padding-top: 16px; padding-bottom: 50px; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel h3 { font-size: 18px; margin-bottom: 14px; }
.cart-row { display: grid; grid-template-columns: 84px 1fr auto auto auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; }
.cart-row .t { font-weight: 600; line-height: 1.35; }
.cart-row .v { color: var(--muted); font-size: 13px; }
.cart-row .unit { color: var(--muted); font-size: 14px; }
.cart-row .line { font-weight: 700; color: var(--coral); min-width: 96px; text-align: right; }
.sum-row { display: flex; justify-content: space-between; padding: 7px 0; }
.sum-row.total { border-top: 1px dashed var(--line); margin-top: 8px; padding-top: 14px; font-size: 18px; font-weight: 700; }
.sum-row.total b { color: var(--coral); font-size: 22px; }
.sum-row .ok { color: var(--ok); font-weight: 600; }
.coupon-form { display: flex; gap: 8px; margin: 12px 0; }
.coupon-form input { flex: 1; min-width: 0; }
.coupon-msg { font-size: 13px; margin: -4px 0 8px; }
.coupon-msg.ok { color: var(--ok); } .coupon-msg.err { color: var(--coral); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: 14px; }
.field label i { color: var(--coral); font-style: normal; }
.input { height: 46px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; padding: 0 14px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 90px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--sea); box-shadow: 0 0 0 3px var(--sea-50); }
.input.invalid { border-color: var(--coral); }
.field .err { color: var(--coral); font-size: 13px; display: none; }
.field.has-err .err { display: block; }
.field.has-err .input { border-color: var(--coral); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pay-opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; cursor: pointer; }
.pay-opt:has(input:checked) { border-color: var(--sun); background: var(--sun-50); }
.pay-opt input { margin-top: 4px; accent-color: var(--sun-600); width: 18px; height: 18px; }
.pay-opt b { display: block; }
.pay-opt small { color: var(--muted); }
.pay-opt .ship-fee { font-style: normal; color: var(--coral); font-weight: 700; }
/* Ô tick: giao địa chỉ khác, đồng ý chính sách */
.co-check { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; cursor: pointer; margin: 4px 0 12px; line-height: 1.45; }
.co-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sun); flex: none; }
.co-check small { color: var(--muted); }
.co-check a { color: var(--sea-700); text-decoration: underline; }
.co-other { border-left: 3px solid var(--sun); background: var(--sun-50); border-radius: 0 12px 12px 0; padding: 14px 14px 2px; margin-bottom: 14px; }
.co-agree { margin: 14px 0 0; }
.co-agree .co-check { margin: 0; }
.bank-box { display: grid; gap: 4px; background: var(--sea-50); color: var(--sea-900); border-radius: 12px; padding: 14px; font-size: 14px; margin-top: 2px; }
.bank-box small { color: var(--muted); margin-top: 4px; }
.co-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; }
.co-item .im { position: relative; }
.co-item img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.co-item .q { position: absolute; top: -6px; right: -6px; background: var(--sea); color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.co-item .t { font-size: 14px; font-weight: 600; line-height: 1.35; }
.co-item .v { font-size: 12.5px; color: var(--muted); }
.success { text-align: center; padding: 40px 20px; }
.success .big { width: 76px; height: 76px; border-radius: 50%; background: #e2f5e7; color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; }
.success .big .icon { width: 40px; height: 40px; stroke-width: 2.4; }
.success h2 { font-family: var(--serif); color: var(--sea-900); }
.order-code { display: inline-block; font-weight: 800; letter-spacing: .06em; background: var(--sun-50); color: var(--sun-600); padding: 6px 14px; border-radius: 8px; font-size: 18px; }
.alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 14px; }
.alert.err { background: #fdecea; color: #a3281a; }
.alert.info { background: var(--sea-50); color: var(--sea-900); }
.qr { display: grid; grid-template-columns: 160px 1fr; gap: 16px; align-items: center; text-align: left; margin: 20px auto 0; max-width: 520px; background: var(--sand); border-radius: 14px; padding: 16px; }
.qr img { width: 160px; border-radius: 10px; background: #fff; }

/* ---------- Blog page ---------- */
.blog-hero { background: radial-gradient(120% 140% at 80% 0%, var(--sea) 0%, var(--sea-700) 50%, var(--sea-900) 100%); color: #fff; border-radius: 22px; padding: 44px; margin-top: 16px; position: relative; overflow: hidden; }
.blog-hero h1 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); margin: 6px 0 10px; }
.blog-hero p { color: #d6ebf8; max-width: 560px; margin: 0; }
.blog-hero .eyebrow { color: #ffe1cf; font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.blog-tabs { margin: 22px 0 18px; }
.post-feature { display: grid; grid-template-columns: 1.2fr 1fr; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 22px; }
.post-feature .post-cover { aspect-ratio: auto; min-height: 320px; }
.post-feature .post-body { padding: 32px; justify-content: center; }
.post-feature h3 { font-size: clamp(22px, 2.4vw, 30px); }
.article { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; padding-top: 16px; padding-bottom: 50px; align-items: start; }
.article-main { background: #fff; border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.article-cover { aspect-ratio: 16 / 8; position: relative; background: var(--sea); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }
.article-inner { padding: 30px 36px 40px; }
.article-inner h1 { font-family: var(--serif); color: var(--sea-900); font-size: clamp(26px, 3.2vw, 38px); }
.side-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 18px; }
.side-box h4 { font-size: 15px; margin-bottom: 12px; color: var(--sea-900); }
.side-prod { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--sand); }
.side-prod:last-child { border-bottom: 0; }
.side-prod img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.side-prod .t { font-size: 14px; font-weight: 600; line-height: 1.35; }
.side-prod .p { color: var(--coral); font-weight: 700; font-size: 14px; }
.side-post { display: block; padding: 10px 0; border-bottom: 1px solid var(--sand); font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.side-post:hover { color: var(--sea); }
.side-post small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; margin-top: 2px; }
.cta-box { background: linear-gradient(135deg, var(--sun), var(--sun-600)); color: #fff; }
.cta-box h4 { color: #fff; }
.cta-box p { font-size: 14px; margin: 0 0 12px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 18px; padding-bottom: 50px; }
.about-grid .panel { padding: 28px; }
.about-grid h2 { font-family: var(--serif); color: var(--sea-900); font-size: 24px; }
.about-full { grid-column: 1 / -1; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 12px; }
.contact-list .icon { color: var(--sun-600); margin-top: 3px; }

/* ---------- Footer ---------- */
.footer { background: var(--sea); color: #fff; margin-top: 40px; font-size: 14px; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding: 48px 16px 32px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer .brand p { margin: 12px 0 16px; }
.footer .brand .logo-text b { color: #fff; }
.footer .brand .logo-text small { color: #fff; }
.footer .logo img { background: #fff; border-radius: 16px; padding: 6px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; }
.socials a:hover { background: var(--sun); color: #fff; }
.socials { flex-wrap: wrap; }
.socials .s-zalo { font-size: 11px; }
.socials .s-zalo:hover { background: #0068ff; }
.socials .s-tiktok:hover { background: #111; }
.socials .s-shopee:hover { background: #ee4d2d; }
.socials .s-youtube:hover { background: #ff0000; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.3); padding: 16px; text-align: center; font-size: 13px; }
.footer .newsletter { display: flex; margin-top: 12px; background: rgba(255,255,255,.22); border-radius: 999px; overflow: hidden; }
.footer .newsletter input { flex: 1; min-width: 0; background: transparent; border: 0; padding: 0 16px; color: #fff; outline: none; height: 44px; }
.footer .newsletter input::placeholder { color: rgba(255,255,255,.85); }
.footer .newsletter button { border: 0; background: var(--sun); color: #fff; font-weight: 600; padding: 0 16px; }

/* Floating contact */
.float { position: fixed; right: 16px; bottom: 20px; display: grid; gap: 10px; z-index: 80; }
.float a { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.2); font-weight: 800; font-size: 13px; }
.float .f-zalo { background: #0068ff; }
.float .f-phone { background: var(--coral); animation: ring 2.2s infinite; }
@keyframes ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(245,102,34,.5); } 70% { box-shadow: 0 0 0 14px rgba(245,102,34,0); } }
.to-top { background: var(--sea) !important; opacity: 0; pointer-events: none; transition: opacity .2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--sea-900); color: #fff; padding: 12px 14px 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 200; display: flex; align-items: center; gap: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); font-size: 14px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast .icon { color: #7be0a6; }
.toast a { color: var(--sun); font-weight: 700; white-space: nowrap; }

/* Quick view modal */
.modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; background: rgba(6,40,59,.5); opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-box { background: #fff; border-radius: 20px; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; display: grid; grid-template-columns: 1fr 1.1fr; position: relative; }
.modal-box > img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1; }
.modal-box .mb { padding: 24px; }
.modal-box h3 { font-family: var(--serif); color: var(--sea-900); font-size: 21px; padding-right: 30px; }
.modal-close { position: absolute; top: 12px; right: 12px; }

/* Skeleton/fade-in */
.fade-in { animation: fade .4s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1240px) {
  .nav-links a.opt { display: none; }
}
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .hotline { display: none; }
  .nav-cats, .hero-grid { --side: 230px; }
  .nav-cats { width: 230px; }
  .hero-grid { grid-template-columns: 230px 1fr; }
  .slide-hero { padding-left: 32px; }
}
@media (max-width: 980px) {
  .nav, .hero-cats { display: none; }
  .burger { display: grid; }
  .hero-grid { grid-template-columns: 1fr; }
  .grid, .grid.cols-4 { grid-template-columns: repeat(3, 1fr); }
  .cat-tiles { grid-template-columns: repeat(5, 1fr); }
  .commits { grid-template-columns: repeat(2, 1fr); }
  .promo, .story, .pd, .cart-layout, .article, .post-feature, .about-grid { grid-template-columns: 1fr; }
  .shop { grid-template-columns: minmax(0, 1fr); }
  .shop > div, .cart-layout > *, .article > * { min-width: 0; }
  .filter { display: none; }
  .mobile-cats { display: flex; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .story { padding: 32px 24px; }
  .slide-hero { padding-left: 28px; }
}
@media (max-width: 680px) {
  body { font-size: 14.5px; }
  .topbar .tb-left { display: none; }
  .topbar .wrap { justify-content: center; }
  .header-main { height: auto; flex-wrap: wrap; gap: 10px 12px; padding: 10px 0; }
  .logo img { height: 44px; }
  .logo-text small { display: none; }
  .search { order: 3; flex-basis: 100%; max-width: none; height: 42px; }
  .cart-btn { padding: 0 14px; height: 42px; }
  .cart-btn .lbl { display: none; }
  .grid, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px 10px 12px; }
  .card-title { font-size: 13.5px; }
  .price b { font-size: 15.5px; }
  .card-add { width: 36px; height: 36px; border-radius: 9px; }
  .card-add .icon { width: 18px; height: 18px; }
  .card-foot { gap: 6px; }
  .slider { aspect-ratio: auto; }
  .slide-hero { grid-template-columns: 1fr; padding: 26px 20px 30px; }
  .slide-hero .hero-art { display: none; }
  .slides { height: auto; }
  .slide { height: auto; }
  .slide > img { height: auto; aspect-ratio: 2 / 1; }
  .commits { grid-template-columns: 1fr 1fr; gap: 10px; }
  .commit { flex-direction: column; text-align: center; padding: 12px 8px; gap: 6px; min-width: 0; }
  .commit > div { min-width: 0; max-width: 100%; }
  .commit .ic { width: 34px; height: 34px; border-radius: 10px; }
  .commit b { font-size: clamp(11px, 3.5vw, 14px); white-space: nowrap; }
  .commit small { display: none; }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-tile img { width: 64px; height: 64px; }
  .cat-tile b { font-size: 12.5px; }
  .posts { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .pd, .pd-desc, .article-inner { padding: 18px; }
  .cart-row { grid-template-columns: 70px 1fr auto; grid-template-areas: "img info rm" "img qty line"; gap: 8px 12px; }
  .cart-row img { grid-area: img; width: 70px; height: 70px; }
  .cart-row .info { grid-area: info; }
  .cart-row .qty { grid-area: qty; justify-self: start; }
  .cart-row .line { grid-area: line; }
  .cart-row .rm { grid-area: rm; }
  .cart-row .unit { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .modal-box { grid-template-columns: 1fr; }
  .modal-box > img { aspect-ratio: 16 / 10; }
  .blog-hero, .story { padding: 28px 20px; border-radius: 16px; }
  .post-feature .post-body { padding: 20px; }
  .post-feature .post-cover { min-height: 220px; }
  .qr { grid-template-columns: 1fr; text-align: center; }
  .qr img { margin: 0 auto; }
  .float a { width: 46px; height: 46px; }
  .promo-gift { padding: 24px; }
}

/* ---------- Slogan "HÀNG VIỆT CHÍNH HÃNG" (dải xanh lá như logo) ---------- */
.slogan-pill { display: inline-flex; align-items: center; background: var(--leaf); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; line-height: 1.4; width: max-content; box-shadow: inset 0 -2px 0 var(--leaf-700); }
.topbar .slogan-pill { font-size: 11px; padding: 2px 10px; }
.logo-text .slogan-pill { margin-top: 3px; font-size: 10px; padding: 2px 8px; }
/* Logo chữ trên header: "79" xanh – "Food" cam – dải slogan nền xanh lá chữ trắng */
.header .logo-text .t79 { color: var(--sea); }
.header .logo-text .tfood { color: var(--sun); }
.header .logo-text .slogan-pill { background: #32ac50; color: #fff; box-shadow: inset 0 -2px 0 #227837; }
.slide-hero .slogan-pill { font-size: 12.5px; padding: 5px 14px; }
.logo img.mark { height: 50px; }
.sec-head h2, .page-title, .slide-hero h1, .story h2, .promo-gift h3, .blog-hero h1 { letter-spacing: -.01em; }