/* =========================================================
   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-stage {
    position: relative;
    height: 520px;
    width: 100%;
    overflow: hidden;
    background: #0f172a;
    z-index: 1;
}

.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 {
    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: 1280px;
    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 — half on banner, half below */
.bn-hero-products--overlay {
    position: relative;
    z-index: 30;
    width: 100%;
    max-width: none;
    margin: calc(var(--bn-hero-card-overlap) * -1) 0 0;
    padding: 0 16px;
    pointer-events: none;
    transform: none;
}

.bn-hero-products--overlay .bn-hero-products-label,
.bn-hero-products--overlay .bn-hero-products-viewport {
    margin-left: 0;
    max-width: none;
    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: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--bn-gap, 8px);
    width: max-content;
    will-change: transform;
}

.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);
}

/* 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 — hero hidden on mobile */
.bn-hero-products--mobile {
    display: none !important;
}

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

/* Laptop (992–1399): 8 cards, compact hero */
@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-products--overlay {
        padding-left: 12px;
        padding-right: 12px;
    }

    .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): 12 cards */
@media (min-width: 1400px) {
    .bn-hero {
        --bn-hero-card-overlap: 120px;
        margin-bottom: 24px;
    }

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

    .bn-hero-products--overlay {
        padding-left: 24px;
        padding-right: 24px;
    }

    .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;
        padding: 0 12px;
    }

    .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): hide entire hero */
@media (max-width: 767.98px) {
    .bn-hero,
    .bn-hero.desktop-only,
    .bn-hero-products--mobile,
    .bn-hero-products--mobile.mobile-only {
        display: none !important;
    }
}
