/* Dark theme — depth without visible grid (micro-texture only) */

html[data-tavus-theme="dark"] {
  --tv-gold: #c4a44a;
  --tv-gold-deep: #9a7828;
  --tv-accent: #d4bc78;
  --tv-accent-muted: #8a8478;
  --tv-cream: #e8e2d6;
  --tv-line: rgba(255, 255, 255, 0.07);
  --tv-line-soft: rgba(255, 255, 255, 0.045);
  --tv-glow: 0 0 0 1px rgba(255, 255, 255, 0.05);
  --tv-glow-lg: 0 0 40px rgba(0, 0, 0, 0.45);
  --tv-btn-bg: linear-gradient(135deg, #3a3a3e 0%, #222226 100%);
  --tv-btn-text: #f5f5f5;
  --tv-btn-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Deep black base — neutral depth, almost no gold wash */
html[data-tavus-theme="dark"] body.tv-body {
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(255, 255, 255, 0.025), transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 50%, rgba(255, 255, 255, 0.012), transparent 45%),
    radial-gradient(ellipse 40% 30% at 0% 80%, rgba(255, 255, 255, 0.008), transparent 40%),
    linear-gradient(180deg, #030303 0%, #070709 38%, #050506 72%, #030303 100%);
  background-attachment: fixed;
}

/* Soft vignette only — no notebook grid */
html[data-tavus-theme="dark"] body.tv-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9996;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse 90% 60% at 50% -10%, rgba(255, 255, 255, 0.025), transparent 55%),
    radial-gradient(ellipse 130% 90% at 50% 110%, rgba(0, 0, 0, 0.45), transparent 55%);
  background-size: 100% 100%;
}

html[data-tavus-theme="dark"] .tv-grain {
  opacity: 0.014;
  mix-blend-mode: overlay;
}

/* ── Gold only where it matters ── */
html[data-tavus-theme="dark"] .tv-nav__link:hover { color: var(--tv-cream); }

html[data-tavus-theme="dark"] .tv-section__label {
  color: var(--tv-accent-muted);
  opacity: 1;
}

html[data-tavus-theme="dark"] .tv-link-arrow {
  color: var(--tv-cream);
}

html[data-tavus-theme="dark"] .tv-catnav__item:hover {
  color: var(--tv-cream);
  background: rgba(255, 255, 255, 0.04);
}

html[data-tavus-theme="dark"] .tv-catnav__item:hover .tv-catnav__icon {
  transform: scale(1.1);
}

html[data-tavus-theme="dark"] .tv-stat strong {
  color: var(--tv-text);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
}

html[data-tavus-theme="dark"] .tv-trust__item span {
  color: var(--tv-accent-muted);
}

html[data-tavus-theme="dark"] .tv-trust__item {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--tv-line-soft);
}

html[data-tavus-theme="dark"] .tv-logo__brand {
  color: var(--tv-cream, var(--tv-text));
  letter-spacing: 0.26em;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.35);
}

html[data-tavus-theme="dark"] .tv-logo__mark {
  display: none;
}

html[data-tavus-theme="dark"] .tv-search:focus-within {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

html[data-tavus-theme="dark"] .tv-search__btn {
  background: var(--tv-text) !important;
  color: var(--tv-bg) !important;
  box-shadow: none !important;
}

html[data-tavus-theme="dark"] .tv-search__btn:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
}

html[data-tavus-theme="dark"] .tv-btn--primary:not(.tv-btn--post):hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
  transform: translateY(-1px);
}

html[data-tavus-theme="dark"] .tv-btn--outline {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

html[data-tavus-theme="dark"] .tv-btn--outline:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
}

html[data-tavus-theme="dark"] .tv-hero__eyebrow {
  color: var(--tv-accent-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--tv-line-soft);
}

html[data-tavus-theme="dark"] .tv-hero__content h1 em {
  color: var(--tv-text);
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  font-style: italic;
  opacity: 0.92;
}

html[data-tavus-theme="dark"] .tv-hero__glow {
  background: radial-gradient(
    circle 280px at var(--mx, 30%) var(--my, 50%),
    rgba(255, 255, 255, 0.04),
    transparent 70%
  );
}

html[data-tavus-theme="dark"] .tv-cat::before {
  background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
}

html[data-tavus-theme="dark"] .tv-cat:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

html[data-tavus-theme="dark"] .tv-cat__icon-wrap {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-tavus-theme="dark"] .tv-cat:hover .tv-cat__icon-wrap {
  box-shadow: none;
}

html[data-tavus-theme="dark"] .tv-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

html[data-tavus-theme="dark"] .tv-hero {
  background-position: 68% center;
}

html[data-tavus-theme="dark"] .tv-hero::before {
  background: linear-gradient(105deg,
    rgba(5, 5, 5, 0.78) 0%,
    rgba(5, 5, 5, 0.42) 36%,
    rgba(5, 5, 5, 0.06) 62%,
    transparent 100%);
}

html[data-tavus-theme="dark"] .tv-hero__photo img {
  object-position: 72% center;
}

html[data-tavus-theme="dark"][data-md-hero="4"] .tv-hero__photo img,
html[data-md-hero="4"] .tv-hero__photo img {
  object-position: 54% 62% !important;
}

html[data-tavus-theme="dark"] .md-section-tools button.is-active,
html[data-tavus-theme="dark"] .md-opt-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--tv-cream);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Cards & panels: subtle top highlight line */
html[data-tavus-theme="dark"] .tv-stat,
html[data-tavus-theme="dark"] .tv-widget,
html[data-tavus-theme="dark"] .tv-card {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  html[data-tavus-theme="dark"] body.tv-body::before {
    background-size: 100% 100%;
  }
}

/* Header — readable text on dark (Cart, Favorites, Sign in, search) */
html[data-tavus-theme="dark"] .tv-header .tv-nav__link {
  color: #ece8e0;
  font-weight: 600;
}
html[data-tavus-theme="dark"] .tv-header .tv-nav__link .tv-nav__ico {
  opacity: 1;
}
html[data-tavus-theme="dark"] .tv-header .tv-cart-btn {
  color: #ece8e0;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
html[data-tavus-theme="dark"] .tv-header .tv-lang__btn:not(.is-active) {
  color: #d8d4cc;
}
html[data-tavus-theme="dark"] .tv-header .tv-search select {
  color: #f5f2eb;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: rgba(255, 255, 255, 0.14);
  color-scheme: light;
}
html[data-tavus-theme="dark"] .tv-header .tv-search select option {
  background: #ffffff;
  color: #141414;
}
html[data-tavus-theme="dark"] .tv-header .tv-search select option:checked {
  background: #2563eb;
  color: #ffffff;
}
html[data-tavus-theme="dark"] .tv-header .tv-search input::placeholder {
  color: #b8b4ae;
  opacity: 1;
}
html[data-tavus-theme="dark"] .tv-header .tv-search__icon {
  color: #c8c4bc;
  opacity: 1;
}
