/* ================================================
   CSS Module webandcie_selectionproduits
   PrestaShop 8.2+
   ================================================ */

.webandcie-selection {
    padding: 20px 0;
    width: 100%;
}

.webandcie-selection h2,
.webandcie-selection h1.webandcie-selection-page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 600;
    color: #333;
}

.webandcie-products {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
    width: 100%;
}

.webandcie-products .product-miniature-container {
    padding: 0 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* 2 produits par ligne */
.webandcie-products.cols-2 .product-miniature-container {
    width: 50%;
}

/* 3 produits par ligne */
.webandcie-products.cols-3 .product-miniature-container {
    width: 33.333%;
}

/* 4 produits par ligne */
.webandcie-products.cols-4 .product-miniature-container {
    width: 25%;
}

/* 5 produits par ligne */
.webandcie-products.cols-5 .product-miniature-container {
    width: 20%;
}

/* 6 produits par ligne */
.webandcie-products.cols-6 .product-miniature-container {
    width: 16.666%;
}

/* ================================================
   STYLES POUR LES PRIX (COMME L'IMAGE)
   ================================================ */

/* Container des prix */
.webandcie-selection .product-price-and-shipping {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 15px 0;
    gap: 5px;
}

/* Prix barré (prix original) - en gris au-dessus */
.webandcie-selection .product-price-and-shipping .regular-price {
    font-size: 18px;
    color: #7a7a7a;
    text-decoration: line-through;
    font-weight: normal;
    order: 1;
}

/* Prix promotionnel (prix réduit) - en rouge et gros en-dessous */
.webandcie-selection .product-price-and-shipping .price {
    font-size: 32px;
    font-weight: bold;
    color: #ff0000;
    order: 2;
    line-height: 1.2;
}

/* Pour les produits SANS réduction - prix normal en noir */
.webandcie-selection .product-price-and-shipping:not(:has(.regular-price)) .price {
    color: #333;
    font-size: 24px;
}

/* Badge de réduction (si activé) */
.webandcie-selection .product-flags .discount {
    background-color: #ff0000;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
    font-size: 14px;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

/* Style des cartes produits */
.webandcie-selection .product-miniature {
    position: relative;
    text-align: center;
    padding: 20px 10px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.webandcie-selection .product-miniature:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Titre du produit */
.webandcie-selection .product-title,
.webandcie-selection .h3.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 10px 0;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.webandcie-selection .product-title a {
    color: #333;
    text-decoration: none;
}

.webandcie-selection .product-title a:hover {
    color: #ff0000;
}

/* Image produit avec effet hover */
.webandcie-selection .product-thumbnail {
    display: block;
    margin: 0 auto 15px;
    overflow: hidden;
}

.webandcie-selection .product-thumbnail img {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.webandcie-selection .product-thumbnail:hover img {
    transform: scale(1.05);
}

/* Bouton "VOIR LE PRODUIT" - style gris comme l'image */
.webandcie-selection .btn-primary,
.webandcie-selection .add-to-cart,
.webandcie-selection .quick-view {
    background-color: #7a7a7a !important;
    color: white !important;
    border: none !important;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 15px;
    width: 100%;
    max-width: 250px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.webandcie-selection .btn-primary:hover,
.webandcie-selection .add-to-cart:hover,
.webandcie-selection .quick-view:hover {
    background-color: #5a5a5a !important;
}

/* Bouton "Découvrir toutes les nouveautés" - style orange comme "Ajouter au panier" */
.webandcie-selection-button-wrapper {
    text-align: center;
    margin-top: 0;
    padding: 10px 0;
}

.webandcie-selection-button {
    display: inline-block;
    background-color: #f58220 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    letter-spacing: 0.5px;
}

.webandcie-selection-button:hover {
    background-color: #e0751a !important;
    color: #ffffff !important;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(245, 130, 32, 0.3);
}

.webandcie-selection-button:active {
    transform: translateY(0);
}

.webandcie-selection-button:visited {
    color: #ffffff !important;
}

/* Cœur : fond blanc avec cœur orange par défaut, fond #fe9234 avec cœur blanc au survol */
.webandcie-selection [class*="wishlist"] {
    background-color: #ffffff !important;
}
.webandcie-selection [class*="wishlist"] svg,
.webandcie-selection [class*="wishlist"] path,
.webandcie-selection [class*="wishlist"] i {
    color: #fe9234 !important;
    fill: #fe9234 !important;
    stroke: #fe9234 !important;
}
.webandcie-selection [class*="wishlist"]:hover,
.webandcie-selection .product-miniature:hover [class*="wishlist"] {
    background-color: #fe9234 !important;
}
.webandcie-selection [class*="wishlist"]:hover svg,
.webandcie-selection [class*="wishlist"]:hover path,
.webandcie-selection [class*="wishlist"]:hover i,
.webandcie-selection .product-miniature:hover [class*="wishlist"] svg,
.webandcie-selection .product-miniature:hover [class*="wishlist"] path,
.webandcie-selection .product-miniature:hover [class*="wishlist"] i {
    color: #ffffff !important;
    fill: #ffffff !important;
    stroke: #ffffff !important;
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* Responsive - Tablette (< 1200px) */
@media (max-width: 1199px) {
    .webandcie-products.cols-5 .product-miniature-container,
    .webandcie-products.cols-6 .product-miniature-container {
        width: 25%;
    }
}

/* Responsive - Petite tablette (< 992px) */
@media (max-width: 991px) {
    .webandcie-products.cols-4 .product-miniature-container,
    .webandcie-products.cols-5 .product-miniature-container,
    .webandcie-products.cols-6 .product-miniature-container {
        width: 33.333%;
    }
    
    .webandcie-products.cols-3 .product-miniature-container {
        width: 50%;
    }
}

/* Responsive - Mobile (< 768px) */
@media (max-width: 767px) {
    .webandcie-selection h2 {
        font-size: 1.5em;
    }

    .webandcie-products .product-miniature-container {
        width: 50%;
    }

    /* Adapter la taille des prix sur mobile */
    .webandcie-selection .product-price-and-shipping .regular-price {
        font-size: 16px;
    }
    
    .webandcie-selection .product-price-and-shipping .price {
        font-size: 26px;
    }

    /* Bouton pleine largeur sur mobile */
    .webandcie-selection .btn-primary,
    .webandcie-selection .add-to-cart,
    .webandcie-selection .quick-view {
        padding: 10px 20px;
        font-size: 13px;
        max-width: 100%;
    }
}

/* Responsive - Très petit mobile (< 480px) - 1 SEULE COLONNE */
@media (max-width: 479px) {
    .webandcie-products .product-miniature-container {
        width: 100% !important;
    }

    .webandcie-selection .product-price-and-shipping .price {
        font-size: 24px;
    }
}
