/* aieo/brand-slider — vanilla scroll-snap carousel. */

:root {
    --aieo-bs-pink: #F46767;
    --aieo-bs-text: #1f2937;
    --aieo-bs-muted: #6b7280;
    --aieo-bs-border: #e5e7eb;
    --aieo-bs-bg: #ffffff;
    --aieo-bs-gap: 16px;
    --aieo-bs-card-radius: 8px;
}

.aieo-brand-slider {
    color: var(--aieo-bs-text);
    margin: 24px 0;
}

.aieo-brand-slider__header {
    margin: 0 0 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-bottom: 1px solid var(--aieo-bs-border);
    padding-bottom: 8px;
}
/* Feature heading mode: the recommendations-style title draws its own
 * full-bleed underline, so drop the header's own border to avoid a double line. */
.aieo-brand-slider--heading-feature .aieo-brand-slider__header {
    border-bottom: 0;
    padding-bottom: 0;
}
/* …but this block sits in the constrained content column, so CONTAIN the
 * underline to the block's own (body) width instead of the theme's full-bleed
 * viewport breakout. Higher specificity (2 classes) beats the theme's
 * `.aieo-recommendations-title::after`. */
.aieo-brand-slider--heading-feature .aieo-recommendations-title::after {
    left: 0;
    width: 100%;
}
.aieo-brand-slider__title {
    margin: 0;
    font-size: clamp(1.4rem, 2vw, 2rem);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1f2937;
}
.aieo-brand-slider__subtitle {
    margin: 0;
    color: var(--aieo-bs-muted);
    font-size: 14px;
}

.aieo-brand-slider__viewport {
    position: relative;
    outline: none;
}

.aieo-brand-slider__track {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--aieo-spv, 5) - 1) * var(--aieo-bs-gap)) / var(--aieo-spv, 5));
    gap: var(--aieo-bs-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: 4px;
}
.aieo-brand-slider__track::-webkit-scrollbar { display: none; }
.aieo-brand-slider__track { scrollbar-width: none; }

.aieo-brand-slider__slide { scroll-snap-align: start; }

/* Card — hero variant (default for ΝΕΑ BRANDS pattern). */
.aieo-brand-slide {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--aieo-bs-border);
    border-radius: var(--aieo-bs-card-radius);
    overflow: hidden;
    background: var(--aieo-bs-bg);
    transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.aieo-brand-slide:hover {
    border-color: var(--aieo-bs-pink);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(244, 103, 103, 0.10);
}
.aieo-brand-slide__hero {
    display: block;
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    overflow: hidden;
}
.aieo-brand-slide__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.aieo-brand-slide__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #fcf0f1 0%, #ffe9eb 50%, #fff 100%);
}
.aieo-brand-slide__placeholder-glyph {
    font-size: clamp(2.4rem, 4vw, 4rem);
    font-weight: 700;
    color: var(--aieo-bs-pink);
    text-transform: uppercase;
    opacity: 0.85;
}
/* Logo fallback inside a hero-style card: render in a square slot
   with a soft white background and contain (don't crop) the logo. */
.aieo-brand-slide--hero.has-img-logo .aieo-brand-slide__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #fff;
    padding: 18px;
    overflow: hidden;
}
.aieo-brand-slide--hero.has-img-logo .aieo-brand-slide__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.aieo-brand-slide__name {
    display: block;
    padding: 10px 12px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.aieo-brand-slide__meta {
    display: block;
    padding: 0 12px 10px;
    text-align: center;
    color: var(--aieo-bs-muted);
    font-size: 12px;
}

/* Card — logo variant (for "TOP BRANDS" rail). */
.aieo-brand-slide--logo {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 8px 4px;
}
.aieo-brand-slide--logo:hover {
    border: none;
    box-shadow: none;
    transform: translateY(-1px);
}
.aieo-brand-slide--logo .aieo-brand-slide__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    background: #fff;
    border: 1px solid var(--aieo-bs-border);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 8px;
}
.aieo-brand-slide--logo .aieo-brand-slide__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.aieo-brand-slide--logo .aieo-brand-slide__name {
    padding: 0;
    font-size: 12px;
    color: var(--aieo-bs-muted);
}

/* Nav arrows. */
.aieo-brand-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--aieo-bs-border);
    background: var(--aieo-bs-bg);
    color: var(--aieo-bs-text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.aieo-brand-slider__nav:hover { border-color: var(--aieo-bs-pink); color: var(--aieo-bs-pink); }
.aieo-brand-slider__nav--prev { left: -20px; }
.aieo-brand-slider__nav--next { right: -20px; }

.aieo-brand-slider__footer {
    margin-top: 16px;
    text-align: center;
}
.aieo-brand-slider__cta {
    display: inline-block;
    padding: 8px 14px;
    color: var(--aieo-bs-text);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.04em;
}
.aieo-brand-slider__cta:hover { color: var(--aieo-bs-pink); }

/* Mobile — show fewer cards per view, smaller arrows. */
@media (max-width: 768px) {
    .aieo-brand-slider__track {
        grid-auto-columns: calc((100% - 1 * var(--aieo-bs-gap)) / 2);
    }
    .aieo-brand-slider__nav { display: none; }
    .aieo-brand-slider__title { font-size: 1.4rem; }
}

@media (min-width: 480px) and (max-width: 1024px) {
    .aieo-brand-slider__track {
        grid-auto-columns: calc((100% - 2 * var(--aieo-bs-gap)) / 3);
    }
}
