﻿.catalog {
    margin-bottom: 50px;
    margin-top: 38px;
}

body.sidebar-opened::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* Р›РµРіРєРѕРµ Р·Р°С‚РµРјРЅРµРЅРёРµ */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); /* Р”Р»СЏ Safari */
    z-index: 999; /* Р§СѓС‚СЊ РјРµРЅСЊС€Рµ С‡РµРј Сѓ СЃР°Р№РґР±Р°СЂР° */
}


.catalog__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.catalog__title {
    font-size: 64px;
    line-height: 64px;
    color: #1C1C1C;
    margin-bottom: 30px;
}

.catalog__head-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.catalog__wrapper {
    display: flex;
    gap: 52px;
}

.catalog__sort {
    display: flex;
    justify-content: end;
    gap: 20px;
}

.sort-btn {
    text-decoration: none;
    color: #1C1C1C;
    transition: 0.3s;
    background: none;
    font-weight: 500;
    padding: 12px 20px;
    border: 2px solid #FFE6CD;
    cursor: pointer;
    font-size: 14px;
}

.sort-btn.active {
    background: #FFE6CD;
}


.catalog__sidebar {
    width: 272px;
}

.catalog__menu, 
.catalog__menu .sub-menu {
    list-style: none;
    /* Р¤РёРєСЃРёСЂСѓРµРј С€РёСЂРёРЅСѓ */
    width: 272px;
    min-width: 272px; 
    max-width: 272px;
    
    flex-shrink: 0; /* Р—Р°РїСЂРµС‰Р°РµРј СЃР¶РёРјР°С‚СЊСЃСЏ РІРѕ С„Р»РµРєСЃ-РєРѕРЅС‚РµР№РЅРµСЂРµ */
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Р РѕРґРёС‚РµР»СЊСЃРєРёР№ LI */
.catalog__menu > li {
    width: 100%;
}

/* РћР±С‰РёР№ СЃС‚РёР»СЊ РґР»СЏ РІСЃРµС… РєРЅРѕРїРѕРє-СЃСЃС‹Р»РѕРє РІ РјРµРЅСЋ */
.catalog__menu li a {
    display: block;
    text-decoration: none;
    color: #1C1C1C;
    border: 2px solid #FFE6CD;
    border-radius: 6px;
    transition: 0.2s;
    cursor: pointer;
}

/* РЎРїРµС†РёС„РёС‡РµСЃРєРёРµ СЃС‚РёР»Рё РґР»СЏ Р РћР”РРўР•Р›Р¬РЎРљРРҐ СЃСЃС‹Р»РѕРє */
.catalog__menu > li > a {
    padding: 16px 24px;
    font-size: 20px;
    line-height: 24px;
    font-weight: 500;
}

/* РЎРўРР›Р Р”Р›РЇ РџРћР”РљРђРўР•Р“РћР РР™ (Р’Р»РѕР¶РµРЅРЅРѕРµ РјРµРЅСЋ) */
.catalog__menu .sub-menu {
    padding-left: 12px; /* РћС‚СЃС‚СѓРї РІСЃРµР№ РіСЂСѓРїРїС‹ РїРѕРґРєР°С‚РµРіРѕСЂРёР№ */
    border-left: 2px solid #EDEDED;
    margin-top: 10px;    /* Р Р°СЃСЃС‚РѕСЏРЅРёРµ РѕС‚ СЂРѕРґРёС‚РµР»СЊСЃРєРѕР№ СЃСЃС‹Р»РєРё РґРѕ РїРµСЂРІРѕР№ РїРѕРґРєР°С‚РµРіРѕСЂРёРё */
    gap: 8px;           /* Р Р°СЃСЃС‚РѕСЏРЅРёРµ РјРµР¶РґСѓ СЃР°РјРёРјРё РїРѕРґРєР°С‚РµРіРѕСЂРёСЏРјРё */
}

.catalog__menu .sub-menu li a {
    padding: 12px 20px; /* Р§СѓС‚СЊ РјРµРЅСЊС€Рµ РїР°РґРёРЅРіРё */
    font-weight: 500;
    font-size: 16px;    /* РњРµРЅСЊС€Рµ С€СЂРёС„С‚ */
    line-height: 20px;
}

/* РЎРћРЎРўРћРЇРќРРЇ РђРљРўРР’РќРћРЎРўР Р РҐРћР’Р•Р  */

/* РҐРѕРІРµСЂ РґР»СЏ РІСЃРµС… */
.catalog__menu li a:hover {
    background: #fff9f2;
    border-color: #e30613; 
}

/* РђРєС‚РёРІРЅС‹Р№ РїСѓРЅРєС‚ (Рё СЂРѕРґРёС‚РµР»СЊ, Рё СЂРµР±РµРЅРѕРє) */
.catalog__menu li.active > a {
    background: #FFE6CD;
    border-color: #FFE6CD;
    font-weight: 600;
}





/* РћСЃРЅРѕРІРЅРѕР№ РєРѕРЅС‚РµР№РЅРµСЂ С„РёР»СЊС‚СЂР° */
.sidebar-filter {
    margin-bottom: 25px;
}

/* Р—Р°РіРѕР»РѕРІРѕРє */
.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 24px;
    color: #1C1C1C;
    padding-bottom: 12px;
    border-bottom: 2px solid #EDEDED;
}

.arrow-icon {
    transition: transform 0.3s ease;
    fill: none;
    stroke: #E30613; /* РљСЂР°СЃРЅР°СЏ СЃС‚СЂРµР»РѕС‡РєР° */
    stroke-width: 2px;
}

/* РљРѕРЅС‚РµР№РЅРµСЂ РґР»СЏ РІС‹Р±СЂР°РЅРЅС‹С… Р±СЂРµРЅРґРѕРІ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Р Р°СЃСЃС‚РѕСЏРЅРёРµ РјРµР¶РґСѓ С‡РёРїСЃР°РјРё */
    margin-top: 5px;
}

/* РЎС‚РёР»РёР·Р°С†РёСЏ Р§РРџРЎРћР’ (РєР°Рє РЅР° РјР°РєРµС‚Рµ) */
.filter-chip {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #FFE6CD; /* РўРѕРЅРєР°СЏ СЃРІРµС‚Р»Р°СЏ СЂР°РјРєР° */
    border-radius: 10px; /* РњСЏРіРєРёРµ СЃРєСЂСѓРіР»РµРЅРёСЏ */
    padding: 8px 16px; /* Р’РЅСѓС‚СЂРµРЅРЅРёРµ РѕС‚СЃС‚СѓРїС‹ РґР»СЏ РѕР±СЉРµРјР° */
    font-size: 16px;
    color: #1C1C1C;
    box-shadow: 0 2px 4px rgba(255, 230, 205, 0.2); /* Р›РµРіРєР°СЏ С‚РµРЅСЊ РІ С†РІРµС‚ СЂР°РјРєРё */
}

/* РљСЂРµСЃС‚РёРє РІРЅСѓС‚СЂРё С‡РёРїСЃР° */
.filter-chip .remove {
    margin-left: 12px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #1C1C1C;
    display: inline-block;
}

/* Р’С‹РїР°РґР°СЋС‰РёР№ СЃРїРёСЃРѕРє Р±СЂРµРЅРґРѕРІ */
.filter-dropdown {
    display: none;
    margin-top: 16px;
    padding: 15px;
    background: #fff;
    border: 1px solid #FFE6CD;
    border-radius: 12px;
}

.sidebar-filter.open .filter-dropdown {
    display: block;

}


.sidebar-filter.open .arrow-icon {
    transform: rotate(180deg);
}

/* РљРѕРЅС‚РµР№РЅРµСЂ СЃРїРёСЃРєР° */
.brand-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-list li {
    margin-bottom: 12px;
}

/* РћСЃРЅРѕРІРЅРѕР№ РєРѕРЅС‚РµР№РЅРµСЂ label */
.brand-list label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #1C1C1C;
    user-select: none;
    position: relative;
}

/* РЎРєСЂС‹РІР°РµРј СЂРѕРґРЅРѕР№ С‡РµРєР±РѕРєСЃ */
.brand-list input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Р РёСЃСѓРµРј РєР°СЃС‚РѕРјРЅС‹Р№ РєРІР°РґСЂР°С‚ (С‡РµСЂРµР· span) */
.brand-list label span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-list label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative; /* РљРѕРЅС‚РµРєСЃС‚ РґР»СЏ РіР°Р»РѕС‡РєРё */
    padding: 4px 0;
}

.brand-list label span::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 4px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background-color: #fff;
    box-sizing: border-box;
    /* РЈР±РёСЂР°РµРј Р»РёС€РЅРёРµ РѕС‚СЃС‚СѓРїС‹, РµСЃР»Рё С„Р»РµРєСЃ РёС… РґРѕР±Р°РІРёР» */
    margin-top: 1px; 
}

/* Р­С„С„РµРєС‚ РїСЂРё РЅР°РІРµРґРµРЅРёРё */
.brand-list label:hover span::before {
    border-color: #FD1F2D;
}

/* РЎРѕСЃС‚РѕСЏРЅРёРµ: Р’С‹Р±СЂР°РЅРѕ (С„РѕРЅ Рё СЂР°РјРєР°) */
.brand-list input:checked + span::before {
    background-color: #FD1F2D;
    border-color: #FD1F2D;
}

/* Р РёСЃСѓРµРј РіР°Р»РѕС‡РєСѓ РІРЅСѓС‚СЂРё (С‡РµСЂРµР· after) */
.brand-list label span::after {
    content: "";
    position: absolute;
    /* Р¦РµРЅС‚СЂРёСЂСѓРµРј РІРЅСѓС‚СЂРё РєРІР°РґСЂР°С‚Р° 20x20 */
    /* Р Р°СЃС‡РµС‚: (20px С€РёСЂРёРЅР° / 2) - РЅРµРјРЅРѕРіРѕ РЅР° РіР»Р°Р· */
    left: 7px; 
    top: 7px; /* Р‘С‹Р»Рѕ РїСѓСЃС‚Рѕ, РїРѕСЌС‚РѕРјСѓ РѕРЅР° СѓР»РµС‚Р°Р»Р°. РџРѕСЃС‚Р°РІСЊ 9px РёР»Рё 10px */
    
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.12, 0.4, 0.29, 1.46);
    z-index: 2;
}

/* РџРѕРєР°Р·С‹РІР°РµРј РіР°Р»РѕС‡РєСѓ РїСЂРё checked */
.brand-list input:checked + span::after {
    transform: rotate(45deg) scale(1);
}





.catalog__content {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    gap: 24px;
}


.catalog__grid {
    display: grid;
    /* minmax(0, 1fr) Р·Р°СЃС‚Р°РІР»СЏРµС‚ РєРѕР»РѕРЅРєСѓ СЃР¶РёРјР°С‚СЊСЃСЏ РґРѕ РЅСѓР»СЏ, РµСЃР»Рё РЅСѓР¶РЅРѕ, 
       РЅРµ РґР°РІР°СЏ РµР№ СЂР°СЃРїРёСЂР°С‚СЊ СЂРѕРґРёС‚РµР»СЏ */
    grid-template-columns: repeat(4, minmax(0, 1fr)); 
    gap: 20px;
    width: 100%; /* Р“Р°СЂР°РЅС‚РёСЂСѓРµРј, С‡С‚Рѕ СЃРµС‚РєР° Р·Р°РЅРёРјР°РµС‚ РІСЃСЋ С€РёСЂРёРЅСѓ */
    box-sizing: border-box;
}

/* Product card — Figma «карточка small» */
.product {
    border: 2px solid #FFE6CD;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    box-sizing: border-box;
}

.product:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product__photo {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.product img {
    width: 100%;
    height: 148px;
    border-radius: 8px;
    object-fit: contain;
    margin: 0;
    display: block;
}

.product__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    padding: 8px;
    min-width: 0;
    min-height: 0;
    box-sizing: border-box;
}

.product__info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.product__info > a {
    text-decoration: none;
    color: inherit;
}

.product h3 {
    font-size: 17px;
    line-height: 21px;
    font-weight: 500;
    color: #1C1C1C;
    margin: 0;
}

.product p {
    font-size: 14px;
    line-height: 20px;
    color: rgba(28, 28, 28, 0.6);
    margin: 0;
}

.product__cart {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
}

.product__price {
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    margin: 0;
    color: #B40555;
}

.product__price span {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #1C1C1C;
}

/* Bottom */
.product__bottom {
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    margin-top: 0;
}

/* Qty */
.product__qty {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product__qty span {
    font-size: 20px;
    color: #1C1C1C;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    padding: 10px 2px;
    border-radius: 8px;
    border: 2px solid #EDEDED;
}

.product__qty button {
    width: 25px;
    height: 25px;
    border: none;
    color: #1C1C1C;
    background: #fff;
    cursor: pointer;
}

/* Button */
.product__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    background: #FD1F2D;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all ease-in-out 0.2s;
    cursor: pointer;
}

.product__btn::after {
    content: "";
    width: 16px;
    height: 16px;
    background: url('../icons/cart-product.svg') no-repeat center / contain;
    display: inline-block;
    flex-shrink: 0;
}

.product__btn:hover {
    background: #ff0111;
    transition: all ease-in-out 0.2s;
}

.product__btn svg {
    flex-shrink: 0; 
}


.pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    font-family: sans-serif;
}

.pagination a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

/* ===== Catalog pagination (WooCommerce) ===== */
.catalog__pagination {
    width: 100%;
    margin-top: 40px;
}

.catalog__pagination .woocommerce-pagination,
.woocommerce-pagination {
    display: block;
    width: 100%;
    margin: 0;
    overflow: visible;
}

.catalog__pagination .woocommerce-pagination ul.page-numbers,
.woocommerce-pagination ul.page-numbers {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 8px;
    width: 100%;
    overflow: visible;
}

.catalog__pagination .woocommerce-pagination ul.page-numbers li,
.woocommerce-pagination ul.page-numbers li {
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    list-style: none;
    float: none;
}

.catalog__pagination .woocommerce-pagination .page-numbers,
.woocommerce-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto !important;
    min-width: 48px;
    height: 48px !important;
    max-height: none;
    font-size: 20px;
    line-height: 1;
    padding: 0 12px !important;
    border-radius: 8px;
    background: #fff;
    color: #1C1C1C !important;
    text-decoration: none;
    font-weight: 500;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
    overflow: visible;
}

.catalog__pagination .woocommerce-pagination a.page-numbers:hover,
.woocommerce-pagination a.page-numbers:hover {
    border-color: #FD1F2D;
    color: #FD1F2D !important;
    background: #FFF5F5;
}

.catalog__pagination .woocommerce-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current {
    background: #FD1F2D !important;
    border-color: #FD1F2D;
    color: #fff !important;
    cursor: default;
}

.catalog__pagination .woocommerce-pagination .page-numbers.dots,
.woocommerce-pagination .page-numbers.dots {
    min-width: 28px;
    padding: 0 4px !important;
    border: none !important;
    background: transparent !important;
    color: rgba(28, 28, 28, 0.45) !important;
    pointer-events: none;
    letter-spacing: 0.12em;
}

.catalog__pagination .woocommerce-pagination .prev.page-numbers,
.catalog__pagination .woocommerce-pagination .next.page-numbers,
.woocommerce-pagination .prev.page-numbers,
.woocommerce-pagination .next.page-numbers {
    background: #FFE6CD !important;
    border-color: #FFE6CD;
    color: #1C1C1C !important;
    padding: 0 8px !important;
}

.catalog__pagination .woocommerce-pagination .prev.page-numbers:hover,
.catalog__pagination .woocommerce-pagination .next.page-numbers:hover,
.woocommerce-pagination .prev.page-numbers:hover,
.woocommerce-pagination .next.page-numbers:hover {
    background: #ffd4a8 !important;
    border-color: #ffd4a8;
    color: #1C1C1C !important;
}

.catalog__pagination .woocommerce-pagination .page-numbers svg,
.woocommerce-pagination .page-numbers svg {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .catalog__pagination {
        margin-top: 24px;
        margin-bottom: 40px;
    }

    .catalog__pagination .woocommerce-pagination ul.page-numbers,
    .woocommerce-pagination ul.page-numbers {
        gap: 4px;
    }

    .catalog__pagination .woocommerce-pagination .page-numbers,
    .woocommerce-pagination .page-numbers {
        min-width: 36px;
        height: 36px !important;
        font-size: 15px;
        padding: 0 8px !important;
        border-radius: 6px;
    }

    .catalog__pagination .woocommerce-pagination .page-numbers.dots,
    .woocommerce-pagination .page-numbers.dots {
        min-width: 18px;
        padding: 0 2px !important;
        font-size: 14px;
    }

    .catalog__pagination .woocommerce-pagination .page-numbers svg,
    .woocommerce-pagination .page-numbers svg {
        width: 18px;
        height: 18px;
    }
}


.page {
    background-color: #fff;
}


.arrow,
.page.active {
    background-color: #ffe8d6;
    border: 1px solid transparent;
}


.pagination a:hover {
    background-color: #ffd8bc;
    border-color: #ffccaa;
}


.arrow {
    font-weight: bold;
    color: #555;
}

.mobile-filter-btn {
    display: none;
}


.catalog__sort-mobile {
    display: none;
}

/* Контейнер для кнопки и ссылки «Посмотреть корзину» */
.product__bottom {
    position: relative;
}

.product__bottom .added_to_cart,
.product__bottom .added_to_cart.wc-forward,
.product__bottom a.button.added_to_cart {
    position: static !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 8px 12px !important;
    border: 2px solid #FFE6CD !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #1C1C1C !important;
    font-size: 14px !important;
    font-weight: 500;
    line-height: 17px;
    text-align: center;
    text-decoration: none !important;
    white-space: normal;
    box-shadow: none !important;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.product__bottom .added_to_cart:hover,
.product__bottom .added_to_cart.wc-forward:hover,
.product__bottom a.button.added_to_cart:hover {
    border-color: #FD1F2D !important;
    color: #FD1F2D !important;
    background: #fff8f8 !important;
}

/* Кнопка «В корзину» после добавления */
.product__btn.added {
    background-color: #f2f2f2 !important;
    color: #1c1c1c !important;
    border-color: #ddd !important;
}

.product__btn.added::after {
    filter: grayscale(1) brightness(0.35);
}

/* --- РЈР›РЈР§РЁР•РќРќР«Р™ РђР”РђРџРўРР’ --- */

@media (max-width: 1224px) {
    .catalog__menu, 
    .catalog__menu .sub-menu {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }
    .sidebar-filter {
        margin-bottom: 0px;
    }
    /* 1. Р—Р°РіРѕР»РѕРІРѕРє Рё РєРЅРѕРїРєР° РІС‹Р·РѕРІР° */
    .catalog__title {
        font-size: 32px; /* Р§СѓС‚СЊ РјРµРЅСЊС€Рµ, С‡С‚РѕР±С‹ РЅРµ СЂР°Р·СЂС‹РІР°Р»Рѕ СЌРєСЂР°РЅ */
        line-height: 1.2;
        text-align: center;
        margin-bottom: 20px;
    }
    .catalog__head-top {
        flex-direction: column;
        align-items: stretch;
    }

    .hide-mobile {
        display: none;
    }

    .catalog__sort {
        align-items: center;
        margin-bottom: 4px;
        gap: 4px;
    }
    .catalog__sort-mobile {
        display: block;
        font-size: 14px;
        line-height: 17px;
        color: #1C1C1C;
    }


    .mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        background: #FFFFFF;
        border: 2px solid #FD1F2D;
        border-radius: 12px;
        padding: 14px;
        font-size: 18px;
        font-weight: 500;
        color: #1C1C1C;
        margin-bottom: 24px;
    }

    /* 2. РњРѕРґР°Р»СЊРЅРѕРµ РѕРєРЅРѕ (СЃР°Р№РґР±Р°СЂ) */
    .catalog__sidebar {
        position: fixed;
        top: 40px;
        right: -105%; /* РЎ Р·Р°РїР°СЃРѕРј, С‡С‚РѕР±С‹ РЅРµ Р±С‹Р»Рѕ С‚РµРЅРё */
        width: 100%;
        height: 100vh;
        background: #fff;
        z-index: 10000;
        display: flex !important; /* Р’СЃРµРіРґР° С„Р»РµРєСЃ, РЅРѕ СЃРєСЂС‹С‚ Р·Р° СЌРєСЂР°РЅРѕРј */
        flex-direction: column;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .catalog__sidebar.active-mobile {
        right: 0;
    }

    /* 3. РЁР°РїРєР° РјРѕРґР°Р»РєРё */
    .sidebar-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 24px 38px 20px 20px; /* РЈРІРµР»РёС‡РµРЅРЅС‹Рµ РѕС‚СЃС‚СѓРїС‹ */
        border-bottom: 1px solid #F2F2F2;
        flex-shrink: 0; /* Р§С‚РѕР±С‹ РЅРµ СЃР¶РёРјР°Р»Р°СЃСЊ */
    }

    .sidebar-mobile-header h3 {
        font-size: 28px;
        line-height: 32px;
        font-weight: 500;
        margin: 0;
    }

    /* РСЃРїСЂР°РІР»РµРЅРЅР°СЏ РєРЅРѕРїРєР° Р·Р°РєСЂС‹С‚РёСЏ */
    .sidebar-mobile-header .close-sidebar {
        position: static !important; /* РЈР±РёСЂР°РµРј absolute */
        cursor: pointer;
        display: flex !important;
        background: none;
        border: none;
        padding: 0;
        color: #1C1C1C;
    }

    .sidebar-scroll-area {
        position: relative;
        flex: 1; /* Р—Р°РЅРёРјР°РµС‚ РІСЃС‘ РїСЂРѕСЃС‚СЂР°РЅСЃС‚РІРѕ РјРµР¶РґСѓ С…РµРґРµСЂРѕРј Рё С„СѓС‚РµСЂРѕРј */
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Р’Р°Р¶РЅРѕ: С‡С‚РѕР±С‹ СЃРєСЂРѕР»Р» С€РµР» С‚РѕР»СЊРєРѕ РІРЅСѓС‚СЂРё РєРѕРЅС‚РµРЅС‚Р° */
        min-height: 0; /* РљРѕСЃС‚С‹Р»СЊ РґР»СЏ Firefox/Safari, С‡С‚РѕР±С‹ С„Р»РµРєСЃ РЅРµ СЂР°СЃРїРёСЂР°Р»Рѕ */
    }
    /* 4. РљРѕРЅС‚РµРЅС‚ СЃРѕ СЃРєСЂРѕР»Р»РѕРј */
    .sidebar-content {
        height: 100%;
        flex: 1;
        display: flex;
        flex-direction: column-reverse; /* РЎС‚Р°РЅРґР°СЂС‚РЅС‹Р№ РїРѕСЂСЏРґРѕРє СЃРІРµСЂС…Сѓ РІРЅРёР· */
        padding: 24px 38px 20px 20px;
        position: relative; /* Р§С‚РѕР±С‹ РєР°СЃС‚РѕРјРЅС‹Р№ СЃРєСЂРѕР»Р» РЅРµ СѓР»РµС‚РµР» */
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: none;
    }

    .sidebar-content::-webkit-scrollbar {
        display: none;
    }

    /* РЎР°РјР° РґРѕСЂРѕР¶РєР° СЃРєСЂРѕР»Р»Р±Р°СЂР° */
    .sidebar-scroll {
        position: absolute !important; /* РРјРµРЅРЅРѕ absolute РѕС‚РЅРѕСЃРёС‚РµР»СЊРЅРѕ .sidebar-content */
        right: 16px;
        top: 0; 
        height: 100%; /* Р”РѕСЂРѕР¶РєР° РґРѕР»Р¶РЅР° СЂР°СЃС‚СЏРЅСѓС‚СЊСЃСЏ РЅР° РІСЃСЋ РІС‹СЃРѕС‚Сѓ */
        width: 2px;
        z-index: 9999;
        pointer-events: none;
    }

    /* РџРѕР»Р·СѓРЅРѕРє */
    .sidebar-scroll__thumb {
        width: 100%;
        background: #FD1F2D; /* РўРІРѕР№ С†РІРµС‚ РёР· РјР°РєРµС‚Р° */
        position: absolute;
        top: 0;
        height: 48px; /* Р’С‹СЃРѕС‚Р° Р±СѓРґРµС‚ РјРµРЅСЏС‚СЊСЃСЏ СЃРєСЂРёРїС‚РѕРј */
    }

    /* 5. Р¤СѓС‚РµСЂ СЃ РєРЅРѕРїРєР°РјРё */
    .sidebar-mobile-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 20px 38px calc(20px + env(safe-area-inset-bottom)) 20px; /* РћС‚СЃС‚СѓРї СЃРЅРёР·Сѓ РґР»СЏ iPhone */
        border-top: 1px solid #F2F2F2;
        flex-shrink: 0;
        margin-bottom: 40px;
    }

    .sidebar-mobile-footer button {
        height: 54px;
        border-radius: 12px;
        color: #fff;
        font-size: 14px;
        font-weight: 600;
        border: none;
    }
    .btn-reset {
        background: #1C1C1C;
    }
    .btn-apply {
        background: #FD1F2D;
    }

    .catalog__content {
        width: 100%;
    }
    /* 6. РЎРµС‚РєР° С‚РѕРІР°СЂРѕРІ */
    .catalog__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        width: 100%;
    }
}

/* РЎРєСЂС‹РІР°РµРј РјРѕР±РёР»СЊРЅС‹Рµ СЌР»РµРјРµРЅС‚С‹ РЅР° РґРµСЃРєС‚РѕРїРµ */ 
@media (min-width: 1225px) {
    .sidebar-mobile-header, 
    .sidebar-mobile-footer,
    .mobile-filter-btn {
        display: none !important;
    }
    .catalog__sidebar {
        position: relative;
        width: 300px; /* РўРІРѕСЏ С€РёСЂРёРЅР° РґР»СЏ РґРµСЃРєС‚РѕРїР° */
        display: block !important;
        right: 0;
    }
}


@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .catalog {
        margin-bottom: 30px;
    }

    .catalog__title {
        font-size: 32px;
    }

    .sort-btn {
        white-space: nowrap;
        padding: 8px 20px;
        border-radius: 8px;
        font-size: 14px;
        line-height: 17px; 
        font-weight: 500;
        flex-shrink: 0;
    }
    .filter-chip {
        font-size: 14px;
        line-height: 17px;
    }
    .sz-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Figma «карточка small» — mobile */
    .product {
        padding: 4px;
        gap: 0;
        border-radius: 12px !important;
    }

    .product img {
        height: 103px;
    }

    .product__body {
        gap: 6px;
        padding: 8px;
    }

    .product h3 {
        font-size: 13px;
        line-height: 15px;
    }

    .product p {
        font-size: 12px;
        line-height: 15px;
    }

    .product__cart {
        gap: 2px;
    }

    .product__price {
        font-size: 16px;
        line-height: 19px;
        text-align: left;
    }

    .product__price span {
        font-size: 12px;
        line-height: 15px;
    }

    .product__btn {
        width: 100%;
        font-size: 14px;
        line-height: 17px;
        padding: 12px 20px;
    }

    .product__btn::after {
        width: 12px;
        height: 12px;
    }

    .product__bottom {
        flex-direction: column;
        justify-content: stretch;
        align-items: stretch;
        gap: 4px;
    }

    .product__bottom .added_to_cart,
    .product__bottom .added_to_cart.wc-forward,
    .product__bottom a.button.added_to_cart {
        font-size: 12px !important;
        line-height: 15px;
        padding: 6px 10px !important;
    }

    .product__qty {
        justify-content: center;
    }
}

@media (max-width: 680px) {
    .catalog__head {
        flex-direction: column;
        align-items: flex-start;
    }
}