/* Latest publishing deltas, scoped to this product. Shared runtime stays intact. */
html:has(> body.page-products) {
    height: auto;
    overflow-x: clip;
    overflow-y: auto;
}

body.page-products {
    height: auto;
    overflow-x: clip;
    overflow-y: visible;
}

/* Legacy heading fonts must not change the publishing line breaks. */
.page-products #site-content :is(h1, h2, h3, h4, h5, h6) {
    font-family: inherit;
}

.page-products #site-content .vid-head h2 {
    font-family: "JalnanGothic", sans-serif;
    font-weight: 400;
}

/* Keep the header in document flow instead of compensating with page padding. */
.page-products #hd {
    position: sticky;
    top: 0;
    z-index: 30;
}

.page-products .gnb-toggle > .bx {
    font-size: 28px;
}

html:has(> body.page-products.nav-open) {
    overflow: hidden;
}

body.page-products.nav-open {
    overflow-x: clip;
    overflow-y: visible;
}

/* Native document scrolling keeps AOS working on mobile as well as desktop. */
body.page-products [data-aos]:not(.aos-init) {
    opacity: 1;
    transform: none;
    transition: none;
}

/* AOS and the publishing motion observer must not leave a passed heading hidden. */
body.page-products [data-aos].aos-animate.fx-ready:not(.fx-on) {
    opacity: 1;
    transform: none;
}

.page-products .sub-hero.hero-with-visual .hero-content--visual {
    min-height: 0;
    aspect-ratio: 1920 / 740;
}

.page-products .rec-list {
    width: 100%;
}

.page-products .point-main {
    line-height: 1.3;
}

.page-products .point-note {
    gap: 10px;
}

@media (min-width: 769px) {
    .page-products .point-box:has(> .point-box-media:first-child) > :not(.point-box-media) {
        padding-left: 0;
        padding-right: 0;
    }
}

.page-products .ref-list {
    line-height: 1.5;
}

.page-products .benefit-sublist {
    display: grid;
    gap: 4px;
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
}

.page-products .benefit-sublist li {
    position: relative;
    padding-left: 1.5em;
    font-size: 1.14rem;
    line-height: 1.8;
    letter-spacing: var(--letter-common);
    overflow-wrap: anywhere;
    word-break: keep-all;
}

.page-products .benefit-sublist li::before {
    content: "·";
    position: absolute;
    left: 18px;
    top: 0;
}

.page-products .page-note {
    grid-template-columns: 1fr;
    justify-content: start;
    gap: 6px;
}

.page-products .page-note-text {
    text-align: left;
}

.page-products .product-pharmacy-anchor,
.page-products [id$="-pharmacy"] {
    scroll-margin-top: 70px;
}

/* Keep picture source and banner ratio switches on the same 720px boundary. */
.page-products .promo-banner--visual {
    aspect-ratio: var(--promo-ratio-pc);
}

@media (max-width: 768px) {
    .page-products .ref-list {
        line-height: 1.35;
    }

    .page-products .benefit-sublist li {
        font-size: 1rem;
        line-height: 1.7;
    }

    .page-products .point-main {
        line-height: 1.26;
    }

    .page-products .benefit-grid {
        display: flex;
        flex-wrap: wrap;
    }

    .page-products .benefit-item {
        flex: 0 0 calc((100% - (var(--benefit-mo-cols, 2) - 1) * 14px) / var(--benefit-mo-cols, 2));
        width: calc((100% - (var(--benefit-mo-cols, 2) - 1) * 14px) / var(--benefit-mo-cols, 2));
    }
}

@media (max-width: 720px) {
    .page-products .sub-hero.hero-with-visual .hero-content--visual {
        aspect-ratio: 750 / 950;
    }

    .page-products .promo-banner--visual {
        aspect-ratio: var(--promo-ratio-mo, var(--promo-ratio-pc));
    }

    .page-products .product-pharmacy-anchor,
    .page-products [id$="-pharmacy"] {
        scroll-margin-top: 68px;
    }
}

/* Real results can have five page buttons, unlike the three-page mockup. */
@media (max-width: 480px) {
    .page-products .phm-paging {
        gap: 4px;
        padding-left: 4px;
        padding-right: 4px;
    }

    .page-products .phm-page-list {
        gap: 4px;
    }
}

.page-products .rec-note { margin: calc(var(--space-8) * 2) auto 0; }
.page-products .page-note--right { justify-items: end; gap: 4px; filter: opacity(.6); }
.page-products .page-note--right :is(.page-note-text, .page-note-review) { width:100%; text-align:right; line-height:1.3; }
.page-products .point-caption-list--star li::before { content:"*"; }
.page-products .vid-title { font-size:clamp(1.1rem,1.45vw,1.65rem); }
.page-products .vid-main, .page-products .vid-side { position:relative; }
.page-products .vid-list { scrollbar-width: none; }
.page-products .vid-list::-webkit-scrollbar { display:none; }
.page-products .vid-side:has(.vid-list.is-scroll)::after { content:""; position:absolute; left:0; right:10px; bottom:0; height:48px; background:linear-gradient(to bottom,transparent,var(--vid-bg,#0d1738)); pointer-events:none; }
.page-products .vid-side.is-scroll-end::after { opacity:0; }
.page-products .vid-list-track { position:absolute; top:0; right:0; bottom:0; width:3px; border-radius:99px; background:rgba(255,255,255,.14); pointer-events:none; }
.page-products .vid-list-thumb { position:absolute; left:0; width:100%; border-radius:99px; background:rgba(255,255,255,.65); }
.page-products .vid-list.is-scroll { cursor: grab; }
.page-products .vid-list.is-dragging { cursor: grabbing; user-select: none; }

/* Functional detail modals reuse the publishing markup without loading the
   main-page stylesheet. Keep the required modal shell scoped to this page. */
.page-functional-products .modal-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}
.page-functional-products .modal-layer[hidden] { display: none; }
.page-functional-products .modal-layer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 11, 26, 0.58);
    backdrop-filter: blur(6px);
}
.page-functional-products .modal-layer__panel {
    position: relative;
    z-index: 1;
    background: #ffffff;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
}
.page-functional-products .modal-layer__close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border: 0;
    background: transparent;
    color: #000000;
}
.page-functional-products .modal-layer__close .icon-lucide {
    width: 2.35rem;
    height: 2.35rem;
}
.page-functional-products .fn-hub { position: relative; }
.page-functional-products .functional-compat-anchor {
    position: absolute;
    top: 0;
    width: 1px;
    height: 1px;
    scroll-margin-top: 82px;
}
.page-functional-products .functional-compat-anchor--card { position: relative; top: auto; }
.page-functional-products .fn-card { scroll-margin-top: 82px; }
@media (max-width: 1080px) {
    .page-products .vid-side:has(.vid-list.is-scroll)::after { left:auto; right:0; top:0; bottom:10px; width:48px; height:auto; background:linear-gradient(to right,transparent,var(--vid-bg,#0d1738)); }
    .page-products .vid-list-track { top:auto; right:0; bottom:0; left:0; width:100%; height:3px; }
}
@media (max-width: 768px) {
    .page-products .vid-title {
        font-size: 1.05rem;
    }

    .page-products .vid-side:has(.vid-list.is-scroll)::after { width:40px; }
    .page-functional-products .functional-compat-anchor,
    .page-functional-products .fn-card { scroll-margin-top: 68px; }

    .page-functional-products .modal-layer__panel.fn-modal {
        display: grid;
        grid-template-rows: 56px minmax(0, 1fr);
    }

    .page-functional-products .modal-layer__close {
        position: relative;
        top: auto;
        right: auto;
        align-self: center;
        justify-self: end;
        width: 3rem;
        height: 3rem;
        margin-right: 8px;
    }

    .page-functional-products .modal-layer__close .icon-lucide {
        width: 2rem;
        height: 2rem;
    }

    .page-functional-products .fn-detail {
        max-height: calc(100svh - 80px);
    }
}
