/*
Theme Name:   MediCenter Child
Theme URI: https://1.envato.market/medicenter-responsive-medical-wordpress-theme
Description:  MediCenter Child Theme
Author: QuanticaLabs
Author URI: https://1.envato.market/quanticalabs
Template:     medicenter
Version:      1.2
Text Domain:  medicenter
*/

/* ====== AMELIORATIONS DESIGN SHOP & CATEGORIES ====== */

/* Grille de produits - alignement uniforme */
ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important; /* Toutes les cartes ont la même hauteur par ligne */
}

ul.products li.product:not(.product-category) {
    display: flex !important;
    flex-direction: column !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

ul.products li.product:not(.product-category):hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    transform: translateY(-4px) !important;
}

/* Image produit - prend la place disponible en haut */
ul.products li.product a img,
ul.products li.product .woocommerce-LoopProduct-link img {
    margin: 0 0 10px !important;
    width: 100% !important;
    height: auto !important;
}

/* Titre produit - hauteur fixe pour aligner tous les titres */
ul.products li.product .woocommerce-loop-product__title,
ul.products li.product .woocommerce-loop-category__title,
ul.products li.product h2,
ul.products li.product h3 {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    text-align: center !important;
    background: transparent !important;
    padding: 0 !important;
    line-height: 1.4em !important;
    text-transform: none !important;
    
    /* Hauteur fixe = 3 lignes exactement : 3 * (15px * 1.4) = 63px */
    min-height: 63px !important;
    max-height: 63px !important;
    
    /* Coupe proprement après 3 lignes */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* Prix - poussé vers le bas */
ul.products li.product .price {
    margin-top: auto !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Bouton "Ajouter au panier" - toujours en bas */
ul.products li.product .button,
ul.products li.product .add_to_cart_button,
ul.products li.product a.button {
    margin-top: auto !important;
    width: 100% !important;
}

/* Cacher compteur de produits dans catégories */
ul.products li.product-category mark.count {
    display: none !important;
}

ul.products li.product-category .woocommerce-loop-category__title {
    background: none !important;
    max-height: none !important;
    min-height: auto !important;
    display: block !important;
    overflow: visible !important;
}

/* ====== SIDEBAR WIDGETS ====== */
.widget-area .widget,
.sidebar .widget {
    background: #fff !important;
    border: 1px solid #eaeaea !important;
    border-radius: 8px !important;
    padding: 25px !important;
    margin-bottom: 30px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03) !important;
}

.widget-area .widget ul li,
.sidebar .widget ul li {
    padding: 12px 0 !important;
    border-bottom: 1px solid #f2f2f2 !important;
    line-height: 1.6 !important;
}

.widget-area .widget ul li:last-child,
.sidebar .widget ul li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.widget-area .widget ul li a,
.sidebar .widget ul li a {
    color: #444 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    text-transform: none !important;
    transition: color 0.2s ease !important;
    display: block !important;
}

.widget-area .widget ul li a:hover,
.sidebar .widget ul li a:hover {
    color: #f05a22 !important;
}

.widget-area .widget-title,
.sidebar .widget-title,
.widget-area h3.widget-title,
.sidebar h3.widget-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 20px !important;
    text-transform: uppercase !important;
    color: #222 !important;
    position: relative !important;
    padding-bottom: 15px !important;
    border-bottom: none !important;
}

.widget-area .widget-title::after,
.sidebar .widget-title::after,
.widget-area h3.widget-title::after,
.sidebar h3.widget-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 40px !important;
    height: 3px !important;
    background: #f05a22 !important;
}
/* ==================================================== */


/* =============================================
   SUPPRESSION CADRE - Categories WooCommerce
   Pages: ORL, Chirurgie Plastique, Neurochirurgie
   Auteur: Antigravity - Claritas rymas.ma
   ============================================= */

/* Supprimer bordure/ombre sur les li de catégories WooCommerce (ElementsKit widget) */
.woocommerce ul.products li.product-category,
.woocommerce ul.products li.product.product-category,
.ekit-wid-con ul.products li.product-category {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    outline: none !important;
}

/* Supprimer le cadre sur les images des catégories */
.woocommerce ul.products li.product-category img,
.woocommerce ul.products li.product-category a img {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* S'assurer que le lien de la catégorie n'a pas de cadre */
.woocommerce ul.products li.product-category .woocommerce-loop-category__link,
.woocommerce ul.products li.product-category a.woocommerce-loop-category__link {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}


/* =============================================
   FIX COMPLET - ElementsKit WooCommerce Category List
   Pages: ORL, Chirurgie Plastique, Neurochirurgie
   Classes ciblées: ekit-woo-cat-list--products
   ============================================= */

/* ---- 1. GRILLE 3 COLONNES sur Desktop ---- */
@media (min-width: 992px) {
    .ekit-cat-items ul.products.ekit-woo-cat-list--products {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    .ekit-cat-items ul.products.ekit-woo-cat-list--products > li.product-category {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
        width: calc(33.333% - 14px) !important;
    }
}

/* ---- 2 colonnes sur tablette ---- */
@media (min-width: 576px) and (max-width: 991px) {
    .ekit-cat-items ul.products.ekit-woo-cat-list--products {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 16px !important;
    }
    .ekit-cat-items ul.products.ekit-woo-cat-list--products > li.product-category {
        flex: 0 0 calc(50% - 8px) !important;
        max-width: calc(50% - 8px) !important;
        width: calc(50% - 8px) !important;
    }
}

/* 1 colonne sur mobile */
@media (max-width: 575px) {
    .ekit-cat-items ul.products.ekit-woo-cat-list--products > li.product-category {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* ---- 2. SUPPRESSION CADRE sur les catégories ---- */
.ekit-cat-items ul.products.ekit-woo-cat-list--products > li.product-category {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.ekit-cat-items ul.products.ekit-woo-cat-list--products > li.product-category a {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
    display: block !important;
}

.ekit-cat-items ul.products.ekit-woo-cat-list--products > li.product-category img {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
}

/* ============================================= */
