
/* ============================================================
   A1 CASH & CARRY - RESPONSIVE BRAND LOGO SLIDER
============================================================ */

.brand-section {
    width: 100%;
    padding: 36px 0 42px;
    overflow: hidden;
    /* background: var(--surface, #fff); */
}

.brand-section-inner {
    width: min(92%, 1600px);
    margin: auto;
}

.brand-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.brand-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #07862a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.brand-heading h2 {
    margin: 0;
    color: var(--text, #172033);
    font-size: clamp(22px, 2.2vw, 30px);
    font-weight: 800;
    line-height: 1.25;
}

.brand-heading p {
    margin: 8px 0 0;
    color: var(--text-light, #667085);
    font-size: 13px;
}

.brand-view-all {
    flex-shrink: 0;
    color: #087f23;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

/* Slider viewport */

.brand-marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 8px 0 12px;
}

/* Track containing two identical groups */

#foodBrands .brand-track {
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: flex-start;
    width: max-content !important;
    max-width: none !important;
    gap: 0;
    transform: translateX(0);
    will-change: transform;
}

/* The JavaScript starts the animation */

#foodBrands .brand-group {
    display: flex;
    flex: 0 0 auto;
    flex-flow: row nowrap;
    align-items: flex-start;
    width: max-content;
    gap: 22px;
    padding-right: 22px;
}

/* Card */

#foodBrands .brand-card {
    display: flex;
    flex: 0 0 180px;
    width: 180px;
    min-width: 180px;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

/* Fixed-size logo area */

#foodBrands .brand-logo-box {
    display: flex;
    position: relative;
    box-sizing: border-box;
    width: 180px;
    height: 140px;
    flex: 0 0 140px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 16px;
    border: 1px solid #ededed;
    border-radius: 15px;
    background: #f3f4f6;
    transition: transform .25s ease, box-shadow .25s ease;
}

#foodBrands .brand-card:hover .brand-logo-box {
    transform: translateY(-4px);
    box-shadow: 0 9px 24px rgba(0, 0, 0, .12);
    background: #fff;
}

/* Logo image: prevent it from pushing text around */

#foodBrands img.brand-logo-image {
    display: block;
    flex: 0 1 auto;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* hidden must stay hidden even if other CSS sets display */

#foodBrands [hidden] {
    display: none !important;
}

/* Fallback if image is unavailable */

#foodBrands .brand-wordmark {
    display: block;
    max-width: 100%;
    color: #172033;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Brand name below the logo */

#foodBrands .brand-card-name {
    display: block;
    width: 100%;
    min-height: 20px;
    color: var(--text, #344054);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}

/* Infinite loop: two equal-width groups */

@keyframes a1BrandScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Pause while the user hovers over the slider */

#foodBrands .brand-marquee:hover .brand-track {
    animation-play-state: paused !important;
}

/* Dark mode */

body.dark-mode .brand-section {
    background: #091522;
}

body.dark-mode .brand-heading h2,
body.dark-mode .brand-card-name {
    color: #f5f7fa;
}

body.dark-mode .brand-heading p {
    color: #a8b6c8;
}

body.dark-mode #foodBrands .brand-logo-box {
    background: #f3f4f6;
    border-color: #26384a;
}

/* Mobile */

@media (max-width: 700px) {
    .brand-section {
        padding: 28px 0 32px;
    }

    .brand-section-inner {
        width: 92%;
    }

    .brand-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .brand-heading p {
        font-size: 12px;
        line-height: 1.6;
    }

    .brand-view-all {
        font-size: 11px;
    }

    #foodBrands .brand-group {
        gap: 14px;
        padding-right: 14px;
    }

    #foodBrands .brand-card {
        flex-basis: 132px;
        width: 132px;
        min-width: 132px;
        gap: 8px;
    }

    #foodBrands .brand-logo-box {
        width: 132px;
        height: 105px;
        flex-basis: 105px;
        padding: 12px;
        border-radius: 12px;
    }

    #foodBrands .brand-card-name {
        font-size: 11px;
    }

    #foodBrands .brand-wordmark {
        font-size: 16px;
    }
}

/* ===== A1 CASH & CARRY BRAND LOGO CARDS ===== */

#brandTrack {
    display: flex !important;
    width: max-content;
    gap: 0;
    animation: a1BrandScroll 90s linear infinite !important;
    will-change: transform;
}

#brandTrack:hover {
    animation-play-state: paused !important;
}

#brandTrack .brand-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 20px;
    padding-right: 20px;
}

#brandTrack .brand-card {
    box-sizing: border-box;
    flex: 0 0 170px;
    width: 170px;
    min-height: 155px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: #222;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

#brandTrack .brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.12);
}

#brandTrack .brand-logo-box {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#brandTrack .brand-logo-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 125px;
    max-height: 68px;
    object-fit: contain;
}

#brandTrack .brand-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    text-align: center;
    font-size: 19px;
    font-weight: 800;
    color: #d71920;
    overflow-wrap: anywhere;
}

#brandTrack .brand-card-name {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@keyframes a1BrandScroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@media (max-width: 600px) {
    #brandTrack .brand-group {
        gap: 12px;
        padding-right: 12px;
    }

    #brandTrack .brand-card {
        flex-basis: 135px;
        width: 135px;
        min-height: 130px;
        padding: 10px;
    }

    #brandTrack .brand-logo-box {
        height: 65px;
    }

    #brandTrack .brand-logo-image {
        max-width: 105px;
        max-height: 55px;
    }
}