/*
 * Water Concepts
 * Category cards
 *
 * Fotokaarten per categorie + navy "Alle producten"-kaart.
 * Zelfde vormtaal als de productkaarten (kaartvlak
 * --neutral-100, --radius-md, witte pijlcirkel).
 *
 * Staat buiten de content-container (generate_before_footer),
 * de inner lijnt uit met de content: --container / --gutter
 * gelijk aan .plp-description.
 *
 * Grid:  desktop  = aantal kaarten (3 of 4) naast elkaar
 *        tablet   = 3 naast elkaar, 4 → 2×2
 *        mobiel   = 1 kolom
 */


/* ==========================================
   SECTION
========================================== */

.category-cards {
    --container: 1600px;
    --gutter: 30px;

    padding: 5rem 0;

    background: var(--white);
}

.category-cards__inner {
    max-width: var(--container);

    margin: 0 auto;
    padding: 0 var(--gutter);
}

.category-cards .category-cards__eyebrow {
    margin: 0 0 0.625rem 0;

    color: var(--blue-500);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.category-cards .category-cards__title {
    margin: 0 0 2rem 0;

    color: var(--blue-900);

    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}


/* ==========================================
   GRID
========================================== */

.category-cards__grid {
    --cards: 3;

    display: grid;
    grid-template-columns: repeat(var(--cards), minmax(0, 1fr));
    gap: 24px;
}

.category-cards__grid--2 { --cards: 2; }
.category-cards__grid--3 { --cards: 3; }
.category-cards__grid--4 { --cards: 4; }


/* ==========================================
   CARD (FOTO)
========================================== */

.category-card {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--neutral-100);
    border-radius: var(--radius-md);

    color: inherit;
    text-decoration: none;

    transition: background-color .3s ease;
}

.category-card__media {
    position: relative;

    display: block;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: var(--neutral-200);
}

/* Specifiek + !important: ".woocommerce img
   { height: auto }" (body-class) wint anders. */
.category-card .category-card__img {
    position: absolute;
    inset: 0;

    display: block;

    width: 100% !important;
    height: 100% !important;
    max-width: none !important;

    object-fit: cover;
    object-position: center;

    transition: transform .5s ease;
}

.category-card__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 18px 20px 20px;
}

.category-card__text {
    display: flex;
    flex-direction: column;
    gap: 2px;

    min-width: 0;
}

.category-card__name {
    color: var(--blue-900);

    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.4;

    transition: color .2s ease;
}

.category-card__subtitle {
    color: var(--neutral-600);

    font-size: 0.875rem;
    line-height: 1.4;
}

.category-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    background: var(--white);
    color: var(--blue-400);

    transition: background-color .2s ease, color .2s ease;
}

.category-card__arrow svg {
    width: 16px;
    height: 16px;
}


/* ==========================================
   CARD (FOTO) — HOVER + FOCUS
   Zelfde gedrag als de productkaarten.
========================================== */

.category-card:hover {
    background: color-mix(in srgb, var(--neutral-100) 50%, var(--neutral-200));
}


.category-card:hover .category-card__img {
    transform: scale(1.04);
}

.category-card:hover .category-card__name {
    color: var(--blue-500);
}

.category-card:hover .category-card__arrow {
    background: var(--blue-500);
    color: var(--white);
}

.category-card:focus-visible {
    outline: 2px solid var(--blue-400);
    outline-offset: 3px;
}


/* ==========================================
   "ALLE PRODUCTEN" — NAVY CTA-KAART
   Geen foto: sluit de rij af als eindpunt.
========================================== */

.category-card--all {
    justify-content: space-between;
    gap: 2rem;

    padding: 28px;

    background: var(--blue-950);
}

.category-card--all:hover {
    background: var(--blue-950);
}

.category-card__all-text {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.category-card__all-eyebrow {
    color: var(--teal-300);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.category-card__all-title {
    color: var(--white);

    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.category-card__all-button {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 8px;

    padding: 12px 22px;

    border-radius: var(--radius-pill);

    background: var(--teal-500);
    color: var(--blue-900);

    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;

    transition: background-color .2s ease;
}

.category-card__all-button svg {
    width: 16px;
    height: 16px;
}

.category-card--all:hover .category-card__all-button {
    background: var(--teal-300);
}


/* ==========================================
   REDUCED MOTION
========================================== */

@media (prefers-reduced-motion: reduce) {

    .category-card .category-card__img {
        transition: none;
    }

    .category-card:hover .category-card__img {
        transform: none;
    }
}


/* ==========================================
   TABLET — 4 kaarten → 2×2
========================================== */

@media (max-width: 1024px) {

    .category-cards {
        padding: 4rem 0;
    }

    .category-cards .category-cards__title {
        font-size: 1.5rem;
    }

    .category-cards__grid {
        gap: 16px;
    }

    .category-cards__grid--4 {
        --cards: 2;
    }

    .category-card__all-title {
        font-size: 1.375rem;
    }
}


/* ==========================================
   MOBIEL — 1 kolom
========================================== */

@media (max-width: 768px) {

    .category-cards {
        --gutter: 15px;

        padding: 3rem 0;
    }

    .category-cards .category-cards__title {
        margin-bottom: 1.5rem;

        font-size: 1.375rem;
    }

    .category-cards__grid,
    .category-cards__grid--2,
    .category-cards__grid--3,
    .category-cards__grid--4 {
        --cards: 1;
    }

    .category-card__body {
        padding: 16px;
    }

    .category-card--all {
        gap: 1.5rem;

        padding: 24px;
    }
}