/* Product detail final stability pass.
   Scoped to detail pages: fixes contrast, spacing, icon overlap and card hierarchy
   after the imported inline styles and previous polish layers. */

:root {
  --detail-accent: #8b5cf6;
  --detail-accent-soft: #b8a3ff;
}

html[data-theme="light"],
body[data-theme="light"] {
  --detail-page-bg: #f5f5f8;
  --detail-section-bg: #f8f8fb;
  --detail-surface: #ffffff;
  --detail-surface-soft: #f1f1f5;
  --detail-fg: #111217;
  --detail-muted: rgba(17, 18, 23, .62);
  --detail-faint: rgba(17, 18, 23, .44);
  --detail-line: rgba(17, 18, 23, .095);
  --detail-shadow: 0 22px 70px rgba(12, 13, 18, .07);
}

html[data-theme="dark"],
body[data-theme="dark"] {
  --detail-page-bg: #090a0d;
  --detail-section-bg: #0c0d11;
  --detail-surface: #121319;
  --detail-surface-soft: #171821;
  --detail-fg: rgba(255, 255, 255, .92);
  --detail-muted: rgba(255, 255, 255, .64);
  --detail-faint: rgba(255, 255, 255, .46);
  --detail-line: rgba(255, 255, 255, .11);
  --detail-shadow: none;
}

/* Detail hero: always readable, no inherited colored/cursive title fragments. */
.pv-detail-hero {
  background:
    radial-gradient(circle at 78% 50%, rgba(139, 92, 246, .18), transparent 42%),
    linear-gradient(180deg, #07080b 0%, #0b0c10 100%) !important;
  color: #fff !important;
  padding-top: clamp(116px, 10vw, 148px) !important;
  padding-bottom: clamp(52px, 6vw, 82px) !important;
  overflow: hidden !important;
}

.pv-detail-hero .container {
  position: relative !important;
  z-index: 1 !important;
}

.pv-detail-hero-grid {
  display: grid !important;
  grid-template-columns: minmax(0, .96fr) minmax(360px, 1.04fr) !important;
  gap: clamp(28px, 4.5vw, 70px) !important;
  align-items: center !important;
  margin-top: 26px !important;
}

.pv-detail-hero-copy {
  max-width: 620px !important;
}

.pv-detail-hero h1,
.pv-detail-hero h1 *,
.pv-detail-hero h1 em,
.pv-detail-hero h1 .it {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-style: normal !important;
  text-shadow: none !important;
}

.pv-detail-hero h1 {
  font-size: clamp(48px, 6.2vw, 96px) !important;
  line-height: .94 !important;
  letter-spacing: -.055em !important;
  max-width: 11.5ch !important;
  margin-bottom: 22px !important;
}

.pv-detail-hero .h-eyebrow,
.pv-detail-hero a {
  color: rgba(255, 255, 255, .68) !important;
}

.pv-detail-hero .t-lead,
.pv-detail-hero p {
  color: rgba(255, 255, 255, .70) !important;
}

.pv-detail-hero-media {
  position: relative !important;
  min-height: clamp(360px, 42vw, 560px) !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}

.pv-detail-hero-media::before {
  content: "" !important;
  position: absolute !important;
  left: 8% !important;
  right: 8% !important;
  bottom: 8% !important;
  height: 16% !important;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, .18), transparent 72%) !important;
  filter: blur(18px) !important;
  pointer-events: none !important;
}

.pv-detail-hero-media img {
  position: relative !important;
  z-index: 1 !important;
  max-width: min(100%, 620px) !important;
  max-height: clamp(330px, 40vw, 540px) !important;
  object-fit: contain !important;
  filter: drop-shadow(0 34px 64px rgba(0, 0, 0, .58)) !important;
}

/* Consistent spacing between detail sections. */
.pv-detail-hero + .container,
.pv-detail-hero ~ .container,
.pv-detail-hero ~ .section.container,
.pv-light-panel {
  background: var(--detail-section-bg) !important;
}

.pv-detail-hero ~ .container,
.pv-detail-hero ~ .section.container {
  padding-top: clamp(70px, 8vw, 112px) !important;
  padding-bottom: clamp(70px, 8vw, 112px) !important;
}

.pv-detail-hero + .container {
  padding-top: clamp(34px, 5vw, 64px) !important;
}

/* Feature row: icon and text never overlap, both modes readable. */
.feature-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
  gap: 12px !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.feature-row-item {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  min-height: 128px !important;
  padding: 18px !important;
  border: 1px solid var(--detail-line) !important;
  border-radius: 16px !important;
  background: var(--detail-surface) !important;
  box-shadow: var(--detail-shadow) !important;
  color: var(--detail-fg) !important;
}

.feature-row-icon {
  width: 42px !important;
  height: 42px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 13px !important;
  color: var(--detail-accent) !important;
  background: color-mix(in srgb, var(--detail-accent) 10%, transparent) !important;
  flex: none !important;
}

.feature-row-icon svg {
  width: 21px !important;
  height: 21px !important;
  stroke-width: 1.8 !important;
}

.feature-row-item > div:last-child div:first-child {
  color: var(--detail-fg) !important;
  font-size: 14px !important;
  line-height: 1.22 !important;
  font-weight: 640 !important;
}

.feature-row-item > div:last-child div:last-child {
  color: var(--detail-muted) !important;
  font-size: 12.5px !important;
  line-height: 1.42 !important;
}

/* Light fact blocks and cards. */
.pv-light-panel {
  padding-top: clamp(76px, 9vw, 118px) !important;
  padding-bottom: clamp(76px, 9vw, 118px) !important;
  border-top: 1px solid var(--detail-line) !important;
  border-bottom: 1px solid var(--detail-line) !important;
}

.pv-light-head {
  display: grid !important;
  grid-template-columns: minmax(0, .9fr) minmax(260px, .7fr) !important;
  gap: 28px !important;
  align-items: end !important;
  margin-bottom: 34px !important;
}

.pv-light-head .h-section,
.section-title-row .h-section,
.section.container .h-section {
  color: var(--detail-fg) !important;
  font-style: normal !important;
  -webkit-text-fill-color: var(--detail-fg) !important;
}

.pv-light-head p,
.pv-light-head .t-lead,
.section-title-row p {
  color: var(--detail-muted) !important;
}

.pv-light-grid,
.product-variant-grid,
.application-grid,
.other-models-grid,
.specs-grid {
  display: grid !important;
  gap: 12px !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.pv-light-card,
.product-copy-card,
.product-config-card,
.product-variant-item,
.application-card,
.other-models-grid .tile,
.spec-card {
  color: var(--detail-fg) !important;
  background: var(--detail-surface) !important;
  border: 1px solid var(--detail-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--detail-shadow) !important;
  overflow: visible !important;
}

.pv-light-card {
  min-height: 168px !important;
  padding: 24px !important;
}

.pv-light-k,
.product-copy-card > .h-eyebrow,
.product-config-card > .h-eyebrow,
.section.container > .h-eyebrow,
.section-title-row .h-eyebrow,
.spec-card-title {
  color: var(--detail-faint) !important;
  font-style: normal !important;
  letter-spacing: .13em !important;
}

.pv-light-card h3,
.product-variant-name,
.application-title {
  color: var(--detail-fg) !important;
  font-style: normal !important;
}

.pv-light-card p,
.product-copy-card p,
.product-variant-desc,
.application-card p,
.other-models-grid .tile p {
  color: var(--detail-muted) !important;
}

.product-detail-split,
.storage-detail-grid {
  display: grid !important;
  gap: 18px !important;
  align-items: stretch !important;
}

.product-detail-split {
  grid-template-columns: minmax(0, 1fr) minmax(340px, .8fr) !important;
}

.storage-detail-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, .65fr) minmax(300px, .78fr) !important;
}

.product-copy-card,
.product-config-card {
  padding: clamp(24px, 3vw, 38px) !important;
  --fg: var(--detail-fg);
  --fg-dim: var(--detail-muted);
  --fg-mute: var(--detail-faint);
  --accent-soft: var(--detail-faint);
  --line: var(--detail-line);
  --bg-soft: var(--detail-surface-soft);
  --bg: var(--detail-section-bg);
}

.product-copy-card::after,
.product-config-card::after,
.pv-light-card::after {
  display: none !important;
}

.product-copy-pill {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 30px !important;
  border: 1px solid var(--detail-line) !important;
  border-radius: 999px !important;
  background: var(--detail-surface-soft) !important;
  color: var(--detail-muted) !important;
  padding: 7px 11px !important;
  font-size: 11px !important;
  line-height: 1 !important;
}

/* Inline legacy colors inside these cards resolve through vars; normalize them. */
.product-copy-card [style*="var(--fg-dim)"],
.product-config-card [style*="var(--fg-dim)"],
.pv-light-card [style*="var(--fg-dim)"],
.application-card [style*="var(--fg-dim)"],
.other-models-grid .tile [style*="var(--fg-dim)"] {
  color: var(--detail-muted) !important;
}

.product-copy-card [style*="var(--fg-mute)"],
.product-config-card [style*="var(--fg-mute)"],
.pv-light-card [style*="var(--fg-mute)"],
.application-card [style*="var(--fg-mute)"],
.other-models-grid .tile [style*="var(--fg-mute)"] {
  color: var(--detail-faint) !important;
}

.product-copy-card [style*="var(--accent-soft)"],
.product-config-card [style*="var(--accent-soft)"],
.pv-light-card [style*="var(--accent-soft)"],
.section.container [style*="var(--accent-soft)"] {
  color: var(--detail-faint) !important;
}

.detail-list {
  display: grid !important;
  gap: 10px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}

.detail-list-item {
  display: grid !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
  padding: 14px !important;
  border: 1px solid var(--detail-line) !important;
  border-radius: 13px !important;
  background: var(--detail-surface-soft) !important;
}

.detail-list-item span {
  color: var(--detail-accent) !important;
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
}

.detail-list-item p {
  color: var(--detail-muted) !important;
  line-height: 1.45 !important;
}

.product-variant-grid,
.application-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}

.product-variant-item,
.application-card,
.other-models-grid .tile {
  padding: 20px !important;
  min-height: 150px !important;
  transition: transform .28s ease, border-color .28s ease, background .28s ease !important;
}

.product-variant-item:hover,
.application-card:hover,
.other-models-grid .tile:hover {
  transform: translateY(-3px) !important;
  border-color: color-mix(in srgb, var(--detail-accent) 32%, var(--detail-line)) !important;
  background: var(--detail-surface-soft) !important;
  color: var(--detail-fg) !important;
}

.capacity-card {
  background: linear-gradient(180deg, #111217, #090a0d) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 16px !important;
  color: #fff !important;
}

.specs-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}

.spec-card {
  padding: 22px !important;
}

.spec-row {
  display: grid !important;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr) !important;
  gap: 16px !important;
  min-height: 42px !important;
  border-color: var(--detail-line) !important;
}

.spec-key {
  color: var(--detail-faint) !important;
}

.spec-value {
  color: var(--detail-fg) !important;
  font-weight: 620 !important;
}

@media (max-width: 980px) {
  .pv-detail-hero-grid,
  .product-detail-split,
  .storage-detail-grid,
  .pv-light-head {
    grid-template-columns: 1fr !important;
  }

  .pv-detail-hero h1 {
    max-width: 13ch !important;
  }

  .pv-detail-hero-media {
    min-height: 360px !important;
  }
}

@media (max-width: 620px) {
  .pv-detail-hero {
    padding-top: 106px !important;
  }

  .pv-detail-hero h1 {
    font-size: clamp(40px, 14vw, 64px) !important;
  }

  .feature-row,
  .pv-light-grid,
  .product-variant-grid,
  .application-grid,
  .specs-grid {
    grid-template-columns: 1fr !important;
  }

  .feature-row-item,
  .detail-list-item {
    grid-template-columns: 38px minmax(0, 1fr) !important;
  }
}
