/* Product presentation geometry. All visual inputs come from the theme. */
.eth-product-main {
    --eth-product-sticky-offset: 0px;
    --eth-product-media-fit: contain;
    --eth-product-column-gap: var(--eth-space-l);
}
.eth-product-main .eth-product-hero {
    overflow: clip;
    padding-block: var(--eth-component-pad-l) var(--eth-space-l);
}
.eth-product-main .eth-product-breadcrumb { margin-bottom: var(--eth-component-pad-l); }
.eth-product-main .eth-product-hero__grid {
    display: grid; grid-template-columns: minmax(0,.88fr) minmax(0,1.12fr);
    gap: var(--eth-product-column-gap); align-items: start;
}
.eth-product-main .eth-product-hero__grid.eth-product-hero__grid--no-media { grid-template-columns: minmax(0,1fr); }
.eth-product-main .eth-product-hero__grid--no-media .eth-product-info { max-width: var(--eth-content-measure); }
.eth-product-main .eth-product-hero__media {
    min-width: 0; width: 100%; max-width: calc(var(--eth-container) * .42);
    position: static; align-self: start; padding: 0;
}
.eth-product-main .eth-product-hero__media.is-product-media-sticky {
    position: sticky;
    /* Tall galleries scroll until their bottom fits, then remain in view.
       The grid still releases the gallery at the end of the Hero. */
    top: min(calc(var(--eth-product-sticky-offset) + var(--eth-component-gap)), calc(100dvh - var(--eth-product-media-block-size, 0px) - var(--eth-component-gap)));
}
.eth-product-main .eth-product-slider {
    position: relative; width: 100%; aspect-ratio: 1; overflow: hidden;
    background: var(--eth-bg-surface); border: 1px solid var(--eth-border);
    border-radius: var(--eth-radius-m); box-shadow: none; isolation: isolate;
}
.eth-product-main .eth-product-hero--fit-cover { --eth-product-media-fit: cover; }
.eth-product-main .eth-product-slider .eth-product-slider__slide { position: absolute; inset: 0; }
.eth-product-main .eth-product-slider .eth-product-slider__slide img {
    display: block; width: 100%; height: 100%; object-fit: var(--eth-product-media-fit);
}
.eth-product-main .eth-product-slider__slide--video :is(.eth-product-slider__video,.wp-video,iframe,video) {
    width: 100% !important; max-width: 100% !important;
    height: 100% !important; max-height: none; aspect-ratio: auto;
}
.eth-product-main .eth-product-slider.eth-carousel {
    --eth-carousel-control-bg: var(--eth-bg-surface);
    --eth-carousel-control-border: var(--eth-border);
    --eth-carousel-control-shadow: var(--eth-shadow-s);
}
.eth-product-main .eth-product-slider .eth-carousel__pagination { background: var(--eth-bg-surface); border-color: var(--eth-border); box-shadow: var(--eth-shadow-s); }
.eth-product-main .eth-product-slider__zoom { background: var(--eth-bg-surface); color: var(--eth-text-title); border-color: var(--eth-border); box-shadow: var(--eth-shadow-s); }
.eth-product-main .eth-product-slider__zoom:is(:hover,:focus-visible) { background: var(--eth-bg-muted); opacity: 1; transform: none; }
.eth-product-main .eth-product-thumbs {
    display: grid; grid-auto-flow: column; grid-auto-columns: calc(var(--eth-component-pad-l) * 2);
    gap: var(--eth-space-2xs); margin-top: var(--eth-space-2xs);
    padding: var(--eth-space-3xs); overflow-x: auto; overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
}
.eth-product-main .eth-product-thumbs__item {
    width: 100%; height: auto; aspect-ratio: 1; padding: 0;
    display: grid; place-items: center; cursor: pointer;
    border: 1px solid var(--eth-border); border-radius: var(--eth-radius-s);
    background: var(--eth-bg-surface); opacity: .75; scroll-snap-align: start;
    transition: opacity var(--eth-transition-s),border-color var(--eth-transition-s);
}
.eth-product-main .eth-product-thumbs__item img { width: 100%; height: 100%; object-fit: var(--eth-product-media-fit); }
.eth-product-main .eth-product-thumbs__item:is(:hover,.is-active) { opacity: 1; border-color: var(--eth-primary); transform: none; }
.eth-product-main .eth-product-info { display: flex; flex-direction: column; min-width: 0; gap: var(--eth-space-2xs); container: eth-product-info / inline-size; }
.eth-product-main .eth-product-info__eyebrow {
    display: flex; flex-wrap: wrap; align-items: baseline; align-self: flex-start;
    gap: var(--eth-space-3xs); padding: 0; border: 0; background: transparent; border-radius: 0;
    color: var(--eth-link); font-size: calc(var(--eth-card-title-s) * .75);
    font-weight: var(--eth-fw-semibold); letter-spacing: .08em; line-height: var(--eth-lh-body); text-transform: uppercase;
}
.eth-product-main .eth-product-info__eyebrow a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.eth-product-main .eth-product-info__eyebrow span::before { content: '/'; color: var(--eth-text-muted); }
.eth-product-main .eth-product-info__title {
    margin: 0; font-size: calc(var(--eth-fs-h1) * var(--eth-template-title-scale,.8));
    font-family: var(--eth-font-heading); font-weight: var(--eth-fw-bold); line-height: var(--eth-lh-heading);
    color: var(--eth-text-title); letter-spacing: -.02em; overflow-wrap: anywhere; text-wrap: wrap;
}
.eth-product-main .eth-product-info__subtitle {
    margin: 0; font-size: var(--eth-fs-body); font-family: var(--eth-font-body);
    font-weight: var(--eth-fw-medium); line-height: var(--eth-lh-body); color: var(--eth-text-body);
}
.eth-product-main .eth-product-info__description {
    max-width: var(--eth-content-measure); margin-block: var(--eth-space-3xs);
    font-size: var(--eth-fs-body); color: var(--eth-text-muted); line-height: var(--eth-lh-body);
    overflow-wrap: anywhere;
}
.eth-product-main .eth-product-info__description > :first-child { margin-top: 0; }
.eth-product-main .eth-product-info__description > :last-child { margin-bottom: 0; }
/* A definition list of compact facts; every saved row remains visible.
   The information column, rather than the viewport, decides when two fit. */
.eth-product-main .eth-product-info > .eth-product-specs-inline {
    display: grid; grid-template-columns: minmax(0,1fr); gap: 0;
    margin: var(--eth-space-2xs) 0 0; padding: 0;
    border-top: 1px solid var(--eth-border);
}
.eth-product-main .eth-product-specs-inline__row {
    display: flex; flex-direction: column; justify-content: flex-start;
    min-width: 0; gap: calc(var(--eth-space-3xs) * .5); padding: calc(var(--eth-space-2xs) * .625) 0;
    border: 0; border-bottom: 1px solid var(--eth-border); border-radius: 0;
}
.eth-product-main .eth-product-specs-inline__row:hover { background: transparent; }
.eth-product-main :is(.eth-product-specs-inline__label,.eth-product-specs-inline__value) {
    min-width: 0; max-width: 100%; margin: 0; overflow-wrap: anywhere;
}
.eth-product-main .eth-product-specs-inline__label {
    font-size: calc(var(--eth-fs-small) * .875); line-height: var(--eth-lh-heading);
    color: var(--eth-text-muted); font-weight: var(--eth-fw-semibold);
    letter-spacing: .045em;
}
.eth-product-main .eth-product-specs-inline__value {
    font-size: var(--eth-fs-small); line-height: var(--eth-lh-body);
    color: var(--eth-text-title); font-weight: var(--eth-fw-semibold);
}
@container eth-product-info (min-width: 28rem) {
    .eth-product-main .eth-product-info > .eth-product-specs-inline { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .eth-product-main .eth-product-specs-inline__row:nth-child(odd) { padding-inline-end: var(--eth-component-pad-s); border-inline-end: 1px solid var(--eth-border); }
    .eth-product-main .eth-product-specs-inline__row:nth-child(even) { padding-inline-start: var(--eth-component-pad-s); }
    .eth-product-main .eth-product-specs-inline__row:last-child:nth-child(odd) { grid-column: 1 / -1; padding-inline: 0; border-inline-end: 0; }
}
.eth-product-main .eth-product-info__actions { display: flex; flex-wrap: wrap; gap: var(--eth-component-gap); margin-top: var(--eth-space-2xs); }
.eth-product-main .eth-product-info__actions:empty { display: none; }
.eth-product-main .eth-product-info__actions .eth-btn { min-height: calc(var(--eth-component-pad-s) * 2.75); }
.eth-product-main .eth-product-info > .eth-content-share { margin-top: var(--eth-space-xs); padding-top: var(--eth-space-xs); color: var(--eth-text-muted); }
.eth-product-main .eth-content-share__title { color: var(--eth-text-muted); font-size: var(--eth-fs-xs); font-weight: var(--eth-fw-regular); }
.eth-product-main .eth-product-content { padding-block: var(--eth-space-l); }
.eth-product-main .eth-product-content__container {
    display: grid; grid-template-columns: minmax(0,1fr); grid-template-areas: 'main';
    gap: var(--eth-space-l); max-width: var(--eth-container); align-items: start;
}
.eth-product-main .eth-product-content.has-toc .eth-product-content__container { grid-template-columns: minmax(0,.24fr) minmax(0,1fr); grid-template-areas: 'toc main'; }
.eth-product-main .eth-product-content.has-sidebar .eth-product-content__container { grid-template-columns: minmax(0,1fr) minmax(0,.28fr); grid-template-areas: 'main sidebar'; }
.eth-product-main .eth-product-content--sidebar-left.has-sidebar .eth-product-content__container { grid-template-columns: minmax(0,.28fr) minmax(0,1fr); grid-template-areas: 'sidebar main'; }
.eth-product-main .eth-product-content.has-toc.has-sidebar .eth-product-content__container { grid-template-columns: minmax(0,.24fr) minmax(0,1fr) minmax(0,.28fr); grid-template-areas: 'toc main sidebar'; }
.eth-product-main .eth-product-content--sidebar-left.has-toc.has-sidebar .eth-product-content__container { grid-template-columns: minmax(0,.24fr) minmax(0,.28fr) minmax(0,1fr); grid-template-areas: 'toc sidebar main'; }
.eth-product-main .eth-product-content__main { grid-area: main; }
.eth-product-main .eth-product-content__toc { grid-area: toc; }
.eth-product-main .eth-product-sidebar { grid-area: sidebar; min-width: 0; }
.eth-product-main :is(.eth-product-content__toc,.eth-product-sidebar) { position: sticky; top: calc(var(--eth-product-sticky-offset) + var(--eth-component-gap)); max-height: calc(100dvh - var(--eth-product-sticky-offset) - var(--eth-component-gap) * 2); overflow-y: auto; }
.eth-product-main .eth-product-content:not(.has-toc):not(.has-sidebar) .eth-product-content__main { width: 100%; max-width: var(--eth-content-measure); margin-inline: auto; }
.eth-product-main .eth-product-entry > :is(p,ul,ol,h2,h3,h4) { max-width: var(--eth-content-measure); }
.eth-product-main .eth-product-entry :is(table,pre) { display: block; max-width: 100%; overflow-x: auto; }
.eth-product-main .eth-product-content__toc .eth-toc__inner { margin: 0; padding: var(--eth-component-pad-s); border: 1px solid var(--eth-border); border-radius: var(--eth-radius-m); background: var(--eth-bg-surface); box-shadow: none; }
.eth-product-main .eth-product-content__toc summary.eth-toc__title { cursor: pointer; list-style: none; font-size: var(--eth-fs-small); text-transform: none; letter-spacing: normal; }
.eth-product-main .eth-product-content__toc summary.eth-toc__title::before { display: none; }
.eth-product-main summary:focus-visible { outline: 2px solid var(--eth-link); outline-offset: var(--eth-space-3xs); }
.eth-product-main .eth-product-entry :is(h2,h3) { scroll-margin-top: calc(var(--eth-product-sticky-offset) + var(--eth-component-pad-l)); }
@media(min-width:993px) {
    .eth-product-main .eth-product-toc > summary { cursor: default; pointer-events: none; }
}
@media(max-width:1200px) {
    .eth-product-main .eth-product-content.has-toc.has-sidebar .eth-product-content__container { grid-template-columns: minmax(0,.24fr) minmax(0,1fr); grid-template-areas: 'toc main' 'toc sidebar'; }
}
@media(max-width:992px) {
    .eth-product-main .eth-product-hero__grid { grid-template-columns: minmax(0,1fr) minmax(0,1.15fr); gap: var(--eth-component-pad-l); }
    .eth-product-main .eth-product-hero__media.is-product-media-sticky { position: static; }
    .eth-product-main .eth-product-content:is(.has-toc,.has-sidebar) .eth-product-content__container { grid-template-columns: minmax(0,1fr); grid-template-areas: 'toc' 'main' 'sidebar'; gap: var(--eth-component-pad-l); }
    .eth-product-main .eth-product-content.has-sidebar:not(.has-toc) .eth-product-content__container { grid-template-areas: 'main' 'sidebar'; }
    .eth-product-main :is(.eth-product-content__toc,.eth-product-sidebar) { position: static; max-height: none; overflow: visible; order: initial; }
    .eth-product-main .eth-product-content__toc summary.eth-toc__title { margin: 0; padding: 0; border: 0; display: flex; justify-content: space-between; }
    .eth-product-main .eth-product-content__toc summary.eth-toc__title::after { content: '+'; color: var(--eth-link); }
    .eth-product-main .eth-product-toc[open] > summary.eth-toc__title::after { content: '−'; }
    .eth-product-main .eth-product-toc[open] .eth-toc__list { margin-top: var(--eth-space-xs); }
}
@media(max-width:767px) {
    .eth-product-main .eth-product-hero { padding-block: var(--eth-component-pad-m) var(--eth-component-pad-l); }
    .eth-product-main .eth-product-breadcrumb { margin-bottom: var(--eth-component-pad-m); }
    .eth-product-main .eth-product-hero__grid { grid-template-columns: minmax(0,1fr); gap: var(--eth-component-pad-l); }
    .eth-product-main .eth-product-hero__media { max-width: calc(var(--eth-container) * .36); margin-inline: auto; }
    .eth-product-main .eth-product-info__actions > :is(.eth-btn,.eth-product-pay-action) { flex: 1 1 auto; }
}

/* Opt-in block content: no outer container, background or duplicated section padding. */
.eth-product-main .eth-product-modules {
    display: block; width: 100%; max-width: none; min-width: 0; margin: 0; padding: 0;
}
