/*

 Theme Name:   Divi Child

 Theme URI:    http://elegantthemes.com/

 Description:  Divi Child Theme

 Author:       ElegantThemes

 Author URI:   http://elegantthemes.com

 Template:     Divi

 Version:      0.1.1

 License:      GNU General Public License v2 or later

 License URI:  http://www.gnu.org/licenses/gpl-2.0.html

 Tags: responsive-layout, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, featured-images, full-width-template, post-formats, rtl-language-support, theme-options, threaded-comments, translation-ready

 Text Domain:  divi-child-theme

*/



/* ==== Add your own styles below this line ====

 * -------------------------------------------- */



.et-social-linkedin a.icon:before {

font-family: 'ETmodules';

content: '\e09d';

}

/* Conteneur de la grille */
.custom-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 2 colonnes */
    gap: 20px;
}

/* Carte produit */
.product-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

/* Conteneur pour les images avec padding interne */
.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Ratio 1:1 */
    overflow: hidden;
    border-radius: 15px;
}

.product-image-wrapper .product-link {
    position: absolute;
    top: 5%; /* Padding en haut */
    left: 5%; /* Padding à gauche */
    width: 90%; /* Ajuster pour inclure le padding */
    height: 90%; /* Ajuster pour inclure le padding */
    display: block;
    overflow: hidden;
}

/* Images */
.product-image-wrapper .product-link .primary-image,
.product-image-wrapper .product-link .secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Remplir le conteneur tout en conservant les proportions */
    transition: opacity 0.3s ease-in-out;
}

/* Effet hover */
.product-image-wrapper .product-link .secondary-image {
    opacity: 0;
}

.product-image-wrapper .product-link:hover .primary-image {
    opacity: 0;
}

.product-image-wrapper .product-link:hover .secondary-image {
    opacity: 1;
}

/* Conteneur des détails */
.custom-product-details {
    padding: 15px;
    text-align: left;
}

/* Alignement titre, prix et bouton */
.product-info {
    display: bloc;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Ajuste si le contenu est long */
    gap: 10px;
}

/* Titre du produit */
.custom-product-details .product-title {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0;
}

/* Prix du produit */
.custom-product-details .product-price {
    font-size: 1em;
    color: #000;
    font-weight: normal;
    margin-top: 5px;
}

/* Bouton Ajouter au panier */
.product-add-to-cart .button {
    display: inline-block;
    background: #0071a1;
    color: #fff;
    margin-top: 10px!important;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
}

.product-add-to-cart .button:hover {
    background: #005580;
    transform: scale(1.05);
}

.product-add-to-cart .added_to_cart {
    display: none !important;
}


/* Grille en 1 colonne pour les écrans mobiles */
@media (max-width: 768px) {
    .custom-products-grid {
        grid-template-columns: 1fr; /* Une seule colonne */
    }

    .product-card {
        margin: 0 auto; /* Centrer les cartes si nécessaire */
    }
}


.custom-pagination {
    text-align: center;
    margin: 40px 0;
}

.custom-pagination a {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    color: #0d3923;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.custom-pagination a:hover {
    background-color: #0d3923;
    color: #fff;
}

.custom-pagination .current {
    padding: 8px 12px;
    background-color: #0d3923;
    color: #fff;
    border-radius: 3px;
    border: 1px solid #0d3923;
}
.out-of-stock-message {
    display: inline-block;
    margin-top: 10px!important;
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-weight: bold;
}

.responsive-slide {
    position: relative;
    display: flex;
    min-height: 500px;
    flex-direction: row;
}

.slide-bg-desktop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.slide-bg-mobile {
    display: none;
    width: 100%;
    height: auto;
}

.slide-bg-mobile img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.slide-text {
    position: absolute;
    left: 10%;
    width: 30%;
    top: 0;
    bottom: 0;
    z-index: 2;
    background: var(--fond-couleur, #fff);
    display: flex;
    align-items: center;
    padding: 2rem;
}

.slide-text-inner {
    width: 100%;
}

.slider-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 35px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.slider-btn:hover {
    opacity: 0.85;
}


/* VERSION MOBILE */
@media screen and (max-width: 768px) {
    .responsive-slide {
        flex-direction: column;
        min-height: auto;
    }

    .slide-bg-desktop {
        display: none;
    }

    .slide-bg-mobile {
        display: block;
    }

    .slide-text {
        position: relative;
        align-items: stretch;
        width: 100%;
        min-height: 300px;
        left: 0;
        background: var(--fond-couleur, #fff);
    }
    .slide-text p {
    margin: 0 0 1rem 0;
    }

}

.swiper-pagination-bullet {
    background: #fff!important;
    opacity: 1;
}

.swiper-pagination-bullet-active {
    background: #11583d!important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
}

/* ===== QUICK VIEW STYLES ===== */

/* Bouton Quick View */
.product-image-wrapper {
    position: relative;
}

.quick-view-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 20;
    opacity: 0;
}

.product-card:hover .quick-view-button {
    opacity: 1;
}

.quick-view-button:hover {
    background: #11583d;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.quick-view-button svg {
    color: #333;
    transition: color 0.3s ease;
}

.quick-view-button:hover svg {
    color: white;
}

/* Bouton "Voir les options" pour produits variables */
.view-options-button {
    background-color: #11583d !important;
    color: white !important;
}

.view-options-button:hover {
    background-color: #0d4530 !important;
}

/* Modale Quick View */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.quick-view-modal.active {
    opacity: 1;
    visibility: visible;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.quick-view-wrapper {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.quick-view-modal.active .quick-view-wrapper {
    transform: scale(1);
}

.quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.quick-view-close:hover {
    background: #11583d;
    color: white;
    transform: rotate(90deg);
}

.quick-view-container {
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
}

/* Loader */
.quick-view-loader {
    text-align: center;
    padding: 60px 20px;
}

.quick-view-loader .spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #11583d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contenu Quick View */
.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.quick-view-images {
    position: sticky;
    top: 0;
}

.quick-view-main-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-view-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.quick-view-gallery-thumb {
    width: 100%;
    height: auto;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-view-gallery-thumb:hover,
.quick-view-gallery-thumb.active {
    border-color: #11583d;
    transform: scale(1.05);
}

.quick-view-details h2 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #333;
}

.quick-view-price {
    font-size: 24px;
    font-weight: bold;
    color: #11583d;
    margin-bottom: 20px;
}

.quick-view-description {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

/* Sélecteurs de variations */
.quick-view-variations {
    margin-bottom: 25px;
}

.variation-selector {
    margin-bottom: 15px;
}

.variation-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.variation-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background: white;
}

.variation-select:focus {
    outline: none;
    border-color: #11583d;
}

/* Boutons */
.quick-view-add-to-cart {
    margin-bottom: 20px;
}

.view-full-product,
.view-full-product-link {
    margin-top: 20px;
}

.quick-view-content .button {
    width: 100%;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    text-decoration: none;
}

.quick-view-content .add_to_cart_button {
    background: #11583d;
    color: white;
}

.quick-view-content .add_to_cart_button:hover {
    background: #0d4530;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 88, 61, 0.3);
}

.quick-view-content .add_to_cart_button.loading {
    background: #999;
    cursor: wait;
}

.quick-view-content .add_to_cart_button.added {
    background: #28a745;
}

.quick-view-content .add_to_cart_button.disabled,
.quick-view-content .add_to_cart_button:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.view-full-product,
.view-full-product-link {
    background: transparent;
    color: #11583d;
    border: 2px solid #11583d;
}

.view-full-product:hover,
.view-full-product-link:hover {
    background: #11583d;
    color: white;
}

/* Positionnement du bouton Quick View sur la carte produit */
.product-card {
    position: relative;
}

.product-add-to-cart {
    position: relative;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .custom-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Forcer les cartes à avoir la même taille */
    .product-card {
        width: 100%;
        display: flex;
        flex-direction: column;
    }
    
    /* S'assurer que le conteneur d'images garde le ratio 1:1 */
    .product-image-wrapper {
        position: relative;
        width: 100%;
        padding-top: 100%;
        flex-shrink: 0;
    }
    
    /* Détails du produit */
    .custom-product-details {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    
    .quick-view-content {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .quick-view-wrapper {
        width: 95%;
        max-width: 95%;
        margin: 2.5vh auto;
        max-height: 95vh;
    }
    
    .quick-view-container {
        padding: 15px;
        max-height: 90vh;
    }
    
    .quick-view-images {
        width: 100%;
        position: relative;
    }
    
    .quick-view-details {
        width: 100%;
    }
    
    .quick-view-details h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .quick-view-price {
        font-size: 18px;
    }
    
    .quick-view-gallery {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .quick-view-button {
        opacity: 1;
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
    }
    
    .quick-view-button svg {
        width: 18px;
        height: 18px;
    }
    
    .quick-view-close {
        width: 36px;
        height: 36px;
        top: 10px;
        right: 10px;
        font-size: 24px;
    }
    
    .quick-view-description {
        font-size: 14px;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .quick-view-social-share {
        flex-wrap: wrap;
        padding: 10px 0;
        margin: 10px 0;
    }
    
    .social-share-btn {
        width: 32px;
        height: 32px;
    }
    
    .variation-select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

/* ============================================
   CAROUSEL PRODUITS HOME
   ============================================ */

.products-carousel-wrapper {
    padding: 40px 20px 80px;
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.products-carousel {
    padding: 0 0 40px;
    max-width: 100%;
    overflow: hidden !important; /* Masquer les débordements */
}

.products-carousel .swiper-wrapper {
    position: relative;
    width: 100%;
    height: auto;
}

.products-carousel .swiper-slide {
    height: auto;
    display: flex;
    padding-bottom: 10px; /* Espace interne pour éviter le chevauchement */
}

.products-carousel .product-card {
    width: 100%;
    height: 100%;
}

/* Flèches de navigation - désactivées */
.products-carousel .swiper-button-prev,
.products-carousel .swiper-button-next {
    display: none !important;
}

/* Pagination - bien en dessous et visible */
.products-carousel .swiper-pagination {
    position: absolute;
    bottom: -7px !important;
    left: 0;
    right: 0;
    z-index: 50 !important;
    margin-top: 30px;
    text-align: center;
}

.products-carousel .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #afafaf !important;
    opacity: 1 !important;
    transition: all 0.3s ease;
}

.products-carousel .swiper-pagination-bullet-active {
    background: #2d5016 !important;
    width: 35px;
    border-radius: 6px;
}

/* Boutons du carousel - même style que la boutique */
.products-carousel .add_to_cart_button,
.products-carousel .view-options-button {
    background-color: #2d5016 !important;
    color: white !important;
    border: none !important;
}

.products-carousel .add_to_cart_button:hover,
.products-carousel .view-options-button:hover {
    background-color: #1f3810 !important;
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .products-carousel-wrapper {
        padding: 30px 15px 90px;
        overflow: hidden;
    }
    
    .products-carousel {
        padding: 0 0 50px;
    }
    
    .products-carousel .swiper-slide {
        padding-bottom: 20px;
    }
    
    .products-carousel .swiper-button-prev,
    .products-carousel .swiper-button-next {
        width: 36px;
        height: 36px;
        bottom: -15px !important;
    }
    
    .products-carousel .swiper-button-prev {
        left: 15px !important;
    }
    
    .products-carousel .swiper-button-next {
        right: 15px !important;
    }
    
    .products-carousel .swiper-button-prev:hover,
    .products-carousel .swiper-button-next:hover {
        opacity: 1;
    }
    
    .products-carousel .swiper-button-prev::after,
    .products-carousel .swiper-button-next::after {
        font-size: 16px;
    }
    
    .products-carousel .swiper-pagination {
        bottom: 13px !important;
    }
}

@media (max-width: 480px) {
    .products-carousel-wrapper {
        padding: 20px 10px 100px;
        overflow: hidden;
    }
    
    .products-carousel {
        padding: 0 0 60px;
    }
    
    .products-carousel .swiper-slide {
        padding-bottom: 30px;
    }
    
    .products-carousel .swiper-button-prev,
    .products-carousel .swiper-button-next {
        width: 34px;
        height: 34px;
        bottom: -15px !important;
    }
    
    .products-carousel .swiper-button-prev {
        left: 10px !important;
    }
    
    .products-carousel .swiper-button-next {
        right: 10px !important;
    }
    
    .products-carousel .swiper-pagination {
        bottom: 13px !important;
    }
}
