/*
 * Product detail pages — shared main-heading scale.
 * Includes the opening product identity and every editorial section heading.
 */

.product-detail-page {
  --pbt-product-display-heading-size: clamp(40px, 4vw, 48px);
  --pbt-product-main-heading-size: clamp(40px, 4vw, 48px);
  --pbt-product-support-heading-size: clamp(28px, 3vw, 36px);
}

/* Standard section headings. */
.product-detail-page main section h2:not(.pod-showcase__title),
.product-detail-page main .nook__title,
.product-detail-page main .tp-about-2-section-title,
.product-detail-page .discover-section > .discover-header h2 {
  font-size: var(--pbt-product-main-heading-size) !important;
}

/* Tablet hierarchy: editorial titles stay larger than utility sections. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .product-detail-page {
    --pbt-product-display-heading-size: clamp(40px, 4.35vw, 50px);
    --pbt-product-main-heading-size: clamp(34px, 3.6vw, 42px);
    --pbt-product-support-heading-size: clamp(29px, 3vw, 36px);
  }

  .product-detail-page main section h2.pod-feature__headline,
  .product-detail-page main section h2.pbt-design-range__title,
  .product-detail-page main section h2.pbt-upgrades__title {
    font-size: var(--pbt-product-display-heading-size) !important;
    line-height: 1.05 !important;
  }

  .product-detail-page main .pbt-design-range__bespoke-heading h3 {
    font-size: var(--pbt-product-support-heading-size) !important;
    line-height: 1.1 !important;
  }
}

/* Phones: fluid sizes tuned for 320px through 767px viewports. */
@media (max-width: 767.98px) {
  .product-detail-page {
    --pbt-product-display-heading-size: clamp(30px, 7.4vw, 36px);
    --pbt-product-main-heading-size: clamp(28px, 6.8vw, 34px);
    --pbt-product-support-heading-size: clamp(24px, 5.8vw, 29px);
    --pbt-product-variant-heading-size: clamp(15px, 4vw, 18px);
  }

  /* Opening product identity. */
  body.product-detail-page .pod-showcase .pod-showcase__title {
    font-size: var(--pbt-product-display-heading-size) !important;
    line-height: 1.08 !important;
  }

  body.product-detail-page .pod-showcase .pod-showcase__title-main,
  body.product-detail-page .pod-showcase .pod-showcase__title-sub,
  body.product-detail-page .pod-showcase .pod-brand-main,
  body.product-detail-page .pod-showcase .pod-brand-sub,
  body.product-detail-page .pod-showcase .pod-partner-name {
    font-size: var(--pbt-product-display-heading-size) !important;
    line-height: 1.05 !important;
  }

  body.product-detail-page .pod-showcase .pod-showcase__title-variant,
  body.product-detail-page .pod-showcase .pod-variant {
    font-size: var(--pbt-product-variant-heading-size) !important;
    line-height: 1.1 !important;
  }

  body.product-detail-page .pod-showcase .pod-partner-x,
  body.product-detail-page .pod-showcase .pod-dash {
    font-size: clamp(14px, 3.6vw, 17px) !important;
    line-height: 1.1 !important;
  }

  /* Primary editorial section titles. */
  .product-detail-page main section h2.pod-feature__headline,
  .product-detail-page main section h2.pbt-upgrades__title {
    font-size: var(--pbt-product-display-heading-size) !important;
    line-height: 1.06 !important;
    text-wrap: balance;
  }

  .product-detail-page main section h2.pbt-design-range__title {
    width: 100%;
    max-width: 100%;
    font-size: var(--pbt-product-main-heading-size) !important;
    font-weight: 500 !important;
    line-height: 1.14 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase;
    text-wrap: balance;
  }

  /* Supporting headings inside the size folio. */
  .product-detail-page main .pbt-design-range__bespoke-heading h3 {
    font-size: var(--pbt-product-support-heading-size) !important;
    line-height: 1.1 !important;
    text-wrap: balance;
  }

  .product-detail-page main .pbt-design-range__standard-header h3 {
    font-size: clamp(12px, 3.2vw, 14px) !important;
    line-height: 1.2 !important;
  }

  /* Long uppercase headings need more breathing room on phones. */
  .product-detail-page main .nook__title,
  .product-detail-page main .tp-about-2-section-title {
    line-height: 1.14 !important;
    text-wrap: balance;
  }

  .product-detail-page .discover-section > .discover-header h2 {
    line-height: 1.08 !important;
  }
}

/* Very narrow phones: avoid oversized first-line text at 320–359px. */
@media (max-width: 359.98px) {
  .product-detail-page {
    --pbt-product-display-heading-size: 29px;
    --pbt-product-main-heading-size: 27px;
    --pbt-product-support-heading-size: 23px;
    --pbt-product-variant-heading-size: 15px;
  }
}

/* Product range: retain the editorial title as one desktop line. */
@media (min-width: 1200px) {
  body.product-detail-page main section h2.pbt-design-range__title {
    width: 100%;
    max-width: none;
    white-space: nowrap;
  }
}
