/**
 * Product Hero Component
 *
 * Full-width hero used exclusively on product detail pages.
 * Contains a decorative background image, an overlay gradient for legibility,
 * a breadcrumb, an optional product logo, the page <h1>, and a short description.
 *
 * The sticky-subnav component is rendered as a sibling immediately after this
 * element — see sticky-subnav/style.css for its sticky-positioning rules.
 */

/* ── Shell ────────────────────────────────────────────────────────────────── */

.product-hero {
    /* Placeholder when no hero background image is uploaded */
    background: #474747;
    display: block;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.product-hero::before {
    background: linear-gradient(180deg, rgb(0 0 0 / .7) 0%, rgb(0 0 0 / 0) 100%);
    content: '';
    display: block;
    height: 8rem;
    left: 0;
    opacity: 1;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 2;
}

.product-hero::after {
    background: linear-gradient(0deg, rgb(0 0 0 / 1) 15%, rgb(0 0 0 / 0) 100%);
    bottom: 0;
    content: '';
    display: block;
    height: 8rem;
    left: 0;
    opacity: 1;
    position: absolute;
    width: 100%;
    z-index: 2;
}

@media (width >= 640px) {
    .product-hero::before {
        height: 12.5rem;
    }

    .product-hero::after {
        height: 12.5rem;
    }
}

@media (width >= 768px) {
    .product-hero::before {
        height: 19rem;
    }

    .product-hero::after {
        height: 19rem;
    }
}

@media (width >= 1024px) {
    .product-hero::before {
        height: 12.5rem;
    }

    .product-hero::after {
        height: 12.5rem;
    }
}

/* ── Background carousel ──────────────────────────────────────────────────── */

.product-hero__slides {
    display: block;
    inset: 0;
    position: absolute;
}

.product-hero__slides::before {
    background: var(--vendor-overlay-color, #000);
    content: '';
    display: block;
    inset: 0;
    mask-image: linear-gradient(to bottom right, black 0, transparent 100%);
    mix-blend-mode: color;
    opacity: 1;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.product-hero__slides::after {
    background: rgb(0 0 0 / .6);
    backdrop-filter: blur(1.25rem);
    content: '';
    display: block;
    height: 100%;
    left: 0;
    mask-image: linear-gradient(to right, black 25%, transparent 100%);
    position: absolute;
    top: 0;
    width: 100%;
}

.product-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.product-hero__slide--active {
    opacity: 1;
}

.product-hero__slide-img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (width >= 1024px) {
    .product-hero__slides::after {
        max-width: 60%;
    }
}

/* ── Featured product image (static overlay — above background, below text) ─ */

.product-hero__featured {
    display: block;
    height: auto;
    position: relative;
    width: 100%;
    z-index: 1;
}

.product-hero__featured-img {
    display: block;
    height: auto;
    margin: 0 auto;
    max-height: 40dvh;
    max-width: 100%;
    object-fit: contain;
    position: relative;
    width: auto;
}

@media (width >= 1024px) {
    .product-hero__featured {
        align-items: flex-end;
        display: flex;
        height: 100%;
        min-height: 37.5rem;
        padding: 7.25rem 10vw 0 0;
    }

    .product-hero__featured-img {
        max-height: 100%;
    }
}

/* ── Slide navigation ─────────────────────────────────────────────────────── */

.product-hero__nav-wrapper {
    display: none;
    height: 100%;
    left: 0;
    margin: 0 auto;
    max-width: var(--content-max-width);
    padding: 0 var(--content-gutter);
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    width: 100%;
    z-index: 4;

}

.product-hero__nav {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    pointer-events: all;
    position: absolute;
    right: 0;
    top: 0;
}

.product-hero__nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    /* Enlarge click target without affecting layout */
    min-inline-size: 44px;
    min-block-size: 44px;
    justify-content: center;
}

.product-hero__nav-dot {
    display: block;
    inline-size: 10px;
    block-size: 10px;
    border-radius: 50%;
    background-color: rgb(255 255 255 / 0.5);
    border: 2px solid rgb(255 255 255 / 0.7);
    transition: background-color 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}

.product-hero__nav-btn--active .product-hero__nav-dot,
.product-hero__nav-btn:hover .product-hero__nav-dot {
    background-color: var(--color-white, #fff);
    transform: scale(1.3);
}

.product-hero__nav-label {
    font-family: var(--font-family-sans);
    font-size: 0.6875rem; /* 11px */
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(255 255 255 / 0.65);
    line-height: 1;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.product-hero__nav-btn--active .product-hero__nav-label,
.product-hero__nav-btn:hover .product-hero__nav-label {
    color: var(--color-white, #fff);
}

@media (width >= 768px) {
    .product-hero__nav-wrapper {
        padding: 0 var(--content-gutter-md);
    }
}

@media (width >= 1024px) {
    .product-hero__nav-wrapper {
        padding: 0 var(--content-gutter-lg);
    }
}

/* ── Content layer ────────────────────────────────────────────────────────── */

.product-hero__content {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: var(--content-max-width);
    min-height: 37.5rem;
    padding: 0 var(--content-gutter);
    position: relative;
}

.product-hero__content .breadcrumb {
    color: #CCCCCC;
    display: block;
    font-size: .8125rem;
    font-weight: 400;
    left: 0;
    line-height: 1.2em;
    position: relative;
    text-shadow: 0 0 .1em #000;
    top: 5rem;
    transition: .25s;
    z-index: 4;
}

.product-hero__content .breadcrumb a {
    color: inherit;
    transition: .25s;
}

.product-hero__content .breadcrumb a:hover,
.product-hero__content .breadcrumb a:focus-visible {
    color: var(--color-white);
}

@media (width >= 768px) {
    .product-hero__content {
        min-height: 40.25rem;
        padding: 0 var(--content-gutter-md);
    }
    
    .product-hero__content .breadcrumb {
        padding: 0 var(--content-gutter-md);
        position: absolute;
        top: 6.875rem;
    }
}

@media (width >= 1024px) {
    .product-hero__content {
        align-items: flex-start;
        flex-direction: row;
        gap: 3rem;
        min-height: 37.5rem;
        justify-content: space-between;
        padding: 0 var(--content-gutter-lg);
    }

    .product-hero__content .breadcrumb {
        padding: 0 var(--content-gutter-lg);
        top: 7.25rem;
    }
}

/* ── Inner content group (logo + heading + description) ──────────────────── */

.product-hero__inner {
    display: flex;
    flex-direction: column;
    gap: .5em;
    margin: auto 0;
    padding: 7.75rem 0 2rem;
    position: relative;
    z-index: 3;
}

@media (width >= 768px) {
    .product-hero__inner {
        padding: 9.75rem 0 2rem;
    }
}

@media (width >= 1024px) {
    .product-hero__inner {
        margin: 0;
        max-width: 75%;
        padding: 12rem 0 6rem;
    }
}

/* ── Product logo ─────────────────────────────────────────────────────────── */

.product-hero__logo {
    align-items: center;
    display: flex;
    margin: 0 0 .5rem;
}

.product-hero__logo-img {
    display: inline-block;
    height: auto;
    max-height: 2.5rem;
    max-width: 5.125rem;
    position: relative;
    vertical-align: top;
    width: auto;
}

@media (width >= 1024px) {
    .product-hero__logo-img {
        margin: 0 0 1rem;
        max-height: 3.125rem;
        max-width: 6.25rem;
    }
}

/* ── Heading ──────────────────────────────────────────────────────────────── */

.product-hero__heading {
    color: #fff;
    display: block;
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 600;
    line-height: 1em;
    margin: 0;
    max-width: 13.75em;
    padding: 0;
    position: relative;
    text-shadow: 0 0 .1em #000;
}

@media (width >= 640px) {
    .product-hero__heading {
        font-size: 2.625rem;
    }
}

@media (width >= 768px) {
    .product-hero__heading {
        font-size: 2.9375rem;
    }
}

@media (width >= 1024px) {
    .product-hero__heading {
        font-size: 3.3125rem;
    }
}

@media (width >= 1280px) {
    .product-hero__heading {
        font-size: 3.625rem;
    }
}

@media (width >= 1538px) {
    .product-hero__heading {
        font-size: 4rem;
    }
}

/* ── Description ──────────────────────────────────────────────────────────── */

.product-hero__description {
    color: #CCCCCC;
    display: block;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4em;
    margin: 0;
    max-width: 31em;
    padding: 0;
    position: relative;
    text-shadow: 0 0 .25em #000;
}

@media (width >= 1024px) {
    .product-hero__description {
        font-size: 1.125rem;
    }
}

/* ── CTA Buttons ──────────────────────────────────────────────────────────── */

.product-hero__ctas {
    align-items: center;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    justify-content: flex-start;
    margin: 3rem 0 0;
}

.product-hero__cta {
    align-items: center;
    appearance: none;
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    justify-content: center;
    line-height: 1.25em;
    overflow: hidden;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 0 .1em #000;
    transition: .25s;
    vertical-align: top;
}

.product-hero__cta span {
    position: relative;
}

.product-hero__cta--primary {
    background: var(--color-primary-dark);
    border-radius: 5em;
    font-weight: 600;
    padding: .75em 2em;
}

.product-hero__cta--primary::before {
    background: linear-gradient(90deg, var(--color-primary) 0%, rgb(255 255 255 / 0) 100%);
    content: '';
    display: block;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: .25s;
    width: 100%;
}

.product-hero__cta--primary:hover::before,
.product-hero__cta--primary:focus-visible::before {
    opacity: 0;
}

/* The secondary CTA now renders via the shared button component
   (button/style.css: .button.button--secondary.button--medium). */

.product-hero__ctas .button--secondary {
    color: var(--color-white);
}

.product-hero__ctas .button--secondary:hover,
.product-hero__ctas .button--secondary:focus-visible {
    color: var(--color-white);
}

.product-hero__ctas .button--secondary:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 2px;
}

@media (width >= 768px) {
    .product-hero__ctas {
        flex-direction: row;
        flex-wrap: nowrap;
        margin: 4rem 0 0;
        white-space: nowrap;
    }
}