/*
 * OVERLUS — Boutique WCFM Marketplace (version maquettes, grille produits native WoodMart)
 * Thème : Woodmart Child — assets/css/wcfm-store.css
 * Ordre : bannière > logo + nom > recherche > onglets > grille produits (gérée par WoodMart)
 * Breakpoints (desktop-first) : 768 / 480 / 360.
 * Colonnes produits : Theme Settings > Shop > Products grid (4 desktop, 2 mobile).
 */

/* 1. VARIABLES */
#wcfmmp-store.wd-store-modern {
    --overlus-teal: #17A2B8;
    --overlus-teal-dark: #117F90;      /* texte et prix (contraste 4,7:1 sur blanc) */
    --overlus-text: #20252B;
    --overlus-muted: #69747D;
    --overlus-border: #E8ECEF;
    --overlus-line: #C9D1D7;           /* bordure de la recherche */
    --overlus-title: #000;
    --overlus-logo-size: clamp(88px, 14vw, 180px);
    --overlus-gutter: clamp(12px, 3vw, 28px);
    --overlus-banner-h: clamp(110px, 20vw, 300px);
}

/* 2. RESET ET NEUTRALISATION DE WCFM */
#wcfmmp-store.wd-store-modern,
#wcfmmp-store.wd-store-modern * { box-sizing: border-box; }

#wcfmmp-store.wd-store-modern {
    max-width: 100%;
    overflow-x: clip;
    color: var(--overlus-text);
    font-size: 14px;
    line-height: 1.55;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#wcfmmp-store .spacer,
#wcfmmp-store .wcfm-clearfix { display: none; }
#wcfmmp-store .lft,
#wcfmmp-store .rgt { float: none; }

#wcfmmp-store .right_side,
#wcfmmp-store .right_side_full,
#wcfmmp-store .tab_area,
#wcfmmp-store #tabsWithStyle,
#wcfmmp-store .product_area,
#wcfmmp-store .products-wrapper {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin: 0;
    padding: 0 !important;
    background: transparent;
    border: 0;
    box-shadow: none;
}

/* Marge latérale unique pour le contenu (recherche, onglets, produits, pages) */
#wcfmmp-store .body_area {
    display: block;
    padding: 0 var(--overlus-gutter);
    background: transparent;
    border: 0;
}

#wcfmmp-store .left_sidebar { display: none !important; }

/* 3. BANNIÈRE : alignée sur la marge latérale, angles droits comme sur la maquette */
#wcfmmp-store.wd-store-modern .wcfm_banner_area {
    position: relative;
    width: auto;
    margin: 0 var(--overlus-gutter);
    padding: 0;
    overflow: hidden;
    background: transparent;
    border: 0;
    border-radius: 0;
}

#wcfmmp-store.wd-store-modern .wcfm_banner_area .banner_img,
#wcfmmp-store.wd-store-modern .wcfm_banner_area .wcfm_slideshow_container {
    width: 100%;
    height: var(--overlus-banner-h);
    max-height: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

#wcfmmp-store.wd-store-modern .wcfm_banner_area img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    object-fit: cover;
    object-position: center;
}

/* Le nom de la boutique est déjà dans l'en-tête */
#wcfmmp-store .wcfm_banner_area .wcfm_store_title,
#wcfmmp-store .wcfm_banner_area .store_name,
#wcfmmp-store .wcfm_banner_area .banner_text,
#wcfmmp-store .wcfm_banner_area .banner_title,
#wcfmmp-store .wcfm_banner_area .wcfmmp-store-name,
#wcfmmp-store .wcfm_banner_area h1,
#wcfmmp-store .wcfm_banner_area h2 { display: none; }

/* 4. EN-TÊTE : logo (chevauche la bannière d'environ 25 %) + nom à droite, desktop et mobile */
#wcfmmp-store #wcfm_store_header {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;          /* WCFM impose min-height:130px et un fond sombre */
    margin: 0 0 20px;
    padding: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#wcfmmp-store .wd-store-header__inner {
    display: grid;
    grid-template-columns: var(--overlus-logo-size) minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(14px, 3.4vw, 40px);
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--overlus-gutter) 0 calc(var(--overlus-gutter) + 4.5%);
    background: transparent !important;
    border: 0;
    box-shadow: none;
}

#wcfmmp-store .wd-store-header__logo { position: relative; z-index: 2; min-width: 0; }

#wcfmmp-store .wd-store-header__logo img {
    display: block;
    width: var(--overlus-logo-size);
    height: var(--overlus-logo-size);
    max-width: none;
    margin: calc(var(--overlus-logo-size) * -0.25) 0 0;   /* recouvrement de 25 % */
    padding: 0;
    object-fit: cover;
    background: #fff;
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 3px 16px rgba(25, 45, 55, .18);
}

#wcfmmp-store .wd-store-header__title {
    min-width: 0;
    margin: 0;
    padding: clamp(10px, 2.2vw, 30px) 0 0;
    color: var(--overlus-title);
    font-size: clamp(20px, 2.4vw, 32px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
    text-transform: none;
    text-shadow: none;
    overflow-wrap: anywhere;
}

/* 5. RECHERCHE : pilule, loupe à gauche, sans bouton visible, au-dessus des onglets */
#wcfmmp-store .wd-store-search { width: 100%; max-width: 720px; margin: 0 auto 24px; padding: 0 var(--overlus-gutter); }
#wcfmmp-store .wd-store-search__form { position: relative; display: block; margin: 0; padding: 0; }
#wcfmmp-store .wd-store-search__icon {
    position: absolute; left: 18px; top: 50%;
    width: 20px; height: 20px;
    transform: translateY(-50%);
    color: var(--overlus-text);
    pointer-events: none;
}
#wcfmmp-store .wd-store-search input[type=search] {
    display: block; width: 100%; height: 48px; margin: 0;
    padding: 0 20px 0 50px;
    color: var(--overlus-text); background: #fff;
    border: 1px solid var(--overlus-line); border-radius: 999px; box-shadow: none;
    font-size: 15px; line-height: 1;
    -webkit-appearance: none; appearance: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
#wcfmmp-store .wd-store-search input[type=search]::-webkit-search-cancel-button { display: none; }
#wcfmmp-store .wd-store-search input[type=search]::placeholder { color: var(--overlus-text); opacity: 1; }
#wcfmmp-store .wd-store-search input[type=search]:focus {
    outline: none; border-color: var(--overlus-teal-dark);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, .22);
}
#wcfmmp-store .wd-store-search__status { margin: 12px 0 0; text-align: center; color: var(--overlus-muted); font-size: 13px; }
#wcfmmp-store .wd-store-search__status strong { color: var(--overlus-text); }
#wcfmmp-store .wd-store-search__status a { color: var(--overlus-teal-dark); font-weight: 600; text-decoration: underline; }

/* 6. ONGLETS : texte souligné, centré, onglet actif en gras.
   Sélecteurs ancrés sur #tab_links_area (aucune dépendance à .tab_area). */
#wcfmmp-store #tab_links_area {
    position: relative;
    width: 100%;
    margin: 0 0 28px;
    padding: 4px 0;
    overflow-x: auto; overflow-y: hidden;   /* secours : défilement si un libellé est très long */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: transparent;
    border: 0;
    box-shadow: none;
}
#wcfmmp-store #tab_links_area::-webkit-scrollbar { display: none; }

#wcfmmp-store #tab_links_area ul.tab_links {
    display: flex !important; flex-wrap: nowrap !important;
    align-items: center; justify-content: center;
    gap: clamp(18px, 3vw, 44px);
    float: none !important;
    width: max-content !important; min-width: 100% !important; max-width: none !important;
    margin: 0 !important; padding: 0 !important;
    list-style: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none;
}
#wcfmmp-store #tab_links_area ul.tab_links li {
    position: static;
    float: none !important; flex: 0 0 auto; width: auto !important;
    margin: 0 !important; padding: 0 !important;
    background: transparent !important;
    border: 0 !important; border-radius: 0;
    list-style: none;
}
#wcfmmp-store #tab_links_area ul.tab_links li.active { border: 0 !important; background: transparent !important; }
#wcfmmp-store #tab_links_area ul.tab_links li::before,
#wcfmmp-store #tab_links_area ul.tab_links li::after,
#wcfmmp-store #tab_links_area ul.tab_links li:hover::after { display: none !important; content: none !important; }

#wcfmmp-store #tab_links_area ul.tab_links li a {
    display: inline-block !important;
    margin: 0; padding: 6px 0;
    color: var(--overlus-text) !important;
    background: none; border: 0; box-shadow: none;
    font-size: 16px; font-weight: 400; line-height: 1.3;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    text-transform: none !important;
    white-space: nowrap;
    transition: color .2s ease;
}
#wcfmmp-store #tab_links_area ul.tab_links li a:hover { color: var(--overlus-teal-dark) !important; }
#wcfmmp-store #tab_links_area ul.tab_links li.active a,
#wcfmmp-store #tab_links_area ul.tab_links li a[aria-current=page] {
    color: var(--overlus-title) !important;
    font-weight: 700;
}

/* 7. TRI ET COMPTEUR */
#wcfmmp-store .products-wrapper .woocommerce-result-count,
#wcfmmp-store .products-wrapper .woocommerce-ordering { margin-top: 0; margin-bottom: 20px; color: var(--overlus-muted); font-size: 12px; }
#wcfmmp-store .woocommerce-ordering select {
    max-width: 100%; min-height: 40px; padding: 7px 30px 7px 12px;
    color: var(--overlus-text); background-color: #fff;
    border: 1px solid var(--overlus-border); border-radius: 5px; font-size: 13px;
}

/* 8. PRODUITS : grille et cartes natives WoodMart. Seules les couleurs sont ajustées. */
#wcfmmp-store #products .woocommerce-loop-product__title,
#wcfmmp-store #products .wd-entities-title,
#wcfmmp-store #products .woocommerce-loop-product__title a,
#wcfmmp-store #products .wd-entities-title a { color: var(--overlus-title); }

#wcfmmp-store #products .price,
#wcfmmp-store #products .price ins,
#wcfmmp-store #products .price .amount,
#wcfmmp-store #products .price .woocommerce-Price-amount,
#wcfmmp-store #products .price .woocommerce-Price-amount bdi { color: var(--overlus-teal-dark); font-weight: 700; }

#wcfmmp-store #products .price del,
#wcfmmp-store #products .price del .amount,
#wcfmmp-store #products .price del .woocommerce-Price-amount,
#wcfmmp-store #products .price del bdi { color: var(--overlus-muted); font-weight: 400; opacity: .8; }

/* 9. PROFIL, AVIS ET POLITIQUES */
#wcfmmp-store .tab_area h2,
#wcfmmp-store .tab_area h3 { color: var(--overlus-text); font-weight: 700; letter-spacing: -.02em; overflow-wrap: anywhere; }
#wcfmmp-store .tab_area a { color: var(--overlus-teal-dark); }
#wcfmmp-store .tab_area a:hover { color: var(--overlus-text); }
#wcfmmp-store .tab_area img,
#wcfmmp-store .tab_area iframe,
#wcfmmp-store .tab_area video { max-width: 100%; height: auto; }
#wcfmmp-store .tab_area table { display: block; max-width: 100%; overflow-x: auto; }

/* 10. ACCESSIBILITÉ */
#wcfmmp-store #tab_links_area ul.tab_links li a:focus-visible { outline: 2px solid var(--overlus-text); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    #wcfmmp-store * { transition: none !important; }
}

/* 11. RESPONSIVE (desktop-first, ordre décroissant) */

/* ≤ 768px : mobile. L'en-tête garde la disposition logo à gauche, nom à droite. */
@media (max-width: 768px) {
    #wcfmmp-store #wcfm_store_header { margin-bottom: 16px; }
    #wcfmmp-store .wd-store-search { margin-bottom: 18px; }
    #wcfmmp-store #tab_links_area { margin-bottom: 20px; }
    #wcfmmp-store #tab_links_area ul.tab_links { gap: 18px; }
    #wcfmmp-store #tab_links_area ul.tab_links li a { font-size: 15px; }
}

/* ≤ 480px : petit mobile */
@media (max-width: 480px) {
    #wcfmmp-store #tab_links_area ul.tab_links { gap: 14px; }
}

/* ≤ 360px : très petits écrans */
@media (max-width: 360px) {
    #wcfmmp-store #tab_links_area ul.tab_links { gap: 10px; }
    #wcfmmp-store #tab_links_area ul.tab_links li a { font-size: 14px; }
}