/* =========================================================
   GLOBAL PRODUCT CARDS
   HOME + BOUTIQUE + CATEGORIES + PRODUITS SIMILAIRES
========================================================= */

.woocommerce ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 42px 36px !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    position: relative !important;
    width: calc((100% - 144px) / 5) !important;
    min-height: 390px !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
    flex-direction: column !important;
    text-align: center !important;
    background: #fff !important;
    border: 2px solid #08006b !important;
    border-radius: 18px !important;
    padding: 14px 14px 18px !important;
    overflow: visible !important;
    box-shadow: 0 10px 26px rgba(0,0,0,0.10) !important;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease !important;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px) !important;
    border-color: #e30613 !important;
    box-shadow: 0 25px 50px rgba(8,0,107,0.25) !important;
}

.woocommerce ul.products li.product a img {
    width: 100% !important;
    height: 210px !important;
    object-fit: contain !important;
    background: #f5f5f5 !important;
    margin: 0 0 14px !important;
    border: 0 !important;
    transition: transform 0.25s ease, filter 0.25s ease !important;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.04) !important;
    filter: saturate(1.08) !important;
}

/* TITRE : toujours 2 lignes, jamais 3, sans ligne bleue au-dessus */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 22px !important;
    color: #08006b !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    transition: color 0.2s ease !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title::before,
.woocommerce ul.products li.product .woocommerce-loop-product__title::after {
    display: none !important;
    content: none !important;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title {
    color: #e30613 !important;
}

/* PRIX : centré + souligné rouge 1px */
.woocommerce ul.products li.product .price {
    display: inline-block !important;
    align-self: center !important;
    min-height: 24px !important;
    margin: 0 auto 22px !important;
    padding-bottom: 3px !important;
    border-bottom: 1px solid #e30613 !important;
    color: #111 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

.woocommerce ul.products li.product:hover .price {
    color: #e30613 !important;
}

.woocommerce ul.products li.product .button {
    margin-top: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    width: auto !important;
    padding: 12px 18px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #e30613 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.woocommerce ul.products li.product .button:hover {
    background: #08006b !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 18px rgba(8,0,107,0.25) !important;
}

.woocommerce ul.products li.product .button:active {
    transform: scale(0.95) !important;
}

/* FLAG FR */
.woocommerce ul.products li.product .fsg-product-flag {
    position: absolute !important;
    top: -10px !important;
    left: 10px !important;
    z-index: 50 !important;
    width: 34px !important;
    height: 34px !important;
    display: block !important;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: transform 0.25s ease, filter 0.25s ease !important;
}

.woocommerce ul.products li.product:hover .fsg-product-flag {
    transform: scale(1.08) !important;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.22)) !important;
}

.woocommerce ul.products li.product .fsg-product-flag img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

@media (max-width: 900px) {
    .woocommerce ul.products li.product {
        width: calc((100% - 36px) / 2) !important;
    }
}

@media (max-width: 560px) {
    .woocommerce ul.products li.product {
        width: 100% !important;
    }
}

/* Correction produits similaires : même largeur que les autres vignettes */
.woocommerce .related.products ul.products li.product,
.woocommerce .upsells.products ul.products li.product {
    width: calc((100% - 108px) / 4) !important;
    min-height: 390px !important;
}

@media (max-width: 900px) {
    .woocommerce .related.products ul.products li.product,
    .woocommerce .upsells.products ul.products li.product {
        width: calc((100% - 36px) / 2) !important;
    }
}

@media (max-width: 560px) {
    .woocommerce .related.products ul.products li.product,
    .woocommerce .upsells.products ul.products li.product {
        width: 100% !important;
    }
}

/* =========================================================
   SEARCH RESULTS - ALIGNEMENT SUR LES VIGNETTES GLOBALES
========================================================= */

.fsg-search-results-page {
    padding-top: 55px !important;
    padding-bottom: 75px !important;
}

.fsg-search-results-page .fsg-search-breadcrumb {
    display: block !important;
    width: 100% !important;
    margin: 0 0 35px !important;
    color: #111 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.fsg-search-results-page .fsg-search-breadcrumb a {
    color: #111 !important;
    text-decoration: none !important;
}

.fsg-search-results-page .fsg-search-breadcrumb a:hover {
    color: #e30613 !important;
}

.fsg-search-results-page .fsg-breadcrumb-separator {
    display: inline-block !important;
    margin: 0 6px !important;
    color: #08006b !important;
}

.fsg-search-results-page ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 42px 36px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}

.fsg-search-results-page ul.products::before,
.fsg-search-results-page ul.products::after {
    display: none !important;
    content: none !important;
}

.fsg-search-results-page ul.products li.product {
    list-style: none !important;
    float: none !important;
    clear: none !important;
    display: flex !important;
    flex-direction: column !important;
    width: calc((100% - 144px) / 5) !important;
    min-height: 390px !important;
    margin: 0 !important;
    overflow: visible !important;
}

.fsg-search-results-page ul.products li.product::before,
.fsg-search-results-page ul.products li.product::after {
    display: none !important;
    content: none !important;
}

.fsg-search-results-page ul.products li.product > a {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    text-decoration: none !important;
}

.fsg-search-results-page ul.products li.product .woocommerce-product-details__short-description,
.fsg-search-results-page ul.products li.product .short-description,
.fsg-search-results-page ul.products li.product .excerpt,
.fsg-search-results-page ul.products li.product p:not(.price) {
    display: none !important;
}

.fsg-search-results-page ul.products li.product .price {
    margin-top: auto !important;
}

.fsg-search-results-page ul.products li.product .button {
    align-self: center !important;
}

@media (max-width: 900px) {
    .fsg-search-results-page ul.products li.product {
        width: calc((100% - 36px) / 2) !important;
    }
}

@media (max-width: 560px) {
    .fsg-search-results-page ul.products li.product {
        width: 100% !important;
    }
}

/* =========================================================
   SEARCH RESULTS - FORCE STYLE CARTES PRODUITS
========================================================= */

.fsg-search-results-page {
    min-height: calc(100vh - 520px);
    padding-top: 55px !important;
    padding-bottom: 90px !important;
}

.fsg-search-results-page .fsg-search-breadcrumb {
    display: block !important;
    width: 100% !important;
    margin: 0 0 35px !important;
    color: #111 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}

.fsg-search-results-page ul.products {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 42px 36px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    list-style: none !important;
}

.fsg-search-results-page ul.products li.product {
    position: relative !important;
    width: calc((100% - 144px) / 5) !important;
    min-height: 390px !important;
    margin: 0 !important;
    padding: 14px 14px 18px !important;

    float: none !important;
    clear: none !important;

    display: flex !important;
    flex-direction: column !important;

    text-align: center !important;

    background: #fff !important;
    border: 2px solid #08006b !important;
    border-radius: 18px !important;

    overflow: visible !important;
    box-shadow: 0 10px 26px rgba(0,0,0,0.10) !important;
}

.fsg-search-results-page ul.products li.product > a {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    text-decoration: none !important;
}

.fsg-search-results-page ul.products li.product a img {
    width: 100% !important;
    height: 210px !important;
    object-fit: contain !important;
    background: #f5f5f5 !important;
    margin: 0 0 14px !important;
    border: 0 !important;
    border-radius: 0 !important;
}

.fsg-search-results-page ul.products li.product .woocommerce-loop-product__title {
    min-height: 44px !important;
    height: 44px !important;
    max-height: 44px !important;

    margin: 0 0 10px !important;
    padding: 0 !important;

    color: #08006b !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 22px !important;

    text-align: center !important;

    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.fsg-search-results-page ul.products li.product .price {
    display: inline-block !important;
    align-self: center !important;

    margin: auto auto 22px !important;
    padding-bottom: 3px !important;

    border-bottom: 1px solid #e30613 !important;

    color: #111 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
}

.fsg-search-results-page ul.products li.product .button {
    margin-top: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;

    width: auto !important;
    padding: 12px 18px !important;

    border: none !important;
    border-radius: 999px !important;

    background: #e30613 !important;
    color: #fff !important;

    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-transform: none !important;
}

.fsg-search-results-page ul.products li.product .button:hover {
    background: #08006b !important;
    color: #fff !important;
}

.fsg-search-results-page ul.products li.product .fsg-product-flag {
    position: absolute !important;
    top: -10px !important;
    left: 10px !important;
    z-index: 50 !important;

    width: 34px !important;
    height: 34px !important;

    display: block !important;
    background: transparent !important;
}

.fsg-search-results-page ul.products li.product .fsg-product-flag img {
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.fsg-search-results-page ul.products li.product .woocommerce-product-details__short-description,
.fsg-search-results-page ul.products li.product .short-description,
.fsg-search-results-page ul.products li.product .excerpt,
.fsg-search-results-page ul.products li.product p:not(.price) {
    display: none !important;
}

@media (max-width: 900px) {
    .fsg-search-results-page ul.products li.product {
        width: calc((100% - 36px) / 2) !important;
    }
}

@media (max-width: 560px) {
    .fsg-search-results-page ul.products li.product {
        width: 100% !important;
    }
}

/* =========================================================
   SEARCH RESULTS - HOVER + FOOTER FIX
========================================================= */

.fsg-search-results-page {
    min-height: calc(100vh - 420px) !important;
}

/* Hover cartes */
.fsg-search-results-page ul.products li.product {
    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease !important;
}

.fsg-search-results-page ul.products li.product:hover {
    transform: translateY(-8px) !important;
    border-color: #e30613 !important;
    box-shadow: 0 25px 50px rgba(8,0,107,0.25) !important;
}

/* Hover image */
.fsg-search-results-page ul.products li.product a img {
    transition:
        transform 0.25s ease,
        filter 0.25s ease !important;
}

.fsg-search-results-page ul.products li.product:hover a img {
    transform: scale(1.04) !important;
    filter: saturate(1.08) !important;
}

/* Hover titre */
.fsg-search-results-page ul.products li.product .woocommerce-loop-product__title {
    transition: color 0.2s ease !important;
}

.fsg-search-results-page ul.products li.product:hover .woocommerce-loop-product__title {
    color: #e30613 !important;
}

/* Hover prix */
.fsg-search-results-page ul.products li.product .price {
    transition: color 0.2s ease !important;
}

.fsg-search-results-page ul.products li.product:hover .price {
    color: #e30613 !important;
}

/* Hover bouton */
.fsg-search-results-page ul.products li.product .button {
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease !important;
}

.fsg-search-results-page ul.products li.product .button:hover {
    background: #08006b !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 18px rgba(8,0,107,0.25) !important;
}

/* Hover flag */
.fsg-search-results-page ul.products li.product .fsg-product-flag {
    transition:
        transform 0.25s ease,
        filter 0.25s ease !important;
}

.fsg-search-results-page ul.products li.product:hover .fsg-product-flag {
    transform: scale(1.08) !important;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.22)) !important;
}

/* =========================================================
   SEARCH RESULTS - CENTRAGE + FOOTER COMPLET
========================================================= */

body.search-results {
    min-height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

body.search-results .fsg-wrap {
    flex: 1 0 auto !important;
    display: flex !important;
    flex-direction: column !important;
}

body.search-results .fsg-search-results-page {
    flex: 1 0 auto !important;
    width: min(1400px, calc(100% - 40px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 55px !important;
    padding-bottom: 40px !important;
}

body.search-results .fsg-search-results-page ul.products {
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

body.search-results .fsg-search-results-page ul.products li.product {
    flex: 0 0 calc((100% - 144px) / 5) !important;
}

body.search-results .fsg-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}