/* ===== Màu sắc và kích thước (có thể đổi màu trong Google Sheets, mục "Màu chủ đạo" và "Màu nhãn giá") ===== */
:root {
  --navy: #1B2E57;
  --navy-2: #24396A;
  --ink: #15203A;
  --muted: #5B6578;
  --line: #E0E4EB;
  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --sun: #FFC531;
  --sun-ink: #2A2100;
  --red: #C8261C;
  --green: #1E7A46;
  --radius: 10px;
  --radius-s: 6px;
  --wrap: 1240px;
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
/* Website bán hàng giữ giao diện sáng; khai báo tối để trình duyệt không tự đổi màu */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #F2F4F7; }
}
:root[data-theme="dark"] { --bg: #F2F4F7; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sun); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }
.only-m { display: none !important; }
@media (max-width: 899px) {
  .only-d { display: none !important; }
  .only-m { display: flex !important; }
}

/* ===== Header ===== */
.hdr { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 40; }
.hdr-row { display: flex; align-items: center; gap: 20px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; flex: none; max-width: 280px; }
.logo img { max-height: 46px; width: auto; }
.logo .mark { width: 38px; height: 38px; border-radius: 8px; background: var(--sun); color: var(--sun-ink); display: grid; place-items: center; font-size: 15px; font-weight: 800; flex: none; }
.logo small { display: block; font-size: 11.5px; font-weight: 500; opacity: .75; letter-spacing: 0; }
.search { flex: 1; display: flex; background: #fff; border-radius: 8px; overflow: hidden; min-width: 0; }
.search input { flex: 1; border: 0; padding: 0 14px; height: 44px; min-width: 0; color: var(--ink); background: transparent; }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: 0 0 0 3px var(--sun); }
.search button { border: 0; background: var(--sun); color: var(--sun-ink); width: 52px; cursor: pointer; display: grid; place-items: center; }
.hotline { display: flex; align-items: center; gap: 10px; line-height: 1.2; flex: none; }
.hotline svg { width: 30px; height: 30px; color: var(--sun); }
.hotline small { display: block; font-size: 12px; opacity: .75; }
.hotline b { font-size: 17px; letter-spacing: .01em; }
.quote-btn { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.28); border-radius: 8px; padding: 9px 14px; font-weight: 600; flex: none; }
.quote-btn:hover { background: var(--navy-2); }
.count { position: absolute; top: -8px; right: -8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--sun); color: var(--sun-ink); font-size: 12px; display: grid; place-items: center; }
.icon-btn { background: none; border: 0; color: inherit; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; }

/* Thanh danh mục và menu xổ */
.catbar { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.catbar > ul { list-style: none; display: flex; gap: 2px; margin: 0 auto; position: relative; overflow-x: auto; scrollbar-width: none; }
.catbar > ul::-webkit-scrollbar { display: none; }
.catbar li.top { position: static; }
.catbar li.top > a { display: block; padding: 12px 14px; font-weight: 600; font-size: 14px; white-space: nowrap; border-bottom: 3px solid transparent; }
.catbar li.top:hover > a, .catbar li.top:focus-within > a, .catbar li.top > a.on { border-bottom-color: var(--sun); }
.mega { display: none; position: absolute; left: 16px; right: 16px; top: 100%; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 18px 40px -18px rgba(21,32,58,.35); padding: 22px 24px; z-index: 50; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 28px; }
.catbar li.top:hover .mega, .catbar li.top:focus-within .mega { display: grid; }
.mega h4 { margin: 0 0 6px; font-size: 14px; }
.mega h4 a:hover, .mega li a:hover { color: var(--red); }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 3px 0; color: var(--muted); font-size: 14px; }
/* catbar overflow hides dropdown; dropdown positioned relative to nav instead */
.catbar { position: relative; }
.catbar > ul { overflow: visible; flex-wrap: wrap; }

/* Ngăn kéo danh mục trên điện thoại */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(15,22,40,.5); }
.drawer-panel { background: var(--surface); width: min(86vw, 360px); height: 100%; overflow-y: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px 10px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.acc { border-bottom: 1px solid var(--line); }
.acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 13px 16px; font-weight: 600; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "+"; font-size: 20px; color: var(--muted); }
.acc[open] summary::after { content: "–"; }
.acc .sub { padding: 0 16px 12px 24px; }
.acc .sub a { display: block; padding: 6px 0; color: var(--muted); }
.acc .sub a.all { color: var(--ink); font-weight: 600; }

/* ===== Chung ===== */
main { min-height: 60vh; padding-bottom: 40px; outline: none; }
.loading { display: flex; align-items: center; gap: 12px; padding: 80px 16px; color: var(--muted); justify-content: center; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); padding-top: 16px; padding-bottom: 12px; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs span[aria-hidden] { opacity: .5; }
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 14px; }
.sec-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.sec-head .more { margin-left: auto; font-weight: 600; font-size: 14px; color: var(--navy); white-space: nowrap; }
.sec-head .more:hover { text-decoration: underline; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 999px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.chip:hover { border-color: var(--navy); color: var(--ink); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 700; cursor: pointer; font-size: 15px; text-align: center; }
.btn-sun { background: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { filter: brightness(.96); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-zalo { background: #0068FF; color: #fff; }
.btn-line { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--ink); }
.btn svg { width: 20px; height: 20px; }

/* ===== Trang chủ ===== */
.hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 16px; margin-top: 18px; }
.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy); aspect-ratio: 8 / 3; }
.slides { display: flex; height: 100%; transition: transform .5s ease; }
.slide { flex: 0 0 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; }
.dots button.on { background: var(--sun); width: 26px; border-radius: 5px; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.order-card h2 { font-size: 17px; }
.order-card p { margin: 0; color: var(--muted); font-size: 14px; }
.order-card .big { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: .01em; }
.order-card .btn { width: 100%; }
.order-card .hours { margin-top: auto; font-size: 13px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
.perks { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; }
.perk { display: flex; gap: 12px; align-items: center; padding: 14px 18px; font-size: 14px; }
.perk + .perk { border-left: 1px solid var(--line); }
.perk svg { color: var(--navy); width: 28px; height: 28px; }
.perk b { display: block; font-size: 14.5px; }
.perk span { color: var(--muted); font-size: 13px; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cat-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.cat-tile:hover { border-color: var(--navy); }
.cat-tile .ic { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: hsl(var(--h) 45% 38%); font-size: 15px; }
.cat-tile b { font-size: 14.5px; line-height: 1.3; }
.cat-tile span { font-size: 12.5px; color: var(--muted); }
.cat-band { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.cat-band .sec-head { border-left: 5px solid var(--sun); padding-left: 12px; }
.brands { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-chip { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 20px; font-weight: 700; color: var(--navy); }
.brand-chip:hover { border-color: var(--navy); }

/* ===== Thẻ sản phẩm ===== */
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; }
.card:hover { border-color: #AEB6C4; }
.card:hover h3 { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.pimg { position: relative; aspect-ratio: 1; background: hsl(var(--h, 220) 22% 96%); overflow: hidden; }
.pimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pimg .ph { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 28px; color: hsl(var(--h, 220) 22% 72%); letter-spacing: .02em; }
.card-b { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .brand { font-size: 12px; color: var(--muted); }
.card h3 { font-size: 14px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.card .price { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--red); color: #fff; }
.badge.out { background: #6B7385; }

/* Nhãn giá: điểm nhận diện của website */
.tag { display: inline-block; background: var(--sun); color: var(--sun-ink); font-weight: 800; font-size: 15px; padding: 3px 10px 3px 14px; clip-path: polygon(8px 0, 100% 0, 100% 100%, 8px 100%, 0 50%); border-radius: 0 4px 4px 0; letter-spacing: -.01em; white-space: nowrap; }
.tag.ask { background: var(--surface); color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy); clip-path: none; border-radius: 4px; padding: 2px 10px; font-weight: 700; font-size: 14px; }
s.old { color: var(--muted); font-size: 13px; }

/* ===== Trang danh mục, tìm kiếm ===== */
.page-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.page-title h1 { font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
.page-title span { color: var(--muted); font-size: 14px; }
.listing { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; }
.side h2 { font-size: 15px; margin: 0 0 8px; }
.side h2 + * { margin-bottom: 18px; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: flex; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 14px; }
.side li a:hover { background: var(--bg); }
.side li a.on { background: var(--navy); color: #fff; font-weight: 600; }
.side li a small { color: inherit; opacity: .6; }
.side .chips { gap: 6px; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar label { font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; margin-left: auto; }
select { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0 10px; font-weight: 600; font-size: 14px; }
.pager a:hover { border-color: var(--navy); }
.pager .on { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { background: var(--surface); border: 1px dashed #C6CCD7; border-radius: var(--radius); padding: 40px 20px; text-align: center; }
.empty h2 { font-size: 19px; margin-bottom: 6px; }
.empty p { color: var(--muted); margin: 0 0 16px; }
.subcats { margin-bottom: 14px; }

/* ===== Trang sản phẩm ===== */
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.gallery .main { border: 1px solid var(--line); border-radius: var(--radius); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumbs button { width: 68px; height: 68px; padding: 0; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; }
.thumbs button.on { border-color: var(--navy); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h1 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); margin: 10px 0 16px; }
.meta b { color: var(--ink); font-weight: 600; }
.stock-in { color: var(--green) !important; }
.stock-out { color: var(--red) !important; }
.pd-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-price .tag { font-size: 26px; padding: 6px 16px 6px 22px; clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%); }
.pd-price .tag.ask { font-size: 18px; padding: 6px 16px; clip-path: none; }
.pd-price .unit { color: var(--muted); font-size: 14px; }
.pd-short { margin: 16px 0; }
.buy { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 18px; }
.buy .btn-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qty { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; height: 48px; }
.qty button { width: 40px; border: 0; background: var(--bg); cursor: pointer; font-size: 18px; }
.qty input { width: 54px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.note { margin-top: 16px; background: #FFF8E1; border: 1px solid #F3DD95; border-radius: 8px; padding: 12px 14px; font-size: 14px; }
.pd-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.box > h2 { font-size: 18px; margin-bottom: 12px; }
.rich { max-width: 72ch; }
.rich p { margin: 0 0 12px; }
.rich h3 { font-size: 16.5px; margin: 18px 0 8px; }
.rich ul { margin: 0 0 12px; padding-left: 20px; }
.rich li { margin-bottom: 4px; }
.specs { width: 100%; border-collapse: collapse; font-size: 14px; }
.specs th, .specs td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 45%; color: var(--muted); font-weight: 500; }
.specs tr:nth-child(odd) { background: #F8F9FB; }

/* ===== Báo giá ===== */
.quote { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.qitem { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.qitem:first-child { padding-top: 0; }
.qitem .pimg { border-radius: 8px; border: 1px solid var(--line); }
.qitem .pimg .ph { font-size: 18px; }
.qitem h3 { font-size: 14.5px; font-weight: 600; }
.qitem h3 a:hover { text-decoration: underline; }
.qitem .line { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.qitem .ctrl { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qitem .qty { height: 38px; }
.qitem .qty button { width: 32px; }
.qitem .qty input { width: 44px; }
.link-btn { background: none; border: 0; color: var(--red); font-size: 13px; cursor: pointer; padding: 2px 0; }
.link-btn:hover { text-decoration: underline; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.total b { font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; font-size: 14px; font-weight: 600; }
.field input, .field textarea { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-weight: 400; background: #fff; }
.field textarea { min-height: 80px; resize: vertical; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.help { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* ===== Trang thông tin ===== */
.info { max-width: 820px; }
.info h1 { font-size: 26px; margin-bottom: 16px; }

/* ===== Footer ===== */
.ftr { background: var(--navy); color: rgba(255,255,255,.82); margin-top: 40px; font-size: 14px; }
.ftr-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding: 36px 16px 28px; }
.ftr h2 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li { margin-bottom: 7px; }
.ftr a:hover { color: #fff; text-decoration: underline; }
.ftr p { margin: 0 0 8px; }
.ftr .bct img { height: 46px; margin-top: 8px; }
.ftr-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 14px 16px; font-size: 13px; text-align: center; color: rgba(255,255,255,.6); }
.social { display: flex; gap: 10px; margin-top: 12px; }
.social a { border: 1px solid rgba(255,255,255,.3); border-radius: 6px; padding: 6px 12px; font-weight: 600; }

/* ===== Nút liên hệ nổi (máy tính) và thanh dưới (điện thoại) ===== */
.float-contact { position: fixed; right: 18px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 30; }
.float-contact a { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px -4px rgba(0,0,0,.35); font-weight: 800; font-size: 13px; }
.float-contact .fz { background: #0068FF; }
.float-contact .fp { background: var(--red); }
.float-contact svg { width: 24px; height: 24px; }
.mbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); display: grid !important; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
@media (min-width: 900px) { .mbar { display: none !important; } }
.mbar a, .mbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: none; border: 0; position: relative; cursor: pointer; }
.mbar a.on { color: var(--navy); }
.mbar .call { color: var(--red); }
.mbar .zalo { color: #0068FF; }
.mbar .count { top: 2px; right: calc(50% - 22px); }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 8px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Điện thoại và máy tính bảng ===== */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.g4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perks { grid-template-columns: repeat(2, 1fr); }
  .perk:nth-child(3) { border-left: 0; }
  .perk:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 899px) {
  body { padding-bottom: 64px; font-size: 15px; }
  .hdr-row { flex-wrap: wrap; height: auto; gap: 6px 8px; padding-top: 8px; padding-bottom: 10px; }
  .logo { flex: 1; font-size: 17px; max-width: none; min-width: 0; }
  .logo .mark { width: 34px; height: 34px; font-size: 13px; }
  .logo small { display: none; }
  .search { order: 5; flex-basis: 100%; }
  .search input { height: 42px; }
  .quote-btn { border: 0; padding: 8px; }
  .hero { grid-template-columns: 1fr; margin-top: 12px; }
  .order-card { display: none; }
  .perks { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
  .perk { flex: 0 0 78%; scroll-snap-align: start; border-top: 0 !important; }
  .perk:nth-child(3) { border-left: 1px solid var(--line); }
  .grid, .grid.g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-band { padding: 14px 12px; }
  .cat-band .grid .card:nth-child(n+5), .hot .grid .card:nth-child(n+7) { display: none; }
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .cat-tile { padding: 12px 10px; align-items: center; text-align: center; }
  .cat-tile b { font-size: 13px; }
  .listing { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .side.collapsed { display: none; }
  .pd { grid-template-columns: 1fr; padding: 14px; gap: 18px; }
  .pd-info h1 { font-size: 20px; }
  .pd-body { grid-template-columns: 1fr; }
  .box { padding: 16px; }
  .quote { grid-template-columns: 1fr; }
  .ftr-grid { grid-template-columns: 1fr 1fr; padding-top: 28px; }
  .ftr-grid > :first-child { grid-column: 1 / -1; }
  .page-title h1 { font-size: 22px; }
  .sec-head h2 { font-size: 18px; }
  .toast { bottom: 80px; }
}
@media (max-width: 420px) {
  .cat-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card-b { padding: 8px 10px 12px; }
  .card h3 { font-size: 13.5px; }
  .tag { font-size: 14px; }
  .buy .btn-row { grid-template-columns: 1fr; }
}
.filter-toggle { display: none; }
@media (max-width: 899px) { .filter-toggle { display: inline-flex; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
.muted { color: var(--muted); font-size: 14px; }

/* Liên kết trong nội dung, khoảng cách bộ lọc, dải nhắc dữ liệu mẫu */
.rich a { text-decoration: underline; }
.side ul + h2 { margin-top: 18px; }
.demo-bar { background: var(--sun); color: var(--sun-ink); font-size: 13px; font-weight: 600; text-align: center; padding: 6px 12px; }
.nf-page { padding-top: 40px; }
