/* ═══════════════════════════════════════════════════════════
   DUNKIE SHOP — web v2  |  styles.css
   Brand: Deep Teal #053b47 × Coral #e84f1b (giữ từ v1)
   Phong cách: e-commerce rõ ràng + điểm nhấn tech (grid, glow, motion)
   ═══════════════════════════════════════════════════════════ */

/* ───────── 1. Tokens ───────── */
:root {
  --teal-950: #021a20;
  --teal-900: #04262e;
  --teal-800: #053b47;
  --teal-700: #0a5461;
  --teal-500: #1a94ab;
  --teal-400: #24b4cf;
  --teal-300: #5ccce0;
  --coral-600: #c9410f;
  --coral-500: #e84f1b;
  --coral-400: #ff6b3d;
  --amber-500: #f0a500;
  --green-500: #12a670;

  --bg: #f4f8f9;
  --surface: #ffffff;
  --surface-2: #eef4f6;
  --surface-3: #e3eef1;
  --border: #dbe7eb;
  --border-strong: #c3d7dd;
  --text: #0c1d22;
  --text-2: #43616a;
  --text-3: #7a959c;
  --brand: var(--teal-800);
  --brand-soft: #e6f4f7;
  --accent: var(--teal-400);
  --cta: var(--coral-500);
  --cta-hover: var(--coral-600);
  --cta-soft: #fff1ec;
  --ok: var(--green-500);
  --ok-soft: #e5f7ef;
  --warn-soft: #fff6e0;
  --warn: #9a6a00;

  /* Khối tối (header, hero, section-dark) dùng chung cho cả 2 theme */
  --ink: #04232b;
  --ink-2: #073440;
  --ink-text: #e7f4f6;
  --ink-text-2: #9fc3cb;
  --ink-line: rgba(140, 220, 235, .14);

  --shadow-sm: 0 1px 2px rgba(5, 59, 71, .06), 0 1px 3px rgba(5, 59, 71, .06);
  --shadow-md: 0 6px 18px -6px rgba(5, 59, 71, .16), 0 2px 6px rgba(5, 59, 71, .06);
  --shadow-lg: 0 22px 48px -18px rgba(5, 59, 71, .30), 0 6px 16px rgba(5, 59, 71, .08);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-full: 999px;

  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 68px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #061317;
  --surface: #0b1d22;
  --surface-2: #0f262c;
  --surface-3: #143039;
  --border: #19363e;
  --border-strong: #24474f;
  --text: #e6f1f3;
  --text-2: #a3bcc2;
  --text-3: #6f8b92;
  --brand: var(--teal-300);
  --brand-soft: #0e2c33;
  --cta-soft: #2a1610;
  --ok-soft: #0c2a20;
  --warn-soft: #2a220c;
  --warn: #f0c050;
  --ink: #031a20;
  --ink-2: #062a33;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 22px -8px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 50px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ───────── 2. Base ───────── */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--cta); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 860px; }

/* ───────── 3. Buttons ───────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .7em 1.2em;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-weight: 700; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: transform .18s var(--ease), background .18s, box-shadow .18s, border-color .18s, color .18s;
  overflow: hidden; isolation: isolate;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { font-size: 1.1em; }
.btn-sm { padding: .5em .9em; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: .9em 1.5em; font-size: 1rem; }
.btn-block { width: 100%; }

.btn-cta { background: var(--cta); color: #fff; box-shadow: 0 6px 18px -6px rgba(232, 79, 27, .55); }
.btn-cta:hover { background: var(--cta-hover); box-shadow: 0 10px 24px -8px rgba(232, 79, 27, .6); transform: translateY(-1px); }
.btn-cta:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

.btn-glass { background: rgba(255, 255, 255, .06); color: var(--ink-text); border-color: rgba(255, 255, 255, .18); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .32); }

.btn-dev { background: var(--warn-soft); color: var(--warn); border: 1px dashed currentColor; }

/* Vệt sáng quét qua nút CTA */
.btn-shine::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 3.6s var(--ease) infinite 1.2s;
}
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  color: var(--ink-text); font-size: 18px;
  transition: background .18s, border-color .18s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .14); }

/* ───────── 4. Env ribbon (DEV) ───────── */
.env-ribbon {
  position: relative; z-index: 60;
  background: repeating-linear-gradient(-45deg, #f0a500 0 14px, #f4b733 14px 28px);
  color: #2b1d00; font-size: 12.5px; font-weight: 600; text-align: center; padding: 4px 12px;
}
.env-ribbon b { background: #2b1d00; color: #f4b733; padding: 1px 6px; border-radius: 4px; margin-right: 6px; letter-spacing: .06em; }
.env-ribbon a { text-decoration: underline; margin-left: 4px; }

/* ───────── 5. Header ───────── */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--ink-line);
  transition: box-shadow .2s;
}
.header.scrolled { box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .5); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; }
.brand-word { width: 150px; height: auto; }

.header-search {
  flex: 1; max-width: 420px;
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 8px 0 14px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-md);
  color: var(--ink-text-2);
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.header-search:focus-within { border-color: var(--accent); background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 4px rgba(36, 180, 207, .15); }
.header-search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink-text); font-size: .92rem; }
.header-search input::placeholder { color: var(--ink-text-2); opacity: .8; }
.header-search kbd { font-family: var(--mono); font-size: 11px; padding: 3px 6px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .16); color: var(--ink-text-2); }

.header-nav { display: flex; gap: 4px; margin-left: auto; }
.header-nav a {
  position: relative; padding: 8px 12px; border-radius: 10px;
  color: var(--ink-text-2); font-weight: 600; font-size: .92rem;
  transition: color .18s, background .18s;
}
.header-nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.header-nav a.active { color: #fff; }
.header-nav a.active::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--coral-400));
}
.header-end { display: flex; align-items: center; gap: 8px; }

.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
.mobile-only { display: none; }

/* ───────── 6. Ticker ───────── */
.ticker { background: var(--ink-2); color: var(--ink-text-2); border-bottom: 1px solid var(--ink-line); overflow: hidden; font-size: 12.5px; font-weight: 600; }
.ticker-track { display: flex; gap: 40px; width: max-content; padding: 7px 0; animation: marquee 40s linear infinite; }
.ticker-track span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.ticker-track i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ───────── 7. Hero ───────── */
.hero, .page-hero { position: relative; background: var(--ink); color: var(--ink-text); overflow: hidden; isolation: isolate; }
.hero { padding: 64px 0 72px; }

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-grid {
  position: absolute; inset: -40% -10% -10%;
  background-image:
    linear-gradient(rgba(92, 204, 224, .09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 204, 224, .09) 1px, transparent 1px);
  background-size: 48px 48px;
  transform: perspective(700px) rotateX(55deg);
  transform-origin: center top;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
  animation: grid-move 14s linear infinite;
}
@keyframes grid-move { to { background-position: 0 48px, 0 0; } }

.hero-orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.orb-a { width: 520px; height: 520px; left: -140px; top: -180px; background: radial-gradient(circle, #1a94ab, transparent 65%); animation: float-a 16s ease-in-out infinite; }
.orb-b { width: 460px; height: 460px; right: -120px; bottom: -220px; background: radial-gradient(circle, #e84f1b, transparent 65%); opacity: .35; animation: float-b 18s ease-in-out infinite; }
@keyframes float-a { 50% { transform: translate(60px, 40px) scale(1.08); } }
@keyframes float-b { 50% { transform: translate(-50px, -30px) scale(1.1); } }
.hero-beam {
  position: absolute; top: 0; bottom: 0; width: 2px; left: 58%;
  background: linear-gradient(transparent, rgba(92, 204, 224, .5), transparent);
  filter: blur(1px); opacity: .5;
  animation: beam 7s ease-in-out infinite;
}
@keyframes beam { 0% { transform: translateX(-30vw); opacity: 0; } 50% { opacity: .6; } 100% { transform: translateX(30vw); opacity: 0; } }

.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px; border-radius: var(--r-full);
  background: rgba(92, 204, 224, .1); border: 1px solid rgba(92, 204, 224, .25);
  color: var(--teal-300); font-size: 13px; font-weight: 700; letter-spacing: .02em;
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #3ee6a0; }
.pulse-dot::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #3ee6a0; animation: ping 1.8s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

.hero-title { margin-top: 18px; font-size: clamp(2rem, 4vw, 3.1rem); text-wrap: balance; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
.text-gradient {
  background: linear-gradient(90deg, #5ccce0 0%, #9de5ef 35%, #ff9070 70%, #ff6b3d 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: grad 8s ease-in-out infinite;
}
@keyframes grad { 50% { background-position: 100% 0; } }
.hero-sub { margin-top: 18px; max-width: 520px; color: var(--ink-text-2); font-size: 1.05rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-stats { list-style: none; display: flex; gap: 32px; margin: 36px 0 0; padding: 0; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--mono); font-size: 1.6rem; color: #fff; letter-spacing: -.02em; }
.hero-stats span { font-size: 13px; color: var(--ink-text-2); }

.hero-panel {
  position: relative;
  padding: 20px; border-radius: var(--r-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}
.hero-panel::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, rgba(92, 204, 224, .8) 80%, rgba(255, 107, 61, .8) 90%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 6s linear infinite;
}
@property --spin { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --spin: 360deg; } }

.hero-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chip-live { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #fff; }
.link-light { font-size: 13px; font-weight: 600; color: var(--teal-300); }
.link-light:hover { color: #fff; }

.hero-featured { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feat-card {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 12px; min-height: 84px; border-radius: var(--r-lg);
  background: rgba(3, 26, 32, .55); border: 1px solid rgba(255, 255, 255, .08);
  transition: transform .25s var(--ease), border-color .25s, background .25s;
  animation: rise .6s var(--ease) both; animation-delay: var(--d, 0ms);
}
.feat-card:hover { transform: translateY(-3px); border-color: rgba(92, 204, 224, .45); background: rgba(5, 59, 71, .7); }
.feat-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.feat-info strong { color: #fff; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat-info small { color: var(--ink-text-2); font-size: 12px; }
.feat-info em { font-style: normal; font-weight: 800; color: var(--coral-400); font-size: .9rem; margin-top: 2px; }
.feat-arrow { margin-left: auto; color: var(--ink-text-2); transition: transform .2s, color .2s; }
.feat-card:hover .feat-arrow { transform: translateX(3px); color: #fff; }
.feat-card.skeleton { background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .1), rgba(255, 255, 255, .04)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; color: var(--ink-text-2); }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust svg { color: var(--teal-300); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ───────── 8. Logo marquee ───────── */
.logo-marquee { background: var(--surface); border-bottom: 1px solid var(--border); overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.logo-track { display: flex; gap: 14px; width: max-content; padding: 14px 0; animation: marquee 60s linear infinite; }
.logo-marquee:hover .logo-track { animation-play-state: paused; }
.logo-track a { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--border); font-weight: 600; font-size: 13.5px; color: var(--text-2); white-space: nowrap; transition: color .2s, border-color .2s; }
.logo-track a:hover { color: var(--text); border-color: var(--brand); }

/* ───────── 9. Logo tiles ───────── */
.logo-tile {
  position: relative; display: grid; place-items: center; flex-shrink: 0;
  width: 64px; height: 64px; border-radius: 16px; overflow: hidden;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(5, 59, 71, .08);
}
.logo-tile img { width: 72%; height: 72%; object-fit: contain; }
.logo-initials { font-weight: 800; font-size: 1.2rem; color: hsl(var(--h) 60% 35%); }
.logo-tile:has(.logo-initials:not([hidden])) { background: hsl(var(--h) 70% 93%); }
.logo-tile.xs { width: 28px; height: 28px; border-radius: 50%; }
.logo-tile.xs .logo-initials { font-size: 10px; }
.logo-tile.sm { width: 52px; height: 52px; border-radius: 14px; }
.logo-tile.xl { width: 148px; height: 148px; border-radius: 36px; box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .35); }
.logo-tile.xl .logo-initials { font-size: 2.6rem; }

/* ───────── 10. Sections ───────── */
.section { padding: 72px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-dark { position: relative; background: var(--ink); color: var(--ink-text); overflow: hidden; }
.section-dark::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 300px at 15% 0%, rgba(26, 148, 171, .35), transparent 70%), radial-gradient(500px 300px at 90% 100%, rgba(232, 79, 27, .2), transparent 70%); pointer-events: none; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head.center { justify-content: center; text-align: center; }
.kicker { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cta); margin-bottom: 8px; }
.kicker::before { content: '// '; opacity: .6; }
.kicker-light { color: var(--teal-300); }
.section-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
.link-more { font-weight: 700; font-size: .92rem; color: var(--brand); white-space: nowrap; transition: color .18s; }
.link-more:hover { color: var(--cta); }

/* ───────── 11. Category tiles ───────── */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-tile {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 20px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.cat-tile::before, .p-card::before, .trust-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(36, 180, 207, .14), transparent 60%);
}
.cat-tile:hover::before, .p-card:hover::before, .trust-card:hover::before { opacity: 1; }
.cat-tile:hover { transform: translateY(-3px); border-color: var(--teal-400); box-shadow: var(--shadow-md); }
.cat-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); font-size: 22px; margin-bottom: 10px; transition: background .25s, color .25s, transform .25s var(--ease); }
.cat-tile:hover .cat-icon { background: var(--teal-800); color: #fff; transform: rotate(-6deg) scale(1.05); }
.cat-name { font-weight: 700; font-size: 1rem; }
.cat-count { font-size: 13px; color: var(--text-3); }
.cat-arrow { position: absolute; top: 18px; right: 18px; color: var(--text-3); font-size: 18px; transition: transform .25s var(--ease), color .25s; }
.cat-tile:hover .cat-arrow { transform: translate(2px, -2px); color: var(--cta); }

/* ───────── 12. Shelves & product grid ───────── */
.shelf + .shelf { margin-top: 44px; }
.shelf-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.shelf-head h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; }
.shelf-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); font-size: 17px; }

.product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.catalog-wrap .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.p-card {
  --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border);
  overflow: hidden; isolation: isolate;
  transition: transform .28s var(--ease), box-shadow .28s, border-color .28s;
}
.p-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--teal-400) 55%, var(--border)); }

.p-media {
  position: relative; display: grid; place-items: center; height: 128px;
  background:
    radial-gradient(circle at 50% 120%, rgba(36, 180, 207, .18), transparent 60%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.p-media::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(5, 59, 71, .12) 1px, transparent 1px);
  background-size: 14px 14px;
  mask-image: linear-gradient(180deg, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
  opacity: .6;
}
:root[data-theme="dark"] .p-media::after { background-image: radial-gradient(rgba(92, 204, 224, .14) 1px, transparent 1px); }
.p-media .logo-tile { z-index: 1; transition: transform .35s var(--ease); }
.p-card:hover .p-media .logo-tile { transform: scale(1.08) rotate(-3deg); }
.p-tags { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2; display: flex; gap: 6px; flex-wrap: wrap; }

.tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-full); font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.tag-ready { background: var(--ok-soft); color: var(--ok); }
.tag-upgrade { background: var(--brand-soft); color: var(--brand); }

.p-body { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
.p-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.p-name { margin-top: 4px; font-size: 1.02rem; font-weight: 800; }
.p-name a:hover { color: var(--cta); }
.p-tagline { margin-top: 6px; color: var(--text-2); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.p-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 12px 0; }
.p-price small { font-size: 12px; color: var(--text-3); }
.p-price strong { font-size: 1.12rem; font-weight: 800; color: var(--cta); letter-spacing: -.01em; }
.p-count { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.p-buy { margin-top: auto; }

/* Skeleton */
.skeleton-card { padding: 14px; gap: 10px; }
.sk { border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.sk-media { height: 110px; }
.sk-line { height: 14px; }
.sk-line.short { width: 60%; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ───────── 13. Steps ───────── */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; position: relative; }
.steps:not(.steps-vertical)::before {
  content: ''; position: absolute; top: 40px; left: 8%; right: 8%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--border-strong) 0 8px, transparent 8px 16px);
}
.step { position: relative; padding: 22px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.step-num {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px;
  border-radius: 12px; background: var(--ink); color: var(--teal-300);
  font-family: var(--mono); font-weight: 700; font-size: 14px;
  box-shadow: 0 0 0 5px var(--bg), 0 0 18px rgba(36, 180, 207, .35);
}
.section-alt .step-num { box-shadow: 0 0 0 5px var(--surface), 0 0 18px rgba(36, 180, 207, .35); }
.step h3 { font-size: 1rem; font-weight: 800; }
.step p { margin-top: 6px; font-size: 13.5px; color: var(--text-2); }
.steps-vertical { grid-template-columns: 1fr; }
.steps-vertical .step { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; }
.steps-vertical .step-num { grid-row: span 2; margin: 0; }

/* ───────── 14. Trust ───────── */
.trust-grid { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-card {
  --mx: 50%; --my: 50%;
  position: relative; padding: 24px; border-radius: var(--r-lg); isolation: isolate; overflow: hidden;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--ink-line);
  transition: transform .25s var(--ease), border-color .25s;
}
.trust-card::before { background: radial-gradient(240px circle at var(--mx) var(--my), rgba(92, 204, 224, .16), transparent 60%); }
.trust-card:hover { transform: translateY(-3px); border-color: rgba(92, 204, 224, .4); }
.trust-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: rgba(92, 204, 224, .12); color: var(--teal-300); font-size: 22px; margin-bottom: 16px; }
.trust-card h3 { font-size: 1.05rem; font-weight: 800; color: #fff; }
.trust-card p { margin-top: 8px; font-size: 13.5px; color: var(--ink-text-2); }

/* ───────── 15. FAQ ───────── */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s; }
.faq-item[open] { border-color: var(--teal-400); }
.faq-item summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 700; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; width: 14px; height: 14px; flex-shrink: 0; }
.faq-icon::before, .faq-icon::after { content: ''; position: absolute; left: 0; right: 0; top: 6px; height: 2px; border-radius: 2px; background: var(--text-3); transition: transform .25s var(--ease); }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-item p { padding: 0 18px 16px; color: var(--text-2); font-size: 14px; }

/* ───────── 16. Page hero + catalog ───────── */
.page-hero { padding: 36px 0 40px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.page-hero .breadcrumb { color: var(--ink-text-2); }
.breadcrumb a:hover { color: var(--cta); }
.page-title { margin-top: 10px; font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
.page-sub { margin-top: 8px; color: var(--ink-text-2); }

.catalog-wrap { padding-top: 0; padding-bottom: 72px; }
.toolbar {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 0 -24px; padding: 14px 24px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.chips { display: flex; gap: 8px; overflow-x: auto; flex: 1; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 13.5px; color: var(--text-2);
  transition: all .18s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.active { background: var(--teal-800); border-color: var(--teal-800); color: #fff; box-shadow: 0 6px 16px -8px rgba(5, 59, 71, .7); }
:root[data-theme="dark"] .chip.active { background: var(--teal-500); border-color: var(--teal-500); }
.toolbar-end { display: flex; gap: 10px; }
.search-box { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--text-3); transition: border-color .18s, box-shadow .18s; }
.search-box:focus-within { border-color: var(--teal-400); box-shadow: 0 0 0 4px rgba(36, 180, 207, .14); }
.search-box input { border: 0; outline: 0; background: none; width: 180px; color: var(--text); }
.select-box select { height: 40px; padding: 0 34px 0 12px; border-radius: var(--r-md); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a959c' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; border: 1px solid var(--border); appearance: none; font-weight: 600; font-size: 13.5px; color: var(--text); cursor: pointer; }
.result-count { margin: 18px 0 14px; font-size: 13.5px; color: var(--text-3); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 56px 16px; text-align: center; color: var(--text-2); }

/* ───────── 17. Detail ───────── */
.detail-wrap { padding-top: 24px; padding-bottom: 80px; }
.detail-grid { display: grid; grid-template-columns: 420px 1fr; gap: 40px; margin-top: 18px; align-items: start; }
.detail-media { position: sticky; top: calc(var(--header-h) + 20px); }
.media-stage {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / .82;
  border-radius: var(--r-xl); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(circle at 50% 55%, hsl(var(--h) 70% 50% / .35), transparent 55%),
    var(--ink);
  border: 1px solid var(--border);
}
.media-stage::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(92, 204, 224, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(92, 204, 224, .1) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 20%, transparent 70%);
}
.ring { position: absolute; border-radius: 50%; border: 1px dashed rgba(92, 204, 224, .35); }
.ring.r1 { width: 230px; height: 230px; animation: rotate 26s linear infinite; }
.ring.r2 { width: 310px; height: 310px; border-style: solid; border-color: rgba(255, 255, 255, .06); border-top-color: rgba(255, 107, 61, .6); animation: rotate 9s linear infinite reverse; }
@keyframes rotate { to { transform: rotate(360deg); } }
.media-stage .logo-tile { animation: hover-y 5s ease-in-out infinite; }
@keyframes hover-y { 50% { transform: translateY(-8px); } }

.detail-trust { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; padding: 0; }
.detail-trust li { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); font-size: 12.5px; font-weight: 600; text-align: center; color: var(--text-2); }
.detail-trust svg { font-size: 18px; color: var(--brand); }

.detail-main .p-cat:hover { color: var(--cta); }
.detail-title { margin-top: 6px; font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 800; }
.detail-tagline { margin-top: 8px; color: var(--text-2); font-size: 1.02rem; }

.picker { margin-top: 24px; padding: 22px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.pick-group + .pick-group { margin-top: 18px; }
.pick-label { font-size: 13px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.pick-options { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px;
  padding: 9px 14px; border-radius: var(--r-md);
  background: var(--surface-2); border: 1.5px solid var(--border);
  font-weight: 700; font-size: 14px; text-align: left;
  transition: border-color .18s, background .18s, transform .18s var(--ease), box-shadow .18s;
}
.opt small { font-weight: 600; font-size: 12px; color: var(--text-3); }
.opt:hover { border-color: var(--teal-400); transform: translateY(-1px); }
.opt.selected { background: var(--brand-soft); border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(36, 180, 207, .16); }
.opt.selected small { color: var(--cta); }

.picked { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border-strong); }
.picked-kind { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.picked-kind .tag { font-size: 12px; padding: 4px 10px; }
.kind-hint { font-size: 13px; color: var(--text-2); }
.picked-notes { margin: 14px 0 0; padding: 12px 14px 12px 32px; border-radius: var(--r-md); background: var(--warn-soft); color: var(--text); font-size: 13.5px; }
.picked-notes li + li { margin-top: 4px; }
.picked-row { display: flex; align-items: center; gap: 16px 32px; margin-top: 18px; flex-wrap: wrap; }
.picked-price small { display: block; font-size: 13px; color: var(--text-3); }
.picked-price strong { display: block; font-size: 2rem; font-weight: 800; color: var(--cta); letter-spacing: -.02em; line-height: 1.1; }
.price-flip { animation: flip .35s var(--ease); }
@keyframes flip { from { opacity: 0; transform: translateY(8px); } }
.picked-foot { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }

.detail-section { margin-top: 40px; }
.detail-section h2 { font-size: 1.25rem; font-weight: 800; margin-bottom: 14px; }
.detail-section > p { max-width: 820px; color: var(--text-2); }

.buy-bar { display: none; }

/* ───────── 18. Guide ───────── */
.guide-wrap { padding: 40px 24px 80px; }
.guide-h2 { margin: 40px 0 14px; font-size: 1.35rem; font-weight: 800; scroll-margin-top: calc(var(--header-h) + 16px); }
.policy-list { margin: 0; padding: 18px 18px 18px 36px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.policy-list li + li { margin-top: 8px; }

/* ───────── 19. Footer ───────── */
.footer { background: var(--ink); color: var(--ink-text-2); padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; padding-bottom: 40px; }
.footer-brand img { width: 180px; height: auto; }
.footer-brand p { margin-top: 14px; font-size: 14px; max-width: 300px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 14px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--ink-line); padding: 16px 0; font-size: 13px; }

/* ───────── 20. Floating Zalo ───────── */
.float-zalo {
  position: fixed; right: 20px; bottom: 22px; z-index: 40;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #0068ff; color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 10px 24px -6px rgba(0, 104, 255, .6);
  transition: transform .2s var(--ease);
}
.float-zalo::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #0068ff; animation: ping 2.2s var(--ease) infinite; }
.float-zalo:hover { transform: scale(1.06); }

/* ───────── 21. Search overlay ───────── */
.search-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(2, 20, 25, .6); backdrop-filter: blur(6px); padding: 14px; }
.search-overlay-inner { display: flex; gap: 8px; padding: 10px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); animation: rise .25s var(--ease); }
.search-overlay .search-box { flex: 1; }
.search-overlay .search-box input { width: 100%; }

/* ───────── 22. Checkout modal ───────── */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2, 20, 25, .62); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s; }
.modal-panel {
  position: relative; width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 26px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(.98); transition: opacity .22s, transform .22s var(--ease);
}
.modal.open .modal-backdrop { opacity: 1; }
.modal.open .modal-panel { opacity: 1; transform: none; }
.modal-close { position: absolute; top: 14px; right: 14px; background: var(--surface-2); border-color: var(--border); color: var(--text-2); width: 36px; height: 36px; }
.modal-close:hover { background: var(--surface-3); }

.co-steps { list-style: none; display: flex; gap: 6px; margin: 0 40px 18px 0; padding: 0; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.co-steps li { display: flex; align-items: center; gap: 6px; flex: 1; padding-bottom: 8px; border-bottom: 2px solid var(--border); }
.co-steps span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); font-family: var(--mono); font-size: 11px; }
.co-steps .active { color: var(--brand); border-color: var(--teal-400); }
.co-steps .active span { background: var(--teal-800); color: #fff; }
.co-steps .done { color: var(--ok); border-color: var(--ok); }
.co-steps .done span { background: var(--ok); color: #fff; }
.co-title { font-size: 1.35rem; font-weight: 800; }
.co-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0 18px; padding: 12px 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.co-summary-name { font-weight: 800; }
.co-summary-meta { font-size: 12.5px; color: var(--text-3); }
.co-summary-price { font-weight: 800; color: var(--cta); font-size: 1.1rem; white-space: nowrap; }
.co-form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 700; }
.field label b { color: var(--cta); }
.field input, .field textarea { padding: 11px 13px; border-radius: var(--r-md); background: var(--surface); border: 1.5px solid var(--border); outline: 0; transition: border-color .18s, box-shadow .18s; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--teal-400); box-shadow: 0 0 0 4px rgba(36, 180, 207, .14); }
.field small { font-size: 12.5px; color: var(--text-3); }
.co-error { padding: 10px 12px; border-radius: var(--r-md); background: var(--cta-soft); color: var(--cta); font-size: 13.5px; font-weight: 600; }
.co-dev-note { margin-top: 16px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 12.5px; text-align: center; }

.co-pay { display: grid; grid-template-columns: 240px 1fr; gap: 20px; margin-top: 16px; align-items: start; }
.qr-frame { position: relative; padding: 12px; border-radius: var(--r-lg); background: #fff; border: 1px solid var(--border); overflow: hidden; }
.qr-frame img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.qr-scan { position: absolute; left: 10px; right: 10px; height: 3px; top: 12px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--teal-400), transparent); box-shadow: 0 0 16px 2px rgba(36, 180, 207, .7); animation: scan 2.4s ease-in-out infinite; }
@keyframes scan { 50% { top: calc(100% - 15px); } }
.qr-corner { position: absolute; width: 22px; height: 22px; border: 3px solid var(--cta); }
.qr-corner.tl { top: 4px; left: 4px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.qr-corner.tr { top: 4px; right: 4px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.qr-corner.bl { bottom: 4px; left: 4px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.qr-corner.br { bottom: 4px; right: 4px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }
.co-dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.co-dl > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.co-dl dt { color: var(--text-3); }
.co-dl dd { margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 700; text-align: right; }
.co-dl .amount { color: var(--cta); font-size: 1.15rem; }
.copy-btn { padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface-2); font-size: 11.5px; font-weight: 700; color: var(--brand); }
.copy-btn:hover { border-color: var(--brand); }
.co-wait { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: var(--r-md); background: var(--brand-soft); font-size: 13px; }
.co-wait strong { display: block; color: var(--brand); }
.co-wait span { color: var(--text-2); }
.co-wait b { font-family: var(--mono); }
.spinner { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; border: 3px solid rgba(36, 180, 207, .25); border-top-color: var(--teal-400); animation: rotate .9s linear infinite; }
.spinner-sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.co-pay + .co-hint, .co-title + .co-error { margin-top: 12px; }
.co-hint { margin-top: 16px; font-size: 13.5px; color: var(--text-2); }
.co-dev-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

#co-delivery { width: 100%; }
.co-delivery { display: flex; align-items: center; gap: 12px; width: 100%; margin: 6px 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--brand-soft); text-align: left; font-size: 14px; }
.co-delivery > div, .co-delivery { flex-wrap: wrap; }
.co-delivery b { display: block; color: var(--brand); }
.co-delivery span { display: block; color: var(--text-2); }
.co-delivery.ok { background: var(--ok-soft); }
.co-delivery.ok b { color: var(--ok); }
.co-delivery > div { flex: 1; min-width: 0; }
.co-small { font-size: 12.5px; color: var(--text-3); }
.co-done { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 8px 0; }
.co-done p { color: var(--text-2); font-size: 14px; }
.co-done-actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.check-anim svg { width: 76px; height: 76px; stroke-width: 3; }
.check-anim circle { stroke: var(--ok); stroke-dasharray: 160; stroke-dashoffset: 160; animation: draw .6s var(--ease) forwards; }
.check-anim path { stroke: var(--ok); stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .4s var(--ease) .45s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ───────── 23. Toast ───────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  padding: 10px 18px; border-radius: var(--r-full);
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 20px); opacity: 0; transition: transform .25s var(--ease), opacity .25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ───────── 24. Reveal / view motion ───────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); transition-delay: var(--d, 0ms); }
.reveal.in { opacity: 1; transform: none; }
.view-enter { animation: view-in .4s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ───────── 25. Responsive ───────── */
@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .shelf-grid > :nth-child(5) { display: none; }
}

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .detail-media { position: static; }
  .media-stage { aspect-ratio: 16 / 7; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .header-search, .header-nav { display: none; }
  .mobile-only { display: inline-grid; }
  .header-end { margin-left: auto; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .shelf-grid > :nth-child(n+4) { display: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 60px; }
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .brand-word { width: 118px; }
  .brand-mark { width: 32px; height: 32px; }
  .header-cta span { display: none; }
  .header-cta { padding: .55em; }
  .hero { padding: 40px 0 48px; }
  .hero-stats { gap: 22px; }
  .hero-stats strong { font-size: 1.3rem; }
  .hero-featured { grid-template-columns: 1fr; }
  .feat-card { min-height: 72px; }
  .section { padding: 52px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-head.center { align-items: center; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-tile { padding: 16px; }
  .product-grid, .catalog-wrap .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .shelf-grid > :nth-child(n+5) { display: none; }
  .shelf-grid > :nth-child(4) { display: flex; }
  .p-media { height: 100px; }
  .p-media .logo-tile { width: 52px; height: 52px; border-radius: 14px; }
  .p-body { padding: 12px; }
  .p-name { font-size: .95rem; }
  .p-tagline { display: none; }
  .p-foot { flex-direction: column; align-items: flex-start; gap: 0; margin: 8px 0 10px; }
  .p-price strong { font-size: 1rem; }
  .p-tags .tag { font-size: 10px; padding: 1px 6px; }
  .steps { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .toolbar { margin: 0 -16px; padding: 10px 16px; }
  .toolbar-end { width: 100%; }
  .toolbar-end .search-box { flex: 1; }
  .toolbar-end .search-box input { width: 100%; }
  .picker { padding: 16px; }
  .picked-row .btn { display: none; }
  .detail-wrap { padding-bottom: 110px; }
  .media-stage { aspect-ratio: 16 / 9; }
  .logo-tile.xl { width: 104px; height: 104px; border-radius: 26px; }
  .ring.r1 { width: 170px; height: 170px; }
  .ring.r2 { width: 230px; height: 230px; }
  .buy-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); box-shadow: 0 -10px 30px -16px rgba(0, 0, 0, .3);
  }
  .buy-bar:empty { display: none; }
  .buy-bar-info { min-width: 0; }
  .buy-bar-info small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .buy-bar-info strong { font-size: 1.2rem; color: var(--cta); }
  body:has(#view-detail:not([hidden])) .float-zalo { bottom: 84px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .modal { padding: 0; place-items: end stretch; }
  .modal-panel { max-width: none; border-radius: 22px 22px 0 0; max-height: 94dvh; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); }
  .co-pay { grid-template-columns: 1fr; }
  .qr-frame { max-width: 260px; margin: 0 auto; }
  .co-steps { font-size: 11.5px; }
}
.policy-intro { margin: 0 0 6px; color: var(--text-2); }
.policy-h3 { margin: 22px 0 10px; font-size: 1.02rem; font-weight: 700; }
.picked-foot a { color: var(--brand); text-decoration: underline; white-space: nowrap; }

/* ── Bán chéo / nâng cấp bảo hành (crosssell.js) ── */
.upsell { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-md); background: var(--ok-soft); border: 1px solid var(--border); font-size: 13.5px; color: var(--text); }
.upsell .btn { flex-shrink: 0; }
.co-xsell { margin: 14px 0 4px; padding: 12px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); text-align: left; }
.co-xsell p { margin: 0 0 8px; font-size: 13.5px; }
.co-xsell p small { color: var(--text-3); font-weight: 400; }
.co-xsell-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.co-xsell-item + .co-xsell-item { margin-top: 6px; }
.co-xsell-item small { color: var(--brand); font-weight: 700; white-space: nowrap; }
.co-xsell-item:hover { border-color: var(--brand); }

/* Mã giảm giá */
.co-discount { color: var(--ok); font-weight: 700; }
.co-discount small { color: var(--text-3); font-weight: 400; }

/* Mua kèm ưu đãi ở bước thanh toán */
.co-addons { margin: 12px 0 4px; padding: 12px; border-radius: var(--r-md); border: 1px dashed var(--brand); background: var(--surface-2); }
.co-addons-title { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.co-addons-title span { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 12px; }
.co-addon { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.co-addon + .co-addon { margin-top: 6px; }
.co-addon input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--brand); }
.co-addon-name { flex: 1; display: flex; flex-direction: column; font-weight: 700; font-size: 14px; }
.co-addon-name small { font-weight: 400; color: var(--text-3); font-size: 12.5px; }
.co-addon-price { white-space: nowrap; font-weight: 800; color: var(--ok); }
.co-addon-price s, .co-items s { color: var(--text-3); font-weight: 400; margin-right: 4px; }
.co-sum { margin-top: 10px; font-size: 14px; }
.co-sum > div { display: flex; justify-content: space-between; padding: 2px 0; }
.co-save b { color: var(--ok); }
.co-total { margin-top: 4px; padding-top: 6px !important; border-top: 1px solid var(--border); }
.co-total b { font-size: 16px; }
.co-addon-price { display: flex; flex-direction: column; align-items: flex-end; }
.co-addon-save { color: var(--ok); font-weight: 700; font-size: 12px; }
.co-addons-note { display: block; margin-top: 6px; color: var(--text-3); font-size: 12px; }
.co-items { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); }
.co-items li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 14px; }
.co-items li + li { border-top: 1px solid var(--border); }
.co-items li span { display: flex; flex-direction: column; font-weight: 700; }
.co-items li small { font-weight: 400; color: var(--text-3); }

/* Nội dung dựng sẵn của trang tĩnh SEO (scripts/seo-build.js) — hiện tới khi SPA tải xong catalog */
.prerender { padding: 8px 0 32px; }
.prerender p { color: var(--text-2); line-height: 1.6; max-width: 72ch; }
.prerender-table { width: 100%; max-width: 760px; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.prerender-table th, .prerender-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.prerender-table td:last-child, .prerender-table th:last-child { text-align: right; white-space: nowrap; font-weight: 700; }
.prerender-table tr.is-out td { color: var(--text-3); }
.prerender-list { grid-column: 1 / -1; columns: 2 260px; padding-left: 18px; line-height: 1.9; }
.prerender-list a { font-weight: 600; }
.product-grid > .prerender { grid-column: 1 / -1; }

/* Mô tả sản phẩm nhiều dòng (DK.richText, tab MO_TA_SP) */
.rich { max-width: 820px; color: var(--text-2); line-height: 1.65; }
.rich p { margin: 0 0 12px; }
.rich h3 { font-size: 1.02rem; font-weight: 800; color: var(--text); margin: 18px 0 8px; }
.rich ul { margin: 0 0 12px; padding-left: 20px; }
.rich li { margin: 4px 0; }

/* Bài hướng dẫn (content/huong-dan) */
.article { padding-top: 24px; }
.article .page-title { margin: 12px 0 8px; }
.article .page-sub { margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.article p { color: var(--text-2); line-height: 1.7; }

/* Giỏ hàng (assets/js/cart.js) */
.cart-btn { position: relative; }
.cart-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--cta); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.picked-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.btn-icon-cart { display: inline-flex; align-items: center; gap: 2px; padding-inline: 12px; }
.btn-icon-cart svg { width: 20px; height: 20px; }
.btn-icon-cart span { font-weight: 800; }
.cart-lines { list-style: none; margin: 14px 0 6px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-md); }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; }
.cart-line + .cart-line { border-top: 1px solid var(--border); }
.cart-line-info { display: flex; flex-direction: column; min-width: 0; }
.cart-line-info a { color: inherit; text-decoration: none; }
.cart-line-info small { color: var(--text-3); font-size: 12.5px; }
.cart-qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.cart-qty button { width: 30px; height: 30px; border: 0; background: var(--surface-2); color: var(--text); font-weight: 800; cursor: pointer; }
.cart-qty button:disabled { opacity: .4; cursor: not-allowed; }
.cart-qty span { min-width: 26px; text-align: center; font-weight: 700; }
.cart-line-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.cart-remove { border: 0; background: none; color: var(--text-3); font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline; }
.co-cart-note { margin: 6px 0 0; font-size: 13px; color: var(--text-2); }
.co-item-state { font-size: 12px; font-weight: 700; }
.co-item-state.ok { color: var(--ok, #0a7c66); }
@media (max-width: 520px) {
  .cart-line { grid-template-columns: 1fr auto; }
  .cart-line-price { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; }
}
