/* ══════════════════════════════════════════════════════
   EP Boutique — Hello Elementor (sélecteurs WC standard)
   ══════════════════════════════════════════════════════ */

:root {
    --sh-bg:      #f0f4f8;
    --sh-white:   #ffffff;
    --sh-blue:    #002d5d;
    --sh-mid:     #004a99;
    --sh-text:    #1e293b;
    --sh-muted:   #475569;
    --sh-light:   #94a3b8;
    --sh-border:  #e2e8f0;
    --sh-radius:  14px;
    --sh-shadow:  0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

/* ── Containers Elementor pleine largeur ──────────────── */
body.post-type-archive-product .entry-content .elementor-section-boxed > .elementor-container,
body.tax-product_cat .entry-content .elementor-section-boxed > .elementor-container {
    max-width: 100% !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
}
body.post-type-archive-product .entry-content .elementor-column,
body.post-type-archive-product .entry-content .elementor-widget-shortcode,
body.post-type-archive-product .entry-content .elementor-widget-container,
body.tax-product_cat .entry-content .elementor-column,
body.tax-product_cat .entry-content .elementor-widget-shortcode,
body.tax-product_cat .entry-content .elementor-widget-container {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* Elementor v3+ containers */
body.post-type-archive-product .e-con,
body.tax-product_cat .e-con {
    --content-width: 100% !important;
    --container-max-width: 100% !important;
}

/* ── Fond de page ─────────────────────────────────────── */
body.post-type-archive-product,
body.tax-product_cat {
    background: var(--sh-bg) !important;
}
body.post-type-archive-product .site-main,
body.post-type-archive-product #main,
body.post-type-archive-product .woocommerce,
body.tax-product_cat .site-main,
body.tax-product_cat #main,
body.tax-product_cat .woocommerce {
    background: var(--sh-bg) !important;
}

/* ── Titre de page ────────────────────────────────────── */
body.post-type-archive-product .ep-page-title,
body.tax-product_cat .ep-page-title {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: var(--sh-blue) !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
}

/* ── Breadcrumb WooCommerce ──────────────────────────── */
body.post-type-archive-product .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb {
    font-size: 13px;
    color: var(--sh-muted);
    margin-top: 50px !important;
    margin-bottom: 16px;
}
body.post-type-archive-product .woocommerce-breadcrumb a,
body.tax-product_cat .woocommerce-breadcrumb a {
    color: var(--sh-muted);
    text-decoration: none;
}
body.post-type-archive-product .woocommerce-breadcrumb a:hover,
body.tax-product_cat .woocommerce-breadcrumb a:hover {
    color: var(--sh-mid);
}

/* ── Barre résultats + tri ────────────────────────────── */
body.post-type-archive-product .woocommerce-result-count,
body.tax-product_cat .woocommerce-result-count {
    color: var(--sh-muted) !important;
}
body.post-type-archive-product .woocommerce-ordering select,
body.tax-product_cat .woocommerce-ordering select {
    background: var(--sh-white) !important;
    border: 1.5px solid var(--sh-border) !important;
    border-radius: 8px !important;
    color: var(--sh-text) !important;
    padding: 8px 14px !important;
}

/* ── Supprime les clearfix WC (prennent une cellule dans la grille) ── */
ul.products::before,
ul.products::after {
    display: none !important;
    content: none !important;
}

/* ── Grille produits ──────────────────────────────────── */
body.post-type-archive-product ul.products,
body.post-type-archive-product ul.products[class*="columns-"],
body.tax-product_cat ul.products,
body.tax-product_cat ul.products[class*="columns-"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    align-items: stretch !important;
    list-style: none !important;
    padding: 0 !important;
}

@media (max-width: 1024px) {
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
}
@media (max-width: 768px) {
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* Éléments non-produit dans la grille (sous-catégories, notices…) */
body.post-type-archive-product ul.products > *:not(li.product),
body.tax-product_cat ul.products > *:not(li.product),
body.post-type-archive-product ul.products > li.product-category,
body.tax-product_cat ul.products > li.product-category {
    grid-column: 1 / -1 !important;
}

/* ── Carte produit ────────────────────────────────────── */
body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product {
    background: var(--sh-white) !important;
    border: 1px solid var(--sh-border) !important;
    border-radius: var(--sh-radius) !important;
    box-shadow: var(--sh-shadow) !important;
    overflow: hidden !important;
    transition: box-shadow .2s, transform .2s !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
}
body.post-type-archive-product ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.09), 0 16px 40px rgba(0,0,0,.1) !important;
    transform: translateY(-3px) !important;
}

/* ── Image produit ────────────────────────────────────── */
body.post-type-archive-product ul.products li.product a img,
body.tax-product_cat ul.products li.product a img {
    width: 100% !important;
    height: 220px !important;
    object-fit: contain !important;
    display: block !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    background: var(--sh-white) !important;
}

/* ── Zone texte (titre + prix + bouton) ──────────────── */
body.post-type-archive-product ul.products li.product a,
body.tax-product_cat ul.products li.product a {
    text-decoration: none !important;
}

body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--sh-text) !important;
    padding: 12px 16px 4px !important;
    margin: 0 !important;
}

/* ── Prix ─────────────────────────────────────────────── */
body.post-type-archive-product ul.products li.product .price,
body.post-type-archive-product ul.products li.product .price .woocommerce-Price-amount,
body.post-type-archive-product ul.products li.product .price bdi,
body.tax-product_cat ul.products li.product .price,
body.tax-product_cat ul.products li.product .price .woocommerce-Price-amount,
body.tax-product_cat ul.products li.product .price bdi {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--sh-blue) !important;
}
body.post-type-archive-product ul.products li.product .price,
body.tax-product_cat ul.products li.product .price {
    padding: 4px 16px 8px !important;
    margin: 0 !important;
}

/* Suffixe TTC */
body.post-type-archive-product ul.products li.product .price .woocommerce-price-suffix,
body.tax-product_cat ul.products li.product .price .woocommerce-price-suffix {
    font-size: 12px !important;
    font-weight: 500 !important;
    color: var(--sh-muted) !important;
    text-transform: uppercase !important;
}

/* ── Bouton Ajouter au panier ─────────────────────────── */
body.post-type-archive-product ul.products li.product .button,
body.post-type-archive-product ul.products li.product .add_to_cart_button,
body.tax-product_cat ul.products li.product .button,
body.tax-product_cat ul.products li.product .add_to_cart_button {
    background: var(--sh-blue) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 0 var(--sh-radius) var(--sh-radius) !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: auto !important;
    cursor: pointer !important;
    transition: background .2s !important;
    text-decoration: none !important;
}
body.post-type-archive-product ul.products li.product .button:hover,
body.tax-product_cat ul.products li.product .button:hover {
    background: var(--sh-mid) !important;
}

/* ── Pagination ──────────────────────────────────────── */
.woocommerce nav.woocommerce-pagination {
    margin-top: 32px;
    margin-bottom: 50px !important;
}
.woocommerce nav.woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    border: none !important;
}
.woocommerce nav.woocommerce-pagination ul li {
    border: none !important;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    background: var(--sh-white) !important;
    color: var(--sh-text) !important;
    border: 1px solid var(--sh-border) !important;
    border-radius: 8px !important;
    padding: 8px 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--sh-blue) !important;
    color: #fff !important;
    border-color: var(--sh-blue) !important;
}
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--sh-blue) !important;
    color: #fff !important;
    border-color: var(--sh-blue) !important;
}

/* ── Badge promo / soldes ─────────────────────────────── */
body.post-type-archive-product ul.products li.product .onsale,
body.tax-product_cat ul.products li.product .onsale {
    background: var(--sh-mid) !important;
    color: #fff !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    min-height: auto !important;
    line-height: 1.4 !important;
}
