.el-sc {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
    background-color: #FEFCF8;
    ;
    border-radius: 0;
    z-index: 2;
    --card-w: 23vw;
    --card-h: 480px;
    --gap: 0px;
}

@media (max-width: 1200px){
	.el-sc {
		--gap: 15px;
	}
}

.el-sc__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 44px;
    padding-right: 15%;
    padding-left: 15%;
}

.el-sc__title {
    font-size: 32px;
    color: #b34b3d;
    font-weight: 700;
    margin: 0 0 8px;
    font-family: 'EB Garamond';
}

.el-sc__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 3%;
}

.el-sc__all {
    background: #111;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
}

.el-sc__nav {
    display: flex;
    gap: 12px;
}

.el-sc__nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: #000000;
    cursor: pointer;
    color: white;
    font-weight: bolder;
}

.el-sc__nav button:disabled,
.el-sc__nav button.is-disabled {
    background: #ccc !important;
    color: #888 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.el-sc__track {
    display: flex;
    gap: var(--gap);
    overflow: hidden;
    scroll-snap-type: x mandatory;
}



.el-sc__img {
    width: 100%;
    height: calc(var(--card-h) * 0.55);
    /* 55% de la hauteur de la carte */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
}

.el-sc__img img {
    max-height: 100%;
    max-width: 90%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin-bottom: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.product-flags {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 2;
}

.product-flag {
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-flag.bio {
    background: #3c9442;
}

.product-flag.new {
    background: #b34b3d;
}

.product-flag.bestseller {
    background: #111;
}

.el-sc__body {
    width: 100%;
    text-align: left;
    margin-bottom: 18px;
}

.el-sc__name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.el-sc__brand {
    font-size: 18px;
    color: #222;
}

.el-sc__cta {
    margin-top: auto;
    align-self: flex-end;
    padding-top: 16px;
}

.el-sc__more {
    background: #b34b3d;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

/* Responsivité */
.el-sc__item {
    flex: 0 0 calc((100vw - 2*15%) / 4 - var(--gap));
    max-width: calc((100vw - 2*15%) / 4 - var(--gap));
    scroll-snap-align: start;
}

/* Normaliser la hauteur des miniatures */
.el-sc .product-miniature {
    height: var(--card-h);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    /* éviter que le CTA soit coupé */
}

.el-sc .thumbnail-container {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column
}

.el-sc .thumbnail-top {
    flex: 0 0 calc(var(--card-h) * 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative
}

.el-sc .thumbnail-top .product-thumbnail {
    display: block;
    width: 100%;
    height: 100%
}

.el-sc .thumbnail-top picture {
    width: 100%;
    height: 100%;
    display: block
}

.el-sc .thumbnail-top img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #fff
}

.el-sc .product-description {
    flex: 1 1 auto;
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-content: start;
    padding-bottom: 88px
}

.el-sc .product-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    line-height: 1.3
}

.el-sc .el-provenance {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
    line-height: 1.2
}

.el-sc .el-cta-wrap {
    z-index: 2
}

.el-sc .el-cta-wrap {
    position: absolute;
    right: 16px;
    bottom: 16px
}

@media (max-width: 1200px) {
    .el-sc {
        --card-w: 30vw;
        --card-h: 460px;
    }
}

@media (max-width: 992px) {
    .el-sc {
        --card-w: 45vw;
        --card-h: 440px;
        --gap: 20px;
    }

    .el-sc__track {
        margin-top: 10% !important;
    }



}

@media (max-width: 768px) {
    .el-sc {
        --card-w: 80vw;
        --card-h: 420px;
        --gap: 16px;
    }

    .el-sc__item {
        flex: 0 0 calc(100vw/1.2);
        max-width: calc(100vw/1.2)
    }

    .el-sc__header {
        align-items: center;
        gap: 12px;
    }

    .el-sc__header {
        display: block;
    }

    .el-sc {
        --overshoot: none !important;
    }
}



.el-sc .product-description {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 0;
    min-height: 120px;
}

.el-sc .el-provenance {
    margin-top: 4px;
    margin-bottom: auto;
}

.el-sc .el-cta-wrap {
    position: relative !important;
    right: auto;
    bottom: auto;
    margin-top: 12px;
    display: flex;
    justify-content: flex-end;
}

.el-sc .product-description {
    grid-template-rows: auto auto 1fr auto;
    padding-bottom: 0 !important;
}

.el-sc .el-cta-wrap {
    align-self: flex-end;
    margin-top: 12px;
    position: relative !important;
}

.el-sc .product-miniature {
    display: flex;
    flex-direction: column;
    height: auto !important;
    min-height: 504px !important;
    max-height: 600px;
}

.el-sc .product-description {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.el-sc .el-provenance {
    margin-bottom: auto;
    min-height: 2.4em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.el-sc .el-cta-wrap {
    margin-top: auto;
    position: relative !important;
    align-self: flex-end;
}


a:focus,
a:hover {
    color: white;
}


/* --------- RESPONSIVITÉ AMÉLIORÉE --------- */

/* Tablette (992px à 1199px) : 3 cartes */
@media (max-width: 1500px) {
    .el-sc__item {
        flex: 0 0 calc((100% - (2 * var(--gap))) / 3);
        max-width: calc((100% - (2 * var(--gap))) / 3);
    }
}

/* Tablette portrait / petits laptops (768px à 991px) : 2 cartes */
@media (max-width: 991px) {
    .el-sc__item {
        flex: 0 0 calc((100% - var(--gap)) / 2);
        max-width: calc((100% - var(--gap)) / 2);
    }
}

/* Mobile (<768px) : 1 carte pleine largeur */
@media (max-width: 767px) {
    .el-sc__item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .el-sc__header {
        display: block;
        text-align: center;
        margin-bottom: 24px;
        padding: 0 20px;
    }

    .el-sc__title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .el-sc__actions {
        justify-content: center;
        margin-top: 12px;
    }

    .el-sc__nav button {
        width: 36px;
        height: 36px;
    }
}

.el-sc .thumbnail-top {
    flex: 0 0 auto;
    height: auto;
    max-height: 250px;
}

.el-sc .thumbnail-top img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.el-sc .product-miniature {
    min-height: auto;
    height: auto !important;
    display: flex;
    flex-direction: column;
}

/* Réduction largeur sur desktop */
@media (min-width: 1200px) {
    .el-sc .product-miniature {
        max-width: 76%;
        margin: 0 auto;
    }

    .el-sc__track {
        margin-top: -3% !important;
    }
}



/* Tablette 768px–1199px : header moins serré */
@media (max-width: 1199px) and (min-width: 768px) {
    .el-sc__header {
        padding-left: 40px;
        padding-right: 40px;
    }
}




:root {
    --overshoot: 24px;
}

@media (max-width: 991px) {
    :root {
        --overshoot: 16px;
    }
}

.product-miniature {
    position: relative;
    overflow: visible;
}

.thumbnail-container,
.thumbnail-top,
.el-thumb {
    position: relative;
    overflow: visible !important;
}

.thumbnail-top picture,
.thumbnail-top img,
.thumbnail-top .product-thumbnail picture,
.thumbnail-top .product-thumbnail img {
    transform: translateY(calc(0.5 * var(--overshoot))) scale(1.1);
    transition: transform 0.25s ease;
    will-change: transform;
    margin-top: -30px;
}


article.product-miniature.js-product-miniature.reviews-loading img:hover {
    /* scale: 1.1; */
}

article.product-miniature:hover {
    /* scale: 1.1; */
}
.product-miniature:hover .thumbnail-top .product-thumbnail picture, .product-miniature:hover .thumbnail-top .product-thumbnail img  {
    transform: translateY(calc(-0.1 * var(--overshoot) - 0.5px)) scale(1.1);
}

.product-miniature .product-flags {
    z-index: 5;
}

.el-sc {
    --overshoot: 7%;
}

.el-sc .thumbnail-top,
.el-sc .el-thumb {
    overflow: visible !important;
}

.el-sc__track {
    overflow-x: hidden;
    overflow-y: visible;
    padding-top: var(--overshoot);
    margin-top: calc(-1 * var(--overshoot));
}

.product-miniature .thumbnail-container .product-thumbnail img {
    background-color: transparent;
}