/* Product page styling built on sectioned.css variables */
body.template-product {
  --bg: #05081a;
  --text: #e6eef7;
  --muted: #a7b3c6;
  --accent: #37a1ff;
  --accent2: #8BCF3F;
  --card: rgb(255 255 255 / 4%);
  --border: rgb(255 255 255 / 12%);
  --radius: 16px;
  --shadow: 0 12px 34px rgb(0 0 0 / 38%);
  --container: clamp(320px, 92vw, 1120px);

  /* offset for fixed header when navigating to in-page anchors */
  --anchor-offset: 96px;
}

body.template-product,
.site.product {
  background: var(--bg) !important;
  color: var(--text) !important;
}

.site.product .hero .wrap {
  width: var(--container);
  margin: auto;
  padding: 80px 16px 48px;
}

.site.product .container {
  width: var(--container);
  margin: auto;
  padding: 0 16px;
}

.site.product .grid {
  display: grid;
  gap: 16px;
}

.site.product .cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (width <=960px) {
  .site.product .cols-3 {
    grid-template-columns: 1fr 1fr;
  }
}


@media (width <=640px) {
  .site.product .cols-3 {
    grid-template-columns: 1fr;
  }
}

.site.product .card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  position: relative;
  border-left: 3px solid transparent;
}

.site.product .chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.site.product .chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .9rem;
  color: var(--muted);
}

.site.product .gallery img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* gallery hover zoom */

/* product logo sizing via CSS variable (set on .hero) */
.site.product .hero {
  --product-logo-width: 120px;

  min-height: 36vh;
}

.product-logo {
  display: block;
}

.product-logo--small {
  width: var(--product-logo-width);
  max-height: calc(var(--product-logo-width) * 0.9);
  overflow: hidden;
  display: block;
}

/* center logo inside hero-media and make <img> obey the CSS variable */
.site.product .hero .hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site.product .hero .hero-media img.product-logo {
  width: var(--product-logo-width);
  max-width: 100%;
  height: auto;
  display: block;
}

.site.product figure {
  margin: 0;
}

.site.product figcaption {
  color: var(--muted);
  font-size: .9rem;
  margin-top: 6px;
}

/* product-type control */
.product-type {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}

.product-type label {
  font-size: .95rem;
  color: var(--muted);
}

.product-type input[type="radio"] {
  margin-left: 8px;
  margin-right: 6px;
}

.product-type-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

.license-tables .upcoming {
  background: rgb(255 255 255 / 3%);
  border: 1px dashed var(--border);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 600;
}

/* Primary table badge and highlight */
.table-badge {
  display: inline-block;
  background: var(--accent, #007acc);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.table-block.primary-table {
  box-shadow: 0 6px 18px rgb(0 0 0 / 6%);
  border-left: 4px solid var(--accent, #007acc);
}

/* animation classes for table reveal */
.table-block {
  display: block;
  opacity: 1;
  transform: none;
  transition: all .45s ease;
}

.anim-slide {
  opacity: 1;
  transform: translateY(12px);
}

.anim-slide.in {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade {
  opacity: 1;
  transform: none;
}

.anim-fade.in {
  opacity: 1;
}

.anim-vanish {
  opacity: 1;
}

.anim-vanish.in {
  opacity: 0.02;
}

/* Respect reduced motion and avoid transform/opacity tricks for users who prefer not to see motion */
@media (prefers-reduced-motion: reduce) {
  .anim-slide, .anim-fade, .anim-vanish {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}

.anim-none {
  opacity: 1;
}

/* make feature/cards more prominent on product pages */
.site.product .card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(120deg, rgb(255 255 255 / 18%), transparent 30%, rgb(255 255 255 / 8%));
  opacity: 0.12;
}

.site.product .card:hover {
  transform: translateY(-3px);
}

.site.product .card.feature-accent {
  border-left-color: var(--accent, #37a1ff);
}

/* specifically emphasize article cards that use reveal/tilt animations when they are active (in) */
.site.product article.card.reveal.tilt.in {
  border-left: 4px solid var(--accent, #37a1ff);
  box-shadow: 0 18px 46px rgb(0 0 0 / 60%);
  transform: none !important;
  z-index: 5;
  background: linear-gradient(180deg, rgb(255 255 255 / 2%), var(--card));
}

.site.product article.card.reveal.tilt.in::after {
  /* stronger sheen for active tilt cards */
  opacity: 0.16;
}

/* Ensure hash navigation doesn't hide the heading behind the fixed header */
.site.product :target { scroll-margin-top: var(--anchor-offset); }

.site.product [id="overview"],
.site.product [id="docs"] { scroll-margin-top: var(--anchor-offset); }

@media (width <=640px) {
  body.template-product { --anchor-offset: 112px; }
}

/* (moved) internal presets link emphasis is now defined globally in external-links.css */
