/* PAGE LISTING : HEADER */
.page-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 30px;
}

.product-count-sup {
    font-size: 0.55em;
    font-weight: 500;
    color: var(--grey_medium); 
    vertical-align: super;
    margin-left: 8px;
    letter-spacing: normal;
}

.product-count-sup:empty {
    display: none;
}

@media (max-width: 767px) {
    .page-title {
        font-size: 26px;
    }
    .product-count-sup {
        font-size: 0.6em;
    }
}

.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;    
    overflow-x: hidden;
}

.quick-tags::-webkit-scrollbar {
    display: none;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid #D1D5DB;
    border-radius: 30px;
    font-size: 15px;
    color: var(--grey);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0; 
    user-select: none;
    transition: all 0.2s ease;
}

.tag-pill:hover {
    border-color: var(--orange);
    color: var(--orange);
}

.tag-pill.active {
    background-color: var(--grey_light);
    border-color: #B0B8C8;
    color: var(--black);
    font-weight: 500;
}





#catalogFiltersForm {
    position: sticky;
    top: 175px; 
    z-index: 900;
    background-color: var(--white);
    padding-top: 15px;
    padding-bottom: 5px;
    margin-top: -15px;
    margin-bottom: 20px;
}



.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background-color: var(--grey_light);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0px;
}

.filter-group {
    flex: 1 1 200px;
    max-width: 300px;
}

.trigger-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trigger-count {
    color: var(--orange);
    font-weight: 700;
    margin-left: 4px;
}

.custom-dropdown.has-selection .dropdown-trigger {
    border-color: var(--orange);
}


.custom-dropdown {
    position: relative;
    width: 100%;
    outline: none;
}

.dropdown-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    padding: 12px 15px;
    font-size: 14px;
    color: var(--grey);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.dropdown-trigger .chevron {
    color: var(--grey_medium);
    margin-left: 10px;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.2s ease;
}

.custom-dropdown:hover .dropdown-trigger,
.custom-dropdown.is-active .dropdown-trigger {
    border-color: var(--orange);
}

.custom-dropdown.is-active .dropdown-trigger {
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.1);
}

.custom-dropdown.is-active .chevron {
    transform: rotate(180deg);
    color: var(--orange);
}

.custom-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: max-content;
    min-width: 100%;
    max-width: 280px;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--grey_light);
    transform-origin: top center;
    transform: scaleY(0);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.custom-dropdown.is-active .dropdown-menu {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
}

.custom-dropdown .dropdown-menu::-webkit-scrollbar { width: 4px; }
.custom-dropdown .dropdown-menu::-webkit-scrollbar-track { background: transparent; }
.custom-dropdown .dropdown-menu::-webkit-scrollbar-thumb { background-color: var(--orange); border-radius: 10px; }



.dropdown-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    font-size: 14px;
    color: var(--black);
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: normal;
    line-height: 1.4;
}

.dropdown-option:hover {
    background-color: var(--grey_light);
    color: var(--orange);
}

.dropdown-option.selected {
    background-color: rgba(255, 138, 0, 0.1);
    color: var(--orange);
    font-weight: 600;
}

.custom-dropdown .hidden-checkbox { display: none; }

.custom-dropdown .custom-checkbox {
    width: 18px; height: 18px;
    border: 1px solid var(--grey_medium); border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; transition: all 0.2s; background-color: transparent;
}

.custom-dropdown .custom-checkbox svg {
    width: 12px; height: 12px; color: var(--white);
    opacity: 0; transform: scale(0); transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.2);
}

.custom-dropdown .hidden-checkbox:checked + .custom-checkbox {
    background-color: var(--orange); border-color: var(--orange);
}

.custom-dropdown .hidden-checkbox:checked + .custom-checkbox svg {
    opacity: 1; transform: scale(1);
}

.custom-dropdown .hidden-checkbox:checked ~ .option-label { font-weight: 600; }






.dropdown-option.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.dropdown-option.is-disabled .option-label {
    color: #8f9bb3;
}

.dropdown-option.is-disabled .custom-checkbox {
    border-color: #d8e2ec;
    background-color: #f4f7fb;
    color: #a0aec0;
}

.dropdown-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.filter-status {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: #7c8ba0;
    background-color: #f0f3f6;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
}




.active-filters-area {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}

.active-filters-area:empty { display: none; }

.active-filters-area:not(:empty) { margin: 15px 0; }

.active-filter-pill {
    display: flex; align-items: center; gap: 8px; background-color: var(--white);
    border: 1px solid #D1D5DB; border-radius: 30px; padding: 6px 12px;
    font-size: 13px; color: var(--black); cursor: pointer; transition: all 0.2s ease;
}

.active-filter-pill:hover { border-color: var(--red); color: var(--red); }
.active-filter-pill svg { width: 14px; height: 14px; }

.clear-all-filters-btn {
    background: transparent; border: none; color: var(--grey_medium);
    font-size: 13px; font-weight: 500; cursor: pointer; padding: 6px 12px; transition: color 0.2s;
}

.clear-all-filters-btn:hover { color: var(--black); text-decoration: underline; }


.product-list-section { padding-bottom: 80px; }

.product-list-header {
    display: grid; 
    grid-template-columns: 1.5fr 1fr 130px 60px;
    
    gap: 20px; 
    align-items: center; 
    padding: 15px 0;
    border-top: 1px solid #D1D5DB; 
    border-bottom: 1px solid #D1D5DB;
    margin-bottom: 10px; 
    font-size: 14px; 
    font-weight: 600; 
    color: var(--black);
}

.product-list-header .col-qty, 
.product-list-header .col-price { 
    text-align: center; 
}

.product-list-header .col-action { 
    text-align: right; 
}

.product-row {
    display: grid; 
    grid-template-columns: 1.5fr 1fr 130px 60px;
    gap: 20px; 
    align-items: center; 
    padding: 25px 10px; 
    border-bottom: 2px solid var(--grey_light);
    transition: background-color 0.2s ease;
}

.product-row:hover { background-color: #F8FAFC; }


.col-name {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
}

.product-title-link {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-title-link:hover {
    color: var(--orange);
}

.product-specs-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px 15px;
    width: 100%;
}

.spec-item {
    font-size: 13px;
    line-height: 1.4;
    display: inline-block;
}

.spec-label {
    color: var(--grey_medium);
    margin-right: 4px;
}

.spec-value {
    color: var(--black);
}

.spec-item--extra {
    display: none !important;
}

.product-specs-wrapper.is-expanded .spec-item--extra {
    display: inline-block !important;
}

.specs-more-container {
    margin-top: 4px;
}

.specs-more-btn {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--grey_medium);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.specs-more-btn:hover {
    color: var(--orange);
}

@media (max-width: 767px) {
    .product-title-link {
        font-size: 15px;
    }
    .product-specs-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 6px 10px;
    }
    .spec-item {
        font-size: 12px;
    }
}






.col-qty { display: flex; justify-content: center; gap: 15px; }
.col-qty.single-qty { justify-content: center; }

.qty-group { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qty-label { font-size: 13px; color: var(--grey); }

.qty-counter {
    display: flex; align-items: center; border: 1px solid var(--grey_light); border-radius: 4px;
    height: 38px; background-color: var(--white); overflow: hidden;
}

.qty-btn {
    width: 35px; height: 100%; background: transparent; border: none; cursor: pointer;
    color: var(--grey); font-size: 18px; display: flex; align-items: center; justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}
.qty-btn:hover { background-color: var(--grey_light); color: var(--black); }

.qty-input {
    width: 50px; height: 100%; text-align: center; border: none; 
    border-left: 1px solid var(--grey_light); border-right: 1px solid var(--grey_light);
    font-family: inherit; font-size: 14px; color: var(--black); outline: none;
}
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* .col-price {
    font-size: 18px; font-weight: 500; color: var(--black); text-align: center; white-space: nowrap;
} */

/* ================= COLONNE PRIX & BOUTON ================= */
.col-price {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centre le contenu horizontalement */
    justify-content: center;
    gap: 4px; /* Espace entre le texte "Договорная" и le bouton */
    font-size: 18px; 
    font-weight: 500; 
    color: var(--black); 
    text-align: center; 
    white-space: nowrap;
}

/* Le petit lien orange sous le prix */
.ask-price-btn {
    background: transparent;
    border: none;
    color: var(--orange);
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.ask-price-btn:hover {
    color: var(--black);
}


.cart-btn {
    position: relative;
    width: 46px; 
    height: 46px; 
    padding: 0; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    margin-left: auto; 
    border-radius: 6px;
    color: var(--black);
    transition: all 0.2s ease;
}

.cart-btn svg { color: inherit; }

.added-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background-color: var(--white);
    color: var(--orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.2s;
}

.added-badge svg {
    width: 12px;
    height: 12px;
}


.cart-btn.is-added {
    background-color: var(--white);
    border: 2px solid var(--orange);
    color: var(--orange);
}

.cart-btn.is-added .added-badge {
    transform: scale(1);
    opacity: 1;
}


@media (min-width: 992px) {
    .filter-bar { 
        flex-wrap: wrap;
        gap: 8px; 
    }
    
    .filter-group { 
        flex: 1 1 calc(12.5% - 8px); 
        min-width: 150px;        
        max-width: 260px;
    }
    
    .dropdown-trigger { 
        padding: 10px 8px; 
        font-size: 13px; 
    }
    .trigger-text { 
        flex-grow: 1; 
    }
}



.filter-overlay {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9998 !important; 
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}

.filter-overlay.is-active { opacity: 1; visibility: visible; }
.mobile-filter-header { display: none; }
.mobile-clear-btn { display: none; }
.mobile-filter-btn { display: none; }
.mobile-sidebar-footer { display: none; }


@media (max-width: 991px) {
    
    #catalogFiltersForm {
        position: static !important;
        z-index: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        background-color: transparent !important;
    }
    
    .mobile-filter-btn {
        position: sticky;
        top: 95px; 
        z-index: 890;
        display: flex; align-items: center; justify-content: center; gap: 10px;
        width: 100%; background-color: var(--grey_light); color: var(--black);
        font-size: 16px; font-weight: 600;
        border: none; border-radius: 6px; padding: 14px;
        margin-bottom: 20px; cursor: pointer; transition: background-color 0.2s ease;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    
    .mobile-filter-btn:hover { background-color: #E2E8F0; }
    .mobile-filter-btn svg { color: var(--grey); }

    .filter-bar {
        position: fixed !important; top: 0 !important; bottom: 0 !important; right: -100%;
        width: 100%;height: 100vh !important; height: 100dvh !important;
        background-color: var(--white);
        z-index: 10000 !important;
        display: flex !important; flex-direction: column; flex-wrap: nowrap; align-items: stretch;
        padding: 20px; margin: 0; border-radius: 0;
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
        overflow-y: auto; overflow-x: hidden;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .filter-bar.is-open { right: 0 !important; }

    .mobile-filter-header {
        display: flex; justify-content: space-between; align-items: center;
        margin-bottom: 20px; padding-bottom: 15px;
    }
    .mobile-filter-title {
        display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--black);
    }
    .close-filters-btn {
        background: transparent; border: none; color: var(--grey_medium); cursor: pointer; padding: 5px; transition: color 0.2s;
    }
    .close-filters-btn:hover { color: var(--black); }

    .filter-group { 
        flex: none !important; 
        width: 100%; max-width: 100% !important; 
        padding: 0 20px; margin-top: 0; margin-bottom: 12px; 
    }
    .filter-group:last-child { margin-bottom: 0; }

    .custom-dropdown { border: 1px solid #D1D5DB; border-radius: 6px; transition: border-color 0.2s; }
    .custom-dropdown.is-active { border-color: var(--grey_medium); }
    .dropdown-trigger { border: none; padding: 15px; background-color: transparent; }

    .custom-dropdown .dropdown-menu {
        position: relative; top: 0; width: 100%;
        box-shadow: none; border: none; border-top: 1px solid transparent; border-radius: 0;
        transform: none; max-height: 0; padding: 0; overflow: hidden;
        transition: max-height 0.3s ease, border-color 0.3s;
        display: flex; flex-wrap: wrap; 
    }
    .custom-dropdown.is-active .dropdown-menu {
        max-height: 500px; padding: 10px; border-top-color: var(--grey_light);
    }
    .dropdown-option { width: 50%; padding: 8px 5px; }

    .mobile-sidebar-footer {
        display: flex; gap: 15px; margin-top: auto !important; position: sticky; bottom: -20px;
        z-index: 10; background-color: var(--white);
        margin-left: -20px; margin-right: -20px; padding: 15px 20px 20px 20px; border-top: 1px solid var(--grey_light);
    }
    .mobile-clear-btn {
        flex: 1; padding: 14px 0; background: transparent; border: 1px solid var(--grey_medium); 
        border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--black); cursor: pointer;
        display: flex; justify-content: center; align-items: center; transition: background-color 0.2s;
    }
    .mobile-clear-btn:active { background-color: var(--grey_light); }
    
    .mobile-apply-btn { 
        flex: 1; padding: 14px 0; border-radius: 6px; font-size: 15px;
        display: flex; justify-content: center; align-items: center; gap: 5px; 
    }
    
    .clear-filters-btn { display: none; }
    .product-list-header { display: none; }
    
    .product-row {
        grid-template-columns: 1fr; 
        gap: 15px; 
        padding: 20px 15px; 
        border-bottom: 3px solid var(--grey_light);
        border-top: 3px solid var(--grey_light);
        border-radius: 8px; margin-bottom: 15px; position: relative;
    }
    .product-list-body .product-row:last-child { margin-bottom: 0; }

    .col-qty { justify-content: flex-start; }
    /* .col-price { text-align: left; font-size: 20px; font-weight: 700; margin-top: 10px; } */
    .col-price { 
            align-items: flex-start;
            text-align: left; 
            font-size: 20px; 
            font-weight: 700; 
            margin-top: 10px; 
        }
    
    .ask-price-btn {
        font-size: 14px;
    }
    .col-action { position: absolute; bottom: 20px; right: 15px; }
    
    .active-filters-area {
        position: relative; z-index: 800; background-color: var(--white); width: 100%;
        padding: 5px 0 15px 0; margin-top: -5px; margin-bottom: 15px; 
        flex-wrap: nowrap !important; overflow-x: auto; 
        -ms-overflow-style: none; scrollbar-width: none;
    }
    .active-filters-area::-webkit-scrollbar { display: none; }
    .active-filter-pill, .clear-all-filters-btn { flex-shrink: 0; }


    .custom-scrollbar-container.tags-scrollbar {
        display: block;
        margin-top: -20px;
        margin-bottom: 40px; 
    }

    .quick-tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        margin-left: -20px; 
        margin-right: -20px; 
        padding-left: 0; 
        padding-right: 0;
        padding-bottom: 5px; 
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .quick-tags::-webkit-scrollbar {
        display: none !important;
    }

    .tag-pill:first-child { margin-left: 20px; }
    .tag-pill:last-child { margin-right: 20px; }

}


@media (min-width: 992px) {
    .custom-scrollbar-container.tags-scrollbar {
        display: none;
    }
}

@media (max-width: 767px) {
    .tag-pill { 
        font-size: 14px; 
        padding: 8px 16px; 
    }


    .mobile-filter-btn { font-size: 15px; padding: 14px; margin-bottom: 20px; }
    .active-filters-area {
        margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px;
        width: calc(100% + 40px);
    }
}


.widget-fixed-wrapper {
    position: fixed;
    top: 220px;
    left: 50%;
    transform: translateX(-50%);    
    width: 100%;
    max-width: 1560px;
    padding: 0 20px;
    z-index: 2000;
    pointer-events: none;
}

.scroll-lead-widget {
    position: absolute;
    top: 0;
    right: 20px; 
    width: 300px;
    background-color: #F4F5F7;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 15px 20px;
    pointer-events: auto; 
    transform: translateX(150%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.2), opacity 0.4s, visibility 0.4s;
}

.scroll-lead-widget.is-visible {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.close-widget-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--grey_medium);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
}
.close-widget-btn svg {
    width: 16px;
    height: 16px;
}
.close-widget-btn:hover {
    color: var(--black);
}

.widget-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 10px;
    padding-right: 20px; 
    line-height: 1.3;
}

.widget-text-box {
    position: relative;
    margin-bottom: 15px;
}

.widget-text-box p {
    font-size: 12px;
    color: var(--grey);
    line-height: 1.4;
    padding-right: 50px; 
    margin: 0;
}

.widget-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.widget-form .form-control {
    background-color: var(--white);
    border: 1px solid var(--white);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
}
.widget-form .form-control:focus {
    border-color: var(--orange);
}

.widget-form .btn-primary {
    width: 100%;
    padding: 10px 0;
    font-size: 14px;
    border-radius: 6px;
}


@media (max-width: 767px) {
    .widget-fixed-wrapper {
        top: 150px;
        padding: 0;
    }
    
    .scroll-lead-widget {
        position: relative;
        right: auto;
        margin: 0 auto;
        max-width: 320px; 
        padding: 15px;
        transform: translateY(-50px);
    }
    
    .scroll-lead-widget.is-visible {
        transform: translateY(0);
    }
}







/* SPINNER DE CHARGEMENT AJAX (ANIMATION UX) */
#product-list-container {
    position: relative;
    min-height: 250px;
    transition: opacity 0.25s ease;
}

#ajax-category-container.loading #product-list-container {
    opacity: 0.35;
    pointer-events: none;
}

#ajax-category-container.loading #product-list-container::after {
    content: '';
    position: absolute;
    top: 120px;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border: 3.5px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--orange); 
    border-radius: 50%;
    animation: filterSpinner 0.7s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
    z-index: 50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

#ajax-category-container.loading .product-count-sup {
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

@keyframes filterSpinner {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}