/* vtw-product-specs.css */
/* VendTheWeb Section Library — vendtheweb.com */
/* Version: 1.0.0 */

/* ── Variable resolution ─────────────────────────────── */
.vtw-product-specs {
  --_bg:           var(--vtw-section-bg,     var(--vtw-brand-bg,     #faf9f7));
  --_text:         var(--vtw-section-text,   var(--vtw-brand-text,   #1a1a1a));
  --_accent:       var(--vtw-section-accent, var(--vtw-brand-accent, #5c6b3a));
  --_heading-font: var(--vtw-section-heading-font,
                   var(--vtw-brand-heading-font, Georgia, serif));
  --_body-font:    var(--vtw-section-body-font,
                   var(--vtw-brand-body-font, 'Assistant', Georgia, serif));
  --_padding:      var(--vtw-section-padding,
                   var(--vtw-brand-section-padding, 60px));
  --_radius:       var(--vtw-brand-radius-md, 8px);
  --_max-width:    var(--vtw-brand-container-width, 1280px);
  --_speed:        var(--vtw-brand-speed, 250ms);
  --_border:       var(--vtw-brand-border, #e8e3dc);
  --_surface:      var(--vtw-brand-surface, #f0ede8);

  /* Derived tokens — card shares the warm surface token used by the other
     VTW product-page cards (bundle, comparison, expert note) for one card
     language across the page; the 1px border carries the card when the host
     theme's surface resolves close to the page background.
     Labels a calm step down from body text. */
  --_card-bg: var(--_surface);
  --_muted:   color-mix(in srgb, var(--_text) 62%, var(--_bg));
}

/* ── Base layout ─────────────────────────────────────── */
.vtw-product-specs {
  background-color: var(--_bg);
  color: var(--_text);
  padding-top: var(--_padding);
  padding-bottom: var(--_padding);
}

.vtw-product-specs__inner {
  max-width: var(--_max-width);
  margin-inline: auto;
  padding-inline: clamp(24px, 4vw, 48px);
}

.vtw-product-specs[data-width="full"] .vtw-product-specs__inner {
  max-width: none;
  padding-inline: clamp(24px, 6vw, 80px);
}

/* ── Header ──────────────────────────────────────────── */
.vtw-product-specs__header {
  margin-bottom: 24px;
}

.vtw-product-specs__eyebrow {
  font-family: var(--_body-font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--_accent);
  margin: 0 0 12px;
}

.vtw-product-specs__heading {
  font-family: var(--_heading-font);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.12;
  color: var(--_text);
  margin: 0;
  text-wrap: balance;
}

/* Header alignment cascade — desktop */
.vtw-product-specs[data-text-align="center"] .vtw-product-specs__header { text-align: center; }
.vtw-product-specs[data-text-align="right"]  .vtw-product-specs__header { text-align: right; }

/* ── Spec card ───────────────────────────────────────── */
.vtw-product-specs__card {
  background-color: var(--_card-bg);
  border: 1px solid var(--_border);
  border-radius: var(--_radius);
  margin: 0;
  overflow: hidden;
}

.vtw-product-specs__row {
  display: grid;
  grid-template-columns: var(--_label-col, 200px) 1fr;
  gap: 16px;
  padding: 16px 24px;
  border-top: 1px solid var(--_border);
  font-size: 15px;
  line-height: 1.5;
}

.vtw-product-specs__row:first-child {
  border-top: none;
}

.vtw-product-specs__label {
  font-family: var(--_body-font);
  font-weight: 600;
  color: var(--_muted);
  margin: 0;
}

.vtw-product-specs__value {
  font-family: var(--_body-font);
  color: var(--_text);
  margin: 0;
}

/* Two-column row flow (desktop, opt-in) */
@media (min-width: 1024px) {
  .vtw-product-specs[data-two-col="true"] .vtw-product-specs__card {
    column-count: 2;
    column-gap: 0;
    column-rule: 1px solid var(--_border);
  }

  .vtw-product-specs[data-two-col="true"] .vtw-product-specs__row {
    break-inside: avoid;
  }
}

/* Editor-only empty-state note */
.vtw-product-specs__editor-note {
  font-family: var(--_body-font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--_muted);
  border: 1.5px dashed var(--_accent);
  border-radius: var(--_radius);
  padding: 16px 20px;
  margin: 0;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
  .vtw-product-specs__row {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 12px 18px;
  }

  .vtw-product-specs__label {
    font-size: 13px;
  }

  /* Header alignment cascade — mobile override */
  .vtw-product-specs[data-text-align-mobile="left"]   .vtw-product-specs__header { text-align: left; }
  .vtw-product-specs[data-text-align-mobile="center"] .vtw-product-specs__header { text-align: center; }
  .vtw-product-specs[data-text-align-mobile="right"]  .vtw-product-specs__header { text-align: right; }
}

/* ── Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .vtw-product-specs * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
