/* ReLoop — design system & components
   Tokens follow CLAUDE.md §7. Mobile-first: base styles target phones,
   breakpoints at 640 / 900 / 1100px widen the layout. */

:root {
  --primary: #4aa8a2;
  --primary-hover: #3d958f;
  --primary-dark: #1f5c55;
  --primary-soft: #e3efed;
  --surface-muted: #e6efee;
  --surface-footer: #e4eeec;
  --bg: #f4f4f4;
  --card: #ffffff;
  --text: #1f2a2a;
  --text-2: #4d5756;
  --muted: #7a8584;
  --line: #e3e7e6;
  --line-2: #d6dddc;
  --danger: #e5484d;
  --danger-soft: #fdecec;
  --warning: #c98a12;
  --warning-soft: #fdf3dc;
  --badge-dark: #2b3533;
  --coin: #d9961f;
  --coin-soft: #fdf3e1;
  --online: #31b26b;        /* chat "Đang hoạt động" dot */
  --online-text: #1d8a4f;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 40, 38, 0.04);
  --shadow: 0 6px 24px rgba(16, 40, 38, 0.08);
  --shadow-lg: 0 18px 50px rgba(16, 40, 38, 0.18);
  --container: 1296px;
  --gutter: 16px;
  --header-h: 60px;
  --bottom-nav-h: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 640px) { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 40px; --header-h: 64px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.text-primary { color: var(--primary); }
.stack > * + * { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: #fff; color: var(--danger); border-color: #f3c3c4; }
.btn-block { width: 100%; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 7px; }
.btn[disabled], .btn.is-disabled { background: #dfe3e2; color: #8b9492; border-color: #dfe3e2; cursor: not-allowed; }
.link { color: var(--primary); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ---------- Chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 500; color: var(--text);
  transition: all .2s;
}
.chip:hover { border-color: var(--primary); }
.chip.is-active, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips-scroll::-webkit-scrollbar { display: none; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.4; white-space: nowrap;
}
.badge-teal { background: var(--primary-soft); color: var(--primary-hover); }
.badge-gray { background: #eceeee; color: #6c7574; }
.badge-dark { background: var(--badge-dark); color: #fff; }
.badge-warn { background: var(--warning-soft); color: var(--warning); }
.badge-ai { background: var(--primary-soft); color: var(--primary-dark); }
.badge-ai::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; height: var(--header-h); gap: 16px; }
.logo { display: inline-flex; align-items: center; flex: none; min-height: 44px; }
.logo img { display: block; height: 36px; width: auto; }
.logo svg { width: 26px; height: 26px; flex: none; }
.main-nav { display: none; gap: 28px; margin-left: 36px; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--text-2); position: relative; padding: 6px 0; }
.main-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); transform: scaleX(0); transition: transform .25s var(--ease); }
.main-nav a:hover, .main-nav a.is-active { color: var(--text); }
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.header-actions .login-link { display: none; font-weight: 700; font-size: 14px; padding: 8px 4px; }
.header-actions .btn { min-height: 38px; padding: 0 18px; }
.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; border-radius: 10px; }
.icon-btn:hover { background: var(--surface-muted); }
.icon-btn svg { width: 22px; height: 22px; }
.user-menu { position: relative; }
.user-menu > button { display: flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 4px; border-radius: 999px; min-height: 44px; }
.user-menu .avatar { width: 34px; height: 34px; }
.user-menu .name { display: none; font-weight: 600; font-size: 13.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 6px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .18s var(--ease), transform .18s var(--ease);
  z-index: 60;
}
.dropdown.is-open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 10px 12px; min-height: 44px; border-radius: 8px; border: 0; background: none; font-size: 14px; font-weight: 500; color: var(--text); text-align: left; white-space: nowrap; }
.dropdown svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.dropdown a:hover svg, .dropdown button:hover svg { color: var(--primary); }
.dropdown a:hover, .dropdown button:hover { background: var(--bg); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.header-sell { display: none !important; }
.menu-toggle { margin-left: -8px; }
/* Coins wallet pill: balance (→ Ví Xu) + quick top-up (→ Ví Xu #nap). Mobile shows "+" only. */
.coin-pill { display: flex; align-items: center; height: 44px; border-radius: 999px; background: var(--coin-soft); flex: none; }
.coin-pill a { display: flex; align-items: center; height: 44px; color: var(--text); }
.coin-bal { gap: 5px; padding: 0 4px 0 12px; font-size: 14px; }
.coin-bal b { font-weight: 700; font-variant-numeric: tabular-nums; }
.coin-unit { font-size: 12px; color: var(--text-2); }
.coin-ico svg { width: 18px; height: 18px; display: block; color: var(--coin); }
.coin-add { justify-content: center; width: 44px; border-radius: 999px; }
.coin-add svg { width: 26px; height: 26px; padding: 5px; border-radius: 999px; background: var(--coin); color: #fff; stroke-width: 2.6; }
.coin-add span { display: none; }
.coin-add:hover svg { background: #c4851a; }
/* Phones: logged-in header = menu · logo · coins pill (search lives in the bottom nav → Khám phá) */
@media (max-width: 639.98px) {
  .hide-xs { display: none !important; }
  .coin-unit { display: none; }
}

@media (min-width: 900px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .header-actions .login-link { display: inline-block; }
  .header-sell { display: inline-flex !important; }
  .user-menu .name { display: block; }
  .coin-pill { height: 38px; }
  .coin-pill a { height: 38px; }
  .coin-add { width: auto; gap: 6px; padding: 0 14px 0 6px; margin-left: 4px; background: var(--coin); color: #fff !important; font-size: 13.5px; font-weight: 700; }
  .coin-add svg { width: 16px; height: 16px; padding: 0; background: none; }
  .coin-add span { display: inline; }
  .coin-add:hover { background: #c4851a; }
  .coin-add:hover svg { background: none; }
}

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 30, 28, 0.45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 90; top: 0; bottom: 0; left: 0; width: min(86vw, 340px);
  background: #fff; box-shadow: var(--shadow-lg); padding: 16px 16px 24px;
  transform: translateX(-102%); transition: transform .3s var(--ease), visibility .3s; overflow-y: auto; visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer.drawer-right { left: auto; right: 0; transform: translateX(102%); }
.drawer.drawer-right.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer nav a { display: flex; align-items: center; gap: 12px; padding: 12px 10px; min-height: 44px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.drawer nav a svg { width: 20px; height: 20px; flex: none; }
.drawer nav a:hover, .drawer nav a.is-active { background: var(--surface-muted); color: var(--primary-dark); }
.drawer .drawer-section { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 16px 10px 4px; }

/* Bottom nav (mobile only) */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 500; color: var(--muted); padding: 6px 0; min-height: 44px; justify-content: center; position: relative; }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.is-active { color: var(--primary-dark); }
.bottom-nav .fab { width: 46px; height: 46px; border-radius: 50%; background: var(--primary-dark); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(31, 92, 85, .35); margin-top: -18px; }
.bottom-nav .fab svg { width: 24px; height: 24px; }
.bottom-nav .dot { position: absolute; top: 4px; right: calc(50% - 16px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; display: grid; place-items: center; padding: 0 4px; }
body.has-bottom-nav { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .bottom-nav { display: none; }
  body.has-bottom-nav { padding-bottom: 0; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--surface-footer); margin-top: 64px; padding: 40px 0 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
.footer-grid h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.footer-grid li + li { margin-top: 8px; }
.footer-grid a { color: var(--muted); font-size: 13px; }
.footer-grid a:hover { color: var(--primary-dark); }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid #d3e0de; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
@media (min-width: 900px) {
  .site-footer { margin-top: 80px; padding: 48px 0 40px; min-height: 300px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Generic sections ---------- */
.page { padding-top: 20px; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.breadcrumb { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb a:hover { color: var(--primary); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-size: 13px; font-weight: 500; margin-top: 8px; min-height: 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
@media (min-width: 900px) {
  .page { padding-top: 24px; }
  .section { margin-top: 56px; }
  .section-title { font-size: 22px; }
  .page-title { font-size: 28px; }
}

/* ---------- Hero ---------- */
/* Full-bleed mint background with soft waves; artwork (assets/hero/) cut from the brand banner. */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(70% 60% at 100% 30%, #dcece6 0, rgba(220, 236, 230, 0) 70%),
    radial-gradient(60% 50% at 0% 100%, #d9eae4 0, rgba(217, 234, 228, 0) 70%),
    linear-gradient(180deg, #f6f8f5 0%, #eef5f1 70%, #e2efe9 100%);
  padding: 36px 0 56px;
}
/* Light wave band + curved cut into the page background */
.hero::before, .hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: -1; }
.hero::before { height: 46%; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 260' preserveAspectRatio='none'%3E%3Cpath d='M0 120C220 40 420 60 640 120s460 90 800-30V260H0Z' fill='%23d6e9e2' fill-opacity='.55'/%3E%3Cpath d='M0 170c260-70 520-40 760 10s440 40 680-40V260H0Z' fill='%23cfe5dd' fill-opacity='.5'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.hero::after { height: 40px; z-index: 1; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V10C360 34 1080 34 1440 0v40Z' fill='%23f4f4f4'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.hero-leaf { position: absolute; top: -10px; left: -20px; width: 70px; height: auto; opacity: .85; pointer-events: none; z-index: 0; }
.hero-inner { position: relative; }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { font-size: 30px; line-height: 1.16; font-weight: 800; letter-spacing: -0.03em; max-width: 14em; color: #1d2b29; }
.hero p { margin-top: 12px; color: var(--muted); font-size: 14px; max-width: 46em; }
.hero-search { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.hero-search .input { background: #fff; border-color: #fff; height: 52px; box-shadow: 0 6px 20px rgba(31, 92, 85, .08); }
.hero-search .btn { height: 52px; gap: 10px; }
.hero-art { margin: 24px -16px -24px; }
.hero-art img { display: block; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%), linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
          mask-composite: intersect; }
@media (min-width: 640px) {
  .hero-search { flex-direction: row; }
  .hero-search .input { flex: 1; }
  .hero-search .btn { padding: 0 24px; }
  .hero-art { max-width: 640px; margin: 24px auto -24px; }
  .hero-leaf { width: 110px; }
}
@media (min-width: 1100px) {
  .hero { padding: 0; min-height: 500px; display: flex; align-items: center; }
  .hero-inner { position: static; width: 100%; padding-top: 64px; padding-bottom: 96px; }
  .hero-copy { max-width: 560px; }
  .hero h1 { font-size: 42px; }
  .hero p { font-size: 16px; margin-top: 16px; }
  .hero-search { margin-top: 48px; gap: 16px; max-width: 620px; }
  .hero-search .input { max-width: 420px; }
  .hero-search .btn { min-width: 200px; }
  .hero-art { position: absolute; top: 0; right: 0; bottom: 0; margin: 0; max-width: none; width: min(50vw, 820px); z-index: 0; }
  .hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: left center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%), linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent 100%);
    -webkit-mask-composite: source-in;
            mask-image: linear-gradient(90deg, transparent 0, #000 22%), linear-gradient(180deg, transparent 0, #000 12%, #000 90%, transparent 100%);
            mask-composite: intersect; }
  .hero-leaf { width: 150px; top: -16px; left: -12px; }
}
@media (min-width: 1280px) { .hero h1 { font-size: 48px; } .hero-copy { max-width: 620px; } }
@media (min-width: 1440px) { .hero h1 { font-size: 52px; } .hero-copy { max-width: 660px; } }

/* Category circles */
.cat-row { display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-item { flex: none; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; min-width: 64px; }
.cat-circle { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: #ddebe6; display: grid; place-items: center; transition: transform .25s var(--ease), box-shadow .25s; }
.cat-circle img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.cat-circle svg { width: 30px; height: 30px; color: var(--primary); opacity: .75; }
.cat-item:hover .cat-circle { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(31, 92, 85, .14); }
@media (min-width: 900px) { .cat-row { gap: 36px; } .cat-circle { width: 96px; height: 96px; } .cat-item { font-size: 15px; } }

/* ---------- Product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px 16px; } .product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } .mini-products { max-width: 480px; } }
@media (min-width: 1100px) { .product-grid.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 28px 24px; } .product-grid.cols-3 { gap: 28px 20px; } }

.product-card { display: block; position: relative; }
.product-media {
  position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-muted);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product-media .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.product-media .ph svg { width: 42%; height: auto; opacity: .9; transition: transform .5s var(--ease); }
.product-card:hover .product-media img, .product-card:hover .product-media .ph svg { transform: scale(1.04); }
.product-media .badge { position: absolute; top: 10px; right: 10px; }
.product-card.is-sold .product-media { filter: grayscale(.35); opacity: .85; }
.product-info { padding-top: 10px; }
.product-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-price { color: var(--primary); font-weight: 700; font-size: 15px; margin-top: 8px; }
.product-meta { color: var(--muted); font-size: 12px; margin-top: 6px; }
.product-time { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 4px; }
.new-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-hover); font-size: 11px; font-weight: 700; }
@media (min-width: 900px) { .product-info { padding-top: 14px; } .product-title { font-size: 14px; } .product-price { font-size: 16px; margin-top: 16px; } .product-meta { margin-top: 12px; } }

/* ---------- Lia banner ---------- */
.lia-banner {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; display: grid; gap: 20px; position: relative; overflow: hidden;
}
.lia-banner-main { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.lia-avatar { position: relative; flex: none; width: 128px; height: 128px; border-radius: 50%; overflow: hidden; background: var(--surface-muted); }
.lia-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.lia-banner h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-top: 8px; }
.lia-banner p { color: var(--muted); font-size: 13px; margin-top: 6px; max-width: 30em; }
.lia-banner .lia-cta { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-label { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.mini-products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-product .product-media { aspect-ratio: 5 / 6; border-radius: 10px; }
.mini-product .product-title { font-size: 11.5px; margin-top: 8px; }
.mini-product .product-price { font-size: 12px; margin-top: 4px; }
@media (min-width: 900px) {
  .lia-banner { grid-template-columns: 1fr minmax(0, 400px); align-items: center; padding: 28px 28px 28px 40px; min-height: 360px; gap: 32px; }
  .lia-banner-main { flex-direction: row; align-items: center; gap: 48px; }
  .lia-avatar { width: 240px; height: 240px; }
  .lia-banner h2 { font-size: 24px; margin-top: 12px; }
  .lia-banner p { font-size: 14px; }
  .mini-products { gap: 14px; }
}
.lia-tag {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  background: rgba(31, 92, 85, .88); color: #fff; font-size: 9.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
@media (min-width: 900px) { .lia-tag { bottom: 18px; font-size: 11px; padding: 4px 10px; } }

/* Trust cards */
.trust-grid { display: grid; gap: 12px; }
.trust-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 14px; }
.trust-card .ico { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--surface-muted); color: var(--primary); display: grid; place-items: center; }
.trust-card .ico svg { width: 22px; height: 22px; }
.trust-card h3 { font-size: 14.5px; font-weight: 700; }
.trust-card p { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
@media (min-width: 900px) { .trust-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } .trust-card { padding: 24px; min-height: 136px; } }

/* ---------- Forms ---------- */
.field { display: block; }
.field + .field { margin-top: 16px; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 16px; transition: border-color .2s, box-shadow .2s; appearance: none;
}
@media (min-width: 900px) { .input, .select, .textarea { font-size: 14px; } }
.input::placeholder, .textarea::placeholder { color: #a3abaa; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 168, 162, .15); }
.textarea { min-height: 104px; resize: vertical; }
.select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8584' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 64px; }
.input-wrap .toggle-pw { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--primary); font-size: 12.5px; font-weight: 600; padding: 8px 10px; min-height: 36px; }
.input-suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 6px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 72, 77, .08); }
.error-text { display: none; color: var(--danger); font-size: 12px; margin-top: 6px; }
.field.has-error .error-text { display: block; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-2); cursor: pointer; min-height: 24px; }
.checkbox input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--primary); flex: none; }
.form-alert { display: none; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 13px; margin-bottom: 14px; }
.form-alert.is-visible { display: block; }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 32px 16px 48px; }
.auth-page .logo { margin-bottom: 24px; }
.auth-page .logo img { height: 48px; }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 22px; box-shadow: var(--shadow-sm); }
.auth-card h1 { font-size: 22px; font-weight: 700; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin: 4px 0 22px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--muted); margin-top: 18px; }
.auth-row { display: flex; justify-content: flex-end; margin-top: 8px; }
.demo-hint { margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--surface-muted); font-size: 12px; color: var(--text-2); }
@media (min-width: 640px) { .auth-page { padding-top: 64px; } .auth-card { padding: 32px; } }

/* ---------- Product list page ---------- */
.list-layout { display: grid; gap: 20px; margin-top: 16px; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.filter-group + .filter-group { margin-top: 20px; }
.filter-group h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.filter-group .checkbox { padding: 4px 0; }
.list-toolbar { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.filter-btn { display: inline-flex; }
.filters-desktop { display: none; }
.empty-state { text-align: center; padding: 72px 16px; display: flex; flex-direction: column; align-items: center; }
.empty-state .ico { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-muted); display: grid; place-items: center; color: var(--primary); margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; font-weight: 700; }
.empty-state p { color: var(--muted); font-size: 13px; margin: 6px 0 18px; }
.load-more { display: flex; justify-content: center; margin-top: 32px; }
@media (min-width: 900px) {
  .list-layout { grid-template-columns: 256px 1fr; gap: 24px; align-items: start; min-height: 720px; }
  .filters { padding: 20px 22px; }
  .filters-desktop { display: block; position: sticky; top: calc(var(--header-h) + 16px); }
  .filter-btn { display: none; }
}

/* ---------- Product detail ---------- */
.detail-layout { display: grid; gap: 24px; margin-top: 16px; }
.gallery-main { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-muted); }
.gallery-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; position: relative; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-slide .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.gallery-slide .ph svg { width: 36%; }
.gallery-main > .badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.gallery-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px rgba(0,0,0,.08); transition: all .2s; }
.gallery-dots span.is-active { width: 18px; border-radius: 3px; background: var(--primary); }
.thumbs { display: none; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-muted); border: 1.5px solid #d9e4e2; padding: 0; }
.thumb.is-active { border: 2px solid var(--primary); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.thumb .ph svg { width: 40%; }
.thumb .badge { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 2px 8px; }
.detail-info .badge { margin-bottom: 8px; }
.detail-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.detail-price { color: var(--primary); font-size: 24px; font-weight: 700; margin-top: 8px; }
.spec-table { margin-top: 20px; border-top: 1px solid var(--line); }
.spec-table div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.spec-table dt { color: var(--muted); }
.spec-table dd { margin: 0; font-weight: 600; text-align: right; }
.detail-block { margin-top: 20px; }
.detail-block h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.detail-block p { color: var(--text-2); font-size: 13.5px; }
.seller-card { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-top: 20px; }
.seller-card .avatar { width: 44px; height: 44px; }
.seller-card .name { font-weight: 700; font-size: 14px; }
.seller-card .meta { color: var(--muted); font-size: 12.5px; }
.seller-card .rating { margin-left: auto; font-size: 12.5px; color: var(--warning); font-weight: 600; white-space: nowrap; }
.detail-actions { display: grid; gap: 10px; margin-top: 16px; }
.detail-actions.two { grid-template-columns: 1fr 1fr; }
.lia-tip { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-muted); border-radius: var(--radius); padding: 14px; margin-top: 20px; font-size: 12.5px; color: var(--text-2); }
.lia-tip img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: center 18%; flex: none; }
.lia-tip b { color: var(--primary-dark); }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom)); z-index: 55; background: #fff; border-top: 1px solid var(--line); padding: 10px var(--gutter); display: flex; gap: 10px; align-items: center; box-shadow: 0 -6px 20px rgba(0,0,0,.05); }
.sticky-cta .price { font-weight: 700; color: var(--primary); font-size: 16px; }
.sticky-cta .btn { flex: 1; }
body.has-sticky-cta main { padding-bottom: 72px; }
.preview-banner { background: var(--primary-soft); border: 1px solid #b9dad6; color: var(--primary-dark); border-radius: 10px; padding: 12px 16px; font-size: 13px; font-weight: 500; margin-top: 16px; }
@media (min-width: 900px) {
  .detail-layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
  .detail-info { position: sticky; top: calc(var(--header-h) + 16px); }
  .thumbs { display: grid; }
  .gallery-dots { display: none; }
  .gallery-track { overflow: hidden; }
  .detail-title { font-size: 28px; }
  .detail-price { font-size: 26px; }
  .sticky-cta { display: none; }
  body.has-sticky-cta main { padding-bottom: 0; }
}

/* ---------- Modal & sheet ---------- */
.modal-root { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.modal-root[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 35, 33, .5); animation: fadeIn .2s ease; }
.modal {
  position: relative; width: 100%; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 20px 20px 0 0; padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
  animation: sheetUp .3s var(--ease);
}
.modal h2 { font-size: 18px; font-weight: 700; padding-right: 36px; }
.modal .sub { color: var(--muted); font-size: 12.5px; margin: 6px 0 18px; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal .grabber { width: 40px; height: 4px; border-radius: 2px; background: #d5dcdb; margin: -8px auto 14px; }
@media (min-width: 640px) {
  .modal-root { align-items: center; padding: 24px; }
  .modal { max-width: 440px; border-radius: var(--radius-lg); padding: 24px; animation: popIn .25s var(--ease); }
  .modal .grabber { display: none; }
}
@keyframes fadeIn { from { opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.address-box { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; font-size: 13px; }
.address-box .ico { color: var(--primary); flex: none; margin-top: 1px; }
.address-box .ico svg { width: 18px; height: 18px; }
.address-box .who { font-weight: 600; }
.address-box .line { color: var(--text-2); margin-top: 2px; }
.address-box .change { margin-left: auto; color: var(--primary); font-weight: 600; font-size: 12.5px; border: 0; background: none; padding: 4px; white-space: nowrap; }
.address-options { display: grid; gap: 8px; margin-top: 8px; }
.address-option { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-size: 13px; }
.address-option input { accent-color: var(--primary); margin-top: 3px; }
.address-option:has(input:checked) { border-color: var(--primary); background: #f3f9f8; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; z-index: 120; top: calc(var(--header-h) + 12px); right: 12px; left: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--badge-dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; display: flex; gap: 8px; align-items: center; box-shadow: var(--shadow); animation: toastIn .3s var(--ease); pointer-events: auto; max-width: 100%; }
.toast svg { width: 16px; height: 16px; color: #8fe0d7; flex: none; }
.toast.is-leaving { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }

/* New-message card (App: showMessagePopup) — under the header, above page content, below drawers/modals */
.msg-pop { position: fixed; z-index: 70; top: calc(var(--header-h) + 10px); left: 12px; right: 12px; display: flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); box-shadow: var(--shadow); animation: toastIn .35s var(--ease); }
.msg-pop.is-leaving { animation: toastOut .25s ease forwards; }
.msg-pop-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 4px 12px 14px; color: inherit; }
.msg-pop-av { position: relative; flex: none; display: flex; }
.msg-pop-av .avatar { width: 42px; height: 42px; font-size: 14px; }
.msg-pop-av .ico { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; border: 2px solid #fff; display: grid; place-items: center; }
.msg-pop-av .ico svg { width: 12px; height: 12px; }
.msg-pop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.msg-pop-body b { font-size: 14px; color: var(--text); }
.msg-pop-body .pv { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-pop-body .more { font-size: 12px; color: var(--primary-dark); }
.msg-pop-close { flex: none; width: 44px; height: 44px; margin-right: 4px; color: var(--muted); }
.msg-pop-link:hover b { color: var(--primary-dark); }
@media (min-width: 640px) { .msg-pop { left: auto; right: 24px; width: 380px; } }
@media (min-width: 900px) { .toast-stack { left: auto; right: max(24px, calc((100vw - var(--container)) / 2)); align-items: flex-end; } }

/* ---------- Avatar ---------- */
.avatar { border-radius: 50%; background: var(--surface-muted); color: var(--primary-dark); display: grid; place-items: center; font-weight: 700; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Seller (Kênh bán) layout ---------- */
.seller-shell { min-height: 100vh; }
.seller-sidebar { display: none; }
.seller-topbar { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.seller-topbar .bar { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 var(--gutter); }
.seller-topbar .title { font-weight: 700; font-size: 16px; }
.seller-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 var(--gutter) 10px; scrollbar-width: none; }
.seller-tabs::-webkit-scrollbar { display: none; }
.seller-tabs a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--bg); min-height: 36px; display: inline-flex; align-items: center; }
.seller-tabs a.is-active { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.seller-main { padding: 20px var(--gutter) 40px; }
.seller-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); transition: background .2s; }
.sidebar-nav a:hover { background: var(--bg); }
.sidebar-nav a.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.sidebar-nav a + a { margin-top: 4px; }
.sidebar-nav .count { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 999px; padding: 0 7px; line-height: 18px; }
@media (min-width: 900px) {
  .seller-shell { display: grid; grid-template-columns: 220px 1fr; }
  .seller-sidebar { display: flex; flex-direction: column; background: #fff; border-right: 1px solid var(--line); padding: 28px 16px; position: sticky; top: 0; height: 100vh; }
  .seller-sidebar .logo { margin: 0 8px 32px; }
  .seller-sidebar .side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 16px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
  .seller-topbar { display: none; }
  .seller-main { padding: 36px 40px 64px; max-width: 1180px; }
}

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: block; transition: border-color .2s, transform .2s var(--ease); }
.stat-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.stat-card .k { color: var(--muted); font-size: 12.5px; }
.stat-card .v { font-size: 26px; font-weight: 700; text-align: center; margin-top: 4px; }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } .stat-card { padding: 16px 18px 18px; } .stat-card .v { font-size: 30px; } }

/* Data table that collapses into cards on mobile */
.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dtable { width: 100%; border-collapse: collapse; }
.dtable thead { display: none; }
.dtable tr { display: grid; grid-template-columns: 56px 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.dtable tr:last-child { border-bottom: 0; }
.dtable td { display: block; padding: 0; font-size: 13px; }
.dtable td.c-thumb { grid-row: span 3; align-self: start; }
.dtable td.c-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dtable td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
.dtable .thumb-sm { width: 56px; height: 56px; border-radius: 8px; background: var(--surface-muted); overflow: hidden; display: grid; place-items: center; }
.dtable .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.dtable .thumb-sm svg { width: 55%; }
.dtable .t-name { font-weight: 600; }
.dtable .t-price { color: var(--primary); font-weight: 700; }
.dtable .t-muted { color: var(--muted); }
@media (min-width: 900px) {
  .dtable thead { display: table-header-group; }
  .dtable th { text-align: left; font-size: 11.5px; font-weight: 500; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; }
  .dtable tr { display: table-row; padding: 0; }
  .dtable td { display: table-cell; padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid var(--line); }
  .dtable tr:last-child td { border-bottom: 0; }
  .dtable td[data-label]::before { content: none; }
  .dtable td.c-thumb { width: 72px; padding-right: 0; }
  .dtable td.c-actions { display: table-cell; margin: 0; text-align: right; white-space: nowrap; }
  .dtable td.c-actions .btn + .btn { margin-left: 6px; }
  .dtable .thumb-sm { width: 40px; height: 40px; }
  .dtable tbody tr { transition: background .15s; }
  .dtable tbody tr:hover { background: #fafbfb; }
}
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .grow { flex: 1; }
.toolbar .search { min-width: 0; width: 100%; }
@media (min-width: 900px) { .toolbar .search { width: 260px; } }

/* Stepper */
.stepper { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.stepper .chip { min-height: 34px; font-size: 12.5px; font-weight: 600; }
.stepper .chip.is-done { background: var(--primary-soft); border-color: var(--primary-soft); color: var(--primary-dark); }

.form-narrow { max-width: 620px; }
.upload-zone { border: 1.5px dashed #b6cfcc; border-radius: var(--radius); background: #fafcfc; padding: 28px 16px; text-align: center; transition: all .2s; }
.upload-zone.is-drag { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone p { color: var(--muted); font-size: 12.5px; }
.upload-zone .btn { margin: 10px 0; }
.upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .upload-grid { grid-template-columns: repeat(5, 1fr); } }
.upload-item { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-muted); border: 1px solid #d9e4e2; }
.upload-item img { width: 100%; height: 100%; object-fit: cover; }
.upload-item .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--badge-dark); color: #fff; border: 0; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.upload-item .flag { position: absolute; left: 6px; bottom: 6px; border: 0; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--text-2); font-weight: 600; }
.upload-item .flag.on { background: var(--badge-dark); color: #fff; }
.checklist { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.checklist h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.checklist h3 img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; object-position: center 18%; }
.checklist li { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); margin-top: 10px; }
.checklist li svg { width: 16px; height: 16px; color: var(--primary); flex: none; margin-top: 2px; }
.create-layout { display: grid; gap: 24px; }
@media (min-width: 1100px) { .create-layout { grid-template-columns: minmax(0, 620px) 280px; gap: 32px; align-items: start; } .create-layout aside { position: sticky; top: 24px; } }
/* "Đăng nhanh với AI (Chụp 1 chạm)" on dang-san-pham.html — opt-in card above the form + modal + AI hints */
.ai-quick { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; margin-bottom: 22px; padding: 14px; border-radius: var(--radius); border: 1px solid #b9dad6; background: linear-gradient(135deg, var(--primary-soft), #f6fbfa 60%); }
.ai-quick-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.ai-quick-ico svg { width: 22px; height: 22px; }
.ai-quick-text b { display: block; font-size: 14.5px; color: var(--primary-dark); }
.ai-quick-text span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.ai-quick-btn { grid-column: 1 / -1; min-height: 44px; gap: 8px; }
.ai-quick-btn svg { width: 18px; height: 18px; }
.ai-quick.is-done { background: #fff; border-left: 4px solid var(--primary); }
.ai-quick.is-done .ai-quick-btn { background: #fff; color: var(--primary-dark); border: 1px solid #b9dad6; }
@media (min-width: 640px) { .ai-quick { grid-template-columns: auto 1fr auto; padding: 16px 18px; } .ai-quick-btn { grid-column: auto; } }
.ai-modal h2 { display: flex; align-items: center; gap: 8px; }
.ai-modal h2 svg { width: 20px; height: 20px; color: var(--primary); }
.ai-modal > .hint { margin-top: 14px; }
.ai-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 34px 16px; }
.ai-pick svg { width: 34px; height: 34px; color: var(--primary); margin-bottom: 6px; }
.ai-pick b { font-size: 14.5px; color: var(--primary-dark); }
.ai-pick span { font-size: 12.5px; color: var(--muted); }
.ai-pick:hover { border-color: var(--primary); background: var(--primary-soft); }
.ai-run { display: flex; gap: 16px; align-items: center; }
.ai-thumb { width: 96px; height: 120px; flex: none; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.ai-steps { display: flex; flex-direction: column; gap: 12px; font-size: 13.5px; color: var(--muted); }
.ai-steps li { display: flex; align-items: center; gap: 10px; }
.ai-steps .mark { width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.ai-steps .is-active { color: var(--text); font-weight: 600; }
.ai-steps .is-active .mark { border-color: var(--primary-soft); border-top-color: var(--primary); animation: spin .9s linear infinite; }
.ai-steps .is-done { color: var(--primary-dark); }
.ai-steps .is-done .mark { border-color: var(--primary); background: var(--primary); color: #fff; }
.ai-steps .mark svg { width: 12px; height: 12px; }
@media (prefers-reduced-motion: reduce) { .ai-steps .is-active .mark { animation-duration: 2.5s !important; animation-iteration-count: infinite !important; } }
.ai-error { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px; border-radius: 10px; background: var(--danger-soft); font-size: 13px; color: var(--text-2); }
.ai-error b { color: var(--danger); }
.ai-error .btn { margin-top: 6px; }
.ai-price-hint { margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: #fff8e8; border: 1px solid #f1dfb2; color: #6b5317; font-size: 13px; }
.ai-price-hint b { color: var(--text); }
.ai-price-hint span { display: block; font-size: 12px; margin-top: 2px; color: var(--muted); }
.ai-price-hint .btn { margin-top: 8px; min-height: 36px; background: #fff; border: 1px solid #f1dfb2; color: #6b5317; }
.ai-modal .ai-orig { margin-bottom: 14px; }
.ai-note { margin-top: 6px; font-size: 12px; color: var(--primary-dark); }
.field.is-ai .input, .field.is-ai .select, .field.is-ai .textarea { border-color: #9fcfca; background-color: #f4fbfa; } /* -color: keeps the select arrow image */

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.form-actions .btn-primary { min-width: 150px; }

/* ---------- Account page ---------- */
.account-layout { display: grid; gap: 20px; margin-top: 16px; }
.account-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; text-align: center; }
.account-side .avatar { width: 88px; height: 88px; margin: 0 auto; font-size: 28px; }
.account-side .who { font-weight: 700; font-size: 17px; margin-top: 12px; }
.account-side .role { color: var(--muted); font-size: 12.5px; }
.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.account-stats b { display: block; font-size: 18px; }
.account-stats span { color: var(--muted); font-size: 11.5px; }
.account-tabs { margin-top: 16px; text-align: left; }
.account-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.account-panel h2 { font-size: 18px; font-weight: 700; }
.info-list { margin-top: 12px; }
.info-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child { border-bottom: 0; }
.info-row .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-muted); color: var(--primary); display: grid; place-items: center; flex: none; }
.info-row .ico svg { width: 18px; height: 18px; }
.info-row .k { color: var(--muted); font-size: 12px; }
.info-row .v { font-weight: 600; font-size: 14px; margin-top: 2px; word-break: break-word; }
.avatar-edit { position: relative; width: 96px; height: 96px; margin: 0 auto 20px; }
.avatar-edit .avatar { width: 96px; height: 96px; font-size: 30px; }
.avatar-edit label { position: absolute; right: 0; bottom: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-dark); color: #fff; display: grid; place-items: center; border: 3px solid #fff; cursor: pointer; }
.avatar-edit label svg { width: 15px; height: 15px; }
.addr-card { border: 1px solid var(--line-2); border-radius: var(--radius); padding: 14px 16px; display: flex; gap: 12px; }
.addr-card + .addr-card { margin-top: 10px; }
.addr-card.is-default { border-color: var(--primary); background: #f6fbfa; }
.addr-card .who { font-weight: 700; font-size: 14px; }
.addr-card .phone { color: var(--text-2); font-size: 13px; }
.addr-card .line { color: var(--muted); font-size: 13px; margin-top: 4px; }
.addr-card .acts { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.add-addr { width: 100%; margin-top: 12px; border: 1.5px dashed #b6cfcc; background: #fafcfc; color: var(--primary); font-weight: 600; border-radius: var(--radius); min-height: 52px; }
.grid-2 { display: grid; gap: 16px; }
.grid-2 .field + .field { margin-top: 0; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .account-layout { grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
  .account-side { position: sticky; top: calc(var(--header-h) + 16px); padding: 28px 24px; }
  .account-panel { padding: 28px 32px; }
}

/* ---------- Request detail ---------- */
.req-grid { display: grid; gap: 16px; }
.req-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.req-section h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 10px; }
.req-product { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.req-product .thumb-sm { width: 52px; height: 52px; border-radius: 8px; background: var(--surface-muted); overflow: hidden; display: grid; place-items: center; flex: none; }
.req-product .thumb-sm svg { width: 55%; }
.req-product .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.req-person { display: flex; gap: 12px; align-items: center; }
.req-person .avatar { width: 44px; height: 44px; }
.req-msg { color: var(--text-2); font-size: 13.5px; }
@media (min-width: 900px) { .req-grid { grid-template-columns: 1fr 1fr; } .req-grid .span-2 { grid-column: 1 / -1; } }

/* ---------- Success ---------- */
.success-wrap { min-height: 52vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 16px; }
.success-wrap .check { width: 72px; height: 72px; border-radius: 50%; background: var(--primary-dark); color: #fff; display: grid; place-items: center; margin-bottom: 20px; animation: popIn .5s var(--ease); }
.success-wrap .check svg { width: 34px; height: 34px; }
.success-wrap h1 { font-size: 22px; font-weight: 700; }
.success-wrap p { color: var(--muted); font-size: 13.5px; margin: 8px 0 22px; max-width: 30em; }
.success-wrap .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
@media (min-width: 900px) { .success-wrap h1 { font-size: 26px; } }

/* ---------- AI pages ---------- */
.ai-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: grid; margin-top: 16px; }
.ai-hero-figure { position: relative; background: linear-gradient(180deg, #e3f1ef 0%, #d6eae7 100%); display: flex; justify-content: center; align-items: flex-end; min-height: 380px; overflow: hidden; }
.ai-hero-figure img { height: 420px; width: auto; object-fit: contain; mix-blend-mode: multiply; }
.ai-hero-figure .ring { position: absolute; width: 320px; height: 320px; border-radius: 50%; border: 36px solid rgba(74, 168, 162, .12); right: -90px; bottom: -70px; }
.ai-hero-figure .badge { position: absolute; top: 16px; left: 16px; }
.ai-hero-body { padding: 24px 20px; }
.ai-hero-body h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 10px; line-height: 1.2; }
.ai-hero-body .quote { margin-top: 14px; font-size: 15px; font-style: italic; color: var(--primary-dark); border-left: 3px solid var(--primary); padding-left: 14px; }
.ai-hero-body .intro { color: var(--text-2); margin-top: 14px; font-size: 14px; }
.ai-hero-body .acts { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
.spec-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 20px; }
.spec-item { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.spec-item svg { width: 20px; height: 20px; color: var(--primary); flex: none; }
.spec-item .k { color: var(--muted); font-size: 11.5px; }
.spec-item .v { font-weight: 700; font-size: 13.5px; }
.script-font { font-family: "Dancing Script", "Segoe Script", cursive; color: var(--primary-dark); }
@media (min-width: 900px) {
  .ai-hero { grid-template-columns: 420px 1fr; }
  .ai-hero-figure { min-height: 560px; }
  .ai-hero-figure img { height: 540px; }
  .ai-hero-body { padding: 44px 48px; align-self: center; }
  .ai-hero-body h1 { font-size: 38px; }
  .spec-grid { grid-template-columns: repeat(3, 1fr); }
}
.views-strip { display: grid; gap: 20px; background: linear-gradient(180deg, #e7f3f1, #ddeeeb); border-radius: var(--radius-lg); padding: 24px 16px; align-items: center; overflow: hidden; }
.views-strip img { width: 100%; max-width: 560px; margin: 0 auto; mix-blend-mode: multiply; }
.view-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.view-tags span { background: rgba(255,255,255,.75); border: 1px solid #cfe3e0; border-radius: 999px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: var(--primary-dark); }
.views-strip .side h2 { font-size: 26px; }
.views-strip .side p { color: var(--text-2); font-size: 13.5px; margin-top: 8px; }
@media (min-width: 900px) { .views-strip { grid-template-columns: 1.4fr 1fr; padding: 32px 48px; } }
.feature-grid { display: grid; gap: 14px; }
.feature-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; transition: transform .25s var(--ease), box-shadow .25s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature-card .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-muted); color: var(--primary); display: grid; place-items: center; }
.feature-card .ico svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-top: 14px; }
.feature-card p { color: var(--muted); font-size: 13px; margin-top: 6px; }
.feature-card ul { margin-top: 10px; }
.feature-card li { font-size: 13px; color: var(--text-2); padding-left: 16px; position: relative; margin-top: 6px; }
.feature-card li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
@media (min-width: 900px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.article-grid { display: grid; gap: 24px; }
.article-card .media { aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--surface-muted); overflow: hidden; position: relative; display: grid; place-items: center; }
.article-card .media svg { width: 30%; color: var(--primary); opacity: .7; }
.article-card .media .badge { position: absolute; top: 10px; left: 10px; }
.article-card h3 { font-size: 15px; font-weight: 700; margin-top: 14px; }
.article-card p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.article-card .link { display: inline-flex; gap: 4px; font-size: 13px; margin-top: 10px; min-height: 32px; align-items: center; border: 0; background: none; padding: 0; }
@media (min-width: 900px) { .article-grid { grid-template-columns: repeat(3, 1fr); } }
.speech { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: grid; gap: 16px; }
.speech-head { display: flex; gap: 12px; align-items: center; }
.speech-head img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: center 18%; }
.speech-head .n { font-weight: 700; }
.speech-text { background: var(--surface-muted); border-radius: 4px 16px 16px 16px; padding: 16px 18px; font-size: 14px; color: var(--text); line-height: 1.65; }
.speech-text p + p { margin-top: 10px; }
.speech-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.transparency { background: #fff8e8; border: 1px solid #f1dfb2; border-radius: var(--radius); padding: 16px 18px; font-size: 13px; color: #6b5317; display: flex; gap: 12px; }
.transparency svg { width: 20px; height: 20px; flex: none; color: var(--warning); }
.transparency b { color: #4f3c0d; }

/* AI try-on */
.tryon-layout { display: grid; gap: 24px; margin-top: 16px; }
.tryon-product { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.tryon-product .thumb-sm { width: 64px; height: 76px; border-radius: 8px; background: var(--surface-muted); overflow: hidden; display: grid; place-items: center; flex: none; }
.tryon-product .thumb-sm svg { width: 55%; }
.tryon-product .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.tryon-product .k { color: var(--muted); font-size: 11.5px; }
.tryon-product .change { margin-left: auto; }
.opt-group { margin-top: 18px; }
.opt-group .label { margin-bottom: 8px; }
.tryon-stage { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-muted); display: grid; place-items: center; }
.tryon-stage > .badge { position: absolute; top: 12px; left: 12px; z-index: 3; }
.tryon-stage .placeholder { text-align: center; color: var(--muted); font-size: 13px; padding: 24px; max-width: 26em; }
.tryon-stage .placeholder svg { width: 56px; height: 56px; color: var(--primary); opacity: .6; margin: 0 auto 10px; }
.tryon-stage svg.render { width: 100%; height: 100%; }
.tryon-stage .caption { position: absolute; left: 12px; right: 12px; bottom: 12px; background: rgba(255,255,255,.88); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: var(--text-2); z-index: 3; }
.tryon-stage .real { width: 100%; height: 100%; display: grid; place-items: center; }
.tryon-stage .real svg { width: 40%; }
.shimmer { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%); background-size: 200% 100%; animation: shimmer 1.1s linear infinite; z-index: 2; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.disclaimer { margin-top: 12px; border: 1px solid #b9dad6; background: #f6fbfa; border-radius: 10px; padding: 10px 14px; font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; }
.disclaimer svg { width: 16px; height: 16px; color: var(--primary); flex: none; margin-top: 2px; }
@media (min-width: 900px) { .tryon-layout { grid-template-columns: minmax(0, 420px) 1fr; gap: 32px; align-items: start; } .tryon-stage { aspect-ratio: 5 / 4; } }

/* ---------- Scroll reveal (CLAUDE.md rule C) ---------- */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--ease), transform .55s var(--ease); transition-delay: calc(var(--i, 0) * 60ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal-now { animation: revealNow .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 80ms); }
@keyframes revealNow { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .reveal-now { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Skeleton */
.skeleton { background: linear-gradient(90deg, #e9eeed 25%, #f3f6f5 50%, #e9eeed 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }

/* Placeholder slides wrap the garment in a sized div — the svg fills that wrapper */
.gallery-slide .ph > div svg, .thumb .ph > div svg { width: 100%; height: auto; }
.thumb .ph > div { transform-origin: center; }
@media (min-width: 900px) {
  /* Keep the white sidebar column full-height even on long pages */
  .seller-shell { background: linear-gradient(90deg, #fff 219px, var(--line) 219px, var(--line) 220px, var(--bg) 220px); }
  .seller-sidebar .side-foot .avatar { width: 36px; height: 36px; font-size: 13px; }
}
.chip { flex: none; white-space: nowrap; }
@media (max-width: 899px) {
  /* Card-style rows: everything except the thumbnail sits in the content column */
  .dtable td:not(.c-thumb):not(.c-actions) { grid-column: 2; }
  .account-panel .section-head { flex-wrap: wrap; align-items: center; }
}

/* Design: placeholders read as photo slots — keep the garment hint subtle */
.product-media .ph svg { opacity: .55; }
.cat-circle svg { opacity: .45; }
@media (min-width: 900px) { #empty { padding-top: 96px; } }
@media (min-width: 900px) {
  .page-title { font-size: 32px; }
  #empty { padding-top: 130px; }
  #empty .ico { width: 104px; height: 104px; margin-bottom: 20px; }
  #empty h3 { font-size: 18px; }
  .list-layout:has(#empty:not([hidden])) { min-height: 1150px; }
}
@media (min-width: 900px) {
  .gallery-main { aspect-ratio: 1 / 1; }
  .detail-layout { gap: 48px; }
  .detail-title { font-size: 32px; }
  .detail-price { font-size: 28px; }
  .thumbs { gap: 14px; margin-top: 14px; }
}
@media (min-width: 900px) { .detail-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }

/* Auth card sized like design (Account / 04–05) */
@media (min-width: 640px) {
  .auth-page { padding-top: 76px; }
  .auth-page .logo { margin-bottom: 36px; }
  .auth-page .logo img { height: 56px; }
  .auth-card { max-width: 440px; padding: 40px; border-radius: 14px; }
  .auth-card h1 { font-size: 28px; }
  .auth-card .sub { font-size: 14px; margin-bottom: 26px; }
  .auth-card .label { font-size: 14px; }
  .auth-card .input { min-height: 48px; }
  .auth-card .btn-primary { min-height: 48px; }
  .auth-card .field + .field { margin-top: 18px; }
}
.demo-hint { max-width: 440px; width: 100%; background: transparent; text-align: center; color: var(--muted); }

/* ---------- Seller area sized like design (Seller / 05–10) ---------- */
@media (min-width: 900px) {
  .seller-shell { grid-template-columns: 256px 1fr; background: linear-gradient(90deg, #fff 255px, var(--line) 255px, var(--line) 256px, var(--bg) 256px); }
  .seller-sidebar { padding: 32px 20px; }
  .seller-sidebar .logo { margin: 0 10px 36px; }
  .seller-sidebar .logo img { height: 42px; }
  .sidebar-nav a { font-size: 14.5px; padding: 11px 14px; }
  .sidebar-nav a + a { margin-top: 6px; }
  .seller-main { padding: 44px 48px 64px; max-width: 1240px; }
  .seller-head { margin-bottom: 28px; }

  .dtable { table-layout: fixed; }
  .dtable td { padding: 16px; }
  .dtable td.c-thumb { padding: 12px 0 12px 20px; }
  .dtable .thumb-sm { width: 48px; height: 48px; }
  .dtable .t-name { font-weight: 600; }
  .dtable td.c-actions { padding-right: 20px; }
  .dtable td.c-actions .btn { margin-left: 8px; }
  .dtable td.c-actions-left { text-align: left; }
  .dtable td.c-actions-left .btn { margin-left: 0; }
  .dtable .c-status .badge { min-width: 112px; justify-content: center; padding: 5px 12px; }
  .dtable-outside-head { margin-bottom: 4px; }
  .dtable-outside-head th { background: transparent; border: 0; padding: 0 16px 6px; font-size: 11.5px; }
  .dtable-outside-head th:first-child { padding-left: 20px; }
}
.dtable-outside-head { display: none; }
@media (min-width: 900px) { .dtable-outside-head { display: table; width: 100%; } }

/* Request detail product row — mirrors a list row (design Seller / 10) */
.req-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.req-row .thumb-sm { width: 48px; height: 48px; border-radius: 8px; background: var(--surface-muted); overflow: hidden; display: grid; place-items: center; flex: none; }
.req-row .thumb-sm svg { width: 55%; }
.req-row .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.req-row .t-name { font-weight: 700; flex: 1 1 160px; }
@media (min-width: 900px) {
  .req-row { display: grid; grid-template-columns: 48px minmax(0, 220px) 140px 150px 1fr; gap: 24px; padding: 14px 20px; }
  .req-row .req-status .badge { min-width: 112px; justify-content: center; padding: 5px 12px; }
  .req-section { padding: 18px 20px; }
}
/* Create listing (design Seller / 06) */
@media (min-width: 900px) {
  #form .field + .field { margin-top: 22px; }
  #form .upload-grid { grid-template-columns: repeat(auto-fill, 112px); gap: 16px; }
}
.upload-item.is-empty .rm { pointer-events: none; }
/* AI / 10 articles: wide image slot, title opens Lia's script */
.article-card .media { aspect-ratio: 2 / 1; width: 100%; border: 0; padding: 0; cursor: pointer; }
.article-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.article-card .media:hover img { transform: scale(1.04); }
.article-card .title-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.article-card .title-btn:hover { color: var(--primary-dark); }
/* AI / 11 try-on proportions */
@media (min-width: 900px) {
  .tryon-layout { grid-template-columns: 515px 1fr; gap: 48px; }
  .tryon-stage { aspect-ratio: 1.3 / 1; }
}
@media (max-width: 899px) {
  /* Fixed column widths are a desktop-table concern; card rows must span the full width */
  .dtable colgroup { display: none; }
  .dtable, .dtable tbody { display: block; width: 100%; }
}
.article-card .media img { position: absolute; inset: 0; }
.article-card .media .badge { z-index: 1; }

/* =====================================================================
   Chat (tin-nhan.html): two panes on desktop, one pane at a time on mobile
   ===================================================================== */
body.chat-page .site-footer { display: none; }
.chat-container { padding-top: 12px; padding-bottom: 12px; }
.chat-shell {
  display: grid; grid-template-columns: minmax(0, 1fr); /* long unread previews must ellipsize, not widen the column */
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  height: calc(100dvh - var(--header-h) - 24px - var(--bottom-nav-h) - env(safe-area-inset-bottom));
}
body.in-thread .bottom-nav { display: none; }
body.in-thread.has-bottom-nav { padding-bottom: 0; }
body.in-thread .chat-shell { height: calc(100dvh - var(--header-h) - 24px); }
@media (max-width: 899px) {
  .chat-shell:not(.show-thread) .chat-thread { display: none; }
  .chat-shell.show-thread .chat-list { display: none; }
  .chat-container { padding: 0; }
  .chat-shell { border-radius: 0; border-left: 0; border-right: 0; height: calc(100dvh - var(--header-h) - var(--bottom-nav-h) - env(safe-area-inset-bottom)); }
  body.in-thread .chat-shell { height: calc(100dvh - var(--header-h)); }
}
@media (min-width: 900px) {
  .chat-container { padding-top: 24px; padding-bottom: 24px; }
  .chat-shell { grid-template-columns: 340px minmax(0, 1fr); height: calc(100dvh - var(--header-h) - 48px); min-height: 520px; }
}

.chat-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.chat-list-head { padding: 18px 18px 12px; display: flex; align-items: center; justify-content: space-between; }
.chat-list-head h1 { font-size: 20px; font-weight: 700; }
.chat-search { padding: 0 14px 10px; }
.chat-search .input { min-height: 40px; border-radius: 999px; background: var(--bg); border-color: transparent; font-size: 14px; padding-left: 16px; }
.chat-filter { display: flex; gap: 6px; padding: 0 14px 10px; }
.chat-filter .chip { min-height: 30px; font-size: 12px; padding: 0 12px; }
.chat-items { flex: 1; overflow-y: auto; }
.chat-item { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-left: 3px solid transparent; transition: background .15s; }
.chat-item:hover { background: #f7faf9; }
.chat-item.is-active { background: var(--primary-soft); border-left-color: var(--primary); }
.chat-item .thumb { position: relative; flex: none; width: 50px; height: 50px; border-radius: 12px; background: var(--surface-muted); }
.chat-item .thumb > img, .chat-item .thumb > .ph { width: 100%; height: 100%; border-radius: 12px; object-fit: cover; overflow: hidden; }
.chat-item .thumb .ph { display: grid; place-items: center; }
.chat-item .thumb .ph svg { width: 60%; }
.chat-item .thumb .avatar { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; font-size: 9.5px; border: 2px solid #fff; }
.chat-item .thumb .online-dot { position: absolute; right: -6px; bottom: 13px; }
.online-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--online); border: 2px solid #fff; box-sizing: content-box; }
.chat-item .meta { flex: 1; min-width: 0; }
.chat-item .row1 { display: flex; align-items: baseline; gap: 8px; }
.chat-item .who { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chat-item .when { font-size: 11px; color: var(--muted); flex: none; }
.chat-item .prod, .chat-item .last { display: block; } /* spans: ellipsis needs a block box */
.chat-item .prod { font-size: 11.5px; color: var(--primary-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item .last { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.chat-item.is-unread .who, .chat-item.is-unread .last { color: var(--text); font-weight: 700; }
.chat-item .unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); flex: none; }
.chat-list-empty { padding: 40px 24px; text-align: center; color: var(--muted); font-size: 13px; }
.chat-list-empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 6px; }

.chat-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #f6f9f8; }
.thread-head { position: relative; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.thread-head .avatar { width: 40px; height: 40px; font-size: 14px; }
.thread-head .who { font-weight: 700; font-size: 15px; line-height: 1.2; }
.thread-head .role { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-head .presence.is-online { color: var(--online-text); font-weight: 600; }
.head-av { position: relative; flex: none; display: flex; }
.head-av .online-dot { position: absolute; right: -1px; bottom: -1px; }
.thread-head .grow { flex: 1; min-width: 0; }
@media (min-width: 900px) { .thread-head { padding: 12px 18px; } .thread-head .back { display: none; } }
.thread-menu { position: relative; }
.thread-menu .dropdown { min-width: 210px; }
.thread-product { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.thread-product .thumb-sm { width: 46px; height: 46px; border-radius: 10px; background: var(--surface-muted); overflow: hidden; display: grid; place-items: center; flex: none; }
.thread-product .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.thread-product .thumb-sm svg { width: 60%; }
.thread-product .info { flex: 1; min-width: 0; }
.thread-product .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.thread-product .p { color: var(--primary); font-weight: 700; font-size: 13.5px; }
.thread-product .acts { display: flex; gap: 8px; flex: none; }
@media (min-width: 900px) { .thread-product { padding: 10px 18px; } }
.chat-safety { display: flex; gap: 8px; align-items: flex-start; margin: 12px 14px 0; padding: 9px 12px; border-radius: 10px; background: #fff8e8; border: 1px solid #f1dfb2; color: #6b5317; font-size: 12px; line-height: 1.45; }
.chat-safety svg { width: 16px; height: 16px; flex: none; color: var(--warning); margin-top: 1px; }

.messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
@media (min-width: 900px) { .messages { padding: 18px 24px; } }
.msg-day { align-self: center; margin: 12px 0 6px; padding: 3px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.msg { display: flex; flex-direction: column; max-width: min(78%, 520px); animation: msgIn .25s var(--ease); }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 9px 14px; border-radius: 18px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.msg.me .bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 6px; }
.msg.them .bubble { background: #fff; color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg .photo { display: block; max-width: 240px; max-height: 300px; border-radius: 14px; border: 1px solid var(--line); cursor: zoom-in; object-fit: cover; }
.msg .photo + .bubble { margin-top: 4px; }
.msg time { font-size: 10.5px; color: var(--muted); margin: 3px 6px 0; }
.msg.pending { opacity: .6; }
.msg-request { align-self: flex-start; max-width: min(82%, 520px); background: #fff; border: 1px solid #b9dad6; border-left: 4px solid var(--primary); border-radius: 12px; padding: 10px 14px; animation: msgIn .25s var(--ease); }
.msg-request.me { align-self: flex-end; }
.msg-request .lbl { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-dark); display: flex; align-items: center; gap: 6px; }
.msg-request .lbl svg { width: 14px; height: 14px; }
.msg-request p { font-size: 14px; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.msg-request time { display: block; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.msg-receipt { align-self: flex-end; display: flex; align-items: center; gap: 3px; margin: -1px 6px 2px 0; font-size: 10.5px; color: var(--muted); }
.msg-receipt svg { width: 13px; height: 13px; }
.msg-receipt.is-read { color: var(--primary-dark); }
.msg-system { align-self: center; max-width: 92%; margin: 8px 0; padding: 8px 14px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); font-size: 12.5px; text-align: center; line-height: 1.45; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }

.composer-preview { display: flex; gap: 8px; padding: 10px 14px 0; background: #fff; border-top: 1px solid var(--line); }
.composer-preview .upload-item { width: 64px; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.composer-preview + .composer { border-top: 0; }
.composer .attach { color: var(--primary); flex: none; }
.composer textarea { flex: 1; resize: none; min-height: 44px; max-height: 140px; padding: 11px 16px; border-radius: 22px; background: var(--bg); border: 1px solid transparent; font-size: 16px; line-height: 1.4; }
.composer textarea:focus { outline: none; background: #fff; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 168, 162, .15); }
@media (min-width: 900px) { .composer textarea { font-size: 14px; } }
.composer .send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; transition: background .2s, transform .15s; }
.composer .send:hover { background: var(--primary-hover); }
.composer .send:active { transform: scale(.94); }
.composer .send[disabled] { background: #dfe3e2; color: #8b9492; cursor: not-allowed; }
.composer .send svg { width: 20px; height: 20px; }
.chat-note { padding: 14px; text-align: center; font-size: 13px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); }
.chat-empty { flex: 1; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--muted); font-size: 13.5px; }
.chat-empty .ico { width: 72px; height: 72px; border-radius: 50%; background: var(--surface-muted); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.chat-empty .ico svg { width: 32px; height: 32px; }
.chat-empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }
.lightbox { position: fixed; inset: 0; z-index: 130; background: rgba(10, 20, 19, .85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fadeIn .2s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* Header message icon + badges */
.icon-badge { position: relative; }
.icon-badge .dot { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }

/* Request statuses (chốt bán) */
.badge-solid { background: var(--primary-dark); color: #fff; }
.sale-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary-dark); font-size: 13.5px; }
.sale-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.sale-note.is-muted { background: #eef0f0; color: var(--text-2); }

/* =====================================================================
   AI try-on (ai-minh-hoa.html)
   ===================================================================== */
.model-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.model-card { position: relative; display: block; padding: 0; border: 2px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.model-card:hover { border-color: #b9dad6; transform: translateY(-2px); }
.model-card.is-active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 168, 162, .18); }
.model-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 8%; background: var(--surface-muted); }
.model-card .model-meta { display: block; padding: 8px 12px 10px; font-size: 13.5px; }
.model-card .model-meta small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.model-card .model-tag { position: absolute; top: 8px; left: 8px; font-size: 10px; padding: 2px 8px; background: rgba(255, 255, 255, .92); }
.model-card.is-active::after { content: ""; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat; }
#run svg { width: 18px; height: 18px; }

.tryon-stage .stage-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: filter .4s, opacity .4s; }
.tryon-stage .stage-img.contain { object-fit: contain; background: #fff; }
/* Body-shape cross-fade (ai-minh-hoa.html): frames stacked, opacity follows the sliders instantly */
.tryon-stage .morph { position: absolute; inset: 0; }
/* Phones/tablets: one column, picture right above the sliders so dragging shows the change */
@media (max-width: 899.98px) {
  body[data-nav="ai"] .tryon-layout { gap: 0; }
  body[data-nav="ai"] .tryon-controls, body[data-nav="ai"] .tryon-result { display: contents; }
  body[data-nav="ai"] .tryon-product { order: 1; }
  body[data-nav="ai"] .tryon-controls > .opt-group:not(.body-sliders) { order: 2; }
  body[data-nav="ai"] .tryon-result > .chips { order: 3; margin-top: 18px; }
  body[data-nav="ai"] .tryon-stage { order: 4; }
  body[data-nav="ai"] .body-sliders { order: 5; margin-top: 10px; }
  body[data-nav="ai"] #run { order: 6; margin-top: 14px !important; }
  body[data-nav="ai"] #run-hint { order: 7; }
  body[data-nav="ai"] .fit-panel { order: 8; } /* same order as the disclaimer, earlier in the DOM → above it */
  body[data-nav="ai"] .tryon-result > .disclaimer { order: 8; }
  body[data-nav="ai"] .lia-tip { order: 9; }
}
.tryon-stage .morph .stage-img { transition: none; }
.body-sliders .slider-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 6px; }
.body-sliders .slider-row .label { margin-bottom: 0; }
.body-sliders output { font-weight: 700; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.body-sliders .hint { margin-top: 4px; }
/* Range: 44px tall touch target, thin filled track (--fill set from JS), round thumb */
.range { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; --fill: 50%; }
.range:disabled { cursor: not-allowed; opacity: .5; }
.range::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--primary) var(--fill), var(--line-2) var(--fill)); }
.range::-moz-range-track { height: 6px; border-radius: 999px; background: var(--line-2); }
.range::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--primary); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); box-shadow: var(--shadow-sm); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--primary); }
.range:focus-visible { outline: none; }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(74, 168, 162, .25); }
.range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(74, 168, 162, .25); }
.tryon-stage .stage-img.is-dim { filter: blur(3px) saturate(.6); opacity: .55; }
.tryon-progress { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86%, 340px); background: rgba(255, 255, 255, .95); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13.5px; }
.tryon-progress b { font-size: 14.5px; }
.tryon-progress small { color: var(--muted); font-size: 12px; }
.tryon-progress.is-error { text-align: left; align-items: stretch; color: var(--text-2); }
.tryon-progress.is-error > svg { width: 26px; height: 26px; color: var(--warning); align-self: center; }
.tryon-progress.is-error b { color: var(--text); }
.tryon-progress.is-error > span > b:first-child { display: block; margin-bottom: 4px; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--primary-soft); border-top-color: var(--primary); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.5s !important; animation-iteration-count: infinite !important; } }
/* Try-on results are portrait (3:4) */
body[data-nav="ai"] .tryon-stage { aspect-ratio: 3 / 4; }
@media (min-width: 900px) {
  body[data-nav="ai"] .tryon-layout { grid-template-columns: 420px minmax(0, 560px); justify-content: start; }
}

/* ---------- AI page v2 (Lia poster áo trắng) ---------- */
.lia-hero { position: relative; overflow: hidden; isolation: isolate; padding: 28px 0 40px;
  background:
    radial-gradient(55% 60% at 78% 45%, #cfe7e2 0, rgba(207, 231, 226, 0) 70%),
    radial-gradient(50% 50% at 0% 100%, #d9ebe6 0, rgba(217, 235, 230, 0) 70%),
    linear-gradient(180deg, #f3f8f6 0%, #e6f2ef 100%); }
.lia-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 36px; z-index: 1; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V12C420 36 1020 36 1440 2v38Z' fill='%23f4f4f4'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat; }
.lia-hero .hero-leaf { z-index: 0; }
.lia-hero-inner { position: relative; z-index: 2; display: grid; gap: 28px; align-items: center; }
.lia-hero-script { font-size: 26px; line-height: 1; }
.lia-hero h1 { font-size: 52px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-top: 10px; }
.lia-hero h1 .heart { color: var(--primary); font-size: .7em; vertical-align: middle; }
.lia-hero h1 small { display: block; font-size: 16px; font-weight: 600; letter-spacing: 0; color: var(--primary-dark); margin-top: 10px; }
.lia-hero-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.lia-hero .quote { margin-top: 18px; font-size: 16px; font-style: italic; color: var(--primary-dark); border-left: 3px solid var(--primary); padding-left: 14px; max-width: 32em; }
.lia-hero .intro { color: var(--text-2); margin-top: 12px; font-size: 14px; max-width: 36em; }
.lia-hero .acts { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.lia-hero .acts .btn { gap: 8px; }
.lia-hero .btn-ghost { background: rgba(255, 255, 255, .7); }
.ico-inline { display: inline-flex; } .ico-inline svg { width: 18px; height: 18px; }

.lia-stage { position: relative; height: 470px; max-width: 460px; width: 100%; margin: 0 auto; }
.lia-ring { position: absolute; width: 230px; height: 230px; border-radius: 50%; border: 28px solid rgba(74, 168, 162, .14); right: -40px; bottom: 10px; }
.lia-arch { position: absolute; left: 50%; bottom: 0; height: calc(100% - 24px); width: 250px; transform: translateX(-50%); border-radius: 140px 140px 28px 28px; background: linear-gradient(180deg, #e3f3f2, #dbeae9); overflow: hidden; box-shadow: 0 24px 50px rgba(31, 92, 85, .16); border: 6px solid #fff; }
.lia-full { position: absolute; left: 50%; bottom: 0; height: 100%; width: auto; transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
.lia-stage-badge { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
.lia-faces { position: absolute; left: 0; top: 70px; display: grid; gap: 8px; z-index: 3; }
.lia-faces img { width: 58px; height: 58px; object-fit: cover; border-radius: 14px; border: 3px solid #fff; box-shadow: 0 8px 20px rgba(31, 92, 85, .16); }
.lia-faces img:nth-child(2) { margin-left: 10px; }
.float-chip { position: absolute; z-index: 3; background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 12.5px; color: var(--text-2); box-shadow: 0 10px 24px rgba(31, 92, 85, .14); white-space: nowrap; }
.float-chip b { color: var(--primary-dark); }
.chip-a { right: 0; top: 120px; }
.chip-b { left: 6px; bottom: 70px; }
.float-note { position: absolute; right: -4px; bottom: 120px; z-index: 3; font-size: 20px; line-height: 1.15; transform: rotate(-8deg); text-align: center; }
@media (prefers-reduced-motion: no-preference) {
  .float-chip, .lia-faces img:nth-child(odd) { animation: lia-bob 6s ease-in-out infinite; }
  .chip-b { animation-delay: -3s; }
  .lia-faces img:nth-child(3) { animation-delay: -2s; }
}
.reduce-motion .float-chip, .reduce-motion .lia-faces img, .reduce-motion .marquee-track { animation: none !important; }
@keyframes lia-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (min-width: 640px) {
  .lia-stage { height: 540px; }
  .lia-faces img { width: 76px; height: 76px; }
  .float-note { font-size: 24px; }
}
@media (min-width: 1000px) {
  .lia-hero { padding: 24px 0 56px; }
  .lia-hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; }
  .lia-hero h1 { font-size: 76px; }
  .lia-hero h1 small { font-size: 18px; }
  .lia-hero-script { font-size: 32px; }
  .lia-stage { height: 600px; max-width: 520px; }
  .lia-arch { width: 290px; }
  .lia-ring { width: 300px; height: 300px; border-width: 36px; right: -70px; }
}

/* Brand marquee */
.marquee { overflow: hidden; background: var(--primary-dark); color: #e6f2ef; padding: 12px 0; margin-top: 8px; }
.marquee-track { display: flex; width: max-content; gap: 28px; align-items: center; font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; white-space: nowrap; }
.marquee-track i { font-style: normal; color: #8fd0c6; letter-spacing: 0; }
.marquee-track .script-font { color: #fff; font-size: 20px; letter-spacing: 0; text-transform: none; }
@media (prefers-reduced-motion: no-preference) { .marquee-track { animation: marquee 32s linear infinite; } }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Articles: type label + lift */
.eyebrow { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.article-card { transition: transform .3s var(--ease); }
.article-card:hover { transform: translateY(-4px); }
.article-card { background: #fbfcfb; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.article-card:hover { box-shadow: 0 14px 34px rgba(31, 92, 85, .12); }
.article-card .media { aspect-ratio: 620 / 338; border-radius: 0; }
.article-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.article-card .article-body h3 { margin-top: 0; font-size: 19px; line-height: 1.35; }
.article-card .article-body p { font-size: 15.5px; line-height: 1.65; flex: 1; }
.article-text { font-size: 16px; line-height: 1.75; }
@media (min-width: 900px) { .article-card .article-body h3 { font-size: 20px; } }
.article-card .article-body .link { margin-top: 14px; font-weight: 600; font-size: 14px; color: var(--primary); cursor: pointer; gap: 8px; align-self: flex-start; min-height: 44px; }
.article-card .article-body .link span { transition: transform .25s var(--ease); }
.article-card .article-body .link:hover span { transform: translateX(4px); }
@media (min-width: 900px) { .article-grid { gap: 28px; } }

/* Views strip v2 */
.views-figure { position: relative; text-align: center; }
.views-figure > .badge { position: absolute; top: 4px; left: 4px; z-index: 2; }
.views-figure img { width: 100%; height: auto; max-width: 600px; margin: 0 auto; display: block; mix-blend-mode: multiply; }
@media (min-width: 900px) { .views-figure img { width: auto; max-width: 100%; max-height: 560px; } }
.ruler { position: absolute; left: 0; top: 4%; bottom: 13%; width: 1px; border-left: 2px dashed rgba(31, 92, 85, .45); display: none; }
.ruler::before, .ruler::after { content: ""; position: absolute; left: -7px; width: 12px; border-top: 2px solid rgba(31, 92, 85, .45); }
.ruler::before { top: 0; } .ruler::after { bottom: 0; }
.ruler span { position: absolute; top: 50%; left: 8px; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: var(--primary-dark); white-space: nowrap; }
.views-strip .spec-grid { grid-template-columns: repeat(2, 1fr); margin: 16px 0 12px; }
.views-strip .spec-item { background: rgba(255, 255, 255, .7); }
.palette { display: flex; gap: 8px; margin-top: 16px; }
.palette span { width: 24px; height: 24px; border-radius: 50%; }
@media (min-width: 900px) {
  .views-strip { grid-template-columns: 1.25fr 1fr; gap: 40px; }
  .views-figure { padding-left: 64px; }
  .ruler { display: block; left: 20px; }
}

/* Get the Look */
.look-card { display: grid; gap: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; position: relative; overflow: hidden; }
.look-card::before { content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, #e1f0ec 0, rgba(225, 240, 236, 0) 70%); right: -60px; top: -80px; pointer-events: none; }
.look-intro { position: relative; }
.look-intro .speech-head img { width: 56px; height: 56px; object-position: center 30%; }
.look-bubble { position: relative; margin-top: 12px; background: var(--surface-muted); border-radius: 4px 16px 16px 16px; padding: 14px 16px; font-size: 14px; line-height: 1.6; }
.look-card .mini-products { position: relative; max-width: none; }
@media (min-width: 900px) { .look-card { grid-template-columns: minmax(0, 380px) 1fr; padding: 32px 40px; gap: 40px; align-items: center; } }

/* Lia's style section (design/ai-lia-style.jpg) */
.lia-style { position: relative; overflow: hidden; display: grid; border-radius: var(--radius-lg);
  background:
    radial-gradient(40% 35% at 95% 8%, #dcebe5 0, rgba(220, 235, 229, 0) 70%),
    radial-gradient(45% 40% at 100% 100%, #d9e8e1 0, rgba(217, 232, 225, 0) 70%),
    linear-gradient(180deg, #f2f5f1 0%, #edf2ee 100%); }
.lia-style-figure { position: relative; }
.lia-style-figure img { display: block; width: 100%; height: auto; max-width: 520px; margin: 0 auto;
  -webkit-mask-image: linear-gradient(180deg, #000 88%, transparent 100%), linear-gradient(90deg, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(180deg, #000 88%, transparent 100%), linear-gradient(90deg, #000 90%, transparent 100%);
          mask-composite: intersect; }
.lia-style-figure .badge { position: absolute; top: 14px; right: 14px; }
.lia-style-body { position: relative; padding: 0 16px 24px; display: flex; flex-direction: column; justify-content: center; }
.lia-style-panel { background: rgba(222, 236, 231, .62); border-radius: 24px; padding: 26px 22px; }
.lia-style-panel h2 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; color: #173f39; margin-top: 12px; }
.lia-style-panel .squiggle { width: 120px; height: 14px; color: var(--primary-dark); margin-top: 8px; display: block; }
.lia-style-panel > p:not(.script-font) { color: var(--text-2); font-size: 15px; line-height: 1.75; margin-top: 18px; }
.style-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.style-tags span, .style-tags a { background: #d3e6df; color: #1f4d45; border-radius: 999px; padding: 9px 16px; font-size: 13px; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.style-tags a:hover { background: #c3ddd4; }
.style-tags i { font-style: normal; color: var(--muted); }
.palette-lg { margin-top: 22px; gap: 12px; }
.palette-lg span { width: 34px; height: 34px; }
.lia-style-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 18px; padding: 0 6px; }
.lia-style-foot .script-font { font-size: 28px; line-height: 1.05; transform: rotate(-6deg); }
.lia-style-foot .recycle { width: 48px; height: 48px; color: #7fb3a8; }
@media (prefers-reduced-motion: no-preference) { .lia-style-foot .recycle { animation: spin-slow 18s linear infinite; } }
.reduce-motion .lia-style-foot .recycle { animation: none !important; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (min-width: 900px) {
  .lia-style { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; }
  .lia-style-figure img { max-width: 560px; margin: 0; }
  .lia-style-figure .badge { right: auto; left: 20px; }
  .lia-style-body { padding: 48px 48px 40px 0; }
  .lia-style-panel { padding: 40px 40px 36px; }
  .lia-style-panel h2 { font-size: 52px; }
  .lia-style-panel .squiggle { width: 130px; }
}

/* ---------- Reviews & seller trust ---------- */
.stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 2px; color: #d9dedd; white-space: nowrap; vertical-align: middle; }
.stars::before { content: "★★★★★"; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: #f2b01e; }
.stars-fill::before { content: "★★★★★"; }
.stars.sm { font-size: 13px; letter-spacing: 1px; }
.stars.lg { font-size: 22px; }
.trust { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.trust b { color: var(--text); font-size: 13px; }
a.trust:hover b { color: var(--primary); }

/* Product page seller card → link to the seller page */
a.seller-card { color: inherit; transition: border-color .2s, box-shadow .2s; }
a.seller-card:hover { border-color: #cfe3e0; box-shadow: var(--shadow-sm); }
.seller-card .grow { flex: 1; min-width: 0; }
.seller-card .see { font-size: 12.5px; font-weight: 600; color: var(--primary); white-space: nowrap; align-self: center; }

/* Review modal */
.star-input { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.star-input button { width: 48px; height: 48px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; color: #cfd6d5; cursor: pointer; transition: transform .15s var(--ease), color .15s; }
.star-input button svg { width: 34px; height: 34px; }
.star-input button.is-on { color: #f2b01e; }
.star-input button.is-on svg { fill: currentColor; }
.star-input button:hover { transform: scale(1.08); }
.star-input button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.star-label { text-align: center; font-weight: 600; font-size: 14px; color: var(--primary-dark); min-height: 20px; margin-top: 4px; }
.review-tags .chip { min-height: 40px; }
.review-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 12.5px; color: var(--muted); background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.review-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--primary); }
#rv-comment { font-size: 16px; }

/* Buyer's own review in "Yêu cầu mua đã gửi" */
.my-review { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.review-cta { margin-top: 8px; }
.my-review .link { border: 0; background: none; padding: 0; font-size: 13px; cursor: pointer; min-height: 32px; }
.review-cta .btn svg { width: 15px; height: 15px; }

/* Review prompt inside the chat thread (buyer side, after "Chốt bán") */
.review-prompt { display: flex; align-items: center; gap: 10px; margin: 10px 12px 0; padding: 10px 12px; border-radius: 12px; background: #fff7e3; border: 1px solid #f3dfa7; font-size: 13px; color: #6b5214; }
.review-prompt > svg { width: 18px; height: 18px; flex: none; color: #e0a10f; fill: currentColor; }
.review-prompt .txt { flex: 1; text-align: left; }
.review-prompt .btn { flex: none; }
.review-prompt.is-done { background: var(--surface-muted); border-color: #d3e6e2; color: var(--primary-dark); }
@media (min-width: 900px) { .review-prompt { margin: 12px 18px 0; } }

/* Seller dashboard card */
.rating-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 4px 0 16px; }
.rating-card .k { font-size: 12.5px; color: var(--muted); font-weight: 600; }

/* Seller public page */
.avatar.lg { width: 72px; height: 72px; font-size: 24px; }
.seller-skeleton { display: grid; gap: 12px; padding-top: 24px; }
.seller-skeleton span { height: 90px; border-radius: var(--radius); background: linear-gradient(90deg, #eceff0, #f6f7f7, #eceff0); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.seller-hero { display: grid; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-top: 12px; }
.seller-id { display: flex; gap: 14px; align-items: center; }
.seller-id h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.seller-id .muted { font-size: 13px; }
.seller-id .muted svg { width: 14px; height: 14px; vertical-align: -2px; }
.seller-score { display: flex; align-items: center; gap: 12px; }
.seller-score .big { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.seller-score .muted { font-size: 12.5px; margin-top: 4px; }
.seller-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.seller-nums div { background: var(--bg); border-radius: 10px; padding: 10px 12px; }
.seller-nums dt { font-size: 11.5px; color: var(--muted); }
.seller-nums dd { margin: 2px 0 0; font-size: 18px; font-weight: 800; }
.trust-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.trust-note svg { width: 16px; height: 16px; flex: none; color: var(--primary); margin-top: 1px; }
.profile-tabs { display: flex; gap: 8px; margin: 22px 0 16px; }
.profile-tabs .chip { min-height: 44px; padding: 0 18px; }
.review-layout { display: grid; gap: 16px; }
.review-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; align-self: start; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 24px; align-items: center; gap: 8px; font-size: 12.5px; padding: 3px 0; }
.dist-row .bar { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; }
.dist-row .bar span { display: block; height: 100%; background: #f2b01e; border-radius: inherit; transform-origin: left; }
.chip-static { cursor: default; background: var(--surface-muted); border-color: transparent; color: var(--primary-dark); font-size: 12px; min-height: 30px; }
.review-list { display: grid; gap: 12px; }
.review-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.review-card header { display: flex; align-items: center; gap: 10px; }
.review-card header .avatar { width: 38px; height: 38px; font-size: 13px; }
.review-card header .grow { flex: 1; min-width: 0; }
.review-card .name { font-weight: 700; font-size: 14px; }
.review-card header .muted { font-size: 12px; }
.review-card .for { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.review-card .for b { color: var(--text-2); font-weight: 600; }
.review-card .chips { margin-top: 8px; }
.review-card p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text); }
.review-card .report { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; border: 0; background: none; padding: 0; font-size: 12px; color: var(--muted); cursor: pointer; min-height: 32px; }
.review-card .report svg { width: 13px; height: 13px; }
.review-card .report:hover { color: var(--danger); }
@media (min-width: 900px) {
  .seller-hero { grid-template-columns: 1fr auto auto; align-items: center; padding: 24px 28px; gap: 32px; }
  .seller-nums { grid-template-columns: repeat(3, 110px); }
  .review-layout { grid-template-columns: 300px 1fr; gap: 24px; }
  .review-summary { position: sticky; top: calc(var(--header-h) + 16px); }
}

/* ---------- Ví Xu (vi-xu.html) ---------- */
.wallet-layout { display: grid; gap: 16px; }
.wallet-layout > * { min-width: 0; } /* scrolling tab chips must not widen the column */
.wallet-side { display: grid; gap: 16px; align-content: start; }
.coin-balance { border-radius: var(--radius); padding: 20px; color: #fff; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); }
.coin-balance .label { font-size: 13px; opacity: .85; }
.coin-balance .amount { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.coin-balance .amount small { font-size: 16px; font-weight: 600; opacity: .9; }
.coin-balance .hint { font-size: 12.5px; color: rgba(255, 255, 255, 0.85); margin-top: 6px; }
.wallet-card { padding: 18px 16px; scroll-margin-top: calc(var(--header-h) + 16px); }
.wallet-card .section-title { margin-bottom: 14px; }
.wallet-card .section-head { margin-bottom: 0; }
.wallet-card .section-head .section-title { margin-bottom: 12px; }
.wallet-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; line-height: 1.5; }
#tx-tabs { margin-bottom: 4px; }
#tx-tabs .chip { min-height: 44px; }
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tx-item:last-child { border-bottom: 0; }
.tx-ico { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.tx-ico svg { width: 18px; height: 18px; }
.tx-ico.is-in { background: var(--coin-soft); color: var(--coin); }
.tx-ico.is-out { background: var(--primary-soft); color: var(--primary-dark); }
.tx-main { flex: 1; min-width: 0; }
.tx-desc { font-weight: 600; font-size: 14px; }
.tx-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tx-resume { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; }
.tx-demo { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tx-demo .btn { min-height: 44px; }
.tx-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.tx-amount { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount.is-in { color: var(--primary-hover); }
.tx-amount.is-out { color: var(--text); }
.tx-amount.is-muted { color: var(--muted); text-decoration: none; }
/* Mời bạn nhận Xu */
.ref-steps { margin: 0 0 14px; padding-left: 20px; font-size: 13.5px; line-height: 1.55; display: grid; gap: 4px; }
.ref-code { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; border: 1.5px dashed var(--primary); border-radius: 12px; background: var(--primary-soft); }
.ref-code .lbl { font-size: 12px; color: var(--muted); }
.ref-code .code { font-size: 28px; font-weight: 800; letter-spacing: 0.18em; color: var(--primary-dark); font-variant-numeric: tabular-nums; padding-left: 0.18em; }
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ref-actions .btn { min-height: 44px; gap: 6px; padding: 0 10px; font-size: 13.5px; }
.ref-actions .btn svg { width: 17px; height: 17px; flex: none; }
.ref-redeem { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ref-redeem-row { display: flex; gap: 8px; }
.ref-redeem-row .input { flex: 1; min-width: 0; font-size: 16px; text-transform: uppercase; letter-spacing: 0.08em; }
.ref-redeem-row .btn { flex: none; min-height: 44px; }
.ref-sub { font-size: 14px; font-weight: 700; margin: 16px 0 6px; }
.ref-list { list-style: none; margin: 0; padding: 0; }
.ref-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.ref-list li:last-child { border-bottom: 0; }
.ref-list .avatar { width: 34px; height: 34px; font-size: 13px; }
.ref-who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.ref-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-who span { font-size: 12px; color: var(--muted); }
.ref-sale { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--coin-soft); font-size: 12.5px; line-height: 1.5; }
.ref-sale svg { width: 20px; height: 20px; flex: none; color: var(--coin); margin-top: 1px; }
.ref-sale p { margin: 0; }
@media (min-width: 900px) {
  .wallet-layout { grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
  .wallet-side { align-self: start; }
  .wallet-card { padding: 22px 24px; }
  .coin-balance { padding: 24px; }
}

/* ---------- Nạp Xu (nap-xu.html) ---------- */
.btn-lg { min-height: 50px; padding: 0 28px; font-size: 15px; }
.deposit-pkgs { display: grid; gap: 10px; }
.deposit-pkg {
  position: relative; display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name amount" "total amount" "split amount";
  align-items: center; column-gap: 12px; row-gap: 2px; padding: 14px 16px; min-height: 88px;
  background: #fff; border: 1.5px solid var(--line-2); border-radius: var(--radius); text-align: left; transition: border-color .2s, box-shadow .2s, background .2s;
}
.deposit-pkg:hover { border-color: var(--coin); }
.deposit-pkg[aria-checked="true"] { border-color: var(--coin); background: var(--coin-soft); box-shadow: 0 0 0 3px rgba(217, 150, 31, .15); }
.pkg-flag { position: absolute; top: -9px; right: 14px; background: var(--coin); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.pkg-name { grid-area: name; font-size: 13px; font-weight: 600; color: var(--text-2); }
.pkg-total { grid-area: total; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; }
.pkg-total b { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.pkg-total svg { width: 20px; height: 20px; color: var(--coin); }
.pkg-split { grid-area: split; font-size: 12.5px; color: var(--muted); }
.pkg-split em { font-style: normal; color: var(--coin); font-weight: 600; }
.pkg-amount { grid-area: amount; font-weight: 700; font-size: 15px; color: var(--primary-hover); }
.deposit-actions { margin-top: 20px; display: grid; gap: 4px; }
.deposit-actions .btn { width: 100%; }

.pay-card { padding: 18px 16px; display: grid; gap: 20px; }
.pay-qr { display: flex; flex-direction: column; align-items: center; text-align: center; }
.qr-box { position: relative; width: 100%; max-width: 260px; aspect-ratio: 1; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-demo { position: absolute; inset: auto 0 45% 0; margin: auto; width: max-content; background: var(--badge-dark); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.qr-fallback { display: grid; place-items: center; height: 100%; font-size: 13px; color: var(--muted); padding: 16px; }
.qr-hint { font-size: 13px; color: var(--text-2); margin-top: 10px; }
.qr-timer { font-size: 13px; font-weight: 600; color: var(--warning); margin-top: 4px; font-variant-numeric: tabular-nums; }
.pay-info .section-title { margin-bottom: 12px; }
.pay-dl { margin: 0; display: grid; }
.pay-dl > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-dl dt { color: var(--muted); flex: none; }
.pay-dl dd { margin: 0; text-align: right; display: flex; align-items: center; gap: 8px; justify-content: flex-end; min-width: 0; overflow-wrap: anywhere; }
.pay-coins { color: var(--coin); font-weight: 700; }
.pay-coins svg { width: 16px; height: 16px; }
.copy-btn { flex: none; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 12px; font-weight: 600; color: var(--primary); position: relative; }
.copy-btn::after { content: ""; position: absolute; inset: -6px; } /* 44px touch target */
.pay-wait { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.pay-wait .spinner { width: 18px; height: 18px; border-width: 3px; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pay-actions .btn { flex: 1 1 auto; }
.pay-actions.center { justify-content: center; }
.pay-result { padding: 40px 20px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.pay-result h2 { font-size: 22px; font-weight: 800; margin-top: 14px; }
.pay-result p { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 420px; }
.result-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; }
.result-ico svg { width: 30px; height: 30px; }
.result-ico.is-ok { background: var(--primary-soft); color: var(--primary-hover); }
.result-ico.is-fail { background: var(--warning-soft); color: var(--warning); }
@media (min-width: 640px) {
  .deposit-pkgs { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .deposit-actions { justify-items: center; }
  .deposit-actions .btn { width: auto; min-width: 280px; }
  .deposit-actions .wallet-note { text-align: center; max-width: 560px; }
}
@media (min-width: 900px) {
  .deposit-pkgs { grid-template-columns: repeat(5, 1fr); }
  .deposit-pkg { grid-template-columns: 1fr; grid-template-areas: "name" "total" "split" "amount"; row-gap: 6px; padding: 22px 18px; align-content: start; }
  .pkg-total b { font-size: 28px; }
  .pkg-amount { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
  .pay-card { grid-template-columns: 300px 1fr; gap: 36px; padding: 28px 32px; align-items: start; }
  .pay-actions .btn { flex: 0 0 auto; }
}

/* ---------- Quảng bá tin đăng (ads) ---------- */
.badge-ad { color: #fff; }
.badge-ad-BASIC { background: linear-gradient(135deg, #ff6a2b, #e5484d); letter-spacing: .04em; font-weight: 800; }
.badge-ad { display: inline-flex; align-items: center; gap: 3px; }
.badge-ad svg { width: 12px; height: 12px; flex: none; }
.badge-ad-FEATURED { background: var(--primary); }
.badge-ad-PRO { background: var(--coin); }
.product-media .badge-ad { left: 10px; right: auto; }
.btn-coin { background: var(--coin); border-color: var(--coin); color: #fff; }
.btn-coin:hover { background: #c4851a; border-color: #c4851a; }
.t-ad { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.t-ad .btn-coin { min-height: 32px; gap: 5px; }
.t-ad .btn-coin svg { width: 14px; height: 14px; }
@media (max-width: 899.98px) { .t-ad .btn-coin { min-height: 44px; } }
.t-ad .badge { font-size: 10.5px; padding: 2px 8px; }


.ad-balance { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; margin: 14px 0 10px; border-radius: var(--radius-sm); background: var(--coin-soft); font-size: 14px; }
.ad-balance span { display: inline-flex; align-items: center; gap: 6px; }
.ad-balance svg { width: 16px; height: 16px; color: var(--coin); }
.ad-balance .link { min-height: 44px; display: inline-flex; align-items: center; }
.ad-current { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.ad-options { display: grid; gap: 10px; }
.ad-option { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background .2s; }
.ad-option:hover { border-color: var(--coin); }
.ad-option:has(input:checked) { border-color: var(--coin); background: var(--coin-soft); }
.ad-option.is-disabled { opacity: .55; cursor: not-allowed; }
.ad-option input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--coin); flex: none; }
.ad-body { flex: 1; min-width: 0; }
.ad-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.ad-head b { font-size: 15px; }
.ad-flag { font-size: 11px; font-weight: 700; color: #fff; background: var(--coin); padding: 2px 9px; border-radius: 999px; }
.ad-dur { font-size: 12px; font-weight: 600; color: var(--primary-dark); background: var(--primary-soft); padding: 2px 8px; border-radius: 999px; }
.ad-cost { margin-left: auto; font-weight: 800; color: var(--coin); font-size: 14px; white-space: nowrap; text-align: right; }
.ad-cost small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.ad-body ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text-2); display: grid; gap: 2px; }
.ad-why { display: block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--warning); }
.ad-msg { min-height: 20px; margin: 12px 0 8px; font-size: 13px; font-weight: 600; color: var(--danger); }
.t-stats { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.t-stats svg { width: 14px; height: 14px; flex: none; }

/* Mua lẻ (nap-xu.html) */
.deposit-custom { margin-top: 12px; padding: 14px 16px; background: #fff; border: 1.5px dashed var(--line-2); border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background .2s; }
.deposit-custom:hover { border-color: var(--coin); }
.deposit-custom[aria-checked="true"] { border-style: solid; border-color: var(--coin); background: var(--coin-soft); box-shadow: 0 0 0 3px rgba(217, 150, 31, .15); }
.dc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.dc-note { font-size: 12.5px; color: var(--muted); }
.dc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: #fff; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; font-weight: 600; color: var(--text-2); }
.stepper button:hover { color: var(--coin); }
.stepper input { width: 72px; height: 44px; border: 0; text-align: center; font-size: 16px; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper .unit { font-size: 13px; color: var(--muted); padding-right: 4px; }
.dc-hint { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.dc-hint b { color: var(--coin); }
.deposit-custom .pkg-amount { font-size: 18px; }
@media (min-width: 900px) { .deposit-custom { margin-top: 14px; padding: 16px 22px; } .dc-row { justify-content: flex-start; gap: 24px; } .deposit-custom .pkg-amount { margin: 0; padding: 0; border: 0; } }

/* ---------- Trang nội dung: Quy định nội dung · Giới thiệu · Cách hoạt động ---------- */
.doc-hero { margin: 10px 0 24px; }
.doc-hero .lead { color: var(--text-2); font-size: 15px; line-height: 1.65; margin-top: 10px; max-width: 760px; }
.doc-hero .updated { color: var(--muted); font-size: 12.5px; margin-top: 8px; }
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.doc-toc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.doc-toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px; font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; }
.doc-toc summary::-webkit-details-marker { display: none; }
.doc-toc summary::after { content: "▾"; color: var(--muted); }
.doc-toc[open] summary::after { content: "▴"; }
.doc-toc nav { display: grid; padding: 0 8px 10px; }
.doc-toc nav a { display: flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; color: var(--text-2); }
.doc-toc nav a:hover { background: var(--bg); color: var(--primary-dark); }
.doc-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.doc-section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc-section h2 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; color: var(--primary-dark); }
.doc-section h3 { font-size: 15.5px; font-weight: 700; margin-top: 18px; }
.doc-section p, .doc-section li { font-size: 15px; line-height: 1.7; color: var(--text); }
.doc-section p { margin-top: 10px; }
.doc-section ul, .doc-section ol { margin-top: 10px; padding-left: 20px; display: grid; gap: 6px; }
.doc-section ul { list-style: disc; }
.doc-section ol { list-style: decimal; }
.doc-section .muted-note { font-size: 13px; color: var(--muted); }
.doc-table { margin-top: 12px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
.doc-table table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 14px; }
.doc-table th { background: var(--primary-soft); color: var(--primary-dark); text-align: left; font-weight: 700; padding: 10px 12px; }
.doc-table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.55; }
.doc-table .ok { color: var(--primary-hover); font-weight: 600; }
.doc-table .bad { color: var(--danger); font-weight: 600; }
.remember { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #fff; border: 0; }
.remember h2 { color: #fff; }
.remember ol { counter-reset: r; list-style: none; padding: 0; display: grid; gap: 10px; margin-top: 14px; }
.remember li { counter-increment: r; display: flex; gap: 12px; align-items: flex-start; color: #fff; font-weight: 500; }
.remember li::before { content: counter(r); flex: none; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-of-type { border-top: 0; margin-top: 6px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 10px 0; font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-muted); color: var(--primary-dark); display: grid; place-items: center; font-size: 18px; font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 14px; color: var(--text-2); }
.steps { display: grid; gap: 12px; margin-top: 14px; counter-reset: s; }
.step { position: relative; padding: 16px 16px 16px 60px; border-radius: var(--radius); background: var(--bg); counter-increment: s; }
.step::before { content: counter(s); position: absolute; left: 16px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 800; }
.step h3 { margin-top: 0; font-size: 15.5px; }
.step p { margin-top: 4px; font-size: 14px; color: var(--text-2); }
.doc-cards { display: grid; gap: 12px; margin-top: 14px; }
.doc-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: #fff; }
.doc-card .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-muted); color: var(--primary); display: grid; place-items: center; }
.doc-card .ico svg { width: 20px; height: 20px; }
.doc-card h3 { margin-top: 12px; font-size: 15.5px; }
.doc-card p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.lia-intro { display: grid; gap: 16px; align-items: center; margin-top: 12px; }
.lia-intro img { width: auto; height: 340px; max-width: 100%; justify-self: center; object-fit: contain; border-radius: var(--radius-lg); background: var(--surface-muted); padding: 10px 24px; }
.doc-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.doc-cta .btn { flex: 1 1 auto; }
.doc-alert { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--warning-soft); color: #7a5508; font-size: 14px; line-height: 1.55; }
.doc-alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
@media (min-width: 640px) {
  .doc-cards { grid-template-columns: repeat(2, 1fr); }
  .lia-intro { grid-template-columns: 220px 1fr; }
  .doc-cta .btn { flex: 0 0 auto; }
}
@media (min-width: 900px) {
  .doc-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
  .doc-toc { position: sticky; top: calc(var(--header-h) + 16px); }
  .doc-toc summary { pointer-events: none; }
  .doc-toc summary::after { content: none; }
  .doc-section { padding: 26px 30px; }
  .doc-section h2 { font-size: 21px; }
  .doc-cards.three { grid-template-columns: repeat(3, 1fr); }
  .steps.row { grid-template-columns: repeat(3, 1fr); }
}

/* Violation reports (modal + bao-cao-vi-pham.html) */
.report-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; background: none; border: 0; color: var(--text-muted); font: inherit; font-size: 13px; cursor: pointer; }
.report-link svg { width: 15px; height: 15px; }
.report-link:hover { color: var(--danger); }
.detail-actions .report-link { justify-self: center; align-self: center; }
.report-cats { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.report-cats legend { padding: 0; margin-bottom: 6px; }
.radio-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 14px; cursor: pointer; }
.radio-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); flex: none; }
.radio-row:has(input:checked) { border-color: var(--primary); background: #eef7f6; }
.report-cats.has-error .radio-row { border-color: var(--danger); }
.report-page { max-width: 720px; }
.report-target { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-muted); margin-bottom: 16px; font-size: 14px; }
.report-target img, .report-target .avatar { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex: none; }
.report-done { text-align: center; padding: 32px 16px; }
.report-done .ico { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #e3f3f1; color: var(--primary-dark); margin-bottom: 12px; }
.report-done .ico svg { width: 28px; height: 28px; }

/* Danh mục page: parent cards with their subcategories */
.cat-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; }
.cat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.cat-card-head { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-height: 56px; }
.cat-card-head:hover b { color: var(--primary); }
.cat-card-img { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #ddebe6; flex: none; display: grid; place-items: center; }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-img svg { width: 62%; height: 62%; }
.cat-card-name { flex: 1; font-size: 16px; }
.cat-card-name .n, .cat-subs .n { color: var(--text-muted); font-weight: 500; }
.cat-card-go { font-size: 22px; color: var(--text-muted); }
.cat-subs { list-style: none; margin: 10px 0 0; padding: 10px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.cat-subs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--bg, #f4f4f4); font-size: 13.5px; color: var(--text-2); }
.cat-subs a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.quick-filters .qf-group { margin-top: 14px; }
.quick-filters h3 { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.quick-filters .chip { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
@media (min-width: 640px) { .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .cat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .cat-card { padding: 18px; }
  .cat-subs { display: grid; gap: 0; }
  .cat-subs a { background: none; padding: 0; min-height: 32px; border-radius: 0; }
  .cat-subs a:hover { background: none; color: var(--primary); }
}

/* Tin tức page */
.news-page { max-width: 820px; }
.news-list { display: grid; gap: 12px; margin-top: 8px; }
.news-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; scroll-margin-top: 80px; }
.news-item time { font-size: 13px; color: var(--text-muted); margin-right: 8px; }
.news-item h2 { font-size: 18px; line-height: 1.35; margin: 10px 0 8px; }
.news-item p { font-size: 15px; line-height: 1.65; color: var(--text-2); }
.news-item p + p { margin-top: 8px; }
.lia-news .lia-tip { font-size: 14px; }
@media (min-width: 768px) { .news-item { padding: 22px 26px; } .news-item h2 { font-size: 20px; } }

.footer-legal { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(31, 92, 85, .12); font-size: 13px; color: var(--text-muted); }
.footer-legal a { color: var(--text-2); min-height: 44px; display: inline-flex; align-items: center; }

/* Icons inside buttons never grow past the label (the chat button on the product page showed a 300px icon) */
.btn svg { width: 18px; height: 18px; flex: none; }

/* Mega menu (desktop "Danh mục") */
.nav-mega { position: relative; display: flex; align-items: center; }
.mega { position: absolute; top: calc(100% + 14px); left: -24px; z-index: 60; display: none; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 18px 28px; width: min(760px, calc(100vw - 48px)); padding: 22px 26px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(31, 42, 42, .12); }
.mega::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.nav-mega:hover .mega, .nav-mega:focus-within .mega { display: grid; }
.mega-col { display: grid; align-content: start; gap: 2px; }
.mega a { font-size: 13.5px; color: var(--text-2); padding: 4px 0; }
.mega a::after { display: none; }
.mega a:hover { color: var(--primary); }
.mega .mega-parent { font-weight: 700; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.mega-all { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 12px !important; color: var(--primary) !important; font-weight: 600; }
@media (hover: none) { .nav-mega:hover .mega { display: none; } }

/* Subcategory chips on Khám phá */
.sub-chips { margin: 0 0 14px; }
.sub-chips .chip { min-height: 40px; display: inline-flex; align-items: center; white-space: nowrap; }
.cat-row .cat-circle svg { width: 58%; height: 58%; opacity: 1; }
.list-layout > section { min-width: 0; }
.cat-subs .n { margin-left: 4px; }

/* Anchored sections (#bai-viet…) land below the sticky header; filter button keeps a 44px touch target */
section[id]:not(.doc-section) { scroll-margin-top: calc(var(--header-h) + 12px); }
.filter-btn { min-height: 44px; }

/* Distance to the listing's area (geo.js) */
.product-dist { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; color: var(--primary-dark); }
.product-dist svg { width: 13px; height: 13px; flex: none; }
.seller-card .dist { color: var(--primary-dark); font-weight: 600; }
.loc-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface-muted); font-size: 13.5px; color: var(--text-2); }
.loc-bar svg { width: 16px; height: 16px; color: var(--primary-dark); flex: none; }
.loc-bar button { background: none; border: 0; padding: 0 6px; min-height: 44px; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; }
.loc-current { display: flex; align-items: center; gap: 6px; font-size: 14px; margin-bottom: 12px; }
.loc-current svg, .modal [data-gps] svg { width: 16px; height: 16px; }
.loc-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 10px; font-size: 12.5px; color: var(--text-muted); }
.loc-or::before, .loc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Floating promo dock (Điểm danh · Mời bạn) ---------- */
.promo-dock { position: fixed; z-index: 54; right: 8px; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px); display: flex; flex-direction: column; gap: 10px; animation: dockIn .45s var(--ease) both; }
body:has(.sticky-cta) .promo-dock { bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 84px); }
.promo-item { position: relative; }
.promo-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 76px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.promo-art { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: #fff; box-shadow: 0 6px 18px rgba(16, 40, 38, .18); transition: transform .2s var(--ease); }
.promo-art svg { width: 40px; height: 40px; }
.promo-btn:hover .promo-art, .promo-btn:focus-visible .promo-art { transform: translateY(-2px); }
.promo-label { display: block; white-space: nowrap; padding: 2px 7px; border-radius: 999px; background: var(--primary-dark); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.2; text-align: center; box-shadow: 0 3px 8px rgba(16, 40, 38, .2); }
.promo-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }
/* small visible ✕, 44px hit area */
.promo-x { position: absolute; top: -14px; right: -12px; width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.promo-x svg { width: 20px; height: 20px; padding: 4px; border-radius: 50%; background: rgba(31, 42, 42, .75); color: #fff; stroke-width: 2.4; }
@keyframes dockIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .promo-dock { animation: none; } .promo-art { transition: none; } }
@media (min-width: 900px) {
  .promo-dock { right: 16px; bottom: auto; top: 50%; transform: translateY(-50%); gap: 18px; animation-name: dockInMid; }
  body:has(.sticky-cta) .promo-dock { bottom: auto; }
  .promo-btn { width: 84px; }
  .promo-art { width: 72px; height: 72px; }
  .promo-art svg { width: 54px; height: 54px; }
  .promo-label { font-size: 11.5px; padding: 3px 9px; }
  @keyframes dockInMid { from { opacity: 0; transform: translate(16px, -50%); } to { opacity: 1; transform: translateY(-50%); } }
}

/* Điểm danh modal */
.ck-grid { list-style: none; margin: 16px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ck-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); text-align: center; }
.ck-cell.is-gift { grid-column: span 2; background: var(--coin-soft); border-color: #f1dfb2; }
.ck-day { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }
.ck-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--coin-soft); color: var(--coin); }
.ck-ico svg { width: 18px; height: 18px; }
.ck-cell.is-gift .ck-ico { width: 40px; height: 40px; background: #fff; }
.ck-cell.is-gift .ck-ico svg { width: 24px; height: 24px; }
.ck-xu { font-size: 13px; }
.ck-cell.is-done { background: var(--primary-soft); border-color: transparent; }
.ck-cell.is-done .ck-ico { background: var(--primary); color: #fff; }
.ck-cell.is-done .ck-xu, .ck-cell.is-done .ck-day { color: var(--primary-dark); }
.ck-cell.is-today { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(74, 168, 162, .18); }
.ck-cell.is-today .ck-day { color: var(--primary-dark); }
.ck-note { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0 0 14px; }
.ck-foot { font-size: 12.5px; color: var(--text-muted); text-align: center; margin: 12px 0 0; }
.ck-card { display: flex; align-items: center; gap: 12px; }
.ck-card[hidden] { display: none; }
.ck-card-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--coin-soft); color: var(--coin); flex: none; }
.ck-card-ico svg { width: 22px; height: 22px; }
.ck-card-main { flex: 1; min-width: 0; }
.ck-card-title { font-size: 15px; font-weight: 700; margin: 0; }
.ck-card .btn { flex: none; min-height: 44px; padding: 0 14px; }
/* Try-on caption under the picture (full-body figures: an overlay would cover the feet) */
.stage-cap { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.stage-cap:empty { display: none; }
@media (max-width: 899.98px) { body[data-nav="ai"] .stage-cap { order: 4; } }
/* Phối đồ: 2 ô Áo · Quần/Váy */
.tryon-product:has(.outfit-slot) { display: grid; gap: 8px; padding: 12px; }
.outfit-title { font-size: 12.5px; }
.outfit-slot { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-width: 0; }
.outfit-slot.is-empty { border-style: dashed; background: var(--surface-muted); }
.outfit-slot .thumb-sm { width: 52px; height: 62px; }
.outfit-slot.is-empty .thumb-sm { background: #fff; color: var(--primary); }
.outfit-slot.is-empty .thumb-sm svg { width: 22px; }
.outfit-info { flex: 1; min-width: 0; }
.outfit-info .k { font-size: 12px; color: var(--text-muted); }
.outfit-info .t { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outfit-info .price { font-weight: 700; font-size: 14px; }
.outfit-act { display: flex; align-items: center; gap: 2px; flex: none; }
.outfit-act .btn { min-height: 40px; }
.outfit-act .icon-btn { width: 44px; height: 44px; }
.outfit-act .icon-btn svg { width: 18px; height: 18px; }
.tryon-stage .real-set { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n, 1), 1fr); gap: 2px; background: #fff; }
.tryon-stage .real-set img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tryon-stage .real-set .real, .tryon-stage .real-set .placeholder { align-self: center; justify-self: center; }
/* Try-on height: figure scaled from the feet (cm / max height); edges faded into the stage colour (= frame background) */
.tryon-stage .morph, .tryon-stage .stage-img.fig {
  transform-origin: 50% 100%; transition: transform .12s linear;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 3%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent), linear-gradient(to bottom, transparent, #000 3%);
  mask-composite: intersect;
}
@media (prefers-reduced-motion: reduce) { .tryon-stage .morph, .tryon-stage .stage-img.fig { transition: none; } }
/* Listing photo quality (dang-san-pham.html) */
.upload-item.has-issue { border-color: var(--warning); box-shadow: 0 0 0 2px var(--warning-soft); }
.upload-item .cover-tag, .upload-item .q-tag { position: absolute; left: 6px; top: 6px; max-width: calc(100% - 44px); padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-item .cover-tag { background: var(--primary-dark); color: #fff; }
.upload-item .q-tag { background: var(--warning); color: #fff; }
.upload-item .mk-cover { position: absolute; right: 4px; top: 36px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: var(--primary-dark); font-size: 15px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.photo-issues { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.photo-issues:empty { display: none; }
.photo-issues li { font-size: 12.5px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: var(--warning-soft); color: var(--text); }
.photo-issues li.is-cover { border: 1px solid var(--warning); }
.photo-tip { margin-top: 8px; }

/* ---------- Garment measurements (listing form) + fit estimate (try-on) ---------- */
.measure-box { margin-bottom: 10px; }
.measure-intro { margin: 0 0 10px; }
.measure-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.m-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.m-k { font-size: 13px; font-weight: 600; color: var(--text); }
.m-item .input-wrap { display: block; position: relative; }
.m-item .input { padding-right: 38px; font-size: 16px; }
.m-item .input-suffix { right: 6px; padding: 2px 5px; }
@media (min-width: 560px) { .measure-grid { gap: 10px; } .m-item .input { padding-right: 52px; } .m-item .input-suffix { right: 12px; padding: 2px 8px; } }
.m-how { font-size: 12px; color: var(--muted); line-height: 1.35; }
.measure-sub { display: block; margin: 14px 0 6px; font-size: 13px; }
#f-stretch .chip { min-height: 40px; }

.fit-panel { margin-top: 18px; border: 1px solid var(--line, #e3e9e8); background: #fff; border-radius: 12px; padding: 14px; }
.fit-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.fit-head b { font-size: 15px; }
.fit-tag { font-size: 11.5px; color: var(--primary-dark); background: #e6efee; border-radius: 999px; padding: 3px 9px; }
.fit-item + .fit-item { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #dfe6e5; }
.fit-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fit-name { font-size: 13.5px; font-weight: 600; line-height: 1.35; min-width: 0; }
.fit-verdict { flex: none; font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.fit-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fit-chip { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12.5px; border-radius: 999px; padding: 4px 10px; border: 1px solid transparent; line-height: 1.3; }
.fit-chip small { font-size: 11px; opacity: .75; font-weight: 600; }
.fit-chip em { font-style: normal; opacity: .8; }
.is-good.fit-chip, .is-good.fit-verdict { background: #e7f5f1; color: #1f5c55; border-color: #c4e4dc; }
.is-warn.fit-chip, .is-warn.fit-verdict { background: #fff6e5; color: #7a5410; border-color: #f1dfb2; }
.is-bad.fit-chip, .is-bad.fit-verdict { background: #fdecec; color: #a32a2e; border-color: #f5c9ca; }
.is-info.fit-chip, .is-info.fit-verdict { background: #f1f3f3; color: var(--text-2, #4a5554); border-color: #e1e6e5; }
.fit-range { margin: 8px 0 0; font-size: 12.5px; color: var(--text-2, #4a5554); }
.fit-body { margin: 12px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

/* ---------- Hộ chiếu món đồ (ReLoop Passport, schema v26) ---------- */
.badge-pp { background: rgba(31, 92, 85, .92); color: #fff; }
.product-media .badge-pp { top: auto; bottom: 10px; left: 10px; right: auto; }
.badge-pp-full { background: linear-gradient(135deg, #1f5c55, #4aa8a2); color: #fff; }
.badge-coin { background: var(--coin-soft); color: #8a5a07; }
.text-danger { color: var(--danger); }
.loading-block { padding: 48px 0; text-align: center; color: var(--muted); }
.form-row-2 { display: grid; grid-template-columns: 1fr; gap: 0 12px; }
@media (min-width: 560px) { .form-row-2 { grid-template-columns: 1fr 1fr; } }
.pp-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; }
.pp-ico svg { width: 22px; height: 22px; }

/* strip on the product page / preview / success page */
.pp-strip { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; border: 1px solid #cfe3e0; border-radius: var(--radius); background: #f5fbfa; color: inherit; text-decoration: none; }
.pp-strip:hover { border-color: var(--primary); }
.pp-strip .grow { min-width: 0; flex: 1; }
.pp-strip b { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--primary-dark); }
.pp-strip .grow > span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.pp-strip .see { flex: none; font-size: 13px; font-weight: 600; color: var(--primary); }
.pp-strip.is-preview { background: #fff; border-style: dashed; }
.pp-success { max-width: 520px; margin: 0 auto 16px; text-align: left; }
@media (max-width: 479.98px) { .pp-strip .see { display: none; } }

/* passport page */
.pp-hero { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 12px; background: var(--card); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
@media (min-width: 768px) { .pp-hero { grid-template-columns: 260px 1fr; padding: 22px; gap: 26px; } }
.pp-cover { position: relative; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; background: var(--surface-muted); max-width: 220px; width: 100%; margin: 0 auto; }
@media (min-width: 768px) { .pp-cover { max-width: 320px; } }
.pp-cover img { width: 100%; height: 100%; object-fit: cover; }
.pp-cover .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.pp-cover .ph > svg { width: 56%; }
.pp-id { min-width: 0; }
.pp-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--primary-dark); }
.pp-kicker svg { width: 16px; height: 16px; }
.pp-title { font-size: 22px; line-height: 1.25; margin: 6px 0 8px; }
@media (min-width: 768px) { .pp-title { font-size: 26px; } }
.pp-code { display: flex; align-items: center; gap: 6px; }
.pp-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 18px; font-weight: 700; letter-spacing: .03em; background: var(--surface-muted); padding: 4px 10px; border-radius: 8px; }
.pp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pp-badges a.badge { text-decoration: none; }
.pp-spec { margin-top: 14px; }
.pp-scope { display: flex; gap: 8px; margin: 14px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.pp-scope svg { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--primary); }
.pp-owner { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--primary-soft); }
.pp-owner b { display: block; color: var(--primary-dark); }
.pp-owner span { font-size: 13px; color: var(--text-2); }
.pp-owner-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.pp-owner-acts .btn { min-height: 44px; }
@media (min-width: 768px) { .pp-owner { flex-direction: row; align-items: center; justify-content: space-between; } }
.pp-layout { display: grid; grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
@media (min-width: 1024px) { .pp-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.pp-side { display: grid; gap: 16px; min-width: 0; }
.pp-card { background: var(--card); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); min-width: 0; }
@media (min-width: 768px) { .pp-card { padding: 20px; } }
.pp-card h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 12px; }
.pp-card h2 svg { width: 18px; height: 18px; color: var(--primary); }
.pp-card p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; }
.pp-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.pp-timeline::before { content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.pp-ev { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.pp-ev:last-child { padding-bottom: 0; }
.pp-dot { position: relative; z-index: 1; width: 36px; height: 36px; flex: none; border-radius: 50%; background: #fff; border: 2px solid var(--primary); color: var(--primary-dark); display: grid; place-items: center; }
.pp-dot svg { width: 17px; height: 17px; }
.pp-ev-SOLD .pp-dot, .pp-ev-RECEIVED .pp-dot { background: var(--primary); color: #fff; }
.pp-ev-SOLD_OFF .pp-dot, .pp-ev-SELF_ADDED .pp-dot { border-color: var(--warning); color: var(--warning); }
.pp-ev-body { min-width: 0; flex: 1; padding-top: 6px; }
.pp-ev-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.pp-ev-head b { font-size: 14px; }
.pp-ev-meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pp-cond, .pp-note { display: block; font-size: 13px; color: var(--text-2); margin-top: 4px; }
.pp-ev-imgs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.pp-ev-imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-muted); }
.pp-quote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--primary); background: #f5fbfa; border-radius: 0 8px 8px 0; font-size: 13px; font-style: italic; color: var(--text-2); }
.pp-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.pp-tag.is-verified { background: #e7f5f1; color: #1f5c55; }
.pp-tag.is-self { background: #fff6e5; color: #7a5410; }
.pp-origin { display: grid; gap: 10px; }
.pp-origin p { margin: 4px 0 0; font-size: 13.5px; }
.idn-views { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.idn-view { margin: 0; min-width: 0; }
.idn-view img, .idn-view > span { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-muted); display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); }
.idn-view > span svg { width: 22px; height: 22px; }
.idn-view figcaption { margin-top: 4px; font-size: 12px; line-height: 1.3; }
.idn-view figcaption b { display: block; }
.idn-view figcaption span { color: var(--muted); }
.idn-view.is-empty > span { border-style: dashed; }
.pp-share { display: flex; gap: 14px; align-items: flex-start; }
.pp-share p { font-size: 13px; }
.pp-lookup { margin-top: 16px; background: var(--card); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); max-width: 560px; }
.pp-lookup h2 { font-size: 17px; margin: 0 0 4px; }
.pp-lookup p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); }
.pp-lookup-form { display: flex; gap: 8px; }
.pp-lookup-form .input { flex: 1; min-width: 0; font-size: 16px; text-transform: uppercase; }

/* QR */
.qr-box { display: grid; justify-items: center; gap: 8px; padding: 12px; margin: 8px auto 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); max-width: 280px; transition: opacity .2s; }
.qr-box svg { width: 100%; max-width: 240px; height: auto; display: block; }
.qr-box.sm { width: 112px; flex: none; padding: 6px; margin: 0; }
.qr-box.sm svg { max-width: 100px; }
.qr-box.is-expired svg { opacity: .2; }
.qr-wait { padding: 60px 0; color: var(--muted); font-size: 13px; }
.qr-link { font-size: 12.5px; }
.qr-meta { text-align: center; font-size: 14px; margin: 10px 0 0; }
.qr-done { display: grid; justify-items: center; gap: 4px; padding: 30px 10px; text-align: center; }
.qr-done svg { width: 40px; height: 40px; color: #fff; background: var(--primary); border-radius: 50%; padding: 8px; }
.qr-done span { font-size: 13px; color: var(--text-2); }

/* wardrobe */
.wd-head { display: flex; flex-direction: column; gap: 12px; margin: 10px 0 18px; }
@media (min-width: 768px) { .wd-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.wd-head .btn { min-height: 44px; align-self: flex-start; }
.wd-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 16px; border-radius: var(--radius); background: var(--warning-soft); color: #6b4a08; font-size: 13.5px; }
.wd-pending svg { width: 20px; height: 20px; flex: none; }
.wd-pending span { flex: 1; min-width: 200px; }
.wd-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .wd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .wd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wd-card { display: flex; gap: 12px; padding: 12px; background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.wd-media { position: relative; width: 104px; flex: none; aspect-ratio: 4 / 5; align-self: flex-start; border-radius: 10px; overflow: hidden; background: var(--surface-muted); }
.wd-media img { width: 100%; height: 100%; object-fit: cover; }
.wd-media .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.wd-media .ph > svg { width: 60%; }
.wd-media .badge { position: absolute; left: 6px; bottom: 6px; right: 6px; justify-content: center; font-size: 10.5px; white-space: normal; text-align: center; line-height: 1.2; }
.wd-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.wd-title { font-weight: 700; font-size: 14.5px; color: var(--text); text-decoration: none; line-height: 1.3; }
.wd-code { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--primary-dark); }
.wd-code svg { width: 14px; height: 14px; }
.wd-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; }
.wd-meta { font-size: 12px; color: var(--muted); line-height: 1.4; }
.wd-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.wd-acts .btn { min-height: 36px; }
@media (pointer: coarse) { .wd-acts .btn { min-height: 44px; } }

/* identity photo slots (form + add-to-wardrobe modal) */
.idn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-width: 460px; }
.idn-slot { position: relative; min-width: 0; }
.idn-slot > img, .idn-add { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; display: block; }
.idn-add { display: grid; place-content: center; justify-items: center; gap: 4px; border: 1.5px dashed var(--line-2); background: #fafcfc; color: var(--primary-dark); cursor: pointer; font-size: 12.5px; font-weight: 600; }
.idn-add svg { width: 22px; height: 22px; }
.idn-add:hover { border-color: var(--primary); }
.idn-slot .rm { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--badge-dark); color: #fff; border: 0; display: grid; place-items: center; font-size: 15px; }
.idn-lock { position: absolute; top: 6px; left: 6px; font-size: 10.5px; font-weight: 700; background: rgba(31, 92, 85, .9); color: #fff; padding: 2px 7px; border-radius: 999px; }
.idn-cap { margin-top: 5px; font-size: 12px; line-height: 1.3; }
.idn-cap b { display: block; }
.idn-cap span { color: var(--muted); }

/* anchor / proof photo tile */
.anchor-box { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fafcfc; margin-top: 12px; }
.anchor-text { flex: 1; min-width: 0; font-size: 14px; }
.anchor-text p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-2); line-height: 1.45; }
.anchor-text .opt { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.anchor-tile { position: relative; width: 92px; height: 92px; flex: none; border-radius: 10px; display: grid; place-content: center; justify-items: center; gap: 4px; border: 1.5px dashed var(--line-2); background: #fff; color: var(--primary-dark); font-size: 11.5px; font-weight: 600; text-align: center; cursor: pointer; overflow: hidden; }
.anchor-tile svg { width: 22px; height: 22px; }
.anchor-tile.has-photo { border-style: solid; padding: 0; display: block; }
.anchor-tile.has-photo img { width: 100%; height: 100%; object-fit: cover; }
.anchor-tile .rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--badge-dark); color: #fff; border: 0; font-size: 14px; display: grid; place-items: center; }
.proof-row { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.proof-row .hint { margin: 0; }
.recv-done { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12.5px; color: var(--primary-dark); font-weight: 600; }
.recv-done svg { width: 14px; height: 14px; }

/* listing form: passport section, resale banner, AI compare, wardrobe-match modal */
.pp-form { margin-top: 24px; padding: 16px; border: 1px solid #cfe3e0; border-radius: var(--radius-lg); background: #f8fcfb; }
.pp-form-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.pp-form-head b { display: block; font-size: 15px; color: var(--primary-dark); }
.pp-form-head span { display: block; font-size: 13px; color: var(--text-2); line-height: 1.45; margin-top: 2px; }
.resale-banner { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 18px; border-radius: var(--radius); background: var(--primary-soft); font-size: 13.5px; }
.resale-banner[hidden] { display: none; }
.resale-banner > svg { width: 22px; height: 22px; color: var(--primary-dark); flex: none; }
.resale-banner > div { flex: 1; min-width: 200px; }
.resale-banner b { display: block; color: var(--primary-dark); }
.resale-banner span { color: var(--text-2); }
.pp-ai { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px; margin-bottom: 14px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.pp-ai[hidden] { display: none; }
.pp-ai-text { flex: 1; min-width: 200px; font-size: 13px; }
.pp-ai-text b { display: block; font-size: 14px; }
.pp-ai-text span { color: var(--text-2); }
.pp-ai .btn { min-height: 44px; }
.pp-ai-out { flex-basis: 100%; font-size: 13.5px; }
.pp-ai-out:empty { display: none; }
.pp-ai-out p { margin: 6px 0; }
.pp-ai-out svg { width: 15px; height: 15px; vertical-align: -2px; }
.pp-ai-warn { color: #8a3a12; background: #fff1ea; padding: 8px 10px; border-radius: 8px; }
.pp-ai-list { margin: 4px 0 8px; padding-left: 18px; }
.match-item { display: flex; gap: 10px; align-items: center; }
.match-item .thumb-sm { flex: none; }
.match-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.match-acts .btn { flex: 1 1 180px; min-height: 44px; }

/* handover page (nhan-hang.html) */
.narrow-page { max-width: 560px; }
.hand-card { margin-top: 16px; background: var(--card); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.hand-title { font-size: 22px; margin: 0 0 12px; }
.hand-product { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); background: #f5fbfa; margin-bottom: 12px; }
.hand-product > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.hand-product b { font-size: 15px; }
.hand-code { display: inline-flex; align-items: center; gap: 4px; color: var(--primary-dark); font-weight: 600; }
.hand-code svg { width: 14px; height: 14px; }
.hand-list { border: 0; padding: 0; margin: 0 0 6px; }
.hand-product .thumb-sm, .match-item .thumb-sm { width: 56px; height: 64px; border-radius: 8px; background: var(--surface-muted); overflow: hidden; display: grid; place-items: center; flex: none; }
.hand-product .thumb-sm img, .match-item .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.hand-product .thumb-sm .ph, .match-item .thumb-sm .ph { display: grid; place-items: center; width: 100%; height: 100%; }
.hand-product .thumb-sm svg, .match-item .thumb-sm svg { width: 60%; }

/* ---------- AI try-on: product picker (photo grid, search, filters) ---------- */
.modal.modal-wide { max-height: 94vh; }
@media (min-width: 640px) { .modal.modal-wide { max-width: 880px; } }
.pick-tools { display: flex; gap: 8px; }
.pick-search { flex: 1; min-width: 0; font-size: 16px; }
.pick-sort { width: auto; max-width: 46%; font-size: 15px; }
.pick-chips { flex-wrap: nowrap; overflow-x: auto; margin: 10px 0 4px; padding-bottom: 4px; scrollbar-width: thin; }
.pick-chips .chip { flex: none; }
.pick-chips .chip .n { opacity: .65; font-weight: 500; margin-left: 2px; }
.pick-count { font-size: 12.5px; color: var(--muted); margin: 6px 0 8px; }
.pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 520px) { .pick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 760px) { .pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pick-card { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.pick-card:hover:not(:disabled) { border-color: var(--primary); box-shadow: var(--shadow-sm); }
.pick-card:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pick-card.is-on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.pick-card:disabled { cursor: not-allowed; opacity: .55; }
.pick-media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--surface-muted); }
.pick-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick-media .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.pick-media .ph > svg, .pick-media .ph > div { width: 60%; }
.pick-media .badge { position: absolute; top: 8px; left: 8px; }
.pick-on { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.pick-on svg { width: 15px; height: 15px; }
.pick-off { position: absolute; left: 8px; right: 8px; bottom: 8px; font-size: 11px; text-align: center; background: rgba(43, 53, 51, .85); color: #fff; border-radius: 999px; padding: 3px 6px; }
.pick-info { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; min-width: 0; }
.pick-title { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pick-price { font-size: 13px; font-weight: 700; color: var(--primary); }
.pick-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-info .fit-verdict { align-self: flex-start; margin-top: 4px; font-size: 11px; padding: 2px 8px; }
.pick-empty { grid-column: 1 / -1; padding: 24px 0; text-align: center; }
.pick-more { margin-top: 12px; }
.pick-note { margin: 10px 0 0; }
