/*
 * [uitgelichte_producten] — productcarousel.
 *
 * Volledig genamespaced onder .rodun-featured / .rodun-card zodat Avada's
 * globale typografie en Fusion-element regels deze carousel niet kunnen
 * overschrijven. Géén achtergrond op de sectie zelf — die wordt door
 * Avada (column / section background) bepaald.
 *
 * Layout:
 *   - .rodun-featured__viewport  → Embla viewport (overflow:hidden)
 *   - .rodun-featured__track     → Embla container (display:flex)
 *   - .rodun-card                → Embla slide (fractioneel: 3.25/2.25/1.15)
 *   - .rodun-card__inner         → het zichtbare kaartje; padding op .rodun-card
 *                                  vormt de gutter tussen slides.
 */

/* ============================================================
 * Sectie
 * ============================================================ */
.rodun-featured {
    padding: 64px 0 64px;
    /* Alleen horizontaal clippen — verticaal moet zichtbaar blijven voor
       hover-lift en box-shadow op de kaarten. */
    overflow-x: clip;
}

.rodun-featured__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}


/* ============================================================
 * Header
 * ============================================================ */
.rodun-featured__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 32px;
}

.rodun-featured__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: #ffbe00;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.rodun-featured h2.rodun-featured__title,
.rodun-featured .rodun-featured__title {
    font-family: inherit;
    font-size: clamp(28px, 3vw, 36px) !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    color: #0F1E5C !important;
    text-transform: none;
    letter-spacing: normal;
    margin: 0 !important;
    padding: 0 !important;
}

.rodun-featured__all {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 600;
    color: #0F1E5C;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.rodun-featured__all:hover,
.rodun-featured__all:focus-visible {
    color: #ffbe00;
    text-decoration: none;
}

.rodun-featured__all:focus-visible {
    outline: 2px solid #ffbe00;
    outline-offset: 2px;
}


/* ============================================================
 * Carousel (Embla)
 * ============================================================ */
.rodun-featured__viewport {
    overflow: hidden;
    /* Alleen boven ademruimte voor hover-lift; onder minimaal voor schaduw. */
    padding: 8px 0 12px;
    margin: -8px 0 -12px;
}

.rodun-featured__track {
    display: flex;
    align-items: stretch;
    backface-visibility: hidden;
    will-change: transform;
}


/* ============================================================
 * Slide / Card
 *
 * De `<a>` is de slide-cel (fractioneel zichtbaar, horizontal padding =
 * gutter). De ::before-truc gebruiken we NIET — gutters worden met padding
 * op .rodun-card opgelost, en het zichtbare kaartje is .rodun-card__inner.
 * ============================================================ */
.rodun-card {
    position: relative;
    flex: 0 0 calc(100% / 3.25);
    min-width: 0;
    padding: 0 12px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    display: flex;
    transition: transform 0.3s ease;
}

.rodun-card:hover,
.rodun-card:focus,
.rodun-card:focus-visible {
    text-decoration: none;
    color: inherit;
    outline: none;
}

.rodun-card:hover,
.rodun-card:focus-visible {
    transform: translateY(-4px);
}

.rodun-card__inner {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rodun-card:hover .rodun-card__inner,
.rodun-card:focus-visible .rodun-card__inner {
    border-color: #ffbe00;
    box-shadow: 0 20px 40px -20px rgba(15, 30, 92, 0.25);
}

/* Gouden hoek-driehoek rechtsboven, alleen bij hover */
.rodun-card__inner::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-top: 28px solid #ffbe00;
    border-left: 28px solid transparent;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 3;
}

.rodun-card:hover .rodun-card__inner::after,
.rodun-card:focus-visible .rodun-card__inner::after {
    opacity: 1;
}


/* ============================================================
 * Media (image / fallback)
 * ============================================================ */
.rodun-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f3f4f6, #fafafa);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Subtiele gouden radial glow */
.rodun-card__media::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, #ffbe00 0%, transparent 50%);
    opacity: 0.07;
    pointer-events: none;
}

.rodun-card__img {
    position: relative;
    z-index: 1;
    width: 60%;
    height: 60%;
    object-fit: contain;
    transform-origin: center center;
    transition: transform 0.5s ease;
    will-change: transform;
}

.rodun-card:hover .rodun-card__img,
.rodun-card:focus-visible .rodun-card__img {
    transform: scale(1.1);
}

/* SVG-fallback wanneer er geen featured image is */
.rodun-card__img--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
}

.rodun-card__img--placeholder svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Fabrikant-badge linksboven */
.rodun-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: rgba(15, 30, 92, 0.9);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 2px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1.2;
}


/* ============================================================
 * Body
 * ============================================================ */
.rodun-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 20px;
}

.rodun-card__eyebrow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* Defensieve overrides — voorkomt dat Avada's globale h3-typografie
   (kleur, margin, font-family, font-size) de kaart-titel overschrijft. */
.rodun-card h3.rodun-card__title,
.rodun-card .rodun-card__body h3.rodun-card__title {
    font-family: inherit;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #0F1E5C !important;
    text-transform: none;
    letter-spacing: normal;
    margin: 0 0 12px !important;
    padding: 0 !important;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.rodun-card:hover h3.rodun-card__title {
    color: #ffbe00 !important;
}

/* CAS-rij */
.rodun-card__cas {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 12px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rodun-card__cas-label {
    color: #6b7280;
}

.rodun-card__cas-value {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #0F1E5C;
    font-weight: 600;
}

/* Footer (temp + CTA) */
.rodun-card__foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.rodun-card__temp {
    font-size: 12px;
    color: #6b7280;
    min-height: 1.2em;
}

.rodun-card__cta {
    font-size: 14px;
    font-weight: 700;
    color: #0F1E5C;
    white-space: nowrap;
    transition: color 0.2s ease, transform 0.2s ease;
}

.rodun-card:hover .rodun-card__cta {
    color: #ffbe00;
}


/* ============================================================
 * Navigatie (knoppen + progress + count)
 * ============================================================ */
.rodun-featured__nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 16px;
}

.rodun-featured__btns {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

.rodun-featured__btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #0F1E5C;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.rodun-featured__btn:hover:not(:disabled),
.rodun-featured__btn:focus-visible:not(:disabled) {
    background: #0F1E5C;
    border-color: #0F1E5C;
    color: #ffffff;
}

.rodun-featured__btn:focus-visible {
    outline: 2px solid #ffbe00;
    outline-offset: 2px;
}

.rodun-featured__btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.rodun-featured__btn svg {
    display: block;
}

.rodun-featured__progress {
    flex: 1 1 auto;
    height: 3px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.rodun-featured__progress > div {
    height: 100%;
    width: 0;
    margin-left: 0;
    background: #ffbe00;
    border-radius: 999px;
    transition: margin-left 0.25s ease, width 0.25s ease;
}

.rodun-featured__count {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}


/* ============================================================
 * Responsive — fractionele slides + scroll-per-N regelt JS
 *
 *   ≥ 1024px  → 3.25 zichtbaar, scroll per 3
 *   640–1023  → 2.25 zichtbaar, scroll per 2
 *   < 640     → 1.15 zichtbaar, scroll per 1
 * ============================================================ */
@media (max-width: 1023px) {
    .rodun-card {
        flex-basis: calc(100% / 2.25);
    }

    .rodun-featured__all {
        display: none;
    }
}

@media (max-width: 639px) {
    .rodun-card {
        flex-basis: calc(100% / 1.15);
    }

    .rodun-featured {
        padding: 48px 0 48px;
    }

    .rodun-featured__inner {
        padding: 0 16px;
    }

    .rodun-featured__nav {
        gap: 16px;
        margin-top: 12px;
    }
}


/* ============================================================
 * Reduced motion — respecteer prefers-reduced-motion
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {

    .rodun-card,
    .rodun-card__inner,
    .rodun-card__inner::after,
    .rodun-card__img,
    .rodun-card__title,
    .rodun-card__cta,
    .rodun-featured__btn,
    .rodun-featured__progress > div {
        transition: none !important;
    }
}
