/* Product hero — views/sections/product_hero.php. Full bleed: the view prints its own containers.
   split: gallery + sticky buy box (gallery edge to edge on phones); fullscreen: image/video under an
   overlay with a centred buy card; centered: centred buy box above a wide gallery. The optional buy box
   extras (pill, callout, highlights, reassurance, selected-option card, stacked buttons) only add rules
   for their own classes and the --detailed / --buttons-stacked modifiers, so a hero without them is
   unchanged. */

.pd-hero {
  position: relative;
}

.pd-hero__head {
  display: grid;
  gap: 0.7rem;
}

.pd-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.pd-hero__category {
  color: var(--color-accent-text);
  font-size: var(--step--1);
  font-weight: 650;
  text-decoration: none;
}

.pd-hero__category:hover {
  text-decoration: underline;
}

.pd-hero__badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.pd-hero__title {
  max-width: 24ch;
  font-size: var(--step-4);
  line-height: 1.04;
}

.pd-hero__rating {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  width: fit-content;
  color: inherit;
  text-decoration: none;
}

.pd-hero__rating-link {
  color: var(--color-text-muted);
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a.pd-hero__rating:hover .pd-hero__rating-link {
  color: var(--color-text);
}

.pd-hero__lead {
  max-width: 60ch;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.pd-hero__panel {
  display: grid;
  gap: 1.35rem;
  min-width: 0;
}

.pd-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--step--1);
  line-height: 1.35;
}

.pd-hero__trust li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.pd-hero__trust .icon {
  color: var(--color-text);
}

.pd-hero__sku {
  color: var(--color-text-muted);
  font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}

/* --- buy box extras (each off until set): pill, callout, highlights, reassurance, selected-option card,
   stacked buttons. Hairlines part the pill, the price and the reassurance like the reference store. --- */
.pd-hero__pill {
  justify-self: stretch;
  margin-bottom: 0.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
}

.pd-hero__pill-label {
  display: inline-block;
  max-width: 100%;
  padding: 0.35rem 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

.pd-hero__callout {
  justify-self: center;
  max-width: 100%;
  margin-bottom: 0.3rem;
  padding: 0.3rem 0.85rem;
  border: 1.5px solid var(--color-accent);
  border-radius: var(--radius-xs);
  color: var(--color-accent-text);
  font-size: clamp(0.8125rem, 0.76rem + 0.25vw, 0.9375rem);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
}

.pd-hero__highlights {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.4rem;
  font-size: var(--step-0);
  line-height: 1.4;
}

.pd-hero__highlights li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.pd-hero__highlights .icon {
  width: 1.15em;
  height: 1.15em;
  margin-top: 0.12em;
  color: var(--color-text);
}

.pd-hero__assurance {
  display: grid;
  justify-items: start;
  justify-self: stretch;
  padding-block: 1.1rem;
  border-block: 1px solid var(--color-border);
}

.pd-hero__assurance-box {
  display: grid;
  gap: 0.15rem;
  max-width: 100%;
  padding: 0.6rem 1.25rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--color-success) 40%, var(--color-success-soft));
  border-radius: var(--radius-xl);
  background: var(--color-success-soft);
  color: var(--color-text);
  line-height: 1.35;
}

.pd-hero__assurance-title {
  font-size: 0.9375rem;
  font-weight: 700;
}

.pd-hero__assurance-text {
  font-size: var(--step--1);
}

/* "Selected option" card: looks like a chosen radio row, but it is only a summary (no control, no role). */
.pd-hero__offer {
  container: pd-offer / inline-size;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
  text-align: left;
}

.pd-hero__offer-mark {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: inset 0 0 0 2.5px var(--color-surface-2);
}

.pd-hero__offer-media {
  flex: none;
  width: 2.75rem;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
}

.pd-hero__offer-media :is(picture, img) {
  width: 100%;
  height: 100%;
}

.pd-hero__offer-media img {
  object-fit: cover;
}

.pd-hero__offer-body {
  display: grid;
  flex: 1;
  justify-items: start;
  gap: 0.25rem;
  min-width: 0;
}

.pd-hero__offer-title {
  font-weight: 700;
  line-height: 1.25;
}

.pd-hero__offer-tag {
  padding: 0.2rem 0.45rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-xs);
  font-size: 0.6875rem;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}

.pd-hero__offer-note {
  color: var(--color-text-muted);
  font-size: var(--step--1);
  line-height: 1.35;
}

.pd-hero__offer-price {
  flex: none;
  font-family: var(--font-heading);
  font-size: var(--step-1);
  font-stretch: var(--heading-stretch);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (min-width: 480px) {
  .pd-hero__offer {
    gap: 0.9rem;
    padding: 0.95rem 1.15rem;
  }

  .pd-hero__offer-media {
    width: 3.5rem;
  }
}

/* A narrow card (small phones, the full-screen card) drops the decorative thumbnail for the text. */
@container pd-offer (max-width: 19.5rem) {
  .pd-hero__offer-media {
    display: none;
  }
}

/* Stacked buttons: Add to cart as a soft full-width button, Buy now solid under it (the view asks the buy
   box for Add to cart first). One button alone keeps the solid look; the in-cart stepper takes a full row. */
.pd-hero--buttons-stacked .pd-buy__actions {
  gap: 0.6rem;
}

.pd-hero--buttons-stacked .pd-buy__actions > :is(.pd-buy__btn, .buy-stepper) {
  flex: 1 1 100%;
}

.pd-hero--buttons-stacked .pd-buy__btn {
  min-height: 50px;
  padding-block: 0.55em;
}

.pd-hero--buttons-stacked .pd-buy:not(.pd-buy--single) .pd-buy__btn--cart {
  --btn-bg: color-mix(in srgb, var(--color-primary) 7%, var(--color-surface-2));
  --btn-fg: var(--color-primary);
  --btn-border: transparent;
  --btn-bg-hover: color-mix(in srgb, var(--color-primary) 13%, var(--color-surface-2));
  --btn-fg-hover: var(--color-primary);
  --btn-border-hover: transparent;
}

.pd-hero--buttons-stacked .pd-buy__btn--buy-now {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--color-primary-contrast);
  --btn-border: transparent;
  --btn-bg-hover: var(--color-primary-hover);
  --btn-fg-hover: var(--color-primary-contrast);
  --btn-border-hover: transparent;
}

.pd-hero--buttons-stacked .buy-stepper--lg .buy-stepper__qty {
  height: 50px;
}

.pd-hero--buttons-stacked .buy-stepper--lg .buy-stepper__checkout {
  min-height: 50px;
}

/* --- split ------------------------------------------------------------------------------------------- */
.pd-hero--split .pd-hero__inner {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2.5vw, 4rem);
}

/* With a pill, callout or highlights the name steps down to a compact, medium-weight heading (never heavier
   than the theme's headings) and the price follows. */
.pd-hero--split.pd-hero--detailed .pd-hero__title {
  max-width: none;
  font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.125rem);
  font-weight: min(600, var(--heading-weight));
  font-stretch: var(--heading-stretch);
  letter-spacing: var(--heading-tracking);
  line-height: 1.12;
}

.pd-hero--split.pd-hero--detailed .pd-price .price--lg {
  --price-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem);
}

@media (max-width: 767.98px) {
  .pd-hero--split .pd-hero__media {
    margin-inline: calc(-1 * var(--gutter));
  }

  .pd-hero--split .pd-gallery__viewport {
    border-radius: 0;
  }
}

@media (min-width: 1024px) {
  .pd-hero--split .pd-hero__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: start;
  }

  .pd-hero--media-right .pd-hero__media {
    order: 2;
  }

  .pd-hero--split .pd-hero__panel.is-sticky {
    position: sticky;
    top: calc(var(--header-h-compact) + 1.5rem);
  }

  /* The detailed buy box pairs with larger thumbnails under the image. */
  .pd-hero--split.pd-hero--detailed .pd-gallery--thumbs-below .pd-gallery__thumb {
    width: 6.5rem;
  }
}

/* --- fullscreen -------------------------------------------------------------------------------------- */
.rr-section--product_hero:has(> .pd-hero--fullscreen) {
  padding-block: 0;
}

.pd-hero--fullscreen {
  display: grid;
  align-items: end;
  min-height: min(92vh, 980px);
  min-height: min(92svh, 980px);
  overflow: hidden;
  isolation: isolate;
  background: var(--color-dark);
  color: #FFFFFF;
}

.pd-hero--h-large {
  min-height: min(76vh, 820px);
  min-height: min(76svh, 820px);
}

.pd-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.pd-hero__bg :is(picture, img, video) {
  width: 100%;
  height: 100%;
}

.pd-hero__bg :is(img, video) {
  object-fit: cover;
}

.pd-hero__video {
  position: absolute;
  inset: 0;
}

/* Overlay strength from the section (--pd-overlay), plus a bottom gradient so the card always reads. */
.pd-hero__bg::before,
.pd-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pd-hero__bg::before {
  background: #14151A;
  opacity: var(--pd-overlay, 0.45);
}

.pd-hero__bg::after {
  background: linear-gradient(to top, rgba(20, 21, 26, .6), rgba(20, 21, 26, 0) 55%);
}

.pd-hero--fullscreen .pd-hero__inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  padding-block: clamp(5rem, 3rem + 8vw, 9rem) clamp(1.5rem, 1rem + 2vw, 3rem);
  text-align: center;
}

.pd-hero--fullscreen .pd-hero__head {
  justify-items: center;
}

.pd-hero--fullscreen .pd-hero__meta {
  justify-content: center;
}

.pd-hero--fullscreen .pd-hero__title {
  max-width: 16ch;
  font-size: var(--step-6);
  text-wrap: balance;
}

.pd-hero--fullscreen .pd-hero__category,
.pd-hero--fullscreen .pd-hero__rating-link,
.pd-hero--fullscreen .pd-hero__head .rating {
  color: rgba(255, 255, 255, .85);
}

.pd-hero--fullscreen .pd-hero__head .rating__value,
.pd-hero--fullscreen a.pd-hero__rating:hover .pd-hero__rating-link {
  color: #FFFFFF;
}

.pd-hero__lead--over {
  max-width: 52ch;
  color: rgba(255, 255, 255, .86);
  font-size: var(--step-1);
}

/* Over the image the pill turns glassy and loses its hairline; the highlights go light. */
.pd-hero--fullscreen .pd-hero__pill {
  justify-self: auto;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
  text-align: inherit;
}

.pd-hero--fullscreen .pd-hero__pill-label {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .12);
  color: #FFFFFF;
  backdrop-filter: blur(6px);
}

.pd-hero--fullscreen .pd-hero__highlights {
  color: rgba(255, 255, 255, .9);
  text-align: left;
}

.pd-hero--fullscreen .pd-hero__highlights .icon {
  color: #FFFFFF;
}

.pd-hero__watch {
  --btn-fg: #FFFFFF;
  --btn-border: rgba(255, 255, 255, .5);
  --btn-border-hover: #FFFFFF;
  --btn-bg-hover: rgba(255, 255, 255, .08);
  --btn-fg-hover: #FFFFFF;
}

.pd-hero__card {
  display: grid;
  gap: 1.15rem;
  width: min(100%, 31rem);
  margin-top: clamp(0.5rem, 0.2rem + 1.5vw, 1.5rem);
  padding: clamp(1.1rem, 0.8rem + 1.2vw, 1.75rem);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.pd-hero__card .pd-hero__trust {
  justify-content: center;
}

.pd-hero__pause {
  position: absolute;
  right: var(--gutter);
  bottom: 1rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(20, 21, 26, .55);
  color: #FFFFFF;
  backdrop-filter: blur(6px);
}

.pd-hero__pause:hover {
  background: rgba(20, 21, 26, .75);
}

.pd-hero__pause:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

@media (min-width: 1024px) {
  .pd-hero--fullscreen .pd-hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 28rem);
    align-items: end;
    justify-items: start;
    column-gap: clamp(2rem, 1rem + 3vw, 5rem);
    text-align: left;
  }

  .pd-hero--fullscreen .pd-hero__inner > :not(.pd-hero__card) {
    grid-column: 1;
  }

  .pd-hero--fullscreen .pd-hero__head {
    justify-items: start;
  }

  .pd-hero--fullscreen .pd-hero__meta {
    justify-content: flex-start;
  }

  .pd-hero--fullscreen .pd-hero__card {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: end;
    width: 100%;
    margin-top: 0;
  }

  .pd-hero--fullscreen .pd-hero__card .pd-hero__trust {
    justify-content: flex-start;
  }
}

/* Film viewer opened by "Watch the video". */
.pd-hero__film {
  aspect-ratio: 16 / 9;
  background: #000000;
}

.pd-hero__film iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.pd-hero__film-dialog .modal__body {
  padding: 0;
  background: #000000;
}

/* --- centered ---------------------------------------------------------------------------------------- */
.pd-hero--centered .pd-hero__inner {
  display: grid;
  gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.pd-hero--centered .pd-hero__panel {
  justify-items: center;
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  text-align: center;
}

.pd-hero--centered .pd-hero__head {
  justify-items: center;
}

.pd-hero--centered .pd-hero__title {
  max-width: 20ch;
  font-size: var(--step-5);
}

.pd-hero--centered .pd-hero__meta,
.pd-hero--centered .pd-hero__trust {
  justify-content: center;
}

.pd-hero--centered .pd-hero__lead {
  margin-inline: auto;
}

.pd-hero--centered .pd-pricing {
  justify-items: center;
}

.pd-hero--centered .pd-pricing__row {
  justify-content: center;
}

.pd-hero--centered .pd-buy {
  width: min(100%, 30rem);
}

.pd-hero--centered .pd-hero__trust {
  width: 100%;
}

.pd-hero--centered .pd-hero__highlights {
  text-align: left;
}

.pd-hero--centered .pd-hero__assurance {
  justify-items: center;
}

.pd-hero--centered .pd-hero__offer {
  width: min(100%, 30rem);
}
