/* Homepage body (design kit 2026-11). Scoped to .home so header, footer and other pages are untouched. */

.home {
    --home-gap: 16px;
    --home-radius: 10px;
    --home-slider-radius: 12px;
    --home-banner-radius: 12px;
}

/* Hero: bottom corners only. Top corners stay square (owner t41).
   Do not restore a four-corner radius on the main hero. */
.home-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 var(--home-slider-radius) var(--home-slider-radius);
    background: #f4f1ec;
}

.home-hero__viewport {
    overflow: hidden;
    border-radius: inherit;
}

.home-hero__track {
    display: flex;
    will-change: transform;
}

.home-hero__slide {
    display: block;
    flex: 0 0 100%;
    min-width: 0;
    aspect-ratio: 1920 / 589;
}

.home-hero__slide picture,
.home-hero__image {
    display: block;
    width: 100%;
    height: 100%;
}

.home-hero__image {
    object-fit: cover;
    border-radius: 0 0 var(--home-slider-radius) var(--home-slider-radius);
}

.home-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0;
    transform: translateX(-50%);
}

.home-hero__dot {
    width: 14px;
    height: 3px;
    margin: 0 -2px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.42);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12);
    cursor: pointer;
    opacity: 0.88;
    transition: width 0.25s ease, background-color 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

.home-hero__dot[aria-current="true"] {
    width: 20px;
    background: rgb(31 111 58 / 0.92);
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.18);
    opacity: 1;
    transform: scale(1.05);
}

.home-hero__slide:focus-visible,
.home-cats__tile:focus-visible,
.home-banner:focus-visible {
    outline: 3px solid #1f6f3a;
    outline-offset: -3px;
}

/* Section heading ------------------------------------------------------- */
.home-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: clamp(22px, 3vw, 44px);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: center;
    text-transform: uppercase;
}

.home-heading::before,
.home-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #d8dde1;
}

/* Top categories -------------------------------------------------------- */
.home-cats {
    max-width: 1600px;
    margin: 12px auto 8px;
    padding: 0 var(--home-gap);
}

.home-cats__grid {
    display: grid;
    gap: var(--home-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-cats__grid--desktop {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.home-cats__grid > li {
    min-width: 0;
}

.home-cats__tile {
    display: block;
    overflow: hidden;
    border-radius: var(--home-radius);
    background: #eee;
}

.home-cats__tile img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: inherit;
    transition: transform 0.35s ease;
}

.home-cats__tile:hover img {
    transform: scale(1.04);
}

/* Homepage category product groups: one panel, not each card.
   A campaign banner is the first thing inside that same panel. */
.page-home .home .product-section {
    background: #f5f5f5;
    border-radius: 16px;
    margin-top: 18px;
    margin-inline: 12px;
    padding: 12px 10px 16px;
    overflow: visible;
}

.page-home .home .home-block--has-banner {
    background: #f5f5f5;
    border-radius: 16px;
    /* Later campaign panels only. Flash Sale keeps its own 18px top margin. */
    margin: 10px 12px 0;
    padding: 10px 10px 16px;
    overflow: visible;
}

.page-home .home .home-block--has-banner > .home-banner {
    display: block;
    margin: 0 0 8px;
}

.page-home .home .home-block--has-banner > .product-section {
    background: transparent;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

.page-home .home .product-section .section-band {
    width: auto;
    max-width: 100%;
    margin: 0 0 12px;
}

.page-home .home .product-section .container--fluid {
    width: auto;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: 0;
}

/* Category banner above a product section -------------------------------- */
.home-block--has-banner {
    margin-top: 28px;
}

/* Campaign banners, including banner-polo-phone.webp: all four corners.
   Listing-page title bars are not part of this. */
.home-banner,
.home-banner picture,
.home-banner img {
    border-radius: var(--home-banner-radius);
}

.home-banner {
    display: block;
    overflow: hidden;
}

.home-banner img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Full Sleeve campaign file only: its outermost rows are a darker hairline.
   Scale inside the rounded frame. Hero, grid tiles and other banners are untouched. */
.home-block--full-sleeve > .home-banner img {
    transform: scale(1.015);
    transform-origin: center;
}

/* The banner carries the section name; keep the heading for screen readers only. */
.home-block--has-banner .product-section .section-band {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.home-block--has-banner .product-section {
    margin-top: 0;
}

/* Each device shows only its own hero slider and tile set. */
.home-cats__grid--mobile {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.home-hero--mobile {
    display: none;
}

/* Phone ----------------------------------------------------------------- */
@media (max-width: 767px) {
    .home-hero--desktop {
        display: none;
    }

    .home-hero--mobile {
        display: block;
    }

    .home {
        --home-gap: 8px;
        --home-radius: 8px;
        --home-slider-radius: 10px;
        --home-banner-radius: 10px;
    }

    .home-hero__slide {
        aspect-ratio: 1430 / 628;
    }

    .home-hero__dots {
        bottom: 8px;
    }

    .home-hero__dot {
        width: 12px;
        height: 2.5px;
        margin: 0 -2px;
    }

    .home-hero__dot[aria-current="true"] {
        width: 17px;
    }

    .home-heading {
        margin-bottom: 8px;
        font-size: 18px;
    }

    .home-cats {
        margin-top: 8px;
    }

    .home-cats__grid--desktop {
        display: none;
    }

    .home-cats__grid--mobile {
        display: grid;
    }

    .home-block--has-banner {
        margin-top: 18px;
    }


    .home-block--has-banner .product-section {
        margin-top: 0;
    }

    .page-home .home .product-section,
    .page-home .home .home-block--has-banner {
        border-radius: 14px;
        margin-inline: 4px;
        padding: 8px 6px 12px;
    }

    .page-home .home .home-block--has-banner > .product-section {
        margin: 0;
        padding: 0;
    }

    .page-home .home .home-block--has-banner > .home-banner {
        margin-bottom: 6px;
    }

    .page-home .home .product-section.product-section--flash {
        margin-inline: 0;
        padding: 0 0 12px;
        border-radius: 14px;
        overflow: hidden;
    }

    .page-home .home .product-section.product-section--flash > .section-band {
        width: 100%;
        max-width: none;
        margin: 0 0 8px;
        border-radius: 14px 14px 0 0;
        padding: 10px 14px 8px;
    }

    .page-home .home .product-section.product-section--flash > .container--fluid {
        padding-inline: 0;
    }

}

/* Flash Sale title fills to the outer rounded border. The product row keeps its inset. */
.page-home .home .product-section.product-section--flash {
    overflow: hidden;
}

@media (min-width: 768px) {
    .page-home .home .product-section.product-section--flash {
        padding: 0 10px 16px;
    }

    .page-home .home .product-section.product-section--flash > .section-band {
        width: auto;
        max-width: none;
        margin: 0 -10px 12px;
        border-radius: 16px 16px 0 0;
        padding: 10px 16px 8px;
    }
}

/* Flash Sale: one small inset instead of section + fluid-container padding. */
.home .product-section--flash {
    padding-inline: 0;
}

.home .product-section--flash > .container--fluid {
    padding-inline: 6px;
}

.home .product-section--flash > .section-band {
    width: 100%;
    margin-inline: 0;
}
