/* ==========================================================================
   HUG In Tem Rẻ — giao diện trang bán hàng
   Kiểu sàn thương mại, chữ hệ thống (Segoe UI), nền sáng, chuyển động nhẹ.
   Mục lục:
     1. Biến màu, chữ, khoảng cách      7. Trang chủ
     2. Nền tảng                        8. Danh sách và chi tiết sản phẩm
     3. Nút, nhãn, ô nhập               9. Giỏ hàng, thanh toán, đơn hàng
     4. Header 3 tầng, ngăn kéo        10. Blog và bài viết
     5. Footer, thanh dưới điện thoại  11. Bài viết cũ (markup gốc)
     6. Khối dùng chung, thẻ sản phẩm  12. Chuyển động và responsive
   ========================================================================== */

/* 1. Biến ---------------------------------------------------------------- */
:root {
  --red: #d6281f;
  --red-deep: #b01c14;
  --red-soft: #fdecea;
  --ink: #1a1a1a;
  --ink-2: #333a45;
  --muted: #5f6878;
  --paper: #f3f5fa;        /* nền trang */
  --paper-2: #edf0f6;      /* nền phụ, ô xám nhạt */
  --card: #ffffff;
  --line: #e8ebf2;
  --line-strong: #d5dae4;
  --sun: #ffb800;
  --ok: #12855a;
  --ok-soft: #e3f6ee;
  --warn-soft: #fff4d6;
  --zalo: #0068ff;

  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font-body);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(20, 30, 60, .04), 0 6px 16px -10px rgba(20, 30, 60, .08);
  --shadow: 0 14px 34px -16px rgba(20, 30, 60, .2);
  --shadow-lg: 0 30px 60px -28px rgba(20, 30, 60, .3);

  --wrap: 1240px;
  --gutter: clamp(12px, 3vw, 24px);
  --header-h: 124px;       /* chiều cao phần header dính trên màn hình lớn */
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.22, .8, .24, 1);
}

/* 2. Nền tảng ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; display: block; }
img { height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; letter-spacing: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--red); color: #fff; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); font-weight: 400; }
.accent { color: var(--red); }
.icon { flex: none; }

/* 3. Nút, nhãn, ô nhập --------------------------------------------------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: #fff; --btn-line: transparent;
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--btn-line);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: .93rem; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, box-shadow .25s, border-color .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .icon { transition: transform .25s var(--ease); }
.btn:hover .icon:last-child { transform: translateX(3px); }
.btn-primary { --btn-bg: var(--red); box-shadow: 0 8px 18px -12px var(--red); }
.btn-primary:hover { --btn-bg: var(--red-deep); box-shadow: 0 10px 22px -10px var(--red); }
.btn-ink { --btn-bg: var(--ink); }
.btn-soft { --btn-bg: var(--red-soft); --btn-fg: var(--red); --btn-line: #f5b9b4; }
.btn-soft:hover { --btn-bg: #fbdcd8; }
.btn-ghost { --btn-bg: #fff; --btn-fg: var(--ink); --btn-line: var(--line-strong); }
.btn-ghost:hover { --btn-line: var(--ink); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn-outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-line: rgba(255, 255, 255, .5); }
.btn-outline-light:hover { --btn-bg: rgba(255, 255, 255, .12); --btn-line: #fff; }
.btn-zalo { --btn-bg: var(--zalo); margin-top: 16px; }
.btn-lg { min-height: 50px; padding: 0 26px; font-size: 1rem; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; position: relative; transition: background-color .2s; }
.icon-btn:hover { background: var(--paper-2); }
.link-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .85rem; font-weight: 500; transition: color .2s; }
.link-btn:hover { color: var(--red); }
.text-link, .more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--red); transition: gap .25s var(--ease); white-space: nowrap; }
.text-link:hover, .more-link:hover { gap: 10px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(16px, 2.4vw, 24px); box-shadow: var(--shadow-sm); }
.card-soft { background: var(--paper-2); border-color: transparent; box-shadow: none; }
.card h2 { font-size: 1.08rem; margin-bottom: 14px; }

.kicker, .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.kicker::before, .eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.kicker-light { color: var(--sun); }

.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; font-size: .72rem; font-weight: 700; }
.badge-soft, .badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-wait { background: var(--warn-soft); color: #8a5a00; }
.flag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1; }
.flag-sale { background: var(--red); color: #fff; }
.flag-hot { background: var(--sun); color: var(--ink); }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: .86rem; font-weight: 600; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 3px rgba(214, 40, 31, .12); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field-error { display: block; margin-top: 5px; color: var(--red); font-size: .82rem; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { color: var(--muted); font-size: .85rem; }
.form-hint a { color: var(--red); font-weight: 500; }
.form-hint.is-center { text-align: center; margin-top: 12px; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-status { margin-top: 12px; min-height: 1.4em; font-size: .9rem; font-weight: 500; text-align: center; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--red); }

.notice { margin: 14px 0; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500; font-size: .93rem; border: 1px solid transparent; }
.notice-success { background: var(--ok-soft); color: var(--ok); border-color: #b9e6d2; }
.notice-error { background: var(--red-soft); color: var(--red-deep); border-color: #f5b9b4; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; transition: background-color .2s; }
.qty button:hover { background: var(--paper-2); }
.qty input { width: 44px; height: 34px; border: 0; border-inline: 1px solid var(--line); background: none; text-align: center; font-weight: 600; -moz-appearance: textfield; appearance: textfield; padding: 0; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty input:focus { outline: 0; }
.qty-lg button { width: 42px; height: 44px; }
.qty-lg input { width: 56px; height: 44px; font-size: 1rem; }

.empty-state { display: grid; justify-items: center; gap: 14px; padding: 56px 20px; text-align: center; color: var(--muted); background: #fff; border-radius: var(--radius-lg); }
.empty-state.is-compact { padding: 40px 12px; background: none; }
.empty-icon { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--paper-2); color: var(--ink-2); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; display: flex; align-items: center; gap: 8px; transform: translate(-50%, 24px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius); font-weight: 500; font-size: .93rem; box-shadow: var(--shadow-lg); transition: transform .4s var(--spring), opacity .25s; max-width: calc(100vw - 32px); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex: none; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* 4. Header 3 tầng ------------------------------------------------------- */
.topbar { background: var(--paper); color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--line); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.topbar-note { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot-live { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
.topbar-links { display: flex; gap: 20px; flex: none; }
.topbar-links a { display: inline-flex; align-items: center; gap: 6px; transition: color .2s; }
.topbar-links a:hover { color: var(--red); }

.site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 1px 0 var(--line); transition: box-shadow .3s; }
.site-header.is-stuck { box-shadow: 0 10px 30px -18px rgba(22, 24, 29, .35); }
.header-main { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); height: 76px; transition: height .3s var(--ease); }
.site-header.is-stuck .header-main { height: 64px; }
.menu-btn { display: none; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; transition: transform .4s var(--spring); }
.brand:hover img { transform: scale(1.04); }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.brand-light .brand-text small { color: rgba(255, 255, 255, .6); }

.search-box { position: relative; flex: 1; display: flex; height: 46px; padding: 4px; border: 1.5px solid var(--line-strong); border-radius: 999px; background: var(--paper); transition: border-color .25s, background-color .25s, box-shadow .25s; }
.search-box:focus-within { border-color: var(--red); background: #fff; box-shadow: 0 0 0 4px rgba(214, 40, 31, .1); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 16px; background: none; }
.search-box > button { display: inline-flex; align-items: center; gap: 8px; padding: 0 20px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; transition: background-color .2s; }
.search-box > button:hover { background: var(--red-deep); }

.header-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.tool { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: var(--radius); text-align: left; transition: background-color .2s; }
.tool:hover { background: var(--paper); }
.tool-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--red-soft); color: var(--red); transition: transform .3s var(--spring); }
.tool:hover .tool-icon { transform: scale(1.08); }
.tool-text { display: grid; line-height: 1.25; }
.tool-text small { color: var(--muted); font-size: .74rem; }
.tool-text strong { font-size: .95rem; white-space: nowrap; }
.cart-count { position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; background: var(--red); color: #fff; border: 2px solid #fff; border-radius: 999px; font-size: .68rem; font-weight: 700; transition: transform .3s var(--spring); }
.cart-count.is-empty { transform: scale(0); }
.cart-count.is-bump { animation: bump .55s var(--spring); }

.nav-bar { border-top: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 8px; height: 48px; }
.cat-menu { position: relative; }
/* Cầu nối vô hình để rê chuột từ nút xuống bảng danh mục không bị đóng */
.cat-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.cat-toggle { display: flex; align-items: center; gap: 10px; height: 38px; width: 248px; padding: 0 16px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 600; font-size: .93rem; }
.cat-toggle .icon:last-child { margin-left: auto; transition: transform .3s var(--ease); }
.cat-menu:hover .cat-toggle .icon:last-child, .cat-menu:focus-within .cat-toggle .icon:last-child { transform: rotate(180deg); }
.cat-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; width: 300px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .3s var(--ease), visibility .2s; }
.cat-menu:hover .cat-panel, .cat-menu:focus-within .cat-panel { opacity: 1; visibility: visible; transform: none; }
.cat-panel a, .stage-cats a { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 500; transition: background-color .15s, color .15s; }
.cat-panel a > .icon, .stage-cats a > .icon { margin-left: auto; color: var(--muted); opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .25s var(--ease); }
.cat-panel a:hover, .stage-cats a:hover { background: var(--red-soft); color: var(--red); }
.cat-panel a:hover > .icon, .stage-cats a:hover > .icon { opacity: 1; transform: none; color: var(--red); }
.cat-thumb { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; overflow: hidden; background: var(--paper-2); color: var(--muted); }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-name { display: grid; line-height: 1.3; }
.cat-name small { color: var(--muted); font-size: .76rem; font-weight: 400; }

.main-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.main-nav a { display: flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; white-space: nowrap; transition: color .2s, background-color .2s; }
.main-nav a:hover { background: var(--paper-2); }
.main-nav a.is-current { background: var(--red-soft); color: var(--red); }
.nav-zalo { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: #e8f1ff; color: var(--zalo); font-weight: 600; font-size: .86rem; white-space: nowrap; transition: background-color .2s; }
.nav-zalo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.nav-zalo:hover { background: #d8e7ff; }

/* Ngăn kéo (menu điện thoại, giỏ hàng) */
.drawer { position: fixed; inset: 0; z-index: 150; visibility: hidden; transition: visibility 0s .35s; }
.drawer.is-open { visibility: visible; transition-delay: 0s; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(22, 24, 29, .5); opacity: 0; transition: opacity .3s; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; bottom: 0; width: min(420px, 92vw); display: flex; flex-direction: column; background: #fff; box-shadow: var(--shadow-lg); transition: transform .4s var(--ease); }
.drawer-right .drawer-panel { right: 0; transform: translateX(100%); }
.drawer-left .drawer-panel { left: 0; transform: translateX(-100%); padding-bottom: 20px; }
.drawer.is-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--line); font-size: 1.08rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 6px 20px; overscroll-behavior: contain; }
.drawer-foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--paper); }
.drawer-total { display: flex; justify-content: space-between; align-items: baseline; }
.drawer-total strong { font-size: 1.3rem; font-weight: 800; color: var(--red); }
.drawer-nav { flex: 1; overflow-y: auto; padding: 6px 20px; display: grid; align-content: start; }
.drawer-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.drawer-nav a.is-sub { font-weight: 500; font-size: .93rem; color: var(--ink-2); }
.drawer-label { margin-top: 18px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.drawer-left .btn-block { width: auto; margin: 12px 20px 0; }
body.is-locked { overflow: hidden; }

/* 5. Footer -------------------------------------------------------------- */
.site-footer { margin-top: clamp(32px, 5vw, 56px); background: #20242c; color: #b8bec9; }
.footer-perks { background: #fff; color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.perk-row { display: grid; grid-template-columns: repeat(4, 1fr); }
.perk { display: flex; align-items: center; gap: 12px; padding: 20px 16px; }
.perk + .perk { border-left: 1px solid var(--line); }
.perk .icon { color: var(--red); transition: transform .4s var(--spring); }
.perk:hover .icon { transform: translateY(-3px) scale(1.1); }
.perk strong { display: block; font-size: .92rem; line-height: 1.3; }
.perk small { color: var(--muted); font-size: .8rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: clamp(24px, 4vw, 56px); padding-block: 44px 36px; }
.footer-about p { margin: 16px 0; font-size: .92rem; max-width: 40ch; }
.footer-contact { display: grid; gap: 10px; font-size: .92rem; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { margin-top: 3px; color: var(--sun); }
.footer-col h3 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: 10px; font-size: .92rem; }
.footer-col ul a { display: inline-block; transition: color .2s, transform .25s var(--ease); }
.footer-col ul a:hover, .footer-contact a:hover { color: #fff; transform: translateX(4px); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .82rem; color: #8b93a1; }
.footer-bottom-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-block: 16px; }
.pay-badges { display: flex; gap: 8px; }
.pay-badges span { padding: 3px 10px; border-radius: 4px; background: rgba(255, 255, 255, .08); color: #d5dae3; font-weight: 600; font-size: .76rem; }
.dmca-badge { display: inline-flex; line-height: 0; }
.dmca-badge img { height: 24px; width: auto; }

.quick-contact { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: grid; gap: 10px; justify-items: center; }
.quick-contact a, .quick-top { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .78rem; box-shadow: var(--shadow); transition: transform .3s var(--spring), opacity .3s; }
.quick-contact a:hover, .quick-top:hover { transform: translateY(-3px) scale(1.06); }
.quick-zalo { background: var(--zalo); }
.quick-call { background: var(--red); position: relative; }
.quick-top { width: 42px; height: 42px; background: #fff; color: var(--ink); border: 1px solid var(--line); opacity: 0; pointer-events: none; transform: translateY(10px); }
.quick-top .icon { rotate: 180deg; }
.quick-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.tabbar { display: none; }

/* 6. Khối dùng chung ----------------------------------------------------- */
.block { padding-top: clamp(14px, 2vw, 20px); }
.block-head { text-align: center; margin: clamp(20px, 3vw, 36px) 0 clamp(18px, 2.4vw, 28px); }
.block-head h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-top: 8px; }
.block-head p { margin-top: 8px; color: var(--muted); }
.section { padding: clamp(28px, 4vw, 48px) 0; }
.section-tint { background: transparent; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin-top: 6px; }

.panel { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 0 clamp(14px, 2vw, 20px); border-bottom: 1px solid var(--line); }
.panel-title { position: relative; font-size: 1.12rem; padding-left: 14px; }
.panel-title::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 2px; width: 4px; border-radius: 4px; background: var(--red); }
.panel-note { color: var(--muted); font-size: .86rem; }
.panel-dark { background: var(--ink); color: #fff; }
.panel-dark .panel-head { border-color: rgba(255, 255, 255, .1); }
.panel-dark .panel-note { color: #9aa2b1; }

.tab-list { display: flex; align-self: stretch; gap: 4px; }
.tab { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 56px; font-weight: 600; color: var(--muted); transition: color .2s; white-space: nowrap; }
.tab::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--red); transform: scaleX(0); transition: transform .35s var(--ease); }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--red); }
.tab.is-active::after { transform: scaleX(1); }
.tab-panel { padding: clamp(16px, 2.4vw, 24px); }
.tab-panel.is-active, .rail.is-active { animation: panel-in .45s var(--ease); }

.rail-nav, .slider-arrows { display: flex; gap: 6px; }
.rail-nav button, .slider-arrows button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); transition: background-color .2s, color .2s, border-color .2s, transform .2s; }
.rail-nav button:first-child .icon, .slider-arrows button:first-child .icon { rotate: 180deg; }
.rail-nav button:hover, .slider-arrows button:hover { background: var(--red); border-color: var(--red); color: #fff; transform: scale(1.08); }
.rail-nav button:disabled { opacity: .35; pointer-events: none; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 12px) / 5); gap: 12px; padding: clamp(12px, 2vw, 18px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* Thẻ sản phẩm */
.p-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.p-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.p-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.p-media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; background: linear-gradient(100deg, var(--paper-2) 30%, #f8f9fb 50%, var(--paper-2) 70%) 0 0 / 200% 100%; animation: shimmer 1.6s linear infinite; }
.p-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.p-card:hover .p-media img { transform: scale(1.04); }
.p-flags { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.p-body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.p-cat { font-size: .72rem; color: var(--muted); }
.p-name { font-size: .92rem; font-weight: 500; line-height: 1.4; letter-spacing: 0; min-height: 2.8em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-name a { transition: color .2s; }
.p-name a:hover { color: var(--red); }
.p-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.p-price strong { font-size: 1.1rem; font-weight: 700; color: var(--red); }
.p-price small { font-size: .76rem; color: var(--muted); }
.p-price del { color: var(--muted); font-size: .82rem; }
.p-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.p-sold { font-size: .76rem; color: var(--muted); }
.p-action { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--red-soft); color: var(--red); transition: background-color .2s, color .2s, transform .3s var(--spring); }
.p-action:hover { background: var(--red); color: #fff; transform: scale(1.05); }
.p-action.is-done { background: var(--ok); color: #fff; }
.p-action[disabled] { opacity: .6; }

/* Thẻ bài viết */
.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-thumb { aspect-ratio: 16 / 10; background: var(--paper-2); overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.06); }
.post-thumb-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--line-strong); }
.post-body { padding: 14px 16px 18px; display: grid; gap: 8px; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted); }
.post-cat { display: inline-block; padding: 2px 8px; border-radius: 4px; background: var(--red-soft); color: var(--red-deep); font-size: .72rem; font-weight: 700; }
.post-body h3 { font-size: 1rem; font-weight: 600; line-height: 1.4; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-body h3 a:hover { color: var(--red); }
.post-body p { color: var(--muted); font-size: .88rem; }

.page-head { padding: clamp(16px, 2.4vw, 24px) 0 clamp(12px, 2vw, 18px); }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.page-lead { margin-top: 10px; max-width: 64ch; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 14px 0; font-size: .84rem; color: var(--muted); }
.page-head .crumbs { padding: 0 0 10px; }
.crumbs .icon { rotate: -90deg; }
.crumbs a:hover { color: var(--red); }
.crumbs span:last-child { color: var(--ink); font-weight: 500; }

.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; }
.page-num, .page-step { min-width: 40px; height: 40px; padding: 0 12px; display: grid; place-items: center; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; background: #fff; border: 1px solid var(--line); transition: border-color .2s, color .2s; }
a.page-num:hover, a.page-step:hover { border-color: var(--red); color: var(--red); }
.page-num.is-current { background: var(--red); border-color: var(--red); color: #fff; }
.page-gap { color: var(--muted); padding: 0 4px; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 600; font-size: .86rem; background: #fff; transition: border-color .2s, background-color .2s, color .2s; }
.chip small { color: var(--muted); font-weight: 500; }
.chip:hover { border-color: var(--red); color: var(--red); }
.chip.is-current { background: var(--red); border-color: var(--red); color: #fff; }
.chip.is-current small { color: rgba(255, 255, 255, .75); }
.result-count { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.result-count strong { color: var(--ink); }
.result-count a { color: var(--red); font-weight: 600; }

.error-page { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(60px, 12vw, 120px) 0; }
.error-code { font: 800 clamp(5rem, 16vw, 9rem)/.9 var(--font-body); color: var(--red); opacity: .16; }
.error-page p { color: var(--muted); max-width: 46ch; }
.error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.narrow-page { max-width: 500px; padding: clamp(32px, 6vw, 72px) 0; }
.lookup-card h1 { font-size: 1.6rem; margin: 10px 0 8px; }
.lookup-card p { color: var(--muted); margin-bottom: 20px; }

/* Trang chính sách */
.policy-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.shop-side { position: sticky; top: calc(var(--header-h) + 12px); background: #fff; border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.side-title { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.side-list { display: grid; gap: 2px; }
.side-list a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); font-weight: 500; transition: background-color .2s, color .2s; }
.side-list a:hover { background: var(--red-soft); color: var(--red); }
.side-list a.is-current { background: var(--red); color: #fff; }

/* 7. Trang chủ ----------------------------------------------------------- */
.stage { padding-top: 14px; }
.stage-grid { display: grid; grid-template-columns: 248px minmax(0, 1fr) 236px; gap: 12px; height: 420px; }
.stage-cats { background: #fff; border-radius: var(--radius-lg); padding: 12px 8px; box-shadow: var(--shadow-sm); overflow-y: auto; }
.stage-cats h2 { display: flex; align-items: center; gap: 8px; padding: 4px 10px 10px; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stage-cats ul { display: grid; gap: 2px; }
.stage-cats a { font-size: .92rem; }
.stage-cats a.is-all { color: var(--red); font-weight: 600; }

.slider { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #fff; isolation: isolate; box-shadow: var(--shadow-sm); }
.slides { position: relative; height: 100%; }
.slide { position: absolute; inset: 0; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 12px; padding: clamp(20px, 3.4vw, 44px); opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility 0s .9s; }
.slide.is-active { opacity: 1; visibility: visible; transition-delay: 0s; z-index: 1; }
.slide-rose { background: linear-gradient(115deg, #fff 0%, #fff3f1 45%, #ffd9d3 100%); }
.slide-sky { background: linear-gradient(115deg, #fff 0%, #f0f6ff 45%, #d5e6ff 100%); }
.slide-amber { background: linear-gradient(115deg, #fff 0%, #fff8e8 45%, #ffe4ad 100%); }
.slide-copy { position: relative; display: grid; justify-items: start; gap: 12px; }
.slide-kicker { padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--red); box-shadow: var(--shadow-sm); font-size: .78rem; font-weight: 600; }
.slide-title { font-size: clamp(1.7rem, 3.4vw, 2.75rem); font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
.slide-copy p { max-width: 40ch; color: var(--ink-2); font-size: 1rem; }
.slide-copy .btn { margin-top: 6px; }
.slide-art { position: relative; height: 100%; display: grid; place-items: center; }
.slide-art img { position: relative; width: min(100%, 290px); aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px; rotate: 3deg; box-shadow: 0 30px 50px -26px rgba(20, 30, 60, .45); border: 6px solid #fff; }
.slide-ring { position: absolute; width: 112%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 68%); }
.slide-chip { position: absolute; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); color: var(--ink); font-size: .78rem; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.slide-chip .icon { color: var(--ok); }
.chip-a { left: -6%; top: 16%; }
.chip-b { right: -2%; bottom: 14%; }
/* Nội dung banner đang hiện nổi lên nhẹ, lần lượt từng dòng */
.slide.is-active .slide-copy > * { animation: rise .9s var(--ease) both; }
.slide.is-active .slide-copy > :nth-child(2) { animation-delay: .1s; }
.slide.is-active .slide-copy > :nth-child(3) { animation-delay: .2s; }
.slide.is-active .slide-copy > :nth-child(4) { animation-delay: .3s; }
.slide.is-active .slide-art img { animation: art-in 1.1s var(--ease) both, drift 9s ease-in-out 1.2s infinite; }
.slide.is-active .slide-chip { animation: rise .9s var(--ease) .5s both, bob 7s ease-in-out 1.5s infinite; }
.slide.is-active .chip-b { animation-delay: .65s, 2s; }
.slider-ui { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 14px clamp(20px, 3.4vw, 44px); }
.slider-dots { display: flex; gap: 6px; }
.slider-dots button { width: 22px; height: 16px; display: grid; align-items: center; transition: width .5s var(--ease); }
.slider-dots button[aria-selected="true"] { width: 46px; }
.slider-dots i { display: block; height: 4px; border-radius: 4px; background: rgba(26, 26, 26, .14); overflow: hidden; position: relative; }
.slider-dots button[aria-selected="true"] i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform-origin: left; animation: fill var(--slide-time, 6s) linear both; }
.slider.is-paused .slider-dots i::after { animation-play-state: paused; }
.slider-arrows button { background: #fff; border-color: transparent; color: var(--ink); box-shadow: var(--shadow-sm); }

.stage-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.tile { position: relative; display: grid; align-content: start; gap: 6px; padding: 18px; border-radius: var(--radius-lg); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tile strong { font-size: 1.02rem; line-height: 1.3; }
.tile small { font-size: .8rem; max-width: 20ch; }
.tile-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; margin-bottom: 4px; }
.tile-pay { background: linear-gradient(150deg, #f0f6ff, #d9e8ff); }
.tile-pay small { color: #51607a; }
.tile-pay .tile-icon { background: #fff; color: var(--zalo); }
.tile-qr { position: absolute; right: -14px; bottom: -14px; width: 84px; height: 84px; border-radius: 12px; rotate: -10deg; opacity: .35; background:
    conic-gradient(var(--zalo) 25%, transparent 0 50%, var(--zalo) 0 75%, transparent 0) 0 0 / 14px 14px,
    conic-gradient(transparent 25%, var(--zalo) 0 50%, transparent 0 75%, var(--zalo) 0) 7px 0 / 28px 28px; transition: rotate .5s var(--ease), opacity .3s; }
.tile-pay:hover .tile-qr { rotate: 0deg; opacity: .55; }
.tile-track { background: #fff; box-shadow: var(--shadow-sm); }
.tile-track small { color: var(--muted); }
.tile-track .tile-icon { background: var(--red-soft); color: var(--red); }
.tile-go { position: absolute; right: 14px; bottom: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper-2); transition: background-color .25s, color .25s, transform .35s var(--ease); }
.tile-track:hover .tile-go { background: var(--red); color: #fff; transform: rotate(-35deg); }

.cat-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 18px 10px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.cat-bubble { display: grid; justify-items: center; gap: 4px; padding: 8px 6px; border-radius: var(--radius); text-align: center; transition: background-color .2s; }
.cat-bubble:hover { background: var(--paper); }
.cat-bubble-img { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; overflow: hidden; background: var(--paper-2); border: 2px solid #fff; outline: 2px solid var(--line); margin-bottom: 6px; transition: outline-color .25s, transform .4s var(--spring); }
.cat-bubble-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-bubble:hover .cat-bubble-img { outline-color: var(--red); transform: translateY(-4px) scale(1.05); }
.cat-bubble strong { font-size: .88rem; font-weight: 600; line-height: 1.3; }
.cat-bubble small { font-size: .76rem; color: var(--muted); }
.cat-bubble.is-quote .cat-bubble-img { background: var(--red-soft); color: var(--red); }

.numbers { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.numbers li { padding: 22px 16px; text-align: center; }
.numbers li + li { border-left: 1px solid var(--line); }
.numbers p { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.15; color: var(--red); }
.numbers p span { font-size: .5em; font-weight: 600; color: var(--ink); }
.numbers small { font-size: .86rem; color: var(--muted); }

.cat-block { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 12px; padding: clamp(12px, 2vw, 18px); }
.cat-block.is-flipped { grid-template-columns: minmax(0, 1fr) 250px; }
.cat-block.is-flipped .cat-banner { order: 2; }
.cat-banner { position: relative; display: block; border-radius: var(--radius); overflow: hidden; background: var(--ink); min-height: 260px; }
.cat-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.cat-banner:hover img { transform: scale(1.08); }
.cat-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(13, 15, 19, .05) 30%, rgba(13, 15, 19, .88) 100%); }
.cat-banner-text { position: absolute; inset: auto 0 0 0; z-index: 1; display: grid; gap: 6px; padding: 16px; color: #fff; }
.cat-banner-text strong { font-size: 1.15rem; line-height: 1.25; }
.cat-banner-text small { font-size: .82rem; color: rgba(255, 255, 255, .82); }
.cat-banner-text em { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-style: normal; font-weight: 600; font-size: .86rem; color: var(--sun); transition: gap .25s var(--ease); }
.cat-banner:hover em { gap: 12px; }

.quote { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(20px, 4vw, 44px); border-radius: var(--radius-lg); background: linear-gradient(115deg, #fff 0%, #fff5f3 55%, #ffe1dc 100%); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.quote-copy { position: relative; }
.quote-copy h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); margin: 10px 0 12px; }
.quote-copy > p { color: var(--ink-2); }
.tick-list { display: grid; gap: 10px; margin: 18px 0; }
.tick-list li { display: flex; gap: 10px; align-items: flex-start; }
.tick-list .icon { margin-top: 3px; color: var(--ok); }
.quote-direct { display: flex; flex-wrap: wrap; gap: 10px; }
.quote-form { position: relative; background: #fff; border-radius: var(--radius-lg); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.quote-form h3 { font-size: 1.2rem; margin-bottom: 16px; }

.quote h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: 10px 0 12px; }
.quote-form h2 { font-size: 1.2rem; margin-bottom: 16px; }
.quote-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: clamp(20px, 3.4vw, 36px); border-radius: var(--radius-lg); background: linear-gradient(115deg, #fff 0%, #fff5f3 55%, #ffe1dc 100%); box-shadow: var(--shadow-sm); }
.quote-banner h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 8px 0; }
.quote-banner p { color: var(--ink-2); max-width: 62ch; }
.quote-banner-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Chất liệu in */
.materials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.material { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; align-items: start; padding: 18px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.material:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.material-swatch { grid-row: span 2; width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--line); box-shadow: inset 0 0 0 4px #fff; }
.material h3 { font-size: 1.02rem; }
.material p { color: var(--muted); font-size: .88rem; margin-top: 4px; }
.tone-matte .material-swatch { background: #f1ede6; }
.tone-gloss .material-swatch { background: linear-gradient(135deg, #fff 0%, #ffd6d1 40%, #fff 55%, #ffc2bb 100%); }
.tone-white .material-swatch { background: #fff; }
.tone-clear .material-swatch { background: repeating-conic-gradient(#eef1f6 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.tone-pvc .material-swatch { background: linear-gradient(135deg, #dff1ff, #b9dcff); }
.tone-kraft .material-swatch { background: #c9a67a; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: step; }
.flow li { position: relative; background: #fff; border-radius: var(--radius-lg); padding: 22px 18px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.flow li:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* Đường nối giữa các bước, tự vẽ ra khi cuộn tới */
.flow li + li::before { content: ""; position: absolute; top: 49px; right: calc(100% - 4px); width: 20px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease) calc(var(--i, 0) * 120ms + .3s); }
.flow li.is-in::before { transform: scaleX(1); }
.flow-icon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--red-soft); color: var(--red); margin-bottom: 14px; transition: background-color .25s, color .25s, transform .4s var(--spring); }
.flow li:hover .flow-icon { background: var(--red); color: #fff; }
.flow-icon b { position: absolute; top: -8px; right: -8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .74rem; border: 2px solid #fff; }
.flow h3 { font-size: 1.02rem; margin-bottom: 6px; }
.flow p { color: var(--muted); font-size: .88rem; }

.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: clamp(12px, 2vw, 18px); }
.clip { position: relative; aspect-ratio: 9 / 14; border-radius: var(--radius); overflow: hidden; background: #000; }
.clip video { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .3s; opacity: .85; }
.clip:hover video { transform: scale(1.05); opacity: 1; }
.clip-play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; translate: -50% -50%; border-radius: 50%; background: rgba(255, 255, 255, .92); transition: transform .35s var(--spring), opacity .3s; }
.clip-play::before { content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%; border-left: 16px solid var(--red); border-block: 10px solid transparent; }
.clip:hover .clip-play { transform: scale(1.12); }
.clip.is-playing .clip-play { opacity: 0; transform: scale(.6); }
.clip.is-playing video { opacity: 1; }

.news { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(14px, 2.4vw, 28px); padding: clamp(12px, 2vw, 18px); }
.news-lead { display: grid; align-content: start; gap: 8px; }
.news-img { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); margin-bottom: 4px; }
.news-img img, .news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.news-lead:hover img, .news-list a:hover img { transform: scale(1.06); }
.news-tag { justify-self: start; padding: 2px 8px; border-radius: 4px; background: var(--red-soft); color: var(--red-deep); font-size: .72rem; font-weight: 700; }
.news-lead strong { font-size: 1.2rem; line-height: 1.35; transition: color .2s; }
.news-lead:hover strong, .news-list a:hover strong { color: var(--red); }
.news-lead small { color: var(--muted); font-size: .9rem; }
.news-list { display: grid; align-content: start; }
.news-list li + li { border-top: 1px solid var(--line); }
.news-list a { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; }
.news-list li:first-child a { padding-top: 0; }
.news-thumb { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); }
.news-text { display: grid; gap: 4px; }
.news-text em { font-style: normal; font-size: .76rem; color: var(--muted); }
.news-text strong { font-size: .95rem; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }

.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.faq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s, box-shadow .25s; }
.faq[open] { border-color: var(--red); box-shadow: var(--shadow-sm); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--paper-2); transition: background-color .25s, transform .35s var(--ease); }
.faq-mark::before, .faq-mark::after { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.8px; background: currentColor; translate: -50% -50%; transition: rotate .35s var(--ease); }
.faq-mark::after { rotate: 90deg; }
.faq[open] .faq-mark { background: var(--red); color: #fff; transform: rotate(180deg); }
.faq[open] .faq-mark::after { rotate: 0deg; }
.faq-answer { padding: 0 18px 16px; color: var(--ink-2); animation: panel-in .35s var(--ease); }

/* 8. Danh sách và chi tiết sản phẩm -------------------------------------- */
.shop { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 12px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 12px); display: grid; gap: 12px; }
.filter-box { background: #fff; border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
.filter-box h2 { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.filter-list { display: grid; gap: 2px; }
.filter-list a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 500; font-size: .92rem; transition: background-color .2s, color .2s; }
.filter-list a small { margin-left: auto; color: var(--muted); }
.filter-list a:hover { background: var(--red-soft); color: var(--red); }
.filter-list a.is-current { background: var(--red-soft); color: var(--red); font-weight: 600; }
.check-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); transition: border-color .2s, box-shadow .2s; }
.filter-list a.is-current .check-dot { border-color: var(--red); box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px var(--red); }
.filter-help { padding: 16px; border-radius: var(--radius-lg); background: linear-gradient(150deg, #fff5f3, #ffe1dc); display: grid; gap: 8px; font-size: .9rem; }
.filter-help p { color: var(--ink-2); }
.shop-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #fff; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.shop-head h1 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.shop-head p { margin-top: 4px; color: var(--muted); font-size: .9rem; max-width: 70ch; }
.shop-count { flex: none; color: var(--muted); font-size: .9rem; }
.shop-count strong { color: var(--ink); }
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 20px; background: #fafbfc; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.sort-label { color: var(--muted); font-size: .86rem; }
.sort-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sort-tabs a { padding: 7px 14px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); font-weight: 500; font-size: .86rem; transition: border-color .2s, color .2s, background-color .2s; }
.sort-tabs a:hover { border-color: var(--red); color: var(--red); }
.sort-tabs a.is-current { background: var(--red); border-color: var(--red); color: #fff; }
.sort-search { margin-left: auto; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 36px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--muted); }
.sort-search input { border: 0; outline: 0; background: none; width: 170px; color: var(--ink); }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .88rem; color: var(--muted); }
.pill-x { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--red); color: var(--red); font-weight: 500; }

.pdp { display: grid; gap: 12px; }
.pdp-card { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 270px; gap: clamp(16px, 2.4vw, 28px); padding: clamp(14px, 2vw, 22px); background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); align-items: start; }
.pdp-media { display: flex; gap: 10px; }
.pdp-thumbs { display: grid; align-content: start; gap: 8px; flex: none; }
.pdp-thumbs button { width: 64px; aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid var(--line); opacity: .7; transition: opacity .2s, border-color .2s; }
.pdp-thumbs button:hover, .pdp-thumbs button.is-current { opacity: 1; border-color: var(--red); }
.pdp-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-stage { position: relative; flex: 1; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--paper-2); cursor: zoom-in; }
.pdp-stage img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s, transform .5s var(--ease); transform-origin: var(--zx, 50%) var(--zy, 50%); }
.pdp-stage.is-zoomed img { transform: scale(1.9); transition: opacity .25s, transform .15s linear; }
.pdp-stage img.is-swapping { opacity: 0; }
.pdp-stage .flag { position: absolute; top: 10px; left: 10px; }
.pdp-info h1 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 700; line-height: 1.3; }
.pdp-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 14px; font-size: .84rem; color: var(--muted); }
.pdp-meta a { color: var(--red); font-weight: 500; }
.pdp-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 14px 16px; background: linear-gradient(90deg, var(--red-soft), #fff8f7); border-radius: var(--radius); }
.pdp-price strong { font-size: clamp(1.6rem, 3.2vw, 2rem); font-weight: 800; line-height: 1; color: var(--red); }
.pdp-price del { color: var(--muted); }
.pdp-unit { color: var(--muted); font-size: .88rem; }
.pdp-short { margin-top: 12px; color: var(--ink-2); }
.opt-group { margin-top: 16px; }
.opt-group legend, .opt-label { display: block; font-weight: 600; font-size: .86rem; margin-bottom: 8px; color: var(--ink-2); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; }
.opt span { position: relative; display: grid; gap: 1px; min-width: 112px; padding: 9px 14px; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .2s, background-color .2s, transform .25s var(--spring); }
.opt small { color: var(--muted); font-size: .82rem; }
.opt:hover span { border-color: var(--red); }
.opt input:checked + span { border-color: var(--red); background: var(--red-soft); transform: translateY(-2px); }
.opt input:checked + span::after { content: ""; position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3'%3E%3Cpath d='m7 13 3 3 7-8'/%3E%3C/svg%3E") center / 12px no-repeat; border-radius: 6px 0 5px 0; }
.opt input:checked + span small { color: var(--red-deep); font-weight: 600; }
.opt input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.buy-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.pdp-side { display: grid; gap: 12px; }
.assure { display: grid; gap: 2px; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; }
.assure li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; }
.assure li + li { border-top: 1px dashed var(--line); }
.assure .icon { color: var(--red); margin-top: 2px; }
.assure strong { display: block; font-size: .9rem; line-height: 1.3; }
.assure small { color: var(--muted); font-size: .8rem; }
.ask-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: var(--radius); background: #e8f1ff; color: #0b3d91; transition: background-color .2s, transform .25s var(--ease); }
.ask-box:hover { background: #d8e7ff; transform: translateX(3px); }
.ask-box span { display: grid; }
.ask-box small { font-size: .82rem; opacity: .8; }
.pdp-tabs .prose { max-width: 80ch; }
.sticky-buy { display: none; }

/* Nội dung soạn bằng trình soạn thảo */
.prose { font-size: 1rem; line-height: 1.75; color: var(--ink-2); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.35rem; color: var(--ink); margin-top: 1.7em; }
.prose h3 { font-size: 1.12rem; color: var(--ink); margin-top: 1.4em; }
.prose a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: var(--radius); margin-inline: auto; }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-left: 4px solid var(--red); background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--paper); color: var(--ink); }
.prose figcaption { margin-top: 8px; text-align: center; font-size: .86rem; color: var(--muted); }

/* 9. Giỏ hàng, thanh toán, đơn hàng -------------------------------------- */
.cart-page, .checkout-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: clamp(20px, 3vw, 36px); align-items: start; }
.cart-page.is-empty { grid-template-columns: 1fr; }
.cart-lines { display: grid; }
.cart-line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); transition: opacity .3s, transform .35s var(--ease); }
.cart-line:last-child { border-bottom: 0; }
.cart-line.is-leaving { opacity: 0; transform: translateX(24px); }
.cart-line-img img { width: 88px; height: 88px; object-fit: cover; border-radius: 12px; background: var(--paper-2); }
.cart-line-main { display: grid; gap: 3px; align-content: start; }
.cart-line-name { font-weight: 600; line-height: 1.35; }
.cart-line-name:hover { color: var(--red); }
.cart-line-variant { font-size: .84rem; color: var(--muted); }
.cart-line-price { font-size: .88rem; color: var(--muted); }
.cart-line-controls { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.cart-line-total { font-family: var(--font-display); font-size: 1.1rem; white-space: nowrap; }
.cart-lines.is-compact .cart-line { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; }
.cart-lines.is-compact .cart-line-img img { width: 64px; height: 64px; }
.cart-lines.is-compact .cart-line-name { font-size: .93rem; }
.cart-lines.is-compact .cart-line-total { font-size: .98rem; }
.cart-lines.is-compact .cart-line-price { display: none; }

.summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-rows { display: grid; gap: 10px; margin: 0 0 18px; }
.summary-rows div { display: flex; justify-content: space-between; gap: 16px; }
.summary-rows dt { color: var(--muted); }
.summary-rows dd { margin: 0; font-weight: 600; }
.summary-total { padding-top: 14px; margin-top: 4px; border-top: 1px dashed var(--line-strong); align-items: baseline; }
.summary-total dt { color: var(--ink); font-weight: 600; }
.summary-total dd { font: 800 1.6rem/1 var(--font-display); color: var(--red); }
.summary-back { margin-top: 14px; font-size: .9rem; }
.summary-items { display: grid; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.summary-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.summary-thumb { position: relative; }
.summary-thumb img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--paper-2); }
.summary-thumb b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: 999px; font-size: .7rem; }
.summary-name { font-weight: 500; font-size: .92rem; line-height: 1.35; }
.summary-name small { display: block; color: var(--muted); }

.checkout-form { display: grid; gap: 18px; }
.form-card legend { float: left; width: 100%; display: flex; align-items: center; gap: 10px; font: 700 1.2rem var(--font-display); margin-bottom: 18px; }
.form-card legend + * { clear: both; }
.step-dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 .85rem var(--font-body); }
.pay-options { display: grid; gap: 10px; clear: both; }
.pay-option { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background-color .2s; }
.pay-option:hover { border-color: var(--ink); }
.pay-option:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.pay-option input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--red); }
.pay-body { display: grid; gap: 3px; }
.pay-body strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pay-body small { color: var(--ink-2); font-size: .88rem; }

.order-page { padding-top: clamp(24px, 4vw, 44px); }
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.order-state { display: flex; align-items: center; gap: 16px; }
.state-icon { display: grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 50%; background: var(--warn-soft); color: #8a5a00; transition: background-color .4s, color .4s; }
.order-state.is-paid .state-icon { background: var(--ok); color: #fff; animation: pop .7s var(--ease); }
.order-state.is-cancelled .state-icon { background: var(--paper-2); color: var(--muted); }
.order-state h1 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.order-state p { color: var(--muted); margin-top: 4px; }
.order-code { display: grid; justify-items: end; gap: 2px; }
.order-code small { color: var(--muted); font-size: .8rem; }
.order-code strong { font: 800 1.5rem var(--font-display); letter-spacing: .02em; }
.order-track { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 28px; font-size: .82rem; font-weight: 500; color: var(--muted); text-align: center; }
.order-track li { position: relative; display: grid; justify-items: center; gap: 8px; }
.order-track li::before { content: ""; position: absolute; top: 7px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); }
.order-track li:first-child::before { display: none; }
.order-track span { position: relative; z-index: 1; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line-strong); }
.order-track li.is-done { color: var(--ink); }
.order-track li.is-done::before { background: var(--red); }
.order-track li.is-done span { background: var(--red); border-color: var(--red); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(18px, 3vw, 28px); align-items: start; }
.order-main, .order-side { display: grid; gap: 18px; }
.pay-card { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: center; border-color: var(--red); box-shadow: 0 20px 40px -28px var(--red); }
.pay-card.is-done { animation: fade-out-up .6s var(--ease) forwards; }
.pay-qr { display: grid; justify-items: center; gap: 12px; }
.pay-qr img { width: 100%; max-width: 260px; aspect-ratio: 1; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.pay-wait { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--muted); font-weight: 500; }
.pay-wait i { width: 9px; height: 9px; border-radius: 50%; background: var(--sun); animation: pulse 1.4s ease-in-out infinite; }
.pay-info > p { color: var(--muted); margin-bottom: 14px; }
.pay-rows, .info-rows { display: grid; gap: 10px; margin: 0 0 14px; }
.pay-rows div, .info-rows div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; }
.pay-rows dt, .info-rows dt { color: var(--muted); font-size: .9rem; }
.pay-rows dd, .info-rows dd { margin: 0; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.summary-items.is-wide li { grid-template-columns: 56px minmax(0, 1fr) auto; }
.order-side .card p { color: var(--ink-2); margin-bottom: 14px; font-size: .93rem; }

.confetti { position: fixed; inset: 0; z-index: 250; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 12px; height: 12px; border-radius: 3px; animation: confetti 2.2s var(--ease) forwards; }

/* 10. Blog --------------------------------------------------------------- */
.blog-head h1 { font-size: clamp(2.2rem, 5.6vw, 4rem); margin-top: 12px; letter-spacing: -.035em; }
.blog-search { display: flex; align-items: center; gap: 10px; max-width: 560px; margin-top: 24px; padding: 6px 6px 6px 18px; background: #fff; border: 1.5px solid var(--line-strong); border-radius: 999px; color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.blog-search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(28, 22, 20, .07); }

.article-head { max-width: 860px; padding-top: clamp(24px, 4vw, 44px); }
.article-head h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); margin: 14px 0 16px; }
.article-info { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .88rem; }
.article-lead { margin-top: 18px; font-size: 1.15rem; color: var(--ink-2); }
.article-cover { width: 100%; margin-top: 28px; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.article-body { max-width: 760px; padding-top: clamp(24px, 4vw, 40px); }
.article-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-top: 40px; padding: clamp(20px, 3vw, 30px); background: var(--ink); color: #fff; border-radius: var(--radius-lg); }
.article-cta strong { font: 700 1.25rem var(--font-display); }
.article-cta p { color: #cfc4b8; margin-top: 4px; font-size: .95rem; }
.article-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* 11. Bài viết cũ --------------------------------------------------------
   Khoảng 450 bài HTML có sẵn dùng các lớp article-hero, post-hero, tip-box,
   cta-box, faq-section… Phần dưới trình bày lại chúng theo giao diện mới mà
   không phải sửa từng file. */
.legacy-article { --w: 800px; }
.legacy-article .container { width: min(var(--w), 100% - var(--gutter) * 2); margin-inline: auto; }
.legacy-article :is(.article-hero, .post-hero, .post-header) { padding: clamp(24px, 4vw, 44px) 0 8px; }
.legacy-article :is(.article-breadcrumb) { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; font-size: .85rem; color: var(--muted); }
.legacy-article :is(.article-breadcrumb) a:hover { color: var(--red); }
.legacy-article :is(.article-cat, .category, .eyebrow) { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--red-soft); color: var(--red-deep); font-size: .74rem; font-weight: 700; letter-spacing: 0; text-transform: none; }
.legacy-article .eyebrow::before { display: none; }
.legacy-article h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); margin: 14px 0 16px; }
.legacy-article :is(.article-meta, .post-meta, .date) { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .88rem; }
.legacy-article :is(.article-desc, .lead, .post-intro) { margin-top: 18px; font-size: 1.13rem; color: var(--ink-2); }
.legacy-article :is(.article-hero-img, .post-hero img) { width: 100%; margin-top: 28px; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.legacy-article :is(.article-content, .post-content) { padding-top: clamp(20px, 3vw, 32px); font-size: 1.03rem; line-height: 1.75; color: var(--ink-2); overflow-wrap: break-word; }
.legacy-article :is(.article-content, .post-content) :is(p, ul, ol, table, figure, .tip-box, blockquote) { margin-top: 1.05em; }
.legacy-article :is(.article-content, .post-content) h2 { font-size: 1.55rem; color: var(--ink); margin-top: 1.8em; }
.legacy-article :is(.article-content, .post-content) h3 { font-size: 1.22rem; color: var(--ink); margin-top: 1.5em; }
.legacy-article :is(.article-content, .post-content) :is(p, li) a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.legacy-article :is(.article-content, .post-content) ul { list-style: disc; padding-left: 1.3em; }
.legacy-article :is(.article-content, .post-content) ol { list-style: decimal; padding-left: 1.3em; }
.legacy-article li + li { margin-top: .4em; }
.legacy-article table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.legacy-article :is(th, td) { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.legacy-article th { background: var(--paper-2); color: var(--ink); }
.legacy-article .tip-box { padding: 16px 20px; background: var(--warn-soft); border-left: 4px solid var(--sun); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.legacy-article .tip-box p { margin: 0; }
.legacy-article .article-figure { margin-inline: 0; }
.legacy-article .article-figure img { width: 100%; border-radius: var(--radius); }
.legacy-article figcaption { margin-top: 8px; text-align: center; font-size: .86rem; color: var(--muted); }
.legacy-article :is(.cta-box, .post-cta) { margin-top: 40px; padding: clamp(20px, 3vw, 30px); background: var(--ink); color: #fff; border-radius: var(--radius-lg); }
.legacy-article :is(.cta-box, .post-cta) h2, .legacy-article :is(.cta-box, .post-cta) h3 { color: #fff; font-size: 1.3rem; margin: 0 0 6px; }
.legacy-article :is(.cta-box, .post-cta) p { color: #cfc4b8; margin: 0 0 16px; }
.legacy-article :is(.cta-box-btns, .cta-buttons) { display: flex; flex-wrap: wrap; gap: 10px; }
.legacy-article :is(.btn-white, .btn-primary) { --btn-bg: #fff; --btn-fg: var(--ink); box-shadow: none; }
.legacy-article :is(.btn-outline-white, .btn-secondary) { --btn-bg: transparent; --btn-fg: #fff; --btn-line: rgba(255, 255, 255, .45); }
.legacy-article :is(.btn-primary, .btn-secondary) { display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--btn-line, transparent); background: var(--btn-bg); color: var(--btn-fg); font-weight: 600; text-decoration: none !important; }
.legacy-article :is(.faq-section, .faq-block, .article-faq) { margin-top: 44px; }
.legacy-article :is(.faq-section, .faq-block, .article-faq) > h2 { margin-bottom: 14px; }
.legacy-article .faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 10px; overflow: hidden; }
.legacy-article :is(.faq-question, .faq-q) { display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 16px 20px; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink); margin: 0; font-size: 1rem; font-family: var(--font-body); letter-spacing: 0; }
.legacy-article :is(.faq-question, .faq-q)::after { content: "+"; flex: none; font-size: 1.3rem; line-height: 1; color: var(--red); transition: rotate .3s var(--ease); }
.legacy-article .faq-item.active :is(.faq-question, .faq-q)::after { rotate: 45deg; }
.legacy-article .faq-toggle { display: none; }
.legacy-article :is(.faq-answer, .faq-a) { display: grid; grid-template-rows: 0fr; padding: 0 20px; color: var(--ink-2); transition: grid-template-rows .35s var(--ease), padding .35s var(--ease); margin: 0; }
.legacy-article :is(.faq-answer, .faq-a) > * { overflow: hidden; margin: 0; min-height: 0; }
.legacy-article .faq-item.active :is(.faq-answer, .faq-a) { grid-template-rows: 1fr; padding-bottom: 18px; }
.legacy-article :is(.related, .share-bar) { display: none; } /* đã có khối "bài liên quan" mới */


/* Điều chỉnh cho các trang ở mục 9-11 theo giao diện mới */
.cart-page, .checkout-page, .order-page, .blog-list, .policy-layout, .narrow-page { margin-top: 0; }
.blog-head { background: #fff; border-bottom: 1px solid var(--line); margin-bottom: 20px; padding-bottom: 24px; }
.blog-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.02em; margin-top: 10px; }
.blog-search { border-radius: 999px; padding: 4px 4px 4px 16px; }
.blog-search input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--ink); }
.article-head h1, .legacy-article h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.25; }
.article, .legacy-article { background: #fff; padding-bottom: 40px; }
.order-code strong, .order-state h1 { letter-spacing: -.01em; }
.pay-card { border-color: var(--red); }
.form-card legend { font-size: 1.08rem; }
.pay-option, .cart-line-img img, .summary-thumb img { border-radius: var(--radius-sm); }

/* Thanh toán: hoá đơn công ty, tra mã số thuế */
.check-line { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; clear: both; }
.check-line input { width: 18px; height: 18px; accent-color: var(--red); }
.invoice-fields { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-strong); animation: panel-in .35s var(--ease); }
.field > span.input-action { display: flex; gap: 8px; margin-bottom: 0; font-weight: 400; }
.input-action input { flex: 1; min-width: 0; }
.input-action .btn { flex: none; }
.field-note { display: block; margin-top: 6px; font-size: .84rem; color: var(--muted); }
.field-note.is-ok { color: var(--ok); }
.field-note.is-error { color: var(--red); }

/* Gợi ý tìm kiếm */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 20; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: panel-in .25s var(--ease); }
.suggest-hot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.suggest-hot span { color: var(--muted); font-size: .8rem; margin-right: 4px; }
.suggest-hot a { padding: 5px 12px; border-radius: 999px; background: var(--paper); font-size: .84rem; font-weight: 500; transition: background-color .2s, color .2s; }
.suggest-hot a:hover { background: var(--red-soft); color: var(--red); }
.suggest-list:not(:empty) { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); display: grid; }
.suggest-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: var(--radius-sm); transition: background-color .15s; }
.suggest-item:hover, .suggest-item.is-focused { background: var(--paper); }
.suggest-item img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--paper-2); }
.suggest-item b { display: block; font-weight: 600; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item small { color: var(--muted); font-size: .78rem; }
.suggest-item strong { color: var(--red); font-size: .9rem; white-space: nowrap; }
.suggest-empty, .suggest-all { padding: 8px; font-size: .88rem; color: var(--muted); }
.suggest-all { color: var(--red); font-weight: 600; }

/* Thanh "mua thêm để miễn phí giao hàng" */
.ship-progress { display: grid; gap: 6px; margin-bottom: 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--warn-soft); font-size: .86rem; font-weight: 500; color: #7a5200; transition: background-color .4s, color .4s; }
.ship-progress p { display: flex; align-items: center; gap: 8px; }
.ship-bar { height: 6px; border-radius: 6px; background: rgba(122, 82, 0, .15); overflow: hidden; }
.ship-bar i { display: block; height: 100%; border-radius: 6px; background: var(--sun); transition: width .8s var(--ease), background-color .4s; }
.ship-progress.is-done { background: var(--ok-soft); color: var(--ok); }
.ship-progress.is-done .ship-bar { background: rgba(18, 133, 90, .15); }
.ship-progress.is-done .ship-bar i { background: var(--ok); }

/* Thanh tiến độ đọc bài viết */
.read-progress { position: fixed; left: 0; top: 0; z-index: 120; height: 3px; width: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }

/* 12. Chuyển động --------------------------------------------------------
   Phần tử có data-reveal ẩn nhẹ rồi trượt lên khi cuộn tới (site.js thêm lớp
   .is-in). Chỉ bật khi JavaScript chạy được (html.js) để không mất nội dung. */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .8s var(--ease), box-shadow .45s var(--ease), border-color .3s; transition-delay: calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms), 0s, 0s; }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .p-card[data-reveal].is-in:hover, .js .post-card[data-reveal].is-in:hover, .js .flow li[data-reveal].is-in:hover, .js .material[data-reveal].is-in:hover { transform: translateY(-3px); transition-delay: 0s; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes art-in { from { opacity: 0; scale: .96; translate: 0 14px; } }
@keyframes pop-in { from { opacity: 0; scale: .5; } }
@keyframes spin-in { from { opacity: 0; scale: .6; rotate: -60deg; } }
@keyframes drift { 50% { translate: 0 -6px; } }
@keyframes bob { 50% { translate: 0 -5px; } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes panel-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes live { 70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@keyframes bump { 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(1.7); opacity: 0; } }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
@keyframes pop { 0% { transform: scale(.4); } 55% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes fade-out-up { to { opacity: 0; transform: translateY(-16px); height: 0; padding-block: 0; margin: 0; border-width: 0; overflow: hidden; } }
@keyframes confetti { to { transform: translate3d(var(--x), 105vh, 0) rotate(var(--r)); opacity: .2; } }
@keyframes fly { to { transform: translate(var(--fx), var(--fy)) scale(.12); opacity: .2; } }
.fly-dot { position: fixed; z-index: 400; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; pointer-events: none; box-shadow: var(--shadow); animation: fly .75s cubic-bezier(.5, -0.2, .7, .6) forwards; }

/* Chuyển trang mượt (trình duyệt hỗ trợ View Transitions) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .2s ease both; }
::view-transition-new(root) { animation: vt-in .35s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1180px) {
  .stage-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .stage-side { display: none; }
  .rail { grid-auto-columns: calc((100% - 3 * 12px) / 4); }
  .pdp-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pdp-side { grid-column: 1 / -1; grid-template-columns: 1fr 280px; align-items: start; }
  .assure { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .assure li:nth-child(2) { border-top: 0; }
  .nav-zalo, .tool-hotline .tool-text { display: none; }
  .order-grid, .cart-page, .checkout-page { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 900px) {
  :root { --header-h: 116px; }
  .topbar-links a:not(:last-child), .nav-bar, .quick-contact a { display: none; }
  .menu-btn { display: inline-grid; }
  .header-main { flex-wrap: wrap; height: auto; padding-block: 8px; gap: 8px 10px; }
  .site-header.is-stuck .header-main { height: auto; }
  .brand { margin-right: auto; }
  .brand img { width: 40px; height: 40px; }
  .brand-text small, .tool-cart .tool-text, .search-box button span { display: none; }
  .search-box { order: 5; flex: 0 0 100%; height: 44px; }
  .search-box > button { padding: 0 14px; }
  .tool { padding: 0; }
  .stage-grid { grid-template-columns: 1fr; height: auto; }
  .stage-cats { display: none; }
  .slider { height: 400px; }
  .slide { grid-template-columns: 1fr; align-content: start; padding: 22px 20px 56px; }
  .slide-art { position: absolute; right: -30px; bottom: -40px; width: 200px; height: 240px; opacity: .9; }
  .slide-art img { width: 150px; }
  .slide-chip { display: none; }
  .slide-copy p { max-width: 30ch; font-size: .9rem; }
  .cat-strip { grid-auto-columns: 96px; overflow-x: auto; scrollbar-width: none; }
  .cat-bubble-img { width: 64px; height: 64px; }
  .numbers { grid-template-columns: 1fr 1fr; }
  .numbers li:nth-child(3) { border-left: 0; }
  .numbers li:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .22); }
  .rail { grid-auto-columns: 44%; }
  .p-grid, .p-grid.is-4 { grid-template-columns: 1fr 1fr; }
  .cat-block, .cat-block.is-flipped { grid-template-columns: 1fr; }
  .cat-block.is-flipped .cat-banner { order: 0; }
  .cat-banner { min-height: 150px; }
  .quote, .news, .faq-list, .shop, .policy-layout, .pdp-card, .pdp-side { grid-template-columns: 1fr; }
  .materials { grid-template-columns: 1fr 1fr; }
  .cat-menu::after { display: none; }
  .flow, .clips { grid-template-columns: 1fr 1fr; }
  .flow li + li::before { display: none; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .filters, .shop-side { position: static; }
  .filter-box { padding: 12px; }
  .filter-list { display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .filter-list a { white-space: nowrap; border: 1px solid var(--line); }
  .filter-help { display: none; }
  .sort-search { margin-left: 0; flex: 1; }
  .sort-search input { width: 100%; }
  .sort-label { display: none; }
  .pdp-media { flex-direction: column-reverse; }
  .pdp-thumbs { display: flex; overflow-x: auto; }
  .perk-row { grid-template-columns: 1fr 1fr; }
  .perk:nth-child(3) { border-left: 0; }
  .perk:nth-child(n+3) { border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pay-card { grid-template-columns: 1fr; }

  /* Thanh điều hướng dưới cùng thay cho nút nổi */
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(22, 24, 29, .35); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar > * { display: grid; justify-items: center; gap: 2px; padding: 8px 0 7px; font-size: .68rem; font-weight: 500; color: var(--muted); transition: color .2s; }
  .tabbar .is-current { color: var(--red); }
  .tab-icon { position: relative; }
  .tab-zalo { display: grid; place-items: center; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--zalo); color: #fff; font-size: .62rem; font-weight: 700; }
  body { padding-bottom: 58px; }
  .quick-contact { bottom: 72px; right: 12px; }
  .toast { bottom: 76px; }
  .sticky-buy { position: fixed; left: 0; right: 0; bottom: 58px; z-index: 94; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(22, 24, 29, .4); transform: translateY(160%); transition: transform .4s var(--ease); }
  .sticky-buy.is-visible { transform: none; }
  .sticky-buy span { display: grid; min-width: 0; }
  .sticky-buy small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-buy strong { font-size: 1.1rem; font-weight: 800; color: var(--red); }
}
@media (max-width: 560px) {
  .topbar-note { font-size: .74rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid, .post-grid, .materials { grid-template-columns: 1fr; }
  .slide-title { font-size: 1.75rem; }
  .p-body { padding: 8px 10px 10px; }
  .p-price strong { font-size: 1rem; }
  .panel-head { padding: 0 12px; }
  .tab { padding: 0 10px; font-size: .9rem; }
  .panel-note { display: none; }
  .shop-head { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; }
  .sort-bar { padding: 10px 14px; }
  .news-list a { grid-template-columns: 96px minmax(0, 1fr); }
  .cart-line { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-line-img img { width: 64px; height: 64px; }
  .cart-line-total { grid-column: 2; }
  .order-track { font-size: .7rem; }
  .order-code { justify-items: start; }
  .perk { padding: 14px 10px; gap: 8px; }
  .perk small { display: none; }
}

/* Người dùng tắt hiệu ứng trong hệ điều hành: bỏ mọi chuyển động */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}

/* Ô xác minh Turnstile: giữ sẵn chỗ để form không bị nhảy khi ô hiện ra. */
.cf-turnstile { min-height: 65px; margin: 14px 0; }

/* 13. Trang chủ kiểu sàn -------------------------------------------------
   Cột trái (danh mục, lối tắt, hỗ trợ) đứng yên khi cuộn; nội dung xếp thành
   các khu trắng cùng một kiểu tiêu đề ở cột phải. Dưới 1100px cột trái ẩn,
   dải ô tròn và menu điện thoại thay cho nó. */
.home { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 14px; align-items: start; padding-top: 14px; }
.home-main { min-width: 0; }
.home-main > .block:first-child, .home-main > .stage { padding-top: 0; }
.home-main .wrap { width: 100%; }
.home-side { position: sticky; top: var(--home-side-top, 124px); display: grid; gap: 12px; max-height: calc(100vh - var(--home-side-top, 124px) - 10px); overflow-y: auto; scrollbar-width: none; padding-bottom: 2px; }
.home-side::-webkit-scrollbar { display: none; }
.side-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 10px 8px; overflow: visible; }
.side-card h2 { display: block; padding: 4px 10px 8px; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side-card.stage-cats a { gap: 10px; padding: 7px 10px; font-size: .9rem; line-height: 1.3; }
.side-card .cat-thumb { width: 32px; height: 32px; }
.side-help { display: grid; gap: 8px; padding: 14px; }
.side-help strong { font-size: .98rem; }
.side-help p { color: var(--muted); font-size: .84rem; line-height: 1.45; }
.side-help .btn { min-height: 40px; margin-top: 0; font-size: .9rem; }

.home .stage { padding-top: 0; }
.home .stage-grid { grid-template-columns: minmax(0, 1fr) 232px; grid-template-rows: minmax(0, 1fr); height: 380px; }
.home .stage-grid > * { min-height: 0; }
.home .stage-side { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.home .tile { padding: 16px; }

/* Dải cam kết */
.commit { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.commit li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.commit li + li { border-left: 1px solid var(--line); }
.commit .icon { flex: none; color: var(--red); }
.commit strong { display: block; font-size: .9rem; line-height: 1.3; }
.commit small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.35; }
/* Trang chủ đã có dải cam kết ở trên, không lặp lại ở footer. */
.is-home .footer-perks { display: none; }

.home .cat-strip { border-radius: var(--radius); padding: 14px 8px; }
.home .cat-bubble-img { width: 68px; height: 68px; }
.home .panel { border-radius: var(--radius); }
.panel-body { padding: clamp(12px, 1.6vw, 16px); }
.panel-head .panel-note { margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-head .more-link { flex: none; }

/* Khu "Giá tốt": tiêu đề trên nền đỏ */
.deal .panel-head { border-bottom: 0; background: linear-gradient(90deg, var(--red) 0%, #ef4a2c 60%, #ff7a3d 100%); color: #fff; }
.deal-title { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1rem; color: #fff; white-space: nowrap; }
.deal .tab-list { margin-right: auto; align-items: center; gap: 6px; }
.deal .tab { min-height: 32px; padding: 0 14px; border-radius: 999px; color: rgba(255, 255, 255, .85); font-size: .88rem; }
.deal .tab::after { display: none; }
.deal .tab:hover { color: #fff; background: rgba(255, 255, 255, .16); }
.deal .tab.is-active { background: #fff; color: var(--red); }
.deal .rail-nav button { border-color: transparent; background: rgba(255, 255, 255, .92); }
.deal .rail-nav button:hover { background: #fff; color: var(--red); border-color: transparent; }

.panel-more { display: flex; justify-content: center; padding: 4px 0 16px; }
.panel-more .btn { min-width: 240px; }

/* Lưới sản phẩm 5 cột trong các khu danh mục */
.p-grid.is-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* Thẻ sản phẩm gọn: nút thêm giỏ nằm trên ảnh, dòng giao hàng dưới giá */
.p-card { border-radius: var(--radius-sm); }
.p-top { position: relative; }
.p-top .p-action { position: absolute; right: 8px; bottom: 8px; width: 34px; height: 34px; background: #fff; color: var(--red); box-shadow: 0 4px 12px -4px rgba(20, 30, 60, .35); }
.p-top .p-action:hover { background: var(--red); color: #fff; }
.p-top .p-action.is-done { background: var(--ok); color: #fff; }
.p-body { gap: 6px; padding: 10px 10px 8px; }
.p-name { font-size: .88rem; min-height: 2.8em; }
.p-price { margin-top: 0; gap: 4px 6px; }
.p-price strong { font-size: 1.04rem; }
.p-off { padding: 1px 5px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-size: .72rem; font-weight: 700; }
.p-foot { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--line); font-size: .74rem; color: var(--muted); }
.p-ship { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.p-ship .icon { color: var(--ok); }
.p-sold { font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Các khu thông tin nằm trong khung trắng: thẻ con dùng viền thay cho bóng */
.home .panel :is(.material, .flow li) { box-shadow: none; border: 1px solid var(--line); border-radius: var(--radius); }
.home .panel .faq { border: 1px solid var(--line); box-shadow: none; }
.home .materials { gap: 10px; }
.home .material { padding: 14px; }
.home .quote-banner { border-radius: var(--radius); }

/* Nội dung hiện ngay, không chờ cuộn tới mới hiện dần. */
.js [data-reveal] { opacity: 1; transform: none; }

@media (max-width: 1280px) {
  .p-grid.is-5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .p-grid.is-5:not(.is-full) > :nth-child(n+5) { display: none; }
}
@media (max-width: 1100px) {
  .home { grid-template-columns: minmax(0, 1fr); }
  .home-side { display: none; }
  .home .stage-grid { grid-template-columns: minmax(0, 1fr); height: 340px; }
  .p-grid.is-5:not(.is-full) > :nth-child(n+5) { display: flex; }
}
@media (max-width: 900px) {
  .home { padding-top: 10px; }
  .home .stage-grid { height: auto; }
  .commit { grid-template-columns: 1fr 1fr; }
  .commit li { padding: 12px; }
  .commit li:nth-child(3) { border-left: 0; }
  .commit li:nth-child(n+3) { border-top: 1px solid var(--line); }
  .p-grid.is-5 { grid-template-columns: 1fr 1fr; }
  .p-grid.is-5:not(.is-full) > :nth-child(n+5) { display: none; }
  .deal .panel-head { flex-wrap: wrap; gap: 8px; padding-block: 10px; }
  .deal .rail-nav { display: none; }
  .panel-head .panel-note { display: none; }
}
@media (max-width: 560px) {
  .commit small { display: none; }
  .commit .icon { width: 20px; height: 20px; }
  .p-ship { display: none; }
  .p-foot { justify-content: flex-end; }
}
.home .chip-b { bottom: 24%; }

/* 14. Sau đợt review giao diện -------------------------------------------
   Trạng thái trống dẫn sang báo giá, chống tràn ngang ở trang danh sách,
   menu và header gọn hơn trên điện thoại, vùng chạm và cỡ chữ tối thiểu. */
.shop.is-bare { grid-template-columns: minmax(0, 1fr); }
.filters, .shop-main { min-width: 0; }
.empty-state p { max-width: 52ch; line-height: 1.6; }
.empty-state p strong { color: var(--ink); font-size: 1.05rem; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 12px; }
.service-card { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s; }
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.service-card img { flex: none; width: 60px; height: 60px; border-radius: var(--radius-sm); object-fit: cover; }
.service-card span { display: grid; gap: 2px; min-width: 0; }
.service-card strong { font-size: .95rem; line-height: 1.3; }
.service-card small { display: inline-flex; align-items: center; gap: 4px; color: var(--red); font-size: .82rem; font-weight: 600; }
.search-posts { margin-top: 20px; display: grid; gap: 14px; }
.search-posts h2 { font-size: 1.2rem; }
.search-posts .more-link { justify-self: start; }
.drawer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.drawer-actions .btn { min-height: 46px; padding-inline: 10px; font-size: .9rem; white-space: nowrap; }
.quote-file-hint { margin-top: 10px; text-align: center; }
.quote-file-hint a { color: var(--red); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.commit small { font-size: .8125rem; }
.cat-bubble small, .post-meta { font-size: .8125rem; }
/* Danh sách "Bước 1, Bước 2…" đã tự ghi số thì không đánh số thêm lần nữa. */
.prose ol:has(> li:first-child > strong:first-child) { list-style: none; padding-left: 0; }
@media (min-width: 901px) {
  /* Chừa chỗ cho nút lên đầu trang, không đè huy hiệu DMCA. */
  .footer-bottom-row { padding-right: 64px; }
}
/* Màn hình thấp: bỏ ô "Tiện ích" để ô gọi/Zalo ở cột trái không bị khuất. */
@media (min-width: 1101px) and (max-height: 880px) {
  .home-side > nav:nth-of-type(2) { display: none; }
}
@media (max-width: 1100px) {
  .tool-quote .tool-text { display: none; }
}
@media (max-width: 900px) {
  .tool-quote { display: none; }
  /* Cuộn xuống thì header chỉ còn hàng logo; cuộn lên ô tìm kiếm hiện lại. */
  .site-header.is-compact .search-box { display: none; }
  /* Chữ ô nhập từ 16px để iPhone không tự phóng to khi chạm vào. */
  .field input, .field select, .field textarea, .search-box input, .sort-search input { font-size: 16px; }
  /* Trang báo giá: form nằm ngay dưới tiêu đề. */
  .quote { align-items: start; gap: 16px; }
  .quote-copy .tick-list, .quote-copy .quote-direct { display: none; }
  .sort-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .sort-tabs a { white-space: nowrap; }
  .sort-bar > * { min-width: 0; }
  .service-grid { grid-template-columns: 1fr; }
  /* Vùng chạm tối thiểu 44px */
  .more-link, .text-link { min-height: 44px; }
  .footer-col li a, .footer-contact a { display: inline-block; padding-block: 9px; }
  .topbar-links a { min-height: 36px; }
  .rail-nav button, .slider-arrows button { width: 40px; height: 40px; }
  .slider-dots button { height: 32px; }
  .tabbar > * { font-size: .74rem; }
}
