/*
Theme Name: Themify Ultra Child LE VERGER DES ROUX
Description: A child theme of Themify Ultra
Template: themify-ultra
Author: DDM3 (dd@ddm3.com)
*/

/* Woohoo! Let's customize! */

/* ============================================================
   00 — RESET / GLOBAL FIXES
   ============================================================ */

/* Petits points gris sur iPhone */
.tf_lazy:after,
.tf_lazy:before {
    display: none;
}

/* Verrouillage horizontal sans casser Woo */
html { overflow-x: clip; }
body { overflow-x: clip; }

/* Box model OK */
*, *::before, *::after { box-sizing: border-box; }

/* Médias responsives (safe) */
img, iframe, video { max-width: 100%; height: auto; }
table { max-width: 100%; }



/* ============================================================
   10 — NAVIGATION MOBILE (Themify Ultra)
   ============================================================ */

/* Ouverture forcée des sous-menus mobiles */
.mobile-menu-module .sub-menu {
    display: block !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Supprimer les flèches des sous-menus */
.mobile-menu-module ul a > i.toggle-menu {
    display: none;
}

/* Supprimer overlays/flous du menu mobile */
.mobile-menu-slide.module-menu.right::before,
.mobile-menu-slide.module-menu.right::after {
    display: none !important;
}

/* Flou sur ouverture du menu mobile */
.body-overlay {
    backdrop-filter: blur(2px) !important;
    background: rgba(0,0,0,0.15) !important;
    opacity: 1 !important;
}

/* Desktop : voile noir 50% sans flou */
@media (min-width: 768px) {
    .body-overlay {
        backdrop-filter: none !important;
        background: rgba(0,0,0,0.5) !important;
    }
}




/* Masquer le texte "Effacer" des variations WooCommerce */
a.reset_variations {
    display: none !important;
}

a.reset_variations {
    visibility: hidden;
}

/* Réduire la largeur du sélecteur "Poids" S'adapte au contenu
.variations select#pa_poids {
    width: auto;
    min-width: 90px; */
}

/* Réduire la largeur du sélecteur "Poids" */
.variations td.value {
    flex: 0 0 auto !important;
}

.variations select#pa_poids {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
}

/* Décaler le sélecteur de 20px après "Poids" */
/* Ligne variations en flex */
.variations tr {
    display: flex;
    align-items: center;
}

/* Espace après "Poids" */
.variations th.label {
    margin-right: 10px !important;
}

/* Typo du prix de la variation */
.woocommerce-variation-price .price,
.woocommerce-variation-price .amount {
    color: #a32117 !important;   /* même rouge que le prix principal */
    font-size: 1.2em !important;
    font-weight: 600;
}

.woocommerce-variation-price {
    font-family: inherit;
}


/* Masquer le prix principal UNIQUEMENT pour les produits à variations */
/* FICHE PRODUIT UNIQUEMENT — masquer la fourchette de prix */
body.single-product .woocommerce-variation-price ~ .module-product-price,
body.single-product .woocommerce-variation-price ~ p.price {
    display: none !important;
}

/* Themify / plage de prix injectée */
body.single-product .module-product-price p.price:has(span[aria-hidden="true"]) {
    display: none !important;
}

/* Sécurité produit variable */
body.single-product.product-type-variable .module-product-price {
    display: none !important;
}

/* Logo au sommet du menu vertical */
.mobile-menu-slide.module-menu.right .nav::before {
    content: "";
    display: block;
    width: 200px;
    height: 200px;
    margin: -40px auto 0;   /* ← marge basse */
    padding-bottom: 20px;  /* ← espace sous le logo */
    background-image: url("https://www.levergerdesroux.fr/wp-content/uploads/2025/11/Logo-verger-des-roux-noir-1.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    position: relative;
    left: 10%;
    transform: translateX(-30%);
}

/* Adresse en anglais dans validation de commande */

/* Supprimer le texte du label */
label[for="billing_address_1"] {
    visibility: hidden;
    position: relative;
}

/* Réinjecter le bon texte */
label[for="billing_address_1"]::after {
    content: "Adresse *";
    visibility: visible;
    position: absolute;
    left: 0;
    top: 0;
    font-size: 16px;
    color: inherit;
}

/* Centrage vertical du pays (Select2) */
.woocommerce-checkout .select2-selection--single {
  display: flex !important;
  align-items: center !important;
}


/* Aligner verticalement le bloc "Notes de commande" avec la colonne gauche */

/* État normal (pas d'adresse différente) */
.woocommerce-checkout .woocommerce-additional-fields {
  margin-top: 40px;
}


/* Masquer images catégories PARTOUT sauf la home */
body:not(.home) .module-product-categories li.product-category img {
    display: none !important;
}


/* Transformer en vrai menu horizontal serré */
body:not(.home) .module-product-categories ul.products {
    display: flex !important;
    justify-content: center;
    gap: 25px;          /* ← distance réelle entre catégories */
}

body:not(.home) .module-product-categories li.product-category {
    width: auto !important;
    margin: 0 !important;
}

body:not(.home) .module-product-categories li.product-category.current-cat h3 {
    color: #8b1e12;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 6px;
}

/* ================================
   MENU CATÉGORIES – GAUCHE + RESPONSIVE
   Boutique / Catégories / Produits
   (hors page d'accueil)
================================ */

/* Le module prend toute la largeur */
body:not(.home) #tb_vtdj33,
body:not(.home) .module-product-categories {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: -2px !important; /* rattrapage padding Themify */
    margin-right: 0 !important;
    text-align: left !important;
}

/* Liste des catégories */
body:not(.home) #tb_vtdj33 ul.products,
body:not(.home) .module-product-categories ul.products {
    display: flex !important;
    flex-wrap: wrap !important;          /* 🔥 RESPONSIVE */
    justify-content: flex-start !important;
    padding-left: 0 !important;
    margin: 0 !important;
    column-gap: 18px !important;         /* 🔧 resserrage horizontal */
    row-gap: 10px !important;            /* espace vertical */
}

/* Chaque catégorie garde sa taille naturelle */
body:not(.home) #tb_vtdj33 ul.products li,
body:not(.home) .module-product-categories ul.products li {
    flex: 0 0 auto !important;
    margin: 0 !important;
    white-space: nowrap;
    text-align: left !important;
}

/* Supprimer le padding/marge parasite sur le 1er item */
body:not(.home) #tb_vtdj33 ul.products li:first-child,
body:not(.home) .module-product-categories ul.products li:first-child {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

/* Correction finale : supprimer l'indentation du 1er item */
body:not(.home) #tb_vtdj33 ul.products,
body:not(.home) .module-product-categories ul.products {
    margin-left: -18px !important; /* ajuste finement : -12 / -16 / -20 */
}

/* Catégorie active en gras EN .JS dans WP CODE*/
body:not(.home) .module-product-categories li.product-category.is-active h3{
  font-weight: 700 !important;
}

/* Supprimer complètement la catégorie "Non classé" (sans trou) */
.module-product-categories li.product-category:has(a[href*="zzon-classe"]) {
    display: none !important;
}

/* Supprimer complètement la catégorie "Non classé" (sans trou) pour vieux navigateurs*/

.module-product-categories li.product-category.non-classe,
.module-product-categories li.product-category.uncategorized {
    display: none !important;
}


/* Masquer "Read More" seulement si l'ajout au panier est possible */
/* Masquer définitivement le "Read More" du plugin */
.single-product p.stock.in-stock,
.single-product p.stock.out-of-stock {
    display: none !important;
}


/* === Back In Stock : couleurs personnalisées === */

/* Bordure du bloc */
.cwginstock-panel-primary {
    border-color: #0f3d18 !important;
}

/* Bandeau / titre */
.cwginstock-panel-heading {
    background-color: #0f3d18 !important;
    border-color: #0f3d18 !important;
    color: #ffffff !important;
}

/* Texte du titre */
.cwginstock-panel-heading h4 {
    color: #ffffff !important;
}

/* Bouton "Tenez moi au courant" */
.cwgstock_button {
    background-color: #ab0202 !important;
    border-color: #ab0202 !important;
    color: #ffffff !important;
    border-radius: 999px; /* garde ton style arrondi */
}

/* Hover bouton */
.cwgstock_button:hover {
    background-color: #8f0101 !important;
    border-color: #8f0101 !important;
}

/* Centrage horizontal du bouton Back In Stock */
.cwginstock-panel-body {
    text-align: center;
}

.cwgstock_button {
    float: none !important;
    display: inline-block !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
Ajoute simplement ce CSS :

/* Bouton Back In Stock – hover vert, sans effet parasite */
.cwgstock_button {
    box-shadow: none !important;
    transform: none !important;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cwgstock_button:hover,
.cwgstock_button:focus {
    background-color: #0f3d18 !important; /* vert */
    color: #ffffff !important;
    box-shadow: none !important;
    transform: none !important;
}


/* MENU CATEGORIES AVEC WPCODE PHP - - Desktop : caché */
./* Dropdown catégories – mobile only */
.wc-categories-dropdown {
    display: none;
    margin: 20px 0;
}

.wc-categories-dropdown select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
}

/* Afficher uniquement en mobile */
@media (max-width: 768px) {
    .wc-categories-dropdown {
        display: block;
    }

    /* Masquer la liste horizontale en mobile */
 body:not(.home) .module-product-categories {
           display: none !important;
    }
}

/* STYLE COMMUN DES SELECT (catégories + tri) */
.woocommerce select,
.wc-categories-dropdown select,
.woocommerce-ordering select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    width: 100%;
    padding: 14px 42px 14px 16px;
    font-size: 16px;

    border: 1px solid #d0d0d0;
    border-radius: 10px;
    background-color: #fff;

    background-image: url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'>\
<polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;

    cursor: pointer;
}

/* CONTAINER DU TRI */
.woocommerce-ordering {
    margin: 0 0 20px;
}

/* SELECT "Tri par défaut" */
.woocommerce .woocommerce-ordering select {
    border-radius: 10px !important;
    border: 1px solid #d0d0d0 !important;
    padding: 14px 42px 14px 16px !important;
    background-color: #fff !important;
    font-size: 16px;
}

/* ===============================
   MOBILE – MENUS DÉROULANTS
   Catégories + Tri WooCommerce
================================ */
@media (max-width: 768px) {

    /* Pleine largeur */
    .wc-categories-dropdown,
    .wc-categories-dropdown select,
    .woocommerce-ordering,
    .woocommerce-ordering select {
        width: 100% !important;
    }

    /* Hauteur maîtrisée SANS casser le texte */
    .wc-categories-dropdown select,
    .woocommerce-ordering select {
        height: auto !important;
        min-height: 40px !important;

        padding: 8px 40px 10px 14px !important;
        /*
           ↑ haut    : 10px  → espace intérieur au-dessus du texte
               → droite : 40px → laisse la place à la flèche ▼
           ↓ bas    : 10px  → espace intérieur sous le texte
           ← gauche : 16px  → marge entre le bord et le texte
        */

        font-size: 16px !important;
        line-height: normal !important;
        box-sizing: border-box !important;

        -webkit-appearance: none !important;
        appearance: none !important;
    }

    /* Supprimer espace inutile au-dessus du tri */
    .woocommerce-ordering {
        margin-top: 0 !important;
    }
}



/* =====================================
   RESTAURER LES FLÈCHES DE QUANTITÉ SUR
   ORDI, CAR SUR MOBILE C'EST MASQUE PAR IOS
   ===================================== */

/* Safari / iOS / Chrome */
.woocommerce input[type="number"].qty {
    -webkit-appearance: number-input !important;
    appearance: auto !important;
}

/* Firefox */
.woocommerce input[type="number"].qty {
    -moz-appearance: number-input !important;
}

/* Sécurité : ne pas hériter des styles des select */
.woocommerce input.qty {
    background-image: none !important;
}

/* Masquer le bouton "Afficher tous les produits" UNIQUEMENT sur /boutique */
body.post-type-archive-product
.module-buttons a[href*="/boutique"] {
    display: none !important;
}

/* Style général du texte affichant le stock */
.stock-categorie {
    font-size: 13px;      /* Taille du texte */
    color: #666;          /* Couleur gris foncé */
    margin-top: 4px;      /* Espace au-dessus du texte */
}

/* Style spécifique quand le produit est en rupture */
.stock-categorie.rupture {
    color: #b00000;       /* Rouge foncé pour signaler la rupture */
    font-weight: 600;     /* Texte plus gras pour plus de visibilité */
}



/* Style du stock variations (force priorité face à Themify) */
.ddm3-stock-variations,
.ddm3-stock-variations .ddm3-stock-line{
  font-size: 13px !important;
  color: #8a8a8a !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}
