/* ==========================================================
   MATOS IMPORT — CATEGORIES
   Les cartes utilisent exactement le composant .mi-new-*
   de la page produit.
   ========================================================== */

body#category,
body#category * {
    font-family: Inter, Arial, sans-serif;
    letter-spacing: 0 !important;
    box-sizing: border-box;
}


/* ==========================================================
   GRILLE CATEGORIE
   ========================================================== */

body#category #js-product-list .products {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

body#category #js-product-list .products > .product-miniature {
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

body#category #js-product-list .product-miniature > .thumbnail-container {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}


/* ==========================================================
   COMPOSANT EXACT .mi-new-* DE LA PAGE PRODUIT
   ========================================================== */

body#category .mi-new-card {
    border: 1px solid #d8d8d8;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    min-width: 0;
}

body#category .mi-new-image {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #fff;
    isolation: isolate;
    padding: 14px;
}

body#category .mi-new-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: darken;
}

body#category .mi-new-body {
    padding: 14px 14px 18px;
}

body#category .mi-new-category {
    font-size: 12px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 7px;
}

body#category .mi-new-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 7px;
    min-height: 18px;
}

body#category .mi-new-brand {
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body#category .mi-new-name {
    display: block;
    color: #111 !important;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 400;
    min-height: 60px;
    text-decoration: none !important;
    margin-bottom: 8px;
}

body#category .mi-new-price-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
}

body#category .mi-new-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--mi-red, #ed2224);
}

body#category .mi-new-old-price {
    font-size: 12px;
    font-weight: 400;
    color: #aaa;
    text-decoration: line-through;
}


/* ==========================================================
   ETOILES — EXACTEMENT V12
   ========================================================== */

body#category .mi-new-rating {
    display: inline-flex !important;
    align-items: center !important;
    min-width: 0;
    line-height: 1 !important;
}

body#category .mi-new-rating-stars {
    display: inline-flex !important;
    align-items: center !important;
    gap: 1px !important;
    white-space: nowrap !important;
}

body#category .mi-new-rating-star {
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    fill: none !important;
    stroke: var(--mi-red, #ed2224) !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    flex: 0 0 14px !important;
}

body#category .mi-new-rating-source {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ==========================================================
   AJOUTER AU PANIER — EXACTEMENT 14 / 600
   ========================================================== */

body#category .mi-new-cart-form {
    margin: 0;
}

body#category .mi-new-cart {
    display: block;
    margin: 0 auto;
    border: 0 !important;
    background: #dedede !important;
    color: #111 !important;
    border-radius: 22px;
    padding: 9px 16px;

    font-family: Inter, Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;

    text-transform: none !important;
    letter-spacing: 0 !important;

    cursor: pointer;
    box-shadow: none !important;
}

body#category .mi-new-cart.disabled {
    opacity: .55;
    cursor: not-allowed;
}


/* ==========================================================
   HOVER — V13
   ========================================================== */

body#category .mi-new-card {
    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease !important;
}

body#category .mi-new-image img {
    transition: transform .25s ease !important;
    transform-origin: center center !important;
}

@media (hover:hover) and (pointer:fine) {

    body#category .mi-new-card:hover {
        border-color: var(--mi-red,#ed2224) !important;
        box-shadow: 0 10px 24px rgba(0,0,0,.10) !important;
        transform: translateY(-3px) !important;
    }

    body#category .mi-new-card:hover .mi-new-image img {
        transform: scale(1.03) !important;
    }
}


/* ==========================================================
   RESPONSIVE — MEMES VALEURS QUE LA PAGE PRODUIT
   ========================================================== */

@media (max-width:1199px) {

    body#category #js-product-list .products {
        grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    }
}

@media (max-width:767px) {

    body#category #js-product-list .products {
        grid-template-columns: repeat(2, minmax(0,1fr)) !important;
        gap: 16px !important;
    }

    body#category .mi-new-body {
        padding: 12px 12px 15px;
    }

    body#category .mi-new-category {
        font-size: 11px;
    }

    body#category .mi-new-meta {
        display: block;
    }

    body#category .mi-new-rating {
        display: block !important;
        margin-top: 4px;
    }

    body#category .mi-new-name {
        font-size: 15px;
        min-height: 76px;
    }

    body#category .mi-new-price {
        font-size: 16px;
    }

    body#category .mi-new-cart {
        font-size: 13px !important;
        padding: 9px 12px;
    }

    body#category .mi-new-rating-star {
        width: 13px !important;
        height: 13px !important;
        flex-basis: 13px !important;
    }
}
/* ==========================================================
   V9 — CARTE CATEGORIE MATOS IMPORT
   Calée sur la carte nouveautés validée
   ========================================================== */

body#category #js-product-list .mi-category-card,
body#category #js-product-list .mi-category-card * {
    box-sizing: border-box;
    font-family: Inter, Arial, sans-serif;
    letter-spacing: 0;
}

body#category #js-product-list .mi-category-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 14px;
}

/* IMAGE */

body#category #js-product-list .mi-category-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    padding: 14px;
    background: #fff;
    isolation: isolate;
}

body#category #js-product-list .mi-category-image img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    mix-blend-mode: darken;
}

/* CONTENU */

body#category #js-product-list .mi-category-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 14px 14px 18px;
}

body#category #js-product-list .mi-category-name {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 7px;
    padding: 0;
    color: #aaa;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    text-transform: uppercase;
}

/* ETOILES — dimensions impératives */

body#category #js-product-list .mi-category-rating {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    width: auto;
    height: 14px;
    min-height: 14px;
    margin: 0 0 7px;
    padding: 0;
    line-height: 1;
}

body#category #js-product-list .mi-category-rating svg.mi-category-star {
    display: block !important;
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    max-width: 14px !important;
    max-height: 14px !important;
    flex: 0 0 14px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: none !important;
    stroke: #ed2224 !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* NOM */

body#category #js-product-list .mi-category-product-name {
    display: block;
    width: 100%;
    min-height: 60px;
    margin: 0 0 8px;
    padding: 0;
    color: #111 !important;
    font-size: 16px;
    line-height: 1.25;
    font-weight: 400;
    text-decoration: none !important;
}

/* BAS DE CARTE */

body#category #js-product-list .mi-category-bottom {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: auto;
}

body#category #js-product-list .mi-category-price-row {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0 0 12px;
}

body#category #js-product-list .mi-category-price {
    color: #ed2224;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 600;
}

body#category #js-product-list .mi-category-old-price {
    color: #aaa;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 400;
    text-decoration: line-through;
}

/* BOUTON */

body#category #js-product-list .mi-category-cart-form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

body#category #js-product-list button.mi-category-cart {
    display: block;
    width: auto;
    height: auto;
    min-height: 0;
    margin: 0 auto;
    padding: 9px 16px;
    border: 0;
    border-radius: 22px;
    background: #dedede;
    color: #111;
    font-family: Inter, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
}

body#category #js-product-list button.mi-category-cart.disabled {
    opacity: .55;
    cursor: not-allowed;
}
/* V10 — suppression wishlist sur les cartes catégorie Matos Import */
body#category #js-product-list .product-miniature > .thumbnail-container > .wishlist-button-add {
    display: none !important;
}
/* V11 — Hover identique aux cartes nouveautés de la fiche produit */

body#category #js-product-list .mi-category-card {
    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease !important;
}

body#category #js-product-list .mi-category-image img {
    transition: transform .25s ease !important;
    transform-origin: center center !important;
}

@media (hover:hover) and (pointer:fine) {

    body#category #js-product-list .mi-category-card:hover {
        border-color: #ed2224 !important;
        box-shadow: 0 10px 24px rgba(0,0,0,.10) !important;
        transform: translateY(-3px) !important;
    }

    body#category #js-product-list .mi-category-card:hover .mi-category-image img {
        transform: scale(1.03) !important;
    }
}
/* V12 — même largeur exacte que le bloc Nouveautés */

body#category #js-product-list .products {
    width: min(100%, 1440px) !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
/* ==========================================================
   V13 — SOUS-CATEGORIES PLUS COMPACTES
   ========================================================== */

body#category .tv-category-main-div {
    margin-top: 18px;
    padding: 14px 0 8px;
}

body#category .tvcategory-name-image {
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 0 10px !important;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Chaque sous-catégorie prend moins de place */
body#category .tvcategory-name-image .category-name {
    width: 180px !important;
    min-width: 180px !important;
    height: auto !important;

    padding: 6px 10px !important;

    font-family: "Inter", Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;

    text-align: center;
    letter-spacing: 0 !important;
}

/* Titre du bloc */
body#category .tv-category-main-div .tvcategory-name-image-title,
body#category .tv-category-main-div .tvcategory-title,
body#category .tv-category-main-div h2,
body#category .tv-category-main-div h3 {
    font-family: "Inter", Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

/* Barre de défilement plus discrète */
body#category .tvcategory-name-image::-webkit-scrollbar {
    height: 6px;
}

body#category .tvcategory-name-image::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 6px;
}

body#category .tvcategory-name-image::-webkit-scrollbar-track {
    background: #eee;
}
/* V14 — sous-catégories compactes : 8 visibles sur desktop */

body#category .tvcategory-name-image {
    display: flex !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
}

body#category .tvcategory-name-image .tv-sub-category-wrapper {
    flex: 0 0 12.5% !important;
    width: 10% !important;
    max-width: 10% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
}

body#category .tvcategory-name-image .tv-sub-category-inner,
body#category .tvcategory-name-image .tvcategory-name,
body#category .tvcategory-name-image .category-name {
    width: 100% !important;
    max-width: 100% !important;
}

body#category .tvcategory-name-image .category-name {
    display: block !important;
    padding: 6px 4px !important;

    font-family: "Inter", Arial, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 400 !important;

    text-align: center !important;
    letter-spacing: 0 !important;
}
/* Masquer le choix grille / liste / catalogue sur les pages catégorie */
body#category .tvcmsproduct-grid-list {
    display: none !important;
}

/* Popup ajout panier — bandeau supérieur */
body #blockcart-modal .modal-header {
    background-color: #d21717 !important;
    color: #fff !important;
}

/* Texte du bandeau */
body #blockcart-modal .modal-header,
body #blockcart-modal .modal-header * {
    color: #fff !important;
}

/* Croix de fermeture */
body #blockcart-modal .modal-header .close {
    color: #fff !important;
    opacity: 1 !important;
}
/* Popup ajout panier — masquer l'icône du bandeau */
#blockcart-modal .modal-header .modal-title > i.material-icons {
    display: none !important;
}
/* Titre H1 des pages catégorie : casse normale */
body#category .block-category h1 {
    text-transform: none !important;
}
/* ==========================================================
   SOUS-CATEGORIES — GRILLE DEFINITIVE
   ========================================================== */

/* Le conteneur principal doit grandir avec toutes les lignes */
body#category .tv-category-main-div {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin-bottom: 28px !important;
}

/* La zone qui était auparavant un carrousel */
body#category .tvcategory-name-image {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;

    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    gap: 18px 22px !important;

    padding: 18px 20px 22px !important;
    margin: 0 !important;

    overflow: visible !important;
}

/* Suppression de toutes les dimensions héritées du carrousel */
body#category .tvcategory-name-image > .tv-sub-category-wrapper {
    display: block !important;

    position: static !important;
    float: none !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;

    flex: none !important;

    margin: 0 !important;
    padding: 0 !important;

    transform: none !important;
}

/* Conteneurs intermédiaires */
body#category .tv-sub-category-inner,
body#category .tvcategory-name {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
}

/* Libellé */
body#category .tvcategory-name .category-name {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: auto !important;

    margin: 0 !important;
    padding: 7px 6px !important;

    font-family: Inter, Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;

    text-align: center !important;
    text-transform: none !important;
    letter-spacing: 0 !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}


/* TABLETTE */
@media (max-width: 991px) {

    body#category .tvcategory-name-image {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 14px 18px !important;
    }
}


/* MOBILE */
@media (max-width: 767px) {

    body#category .tv-category-main-div {
        margin-bottom: 20px !important;
    }

    body#category .tvcategory-name-image {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;

        gap: 10px 12px !important;

        padding: 12px 12px 18px !important;

        overflow: visible !important;
    }

    body#category .tvcategory-name .category-name {
        padding: 7px 4px !important;

        font-size: 14px !important;
        line-height: 1.25 !important;
        font-weight: 500 !important;
    }
}
/* ==========================================================
   PAGE PANIER — INTER
   ========================================================== */

body#cart,
body#cart button,
body#cart input,
body#cart select,
body#cart textarea {
    font-family: Inter, Arial, sans-serif !important;
}