/* Birdie Hero Banner — birdie-hero.css */

/* ── Easing ───────────────────────────────────────────────────────────── */
:root {
    --bh-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Keyframes ─────────────────────────────────────────────────────────── */
@keyframes bh-ken-burns {
    from { transform: scale(1.06) translateZ(0); }
    to   { transform: scale(1)    translateZ(0); }
}

@keyframes bh-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hero container ────────────────────────────────────────────────────── */
.bh-hero {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 520px;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

/* Background image */
.bh-hero__picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

.bh-hero__img {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: center;
    will-change: transform;
    animation: bh-ken-burns 10s var(--bh-ease-out) forwards;
}

@media (min-width: 768px) {
    .bh-hero__img {
        height: 100% !important;
        object-position: center !important;
    }
}

/* Full-image clickable link */
.bh-hero__link {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
}

/* Overlay */
.bh-hero__overlay {
    position: absolute;
    inset: 0;
    background-color: #000;
    opacity: 0.35;
    pointer-events: none;
}

/* Content layer */
.bh-hero__content {
    position: relative;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 48px 64px;
    color: #fff;
    gap: 16px;
}

.bh-hero__heading {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: inherit;
    animation: bh-fade-up 700ms var(--bh-ease-out) 80ms both;
}

.bh-hero__subheading {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
    max-width: 560px;
    animation: bh-fade-up 700ms var(--bh-ease-out) 200ms both;
}

/* CTA row */
.bh-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
    animation: bh-fade-up 600ms var(--bh-ease-out) 330ms both;
}

.bh-hero__cta {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: opacity 160ms var(--bh-ease-out), transform 160ms var(--bh-ease-out);
    cursor: pointer;
    line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
    .bh-hero__cta:hover,
    .bh-hero__cta:focus-visible {
        opacity: 0.82;
        text-decoration: none;
    }
}

.bh-hero__cta:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.bh-hero__cta--primary {
    background-color: #fff;
    border-color: #fff;
    color: #1a1a1a;
}

.bh-hero__cta--secondary {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
}

/* ── USP Strip ───────────────────────────────────────────────────────── */

.bh-usps {
    --bh-usps-cols: 4;
    --bh-usps-cols-md: 2;
    --bh-usps-gap: 20px;
    --bh-usps-peek: 15vw;

    display: grid;
    grid-template-columns: repeat(var(--bh-usps-cols), 1fr);
    gap: var(--bh-usps-gap);
}

/* Item card */
.bh-usps__item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #ebebeb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 200ms var(--bh-ease-out), box-shadow 200ms ease, border-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
    a.bh-usps__item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.10);
        border-color: #d0d0d0;
        text-decoration: none;
    }
}

a.bh-usps__item:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition-duration: 100ms;
}

/* Icon */
.bh-usps__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f4f4f4;
}

.bh-usps__icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

/* Text */
.bh-usps__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bh-usps__title {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111;
    letter-spacing: -0.01em;
}

.bh-usps__desc {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #777;
}

/* Tablet — 2 col grid */
@media (min-width: 768px) and (max-width: 1024px) {
    .bh-usps {
        grid-template-columns: repeat(var(--bh-usps-cols-md), 1fr);
    }
}

/* Mobile — horizontal scroll-snap */
@media (max-width: 767px) {
    .bh-usps-hscroll-yes .bh-usps {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        /* Bleed past parent padding so items scroll off-screen */
        margin-inline: -16px;
        padding-left: 16px;
        scroll-padding-left: 16px;
    }

    .bh-usps-hscroll-yes .bh-usps::-webkit-scrollbar {
        display: none;
    }

    .bh-usps-hscroll-yes .bh-usps__item {
        flex: 0 0 calc(100% - var(--bh-usps-peek, 15vw));
        scroll-snap-align: start;
    }

    /* margin-right on last child = reliable right-side inset (padding-right unreliable on overflow containers) */
    .bh-usps-hscroll-yes .bh-usps__item:last-child {
        margin-right: 16px;
    }

    .bh-usps-hscroll-no .bh-usps {
        grid-template-columns: 1fr;
    }
}

/* CTA preset sizes */
.bh-cta-size-sm .bh-hero__cta { padding: 10px 20px; font-size: 0.875rem; }
.bh-cta-size-md .bh-hero__cta { padding: 14px 28px; font-size: 1rem; }
.bh-cta-size-lg .bh-hero__cta { padding: 18px 36px; font-size: 1.125rem; }
.bh-cta-size-xl .bh-hero__cta { padding: 22px 44px; font-size: 1.25rem; }

/* Mobile */
@media (max-width: 767px) {
    .bh-hero {
        min-height: var(--bh-hero-min-h-mobile, 110vw) !important;
    }

    .bh-hero__content {
        padding: 32px 20px;
    }

    .bh-hero__subheading {
        max-width: 100%;
    }

    .bh-hero__ctas {
        flex-direction: column;
        gap: 10px;
    }

    .bh-hero__cta {
        justify-content: center;
        width: 100%;
        max-width: 320px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .bh-hero {
        min-height: 420px;
    }

    .bh-hero__content {
        padding: 40px 48px;
    }
}

/* ── Brands Strip ────────────────────────────────────────────────────── */

.bh-brands {
    --bh-brands-cols: 6;
    --bh-brands-cols-md: 4;
    --bh-brands-gap: 12px;
    --bh-brands-logo-h: 44px;
    --bh-brands-mobile-visible: 3.5;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--bh-brands-gap);
    align-items: center;
}

.bh-brands__item {
    /* (100% - (N-1)*gap) / N = 100%/N - gap + gap/N */
    flex: 0 0 calc(100% / var(--bh-brands-cols) - var(--bh-brands-gap) + var(--bh-brands-gap) / var(--bh-brands-cols));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    border-radius: 10px;
    border: 1.5px solid #ebebeb;
    background-color: #fff;
    text-decoration: none;
    color: inherit;
    transition: transform 200ms var(--bh-ease-out),
                box-shadow 200ms ease,
                border-color 200ms ease;
}

.bh-brands__logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bh-brands__logo img {
    display: block;
    width: auto;
    height: var(--bh-brands-logo-h);
    max-width: 100%;
    object-fit: contain;
    transition: filter 280ms var(--bh-ease-out), opacity 280ms var(--bh-ease-out);
}

/* Grayscale mode */
.bh-brands-gs-yes .bh-brands__logo img {
    filter: grayscale(100%);
}

@media (hover: hover) and (pointer: fine) {
    .bh-brands-gs-yes a.bh-brands__item:hover .bh-brands__logo img {
        filter: grayscale(0%);
        opacity: 1 !important;
    }

    a.bh-brands__item:hover {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        border-color: #d0d0d0;
    }
}

a.bh-brands__item:active {
    transform: scale(0.96);
    transition-duration: 100ms;
}

.bh-brands__name {
    font-size: 0.6875rem;
    font-weight: 700;
    color: #888;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-align: center;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .bh-brands__item {
        flex: 0 0 calc(100% / var(--bh-brands-cols-md) - var(--bh-brands-gap) + var(--bh-brands-gap) / var(--bh-brands-cols-md));
    }
}

/* Mobile */
@media (max-width: 767px) {
    .bh-brands-hscroll-yes .bh-brands {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin-inline: -16px;
        padding-left: 16px;
        scroll-padding-left: 16px;
    }

    .bh-brands-hscroll-yes .bh-brands::-webkit-scrollbar {
        display: none;
    }

    .bh-brands-hscroll-yes .bh-brands__item {
        /* show --bh-brands-mobile-visible items before scroll */
        flex: 0 0 calc((100% - 16px) / var(--bh-brands-mobile-visible) - var(--bh-brands-gap));
        scroll-snap-align: start;
        min-width: 72px;
    }

    .bh-brands-hscroll-yes .bh-brands__item:last-child {
        margin-right: 16px;
    }

    .bh-brands-hscroll-no .bh-brands__item {
        flex: 0 0 calc(100% / 3 - var(--bh-brands-gap) + var(--bh-brands-gap) / 3);
    }
}

/* ── Category Showcase ────────────────────────────────────────────────── */

.bh-cats {
    --bh-cats-cols: 4;
    --bh-cats-cols-md: 2;
    --bh-cats-gap: 16px;
    --bh-cats-mobile-visible: 1.8;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--bh-cats-gap);
}

.bh-cats__item {
    /* (100% - (N-1)*gap) / N */
    flex: 0 0 calc(100% / var(--bh-cats-cols) - var(--bh-cats-gap) + var(--bh-cats-gap) / var(--bh-cats-cols));
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4/3;
    text-decoration: none;
    color: inherit;
    background: #1a1a1a;
    transition: transform 260ms var(--bh-ease-out),
                box-shadow 260ms ease;
}

.bh-cats__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bh-cats__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--bh-ease-out);
}

.bh-cats__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        color-mix(in srgb, var(--bh-cats-overlay-color, #000) calc(var(--bh-cats-overlay-strength, 0.65) * 100%), transparent) 0%,
        color-mix(in srgb, var(--bh-cats-overlay-color, #000) calc(var(--bh-cats-overlay-strength, 0.65) * 35%), transparent) 50%,
        transparent 100%
    );
}

.bh-cats__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.bh-cats__name {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    letter-spacing: -0.015em;
}

.bh-cats__count {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

/* Hover — desktop only */
@media (hover: hover) and (pointer: fine) {
    a.bh-cats__item:hover {
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
        transform: translateY(-2px);
    }

    a.bh-cats__item:hover .bh-cats__media img {
        transform: scale(1.06);
    }
}

a.bh-cats__item:active {
    transform: scale(0.97);
    transition-duration: 100ms;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .bh-cats__item {
        flex: 0 0 calc(100% / var(--bh-cats-cols-md) - var(--bh-cats-gap) + var(--bh-cats-gap) / var(--bh-cats-cols-md));
    }
}

/* Desktop scroll */
@media (min-width: 1025px) {
    .bh-cats-dscroll-yes .bh-cats {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .bh-cats-dscroll-yes .bh-cats::-webkit-scrollbar {
        display: none;
    }

    /* (100% + 0.5*gap) / N - gap  →  exactly N items visible at scroll=0, last one peeking at N-floor(N) fraction */
    .bh-cats-dscroll-yes .bh-cats__item {
        flex: 0 0 calc((100% + 0.5 * var(--bh-cats-gap)) / var(--bh-cats-desktop-visible, 3.5) - var(--bh-cats-gap));
        scroll-snap-align: start;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .bh-cats-hscroll-yes .bh-cats {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin-inline: -16px;
        padding-left: 16px;
        scroll-padding-left: 16px;
    }

    .bh-cats-hscroll-yes .bh-cats::-webkit-scrollbar {
        display: none;
    }

    /* (100% - 16px + 0.5*gap) / N - gap  →  accounts for bleed offset + correct peek fraction */
    .bh-cats-hscroll-yes .bh-cats__item {
        flex: 0 0 calc((100% - 16px + 0.5 * var(--bh-cats-gap)) / var(--bh-cats-mobile-visible) - var(--bh-cats-gap));
        scroll-snap-align: start;
        min-width: 140px;
    }

    .bh-cats-hscroll-yes .bh-cats__item:last-child {
        margin-right: 16px;
    }

    .bh-cats-hscroll-no .bh-cats__item {
        flex: 0 0 calc(50% - var(--bh-cats-gap) / 2);
    }

    .bh-cats__name {
        font-size: 0.9375rem;
    }

    .bh-cats__info {
        padding: 16px 12px 12px;
    }
}

/* ── Disc Finder ─────────────────────────────────────────────────────── */

.bh-finder {
    --bh-finder-accent: #4CAF50;
    --bh-finder-cols: 4;
}

.bh-finder__header {
    text-align: center;
    margin-bottom: 32px;
}

.bh-finder__title {
    margin: 0 0 8px;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: #111;
}

.bh-finder__subtitle {
    margin: 0;
    font-size: 1rem;
    color: #777;
    line-height: 1.5;
}

.bh-finder__body {
    position: relative;
}

/* Steps */
.bh-finder__step {
    width: 100%;
}

.bh-finder__question {
    margin: 0 0 20px;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.02em;
    text-align: center;
}

.bh-finder__options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* Pill style (default) */
.bh-finder-opts-pill .bh-finder__option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    border-radius: 100px;
    background: #fff;
    color: #222;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    transition: border-color 180ms var(--bh-ease-out),
                background  180ms var(--bh-ease-out),
                color       180ms var(--bh-ease-out),
                transform   160ms var(--bh-ease-out);
}

/* Card style */
.bh-finder-opts-card .bh-finder__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.bh-finder-opts-card .bh-finder__option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    background: #fff;
    color: #222;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: border-color 180ms var(--bh-ease-out),
                background  180ms var(--bh-ease-out),
                color       180ms var(--bh-ease-out),
                transform   160ms var(--bh-ease-out);
}

.bh-finder-opts-card .bh-finder__option-icon {
    font-size: 2rem;
    line-height: 1;
}

/* Hover + active states */
@media (hover: hover) and (pointer: fine) {
    .bh-finder__option:hover {
        border-color: var(--bh-finder-accent);
        color: var(--bh-finder-accent);
    }
}

.bh-finder__option:active {
    transform: scale(0.96);
    transition-duration: 100ms;
}

.bh-finder__option--active {
    border-color: var(--bh-finder-accent) !important;
    background: var(--bh-finder-accent) !important;
    color: #fff !important;
}

/* Back button */
.bh-finder__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    padding: 0;
    border: none;
    background: none;
    color: #777;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 160ms var(--bh-ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .bh-finder__back:hover { color: #111; }
}

/* Results */
.bh-finder__results-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bh-finder__see-all {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bh-finder-accent);
    text-decoration: none;
    transition: opacity 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .bh-finder__see-all:hover { opacity: 0.75; }
}

/* Product grid */
.bh-finder__products {
    display: grid;
    grid-template-columns: repeat(var(--bh-finder-cols, 4), 1fr);
    gap: 16px;
}

/* Product card */
.bh-finder__product {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    border: 1.5px solid #ebebeb;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 220ms var(--bh-ease-out),
                transform  220ms var(--bh-ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .bh-finder__product:hover {
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }
}

.bh-finder__product:active {
    transform: scale(0.97);
    transition-duration: 100ms;
}

.bh-finder__product-img {
    aspect-ratio: 1;
    overflow: hidden;
}

.bh-finder__product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 500ms var(--bh-ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .bh-finder__product:hover .bh-finder__product-img img {
        transform: scale(1.05);
    }
}

.bh-finder__product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bh-finder__product-name {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bh-finder__product-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--bh-finder-accent);
    margin: 0;
}

/* Loading + no results */
.bh-finder__loading {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 32px 0;
    font-size: 0.9375rem;
}

.bh-finder__no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #999;
    padding: 24px 0;
    margin: 0;
    font-size: 0.9375rem;
}

/* Mobile */
@media (max-width: 767px) {
    .bh-finder__products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .bh-finder-opts-card .bh-finder__options {
        grid-template-columns: repeat(2, 1fr);
    }

    .bh-finder__option {
        width: 100%;
        justify-content: center;
    }
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .bh-hero__img {
        animation: none;
        will-change: auto;
    }

    .bh-hero__heading,
    .bh-hero__subheading,
    .bh-hero__ctas {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .bh-hero__cta {
        transition: opacity 100ms;
    }

    .bh-hero__cta:active {
        transform: none;
    }

    .bh-usps__item {
        transition: opacity 100ms;
    }

    a.bh-usps__item:active {
        transform: none;
    }
}
