/*
Theme Name: Uncode Child
Description: Child theme for Uncode theme
Author: Undsgn™
Author URI: http://www.undsgn.com
Template: uncode
Version: 1.0.0
Text Domain: uncode
*/

.woocommerce span.soldout {
    position: relative;;
  }
  
  .swatch.swatch--disabled {
    position: relative;
    cursor: not-allowed;
    opacity: 1;
    border-color: #eaeaea !important;
  }
  .swatch.swatch--disabled::before {
    content: "";
    position: absolute;
    inset: .001px;
    border-radius: inherit;
    background-image: linear-gradient(to top right, transparent calc(50% - 1px), #CF000F 50%, transparent calc(50% + 1px)), linear-gradient(to top left, transparent calc(50% - 1px), #CF000F 50%, transparent calc(50% + 1px));
    transition: opacity .2s ease;
    z-index: 2;
  }
  .swatch-type-label {
    font-weight: 600;
  }
  .stock.out-of-stock {
    display: none;
  }
  .woocommerce span.soldout {
    background-color: #121212 !important;
    color: #f5f0ea !important;
}

.wms_pickup_open_modal_mondial_relay {
    background-color: transparent;
    color: #bc9c61 !important;
}
.shop_table tr.woocommerce-shipping-totals td {
    padding-left: 0 !important;
    text-align: left !important;
}
  /* Style de l'arrière-plan de la popup (masqué par défaut) */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    transition: opacity 300ms;
    visibility: hidden;
    opacity: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Devient visible quand l'ancre #popup-interet est activée */
.custom-modal-overlay:target {
    visibility: visible;
    opacity: 1;
}

/* La boîte blanche de la popup */
.custom-modal-box {
    background: #fff;
    padding: 36px;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
}

/* Bouton de fermeture (la croix X) */
.custom-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}
.custom-modal-close:hover {
    color: #ff0000;
}

.bloc-video-acf {
    margin-bottom: -36px;
}

.woocommerce-shipping-totals {
    display: flex;
    flex-direction: column;
}

@media (max-width: 569px) {
    .menu-container .logo-container {
        padding: 27px 18px !important;
        }
        .mobile-menu-button {
        padding: 0 18px;
        }
        .mobile-additional-icons {
        right: 60px;
        }
        .top-menu.top-menu-enhanced .row-menu-inner {
            padding-block: 9px;
        }

        .top-menu.top-menu-enhanced .row-menu-inner .menu-bloginfo {
            padding-left: 0 !important;
        }
        .top-menu-enhanced .menu-mini.menu-smart, .top-menu-enhanced .menu-mini.unmenu-block {
            padding-right: 0;
        }
    .main-container .row-container .double-h-padding {
        padding-left: 18px;
        padding-right: 18px;
    }
    .main-container .row-container .single-h-padding {
        padding-left: 18px;
        padding-right: 18px;
    }
    .main-container .row-container .row-parent {
        padding: 36px 18px 36px 18px;
    }
}


@media (max-width: 767px) {
    /* 1. Force stacked layout into a horizontal, scrollable row */
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        
        /* Generates the container for the dots */
        scroll-marker-group: after !important; 
    }

    /* 2. Style individual slide items */
    .woocommerce-product-gallery .woocommerce-product-gallery__image {
        width: 100% !important;
        min-width: 100% !important;
        scroll-snap-align: start !important;
        margin-bottom: 0 !important;
    }

    /* 3. Style the auto-generated dot container wrapper */
    .woocommerce-product-gallery .woocommerce-product-gallery__wrapper::scroll-marker-group {
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 15px !important;
        width: 100% !important;
    }

    /* 4. Create and style the individual dots */
    .woocommerce-product-gallery .woocommerce-product-gallery__image::scroll-marker {
        content: "" !important;
        display: inline-block !important;
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        background-color: red !important; /* Inactive dot color */
        cursor: pointer !important;
        transition: background-color 0.2s ease, transform 0.2s ease !important;
    }

    /* 5. Style the active dot based on scroll position */
    .woocommerce-product-gallery .woocommerce-product-gallery__image::scroll-marker:target-current {
        background-color: #000000 !important; /* Active dot color - adjust to match your theme */
        transform: scale(1.2) !important;
    }
}