:root {
  --green: #1F4D3A;
  --green-dark: #153626;
  --gold: #9A7B1E;
  --gold-light: #E9CF7A;
  --red: #C0392B;
  --ink: #1F2A24;
  --body: #4A5A50;
  --muted: #6B766F;
  --line: #E3E8E0;
  --line-soft: #EEF1EC;
  --mint: #C9D8CD;
  --bg: #F4F6F2;
  --white: #FFFFFF;
  /* Lề trái/phải tự co giãn theo chiều rộng màn hình: 16px (điện thoại) → 64px (PC lớn) */
  --pad-x: clamp(16px, 4.5vw, 64px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; font-family: 'Be Vietnam Pro', system-ui, sans-serif; background: var(--bg); color: var(--ink); overflow-x: hidden; }
img { max-width: 100%; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drift { animation: drift 16s ease-in-out infinite alternate; will-change: transform; }
@keyframes drift { from { transform: scale(1.03) translate(0, 0); } to { transform: scale(1.09) translate(-1.2%, -0.8%); } }
.lift { transition: transform .2s ease, box-shadow .2s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(31, 77, 58, 0.15); }
.badge { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: 4px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 4px; font-weight: 600; font-size: 14px; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-dark); text-decoration: none; }
button.btn { border: none; font-family: inherit; cursor: pointer; }

/* Product detail popup (ingredient content) */
.detail { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); padding: clamp(18px, 4vw, 28px); overscroll-behavior: contain; border: none; border-radius: 6px; background: var(--white); color: var(--ink); font-family: inherit; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); }
.detail::backdrop { background: rgba(21, 54, 38, 0.6); }
.detail-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border: none; background: none; font-size: 28px; line-height: 1; color: var(--green); cursor: pointer; border-radius: 4px; }
.detail-close:hover { background: var(--line-soft); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 2px; color: var(--gold); text-transform: uppercase; }
.detail h3 { font-size: 22px; margin: 8px 44px 12px 0; color: var(--green); }
.detail p { font-size: 15px; line-height: 1.7; color: var(--body); margin: 0 0 12px; }
.detail p.note { font-size: 13px; line-height: 1.6; color: var(--muted); }
.detail img { width: 100%; margin-top: 8px; border-radius: 4px; display: block; }

/* Article popup ("Đọc tiếp") */
button.more { padding: 0; border: none; background: none; font-family: inherit; cursor: pointer; }
button.more:hover { text-decoration: underline; }
.article h3 { font-size: 24px; line-height: 1.3; }
.article .lead { font-size: 16px; color: var(--ink); }
.article h4 { font-size: 18px; margin: 24px 0 8px; color: var(--green); }
.article h5 { font-size: 15px; margin: 16px 0 4px; color: var(--gold); }
.article ul { margin: 0 0 12px; padding-left: 22px; font-size: 15px; line-height: 1.7; color: var(--body); }
.article-figure { margin: 16px 0; }
.article-figure img { width: 100%; max-height: 360px; object-fit: cover; margin: 0; border-radius: 4px; }
.article-figure img[src*="cong-thuc"] { object-fit: contain; background: #fff; }
.article-figure img.contain { object-fit: contain; }
.article-figure img.dark { background: #000; }
.article-figure img.light { background: #fff; }
.article p.warning { padding: 12px 16px; background: #FCEDEB; color: #8E2A1F; border-radius: 4px; font-size: 14px; font-weight: 600; }
.article-figure figcaption { margin-top: 6px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.article .refs { margin: 0 0 12px; padding-left: 22px; font-size: 13px; line-height: 1.6; color: var(--body); }
.article .refs li { margin-bottom: 6px; }
.article .refs a { font-weight: 600; }
.food-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 16px; }
.food { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
.article .food img { width: 88px; height: 88px; object-fit: cover; margin: 0; border-radius: 4px; flex-shrink: 0; }
.food strong { color: var(--green); font-size: 15px; }
.article .food p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.text-media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: var(--green); color: var(--gold-light); text-align: center; }
.text-media span { font-size: 32px; font-weight: 800; }
.text-media small { font-size: 14px; color: var(--mint); }
.fact { display: flex; gap: 20px; align-items: center; margin: 16px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 4px; }
.fact-number { flex-shrink: 0; font-size: 32px; font-weight: 800; color: var(--gold); }
.article .fact p { margin: 0; font-size: 14px; }
.callout { margin: 24px 0 12px; padding: 18px 20px; background: var(--line-soft); border-radius: 4px; }
.callout-title { font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--green); margin-bottom: 8px; }
.callout p:last-child { margin-bottom: 0; font-weight: 600; color: var(--green); }

/* Utility bar */
.utility { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px var(--pad-x); background: var(--white); border-bottom: 1px solid var(--line); font-size: 13px; color: var(--body); }
.utility nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* Header */
/* PC lớn: 1 hàng [thương hiệu | tìm kiếm | khẩu hiệu | giỏ hàng].
   Nhỏ hơn 1280px: khẩu hiệu xuống hàng riêng. Điện thoại: tìm kiếm cũng xuống hàng riêng. */
.header { display: grid; grid-template-columns: auto minmax(200px, 520px) 1fr auto; grid-template-areas: "brand search slogan cart"; align-items: center; column-gap: clamp(16px, 2.5vw, 32px); row-gap: 12px; padding: 16px var(--pad-x); background: var(--white); }
.brand { grid-area: brand; white-space: nowrap; }
.brand-name { font-weight: 800; font-size: clamp(20px, 2vw, 24px); color: var(--green); }
.brand-tag { font-size: 12px; letter-spacing: 2px; color: var(--gold); }
.search { grid-area: search; display: flex; min-width: 0; }
.slogan { grid-area: slogan; justify-self: center; }
.cart { grid-area: cart; white-space: nowrap; }
.search input { flex: 1; min-width: 0; padding: 12px 16px; border: 1px solid var(--green); border-right: none; border-radius: 4px 0 0 4px; font-family: inherit; font-size: 14px; }
.search button { padding: 0 20px; min-height: 44px; background: var(--green); color: #fff; border: none; border-radius: 0 4px 4px 0; font-family: inherit; font-weight: 600; cursor: pointer; }
.cart { font-size: 14px; font-weight: 600; color: var(--green); padding: 10px 14px; border: 1px solid var(--green); border-radius: 4px; background: var(--white); font-family: inherit; cursor: pointer; }
.cart:hover { background: var(--green); color: var(--white); }

/* Nút trên thẻ sản phẩm */
.product { display: flex; flex-direction: column; }
.product-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.product-actions .btn { flex: 1 1 110px; padding: 10px 12px; white-space: nowrap; text-align: center; border: 1px solid var(--green); cursor: pointer; font-family: inherit; }
.btn-outline { background: var(--white); color: var(--green); }
.btn-outline:hover { color: var(--white); }
.btn-order { background: var(--gold); border-color: var(--gold) !important; color: var(--white); border: 1px solid var(--gold); cursor: pointer; font-family: inherit; }
.btn-order:hover { background: #7f6518; }
.btn-order:disabled { opacity: .6; cursor: wait; }
.btn-block { display: block; width: 100%; padding: 13px 18px; font-size: 15px; }

/* Hộp đặt hàng */
.order-dialog { width: min(440px, calc(100% - 32px)); }
.order-form fieldset { border: none; padding: 0; margin: 0 0 16px; }
.order-form legend, .qty-row > span { font-size: 14px; font-weight: 700; color: var(--green); margin-bottom: 8px; }
.size-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.size-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 8px; border: 2px solid var(--line); border-radius: 6px; cursor: pointer; }
.size-option input { position: absolute; opacity: 0; }
.size-option:has(input:checked) { border-color: var(--gold); background: #FBF6E6; }
.size-option:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 2px; }
.size-ml { font-size: 18px; font-weight: 800; color: var(--green); }
.size-price { font-size: 14px; color: var(--gold); font-weight: 700; }
.qty-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; }
.qty-btn { width: 40px; height: 40px; border: none; background: var(--line-soft); color: var(--green); font-size: 20px; cursor: pointer; font-family: inherit; }
.qty-btn:hover { background: var(--mint); }
.qty input { width: 56px; height: 40px; border: none; text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm .qty-btn { width: 32px; height: 32px; font-size: 16px; }
.qty-sm span { min-width: 32px; text-align: center; font-weight: 700; }
.order-total { margin: 0 0 16px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 15px; color: var(--body); text-align: right; }
.order-total strong { font-size: 20px; color: var(--green); }

/* Giỏ hàng */
.cart-dialog { width: min(600px, calc(100% - 32px)); }
.cart-empty { padding: 24px 0; color: var(--body); }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 1fr auto 90px auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.cart-name { font-weight: 700; color: var(--green); font-size: 15px; }
.cart-name small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.cart-price { text-align: right; font-weight: 700; color: var(--ink); }
.cart-remove { border: none; background: none; color: var(--red); font: inherit; font-size: 13px; cursor: pointer; padding: 6px; }
.cart-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; font-size: 15px; color: var(--body); }
.cart-sum strong { font-size: 22px; color: var(--green); }
.checkout { border-top: 2px solid var(--line); padding-top: 12px; }
.checkout h4 { margin: 4px 0 12px; color: var(--green); }
.checkout label { display: block; margin-bottom: 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.checkout input:not([type=radio]), .checkout textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; font: inherit; font-weight: 400; box-sizing: border-box; }
.checkout input:focus, .checkout textarea:focus { outline: 2px solid var(--green); border-color: var(--green); }
.checkout .receive { border: none; padding: 0; margin: 0 0 12px; display: flex; gap: 20px; flex-wrap: wrap; }
.checkout .receive legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.checkout .receive label { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.checkout [hidden] { display: none; }
.form-error { margin: 0 0 12px; padding: 10px 12px; background: #FDECEA; color: var(--red) !important; border-radius: 4px; font-size: 14px !important; }
.cart-done { text-align: center; padding: 16px 0; }
.done-icon { width: 64px; height: 64px; margin: 0 auto 8px !important; border-radius: 50%; background: var(--green); color: var(--white) !important; font-size: 34px !important; line-height: 64px !important; }
.cart-done h4 { color: var(--green); font-size: 20px; margin: 0 0 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 12px 20px; border-radius: 6px; background: var(--green-dark); color: var(--white); font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
.toast[hidden] { display: none; }

/* Slogan thương hiệu giữa ô tìm kiếm và giỏ hàng */
.slogan { display: flex; align-items: center; gap: 14px; min-width: 0; }
.slogan-logo { width: 64px; height: 64px; flex-shrink: 0; object-fit: contain; }
.slogan-text { margin: 0; padding: 6px 0; font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: 2px; white-space: nowrap;
  background: linear-gradient(100deg, var(--green) 0%, var(--green) 35%, var(--gold) 45%, var(--gold-light) 50%, var(--gold) 55%, var(--green) 65%, var(--green) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  animation: slogan-shine 5s ease-in-out infinite; }
.slogan-text span { color: var(--gold); -webkit-text-fill-color: var(--gold); }
@keyframes slogan-shine { 0% { background-position: 100% 0; } 60%, 100% { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .slogan-text { animation: none; background-position: 100% 0; } }

/* Main nav */
.mainnav { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); padding: 0 var(--pad-x); min-height: 50px; background: var(--green); color: var(--white); font-size: 14px; font-weight: 600;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.mainnav::-webkit-scrollbar { display: none; }
.mainnav a { color: var(--white); flex-shrink: 0; padding: 14px 0; }
.cat-btn { flex-shrink: 0; padding: 0 20px; height: 50px; background: var(--green-dark); color: var(--white); border: none; font: inherit; cursor: pointer; }
.cat-btn:hover, .cat-btn[aria-expanded="true"] { background: #0f2a1d; }
.cat-caret { display: inline-block; margin-left: 4px; transition: transform .2s; }
.cat-btn[aria-expanded="true"] .cat-caret { transform: rotate(180deg); }

/* Menu thả xuống "Danh mục sản phẩm" */
.nav-wrap { position: relative; z-index: 20; }
.cat-menu { position: absolute; top: 100%; left: var(--pad-x); width: min(340px, calc(100vw - 2 * var(--pad-x))); background: var(--white); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: 0 0 6px 6px; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18); padding: 6px 0; }
.cat-menu[hidden] { display: none; }
.cat-menu a { display: flex; align-items: center; gap: 12px; padding: 10px 16px; color: var(--ink); }
.cat-menu a:hover, .cat-menu a:focus-visible { background: var(--line-soft); text-decoration: none; outline: none; }
.cat-menu img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.cat-menu strong { display: block; font-size: 14px; color: var(--green); }
.cat-menu small { display: block; font-size: 12px; color: var(--muted); }
.cat-menu .cat-all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; color: var(--green); }

/* Sidebar + hero */
.top { display: flex; gap: 24px; padding: 24px var(--pad-x); background: var(--white); }
.sidebar { width: 240px; flex-shrink: 0; border: 1px solid var(--line); }
.sidebar-title { padding: 14px 16px; font-weight: 800; color: var(--green); border-bottom: 1px solid var(--line); }
.sidebar a { display: block; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink); font-size: 14px; }
.sidebar a.all { border-bottom: none; background: var(--line-soft); font-weight: 600; color: var(--green); }
/* Ảnh hero giữ đúng tỉ lệ ảnh gốc (2760×1720) ở mọi chiều rộng thay vì cố định 420px */
.hero { flex: 1; min-width: 0; position: relative; aspect-ratio: 2760 / 1720; max-height: 480px; border-radius: 4px; overflow: hidden; background: #EFEAE0; }
.hero-copy { position: absolute; left: 24px; bottom: 20px; max-width: 600px; padding: 16px 24px; color: var(--white);
  background: rgba(21, 54, 38, 0.92); border-left: 5px solid var(--gold-light); border-radius: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25); }
.hero-title { margin: 0; font-size: clamp(20px, 2.4vw, 28px); font-weight: 800; line-height: 1.2; color: var(--gold-light); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.hero-sub { font-size: clamp(14px, 1.4vw, 16px); margin: 6px 0 0; line-height: 1.5; color: var(--white); }

/* Promo row */
.promos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 24px); padding: 0 var(--pad-x) 24px; background: var(--white); }
.promo { aspect-ratio: 16 / 9; overflow: hidden; position: relative; border-radius: 4px; }
.promo-label { position: absolute; left: 16px; bottom: 16px; background: var(--white); padding: 8px 14px; font-weight: 800; color: var(--green); border-radius: 4px; }

/* Section shell */
.section { padding: 0 var(--pad-x) 32px; }
.section-bar { margin: 0; background: var(--green); color: var(--white); padding: 12px 20px; font-weight: 800; font-size: 15px; }

/* Products */
.products { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--white); border: 1px solid var(--line); border-top: none; }
.product { position: relative; padding: clamp(12px, 2vw, 24px); border-right: 1px solid var(--line); background: var(--white); }
.product:last-child { border-right: none; }
/* Khung ảnh theo tỉ lệ 2:3 nên ảnh cốc luôn cân đối dù cột rộng hay hẹp */
.product-media { aspect-ratio: 2 / 3; max-height: 420px; overflow: hidden; position: relative; background: var(--white); }
/* The EGCG / Curcumin / Cần tây shots come from one 3-cup photo, each card shows one third. */
.product-media .strip { position: absolute; top: 50%; left: 0; width: 300%; max-width: none; height: auto; transform: translateY(-50%); }
.product-media .strip.pos-2 { left: -100%; }
.product-media .strip.pos-3 { left: -200%; }
.product-media .macca { object-position: 38% center; }
.product h3 { font-size: 17px; margin: 16px 0 6px; color: var(--green); }
.product p { font-size: 13px; line-height: 1.6; color: var(--body); margin: 0 0 14px; }

/* Knowledge */
.knowledge { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); background: var(--white); padding: clamp(14px, 2vw, 24px); border: 1px solid var(--line); border-top: none; }
.card { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--white); display: flex; flex-direction: column; }
.card-media { aspect-ratio: 16 / 9; }
.card-body { flex: 1; display: flex; flex-direction: column; }
.card-body .more { margin-top: auto; align-self: flex-start; }
.card-body { padding: 16px; }
.card-body h3 { font-size: 16px; margin: 0 0 8px; color: var(--green); }
.card-body p { font-size: 13px; line-height: 1.6; color: var(--body); margin: 0 0 12px; }
.more { font-size: 13px; font-weight: 600; color: var(--green); }
.disclaimer { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* Research papers */
.research-wrap { background: var(--white); padding: clamp(14px, 2vw, 24px); border: 1px solid var(--line); border-top: none; }
.research-intro { margin: 0 0 20px; font-size: 14px; line-height: 1.7; color: var(--body); }
.research-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.paper { border: 1px solid var(--line); border-radius: 4px; padding: 20px; display: flex; flex-direction: column; }
.paper-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: var(--green); color: var(--white); }
.tag-type { background: var(--line-soft); color: var(--green); }
.paper h3 { font-size: 16px; line-height: 1.4; margin: 12px 0 4px; color: var(--green); }
.paper-orig { margin: 0 0 8px; font-size: 13px; font-style: italic; color: var(--muted); }
.paper-meta { margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.paper p { font-size: 13px; line-height: 1.6; color: var(--body); margin: 0 0 10px; }
.paper .paper-level { font-size: 12px; font-weight: 600; color: var(--gold); }
.paper-links { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; font-weight: 600; }
.paper-links .more { margin-right: auto; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--green); }
.paper-links .more:hover { text-decoration: underline; }
.article .paper-links { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.article .paper-orig { margin: 4px 0 16px; font-size: 13px; font-style: italic; color: var(--muted); }
.study-info { width: 100%; border-collapse: collapse; margin: 0 0 8px; font-size: 13px; }
.study-info th, .study-info td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.study-info th { width: 130px; font-weight: 700; color: var(--green); background: var(--line-soft); }
.study-info td { color: var(--body); }
.research-note { margin: 20px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; padding: 24px var(--pad-x); background: var(--green); color: var(--white); text-align: center; }
.benefit-title { font-weight: 800; font-size: 15px; }
.benefit-sub { font-size: 12px; color: var(--mint); margin-top: 4px; }

/* Footer */
.footer { padding: clamp(24px, 4vw, 40px) var(--pad-x); background: var(--white); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: clamp(24px, 5vw, 64px); font-size: 13px; color: var(--body); line-height: 1.8; }
.footer-col { flex: 1 1 200px; }
.footer-col.legal { flex: 2 1 320px; font-size: 12px; color: var(--muted); }
.footer-title { font-weight: 800; color: var(--green); margin-bottom: 8px; }
.footer a { color: var(--body); }

@media (prefers-reduced-motion: reduce) { .drift { animation: none; } .lift { transition: none; } }

/* ===== CO GIÃN THEO MÀN HÌNH =====
   ≥1280px  PC lớn: header 1 hàng, 4 sản phẩm / hàng, 3 bài viết / hàng
   <1280px  PC nhỏ / cửa sổ thu nhỏ: khẩu hiệu xuống hàng riêng
   <1100px  laptop nhỏ, máy tính bảng ngang: 2 sản phẩm / hàng, 2 bài viết / hàng
   <900px   máy tính bảng: danh mục bên trái thành hàng nút cuộn ngang
   <700px   điện thoại: tìm kiếm xuống hàng riêng, chữ hero nằm dưới ảnh, 1 bài viết / hàng
   <420px   điện thoại nhỏ */

@media (max-width: 1279px) {
  .header { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand search cart" "slogan slogan slogan"; }
  .slogan { padding-top: 10px; border-top: 1px solid var(--line-soft); width: 100%; justify-content: center; }
  .slogan-text { font-size: 18px; letter-spacing: 1.5px; }
  .slogan-logo { width: 48px; height: 48px; }
}

@media (max-width: 1099px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product:nth-child(2n) { border-right: none; }
  .product:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .knowledge { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-media { max-height: 380px; }
}

@media (max-width: 899px) {
  .top { flex-direction: column-reverse; gap: 14px; padding-top: 16px; }
  .sidebar { width: 100%; display: flex; gap: 8px; border: none; overflow-x: auto; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-title { display: none; }
  .sidebar a { flex-shrink: 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; font-size: 13px; }
  .sidebar a.all { border: 1px solid var(--green); }
  .hero { max-height: none; }
  .research-grid { grid-template-columns: 1fr; }
}

@media (max-width: 699px) {
  .utility { font-size: 12px; padding-top: 6px; padding-bottom: 6px; }
  .utility nav { gap: 14px; }
  .header { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand cart" "search search" "slogan slogan"; padding-top: 12px; padding-bottom: 12px; }
  .brand-tag { font-size: 10px; letter-spacing: 1.5px; }
  .slogan { gap: 10px; padding-top: 8px; }
  .slogan-logo { width: 38px; height: 38px; }
  .slogan-text { font-size: 14px; letter-spacing: 1px; white-space: normal; text-align: center; }
  .cat-btn { padding: 0 14px; }
  /* Chữ hero chuyển xuống dưới ảnh để không che sản phẩm */
  .hero { aspect-ratio: auto; overflow: visible; background: none; border-radius: 0; }
  .hero > .img { aspect-ratio: 2760 / 1720; height: auto; border-radius: 4px; animation: none; }
  .hero-copy { position: static; margin-top: 10px; max-width: none; padding: 12px 14px; border-left-width: 4px; box-shadow: none; }
  .promos { grid-template-columns: 1fr; }
  .promo-label { left: 10px; bottom: 10px; padding: 6px 10px; font-size: 14px; }
  .section { padding-bottom: 24px; }
  .section-bar { padding: 10px 14px; font-size: 14px; }
  .product h3 { font-size: 15px; margin-top: 10px; }
  .product p { font-size: 12px; margin-bottom: 10px; }
  .product-actions { flex-direction: column; gap: 6px; }
  .product-actions .btn { flex: none; width: 100%; padding: 9px 8px; font-size: 13px; }
  .knowledge { grid-template-columns: 1fr; }
  .food-grid { grid-template-columns: 1fr; }
  .fact { flex-direction: column; align-items: flex-start; gap: 8px; }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  /* Hộp popup gần như toàn màn hình */
  .detail { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .detail h3 { font-size: 19px; }
  .article h3 { font-size: 20px; }
  .article h4 { font-size: 17px; }
  .detail p, .article ul { font-size: 14px; }
  .study-info th { width: 96px; }
  .study-info th, .study-info td { padding: 6px 8px; }
  .cart-line { grid-template-columns: 1fr auto; gap: 8px; }
  .cart-price { text-align: left; }
  /* Chữ ô nhập ≥16px để iPhone không tự phóng to trang khi bấm vào ô */
  .search input, .checkout input:not([type=radio]), .checkout textarea, .qty input { font-size: 16px; }
}

@media (max-width: 419px) {
  .products { gap: 0; }
  .product { padding: 10px; }
  .product-media { max-height: 300px; }
  .badge { top: 6px; left: 6px; font-size: 10px; padding: 3px 7px; }
  .cart { padding: 8px 10px; font-size: 13px; }
  .brand-name { font-size: 19px; }
  .search button { padding: 0 14px; }
  .size-ml { font-size: 16px; }
}
