/*----------------------------------- Responsive -----------------------------------*/

/*================================
  PRODUCTS PAGE - FILTER OFF-CANVAS
================================*/

/* Loading Overlay */
.loading_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading_overlay.active {
    display: flex;
}

.loading_spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading_spinner .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--salem, #0d8a6a);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading_spinner span {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Bouton Réinitialiser les filtres */
.btn_reset_filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 30px);
    padding: 10px 15px;
    margin: 15px;
    background: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn_reset_filters:hover {
    background: #dc3545;
    color: white;
}

.btn_reset_filters i {
    font-size: 16px;
}

/* Desktop - bouton reset dans la sidebar */
@media screen and (min-width: 992px) {
    .btn_reset_filters {
        width: 100%;
        margin: 15px 0;
    }
}

/* Styles de base (visibles sur desktop, cachés sur mobile) */
.btn_filter_mobile,
.filter_overlay,
.filter_header_mobile {
    display: none;
}

.filter_title_desktop {
    display: block;
}

/* Overlay */
.filter_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.filter_overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Body lock when filter is open */
body.filter_active {
    overflow: hidden;
}

/*================================
  RESPONSIVE BREAKPOINTS
================================*/

@media screen and (max-width: 455px) {
    /* Bouton filtre mobile */
    .btn_filter_mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99;
        background: var(--ebony, #333);
        color: white;
        border: none;
        padding: 12px 24px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .btn_filter_mobile i {
        font-size: 18px;
    }

    /* Cacher la sidebar par défaut */
    .col_filter_sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        padding: 0;
    }

    .col_filter_sidebar .box_filter {
        height: 100%;
        overflow-y: auto;
        background: white;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .col_filter_sidebar .box_filter.filter_open {
        left: 0;
    }

    /* Quand le filtre est ouvert */
    .box_filter.filter_open {
        left: 0 !important;
    }

    .col_filter_sidebar:has(.filter_open) {
        left: 0;
    }

    /* Header mobile du filtre */
    .filter_header_mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        background: #f8f8f8;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filter_header_mobile h2 {
        margin: 0;
        font-size: 18px;
    }

    .btn_close_filter {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
        color: #333;
    }

    /* Cacher le titre desktop */
    .filter_title_desktop {
        display: none;
    }

    /* Overlay visible */
    .filter_overlay {
        display: block;
    }

    /* Contenu du filtre */
    .box_form_filter {
        padding: 15px;
        flex: 1;
        overflow-y: auto;
    }

    /* Liste produits pleine largeur */
    .block_product .col-lg-9 {
        padding-bottom: 80px;
    }
}

@media screen and (max-width: 599px) and (min-width: 456px) {
    /* Bouton filtre mobile */
    .btn_filter_mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99;
        background: var(--ebony, #333);
        color: white;
        border: none;
        padding: 12px 28px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Cacher la sidebar par défaut */
    .col_filter_sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        padding: 0;
    }

    .col_filter_sidebar .box_filter {
        height: 100%;
        overflow-y: auto;
        background: white;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .box_filter.filter_open {
        left: 0 !important;
    }

    .col_filter_sidebar:has(.filter_open) {
        left: 0;
    }

    /* Header mobile */
    .filter_header_mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 18px 20px;
        border-bottom: 1px solid #eee;
        background: #f8f8f8;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filter_header_mobile h2 {
        margin: 0;
        font-size: 18px;
    }

    .btn_close_filter {
        background: none;
        border: none;
        font-size: 24px;
        cursor: pointer;
        padding: 5px;
        color: #333;
    }

    .filter_title_desktop {
        display: none;
    }

    .filter_overlay {
        display: block;
    }

    .box_form_filter {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
    }

    .block_product .col-lg-9 {
        padding-bottom: 80px;
    }
}

@media screen and (max-width: 767px) and (min-width: 600px) {
    /* Bouton filtre mobile */
    .btn_filter_mobile {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99;
        background: var(--ebony, #333);
        color: white;
        border: none;
        padding: 14px 30px;
        border-radius: 30px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Sidebar off-canvas */
    .col_filter_sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 70%;
        max-width: 380px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        padding: 0;
    }

    .col_filter_sidebar .box_filter {
        height: 100%;
        overflow-y: auto;
        background: white;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .box_filter.filter_open {
        left: 0 !important;
    }

    .col_filter_sidebar:has(.filter_open) {
        left: 0;
    }

    .filter_header_mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
        background: #f8f8f8;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filter_header_mobile h2 {
        margin: 0;
        font-size: 20px;
    }

    .btn_close_filter {
        background: none;
        border: none;
        font-size: 26px;
        cursor: pointer;
        padding: 5px;
        color: #333;
    }

    .filter_title_desktop {
        display: none;
    }

    .filter_overlay {
        display: block;
    }

    .box_form_filter {
        padding: 20px;
        flex: 1;
        overflow-y: auto;
    }

    .block_product .col-lg-9 {
        padding-bottom: 90px;
    }
}

@media screen and (max-width: 928px) and (min-width: 768px) {
    /* Bouton filtre mobile */
    .btn_filter_mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99;
        background: var(--ebony, #333);
        color: white;
        border: none;
        padding: 14px 32px;
        border-radius: 30px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Sidebar off-canvas */
    .col_filter_sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 50%;
        max-width: 400px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        padding: 0;
    }

    .col_filter_sidebar .box_filter {
        height: 100%;
        overflow-y: auto;
        background: white;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .box_filter.filter_open {
        left: 0 !important;
    }

    .col_filter_sidebar:has(.filter_open) {
        left: 0;
    }

    .filter_header_mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        border-bottom: 1px solid #eee;
        background: #f8f8f8;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filter_header_mobile h2 {
        margin: 0;
        font-size: 20px;
    }

    .btn_close_filter {
        background: none;
        border: none;
        font-size: 26px;
        cursor: pointer;
        padding: 5px;
        color: #333;
    }

    .filter_title_desktop {
        display: none;
    }

    .filter_overlay {
        display: block;
    }

    .box_form_filter {
        padding: 25px;
        flex: 1;
        overflow-y: auto;
    }

    .block_product .col-lg-9 {
        padding-bottom: 90px;
    }
}

@media screen and (max-width: 991px) and (min-width: 929px) {
    /* Bouton filtre mobile */
    .btn_filter_mobile {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 99;
        background: var(--ebony, #333);
        color: white;
        border: none;
        padding: 14px 32px;
        border-radius: 30px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Sidebar off-canvas */
    .col_filter_sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 50%;
        max-width: 400px;
        height: 100vh;
        z-index: 999;
        transition: left 0.3s ease;
        padding: 0;
    }

    .col_filter_sidebar .box_filter {
        height: 100%;
        overflow-y: auto;
        background: white;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .box_filter.filter_open {
        left: 0 !important;
    }

    .col_filter_sidebar:has(.filter_open) {
        left: 0;
    }

    .filter_header_mobile {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 25px;
        border-bottom: 1px solid #eee;
        background: #f8f8f8;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .filter_header_mobile h2 {
        margin: 0;
        font-size: 20px;
    }

    .btn_close_filter {
        background: none;
        border: none;
        font-size: 26px;
        cursor: pointer;
        padding: 5px;
        color: #333;
    }

    .filter_title_desktop {
        display: none;
    }

    .filter_overlay {
        display: block;
    }

    .box_form_filter {
        padding: 25px;
        flex: 1;
        overflow-y: auto;
    }

    .block_product .col-lg-9 {
        padding-bottom: 90px;
    }
}

@media screen and (max-width: 1199px) and (min-width: 992px) {
    /* Desktop - sidebar visible */
    .btn_filter_mobile,
    .filter_overlay,
    .filter_header_mobile {
        display: none;
    }

    .filter_title_desktop {
        display: block;
    }
}

/*================================
  PRODUCT GALLERY THUMBNAILS
================================*/

#sync2 .owl-item {
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

#sync2 .owl-item:hover {
    opacity: 1;
}

#sync2 .owl-item.current {
    opacity: 1;
}

#sync2 .owl-item.current .owl_prd {
    border: 2px solid var(--salem, #0d8a6a);
}

/*================================
  CARTE PRODUIT MOBILE — structure & lisibilité (<=767px)
================================*/
@media screen and (max-width: 767px) {
    /* Espacements resserrés — moins de vide autour de l'image (effet étiré) */
    .prd_style .espace_top {
        padding: 10px 10px 0;
    }
	.prd_style .img_prd {
		height: 230px;
		margin-top: 8px;
	}
    .prd_style .espace_bottom {
        padding: 14px;
    }

    /* Ligne du haut : marque (gauche) + badges (droite) sans débordement */
    .info_prd {
        gap: 8px;
        align-items: flex-start;
    }
    .info_prd span {
        font-size: 11px;
        padding: 4px 10px;
        line-height: 1.35;
    }
    /* Le tag marque rétrécit et passe à la ligne au lieu de pousser les badges hors carte */
    .info_prd .tag_prd {
        display: inline-block;
        max-width: 58%;
        white-space: normal;
        word-break: break-word;
    }
    /* Badges "Nouveau" / "-X%" : compacts, calés à droite, ne se coupent pas */
    .info_prd .sale_prd {
        gap: 6px;
        flex-shrink: 0;
        align-items: flex-end;
    }
    .info_prd .sale_prd span {
        white-space: nowrap;
    }
    /* Badge "Nouveau" : accent foncé pour le distinguer du fond clair */
    .info_prd .sale_prd span:not(.promo_prd) {
        color: var(--white, #fff);
        background: var(--woodsmoke, #0f0f0f);
    }

    /* Titre + description + prix */
    .prd_style h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    .prd_style .parag_style p {
        font-size: 13px;
    }
    .prd_style .price_prd {
        margin: 15px 0;
        margin-top: auto;
        padding-top: 15px;
    }
    .prd_style .the_price_prd {
        font-size: 15px;
    }
    .prd_style .the_price_prd > span {
        margin: 0 8px;
    }

    /* Bouton "Afficher Prix avec la carte VIP" : texte qui tient dans la carte */
    .prd_style .price_prd .box_accordion {
        margin-top: 15px;
    }
    .prd_style .price_prd .box_accordion button {
        display: block;             /* sort du flex pour permettre le retour à la ligne */
        position: relative;
        text-align: left;
        white-space: normal;
        font-size: 13px;
        line-height: 1.35;
        padding: 11px 36px 11px 12px; /* réserve la place de la flèche à droite */
    }
    .prd_style .price_prd .box_accordion button > span {
        margin-left: 0;
    }
    /* Flèche de l'accordéon ancrée en haut à droite (stable même sur 2 lignes) */
    .prd_style .price_prd .accordion-button::after {
        position: absolute;
        top: 13px;
        right: 12px;
        margin: 0;
    }

    .prd_style .price_prd .content_filter {
        padding: 12px;
        font-size: 13px;
    }

    /* Boutons d'action */
    .prd_style .btn_discover,
    .prd_style .add-to-cart-crm {
        font-size: 13px;
        padding: 11px;
    }
}

/*================================
  CARTES CATÉGORIES (accueil) — éviter que le titre soit rogné
  Sur mobile la carte a une hauteur fixe + contenu aligné en bas :
  une description longue poussait le titre hors de la carte.
================================*/
@media screen and (max-width: 767px) {
    .explorez_cat .content_explorer {
        justify-content: flex-end;
        overflow: hidden;
    }
    /* Le titre ne se comprime jamais et reste visible */
    .explorez_cat .content_explorer h4 {
        flex-shrink: 0;
        margin-bottom: 6px;
    }
    /* Description bornée à 3 lignes pour que tout tienne dans la carte */
    .explorez_cat .content_explorer .parag_style {
        padding-top: 8px;
        padding-bottom: 18px;
    }
    .explorez_cat .content_explorer .parag_style p {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}
/*------------------------------------------------------- End Responsive -------------------------------------------------------*/
