/* ============================================================
   Video — dải nổi bật trên trang chủ + feed lướt dọc
   ============================================================ */

/* Trang chủ đã có ô tìm kiếm lớn: ẩn ô tìm kiếm trùng trên thanh tiêu đề. */
body.home-mode .site-header .search { display: none; }

.video-band {
  margin: 34px 0 6px;
  padding: 24px clamp(18px, 2.6vw, 30px) 18px;
  border-radius: var(--r-xl);
  background: radial-gradient(120% 140% at 12% 0%, #22303f 0%, #131a22 46%, #0b1016 100%);
  color: #f4f7fa;
  box-shadow: 0 30px 70px -42px rgba(10, 14, 20, .9);
  position: relative;
  overflow: hidden;
}
.video-band::after {
  content: "";
  position: absolute;
  inset: auto -60px -120px auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(184, 80, 29, .38), transparent 68%);
  pointer-events: none;
}
.vb-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.vb-kicker {
  margin: 0 0 7px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #93a6b8;
}
.vb-title h2 {
  margin: 0;
  font-size: clamp(21px, 2.5vw, 31px);
  font-weight: 600;
  letter-spacing: -.015em;
}
.vb-sub {
  margin: 7px 0 0;
  color: #a3b2c1;
  font-size: 13.5px;
  max-width: 52ch;
}
.vb-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .2s;
}
.vb-all:hover { background: rgba(255, 255, 255, .14); transform: translateY(-1px); }
.vb-all b { font-variant-numeric: tabular-nums; }
.vb-play {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--terra);
  color: #fff;
}
.vb-play svg { width: 12px; height: 12px; fill: currentColor; }

.vb-rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  position: relative;
  z-index: 1;
}
.vb-rail::-webkit-scrollbar { height: 6px; }
.vb-rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .2); border-radius: 99px; }
.vrail-card {
  flex: 0 0 clamp(152px, 17vw, 214px);
  scroll-snap-align: start;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.vrail-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #0d1218;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.vrail-card.is-short .vrail-thumb { aspect-ratio: 9 / 14; }
.vrail-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.vrail-card:hover .vrail-thumb img { transform: scale(1.07); }
.vrail-thumb .vplay {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 30px;
  height: 30px;
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(3px);
}
.vbadge-short {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--terra);
  color: #fff;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .08em;
}
.vrail-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 9px;
  font-size: 13px;
  line-height: 1.42;
  color: #e6edf4;
}

/* Thẻ video nằm trong kết quả tìm kiếm: dùng lại khung .product-card */
.video-strip.is-grid .video-track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 18px;
}
.video-strip.is-grid .video-strip-more {
  border: 0;
  background: none;
  font: inherit;
  color: var(--terra);
  font-weight: 600;
  cursor: pointer;
}
.video-card .card-media { position: relative; }
.video-card .card-media .vplay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  background: rgba(12, 16, 22, .66);
  backdrop-filter: blur(3px);
}
.video-card .card-media .vplay svg { width: 14px; height: 14px; fill: #fff; }
.badge-video { background: #101720 !important; color: #fff !important; letter-spacing: .08em; }
.video-card .card-name { -webkit-line-clamp: 2; }

/* ---------------------------------------------------- feed lướt dọc */
.vfeed {
  position: fixed;
  inset: 0;
  z-index: 900;                      /* trên mọi modal (400-470) và toast */
  background: #05080b;
  color: #f2f6fa;
  outline: none;
}
.vfeed.hidden { display: none; }
body.vfeed-open { overflow: hidden; }
.vfeed-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(12, 16, 22, .6);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.vfeed-scroll {
  height: 100dvh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
.vfeed-scroll::-webkit-scrollbar { display: none; }
.vslide {
  height: 100dvh;
  content-visibility: auto;             /* slide ngoài khung nhìn không tốn layout/paint */
  contain-intrinsic-size: auto 100dvh;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: block;
  padding: 0;
  overflow: hidden;
}
/* Video chiếm trọn khung nhìn: 100% rộng, 100% cao, không viền, không bo góc. */
.vslide-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  box-shadow: none;
}
.vslide-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; }
/* lướt chuột trên khung video vẫn cuộn được feed; bấm một lần mới giao quyền cho YouTube */
.vslide-frame.is-active iframe { pointer-events: auto; }
.vslide-tapidle {
  position: absolute; left: 14px; top: 14px; z-index: 2;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(8, 12, 18, .62); color: #dfe8f1;
  font-size: 11.5px; letter-spacing: .01em; pointer-events: none;
  transition: opacity 160ms ease;
}
.vslide-frame.is-active .vslide-tapidle { opacity: 0; }
.vfeed-nav {
  position: fixed; right: 18px; bottom: 22px; z-index: 4;
  display: flex; flex-direction: column; gap: 8px;
}
.vfeed-step {
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(12, 16, 22, .68); color: #fff; font-size: 17px; line-height: 1;
  backdrop-filter: blur(6px);
}
.vfeed-step:hover { background: rgba(180, 86, 43, .82); }
.pd-video-more { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pd-video-thumb {
  display: flex; gap: 8px; align-items: center; max-width: 260px; text-align: left;
  padding: 6px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line, #e4e8ee); background: #fff;
}
.pd-video-thumb img { width: 64px; height: 40px; object-fit: cover; border-radius: 6px; }
.pd-video-thumb span {
  font-size: 11.5px; line-height: 1.35; color: #46586b;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pd-video-thumb:hover { border-color: #b4562b; }
.vslide.is-short .vslide-frame {
  aspect-ratio: auto;
  height: 100%;
  width: 100%;
  margin: 0;
}
.vslide-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7f93a6;
}
.vslide-meta h3 {
  margin: 0;
  font-size: clamp(19px, 2vw, 26px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -.01em;
}
.vslide-sub { margin: 10px 0 0; color: #93a5b6; font-size: 13.5px; }
/* sản phẩm trong Space ứng với video đang xem */
.vslide-products { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vslide-prod-head { flex: 0 0 100%; margin: 0 0 2px; font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: #7f93a6; }
.vslide-prod { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.06);
  color: #eef4fa; text-align: left; cursor: pointer; max-width: 340px; }
.vslide-prod:hover { background: rgba(255,255,255,.13); border-color: rgba(255,255,255,.26); }
.vslide-prod img { width: 46px; height: 46px; border-radius: 9px; object-fit: contain;
  background: #fff; flex: 0 0 auto; }
.vslide-prod-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vslide-prod-body b { font-size: 13px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vslide-prod-body i { font-style: normal; font-size: 12.5px; color: #ffc793; font-weight: 600; }
.vslide-prod-go { margin-left: auto; font-size: 12px; color: #9ec7ff; white-space: nowrap; }

.vslide-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.vslide-actions .vbtn {
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.vslide-actions .vbtn:hover { background: rgba(255, 255, 255, .15); }
.vslide-actions .vbtn-share { background: var(--terra); border-color: transparent; }
.vslide-actions .vbtn-ghost { background: none; }
.vfeed-hint {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #b9c7d5;
  font-size: 12px;
  letter-spacing: .04em;
  pointer-events: none;
  animation: vhint 3.2s ease-in-out infinite;
}
@keyframes vhint {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: .75; }
  50% { transform: translateX(-50%) translateY(4px); opacity: 1; }
}
.v-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  z-index: 200;
  padding: 11px 18px;
  border-radius: 999px;
  background: #10161d;
  color: #fff;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.v-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 860px) {
  .vslide { display: block; }
  .vslide-frame { position: absolute; inset: 0; height: 100%; }
  .vslide.is-short .vslide-frame { inset: 0; height: 100%; width: 100%; margin: 0; }
  .vslide-meta { text-align: left; padding-bottom: 18px; }
  .vslide-actions { justify-content: flex-start; }
  .vslide-meta h3 { font-size: 16px; }
  .vslide-actions .vbtn { padding: 7px 11px; font-size: 12px; }
  .vslide-sub { font-size: 12px; }
  .video-band { border-radius: var(--r-lg); padding: 18px 16px 12px; }
  .vb-head { flex-direction: column; align-items: flex-start; }
}

/* Lớp thông tin nằm trên video, đáy khung — video vẫn đủ 100% rộng/cao. */
.vslide-meta {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 72px clamp(16px, 5vw, 64px) clamp(22px, 4vh, 44px);
  background: linear-gradient(180deg, rgba(4, 8, 12, 0) 0%, rgba(4, 8, 12, .82) 52%, rgba(4, 8, 12, .94) 100%);
}

:root {
  --cream: #faf6f0;
  --cream-2: #f2ebe1;
  --bone: #ffffff;
  --ink: #17120e;
  --ink-2: #3a3129;
  --ink-3: #6b5f53;
  --muted: #8d8175;
  --line: #e8dfd2;
  --line-2: #f0e9de;
  --terra: #b8501d;
  --terra-2: #d16a2d;
  --terra-soft: #fdf0e7;
  --gold: #c9953f;
  --green: #2f6f52;
  --shadow-sm: 0 1px 2px rgba(23, 18, 14, .05), 0 6px 16px -10px rgba(23, 18, 14, .22);
  --shadow-md: 0 12px 34px -18px rgba(23, 18, 14, .3), 0 2px 6px rgba(23, 18, 14, .05);
  --shadow-lg: 0 40px 90px -40px rgba(23, 18, 14, .5);
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --header-h: 74px;
  --max: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 85% -160px, #f6e7d7 0%, rgba(250, 246, 240, 0) 65%),
    var(--cream);
  color: var(--ink);
  font-family: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hidden { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.015em; line-height: 1.18; }
p { margin: 0; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(23, 18, 14, .96);
  color: #f7f1e8;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--terra-2), #8d3a12);
  color: #fff; font-weight: 700; font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 14px; letter-spacing: .16em; }
.brand-text small { font-size: 10px; color: #bfae9c; letter-spacing: .13em; text-transform: uppercase; }

.search {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  padding: 5px 5px 5px 14px;
  min-width: 0;
  transition: border-color .18s, background .18s;
}
.search:focus-within { border-color: rgba(209, 106, 45, .7); background: rgba(255, 255, 255, .12); }
.search-icon { width: 18px; height: 18px; flex: 0 0 18px; color: #b8a794; }
.search input {
  flex: 1 1 auto; min-width: 0;
  background: none; border: 0; outline: none;
  color: #fff; font-size: 14.5px; padding: 7px 2px;
}
.search input::placeholder { color: #a2927f; }
.search input::-webkit-search-cancel-button { filter: invert(.7); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #eddfcd; transition: background .18s, color .18s, border-color .18s;
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-search {
  border: 0; border-radius: 999px; padding: 8px 18px;
  background: linear-gradient(160deg, var(--terra-2), var(--terra));
  color: #fff; font-weight: 600; font-size: 14px;
  box-shadow: 0 6px 14px -8px rgba(209, 106, 45, .9);
}
.btn-search:hover { filter: brightness(1.06); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.clock span { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 15px; letter-spacing: .03em; }
.clock small { font-size: 10px; color: #b3a290; text-transform: uppercase; letter-spacing: .1em; }

.cart-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  border-radius: 999px; padding: 8px 14px 8px 12px;
  color: #f4e9db; font-weight: 600; font-size: 13px;
}
.cart-btn svg { width: 18px; height: 18px; }
.cart-btn:hover { background: rgba(255, 255, 255, .14); }
.cart-btn #cart-count {
  min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--terra-2); color: #fff; font-size: 11.5px;
}
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.09); } 100% { transform: scale(1); } }

.cat-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px 11px;
  display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .16);
  background: transparent; color: #cbbaa7;
  border-radius: 999px; padding: 5px 13px;
  font-size: 12.5px; white-space: nowrap;
  transition: all .16s;
}
.chip:hover { color: #fff; border-color: rgba(255, 255, 255, .35); }
.chip.active { background: #f7f1e8; border-color: #f7f1e8; color: var(--ink); font-weight: 600; }
.chip .chip-count { opacity: .6; margin-left: 5px; font-size: 11px; }

/* ---------- layout ---------- */
main { max-width: var(--max); margin: 0 auto; padding: 26px 22px 60px; }
.view { animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--terra); font-weight: 600; margin-bottom: 12px;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--terra-2);
  box-shadow: 0 0 0 0 rgba(209, 106, 45, .6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(209, 106, 45, .55); }
  70% { box-shadow: 0 0 0 9px rgba(209, 106, 45, 0); }
  100% { box-shadow: 0 0 0 0 rgba(209, 106, 45, 0); }
}

.hint { color: var(--muted); font-size: 12.5px; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, .85fr);
  gap: 30px;
  align-items: stretch;
  padding: 18px 0 32px;
}
.hero h1 {
  font-family: "Playfair Display", "Be Vietnam Pro", serif;
  font-size: clamp(30px, 4.1vw, 50px);
  line-height: 1.08;
  letter-spacing: -.02em;
  font-weight: 600;
}
.hero h1 em { font-style: italic; color: var(--terra); }
.hero-sub { margin-top: 16px; max-width: 46ch; color: var(--ink-3); font-size: 15px; }
.hero-cta { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 11px 20px;
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  background: linear-gradient(160deg, var(--terra-2), var(--terra));
  color: #fff; box-shadow: 0 12px 24px -16px rgba(184, 80, 29, .9);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -16px rgba(184, 80, 29, .95); }
.btn-ghost { background: var(--bone); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #d9cdbc; background: #fffdfa; }
.btn-block { width: 100%; justify-content: center; }

.hero-side { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.live-clock {
  background: var(--ink); color: #f8efe2;
  border-radius: var(--r-lg); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative; overflow: hidden;
}
.live-clock::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(220px 120px at 100% 0%, rgba(209, 106, 45, .35), transparent 70%);
}
.live-clock-label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #c2b0a0; }
.live-clock strong { font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: .02em; line-height: 1.15; }
.live-clock span:last-child { font-size: 12.5px; color: #c9b8a6; }

.live-pill {
  display: flex; align-items: center; gap: 12px;
  background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.live-pill strong { font-size: 20px; font-variant-numeric: tabular-nums; display: block; line-height: 1.1; }
.live-pill small { color: var(--muted); font-size: 11.5px; }

/* ---------- kpi ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px; margin-bottom: 18px;
}
.kpi {
  background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.kpi .kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.kpi .kpi-value {
  font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums;
  margin-top: 6px; letter-spacing: -.02em;
}
.kpi .kpi-foot { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.kpi .kpi-icon {
  position: absolute; right: 14px; top: 14px;
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--terra-soft); color: var(--terra);
}
.kpi .kpi-icon svg { width: 17px; height: 17px; }
.kpi-accent { border-color: #f0d9c7; background: linear-gradient(170deg, #fffafa, var(--bone)); }

/* ---------- panels ---------- */
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.panel-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel {
  background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 18px 20px 20px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head h2 { font-size: 15.5px; }
.panel-head .hint { margin-top: 3px; }
.chart-stat { text-align: right; }
.chart-stat strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--terra); line-height: 1.1; }
.chart-stat span { font-size: 11px; color: var(--muted); }

.chart-wrap { position: relative; width: 100%; }
#live-chart { width: 100%; height: 218px; display: block; }

/* ---------- bars ---------- */
.bars { display: flex; flex-direction: column; gap: 13px; }
.bar-row { cursor: pointer; }
.bar-row .bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.8px; margin-bottom: 5px; }
.bar-row .bar-name { color: var(--ink-2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar-val { color: var(--muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.bar-track { height: 7px; border-radius: 999px; background: var(--cream-2); overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #e2a06a, var(--terra));
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}
.bar-row:hover .bar-fill { filter: brightness(1.05); }

/* ---------- rank list ---------- */
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 6px; border-radius: 10px; cursor: pointer;
  transition: background .15s;
}
.rank-row:hover { background: var(--cream); }
.rank-idx {
  flex: 0 0 20px; text-align: center; font-size: 11.5px; font-weight: 700;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.rank-row:nth-child(1) .rank-idx { color: var(--terra); }
.rank-thumb {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 9px;
  object-fit: contain; background: #fff; border: 1px solid var(--line-2);
}
.rank-body { min-width: 0; flex: 1 1 auto; }
.rank-name {
  font-size: 12.8px; font-weight: 500; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rank-meta { font-size: 11px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.rank-value { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

.footnote { color: var(--muted); font-size: 12px; margin-top: 18px; line-height: 1.6; }
.footnote a { color: var(--terra); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- catalog ---------- */
.catalog-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin: 8px 0 20px; flex-wrap: wrap;
}
.catalog-head h1 { font-size: clamp(24px, 3vw, 34px); }
.catalog-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.select-wrap { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.select-wrap select {
  appearance: none; background: var(--bone) 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='%238d8175' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 32px 8px 14px; font-size: 13px; color: var(--ink);
}

.image-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--bone); border: 1px solid var(--line);
  border-radius: 999px; padding: 4px 6px 4px 4px; font-size: 12.5px;
}
.image-chip img { width: 32px; height: 32px; border-radius: 999px; object-fit: cover; }
.image-chip button {
  width: 24px; height: 24px; border-radius: 999px; border: 0;
  background: var(--cream-2); color: var(--ink-3); font-size: 15px; line-height: 1;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden;
  cursor: pointer; position: relative;
  transition: transform .2s, box-shadow .25s, border-color .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #ded1c0; }
.card-media {
  position: relative; aspect-ratio: 4 / 3; background: #fbf9f6;
  display: grid; place-items: center; padding: 12px; overflow: hidden;
}
.card-media img { max-height: 100%; width: 100%; height: 100%; object-fit: contain; transition: transform .4s ease; }
.product-card:hover .card-media img { transform: scale(1.04); }
.card-badges { position: absolute; top: 9px; left: 9px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge {
  font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2);
}
.badge-sale { background: #fdecec; color: #b42318; }
.badge-new { background: #eaf5ee; color: #21734c; }
.badge-match { background: #fff2e2; color: #a45a13; }
.card-fav {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .92); border: 1px solid var(--line-2);
  color: var(--muted); transform: translateZ(0);
}
.card-fav svg { width: 15px; height: 15px; }
.card-fav.on { color: #d33a2c; background: #fff1ef; border-color: #fbd7d2; }
.card-fav.on svg { fill: currentColor; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; }
.card-cat { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.card-name {
  font-size: 13.6px; font-weight: 500; line-height: 1.36; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.72em;
}
.card-price { display: flex; align-items: baseline; gap: 7px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.card-price strong { font-size: 15.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.card-price s { font-size: 12px; color: var(--muted); }
.card-sku { font-size: 11px; color: var(--muted); letter-spacing: .02em; }

.empty { text-align: center; padding: 70px 20px; color: var(--ink-3); }
.empty h3 { font-size: 19px; margin-bottom: 8px; }

.loading-card {
  max-width: 460px; margin: 90px auto; text-align: center;
  background: var(--bone); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 40px 30px; box-shadow: var(--shadow-sm);
}
.loading-card h2 { font-size: 17px; margin: 18px 0 8px; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto; border-radius: 50%;
  border: 3px solid var(--cream-2); border-top-color: var(--terra);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton { background: linear-gradient(90deg, #f1eae0 25%, #f8f3ec 50%, #f1eae0 75%); background-size: 300% 100%; animation: shimmer 1.3s infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* ---------- modal ---------- */
.modal-root { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 28px 18px; overflow-y: auto; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(23, 18, 14, .55); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-shell {
  position: relative; width: min(1120px, 100%); margin: auto;
  background: var(--bone); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop .26s cubic-bezier(.2, .8, .2, 1);
  z-index: 1;
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 5;
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .95);
  color: var(--ink-2); font-size: 20px; line-height: 1;
}
.modal-close:hover { background: var(--cream); }

.pd-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.gallery { background: #fcfaf7; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.gallery-main {
  aspect-ratio: 1 / .86; background: #fff; border: 1px solid var(--line-2);
  border-radius: var(--r-md); display: grid; place-items: center; overflow: hidden;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.gallery-thumbs button {
  flex: 0 0 62px; width: 62px; height: 62px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; padding: 4px; overflow: hidden;
}
.gallery-thumbs button.active { border-color: var(--terra); box-shadow: 0 0 0 2px rgba(184, 80, 29, .14); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }

.pd-info { padding: 30px 30px 26px; display: flex; flex-direction: column; gap: 12px; }
.pd-cat { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--terra); font-weight: 600; }
.pd-name { font-size: clamp(20px, 2.4vw, 27px); line-height: 1.2; padding-right: 30px; }
.pd-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.pd-stars { color: var(--gold); letter-spacing: 1px; font-size: 12.5px; }
.pd-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pd-price strong { font-size: 27px; font-weight: 600; color: var(--terra); font-variant-numeric: tabular-nums; }
.pd-price s { color: var(--muted); font-size: 14px; }
.pd-save { background: #fdecec; color: #b42318; border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; }
.pd-summary { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; font-size: 13.4px; color: var(--ink-2); }
.pd-summary li { position: relative; padding-left: 18px; line-height: 1.5; }
.pd-summary li::before {
  content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px;
  border-radius: 999px; background: var(--terra-2);
}
.pd-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.pd-actions .btn-primary { flex: 1 1 190px; justify-content: center; }
.btn-fav {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--bone);
  border-radius: 999px; padding: 11px 18px; font-weight: 600; font-size: 14px; color: var(--ink-2);
}
.btn-fav svg { width: 17px; height: 17px; }
.btn-fav.on { color: #d33a2c; border-color: #fbd7d2; background: #fff5f3; }
.btn-fav.on svg { fill: currentColor; }
.btn-share { border: 1px solid var(--line); background: var(--bone); border-radius: 999px; padding: 11px 16px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.btn-share svg { width: 16px; height: 16px; }

.pd-facts { display: flex; gap: 16px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line-2); font-size: 12.2px; color: var(--ink-3); }
.pd-facts b { color: var(--ink); font-weight: 600; }

.share-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.share-btn {
  border: 1px solid var(--line); background: var(--cream); border-radius: 10px;
  padding: 7px 11px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.share-btn:hover { background: #fff; border-color: #ddcfbc; }

.pd-lower { padding: 4px 30px 30px; display: flex; flex-direction: column; gap: 26px; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 26px; border-top: 1px solid var(--line-2); padding-top: 14px; }
.pd-features { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2, #4a4f49); font-size: 14px; line-height: 1.5; }
.pd-features li { list-style: disc; }
.pd-list { margin-left: 10px; font-size: 13px; color: #6b7168; text-decoration: line-through; }
.spec-item { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.8px; }
.spec-item span { color: var(--muted); }
.spec-item b { font-weight: 500; text-align: right; }

.slider-block { position: relative; }
.slider-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.slider-head h3 { font-size: 16px; }
.slider-head .hint { margin-top: 2px; }
.slider-ctl { display: flex; gap: 6px; }
.slider-ctl button {
  width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bone); display: grid; place-items: center; color: var(--ink-2);
}
.slider-ctl button:hover { background: var(--cream); }
.slider-ctl svg { width: 15px; height: 15px; }
.slider-track {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2px 2px 8px; scrollbar-width: thin;
}
.slider-track::-webkit-scrollbar { height: 6px; }
.slider-track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.mini-card {
  flex: 0 0 168px; width: 168px; scroll-snap-align: start;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bone); overflow: hidden; cursor: pointer;
  transition: transform .18s, box-shadow .2s;
}
.mini-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.mini-card img { width: 100%; aspect-ratio: 1 / .82; object-fit: contain; background: #fcfaf7; padding: 8px; }
.mini-body { padding: 8px 10px 10px; }
.mini-name {
  font-size: 12px; line-height: 1.34; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.68em;
}
.mini-price { font-size: 12.5px; font-weight: 600; color: var(--terra); margin-top: 4px; font-variant-numeric: tabular-nums; }
.mini-why { font-size: 10.5px; color: var(--muted); margin-top: 1px; }

/* ---------- cart ---------- */
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(390px, 92vw);
  background: var(--bone); z-index: 130; display: flex; flex-direction: column;
  box-shadow: -20px 0 60px -30px rgba(23, 18, 14, .6);
  animation: slidein .24s ease;
}
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-scrim { position: fixed; inset: 0; background: rgba(23, 18, 14, .4); z-index: 120; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.cart-head h2 { font-size: 17px; }
.cart-head .icon-btn { border-color: var(--line); background: var(--cream); color: var(--ink-2); font-size: 18px; }
.cart-body { flex: 1 1 auto; overflow-y: auto; padding: 14px 20px; display: flex; flex-direction: column; gap: 12px; }
.cart-item { display: flex; gap: 11px; align-items: flex-start; }
.cart-item img { width: 62px; height: 62px; object-fit: contain; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; }
.cart-item-body { flex: 1 1 auto; min-width: 0; }
.cart-item-name { font-size: 12.8px; line-height: 1.35; font-weight: 500; }
.cart-item-price { font-size: 12.8px; color: var(--terra); font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 22px; height: 22px; border-radius: 7px; border: 1px solid var(--line); background: var(--cream); line-height: 1; font-size: 13px; }
.qty span { font-size: 12.5px; min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.cart-remove { border: 0; background: none; color: var(--muted); font-size: 11.5px; text-decoration: underline; margin-left: auto; }
.cart-foot { border-top: 1px solid var(--line-2); padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; }
.cart-total span { color: var(--muted); font-size: 13px; }
.cart-total strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 13.5px; }

/* ---------- clip progress / toast ---------- */
.clip-progress { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 140; width: min(520px, 92vw); }
.clip-inner { background: var(--ink); color: #f7efe2; border-radius: var(--r-md); padding: 13px 16px; box-shadow: var(--shadow-lg); }
.clip-text { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; margin-bottom: 8px; }
.clip-text span { color: #bda993; font-variant-numeric: tabular-nums; }
.clip-bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.clip-bar i { display: block; height: 100%; width: 0;   background: linear-gradient(90deg, #e6a06a, var(--terra-2)); transition: width .25s; }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(8px);
  z-index: 150; background: var(--ink); color: #fff; padding: 11px 18px;
  border-radius: 999px; font-size: 13px; box-shadow: var(--shadow-md);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.fatal {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 200;
  background: #7a1d12; color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 12.5px; box-shadow: var(--shadow-lg);
}

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 22px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.foot-sep { opacity: .5; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .hero-side { flex-direction: row; }
  .hero-side > * { flex: 1 1 0; }
  .panel-grid { grid-template-columns: 1fr; }
  .panel-grid.three { grid-template-columns: 1fr; }
  .pd-top { grid-template-columns: 1fr; }
  .gallery { padding: 16px; }
}

@media (max-width: 860px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 14px; }
  .brand-text small { display: none; }
  .search { order: 3; grid-column: 1 / -1; }
  .clock { display: none; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main { padding: 18px 14px 50px; }
  .pd-info { padding: 22px 18px; }
  .pd-lower { padding: 4px 18px 24px; }
}

@media (max-width: 560px) {
  .hero h1 { font-size: 27px; }
  .hero-side { flex-direction: column; }
  .live-clock strong { font-size: 28px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 11px; }
  .card-name { font-size: 12.4px; }
  .card-price strong { font-size: 13.5px; }
  .panel { padding: 15px 15px 17px; }
  .modal-root { padding: 10px 8px; }
  .modal-shell { border-radius: 18px; }
  .kpi .kpi-value { font-size: 23px; }
  .mini-card { flex-basis: 148px; width: 148px; }
  .site-footer { font-size: 11px; }
}

/* ---------- search suggestions (dropdown realtime) ---------- */
.search { position: relative; }

.suggest {
  position: absolute; top: calc(100% + 12px); left: 0; right: 0; z-index: 70;
  background: var(--bone); color: var(--ink);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 26px 60px -28px rgba(23, 18, 14, .55), 0 2px 6px rgba(23, 18, 14, .06);
  padding: 7px; overflow: hidden; max-height: min(70vh, 520px); overflow-y: auto;
  animation: suggest-in .14s ease;
}
@keyframes suggest-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.suggest-head {
  padding: 7px 12px 5px; font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.suggest-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  text-align: left; border: 0; background: none; border-radius: 12px;
  padding: 8px 10px; transition: background .12s;
}
.suggest-item:hover,
.suggest-item.is-active { background: var(--cream-2); }
.suggest-thumb {
  flex: 0 0 46px; width: 46px; height: 46px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line-2); object-fit: contain; padding: 3px;
}
.suggest-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.suggest-name {
  font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.suggest-meta { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-price { font-size: 12.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.suggest-all {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; border: 0; background: var(--cream); color: var(--ink-2);
  padding: 10px 12px; border-radius: 12px; margin-top: 5px;
  font-size: 12.5px; font-weight: 600;
}
.suggest-all:hover { background: var(--cream-2); }
.suggest-empty { padding: 16px 12px; font-size: 12.5px; color: var(--muted); }

/* ---------- image pipeline status pill ---------- */
.img-status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10.5px; letter-spacing: .02em; color: #cfbba6;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px;
  padding: 5px 10px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.img-status b { font-weight: 500; }
.img-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--terra-2); animation: blink 1.3s infinite; }
.img-status.done { color: #8ad6ae; border-color: rgba(138, 214, 174, .3); }
.img-status.done i { background: #2f9e6b; animation: none; }
.img-status.error { color: #f0a99a; border-color: rgba(240, 169, 154, .3); }
.img-status.error i { background: #d2543c; animation: none; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

/* ---------- search results modal ---------- */
.results-root { z-index: 1010; }        /* trên cả feed video toàn màn (.vfeed z-index 900) */
.results-shell { width: min(1180px, 100%); padding: 28px 30px 34px; overflow: visible; }
.results-head { display: flex; flex-direction: column; gap: 5px; padding-right: 46px; margin-bottom: 16px; }
.results-head h2 { font-size: clamp(20px, 2.4vw, 27px); }
.results-tools {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 18px;
}
.results-grid { grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 14px; }
.results-grid .card-name { font-size: 12.8px; }
.grid-more {
  grid-column: 1 / -1; margin: 4px auto 2px; padding: 11px 24px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bone);
  color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: background .15s, border-color .15s;
}
.grid-more:hover { background: var(--cream-2); border-color: #ddd0bf; }

.pd-detail { max-height: 420px; overflow-y: auto; padding-right: 6px; overscroll-behavior: contain; }
.pd-detail p { font-size: 13.5px; line-height: 1.68; color: var(--ink-2); margin: 0 0 9px; }
.pd-detail p:last-child { margin-bottom: 0; }

.rank-empty { list-style: none; padding: 16px 4px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 860px) {
  .img-status { display: none; }
  .suggest { position: fixed; left: 12px; right: 12px; top: 122px; max-height: 62vh; }
  .results-shell { padding: 20px 16px 26px; }
  .results-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; }
}

/* ---------------------------------------------------------------- báo giá */
body.q-open { overflow: hidden; }
.qmodal { position: fixed; inset: 0; z-index: 145; display: grid; place-items: center; }
.qbackdrop { position: absolute; inset: 0; background: rgba(35, 22, 14, .55); backdrop-filter: blur(3px); }
.qshell {
  position: relative; width: min(1320px, 96vw); max-height: 92vh; display: flex;
  flex-direction: column; background: var(--cream, #fbf6ef); border-radius: 18px;
  box-shadow: 0 30px 80px rgba(35, 22, 14, .38); overflow: hidden;
  animation: qpop .22s ease-out;
}
@keyframes qpop { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.qhead {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 18px;
  padding: 20px 24px 18px; background: linear-gradient(135deg, #2b1e16, #4a2e1d); color: #fbf6ef;
}
.qkicker { margin: 0 0 5px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: #e8b98e; }
.qhead h2 { margin: 0 0 6px; font-size: 23px; line-height: 1.2; }
.qhint { margin: 0; max-width: 64ch; font-size: 12.5px; line-height: 1.55; color: #e3d2c1; }
.qhead-actions { display: flex; gap: 8px; flex: none; }
.qbtn {
  padding: 9px 16px; border-radius: 999px; border: 1px solid rgba(251, 246, 239, .45);
  background: transparent; color: #fbf6ef; font: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.qbtn:hover { background: rgba(251, 246, 239, .14); }
.qbtn-primary { background: #b8501d; border-color: #b8501d; color: #fff; }
.qbtn-primary:hover { background: #a34515; border-color: #a34515; }
.qbody { overflow-y: auto; padding: 18px 24px 26px; }
.qform-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; }
.qform-field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted, #8a7868); }
.qform-field > span { font-weight: 600; letter-spacing: .02em; }
.qform-field-wide { grid-column: 1 / -1; }
.qform-field input, .qform-field textarea {
  border: 1px solid #dcc9b4; border-radius: 9px; padding: 8px 11px; background: #fff;
  font: inherit; font-size: 13px; color: #2b1e16; outline: none;
}
.qform-field input:focus, .qform-field textarea:focus { border-color: #b8501d; box-shadow: 0 0 0 3px rgba(184, 80, 29, .12); }
.qtable-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid #e4d5c4; border-radius: 12px; background: #fff; }
.qtable { border-collapse: collapse; width: 100%; min-width: 1180px; font-size: 12px; }
.qtable caption { caption-side: top; text-align: left; padding: 10px 14px; background: #f7ede2; color: #4a2e1d; font-weight: 700; font-size: 12.5px; }
.qtable th {
  background: #4a2e1d; color: #fbf6ef; padding: 9px 8px; text-align: left; vertical-align: middle;
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.qtable td { border-top: 1px solid #efe3d5; padding: 8px; vertical-align: top; color: #2b1e16; }
.qtable tbody tr:nth-child(even) td { background: #fffdfa; }
.q-center, .qtable th.q-center { text-align: center; }
.q-idx { width: 34px; text-align: center; color: var(--muted, #8a7868); }
.q-name { display: flex; gap: 8px; min-width: 220px; font-weight: 600; line-height: 1.4; }
.q-thumb { width: 42px; height: 42px; flex: none; object-fit: contain; border-radius: 6px; background: #f4ece2; }
.q-sku, .q-brand { white-space: nowrap; font-size: 11.5px; color: var(--muted, #8a7868); }
.q-spec, .q-feat { max-width: 250px; color: #6b5847; line-height: 1.45; font-size: 11.5px; }
.q-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.q-amount { font-weight: 700; color: #9a4b25; }
.q-qty input, .q-unit input, .q-note input {
  border: 1px solid #e1d0bc; border-radius: 6px; padding: 5px 6px; font: inherit; font-size: 12px;
  background: #fffdf9; color: #2b1e16; outline: none;
}
.q-qty input { width: 54px; text-align: center; }
.q-unit input { width: 58px; text-align: center; }
.q-note input { width: 100%; min-width: 110px; }
.q-qty input:focus, .q-unit input:focus, .q-note input:focus { border-color: #b8501d; }
.q-loading { padding: 28px; text-align: center; color: var(--muted, #8a7868); }
.qtotals { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.qtotal-row { display: flex; justify-content: space-between; gap: 28px; min-width: 340px; font-size: 13px; color: #4a2e1d; }
.qtotal-row span { color: var(--muted, #8a7868); }
.qtotal-final { border-top: 2px solid #e4c9ae; margin-top: 4px; padding-top: 8px; font-size: 18px; }
.qtotal-final span { color: #4a2e1d; font-weight: 700; }
.qtotal-final strong { color: #9a4b25; }
.qtotal-word { font-size: 12px; font-style: italic; color: #6b5847; text-align: right; }

/* Prompt chiết khấu — khoá mật khẩu, một dòng gọn, mở ra thì thành ô nhập */
.qprompt {
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px dashed #d9bfa6;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf4, #fdf3e8);
  transition: border-color 160ms ease, background 160ms ease;
}
.qprompt.is-open { border-style: solid; border-color: #c08a52; background: #fffaf3; }
/* trạng thái đóng: chỉ một dải gọn, không có ô nhập nào — ô prompt chỉ hiện sau mật khẩu */
.qprompt-closed { padding: 8px 14px; background: #fbf4ec; border-style: dashed; }
.qprompt-closed .qprompt-top { min-height: 30px; }
.qprompt-link {
  margin-left: 10px; border: 0; background: none; padding: 0 2px;
  color: #9a6a3f; font: inherit; font-size: 10.5px; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: underline; cursor: pointer;
}
.qprompt-link:hover { color: #7a3f14; }
.qbtn-ghost {
  margin-left: auto; background: #fff; border: 1px solid #e2cdb5; color: #8a4b12;
  font-weight: 600; padding: 6px 12px; border-radius: 8px; cursor: pointer;
}
.qbtn-ghost:hover { background: #fff4e6; border-color: #c08a52; }
.qprompt-top { display: flex; align-items: center; gap: 8px; }
.qprompt-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #8a4b12; }
.qprompt-lock { margin-left: auto; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #a8886c; }
.qprompt.is-open .qprompt-lock { color: #2f7d4f; }
.qprompt-actions { display: flex; gap: 8px; margin-top: 8px; }
.qprompt textarea, .qprompt input[type="password"] {
  width: 100%;
  margin-top: 8px;
  padding: 9px 11px;
  border: 1px solid #e2cdb5;
  border-radius: 9px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  color: #2b2018;
  resize: vertical;
}
.qprompt input[type="password"] { margin-top: 0; flex: 1 1 auto; }
.qprompt-msg { margin: 6px 0 0; font-size: 11.5px; color: #8a4b12; min-height: 0; }
.qprompt-msg:empty { display: none; }
.qrules { margin: 10px 0 0; font-size: 11px; line-height: 1.55; color: #8a4b12; text-align: right; }
.q-pct {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 4px;
  background: #fde8cf;
  color: #8a4b12;
  font-size: 9.5px;
  font-style: normal;
  vertical-align: 1px;
}
.qnote { margin: 16px 0 0; font-size: 11.5px; line-height: 1.6; color: var(--muted, #8a7868); }
@media (max-width: 820px) {
  .qshell { width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .qhead { flex-direction: column; }
  .qform-grid { grid-template-columns: 1fr 1fr; }
  .qbody { padding: 14px 14px 22px; }
  .qtotals { align-items: stretch; }
}

/* In / lưu PDF thẳng từ modal báo giá — ảnh sản phẩm nằm trong bảng nên bản in
   luôn có ảnh, không phụ thuộc vào trình đọc Excel của máy khách. */
@media print {
  @page { size: A4 portrait; margin: 6mm; }
  html, body { background: #fff !important; }
  body.q-open .site-header,
  body.q-open .site-main,
  body.q-open .site-footer,
  body.q-open .site-top,
  body.q-open .qbackdrop,
  body.q-open .qhead-actions,
  body.q-open .qform,
  body.q-open .qnote { display: none !important; }
  .qmodal { position: static !important; display: block !important; inset: auto !important; }
  .qshell {
    width: 100% !important; max-width: none !important; max-height: none !important;
    border-radius: 0 !important; box-shadow: none !important; overflow: visible !important;
    animation: none !important; background: #fff !important;
  }
  .qhead { background: #fff !important; color: #2b1e16 !important; padding: 0 0 6px !important; }
  .qhead h2 { font-size: 17px; }
  .qhint, .qkicker { display: none; }
  .qbody { overflow: visible !important; max-height: none !important; padding: 0 !important; }
  .qtable-wrap { overflow: visible !important; border: 0 !important; max-height: none !important; }
  .qtable { min-width: 0 !important; width: 100% !important; font-size: 7.2px !important; table-layout: fixed !important; }
  .qtable th, .qtable td { padding: 2px 3px !important; word-break: break-word !important; }
  .qtable img { width: 34px !important; height: 34px !important; object-fit: contain; }
  .q-qty input, .q-unit input, .q-note input { border: 0 !important; background: transparent !important; }
  .qtotals { align-items: flex-end !important; }
  .qtotal-row { min-width: 280px; font-size: 11px; }
  .qtotal-final { font-size: 14px; }
  .qtable tbody tr { break-inside: avoid; }
}

/* ---- prompt giỏ hàng: mô tả / ảnh → mã sản phẩm ---- */
.cart-prompt { padding: 12px 16px 14px; border-bottom: 1px solid rgba(0,0,0,.08); background: rgba(15,81,50,.04); }
.cart-prompt-title { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: #0f5132; margin-bottom: 8px; }
.cart-prompt textarea { width: 100%; box-sizing: border-box; border: 1px solid rgba(0,0,0,.16); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 13px; line-height: 1.45; resize: vertical; min-height: 56px; background: #fff; }
.cart-prompt textarea:focus { outline: 2px solid rgba(15,81,50,.35); outline-offset: 1px; }
.cart-prompt-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-file { display: inline-flex; align-items: center; gap: 6px; border: 1px dashed rgba(15,81,50,.45); border-radius: 10px;
  padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: #0f5132; cursor: pointer; background: #fff; }
.cart-file input { display: none; }
.cart-file:hover { background: rgba(15,81,50,.06); }
.cart-filename { flex: 1; min-width: 0; font-size: 12px; color: #5a6b62; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-prompt-row .btn { padding: 7px 14px; font-size: 13px; }
.cart-prompt-out:empty { display: none; }
.cart-prompt-out { margin-top: 10px; max-height: 260px; overflow-y: auto; }
.cart-hint-line { font-size: 12.5px; color: #46564d; line-height: 1.5; }
.cart-seen { color: #7b8a81; font-size: 11.5px; }
.cart-hit { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed rgba(0,0,0,.08); cursor: pointer; }
.cart-hit input { flex: 0 0 auto; }
.cart-hit img { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid rgba(0,0,0,.06); }
.cart-hit-body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.cart-hit-body b { font-size: 12.5px; font-weight: 600; color: #16241c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-hit-body em { font-size: 11.5px; color: #6b7d73; font-style: normal; }
.cart-hit-body i { font-size: 12px; font-weight: 700; color: #0f5132; font-style: normal; }
#cart-hits-add { margin-top: 10px; }
@media (max-width: 560px) {
  .cart-prompt { padding: 10px 12px 12px; }
  .cart-prompt-row { flex-wrap: wrap; }
}

/* ---------- thương hiệu + hiển thị đầy đủ trên điện thoại ---------- */
.kpi .kpi-value { color: var(--ink); }
.panel.dash-brands .bar-fill { background: linear-gradient(90deg, #b7c8d4, #3f6a86); }
.panel.dash-brands .bar-row { cursor: default; }

@media (max-width: 640px) {
  .bar-row .bar-top { align-items: flex-start; gap: 6px; font-size: 13px; }
  .bar-row .bar-name {
    white-space: normal; overflow: visible; text-overflow: clip;
    line-height: 1.35; word-break: break-word;
  }
  .bar-row .bar-val { font-size: 12.5px; padding-top: 1px; }
  .bars { gap: 12px; }
  .panel.dash-cats, .panel.dash-brands { padding: 14px 14px 16px; }
}

/* ---------- khu sửa / xoá trong modal thêm sản phẩm ---------- */
.amanage {
  border: 1px dashed var(--line); border-radius: 14px;
  background: var(--bone); padding: 12px 14px 14px; margin: 4px 0 18px;
}
.amanage > label:first-child { margin-top: 0; }
.abtn.danger { border-color: #e3b4ac; color: #b3382b; background: #fff7f5; }
.abtn.danger:hover { background: #ffece8; }
.aresult .abtn { flex: 0 0 auto; }


/* ---------------------------- thẻ video trong lưới kết quả
   Video phải đọc ra ngay từ ảnh: nền tối, ảnh phủ kín khung, nút phát cam ở
   giữa và nhãn VIDEO — trước đây video trông y hệt ảnh sản phẩm. */
.product-card.video-card {
  border-color: #e6d3bd;
  box-shadow: 0 1px 0 rgba(35, 25, 16, .04);
}
.product-card.video-card .card-media {
  background: #0c1218;
  padding: 0;
}
.product-card.video-card .card-media img {
  object-fit: cover;
  width: 100%;
  height: 100%;
}
.product-card.video-card .card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 17, 0) 40%, rgba(8, 12, 17, .5) 100%);
  pointer-events: none;
}
.product-card.video-card .card-media .vplay {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  width: 54px;
  height: 54px;
  margin: 0;
  background: rgba(192, 92, 40, .95);
  box-shadow: 0 10px 24px rgba(8, 12, 17, .35), 0 0 0 3px rgba(255, 255, 255, .22);
  backdrop-filter: none;
  opacity: 1;
  transition: transform .25s ease, background .25s ease;
}
.product-card.video-card:hover .card-media .vplay {
  transform: translate(-50%, -50%) scale(1.07);
  background: #c05c28;
}
.product-card.video-card .card-media .vplay svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 2px;
}
.product-card.video-card .badge-video {
  background: #c05c28 !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .07em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 6px;
}
.product-card.video-card .badge-video svg {
  width: 9px;
  height: 9px;
  fill: #fff;
}
.product-card.video-card .card-cat { color: #a8703f; }
