/**
 * Spring Court - Product Miniature Styles
 * 
 * @author    Neptune Team
 * @copyright Spring Court
 * @license   Proprietary
 */

/* ==============================================================================
   MINIATURE PRODUIT SPRING COURT - STYLE RECHERCHE
   ============================================================================== */

.spring-court-miniature {
    position: relative;
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
}

.spring-court-product-item {
    width: 100%;
    position: relative;
}

/* ==============================================================================
   INFORMATIONS DU PRODUIT (nom, prix, wishlist)
   ============================================================================== */

/* .js-product.product .product-info.thumbnail-container {
    position: absolute;
    top: 1px;
    right: 1px;
    height: fit-content;
    background: transparent;
    margin: 0;
    z-index: 2;
} */

.product-miniature .product-link {
    text-decoration: none;
    color: inherit;
}

.product-miniature .product-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #333;
    text-transform: inherit;
}

.product-miniature .product-price {
    margin: 0;
}

.product-miniature .product-price .price {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.product-miniature .product-price .regular-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-right: 8px;
}

/* Wishlist PrestaShop natif */
.product-miniature .product-list-reviews {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
}

.product-miniature .product-list-reviews .wishlist-button-add {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    height: auto !important;
    min-width: auto !important;
    padding: 4px !important;
    border-radius: 0 !important;
}

.spring-court-product-item .product-info.thumbnail-container {
    position: absolute;
    top: 25px;
    width: 100%;
    left: 0;
    margin: 0;
    overflow: unset;
    background: unset;
    z-index: 5; /* Entre l'image hover (z-index: 1) et les flèches (z-index: 10) */
}

.spring-court-product-item .product-info.thumbnail-container .product-link .product-name,
.spring-court-product-item .product-info.thumbnail-container .product-link .product-price {
    padding-left: 25px;
}

.spring-court-product-item .product-info.thumbnail-container .wishlist-button-add {
    position: absolute;
    right: 25px;
    top: 0px;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    width: auto !important;
    border-radius: 0 !important;
}

.spring-court-product-item .product-info .wishlist-button-add.wishlist-button-product {
    display: none;
}

.product-list-reviews .wishlist-button-add .material-icons {
    font-size: 20px !important;
    color: #ccc !important;
    transition: color 0.3s ease;
}

.product-list-reviews .wishlist-button-add:hover .material-icons,
.product-list-reviews .wishlist-button-add.active .material-icons {
    color: #e74c3c !important;
}

/* ==============================================================================
   IMAGE DU PRODUIT
   ============================================================================== */

.spring-court-product-item .product-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* .spring-court-miniature:hover .product-image img {
    transform: scale(1.05);
} */

/* ==============================================================================
   EFFET HOVER IMAGE SECONDAIRE
   ============================================================================== */

.product-image-container {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 100%;
}

/* Image principale : visible par défaut, disparaît au hover */
.product-image-container .product-image-main {
    opacity: 1;
    transition: opacity 400ms ease-out;
}

/* Hover sur .product-image (englobe images + flèches) pour garder l'effet actif */
.product-image:hover .product-image-container.has-hover-image .product-image-main {
    opacity: 0;
}

/* Image secondaire : invisible par défaut, apparaît au hover */
.product-image-container .product-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 1; /* Sous les flèches de navigation */
    transition: opacity 400ms ease-in;
}

.product-image:hover .product-image-container.has-hover-image .product-image-hover {
    opacity: 1;
}

/* Flèches de navigation couleurs */
.color-navigation-arrows {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 25px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10; /* Au-dessus de l'image hover */
}

.spring-court-miniature:hover .color-navigation-arrows {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.color-nav-btn {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    box-shadow: none;
}

.color-nav-btn:focus,
.color-nav-btn:active {
    outline: none;
    box-shadow: none;
}

.color-nav-btn__img {
    width: 10px!important;
    height: auto;
    display: block;
}

/* ==============================================================================
   COULEURS DU PRODUIT
   ============================================================================== */

.product-colors {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    bottom: 25px;
    right: 25px;
}

.color-swatch-link.active {
    position: relative;
}
.color-swatch-link.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 1px;
    width: 90%;
    height: 0.75px;
    background-color: black;
}

.color-swatch-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    display: inline-block;
    line-height: 0;
}

.color-swatch {
    width: 14px;
    height: 14px;
    border: 1px solid #ddd;
    /* border-radius: 50%; */
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.color-swatch-link:hover .color-swatch {
    transform: scale(1.2);
    border-color: #333;
}

.color-swatch-link.active .color-swatch {
    /* border-color: #333;
    border-width: 1px; */
}
.wishlist-button-add i.material-icons {
    display: none;
}
.wishlist-button-add::before,
.wishlist-button-product::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('../img/sc-wishlist.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

.wishlist-button-add.wishlist-checked::before,
.wishlist-button-product.wishlist-checked::before,
.wishlist-button-add[data-checked="true"]::before,
.wishlist-button-product[data-checked="true"]::before {
    background-image: url('../img/sc-wishlist-filled.svg');
}
/* ==============================================================================
   RESPONSIVE
   ============================================================================== */

@media (max-width: 480px) {
    .product-price span.regular-price {
        font-size: 12px;
    }
    .product-miniature .product-name,
    .product-miniature .product-price .price {
        font-size: 12px;
        margin: 0;
        font-weight: 500;
    }
    .product-miniature .product-colors {
        bottom: 10px;
        right: 10px;
    }
    
    .product-miniature .product-list-reviews {
        top: 12px;
    }
    
    .product-list-reviews .wishlist-button-add .material-icons {
        font-size: 18px !important;
    }
    
    .product-miniature .color-navigation-arrows {
        padding: 0 12px;
    }
    
    .product-miniature .color-nav-btn__img {
        width: 10px;
    }
    
    .product-miniature .color-swatch {
        width: 10px;
        height: 10px;
    }
    .product-miniature .spring-court-product-item div.product-info.thumbnail-container {
        top: 0;
        padding-top: 10px;
    }
    .spring-court-product-item .product-info.thumbnail-container .product-link .product-name, .spring-court-product-item .product-info.thumbnail-container .product-link .product-price {
        padding-left: 10px;
        width: 80%;
    }
    .wishlist-button-add::before,
    .wishlist-button-product::before {
        height: 12px;
        width: 12px;
    }
    .spring-court-product-item .product-info.thumbnail-container .wishlist-button-add {
        right: 0;
    }
}
@media (min-width: 1200px) {
    .spring-court-product-item .product-image { 
        min-height: 500px;
    }
}