@font-face {
  font-family: "Instrument Serif";
  src: url("/static/assets/instrument-serif.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #f6f4ee;
  --bg-deep: #ede9df;
  --surface: #ffffff;
  --surface-soft: #faf9f5;
  --media-bg: #f3f2ee;
  --ink: #161614;
  --ink-soft: #3f3d37;
  --muted: #767166;
  --border: rgba(22, 22, 20, 0.085);
  --border-strong: rgba(22, 22, 20, 0.16);
  --rule: #d5cfc1;
  --violet: #9e78ff;
  --violet-soft: rgba(158, 120, 255, 0.13);
  --gold: #d9b04c;
  --ok: #157a48;
  --ok-bg: #e9f7ef;
  --issue: #b45309;
  --issue-bg: #fef3e2;
  --err: #b91c1c;
  --err-bg: #fdecec;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(22, 22, 20, 0.04);
  --shadow-md: 0 10px 30px rgba(22, 22, 20, 0.07);
  --shadow-lg: 0 24px 70px rgba(15, 15, 13, 0.22);
  --serif: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ============ LOGIN GATE ============ */
.login-shell {
  min-height: 100vh;
  background: #171915;
  color: #f6f3ea;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 4vw, 44px);
  position: relative;
  overflow: hidden;
}

.login-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(158, 120, 255, 0.16), transparent 44%),
    radial-gradient(circle at 18% 82%, rgba(228, 190, 88, 0.12), transparent 46%);
  pointer-events: none;
}

.login-top, .login-card, .login-foot {
  position: relative;
  z-index: 1;
}

.login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.wordmark {
  height: 24px;
  width: auto;
}

.wordmark-dark {
  filter: brightness(0.11);
}

.login-card {
  width: 100%;
  max-width: 460px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 42px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.eyebrow {
  margin: 0 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.login-card .eyebrow {
  color: rgba(246, 243, 234, 0.72);
}

.eyebrow-line {
  width: 24px;
  height: 2px;
  background: var(--gold);
  display: inline-block;
}

.login-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 60px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.login-title em, .section-title em {
  font-style: italic;
}

.login-sub {
  margin: 0 0 26px;
  color: rgba(246, 243, 234, 0.72);
  font-size: 14px;
  line-height: 1.55;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  color: rgba(246, 243, 234, 0.85);
}

.password-wrap {
  position: relative;
  margin-bottom: 14px;
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.login-input:focus {
  border-color: var(--violet);
  background: rgba(255, 255, 255, 0.09);
}

.icon-ghost {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: rgba(246, 243, 234, 0.7);
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.icon-ghost:hover {
  color: #fff;
}

.login-error {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-size: 13px;
}

.login-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  color: rgba(246, 243, 234, 0.56);
}

/* ============ BUTTONS & SWITCHES ============ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 15px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}

.login-card .btn-primary {
  background: #f6f3ea;
  border-color: #f6f3ea;
  color: #161614;
  height: 48px;
}

.login-card .btn-primary:hover {
  background: #ffffff;
}

.btn-primary:hover {
  background: #2b2a26;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(22, 22, 20, 0.16);
}

.btn-full {
  width: 100%;
}

.btn-subtle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 15px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-subtle:hover {
  background: var(--surface-soft);
  border-color: rgba(22, 22, 20, 0.3);
}

.btn-sm {
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 12.5px;
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
}

.lang-switch-dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.lang-switch-dark .lang-btn {
  color: rgba(246, 243, 234, 0.7);
}

.lang-btn.active {
  background: var(--ink);
  color: #ffffff;
}

.lang-switch-dark .lang-btn.active {
  background: #f6f3ea;
  color: #161614;
}

/* ============ TOPBAR ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 244, 238, 0.86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1460px;
  margin: 0 auto;
  padding: 12px clamp(16px, 3vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 0 3px var(--violet-soft);
}

.nav-pills {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  gap: 3px;
}

.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: background 0.15s, color 0.15s;
}

.nav-pill:hover {
  color: var(--ink);
}

.nav-pill.active {
  background: var(--ink);
  color: #ffffff;
}

.pill-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.nav-pill.active .pill-count {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ============ MAIN & KPI STRIP ============ */
.main-wrap {
  max-width: 1460px;
  margin: 0 auto;
  padding: 22px clamp(16px, 3vw, 36px) 64px;
}

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card-accent {
  background: linear-gradient(135deg, #1a1a17 0%, #262520 100%);
  color: #faf7ef;
  border-color: transparent;
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.kpi-card-accent .kpi-label,
.kpi-card-accent .kpi-sub {
  color: rgba(250, 247, 239, 0.7);
}

.kpi-value {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 12px;
  color: var(--muted);
}

.panel-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.section-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.2vw, 54px);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.results-meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* ============ FILTER PANEL (FIGMA PILL STYLE) ============ */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1 1 260px;
  min-width: 200px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 40px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.search-input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

.price-range-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mini-input {
  width: 82px;
  height: 40px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 13px;
  outline: none;
}

.mini-input:focus {
  border-color: var(--ink);
  background: var(--surface);
}

.range-dash {
  color: var(--muted);
}

.select-pill {
  height: 40px;
  padding: 0 32px 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.toggle-pill {
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.15s;
}

.toggle-pill[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.filter-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.strip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
}

.strip-sep {
  width: 1px;
  height: 20px;
  background: var(--rule);
  flex-shrink: 0;
}

.pill-scroll {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.14s;
}

.pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
  font-weight: 600;
}

.pill .pill-num {
  font-size: 11px;
  opacity: 0.65;
}

/* ============ PRODUCT GRID & CARDS ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 10px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  overflow: hidden;
  background: var(--media-bg);
  cursor: pointer;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  transition: transform 0.35s ease;
}

.product-card:hover .card-media img {
  transform: scale(1.03);
}

.media-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
}

.media-badges-tl {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.badge-glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  color: var(--ink);
  border: 1px solid rgba(22, 22, 20, 0.08);
}

.badge-sale {
  background: var(--ink);
  color: #ffffff;
}

.badge-oos {
  background: rgba(253, 236, 236, 0.94);
  color: var(--err);
}

.badge-r2 {
  position: absolute;
  bottom: 9px;
  right: 9px;
  background: rgba(22, 22, 20, 0.72);
  backdrop-filter: blur(6px);
  color: #f6f4ee;
  font-size: 10.5px;
  padding: 3px 8px;
}

.badge-qa-corner {
  position: absolute;
  top: 10px;
  right: 10px;
}

.badge-qa-ok {
  background: var(--ok);
  color: #ffffff;
}

.badge-qa-issue {
  background: var(--issue);
  color: #ffffff;
}

.card-body {
  padding: 12px 6px 2px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-available { background: var(--ok); }
.dot-out_of_stock { background: #d97706; }
.dot-page_unavailable, .dot-parsing_error { background: var(--err); }

.card-name {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.32;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.card-name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card-price-row {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 2px;
}

.card-price {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}

.card-compare {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: line-through;
}

.card-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(22, 22, 20, 0.06);
}

.card-cat-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-sizes-text {
  white-space: nowrap;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ============ QA WORKBENCH ============ */
.qa-hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(20px, 3vw, 28px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
}

.qa-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.qa-desc {
  margin: 10px 0 0;
  max-width: 62ch;
  color: var(--ink-soft);
  font-size: 14px;
}

.qa-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 280px;
}

.seed-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 5px;
}

.seed-row {
  display: flex;
  gap: 6px;
}

.seed-input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.qa-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.qa-progress-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.qa-progress-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 8px;
}

.qa-stat-ok { color: var(--ok); }
.qa-stat-issue { color: var(--issue); }
.qa-stat-pending { color: var(--muted); }

.qa-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  overflow: hidden;
  display: flex;
}

.qa-bar-ok {
  background: var(--ok);
  transition: width 0.25s ease;
}

.qa-bar-issue {
  background: var(--issue);
  transition: width 0.25s ease;
}

.qa-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.qa-site-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.qa-site-banner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1.5px solid var(--ink);
  flex-wrap: wrap;
}

.qa-site-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
}

.qa-site-meta {
  font-size: 12.5px;
  color: var(--muted);
}

.qa-cat-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qa-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.qa-cat-num {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  font-size: 11px;
  color: var(--ink-soft);
}

.qa-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.qa-interval-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 9px;
  padding: 4px 8px;
  margin-top: 4px;
}

.qa-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}

.qa-btn {
  height: 31px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s;
}

.qa-btn-ok:hover, .qa-btn-ok.active {
  background: var(--ok);
  border-color: var(--ok);
  color: #ffffff;
}

.qa-btn-issue:hover, .qa-btn-issue.active {
  background: var(--issue);
  border-color: var(--issue);
  color: #ffffff;
}

.qa-note-preview {
  margin-top: 6px;
  padding: 6px 8px;
  border-radius: 9px;
  background: var(--issue-bg);
  color: #7c2d12;
  font-size: 11.5px;
  line-height: 1.35;
}

/* ============ COVERAGE GRID ============ */
.cov-note {
  margin: 0;
  max-width: 48ch;
  color: var(--muted);
  font-size: 13.5px;
}

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}

.cov-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cov-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.cov-site-name {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.cov-market {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
}

.cov-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-deep);
  overflow: hidden;
  display: flex;
}

.cov-bar-avail { background: var(--ok); }
.cov-bar-oos { background: #e5a93c; }
.cov-bar-other { background: #dc2626; }

.cov-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cov-m-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.cov-m-val {
  font-size: 15px;
  font-weight: 700;
}

.cov-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* ============ PAGINATION ============ */
.pagination-bar {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(18, 18, 16, 0.56);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.5vw, 28px);
}

.modal-dialog {
  width: 100%;
  max-width: 1120px;
  max-height: 92vh;
  background: var(--surface);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.modal-nav-group, .modal-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-pos-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  min-width: 56px;
  text-align: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 15px;
}

.icon-btn:hover:not(:disabled) {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.modal-body {
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(320px, 1fr);
  overflow-y: auto;
  flex: 1;
}

.modal-gallery {
  padding: 22px;
  background: var(--surface-soft);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-main {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  background: var(--media-bg);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }

.gallery-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.gallery-meta a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.thumb-btn {
  width: 62px;
  height: 76px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--media-bg);
}

.thumb-btn.active {
  border-color: var(--ink);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.status-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}

.chip-available { background: var(--ok-bg); color: var(--ok); }
.chip-out_of_stock { background: var(--issue-bg); color: var(--issue); }
.chip-page_unavailable, .chip-parsing_error { background: var(--err-bg); color: var(--err); }

.detail-brand {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.detail-title {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.06;
}

.detail-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-price {
  font-size: 26px;
  font-weight: 700;
}

.detail-compare {
  font-size: 17px;
  color: var(--muted);
  text-decoration: line-through;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12.5px;
}

.meta-k {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.meta-v {
  font-weight: 500;
  word-break: break-word;
}

.detail-section-title {
  margin: 0 0 8px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.size-pill {
  padding: 6px 12px;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
}

.size-pill.oos {
  opacity: 0.45;
  text-decoration: line-through;
  background: var(--bg-deep);
}

.size-pill.selected {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.variant-selected-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.detail-desc {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-line;
}

.attr-details summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  padding: 6px 0;
}

.attr-list {
  margin: 8px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.attr-item {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 12px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 11px;
  border-radius: 11px;
  background: var(--surface-soft);
  font-size: 12.5px;
}

.modal-qa-box {
  padding: 14px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-note-input {
  width: 100%;
  min-height: 62px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 13px;
  resize: vertical;
}

.modal-qa-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============ EMPTY & SKELETON & TOAST ============ */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: 24px;
  color: var(--muted);
}

.skeleton-card {
  height: 390px;
  border-radius: 22px;
  background: linear-gradient(90deg, #ece8de 25%, #f6f4ee 50%, #ece8de 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--ink);
  color: #ffffff;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
  .qa-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
  .modal-gallery {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .qa-grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .qa-grid-5 {
    grid-template-columns: 1fr;
  }
  .nav-pills {
    width: 100%;
    justify-content: space-between;
  }
  .nav-pill {
    flex: 1;
    justify-content: center;
    padding: 8px 10px;
    font-size: 12px;
  }
}
