/* Public product page styles */

.back-link {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: var(--ls-wide);
  margin-bottom: var(--space-5);
}
.back-link:hover { color: var(--text-body); }

/* Breadcrumb (visible) */
.breadcrumb {
  margin-bottom: var(--space-5);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: var(--ls-wide);
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: var(--space-2);
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}
.breadcrumb a:hover { color: var(--text-body); text-decoration: underline; }
.breadcrumb [aria-current="page"] {
  color: var(--text-body);
  font-weight: var(--fw-semibold);
}

/* Related datasets section */
.related-datasets {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.related-datasets h2 {
  margin: 0 0 var(--space-5);
  font-size: var(--fs-h3);
  color: var(--text-heading);
}

/* Datasets FAQ */
.datasets-faq {
  margin-top: var(--space-9);
  padding-top: var(--space-7);
  border-top: 1px solid var(--border-subtle);
  max-width: 820px;
}
.datasets-faq h2 {
  margin: var(--space-2) 0 var(--space-5);
  font-size: var(--fs-h2);
  color: var(--text-heading);
  letter-spacing: -0.01em;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: var(--space-4) var(--space-5);
  transition: border-color 0.15s ease;
}
.faq-item[open] {
  border-color: var(--accent);
}
.faq-item summary {
  cursor: pointer;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  font-size: var(--fs-body);
  list-style: none;
  position: relative;
  padding-right: var(--space-6);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-bright);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: var(--space-3) 0 0;
  color: var(--text-body);
  line-height: 1.7;
}
.faq-cta {
  margin-top: var(--space-5);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.faq-cta a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}


.product-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-4) var(--space-5);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin: var(--space-6) 0;
}

.product-meta > span {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-body);
  line-height: 1.5;
  min-width: 0;
}

.product-meta__wide {
  grid-column: span 2;
}

@media (max-width: 720px) {
  .product-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-meta__wide { grid-column: span 2; }
}

@media (max-width: 420px) {
  .product-meta { grid-template-columns: 1fr; }
  .product-meta__wide { grid-column: span 1; }
}

.product-meta strong {
  display: block;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-1);
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin: 0 0 var(--space-7);
  padding: var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.product-cta .product-price strong { display: block; margin-top: var(--space-1); color: var(--text-heading); }
.product-cta > div:last-child { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.product-samples {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.sample-list {
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sample-list li {
  padding: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}

.sample-list li strong { display: block; color: var(--text-heading); }
.sample-list li p { margin: var(--space-2) 0; color: var(--text-body); }
.sample-meta { font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: var(--ls-wide); }

/* Description container — subtle visual frame so AI-generated HTML
   feels like part of the page rather than a free-floating block. */
.product-description {
  margin: var(--space-7) 0;
  padding: var(--space-6) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.product-description > *:first-child { margin-top: 0; }
.product-description > *:last-child { margin-bottom: 0; }

.product-description h2 {
  font-size: var(--fs-h3);
  letter-spacing: var(--ls-tight);
  position: relative;
  padding-bottom: var(--space-2);
  margin-top: var(--space-7);
}

.product-description h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--accent-bright, var(--accent));
}

.product-description ul,
.product-description ol {
  padding-left: var(--space-5);
}

.product-description hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-6) 0;
}

.product-description blockquote {
  font-size: 1rem;
  background: var(--bg-card);
}

/* Bottom CTA block — always rendered below the description. */
.product-bottom-cta {
  margin-top: var(--space-7);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.product-bottom-cta h3 {
  margin: 0 0 var(--space-2);
  color: var(--text-heading);
  font-size: var(--fs-h4);
}

.product-bottom-cta p {
  margin: 0;
  color: var(--text-body);
  max-width: 52ch;
}

.product-bottom-cta__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .product-bottom-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Inline sample request section */
.sample-request-section {
  margin-top: var(--space-7);
  padding: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}

.sample-request-section__head {
  margin-bottom: var(--space-5);
}

.sample-request-section__head h2 {
  margin: var(--space-2) 0 var(--space-2);
  font-size: var(--fs-h3);
  color: var(--text-heading);
}

.sample-request-section__head p {
  margin: 0;
  color: var(--text-body);
  max-width: 60ch;
}

.sample-request-section__head a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sample-request-form .form-field { margin-bottom: var(--space-3); }
.sample-request-form .form-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-4);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
@media (max-width: 720px) {
  .sample-grid { grid-template-columns: 1fr; }
}

.sample-step--done {
  background: rgba(56, 182, 255, 0.08);
  border: 1px solid var(--accent);
  padding: var(--space-5);
  border-radius: 6px;
}
.sample-step--done h3 {
  color: var(--text-heading);
}
.sample-step--done a {
  color: var(--accent-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.product-categories .label {
  display: inline-block;
}

/* ───────────────────────────────────────────────────────────────
   Marketplace-style product page (datarade-inspired)
   ─────────────────────────────────────────────────────────────── */

.product-page {
  padding-bottom: var(--space-9);
}
.product-page__grid {
  max-width: 1200px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--space-7);
  align-items: start;
}
@media (max-width: 960px) {
  .product-page__grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
}

.product-page__main { min-width: 0; }
.product-page__sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
@media (max-width: 960px) {
  .product-page__sidebar { position: static; }
}

.product-page__header {
  margin-bottom: var(--space-6);
}
.product-page__title {
  margin: var(--space-2) 0 var(--space-3);
  line-height: 1.15;
}
.product-page__lead {
  max-width: 720px;
  margin: 0 0 var(--space-4);
}
.product-page__cover {
  margin: var(--space-5) 0 var(--space-6);
}
.product-page__cover img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

/* Fact tiles row ----------------------------------------------------- */
.product-fact-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-3);
  margin: 0 0 var(--space-6);
}
.product-fact-tile {
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-deep);
}
.product-fact-tile__label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-1);
}
.product-fact-tile__value {
  font-size: 1.5rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  line-height: 1.15;
  margin-bottom: 2px;
}
.product-fact-tile__sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section blocks ----------------------------------------------------- */
.product-block {
  margin: 0 0 var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.product-block:last-child { border-bottom: 0; }
.product-block__title {
  margin: 0 0 var(--space-3);
  font-size: 1.25rem;
}

/* Country coverage --------------------------------------------------- */
.product-country-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.product-country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-deep);
  font-size: 0.9rem;
}
.product-country__flag {
  font-size: 1.05rem;
  line-height: 1;
}
.product-country__code {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 1px 6px;
  background: var(--bg-base);
  border-radius: 4px;
  margin-left: 2px;
}

/* Per-language volume table ----------------------------------------- */
.product-volume-table {
  width: 100%;
  border-collapse: collapse;
}
.product-volume-table tr {
  border-bottom: 1px solid var(--border-subtle);
}
.product-volume-table tr:last-child { border-bottom: 0; }
.product-volume-table td {
  padding: 10px 0;
  font-size: 0.95rem;
}
.product-volume-table__hours {
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  width: 90px;
}

/* Self-reported quality bar ----------------------------------------- */
.product-quality-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.product-quality-hint strong { color: var(--text-body); font-weight: 500; }
.product-quality-bar {
  background: var(--bg-deep);
  border-radius: 999px;
  height: 22px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.product-quality-bar__fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: var(--text-on-accent, #fff);
  font-size: 0.8rem;
  font-weight: var(--fw-semibold);
}
.product-quality-metric {
  margin-top: var(--space-2);
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Chip groups -------------------------------------------------------- */
.product-chip-group {
  margin: 0 0 var(--space-3);
}
.product-chip-group__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.product-chip-group__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.product-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-deep);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-body);
}
.product-chip--blue {
  background: rgba(56, 182, 255, 0.08);
  border-color: rgba(56, 182, 255, 0.25);
  color: var(--accent-bright);
}
.product-chip--green {
  background: rgba(36, 188, 148, 0.1);
  border-color: rgba(36, 188, 148, 0.3);
  color: #1e9d7a;
}

/* FAQ ---------------------------------------------------------------- */
.product-faq__item {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) 0;
}
.product-faq__item:first-of-type { border-top: 1px solid var(--border-subtle); }
.product-faq__item summary {
  cursor: pointer;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.product-faq__item summary::-webkit-details-marker { display: none; }
.product-faq__item summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 0;
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform 0.15s ease;
}
.product-faq__item[open] summary::after {
  content: '−';
}
.product-faq__answer {
  margin-top: var(--space-2);
  color: var(--text-body);
  line-height: 1.55;
}

/* Sticky sidebar cards ---------------------------------------------- */
.product-sidebar__card {
  background: var(--bg-card, var(--bg-deep));
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: var(--space-5);
}
.product-sidebar__card--pricing {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.product-sidebar__price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.product-sidebar__price-amount {
  font-size: 1.8rem;
  font-weight: var(--fw-bold);
  color: var(--text-heading);
  line-height: 1;
}
.product-sidebar__price-unit {
  font-size: 0.95rem;
  color: var(--text-muted);
}
.product-sidebar__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-sidebar__rows li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.9rem;
}
.product-sidebar__rows span { color: var(--text-muted); }
.product-sidebar__rows strong { color: var(--text-heading); font-weight: 500; }
.product-sidebar__cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--space-2);
}
.product-sidebar__cta .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}
.product-sidebar__note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}
.product-sidebar__heading {
  font-size: 0.95rem;
  font-weight: var(--fw-semibold);
  color: var(--text-heading);
  margin: 0 0 var(--space-3);
  letter-spacing: -0.005em;
}
.product-sidebar__steps {
  list-style: none;
  counter-reset: sidebar-step;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.product-sidebar__steps li {
  counter-increment: sidebar-step;
  position: relative;
  padding-left: 32px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.product-sidebar__steps li::before {
  content: counter(sidebar-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.product-sidebar__steps strong {
  display: block;
  color: var(--text-heading);
  font-weight: var(--fw-semibold);
}
.product-sidebar__steps span {
  display: block;
  margin-top: 2px;
}
.product-sidebar__bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.product-sidebar__bullets li {
  position: relative;
  padding-left: 22px;
}
.product-sidebar__bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-bright);
}
