/* Widget « Collections produits » */

.eks-coll {
    --eks-filters-width: 180px;
    --eks-img-max: 80%;
    --eks-accent: #000;
    display: block;
    column-gap: 50px;
}

.eks-coll.has-filters {
    display: grid;
    grid-template-columns: var(--eks-filters-width) minmax(0, 1fr);
    align-items: start;
}

/* ---------- Filtre ---------- */

.eks-coll__filters {
    position: sticky;
    top: 120px;
}

.eks-coll__filters-title {
    margin: 0 0 15px;
    font-size: 21px;
}

.eks-coll__filters-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.eks-coll__filters-list li {
    margin: 0 0 8px;
}

.eks-coll__filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1.4;
}

.eks-coll__filter input {
    margin: 0;
    accent-color: var(--eks-accent);
    cursor: pointer;
}

/* ---------- Collections ---------- */

.eks-coll__results {
    transition: opacity .2s;
}

.eks-coll.is-loading .eks-coll__results {
    opacity: .4;
    pointer-events: none;
}

.eks-coll__collection + .eks-coll__collection {
    margin-top: 70px;
}

.eks-coll__title {
    margin: 0 0 45px;
    padding-bottom: 12px;
    border-bottom: 1px solid #000;
    font-size: 30px;
    line-height: 1.2;
}

.eks-coll__title a {
    color: inherit;
    text-decoration: none;
}

.eks-coll__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 45px;
}

/* ---------- Produit ---------- */

.eks-coll__product {
    display: block;
    color: inherit;
    text-decoration: none;
}

.eks-coll__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 100 / 132;
    background-color: #faeee1;
    overflow: hidden;
}

.eks-coll__media .eks-coll__img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--eks-img-max);
    max-height: var(--eks-img-max);
    border-radius: 4px;
    transition: opacity .4s, transform .4s;
}

.eks-coll__media .eks-coll__img--hover {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.eks-coll__product.has-hover:hover .eks-coll__img:not(.eks-coll__img--hover) {
    opacity: 0;
}

.eks-coll__product.has-hover:hover .eks-coll__img--hover {
    opacity: 1;
}

.eks-coll__product:not(.has-hover):hover .eks-coll__img {
    transform: scale(1.03);
}

.eks-coll__name {
    display: block;
    margin-top: 22px;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

.eks-coll__empty {
    margin: 0;
    padding: 40px 0;
}

/* ---------- Pagination ---------- */

.eks-coll__pagination {
    --eks-page-color: #000;
    --eks-page-active-text: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 70px;
}

.eks-coll__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--eks-page-color);
    color: var(--eks-page-color);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    transition: background-color .2s, color .2s;
}

a.eks-coll__page:hover,
.eks-coll__page.is-current {
    background-color: var(--eks-page-color);
    color: var(--eks-page-active-text);
}

.eks-coll__page--dots {
    border-color: transparent;
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
    .eks-coll.has-filters {
        display: block;
    }

    .eks-coll__filters {
        position: static;
        margin-bottom: 35px;
    }

    .eks-coll__filters-list {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .eks-coll__filters-list li {
        margin: 0;
    }

    /* Thèmes en pastilles */
    .eks-coll__filter {
        padding: 6px 12px;
        border: 1px solid currentColor;
        border-radius: 20px;
        font-size: 14px;
    }

    .eks-coll__filter input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .eks-coll__filter:has(input:focus-visible) {
        outline: 2px solid var(--eks-accent);
        outline-offset: 2px;
    }

    .eks-coll__filter:has(input:checked) {
        background-color: var(--eks-accent);
        border-color: var(--eks-accent);
        color: #fff;
    }

    .eks-coll__title {
        margin-bottom: 25px;
        font-size: 24px;
    }

    .eks-coll__name {
        margin-top: 12px;
        font-size: 14px;
    }

    .eks-coll__page {
        min-width: 36px;
        height: 36px;
    }
}

/* Lien « Voir tout » sous une section limitée */
.eks-coll__more {
    margin: 30px 0 0;
    text-align: center;
}

.eks-coll__more a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 4px;
}
