.container-promotions {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
    box-sizing: border-box;
}
.container-promotions h1 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-top: 10px;
}
.promotions-content {
    display: flex;
    gap: 20px;
}
.promotions-filters {
    flex: 0 0 220px;
}
.promotions-filters strong {
    display: block;
    margin-bottom: 3px;
    color: black;
}
.promotions-cats-tree {
    margin: 0;
    padding: 0 0 0 0;
    list-style: none;
}
.promotions-cats-tree ul {
    padding-left: 2px;
}
.cat-branch {
    position: relative;
    margin-bottom: 2px;
    border-radius: 4px;
    padding: 2px 4px;
    transition: background 0.2s;
}

.cat-top-row {
    display: flex;
    align-items: center;
    position: relative;
}
.cat-top-row.cat-selected::before {
    content: "×";
    color: red;
    font-size: 14px;
    display: inline-block;
    margin-right: 6px;
    position: relative;
    top: 1px;
}
.cat-name {
    margin-right: auto;
}
.cat-name a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
}
.cat-name a:hover {
    color: #007bff;
}
.small-count {
    font-size: 14px;
    opacity: 0.7;
    margin-left: 3px;
}
.toggle-subcat {
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center right;
    background-size: 16px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' class='feather feather-chevron-down'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    cursor: pointer;
}
.subcat-wrapper {
    margin-left: 2px;
    margin-top: 0.5em;
}
.promotions-products {
    flex: 1;
}
.promotions-products-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.promotions-products-list .product-box {
    width: calc(25% - 20px);
    box-sizing: border-box;
    border: 1px solid #e2e2e2;
    padding: 10px;
    text-align: center;
    transition: border-color 0.3s ease, color 0.3s ease;
    border-radius: 4px;
    background: #fff;
}
.promotions-products-list .product-box:hover {
    border-color: #007bff;
    background: #f9f9f9;
}
.promotions-products-list .product-box a {
    text-decoration: none;
    color: #333;
}
.promotions-products-list .product-box:hover a,
.promotions-products-list .product-box:hover h2 {
    color: #007bff;
}
.promotions-products-list .product-box h2 {
    font-size: 16px;
    margin: 10px 0;
    font-weight: normal;
    transition: color 0.3s;
}
.product-box .padding-below-image {
    padding-bottom: 7px;
}
.mswp-pagination {
    text-align: center;
    margin-top: 20px;
}
.mswp-pagination .page-numbers {
    display: inline-block;
    margin: 0 5px;
    padding: 6px 12px;
    text-decoration: none;
    color: #555;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.mswp-pagination .page-numbers.current {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}
.mswp-pagination .page-numbers:hover {
    background-color: #f2f2f2;
}
.filter-item {
    list-style: none;
}
.discount-label {
    background: #f00;
    color: #fff;
    font-size: 12px;
    padding: 3px 6px;
    display: inline-block;
    margin-bottom: 3px;
    border-radius: 2px;
}
.special-sale {
    background: #fff;
    color: #f00;
    font-size: 11px;
    padding: 3px 6px;
    display: inline-block;
    margin-bottom: 6px;
    border: 1px solid #f00;
    border-radius: 2px;
}
.close-filter-btn {
    display: none;
}
@media (max-width: 768px) {
    .promotions-content {
        display: block;
    }
    .filtrer-mobile-btn {
        display: inline-block;
        margin-bottom: 10px;
        background: #007bff;
        color: #fff;
        padding: 8px 16px;
        border: none;
        cursor: pointer;
        font-size: 14px;
        border-radius: 4px;
        width: -webkit-fill-available;
    }
    .promotions-filters {
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #fff;
        box-sizing: border-box;
        padding: 20px;
        transform: translateX(-110%);
        transition: transform 0.3s ease;
        z-index: 999999;
        overflow-y: auto;
    }
    .promotions-filters.show {
        transform: translateX(0);
        padding-bottom: 80px;
    }
    .promotions-filters.show .close-filter-btn {
        display: inline-block;
        background: #c2c2c2;
        color: #fff;
        border: none;
        font-size: 14px;
        border-radius: 4px;
        margin-bottom: 22px;
        cursor: pointer;
        float: none;
        width: -webkit-fill-available;
    }
    .promotions-products {
        margin-top: 20px;
    }
    .promotions-products-list .product-box {
        width: calc(50% - 10px);
    }
    .product-box .padding-below-image img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: auto;
    }
}
.product-image-container {
    position: relative;
    display: inline-block;
}
.product-image-container .secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.product-image-container.has-second-img:hover img:not(.secondary-image) {
    opacity: 0;
}
.product-image-container.has-second-img:hover .secondary-image {
    opacity: 1;
}
.cats-carousel-wrapper {
    display: grid;
    grid-template-columns: 60px 1fr 60px;
    align-items: center;
    gap: 10px;
    width: 100%;
    overflow: hidden;
    margin: 20px 0;
    box-sizing: border-box;
}
.arrow-col {
    display: flex;
    justify-content: center;
    align-items: center;
}
.carousel-nav {
    background: #fff;
    border: 1px solid #ccc;
    font-size: 16px;
    cursor: pointer;
    width: 40px;
    height: 67px;
    border-radius: 20px;
    text-align: center;
    line-height: 36px;
    user-select: none;
    margin-top: 16px;
}
.cats-carousel-col {
    position: relative;
    overflow: hidden;
}
.cats-carousel {
    display: flex;
    gap: 10px;
    transition: transform 0.4s ease;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
}
.cats-carousel::-webkit-scrollbar {
    display: none;
}
.cat-slide {
    min-width: 120px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    flex-shrink: 0;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    border-radius: 4px;
}
.cat-slide:hover {
    border-color: #007bff;
    background: #fff;
}
.cat-slide a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s;
    padding-right:10px;
}
.cat-slide:hover a {
    color: #007bff;
}
@media(max-width:768px){
    .cats-carousel-wrapper {
        grid-template-columns: 40px 1fr 40px;
        gap: 5px;
    }
    .carousel-nav {
        font-size: 14px;
        width: 30px;
        height: 58px;
        line-height: 28px;
    }
    .cat-slide {
        min-width: 90px;
        padding: 15px;
    }
}
.selected-cat strong {
    display: inline-block;
}
.remove-top-cat {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ccc;
    color: #fff;
    border-radius: 50%;
    padding: 2px 6px;
    text-decoration: none;
    font-size: 12px;
    line-height: 1;
    font-weight: bold;
}

.bloc-cat-left {
    padding-bottom:25px;
}

.no-scroll {
    overflow: hidden;
    height: 100vh; 
    position: fixed; 
}

.product-box-footer {
    margin-top: auto;
    text-align: center; 
}


.buy-button {
    display: inline-block;
    background-color: #2dd07f;
    border-radius: 5px;
    padding: 2px 16px;
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
    width: -webkit-fill-available;
    font-size: medium;
    margin-top:10px;
}

.buy-button:hover {
    background-color: #28c372;
}

/* Bouton “Stock épuisé” (produit en rupture) */
.buy-button.out-of-stock {
    background-color: #767676;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.75;
}

.buy-button.out-of-stock:hover {
    background-color: #767676;
}

.product-box h2 {
    min-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#infinite-scroll-loader .msas-spinner {
  margin: auto;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: #007bff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
