/**
 * Buben & Zörweg brand page (category 48 "buben-zorweg", display mode "Static block only",
 * CMS blocks "buben-zoerweg-markenseite" de/en). Loaded only via Magento_Catalog/layout/catalog_category_view_id_48.xml.
 *
 * Content is native Page Builder. Styling hooks are the row CSS classes set in Page Builder
 * (full-bleed rows: on the row, contained rows: on its inner element - where Page Builder stores them):
 * kz-bz + kz-bz-intro | kz-bz-products | kz-bz-craft | kz-bz-visit, column class kz-bz-photo (product photo row).
 * Calm and timeless: large light headings, muted text, three equal product photos; the only motion is the
 * native Page Builder parallax of the closing leather photo (off for reduced motion).
 */

.kz-bz {
    line-height: 1.7;

    & p {
        margin: 0 0 1rem;
        color: #525252;
    }

    & p:last-child {
        margin-bottom: 0;
    }

    & h2 {
        margin: 0 0 1.25rem;
        font-size: clamp(1.75rem, 3.5vw, 2.5rem);
        font-weight: 400;
        line-height: 1.15;
        letter-spacing: -0.01em;
        text-wrap: balance;
    }

    & h3 {
        margin: 0 0 0.25rem;
        color: var(--color-fg, #111);
        font-size: 1.0625rem;
        font-weight: 600;
        line-height: 1.4;
    }
}

[data-content-type="row"][data-appearance="contained"]:has(> .kz-bz) {
    margin-block: 0 3.5rem;
}

/* ---- Intro: headline + text ---- */
.kz-bz-intro {
    & h2 {
        margin: 0;
        font-size: clamp(2.5rem, 5vw, 4.5rem);
        line-height: 1;
    }

    & .pagebuilder-column-line {
        gap: 1rem;
    }
}

/* ---- Products: three equal photos in one row, the texts below ---- */
.kz-bz-products {
    & .pagebuilder-column-group + .pagebuilder-column-group {
        margin-top: 1.5rem;
    }

    & .pagebuilder-column-line {
        gap: 1.25rem;
    }

    & .pagebuilder-column-line:has(> .kz-bz-photo) {
        flex-wrap: nowrap; /* phones too: three photos side by side */
        gap: 0.5rem;
    }

    & .kz-bz-photo {
        flex: 1 1 0;
        min-width: 0;
    }

    & figure {
        margin: 0;
    }

    & img {
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
    }

    & p {
        font-size: 0.9375rem;
        line-height: 1.6;
    }
}

/* ---- Craft & materials: headline left, text right ---- */
.kz-bz-craft .pagebuilder-column-line {
    gap: 1rem;
}

/* ---- Visit: leather photo with native parallax, text on a dark gradient, sits on the footer ---- */
.kz-bz-visit {
    position: relative;
    justify-content: flex-end;
    min-height: 30rem;
    padding: 3rem var(--kz-edge);
    color: var(--kz-light);

    &::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(0deg, rgb(0 0 0 / 0.85) 0%, rgb(0 0 0 / 0.55) 55%, rgb(0 0 0 / 0.2) 100%);
    }

    & > [data-content-type] {
        position: relative;
        max-width: 34rem;
    }

    & p {
        color: rgb(244 241 234 / 0.88);
    }

    & [data-content-type="buttons"] {
        margin-top: 1.5rem;
    }

    & .pagebuilder-button-primary {
        --btn-stroke: var(--kz-light);
        --btn-bg: var(--kz-light);
        --btn-color: #111;
        --btn-hover-stroke: var(--kz-light);
        --btn-hover-bg: transparent;
        --btn-hover-color: var(--kz-light);
    }

    & .pagebuilder-button-secondary {
        --btn-stroke: var(--kz-light);
        --btn-bg: transparent;
        --btn-color: var(--kz-light);
        --btn-hover-stroke: var(--kz-light);
        --btn-hover-bg: var(--kz-light);
        --btn-hover-color: #111;
    }

    & a:focus-visible {
        outline: 2px solid var(--kz-light);
        outline-offset: 3px;
    }
}

@media (min-width: 48rem) {

    [data-content-type="row"][data-appearance="contained"]:has(> .kz-bz) {
        margin-bottom: 4rem;
    }

    [data-content-type="row"][data-appearance="contained"]:has(> .kz-bz-intro) {
        margin-block: 1rem 3.5rem;
    }

    .kz-bz-products > h2 {
        margin-bottom: 1rem;
    }

    .kz-bz-intro .pagebuilder-column-line,
    .kz-bz-craft .pagebuilder-column-line {
        gap: 6rem;
    }

    .kz-bz-intro p {
        font-size: 1.0625rem;
    }

    .kz-bz-products {
        & .pagebuilder-column-line,
        & .pagebuilder-column-line:has(> .kz-bz-photo) {
            gap: 2.5rem;
        }

        & img {
            aspect-ratio: 3 / 2;
        }

        & p {
            font-size: 1rem;
        }
    }

    .kz-bz-visit {
        justify-content: center;
        min-height: 40rem;
        padding-block: 5rem;

        &::before {
            background: linear-gradient(90deg, rgb(0 0 0 / 0.85) 0%, rgb(0 0 0 / 0.6) 45%, rgb(0 0 0 / 0.1) 80%);
        }

        & h2 {
            font-size: 3rem;
        }
    }
}
