/* ========================================================================== 
   Product detail final polish
   Loaded after the base, package, CTA and Catalog-wide enhancement styles so
   product-only media, conversion and fixed-CTA rules have one final owner.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Sample movie / sample conversion
   -------------------------------------------------------------------------- */
.c-product-movie{margin-top:18px}
.c-product-movie__frame{overflow:hidden;width:100%;max-width:720px;aspect-ratio:3/2;margin-inline:auto;border-radius:var(--r8);background:#111;box-shadow:0 8px 24px rgba(30,33,37,.10)}
.c-product-movie__frame iframe{display:block;width:100%;height:100%;aspect-ratio:auto;border:0;background:#111;overflow:hidden}
.c-product-movie-cta{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;max-width:720px;margin:10px auto 0;padding:15px 16px;border-radius:var(--r8);background:var(--accent-soft)}
.c-product-movie-cta__copy{min-width:0}
.c-product-movie-cta__eyebrow{display:block;margin-bottom:2px;color:var(--accent-dark);font-size:9px;font-weight:700}
.c-product-movie-cta__copy strong{display:block;font-size:13px;line-height:1.5}
.c-product-movie-cta__note{display:block;margin-top:3px;color:var(--text-2);font-size:9px}
.c-product-movie-cta__button{min-width:210px}
.c-product-sample-cta{background:var(--accent-soft)}
.c-product-sample-cta .c-btn{min-width:190px}

/* --------------------------------------------------------------------------
   Shared purchase CTA geometry
   -------------------------------------------------------------------------- */
.c-product-article .c-product-hero__actions,
.c-product-article .c-cta-feature .c-cta-dual,
.c-product-article .c-cta-end .c-cta-dual{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
}

.c-product-article .c-product-hero__actions>.c-cta-button,
.c-product-article .c-cta-feature .c-cta-dual>.c-cta-button,
.c-product-article .c-cta-end .c-cta-dual>.c-cta-button{
  display:flex;
  min-width:0;
  flex-direction:column;
  justify-content:flex-end;
}

.c-product-article .c-product-hero__actions .c-btn,
.c-product-article .c-cta-feature .c-cta-dual .c-btn,
.c-product-article .c-cta-end .c-cta-dual .c-btn{
  width:100%;
  min-height:48px;
}

.c-product-article .c-product-hero__actions>.c-cta-button{
  min-height:68px;
}

.c-product-article .c-product-hero__actions .c-microcopy,
.c-product-article .c-cta-feature .c-microcopy,
.c-product-article .c-cta-end .c-microcopy{
  margin:0 0 6px;
  line-height:1.4;
}

.c-product-article .c-cta-end .c-cta-dual{
  max-width:640px;
  margin-inline:auto;
}

.c-product-article .c-cta-choice{
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-items:stretch;
}
.c-product-article .c-cta-choice__item{
  display:flex;
  height:100%;
  min-width:0;
  flex-direction:column;
}
.c-product-article .c-cta-choice__item .c-btn{
  width:100%;
  min-height:44px;
  margin-top:auto;
}

/* Price CTA no longer has a meaningful left column. Do not let its empty
   placeholder become an empty row on small screens. */
.c-product-article .c-cta-price__body{
  display:flex;
  justify-content:flex-end;
  gap:0;
}
.c-product-article .c-cta-price__body>div:empty{
  display:none;
}
.c-product-article .c-cta-price__body>.c-cta-button{
  width:min(280px,100%);
}
.c-product-article .c-cta-price__body .c-btn{
  width:100%;
  min-height:44px;
}

/* --------------------------------------------------------------------------
   Catalog product hero
   -------------------------------------------------------------------------- */
.c-product-article .c-product-hero{
  grid-template-columns:minmax(220px,260px) minmax(0,1fr);
  gap:28px;
  align-items:start;
  padding-bottom:28px;
}

.c-product-article .c-product-hero__media,
.c-product-article .c-product-hero__body{
  min-width:0;
}

.c-product-article .c-product-hero__body{
  display:grid;
  grid-template-columns:minmax(0,1fr);
}
.c-product-article .c-product-hero__rating{order:-3}
.c-product-article .c-product-hero__body>.c-campaign-info{order:-2;margin:8px 0 0}
.c-product-article .c-product-hero__body>.c-price{order:-1;justify-self:start;margin-top:7px}

.c-product-article .c-product-facts{
  margin-top:16px;
}

.c-product-article .c-trust-note{
  margin-top:10px;
}

/* --------------------------------------------------------------------------
   Product article headings / vertical rhythm
   -------------------------------------------------------------------------- */
.c-product-article .c-product-toc{
  margin-top:24px;
}

.c-product-article .c-product-section{
  margin-top:42px;
  scroll-margin-top:88px;
}

.c-product-article .c-product-section>h2{
  position:relative;
  margin:0 0 18px!important;
  padding:0 0 12px;
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  background:transparent;
  font-size:18px;
  line-height:1.55;
  letter-spacing:.01em;
}

.c-product-article .c-product-section>h2:after{
  content:"";
  position:absolute;
  left:0;
  bottom:-1px;
  width:40px;
  height:3px;
  border-radius:var(--r4);
  background:var(--accent);
}

.c-product-article .c-product-section>h3{
  margin:28px 0 13px;
  padding-left:11px;
  border-left:3px solid var(--accent);
  font-size:15px;
  line-height:1.55;
}

.c-product-article .c-product-section__lead{
  margin-bottom:18px;
}

/* Generic article h3 styling must not leak into reusable product/CTA cards. */
.c-product-article .c-product-card__title,
.c-product-article .c-product-horizontal__title,
.c-product-article .c-product-compact__title,
.c-product-article .c-ranking-item h3,
.c-product-article .c-cta-feature__title,
.c-product-article .c-cta-price__head h3,
.c-product-article .c-cta-end h3{
  padding-left:0;
  border-left:0;
  background:transparent;
}

.c-product-article .c-product-card__title{
  margin:8px 0 4px;
  font-size:12px;
  line-height:1.55;
}
.c-product-article .c-product-horizontal__title{
  margin:4px 0;
  font-size:14px;
  line-height:1.55;
}
.c-product-article .c-product-compact__title{
  margin:0 0 3px;
  font-size:11px;
  line-height:1.5;
}
.c-product-article .c-ranking-item h3{
  margin:0 0 3px;
  font-size:12px;
  line-height:1.5;
}
.c-product-article .c-cta-feature__title{
  margin:6px 0 4px;
  font-size:14px;
}
.c-product-article .c-cta-price__head h3{
  margin:0;
  font-size:13px;
}
.c-product-article .c-cta-end h3{
  margin:0 0 6px;
  font-size:15px;
}

/* Related cards share one baseline even when titles / ratings differ. */
.c-product-article .c-product-grid{
  align-items:stretch;
}
.c-product-article .c-product-grid>.c-product-card{
  display:flex;
  height:100%;
  min-width:0;
  flex-direction:column;
}
.c-product-article .c-product-grid>.c-product-card .c-product-card__foot{
  margin-top:auto;
  padding-top:8px;
}
.c-product-article .c-product-card__actions .c-btn{
  min-height:38px;
}

/* --------------------------------------------------------------------------
   Fixed purchase CTA
   Never participates in document flow; only opacity/transform changes.
   -------------------------------------------------------------------------- */
.has-js .c-fixed-cta[data-smart-fixed-cta]{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate3d(-50%,12px,0);
  transition:opacity .18s ease,transform .18s ease,visibility 0s linear .18s;
  will-change:opacity,transform;
}

.has-js .c-fixed-cta[data-smart-fixed-cta].is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translate3d(-50%,0,0);
  transition-delay:0s;
}

.c-fixed-cta__copy{
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
}
.c-fixed-cta__copy strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.c-fixed-cta__actions{
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:clamp(132px,11vw,152px);
  gap:7px;
  flex:0 0 auto;
  align-items:stretch;
}
.c-fixed-cta__button{
  width:100%;
  height:40px;
  min-height:40px;
  padding:8px 12px;
  white-space:nowrap;
}
.c-fixed-cta__campaign{padding:1px 5px;border-radius:var(--r40);background:#f3e9fa;color:#7b3ba6;font-weight:700}
.c-fixed-cta__discount{color:var(--red);font-weight:700}

/* --------------------------------------------------------------------------
   Tablet / phone
   -------------------------------------------------------------------------- */
@media(max-width:720px){
  .c-product-movie-cta{grid-template-columns:1fr;gap:10px;padding:14px}
  .c-product-movie-cta__button{width:100%;min-width:0}
  .c-product-sample-cta{grid-template-columns:1fr;gap:10px;padding:14px}
  .c-product-sample-cta .c-btn{width:100%;min-width:0}

  .c-product-article .c-product-hero{
    grid-template-columns:minmax(150px,190px) minmax(0,1fr);
    gap:16px;
    padding-bottom:22px;
  }

  .c-product-article .c-product-hero__actions,
  .c-product-article .c-cta-feature .c-cta-dual,
  .c-product-article .c-cta-end .c-cta-dual,
  .c-product-article .c-cta-choice{
    grid-template-columns:1fr;
    gap:9px;
  }

  .c-product-article .c-product-hero__actions{
    grid-column:1/-1;
    margin-top:14px;
  }

  .c-product-article .c-product-hero__actions>.c-cta-button{
    min-height:0;
  }

  .c-product-article .c-product-hero__actions .c-btn,
  .c-product-article .c-cta-feature .c-cta-dual .c-btn,
  .c-product-article .c-cta-end .c-cta-dual .c-btn{
    min-height:46px;
  }

  .c-product-article .c-cta-price__body>.c-cta-button{
    width:100%;
  }

  .c-product-article .c-product-section{
    margin-top:32px;
    scroll-margin-top:72px;
  }

  .c-product-article .c-product-section>h2{
    margin-bottom:15px!important;
    padding-bottom:10px;
    font-size:16px;
  }

  .c-product-article .c-product-section>h2:after{
    width:34px;
    height:3px;
  }

  .c-product-article .c-product-section>h3{
    margin:23px 0 11px;
    font-size:14px;
  }

  .c-product-article .c-product-toc{
    margin-top:20px;
  }

  .c-fixed-cta{
    bottom:max(8px,env(safe-area-inset-bottom));
    width:calc(100% - 16px);
    max-width:520px;
    min-height:58px;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px;
    padding:7px 7px 7px 10px;
    border-radius:10px;
    box-shadow:0 6px 24px rgba(24,28,33,.18);
  }

  .c-fixed-cta__copy strong{
    max-width:100%;
    font-size:10px;
  }
  .c-fixed-cta__meta{
    min-width:0;
    font-size:9px;
    line-height:1.45;
  }
  .c-fixed-cta__actions{
    display:block;
    width:auto;
  }
  .c-fixed-cta__sample{
    display:none!important;
  }
  .c-fixed-cta__primary{
    width:clamp(150px,42vw,180px);
    height:44px;
    min-height:44px;
    padding-inline:12px;
    font-size:10px;
  }
}

@media(max-width:520px){
  .c-product-article .c-product-hero{
    grid-template-columns:1fr;
  }
  .c-product-article .c-product-hero__media{
    width:100%;
  }
}

@media(max-width:420px){
  .c-product-article .c-product-section{
    margin-top:29px;
  }
  .c-product-article .c-product-section>h2{
    font-size:15px;
  }

  .c-fixed-cta__copy strong{
    display:none;
  }
  .c-fixed-cta__copy{
    overflow:hidden;
  }
  .c-fixed-cta__meta{
    margin-top:0;
    overflow:hidden;
    flex-wrap:nowrap;
    white-space:nowrap;
  }
  .c-fixed-cta__meta>*{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .c-fixed-cta__primary{
    width:clamp(148px,48vw,168px);
    min-width:0;
  }
}

@media(prefers-reduced-motion:reduce){
  .has-js .c-fixed-cta[data-smart-fixed-cta]{
    transition:none;
  }
}
