/* ============================================
   GRID LAYOUT GLOBAL
============================================ */

.wc-subcats-grid-wrapper ul.products {
    display: grid;
    list-style: none;
    padding: 0;
    margin: 40px 0 !important;
    gap: 30px;
}


/* Colonnes dynamiques */

.wc-subcats-grid-wrapper.wc-cols-2 ul.products {
    grid-template-columns: repeat(2, 1fr);
}

.wc-subcats-grid-wrapper.wc-cols-3 ul.products {
    grid-template-columns: repeat(3, 1fr);
}

.wc-subcats-grid-wrapper.wc-cols-4 ul.products {
    grid-template-columns: repeat(4, 1fr);
}

.wc-subcats-grid-wrapper.wc-cols-5 ul.products {
    grid-template-columns: repeat(5, 1fr);
}


/* Responsive */

@media (max-width: 1024px) {
    .wc-subcats-grid-wrapper ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 600px) {
    .wc-subcats-grid-wrapper ul.products {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}


/* ========= CATEGORY CARD ========= */

.wc-subcats-grid-wrapper ul.products li.product-category {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e3e3e3;
    text-align: center;
    transition: all 0.25s ease;
    /* animation globale */
    cursor: pointer;
}

.wc-subcats-grid-wrapper ul.products li.product-category:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-6px) scale(1.02);
    /* effet carte élégante */
}


/* ========= IMAGE WRAPPER 1:1 ========= */

.wc-subcats-grid-wrapper ul.products li.product-category .img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin-bottom: 15px;
    /* <-- padding sous l’image */
}


/* Image dans le carré */

.wc-subcats-grid-wrapper ul.products li.product-category img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform .25s ease;
}


/* Désactive le zoom solo de l’image */

.wc-subcats-grid-wrapper ul.products li.product-category:hover img {
    transform: none;
}


/* ============================================
   TITRES
============================================ */

.wc-subcats-grid-wrapper .woocommerce-loop-category__title {
    font-size: 16px !important;
    font-weight: 600;
    margin-top: 15px !important;
    margin-bottom: 5px;
    text-transform: uppercase;
    color: #222 !important;
    line-height: 1.3;
}


/* Cache le compteur WooCommerce */

.wc-subcats-grid-wrapper .woocommerce-loop-category__title .count {
    display: none !important;
}


/* ============================================
   RESET ELEMENTOR / WOOCOMMERCE STYLES
============================================ */

.wc-subcats-grid-wrapper a,
.wc-subcats-grid-wrapper a * {
    text-decoration: none !important;
}

.wc-subcats-grid-wrapper .woocommerce-loop-category__title,
.wc-subcats-grid-wrapper .woocommerce-loop-product__title {
    font-weight: 600;
}

.wc-subcats-grid-wrapper ul.products li.product-category a {
    color: inherit !important;
    display: block;
}


/* ============================================
   PRODUITS - même UI que les catégories
============================================ */


/* WooCommerce met souvent width/float -> on neutralise */

.wc-products-grid-wrapper ul.products li.product {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}


/* ========= PRODUCT CARD ========= */

.wc-products-grid-wrapper ul.products li.product {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e3e3e3;
    text-align: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.wc-products-grid-wrapper ul.products li.product:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-6px) scale(1.02);
}


/* ========= IMAGE 1:1 (sans wrapper HTML) =========
   WooCommerce n'a pas .img-wrapper sur les produits,
   donc on applique l'effet "carré" directement sur l'image.
*/

.wc-products-grid-wrapper ul.products li.product a img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: contain;
    object-position: center;
    background: #f7f7f7;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;
    margin-bottom: 15px;
    transition: transform .25s ease;
}


/* Désactive le zoom solo de l’image (comme tes catégories) */

.wc-products-grid-wrapper ul.products li.product:hover a img {
    transform: none;
}


/* ============================================
   TITRES PRODUITS
============================================ */

.wc-products-grid-wrapper ul.products li.product .woocommerce-loop-product__title {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-top: 15px !important;
    margin-bottom: 5px;
    text-transform: uppercase;
    color: #222 !important;
    line-height: 1.3;
}


/* ============================================
   LIENS / STRUCTURE
============================================ */

.wc-products-grid-wrapper ul.products li.product a {
    color: inherit !important;
    display: block;
}


/* Bouton add to cart : on lui évite de casser la mise en page */

.wc-products-grid-wrapper ul.products li.product .button {
    margin-top: 12px !important;
}

/* ============================================
   PAGINATION – FIX COMPLET
============================================ */

.wc-subcats-grid-pagination,
.pagination {
    margin: 40px 0 0;
    width: 100%;
}

/* Reset des styles thème / Woo */
.pagination *,
.wc-subcats-grid-pagination * {
    box-sizing: border-box;
}

/* Conteneur principal */
.pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Liste */
.pagination ul.page-numbers {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Items */
.pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
}

/* Boutons */
.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: #fff;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #222;
    text-decoration: none;

    transition: all .2s ease;
}

.pagination .page-numbers li {
    border: 1px solid #e3e3e3;
    border-radius: 10px;
}

/* Hover */
.pagination a.page-numbers:hover {
    background: #f5f5f5;
    border-color: #ccc;
}

/* Page active */
.pagination .page-numbers.current {
    background: #0085FF;
    color: #fff;
    border-color: #0085FF;
    font-weight: 600;
}

/* Disabled */
.pagination .page-numbers.disabled {
    opacity: .4;
    pointer-events: none;
}

/* Flèches */
.pagination .prev,
.pagination .next {
    font-size: 16px;
    padding: 0 16px;
}

.elementor-editor-preview .elementor-widget-container ul li:before, .elementor-editor-active .elementor-widget-container ul li:before, .editor-styles-wrapper ul li:before, .logico-front-end ul li:before {
    display: none !important;
}

/* Responsive */
@media (max-width: 600px) {
    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
    }
}
