/* ===== Tebex — FiveM Script Store ===== */
/* Stealth luxury: near-black, warm amber accent, editorial type */

:root {
  /* Base — near-black with a hint of warm tone */
  --bg: #0a0a0b;
  --bg-raised: #111113;
  --bg-elev: #17171a;
  --bg-hover: #1d1d21;
  --line: #26262b;
  --line-strong: #34343a;

  /* Foregrounds */
  --fg: #f4f2ee;
  --fg-dim: #a8a59e;
  --fg-mute: #6d6a63;
  --fg-ghost: #3e3d3a;

  /* Accent — warm amber (oklch) */
  --accent: oklch(0.82 0.14 82);   /* #f2c47a-ish */
  --accent-strong: oklch(0.88 0.16 82);
  --accent-soft: oklch(0.82 0.14 82 / 0.14);
  --accent-line: oklch(0.82 0.14 82 / 0.32);

  /* Semantic */
  --ok: oklch(0.78 0.14 150);
  --warn: oklch(0.78 0.14 60);
  --danger: oklch(0.68 0.18 25);

  /* Type */
  --font-serif: 'Instrument Serif', 'Cormorant Garamond', ui-serif, Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Geist Mono', 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing / radius */
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;
  --r-xl: 20px;

  --container: 1280px;
  --gutter: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--fg); font-family: var(--font-sans); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
input, textarea, select { font-family: inherit; }

/* ===== Type ===== */
.display { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; line-height: 1.02; }
.mono { font-family: var(--font-mono); letter-spacing: 0.02em; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fg-mute); }
.label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim); }

/* ===== Layout ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,11,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 40px; height: 64px; }
.logo { display: inline-flex; align-items: center; font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em; }
.logo-word-img { height: 22px; width: auto; display: block; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link { padding: 8px 14px; font-size: 13.5px; color: var(--fg-dim); border-radius: var(--r); transition: color .15s, background .15s; }
.nav-link:hover { color: var(--fg); background: var(--bg-elev); }
.nav-link.active { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 8px; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r); font-size: 13.5px; font-weight: 500; transition: all .15s; white-space: nowrap; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--bg); }
.btn-accent { background: var(--accent); color: #14110a; font-weight: 600; }
.btn-accent:hover { background: var(--accent-strong); }
.btn-ghost { color: var(--fg-dim); border: 1px solid var(--line); background: transparent; }
.btn-ghost:hover { color: var(--fg); border-color: var(--line-strong); background: var(--bg-elev); }
.btn-icon { width: 38px; padding: 0; justify-content: center; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 14.5px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* ===== Cards / product tiles ===== */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--line-strong); }

.product-card {
  position: relative;
  cursor: pointer;
  /* The card is now an <a>; reset its default link styling so the rest of
     .card / .product-* rules continue to drive the look. */
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  /* Skip rendering off-screen cards entirely. With ~96 product cards in the
     shop grid + ~7 bundle items + multiple bundle cards on the home page,
     paint cost on scroll was the dominant frame-time cost. content-visibility
     lets the browser skip layout/paint for cards that aren't near the
     viewport; the size hint avoids layout shift while they snap in. */
  content-visibility: auto;
  contain-intrinsic-size: 360px 380px;
}
.product-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.product-card:hover .product-thumb > * { transform: scale(1.03); }
.product-card:hover { border-color: var(--accent-line); }
.product-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
  background: #0e0e10;
  border-bottom: 1px solid var(--line);
}
.product-thumb > * { transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.product-info { padding: 16px; }
.product-meta { display: flex; gap: 8px; margin-bottom: 8px; }
.product-title { font-size: 15.5px; font-weight: 500; margin-bottom: 4px; letter-spacing: -0.01em; }
.product-desc { font-size: 13px; color: var(--fg-dim); line-height: 1.5; margin-bottom: 14px; min-height: 39px; }
.product-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-family: var(--font-mono); font-size: 15px; color: var(--fg); }
.price-was { font-family: var(--font-mono); font-size: 12px; color: var(--fg-mute); text-decoration: line-through; margin-right: 6px; }

/* ===== Chips / tags ===== */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-dim);
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 4px;
}
.chip-accent { color: oklch(0.82 0.14 82); background: var(--accent-soft); border-color: var(--accent-line); }
.chip-new { color: #14110a; background: var(--accent); border-color: var(--accent); font-weight: 600; }
.chip-sale { color: var(--fg); background: var(--danger); border-color: var(--danger); font-weight: 600; }
.chip-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ===== Stars ===== */
.stars { display: inline-flex; gap: 1px; color: var(--accent); }
.stars svg { width: 13px; height: 13px; }
.star-empty { color: var(--fg-ghost); }

/* ===== Section rhythm ===== */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
.section-tight { padding: 48px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 32px; gap: 24px; flex-wrap: wrap; }
.section-title { font-family: var(--font-serif); font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.02em; line-height: 1.05; }
.section-sub { color: var(--fg-dim); max-width: 520px; font-size: 14.5px; }

/* ===== Grids ===== */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ===== Footer ===== */
.footer { padding: 80px 0 40px; border-top: 1px solid var(--line); background: #08080a; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer h4 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--fg-mute); margin-bottom: 18px; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer a { font-size: 13.5px; color: var(--fg-dim); transition: color .15s; }
.footer a:hover { color: var(--fg); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 30px; border-top: 1px solid var(--line); color: var(--fg-mute); font-size: 12px; font-family: var(--font-mono); }

/* ===== Placeholder thumbnails (diagonal stripe) ===== */
.thumb-stripe {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.015) 0 24px,
      rgba(255,255,255,0.04) 24px 25px);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-mute);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
}
.thumb-stripe[data-tone="amber"] { background-color: #1a1510; }
.thumb-stripe[data-tone="slate"] { background-color: #0f1115; }
.thumb-stripe[data-tone="warm"] { background-color: #141211; }
.thumb-stripe[data-tone="cool"] { background-color: #0d1012; }

/* ===== Noise overlay option ===== */
.noise::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: .04; mix-blend-mode: overlay;
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 48px 0; }
.spacer-sm { height: 16px; } .spacer { height: 32px; } .spacer-lg { height: 64px; }
.row { display: flex; } .row-between { display: flex; justify-content: space-between; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.ta-c { text-align: center; } .ta-r { text-align: right; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .6s cubic-bezier(.2,.7,.2,1) both; }
.fade-up-2 { animation-delay: .08s; }
.fade-up-3 { animation-delay: .16s; }
.fade-up-4 { animation-delay: .24s; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-ghost); }

/* ===== Cart drawer ===== */
.cart-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s; }
.cart-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 420px; max-width: 100vw;
  background: var(--bg-raised); border-left: 1px solid var(--line);
  z-index: 201; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: none; }
.cart-head { padding: 20px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.cart-item { display: flex; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.cart-item:last-child { border-bottom: none; }
.cart-item-thumb { width: 64px; height: 64px; border-radius: var(--r); overflow: hidden; flex-shrink: 0; border: 1px solid var(--line); }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-foot { padding: 20px 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }

/* ===== Modal ===== */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 300; display: none; align-items: center; justify-content: center; padding: 40px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); max-width: 900px; width: 100%; max-height: 85vh; overflow: hidden; display: flex; flex-direction: column; }

/* ===== SEO text block ===== */
.seo-block { padding: 80px 0; background: #08080a; border-top: 1px solid var(--line); }
.seo-block h2 { font-family: var(--font-serif); font-size: 32px; letter-spacing: -0.01em; margin-bottom: 20px; }
.seo-block h3 { font-size: 16px; font-weight: 500; margin: 24px 0 8px; color: var(--fg); }
.seo-block p { color: var(--fg-dim); margin-bottom: 14px; font-size: 14.5px; max-width: 72ch; }
.seo-block a { color: var(--accent); }
.seo-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }

/* =========================================================================
   Checkout popup — Tebex-style light theme, fully scoped to .tbx-co
   Don't leak into the site's dark theme.
   ========================================================================= */
.tbx-co {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #1a1d21;
  animation: tbx-co-fade .22s ease;
}
@keyframes tbx-co-fade { from { opacity: 0; } to { opacity: 1; } }
.tbx-co *, .tbx-co *::before, .tbx-co *::after { box-sizing: border-box; }
.tbx-co__backdrop {
  position: absolute; inset: 0;
  background: rgba(10, 14, 24, 0.62);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.tbx-co__card {
  position: relative; z-index: 1;
  width: 100%; max-width: 920px;
  max-height: min(92vh, 820px);
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 30px 90px -20px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.04);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: tbx-co-pop .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes tbx-co-pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }

.tbx-co__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid #eef1f4;
  background: #fff;
}
.tbx-co__logo { height: 22px; width: auto; display: block; filter: none; }
.tbx-co__close {
  width: 34px; height: 34px; border-radius: 8px; background: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  color: #6b7280; cursor: pointer; transition: background .15s, color .15s;
  border: 0;
}
.tbx-co__close:hover { background: #f3f5f7; color: #1a1d21; }

.tbx-co__body {
  display: grid;
  grid-template-columns: 300px 1fr;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

/* ---------- Order rail (left) ---------- */
.tbx-co__rail {
  background: #fafbfc;
  border-right: 1px solid #eef1f4;
  padding: 22px 20px 20px;
  display: flex; flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.tbx-co__rail-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14.5px; font-weight: 600;
  color: #1a1d21;
  margin-bottom: 16px;
}
.tbx-co__link {
  background: none; border: none; padding: 0;
  font: inherit; font-size: 13px; font-weight: 500;
  color: #41c4c3; cursor: pointer;
}
.tbx-co__link:hover { text-decoration: underline; }

.tbx-co__items {
  flex: 1 1 auto;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.tbx-co__item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4;
}
.tbx-co__item:last-child { border-bottom: 0; }
.tbx-co__thumb {
  width: 48px; height: 48px; border-radius: 8px;
  background: #eef1f4;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  font-size: 12px; font-weight: 700; color: #6b7280; letter-spacing: .04em;
}
.tbx-co__thumb img { width: 100%; height: 100%; object-fit: cover; }
.tbx-co__thumb[data-tone="amber"]  { background: #fef4e0; color: #a66a00; }
.tbx-co__thumb[data-tone="emerald"]{ background: #e6f7ee; color: #147a45; }
.tbx-co__thumb[data-tone="violet"] { background: #efe9fb; color: #5b3aa8; }
.tbx-co__thumb[data-tone="slate"]  { background: #eef1f4; color: #475569; }
.tbx-co__item-body { min-width: 0; }
.tbx-co__item-name {
  font-size: 13.5px; font-weight: 500; color: #1a1d21;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tbx-co__item-meta { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
.tbx-co__item-price { font-size: 13.5px; font-weight: 600; color: #1a1d21; white-space: nowrap; }

.tbx-co__totals {
  border-top: 1px solid #eef1f4;
  padding-top: 14px; margin-top: 10px;
}
.tbx-co__total-row {
  display: flex; justify-content: space-between;
  font-size: 13.5px; color: #4b5563; padding: 4px 0;
}
.tbx-co__total-row--strong {
  font-size: 16px; font-weight: 700; color: #1a1d21;
  padding-top: 8px; margin-top: 4px; border-top: 1px solid #eef1f4;
}
.tbx-co__total-row em { font-style: normal; font-size: 11.5px; color: #6b7280; font-weight: 500; margin-left: 4px; }

.tbx-co__trust {
  margin-top: 14px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: #6b7280;
  text-transform: none; letter-spacing: 0;
}

/* ---------- Main pane (right) ---------- */
.tbx-co__main {
  padding: 26px 32px 24px;
  overflow-y: auto;
  min-height: 0;
}
.tbx-co__stage { display: flex; flex-direction: column; }
.tbx-co__h2 {
  font-family: 'Inter', sans-serif;
  font-size: 22px; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: #1a1d21;
}
.tbx-co__sub {
  font-size: 13.5px; color: #6b7280;
  line-height: 1.5; margin: 0 0 20px;
}
.tbx-co__sub--mono { font-family: 'Geist Mono', ui-monospace, monospace; font-size: 12.5px; }

.tbx-co__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tbx-co__field label {
  font-size: 12.5px; font-weight: 600; color: #374151;
}
.tbx-co__field .tbx-co__opt { font-weight: 400; color: #9ca3af; }
.tbx-co__field input {
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d6dbe0;
  border-radius: 8px;
  background: #fff;
  color: #1a1d21;
  font: inherit; font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.tbx-co__field input::placeholder { color: #9ca3af; }
.tbx-co__field input:focus {
  outline: none;
  border-color: #41c4c3;
  box-shadow: 0 0 0 3px rgba(65, 196, 195, 0.15);
}

.tbx-co__section-label {
  font-size: 12.5px; font-weight: 600; color: #374151;
  margin: 10px 0 10px;
}

.tbx-co__methods {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 14px;
}
.tbx-co__method {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr 22px;
  align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1.5px solid #d6dbe0;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.tbx-co__method:hover { border-color: #b6c2cd; background: #fafbfc; }
.tbx-co__method.is-active {
  border-color: #41c4c3;
  background: #f1fbfa;
  box-shadow: 0 0 0 3px rgba(65, 196, 195, 0.12);
}
.tbx-co__method input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.tbx-co__method > svg { color: #1a1d21; }
.tbx-co__method-title { font-size: 14px; font-weight: 600; color: #1a1d21; }
.tbx-co__method-sub   { font-size: 12px; color: #6b7280; margin-top: 2px; }
.tbx-co__radio-dot {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid #c5cbd3;
  display: inline-block; position: relative;
  transition: border-color .15s;
}
.tbx-co__method.is-active .tbx-co__radio-dot {
  border-color: #41c4c3;
}
.tbx-co__method.is-active .tbx-co__radio-dot::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%;
  background: #41c4c3;
}

.tbx-co__notice {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px; line-height: 1.5;
  margin-bottom: 14px;
}
.tbx-co__notice--warn {
  background: #fff8e6; border: 1px solid #f3d98a; color: #7a5a00;
}
.tbx-co__notice--warn strong { color: #5c4300; }
.tbx-co__notice--err {
  background: #fdecec; border: 1px solid #f4bbbb; color: #8a1f1f;
}

.tbx-co__btn {
  width: 100%;
  height: 48px;
  background: #41c4c3;
  color: #ffffff;
  font: inherit; font-size: 15px; font-weight: 600;
  border: 0; border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .05s;
  margin-top: 6px;
}
.tbx-co__btn:hover:not(:disabled) { background: #35adac; }
.tbx-co__btn:active:not(:disabled) { transform: translateY(1px); }
.tbx-co__btn:disabled { background: #c8ccd1; cursor: not-allowed; color: #fff; }
.tbx-co__btn--ghost {
  background: transparent; color: #41c4c3;
  border: 1.5px solid #41c4c3;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.tbx-co__btn--ghost:hover:not(:disabled) { background: #f1fbfa; }

.tbx-co__fine-print {
  font-size: 11.5px; color: #9ca3af; text-align: center;
  margin-top: 12px;
}
.tbx-co__fine-print a { color: #41c4c3; text-decoration: none; }
.tbx-co__fine-print a:hover { text-decoration: underline; }

.tbx-co__back {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: 0;
  padding: 4px 6px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: #6b7280; cursor: pointer;
  margin: -4px 0 8px -6px;
}
.tbx-co__back:hover { color: #1a1d21; }

.tbx-co__readonly {
  display: flex; flex-wrap: wrap; gap: 18px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid #eef1f4;
  border-radius: 8px;
  background: #fafbfc;
  font-size: 13.5px;
  margin-bottom: 18px;
}
.tbx-co__readonly-label {
  font-size: 11px; font-weight: 600; color: #9ca3af;
  text-transform: uppercase; letter-spacing: .06em;
  margin-bottom: 2px;
}
.tbx-co__readonly .tbx-co__link { margin-left: auto; align-self: center; }

.tbx-co__dropin { min-height: 340px; }
.tbx-co__dropin-loading {
  padding: 40px 0; text-align: center;
  font-size: 12.5px; color: #9ca3af;
}

.tbx-co__empty {
  padding: 60px 32px; text-align: center;
}
.tbx-co__empty .tbx-co__btn--ghost { display: inline-flex; width: auto; padding: 0 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .tbx-co { padding: 0; }
  .tbx-co__card { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
  .tbx-co__body { grid-template-columns: 1fr; }
  .tbx-co__rail {
    border-right: 0; border-bottom: 1px solid #eef1f4;
    padding: 16px 20px;
    max-height: 40vh;
  }
  .tbx-co__main { padding: 22px 20px; }
}

/* =========================================================================
   Admin design system (adm-*)
   Sidebar layout, topbar, stat cards, tables, editor modal, tag input, etc.
   ========================================================================= */
.adm-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.adm-side {
  background: var(--bg-raised);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.adm-brand { display: flex; align-items: center; gap: 10px; padding: 8px 10px 24px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.adm-brand-mark { width: 28px; height: 28px; border-radius: 6px; background: var(--accent); display: grid; place-items: center; font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: #0c0c0e; }
.adm-brand-name { font-family: var(--font-serif); font-size: 22px; letter-spacing: -0.01em; line-height: 1; }
.adm-brand-sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--fg-mute); margin-top: 2px; }
.adm-nav-group-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); padding: 16px 10px 8px; }
.adm-nav { display: flex; flex-direction: column; gap: 1px; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; color: var(--fg-dim); transition: all .12s; cursor: pointer; }
.adm-nav a:hover { background: var(--bg-elev); color: var(--fg); }
.adm-nav a.active { background: var(--accent-soft); color: var(--accent); border-left: 2px solid var(--accent); padding-left: 8px; }
.adm-nav a .count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); background: var(--bg-elev); padding: 1px 6px; border-radius: 100px; }

.adm-main { min-width: 0; }
.adm-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 32px; border-bottom: 1px solid var(--line);
  background: rgba(10,10,11,0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 10;
}
.adm-topbar-left { display: flex; align-items: center; gap: 16px; }
.adm-breadcrumb { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); }
.adm-breadcrumb a { color: var(--fg-mute); }
.adm-breadcrumb a:hover { color: var(--accent); }
.adm-topbar-right { display: flex; align-items: center; gap: 10px; }
.adm-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

.adm-content { padding: 32px; max-width: 1400px; }
.adm-page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.adm-page-head h1 { font-family: var(--font-serif); font-size: 44px; letter-spacing: -0.02em; line-height: 1; }
.adm-page-head .sub { color: var(--fg-dim); font-size: 14px; margin-top: 8px; }

/* Stats cards */
.adm-stats-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 32px; }
.adm-stat { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); }
.adm-stat-label { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg-mute); }
.adm-stat-num { font-family: var(--font-serif); font-size: 36px; letter-spacing: -0.01em; margin-top: 8px; line-height: 1; }
.adm-stat-delta { font-family: var(--font-mono); font-size: 11px; margin-top: 6px; }
.adm-stat-delta.up { color: oklch(0.7 0.17 145); }
.adm-stat-delta.down { color: var(--danger); }
.adm-stat-delta.neutral { color: var(--fg-mute); }

/* Sub-tab row (status filter tabs used by multiple pages) */
.adm-subtabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 13px; flex-wrap: wrap; }
.adm-subtabs button { padding: 10px 16px; color: var(--fg-dim); border-bottom: 2px solid transparent; }
.adm-subtabs button:hover { color: var(--fg); }
.adm-subtabs button.active { color: var(--fg); border-bottom-color: var(--accent); }
.adm-subtabs button .count { color: var(--fg-mute); font-family: var(--font-mono); font-size: 11px; margin-left: 6px; }

/* Toolbar above tables */
.adm-tools {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 16px; background: var(--bg-raised);
  border: 1px solid var(--line); border-radius: var(--r) var(--r) 0 0;
  border-bottom: none; flex-wrap: wrap;
}
.adm-search { flex: 1; min-width: 200px; max-width: 320px; position: relative; }
.adm-search input { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px 8px 34px; font-size: 13px; }
.adm-search input:focus { outline: none; border-color: var(--accent); }
.adm-search::before { content: ''; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236d6a63' stroke-width='1.8'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E"); background-repeat: no-repeat; }
.adm-select { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r); padding: 7px 10px; font-size: 13px; }
.adm-select:focus { outline: none; border-color: var(--accent); }
.adm-tools-count { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); letter-spacing: 0.08em; text-transform: uppercase; }
.adm-bulk { display: flex; gap: 8px; align-items: center; padding: 12px 16px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-top: none; font-size: 13px; color: var(--fg); }

/* Tables */
.adm-table-wrap { border: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); overflow: hidden; background: var(--bg-raised); }
.adm-table-wrap.standalone { border-radius: var(--r); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table thead { background: var(--bg-elev); }
.adm-table th {
  text-align: left; padding: 12px 16px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute);
  border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none;
}
.adm-table th.sortable { cursor: pointer; }
.adm-table th.sortable:hover { color: var(--fg); }
.adm-table th .sort-arrow { color: var(--accent); margin-left: 4px; font-size: 10px; }
.adm-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.adm-table tbody tr { transition: background .12s; }
.adm-table tbody tr:hover { background: var(--bg-elev); }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table tbody tr.selected { background: var(--accent-soft); }
.adm-table .num { font-family: var(--font-mono); font-size: 13px; text-align: right; }
.adm-check { accent-color: var(--accent); cursor: pointer; width: 16px; height: 16px; }

.pr-cell { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.pr-thumb { width: 48px; height: 48px; border-radius: 6px; border: 1px solid var(--line); overflow: hidden; flex-shrink: 0; background: var(--bg-elev); }
.pr-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pr-name { font-weight: 500; color: var(--fg); }
.pr-slug { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); margin-top: 2px; }

.status-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.status-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.status-dot.published::before, .status-dot.paid::before, .status-dot.approved::before, .status-dot.active::before, .status-dot.closed::before, .status-dot.sent::before, .status-dot.success::before { background: oklch(0.7 0.17 145); }
.status-dot.draft::before, .status-dot.open::before, .status-dot.new::before { background: var(--fg-mute); }
.status-dot.pending::before, .status-dot.pending_payment::before, .status-dot.processing::before, .status-dot.received::before { background: oklch(0.78 0.15 70); }
.status-dot.archived::before, .status-dot.failed::before, .status-dot.rejected::before, .status-dot.refunded::before, .status-dot.spam::before, .status-dot.error::before { background: var(--danger); }

.row-actions { display: flex; gap: 8px; justify-content: flex-end; }
.row-actions button {
  padding: 6px 10px; font-size: 12px; border-radius: 4px;
  color: var(--fg-dim); border: 1px solid transparent; transition: all .12s;
}
.row-actions button:hover { background: var(--bg-elev); color: var(--fg); border-color: var(--line); }
.row-actions .danger:hover { color: var(--danger); border-color: var(--danger); }

.adm-pagination { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 12.5px; color: var(--fg-dim); }
.adm-pagination-nums { display: flex; gap: 4px; }
.adm-pagination-nums button { width: 32px; height: 32px; border-radius: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-dim); }
.adm-pagination-nums button.active { background: var(--accent); color: #0c0c0e; }
.adm-pagination-nums button:hover:not(.active):not(:disabled) { background: var(--bg-elev); color: var(--fg); }
.adm-pagination-nums button:disabled { opacity: 0.3; cursor: not-allowed; }

/* Editor modal */
.adm-modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; animation: admFadeIn .15s; }
@keyframes admFadeIn { from { opacity: 0; } to { opacity: 1; } }
.adm-editor {
  width: 100%; max-width: 1240px; max-height: 92vh; overflow: hidden;
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg);
  display: flex; flex-direction: column;
}
.adm-editor-head {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 24px; border-bottom: 1px solid var(--line); background: var(--bg-elev);
}
.adm-editor-head h2 { font-family: var(--font-serif); font-size: 26px; letter-spacing: -0.01em; line-height: 1.1; }
.adm-editor-head .sub { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); letter-spacing: 0.1em; margin-top: 4px; }
.adm-editor-close { width: 32px; height: 32px; border-radius: 6px; color: var(--fg-mute); font-size: 22px; line-height: 1; }
.adm-editor-close:hover { background: var(--bg-raised); color: var(--fg); }
.adm-editor-body { display: grid; grid-template-columns: 1fr 320px; gap: 0; overflow: hidden; flex: 1; min-height: 0; }
.adm-editor-body.single { grid-template-columns: 1fr; }
.adm-editor-main { padding: 24px 28px; overflow-y: auto; }
.adm-editor-side { padding: 24px 20px; border-left: 1px solid var(--line); overflow-y: auto; background: var(--bg); }

.adm-field { margin-bottom: 20px; }
.adm-field-label { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-mute); margin-bottom: 8px; }
.adm-field-label .hint { color: var(--fg-mute); text-transform: none; letter-spacing: 0; font-family: var(--font-sans); font-size: 11px; }
.adm-field-label .req { color: var(--accent); }
.adm-input, .adm-textarea, .adm-select-full {
  width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line);
  border-radius: var(--r); padding: 10px 12px; font-size: 13.5px; transition: border-color .12s;
}
.adm-input:focus, .adm-textarea:focus, .adm-select-full:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-textarea { min-height: 100px; resize: vertical; font-family: inherit; line-height: 1.5; }
.adm-textarea.big { min-height: 180px; }
.adm-textarea.mono { font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; }

/* Tabs inside editor */
.adm-tabs-nav {
  display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 24px;
  overflow-x: auto; white-space: nowrap;
}
.adm-tabs-nav button {
  padding: 12px 18px; font-size: 13px; color: var(--fg-dim);
  border-bottom: 2px solid transparent; transition: all .12s;
  display: inline-flex; align-items: center; gap: 8px;
}
.adm-tabs-nav button:hover { color: var(--fg); }
.adm-tabs-nav button.active { color: var(--fg); border-bottom-color: var(--accent); }

/* Gallery */
.adm-gallery { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.adm-gallery-item, .adm-gallery-add {
  aspect-ratio: 1; border-radius: var(--r); border: 1px solid var(--line);
  overflow: hidden; position: relative; background: var(--bg-elev);
}
.adm-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.adm-gallery-item .rm {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  background: rgba(0,0,0,0.7); border-radius: 4px; display: grid; place-items: center;
  color: #fff; opacity: 0; transition: opacity .15s;
}
.adm-gallery-item:hover .rm { opacity: 1; }
.adm-gallery-item .primary-tag {
  position: absolute; bottom: 6px; left: 6px; padding: 2px 6px; background: var(--accent); color: #0c0c0e;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 3px;
}
.adm-gallery-add {
  display: grid; place-items: center; cursor: pointer; transition: all .12s;
  border: 1px dashed var(--line); color: var(--fg-mute); font-size: 12px;
}
.adm-gallery-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.adm-gallery-add .plus { font-size: 24px; line-height: 1; }

/* Attribute rows */
.adm-attr {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); margin-bottom: 10px;
  overflow: hidden;
}
.adm-attr-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  cursor: pointer; transition: background .12s;
}
.adm-attr-head:hover { background: var(--bg-elev); }
.adm-attr-head .drag { color: var(--fg-mute); cursor: grab; font-size: 12px; }
.adm-attr-head .name { font-weight: 500; color: var(--fg); }
.adm-attr-head .vals { font-size: 12px; color: var(--fg-mute); margin-left: auto; font-family: var(--font-mono); }
.adm-attr-head .toggle { margin-left: 8px; transition: transform .15s; color: var(--fg-mute); }
.adm-attr.open .toggle { transform: rotate(90deg); }
.adm-attr-body { padding: 14px; border-top: 1px solid var(--line); background: var(--bg-raised); display: none; }
.adm-attr.open .adm-attr-body { display: block; }

/* Side panel boxes */
.adm-box { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 16px; overflow: hidden; }
.adm-box-head { padding: 12px 14px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg); background: var(--bg-elev); display: flex; justify-content: space-between; align-items: center; }
.adm-box-body { padding: 14px; font-size: 13px; }

/* Toggle */
.toggle-sw { position: relative; width: 36px; height: 20px; background: var(--bg-elev); border: 1px solid var(--line); border-radius: 100px; cursor: pointer; transition: all .15s; flex-shrink: 0; display: inline-block; }
.toggle-sw::after { content: ''; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; background: var(--fg-mute); border-radius: 50%; transition: all .15s; }
.toggle-sw.on { background: var(--accent-soft); border-color: var(--accent); }
.toggle-sw.on::after { left: 17px; background: var(--accent); }
.toggle-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; color: var(--fg-dim); cursor: pointer; }
.toggle-row:hover { color: var(--fg); }
.toggle-row label { flex: 1; cursor: pointer; }

/* Tag input */
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); min-height: 42px; align-items: center; }
.tag-input:focus-within { border-color: var(--accent); }
.tag-input .tag { padding: 3px 8px; background: var(--accent-soft); color: var(--accent); border-radius: 100px; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.tag-input .tag button { color: var(--accent); opacity: 0.6; }
.tag-input .tag button:hover { opacity: 1; }
.tag-input input { flex: 1; min-width: 100px; background: transparent; border: none; outline: none; color: var(--fg); font-size: 13px; }

/* Editor footer */
.adm-editor-foot { padding: 14px 24px; border-top: 1px solid var(--line); background: var(--bg-elev); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.adm-editor-foot .saving { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); letter-spacing: 0.08em; }

/* Confirm dialog */
.confirm-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 200; display: grid; place-items: center; padding: 20px; }
.confirm-box { max-width: 420px; padding: 28px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); }
.confirm-box h3 { font-family: var(--font-serif); font-size: 26px; letter-spacing: -0.01em; margin-bottom: 8px; }
.confirm-box p { color: var(--fg-dim); font-size: 14px; margin-bottom: 20px; line-height: 1.55; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.btn-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger); }
.btn-danger:hover { background: oklch(0.55 0.22 25); }

/* Row layouts */
.adm-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* Empty state */
.adm-empty { padding: 80px 20px; text-align: center; color: var(--fg-mute); }
.adm-empty h3 { font-family: var(--font-serif); font-size: 32px; color: var(--fg-dim); margin-bottom: 8px; letter-spacing: -0.01em; }
.adm-empty p { max-width: 48ch; margin: 0 auto; line-height: 1.55; }

/* Layout helpers used across admin pages */
.adm-grid-2 { display: grid; grid-template-columns: 320px 1fr; gap: 20px; }
.adm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.adm-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Dashboard-specific */
.adm-chart-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-raised); }
.adm-chart-card h3 { font-family: var(--font-serif); font-size: 20px; letter-spacing: -0.01em; margin-bottom: 16px; }
.adm-spark { width: 100%; height: 160px; }

.adm-activity { display: flex; flex-direction: column; gap: 0; }
.adm-activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.adm-activity-row:last-child { border-bottom: none; }
.adm-activity-icon { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--line); display: grid; place-items: center; flex-shrink: 0; font-size: 14px; }
.adm-activity-main { flex: 1; min-width: 0; }
.adm-activity-when { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); white-space: nowrap; }
.adm-activity-amt { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

/* Media library grid */
.adm-media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.adm-media-tile { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg-raised); cursor: pointer; transition: border-color .15s; display: flex; flex-direction: column; }
.adm-media-tile:hover { border-color: var(--accent-line); }
.adm-media-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.adm-media-thumb { aspect-ratio: 1; background: var(--bg-elev); overflow: hidden; position: relative; }
.adm-media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-media-meta { padding: 10px 12px; font-size: 12px; }
.adm-media-name { color: var(--fg); font-family: var(--font-mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-media-dim { color: var(--fg-mute); font-family: var(--font-mono); font-size: 11px; margin-top: 2px; }

/* Review cards */
.adm-review-card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 12px; display: flex; gap: 16px; }
.adm-review-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-elev); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--font-mono); color: var(--accent); flex-shrink: 0; }
.adm-review-body { flex: 1; min-width: 0; }
.adm-review-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.adm-review-product { font-family: var(--font-mono); font-size: 11px; color: var(--fg-mute); }
.adm-review-text { color: var(--fg-dim); line-height: 1.5; font-size: 14px; margin-bottom: 12px; }

/* Coming-soon placeholder */
.adm-coming-soon { padding: 100px 32px; text-align: center; border: 1px dashed var(--line); border-radius: var(--r-lg); background: var(--bg-raised); }
.adm-coming-soon h2 { font-family: var(--font-serif); font-size: 52px; letter-spacing: -0.02em; margin-bottom: 12px; }
.adm-coming-soon p { color: var(--fg-dim); max-width: 52ch; margin: 0 auto 24px; line-height: 1.55; }
.adm-coming-soon code { font-family: var(--font-mono); font-size: 12px; background: var(--bg-elev); border: 1px solid var(--line); padding: 2px 6px; border-radius: 4px; color: var(--accent); }

@media (max-width: 1100px) {
  .adm-editor-body { grid-template-columns: 1fr; }
  .adm-editor-side { border-left: none; border-top: 1px solid var(--line); }
  .adm-stats-row, .adm-grid-4 { grid-template-columns: repeat(2,1fr); }
  .adm-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { display: none; }
  .adm-content { padding: 20px; }
}


/* ===== Rendered markdown body (public product description) =============== */
.product-md-body { font-size: 17px; line-height: 1.7; color: var(--fg); }
.product-md-body p { color: var(--fg-dim); margin-bottom: 20px; }
.product-md-body h1, .product-md-body h2 { font-family: var(--font-serif); font-size: 28px; letter-spacing: -0.01em; line-height: 1.2; margin: 32px 0 14px; color: var(--fg); }
.product-md-body h3 { font-size: 19px; font-weight: 600; margin: 24px 0 10px; color: var(--fg); }
.product-md-body h4, .product-md-body h5, .product-md-body h6 { font-size: 16px; font-weight: 600; margin: 20px 0 8px; color: var(--fg); }
.product-md-body ul, .product-md-body ol { margin: 0 0 20px 22px; color: var(--fg-dim); }
.product-md-body li { margin-bottom: 6px; }
.product-md-body code { font-family: var(--font-mono); font-size: 14px; background: var(--bg-elev); padding: 2px 6px; border-radius: 4px; color: var(--accent); }
.product-md-body pre { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; overflow-x: auto; margin: 0 0 20px; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.5; }
.product-md-body pre code { background: none; padding: 0; color: var(--fg); }
.product-md-body a { color: var(--accent); border-bottom: 1px solid var(--accent-line); }
.product-md-body a:hover { border-bottom-color: var(--accent); }
.product-md-body blockquote { border-left: 2px solid var(--accent); padding-left: 18px; margin: 0 0 20px; font-family: var(--font-serif); font-size: 20px; line-height: 1.45; color: var(--fg); font-style: italic; }
.product-md-body hr { border: none; border-top: 1px solid var(--line); margin: 32px 0; }
.product-md-body strong { color: var(--fg); font-weight: 600; }
.product-md-body em { font-style: italic; }
.product-md-body img { max-width: 100%; border-radius: var(--r); margin: 8px 0; }

/* ===== Product video player =====
   Custom-controlled HTML5 player. Replaces browser-default chrome with a themed
   bar. Container uses aspect-ratio to reserve the right space pre-load (no CLS).
*/
.tbx-vp {
  position: relative;
  width: 100%;
  border-radius: var(--r-lg, 12px);
  overflow: hidden;
  background: #0a0c10;
  outline: none;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tbx-vp:focus-visible { box-shadow: 0 0 0 2px var(--accent), inset 0 0 0 1px var(--line); }
.tbx-vp[data-tone="amber"] { background-color: #1a1510; }
.tbx-vp[data-tone="slate"] { background-color: #0f1115; }
.tbx-vp[data-tone="warm"]  { background-color: #141211; }
.tbx-vp[data-tone="cool"]  { background-color: #0d1012; }

.tbx-vp__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  background: transparent;
  cursor: pointer;
}

.tbx-vp__cover {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.tbx-vp__poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.tbx-vp__cover-shade {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.tbx-vp__big-play {
  position: relative;
  width: 78px; height: 78px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.94);
  color: #0a0c10;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  transition: transform .18s ease, background .18s ease;
  animation: tbx-vp-pulse 2.6s ease-in-out infinite;
}
.tbx-vp__big-play svg { margin-left: 4px; }
.tbx-vp__cover:hover .tbx-vp__big-play { transform: scale(1.08); background: #fff; }
@keyframes tbx-vp-pulse {
  0%, 100% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 0 rgba(255,255,255,0.35); }
  50%      { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 14px rgba(255,255,255,0.0); }
}
.tbx-vp__cover--end .tbx-vp__big-play { animation: none; }

.tbx-vp__duration-badge {
  position: absolute;
  bottom: 12px; right: 12px;
  padding: 4px 9px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: 4px;
  pointer-events: none;
}

.tbx-vp__spinner {
  position: absolute; left: 50%; top: 50%;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255,255,255,0.18);
  border-top-color: rgba(255,255,255,0.9);
  border-radius: 50%;
  animation: tbx-vp-spin .9s linear infinite;
  z-index: 3;
  pointer-events: none;
}
@keyframes tbx-vp-spin { to { transform: rotate(360deg); } }

.tbx-vp__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px 14px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.5) 60%, rgba(0,0,0,0));
  z-index: 4;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}
.tbx-vp--idle .tbx-vp__bar {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.tbx-vp__progress {
  position: relative;
  height: 5px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 999px;
  cursor: pointer;
  transition: height .15s ease;
}
.tbx-vp__progress:hover { height: 7px; }
.tbx-vp__progress-buf,
.tbx-vp__progress-played {
  position: absolute; top: 0; bottom: 0; left: 0;
  border-radius: 999px;
  pointer-events: none;
}
.tbx-vp__progress-buf    { background: rgba(255,255,255,0.30); }
.tbx-vp__progress-played { background: var(--accent); }
.tbx-vp__progress-thumb {
  position: absolute; top: 50%;
  width: 13px; height: 13px;
  margin-left: -6.5px;
  margin-top: -6.5px;
  background: var(--accent);
  border-radius: 50%;
  transform: scale(0);
  transition: transform .15s ease;
  pointer-events: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.4);
}
.tbx-vp__progress:hover .tbx-vp__progress-thumb { transform: scale(1); }

.tbx-vp__controls { display: flex; align-items: center; gap: 6px; }
.tbx-vp__btn {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.92);
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  flex: 0 0 auto;
}
.tbx-vp__btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.tbx-vp__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.tbx-vp__time {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
  white-space: nowrap;
}
.tbx-vp__time-sep { opacity: 0.45; padding: 0 2px; }
.tbx-vp__spacer { flex: 1; }

@media (max-width: 520px) {
  .tbx-vp__big-play { width: 64px; height: 64px; }
  .tbx-vp__btn { width: 32px; height: 32px; }
  .tbx-vp__btn--hide-mobile { display: none; }
  .tbx-vp__time { font-size: 11px; padding: 0 4px; }
  .tbx-vp__bar { padding: 20px 8px 8px; }
}

/* Thumbnail badge — overlaid on the video thumbnail in the gallery strip
   to mark "this is a video, click to play". */
.pd-video-thumb-badge {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.45));
}
.pd-video-thumb-badge::before {
  content: '';
  display: block;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  position: absolute;
}
.pd-video-thumb-badge::after {
  content: '';
  display: block;
  width: 0; height: 0;
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent #0a0c10;
  position: relative;
  margin-left: 2px;
}

/* Same scroll-perf win for bundle cards. */
.bundle-card { content-visibility: auto; contain-intrinsic-size: 360px 460px; }

/* ===== Bundle thumbnail ====================================================
   Composite preview built from up to four product cover images, with the
   bundle name floated on top. Used inside .bundle-card on home/shop and as
   the hero image on /bundle/<slug>. */
.bundle-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-elev);
}
.bundle-thumb--hero { aspect-ratio: 16 / 8; border-radius: var(--r-lg); }
.bundle-thumb__grid {
  position: absolute; inset: 0;
  display: grid;
  gap: 2px;
  background: var(--line);
}
.bundle-thumb--two .bundle-thumb__grid  { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.bundle-thumb--four .bundle-thumb__grid { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.bundle-thumb__cell {
  position: relative;
  overflow: hidden;
  background-color: #0f1115;
}
.bundle-thumb__cell[data-tone="amber"] { background-color: #1a1510; }
.bundle-thumb__cell[data-tone="warm"]  { background-color: #141211; }
.bundle-thumb__cell[data-tone="cool"]  { background-color: #0d1012; }
.bundle-thumb__cell img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.55);
  transition: filter .4s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1);
}
.bundle-card:hover .bundle-thumb__cell img,
.bundle-thumb--hero .bundle-thumb__cell img { filter: saturate(0.95) brightness(0.62); transform: scale(1.04); }
.bundle-thumb__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(120% 90% at 50% 50%, rgba(8,8,10,0.10) 0%, rgba(8,8,10,0.55) 55%, rgba(8,8,10,0.85) 100%),
    linear-gradient(180deg, rgba(8,8,10,0.0) 0%, rgba(8,8,10,0.35) 100%);
  pointer-events: none;
}
.bundle-thumb__title {
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--fg);
  text-wrap: balance;
  max-width: 22ch;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
}
.bundle-thumb--hero .bundle-thumb__title {
  font-size: clamp(36px, 5.5vw, 72px);
  max-width: 18ch;
}
.bundle-thumb__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: rgba(8,8,10,0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.bundle-thumb__save {
  color: var(--accent);
  border-left: 1px solid var(--line);
  padding-left: 8px;
}
@media (max-width: 600px) {
  .bundle-thumb__title       { font-size: 22px; }
  .bundle-thumb--hero .bundle-thumb__title { font-size: 32px; }
}

/* ===== Bundle detail page ================================================== */
.bundle-hero {
  padding: 64px 0 32px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(900px 360px at 30% 0%, oklch(0.82 0.14 82 / 0.06), transparent 70%);
}
.bundle-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: center;
}
.bundle-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.02em;
  line-height: 1.04;
  margin: 14px 0 18px;
}
.bundle-hero .bundle-tagline {
  font-size: 17px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 56ch;
}
.bundle-hero .bundle-buy {
  padding: 24px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
}
.bundle-hero .bundle-buy-row {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px;
}
.bundle-hero .bundle-buy-price {
  font-family: var(--font-serif);
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.bundle-hero .bundle-buy-was {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg-mute);
  text-decoration: line-through;
}
.bundle-hero .bundle-buy-save {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 6px 10px;
  border-radius: 999px;
}
.bundle-section { padding: 56px 0; border-top: 1px solid var(--line); }
.bundle-section h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}
.bundle-items-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
}
.bundle-item {
  display: grid;
  grid-template-columns: 96px 1fr auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .15s, transform .2s;
  text-decoration: none;
  color: inherit;
}
.bundle-item:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.bundle-item__thumb {
  width: 96px; height: 60px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-elev);
  flex-shrink: 0;
}
.bundle-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bundle-item__name { font-size: 15px; font-weight: 500; line-height: 1.3; }
.bundle-item__meta { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-mute); margin-top: 4px; }
.bundle-item__price { font-family: var(--font-mono); font-size: 14px; color: var(--fg-dim); white-space: nowrap; }
.bundle-item__open {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .bundle-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .bundle-item { grid-template-columns: 72px 1fr auto; }
  .bundle-item__thumb { width: 72px; height: 48px; }
  .bundle-item__open { display: none; }
}