:root {
  --ink: #0b0b0c;
  --paper: #ffffff;
  --mist: #f1f1f1;
  --muted: #62666a;
  --line: #dedede;
  --accent: #ff4a1c;
  --error: #b3261e;
  --ok: #14603a;
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 3vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.55; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--paper); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.announce { background: var(--ink); color: #fff; text-align: center; font-size: .8125rem; font-weight: 600; padding: 7px 16px; letter-spacing: .02em; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: 68px; padding: 0 var(--gutter);
  background: var(--paper); border-bottom: 1px solid var(--line);
}
.is-home .site-header { background: var(--ink); color: #fff; border-bottom-color: transparent; }
.logo { font-family: var(--display); font-size: 1.75rem; line-height: 1; letter-spacing: .02em; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--accent); margin-left: 4px; }
.main-nav { display: flex; gap: 22px; align-items: center; }
.nav-item { position: relative; }
.nav-item > a { display: block; padding: 22px 0; font-size: .8125rem; font-weight: 700; text-transform: uppercase; text-decoration: none; letter-spacing: .03em; }
.nav-item > a:hover { color: var(--accent); }
.sub { display: none; position: absolute; left: -16px; top: 100%; min-width: 220px; padding: 8px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 28px rgb(0 0 0 / .14); }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.sub a { display: block; padding: 8px 10px; font-size: .875rem; text-decoration: none; }
.sub a:hover { background: var(--mist); }
.header-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; background: none; border: 0; color: inherit; cursor: pointer; }
.menu-toggle { display: none; }
.search { display: flex; align-items: center; }
.search input { width: 150px; padding: 6px 10px; border: 1px solid var(--line); background: transparent; color: inherit; }
.is-home .search input { border-color: #4a4a4c; }
.search input::placeholder { color: inherit; opacity: .65; }
.cart-count { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; background: var(--accent); color: #fff; border-radius: 9px; font-size: .6875rem; font-weight: 700; line-height: 18px; text-align: center; }

/* Nút */
.btn { display: inline-block; padding: 13px 26px; background: var(--ink); color: #fff; border: 2px solid var(--ink); font-size: .8125rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; text-align: center; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-block { display: block; width: 100%; }
.link { padding: 0; background: none; border: 0; color: var(--muted); font-size: .8125rem; text-decoration: underline; cursor: pointer; }

/* Hero */
.kicker { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #cfcfcf; }
.kicker.dark { color: var(--muted); }
.hero {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  min-height: min(82vh, 720px); padding: 40px var(--gutter) 40px clamp(16px, 8vw, 128px);
  color: #fff;
  background: radial-gradient(90% 120% at 78% 45%, #ff4a1c 0%, #7a1e08 34%, #0b0b0c 70%);
}
.hero h1 { margin: 12px 0 28px; font-family: var(--display); font-weight: 400; font-size: clamp(2.75rem, 6.2vw, 5.75rem); line-height: 1.24; text-transform: uppercase; }
.hero-art { position: relative; height: clamp(320px, 42vw, 600px); }
.hero-tub { position: absolute; bottom: 0; }
.hero-tub .tub { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 34px rgb(0 0 0 / .45)); }
.hero-tub-0 { width: 58%; left: 22%; bottom: 6%; z-index: 2; }
.hero-tub-1 { width: 40%; left: 0; bottom: 14%; transform: rotate(-9deg); }
.hero-tub-2 { width: 40%; right: 0; bottom: 14%; transform: rotate(9deg); }

/* Ô danh mục */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.tile {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  overflow: hidden; aspect-ratio: 4 / 5; padding: 22px 12px; color: #fff; text-align: center; text-decoration: none;
  background: linear-gradient(180deg, var(--tile) 0%, #0b0b0c 88%);
}
.tile-art { position: absolute; inset: 7% 18% auto; transition: transform .25s ease; }
.tile-art .tub { display: block; width: 100%; height: auto; }
.tile:hover .tile-art { transform: translateY(-6px) scale(1.03); }
.tile::after { content: ""; position: absolute; inset: 64% 0 0; background: linear-gradient(180deg, transparent, rgb(0 0 0 / .9) 55%); }
.tile h2, .tile span { position: relative; z-index: 1; }
.tile h2 { font-family: var(--display); font-weight: 400; font-size: clamp(1.25rem, 2.4vw, 2.125rem); text-transform: uppercase; line-height: 1.28; }
.tile span { margin-top: 6px; font-size: .75rem; font-weight: 700; text-decoration: underline; text-transform: uppercase; }

/* Băng chuyền */
.rail-section { padding: clamp(40px, 6vw, 72px) var(--gutter) 8px; }
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.rail-head h2 { font-size: clamp(1.25rem, 2vw, 1.625rem); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; }
.rail-arrows button { width: 40px; height: 34px; background: none; border: 0; font-size: 1.25rem; cursor: pointer; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23.5vw, 340px); gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 12px; scrollbar-width: thin; }
.rail .card { scroll-snap-align: start; }

/* Thẻ sản phẩm */
.card-media { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 12%; background: var(--mist); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-media .tub { width: 100%; height: 100%; transition: transform .22s ease; }
.card:hover .tub, .card:hover .card-media img { transform: translateY(-5px); }
.tag { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 8px; background: #fff; font-size: .6875rem; font-style: italic; font-weight: 700; text-transform: uppercase; }
.tag-out { left: auto; right: 10px; background: var(--ink); color: #fff; }
.card-title { margin-top: 12px; font-size: .875rem; font-weight: 700; text-transform: uppercase; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-meta { margin-top: 3px; color: var(--muted); font-size: .75rem; font-weight: 500; text-transform: uppercase; }
.card-price { margin-top: 5px; font-size: .875rem; font-weight: 700; }
.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dot { display: inline-block; width: 13px; height: 13px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .18); }

/* Banner rộng */
.banner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; min-height: min(74vh, 620px); margin-top: clamp(40px, 6vw, 72px); padding: 48px var(--gutter) 48px clamp(16px, 8vw, 128px); color: #fff; background: linear-gradient(115deg, #0b0b0c 30%, #2a0d05 62%, #ff4a1c 130%); }
.banner h2 { margin: 12px 0 28px; font-family: var(--display); font-weight: 400; font-size: clamp(2.5rem, 5.6vw, 5rem); line-height: 1.24; text-transform: uppercase; }

.banner-art { display: flex; justify-content: center; align-items: flex-end; }
.banner-art .tub { display: block; width: 44%; height: auto; filter: drop-shadow(0 22px 30px rgb(0 0 0 / .5)); }
.banner-art div { display: contents; }
.banner-art div:first-child .tub { transform: rotate(-6deg) translateX(10%); }
.banner-art div:last-child .tub { transform: rotate(6deg) translateX(-10%); }

/* Cam kết + nhận tin */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: clamp(48px, 6vw, 80px) var(--gutter); }
.promises h3 { font-size: 1rem; text-transform: uppercase; }
.promises p { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.newsletter { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 44px var(--gutter); background: var(--ink); color: #fff; scroll-margin-top: 80px; }
.newsletter h2 { font-family: var(--display); font-weight: 400; font-size: 2rem; text-transform: uppercase; }
.newsletter p { color: #c9c9c9; }
.newsletter form { display: flex; flex: 1 1 320px; max-width: 480px; }
.newsletter input { flex: 1; min-width: 0; padding: 12px 14px; border: 0; }

/* Footer */
.site-footer { padding: 44px var(--gutter) 28px; background: var(--ink); color: #fff; border-top: 1px solid #2a2a2c; }
.footer-top { display: flex; flex-wrap: wrap; gap: 36px; justify-content: space-between; }
.footer-cols { display: flex; flex-wrap: wrap; gap: clamp(32px, 6vw, 88px); }
.footer-cols h3 { margin-bottom: 10px; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: #a8a8a8; }
.footer-cols a, .footer-cols p { display: block; margin-bottom: 6px; font-size: .875rem; text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.disclaimer { margin-top: 28px; font-size: .8125rem; font-weight: 600; }
.copyright { margin-top: 6px; color: #a8a8a8; font-size: .75rem; }
.details .disclaimer { color: var(--muted); }

/* Trang trong */
.flash { padding: 12px var(--gutter); font-size: .9375rem; font-weight: 500; }
.flash-ok { background: #dff3e7; color: var(--ok); }
.flash-error { background: #fbe3e1; color: var(--error); }
.flash.inline { margin-bottom: 18px; padding: 12px 14px; }
.error-text { color: var(--error); font-size: .8125rem; }
.container { padding: 0 var(--gutter); }
.narrow-top { padding-top: 36px; padding-bottom: 64px; }
.narrow { max-width: 520px; margin: 0 auto; }
.title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.26; text-transform: uppercase; margin-bottom: 20px; }
.title-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.page-head { padding: clamp(40px, 6vw, 72px) var(--gutter); background: var(--ink); color: #fff; border-bottom: 5px solid var(--tile, var(--accent)); }
.page-head h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.26; text-transform: uppercase; }
.page-head p { margin-top: 8px; color: #cfcfcf; }
.filters { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 18px 0; font-size: .875rem; }
.filters p { margin-right: auto; }
.filters select { margin-left: 6px; padding: 6px 8px; }
.check { display: inline-flex; gap: 6px; align-items: center; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 26px 8px; padding-bottom: 56px; }
.empty { padding: 56px 16px; text-align: center; }
.empty p { margin-bottom: 18px; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 6px; padding-bottom: 56px; }
.pager a { min-width: 38px; padding: 7px 10px; border: 1px solid var(--line); text-align: center; text-decoration: none; }
.pager a[aria-current] { background: var(--ink); color: #fff; }
.prose { max-width: 760px; padding-bottom: 64px; }
.page-head + .prose { padding-top: 36px; }
.prose h2 { margin: 24px 0 8px; font-size: 1.25rem; }
.prose p { margin-bottom: 12px; }
.prewrap { white-space: pre-line; }

/* Trang sản phẩm */
.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); padding-top: 24px; padding-bottom: 28px; }
.gallery-tub, .gallery-main { display: block; width: 100%; aspect-ratio: 1; background: var(--mist); }
.gallery-main { object-fit: contain; }
.gallery-tub { display: grid; place-items: center; padding: 8%; }
.gallery-tub .tub { width: 100%; height: 100%; }
.gallery-thumbs { display: flex; gap: 6px; margin-top: 6px; overflow-x: auto; }
.gallery-thumbs button { flex: 0 0 72px; height: 72px; padding: 0; background: var(--mist); border: 0; cursor: pointer; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.crumbs { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.buy h1 { margin: 6px 0 8px; font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 3.6vw, 3.25rem); line-height: 1.26; text-transform: uppercase; }
.buy-price { margin-bottom: 10px; font-size: 1.375rem; font-weight: 700; }
.buy-price s { margin-left: 8px; color: var(--muted); font-size: 1rem; font-weight: 500; }
.flavor-group { margin: 14px 0 0; padding: 0; border: 0; }
.flavor-group legend { display: flex; align-items: center; gap: 7px; padding: 0; font-size: .875rem; font-weight: 700; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: block; padding: 7px 14px; border: 1px solid #9a9a9a; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.pill input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pill.is-out span { border-color: var(--line); color: #9a9a9a; text-decoration: line-through; cursor: not-allowed; }
.stock-note { min-height: 1.4em; margin-top: 12px; color: var(--muted); font-size: .8125rem; }
.buy-row { display: flex; gap: 12px; align-items: flex-end; margin-top: 8px; }
.qty { flex: none; font-size: .75rem; font-weight: 600; }
.qty input { display: block; width: 74px; margin-top: 3px; padding: 11px 8px; border: 1px solid #9a9a9a; }
.macros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 22px; background: var(--line); border: 1px solid var(--line); }
.macros div { padding: 12px 6px; background: #fff; text-align: center; }
.macros b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.macros span { color: var(--muted); font-size: .75rem; }
.details { max-width: 820px; padding-bottom: 28px; }
.details details { border-top: 1px solid var(--line); padding: 14px 0; }
.details summary { font-weight: 700; text-transform: uppercase; font-size: .875rem; cursor: pointer; }
.details details > p { margin-top: 10px; }
.nutrition { width: 100%; max-width: 420px; margin-top: 10px; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.nutrition caption { padding-bottom: 6px; text-align: left; color: var(--muted); font-size: .8125rem; }
.nutrition th, .nutrition td { padding: 6px 0; border-top: 1px solid var(--line); text-align: left; font-weight: 500; }
.nutrition td { text-align: right; }

/* Giỏ, thanh toán, tài khoản */
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.two-col.even { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.two-col h2, .form h2 { margin-bottom: 12px; font-size: 1rem; text-transform: uppercase; }
.panel { padding: 20px; background: var(--mist); }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line-media { grid-row: span 2; display: grid; place-items: center; height: 96px; padding: 6px; background: var(--mist); }
.line-media img, .line-media .tub { width: 100%; height: 100%; object-fit: contain; }
.line-info { grid-row: span 2; font-size: .875rem; }
.line-info a { text-decoration: none; }
.line-qty { display: flex; gap: 8px; align-items: center; }
.line-qty input { width: 60px; padding: 5px; border: 1px solid #9a9a9a; }
.line-remove { grid-column: 3; text-align: right; }
.line-total { grid-column: 4; grid-row: 1 / span 2; text-align: right; }
.coupon { display: flex; gap: 6px; margin-bottom: 14px; }
.coupon input { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #9a9a9a; text-transform: uppercase; }
.coupon input::placeholder { text-transform: none; }
.coupon .btn { padding: 9px 12px; }
.totals { margin: 0 0 16px; font-size: .9375rem; }
.totals div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; }
.totals dd { margin: 0; font-variant-numeric: tabular-nums; }
.totals .grand { margin-top: 6px; padding-top: 10px; border-top: 1px solid #c6c6c6; font-size: 1.125rem; font-weight: 700; }
.mini-line { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: .875rem; }
.form { display: grid; gap: 14px; align-content: start; }
.form h2:not(:first-child) { margin-top: 12px; margin-bottom: 0; }
.form label { display: block; font-size: .8125rem; font-weight: 600; }
.form input:not([type="radio"]), .form textarea { display: block; width: 100%; margin-top: 4px; padding: 11px 12px; background: #fff; border: 1px solid #9a9a9a; font-weight: 400; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px; }
.form .choice { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #9a9a9a; font-size: .9375rem; font-weight: 500; cursor: pointer; }
.bank-box { margin: 20px 0; padding: 20px; border: 2px solid var(--ink); }
.bank-box h2 { margin-bottom: 10px; font-size: 1rem; text-transform: uppercase; }
.bank-box dl { margin: 0; }
.bank-box dl div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 5px 0; border-top: 1px solid var(--line); }
.bank-box dd { margin: 0; font-weight: 700; }
.order-page .two-col { margin: 20px 0; }
.table-wrap { overflow-x: auto; }
.plain { width: 100%; border-collapse: collapse; font-size: .875rem; }
.plain th, .plain td { padding: 10px 8px 10px 0; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }

@media (max-width: 960px) {
  .site-header { grid-template-columns: auto 1fr auto; gap: 4px; min-height: 58px; }
  .menu-toggle { display: inline-grid; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px; background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); box-shadow: 0 16px 24px rgb(0 0 0 / .14); }
  .main-nav.open { display: flex; }
  .nav-item > a { padding: 11px 0; }
  .sub { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 6px 10px; }
  .logo { justify-self: center; font-size: 1.4rem; }
  .search { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 40px 16px 24px; text-align: left; }
  .hero-art { height: 74vw; max-height: 480px; margin-top: 10px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .banner { grid-template-columns: minmax(0, 1fr); }
  .banner-art .tub { width: 42%; }
  .product, .two-col { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .promises { grid-template-columns: 1fr; gap: 20px; }
  .rail { grid-auto-columns: 62vw; }
  .rail-arrows { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .line { grid-template-columns: 72px minmax(0, 1fr) auto; }
  .line-media { grid-row: span 3; height: 84px; }
  .line-info { grid-row: auto; grid-column: 2 / span 2; }
  .line-qty { grid-column: 2; }
  .line-remove { grid-column: 3; grid-row: 2; }
  .line-total { grid-column: 2 / span 2; grid-row: 3; }
  .newsletter form { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
