/* =========================================================
   Hero carousel — matches React FreshCart hero-section
   ========================================================= */
.bn-hero {
    --bn-hero-primary: #2f9e4b;
    --bn-hero-primary-fg: #f7fff8;
    --bn-hero-ink: #1c2434;
    --bn-hero-muted: #6b7280;
    --bn-hero-card-overlap: 90px;
    position: relative;
    width: 100%;
    overflow: visible;
    background: transparent;
    z-index: 5;
    margin-bottom: 8px;
}

.bn-hero-products-wrap {
    position: relative;
    z-index: 30;
}

.bn-hero-stage {
    position: relative;
    height: 520px;
    width: 100%;
    overflow: hidden;
    background: #0f172a;
    z-index: 1;
    border-radius: 0;
}

.bn-hero-slides {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.bn-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.7s ease-in-out;
    pointer-events: none;
}

.bn-hero-slide.is-active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

.bn-hero-slide img,
.bn-hero-slide picture,
.bn-hero-slide picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.bn-hero-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.bn-hero-gradient {
    display: none;
}

.bn-hero-inner {
    position: relative;
    z-index: 10;
    height: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.bn-hero-copy-wrap {
    display: none;
}

.bn-hero-badge,
.bn-hero-copy h1,
.bn-hero-copy p,
.bn-hero-cta {
    display: none !important;
}

.bn-hero-copy {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    pointer-events: none;
}

.bn-hero-copy.is-active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Product cards — overlap banner bottom, aligned to site container */
.bn-hero-products-wrap .bn-hero-products--overlay {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: 100%;
    margin: calc(var(--bn-hero-card-overlap) * -1) 0 0;
    padding: 0;
    pointer-events: none;
    transform: none;
    display: block;
}

.bn-hero-products--overlay .bn-hero-products-label,
.bn-hero-products--overlay .bn-hero-products-viewport {
    margin-left: 0;
    max-width: 100%;
    width: 100%;
    pointer-events: auto;
}

.bn-hero-products-label {
    margin-bottom: 8px;
    text-align: left;
    color: rgba(255, 255, 255, 0.95);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.bn-hero-products-viewport {
    width: 100%;
    overflow: hidden;
}

/* Product track — card width set by JS (--bn-card-w) */
.bn-hero-products-grid {
    display: none;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--bn-gap, 8px);
    width: max-content;
    will-change: transform;
}

.bn-hero-products-grid.is-active {
    display: flex !important;
}

.bn-hero-card {
    position: relative;
    z-index: 31;
    flex: 0 0 var(--bn-card-w, 110px);
    width: var(--bn-card-w, 110px);
    max-width: none;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 6px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12), 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.bn-hero-card:hover {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.1);
}

.bn-hero-card-link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}

.bn-hero-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 6px;
    overflow: hidden;
    border-radius: 8px;
    background: #f3f4f6;
}

.bn-hero-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.bn-hero-card:hover .bn-hero-card-media img {
    transform: scale(1.08);
}

.bn-hero-card-body {
    flex: 1 1 auto;
    min-width: 0;
}

.bn-hero-card h3 {
    margin: 0;
    font-size: 10px;
    line-height: 1.4;
    font-weight: 700;
    color: var(--bn-hero-ink);
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    overflow: visible;
}

.bn-hero-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    margin-top: 2px;
    padding-right: 26px;
}

.bn-hero-card-cart {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 40;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: var(--bn-hero-primary);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.2s ease, transform 0.2s ease;
}

.bn-hero-card-cart:hover {
    background: #278a40;
    transform: scale(1.06);
}

.bn-hero-card-cart.is-disabled,
.bn-hero-card-cart:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.bn-hero-card-cart i {
    font-size: 11px;
    pointer-events: none;
}

.bn-hero-card-price {
    font-size: 11px;
    font-weight: 800;
    color: var(--bn-hero-primary);
    white-space: nowrap;
}

/* Nav arrows */
.bn-hero-nav {
    position: absolute;
    top: 42%;
    left: 16px;
    right: 16px;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.bn-hero-nav-btn {
    pointer-events: auto;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    backdrop-filter: blur(6px);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.bn-hero-nav-btn:hover {
    background: rgba(0, 0, 0, 0.5);
}

.bn-hero-nav.bn-hero-nav--top-right {
    top: 16px;
    left: auto;
    right: 16px;
    width: auto;
    transform: none;
    justify-content: flex-end;
    gap: 8px;
}

/* Dots */
.bn-hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 28px;
    z-index: 15;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.bn-hero-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease;
}

.bn-hero-dot.is-active {
    width: 28px;
    background: var(--bn-hero-primary);
}

.bn-hero-dot:hover {
    background: #fff;
}

/* Mobile strip unused */
.bn-hero-products--mobile {
    display: none !important;
}

@media (min-width: 640px) {
    .bn-hero-stage {
        height: 560px;
    }
}

/* Laptop / desktop (≥992): 10 cards */
@media (min-width: 992px) and (max-width: 1399.98px) {
    .bn-hero {
        --bn-hero-card-overlap: 88px;
        margin-bottom: 18px;
    }

    .bn-hero-stage {
        height: 460px;
    }

    .bn-hero-nav {
        left: 16px;
        right: 16px;
        top: 38%;
    }

    .bn-hero-dots {
        bottom: 18px;
    }

    .bn-hero-products-grid {
        gap: var(--bn-gap, 6px);
    }

    .bn-hero-card {
        padding: 6px;
        border-radius: 9px;
    }

    .bn-hero-card h3 {
        font-size: 10px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .bn-hero-card-price {
        font-size: 11px;
    }

    .bn-hero-card-cart {
        width: 28px;
        height: 28px;
    }

    .bn-hero-card-media {
        margin-bottom: 4px;
    }
}

/* Large desktop (≥1400): 10 cards */
@media (min-width: 1400px) {
    .bn-hero {
        --bn-hero-card-overlap: 120px;
        margin-bottom: 24px;
    }

    .bn-hero-stage {
        height: 620px;
    }

    .bn-hero-nav {
        left: 24px;
        right: 24px;
    }

    .bn-hero-products-grid {
        gap: var(--bn-gap, 8px);
    }

    .bn-hero-card {
        padding: 8px;
        border-radius: 10px;
    }

    .bn-hero-card h3 {
        font-size: 11px;
        line-height: 1.45;
    }
}

/* MD tablet (768–991): 6 visible */
@media (min-width: 768px) and (max-width: 991.98px) {
    .bn-hero {
        --bn-hero-card-overlap: 100px;
        margin-bottom: 20px;
    }

    .bn-hero-stage {
        height: 440px;
    }

    .bn-hero-products--overlay {
        display: block;
    }

    .bn-hero-products-grid {
        gap: var(--bn-gap, 8px);
    }

    .bn-hero-card {
        padding: 6px;
    }

    .bn-hero-card h3 {
        font-size: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .bn-hero-dots {
        bottom: 16px;
    }

    .bn-hero-nav {
        top: 36%;
        left: 10px;
        right: 10px;
    }
}

/* Mobile (<768): show hero unless marked desktop-only */
@media (max-width: 767.98px) {
    .bn-hero.desktop-only {
        display: none !important;
    }

    .bn-hero.mobile-only,
    .bn-hero:not(.desktop-only) {
        display: block !important;
    }

    .bn-hero {
        --bn-hero-card-overlap: 56px;
        margin-bottom: 12px;
    }

    .bn-hero-stage {
        height: 210px;
    }

    .bn-hero-slide img,
    .bn-hero-slide picture,
    .bn-hero-slide picture img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .bn-hero-nav {
        top: 50%;
        left: 8px;
        right: 8px;
    }

    .bn-hero-nav-btn {
        width: 28px;
        height: 28px;
    }

    .bn-hero-dots {
        bottom: 10px;
    }

    .bn-hero-products-wrap {
        padding: 0 12px;
    }

    .bn-hero-card {
        padding: 5px;
        border-radius: 8px;
    }

    .bn-hero-card h3 {
        font-size: 9px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .bn-hero-card-price {
        font-size: 10px;
    }

    .bn-hero-card-cart {
        width: 24px;
        height: 24px;
    }

    .bn-hero-products--mobile,
    .bn-hero-products--mobile.mobile-only {
        display: none !important;
    }
}

/* =========================================================
   Split hero — main slider + two stacked side ads
   ========================================================= */
.bn-hero--split {
    overflow: visible;
    margin-bottom: 20px;
    padding-top: 18px;
}

.bn-hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(210px, 0.82fr);
    gap: 14px;
    height: 440px;
    align-items: stretch;
}

.bn-hero-split--solo {
    grid-template-columns: 1fr;
}

.bn-hero--split .bn-hero-stage {
    height: 100%;
    border-radius: 24px;
    background: #0b1220;
}

.bn-hero--split .bn-hero-nav {
    left: 14px;
    right: 14px;
    top: 50%;
}

.bn-hero--split .bn-hero-nav-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.88);
    color: #0f172a;
    border-color: transparent;
}

.bn-hero--split .bn-hero-nav-btn:hover {
    background: #fff;
}

.bn-hero--split .bn-hero-dots {
    bottom: 16px;
}

.bn-hero--split .bn-hero-dot {
    background: rgba(255, 255, 255, 0.55);
}

.bn-hero--split .bn-hero-dot.is-active {
    width: 24px;
    background: #fff;
}

.bn-hero-split-caption {
    position: absolute;
    left: 36px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 8;
    max-width: min(52%, 460px);
    color: #fff;
    pointer-events: none;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.bn-hero-split-badge {
    display: inline-block;
    background: #f97316;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.bn-hero-split-caption h2 {
    margin: 0 0 10px;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.12;
    font-weight: 800;
    color: #fff;
}

.bn-hero-split-caption p {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    max-width: 36em;
}

.bn-hero-split-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.bn-hero-split-cta i {
    font-size: 12px;
}

.bn-hero-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
}

.bn-hero-side-card {
    position: relative;
    flex: 1 1 0;
    min-height: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #0b1220;
}

.bn-hero-side-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
    display: block;
}

iframe.bn-hero-side-media {
    pointer-events: none;
    transform: scale(1.35);
    transform-origin: center center;
}

.bn-hero-side-copy {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 18px 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.72) 100%);
    color: #fff;
    pointer-events: none;
}

.bn-hero-side-badge {
    display: inline-block;
    background: #f97316;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 7px;
    margin-bottom: 8px;
}

.bn-hero-side-copy h3 {
    margin: 0 0 4px;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 800;
    color: #fff;
}

.bn-hero-side-copy p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.86);
}

.bn-hero-side-hit {
    position: absolute;
    inset: 0;
    z-index: 3;
}

@media (min-width: 1400px) {
    .bn-hero-split {
        height: 500px;
        gap: 16px;
    }

    .bn-hero--split .bn-hero-stage {
        height: 100%;
        border-radius: 24px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .bn-hero-split {
        height: 340px;
        gap: 10px;
        grid-template-columns: minmax(0, 1.7fr) minmax(180px, 0.9fr);
    }

    .bn-hero--split .bn-hero-stage {
        height: 100%;
        border-radius: 18px;
    }

    .bn-hero-side-card {
        border-radius: 18px;
    }

    .bn-hero-split-caption {
        left: 20px;
        max-width: 58%;
    }

    .bn-hero-split-caption h2 {
        font-size: 24px;
    }

    .bn-hero-split-caption p {
        font-size: 13px;
    }
}

@media (max-width: 767.98px) {
    .bn-hero--split {
        padding-top: 12px;
    }

    .bn-hero-split {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 10px;
    }

    .bn-hero--split .bn-hero-stage {
        height: 210px;
        border-radius: 16px;
    }

    .bn-hero-split-caption {
        left: 16px;
        right: 16px;
        max-width: none;
        top: auto;
        bottom: 28px;
        transform: none;
    }

    .bn-hero-split-caption h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .bn-hero-split-caption p {
        display: none;
    }

    .bn-hero-split-cta {
        padding: 8px 12px;
        font-size: 12px;
    }

    .bn-hero-side-card {
        min-height: 150px;
        flex: 0 0 auto;
        border-radius: 16px;
    }
}
