/* Reset and base styles */
@import url("https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css");

* {
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

/* Global scaling to make elements look like 80% zoom at 100% */
.element-light {
    transform: scale(0.8);
    transform-origin: top left;
    width: 125%; /* Compensate for scaling */
    height: 125%; /* Compensate for scaling */
}

html, body {
    margin: 0;
    height: 100%;
    font-family: 'Manrope', sans-serif;
    overflow-x: hidden; /* Prevent horizontal scroll from scaling */
}

/* ===== КАСТОМНЫЙ СКРОЛЛБАР В ЦВЕТАХ САЙТА ===== */
/* Для Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #ef233c #f1f3f5;
}

/* Для Chrome, Safari, Edge */
html::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-left: 1px solid #e9ecef;
}

html::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    border-radius: 5px;
    border: 2px solid #f1f3f5;
    transition: all 0.2s ease;
}

html::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%);
    border: 1px solid #f1f3f5;
}

html::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

/* Для body (если нужен отдельный скроллбар) */
body {
    scrollbar-width: thin;
    scrollbar-color: #ef233c #f1f3f5;
}

body::-webkit-scrollbar {
    width: 10px;
}

body::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-left: 1px solid #e9ecef;
}

body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    border-radius: 5px;
    border: 2px solid #f1f3f5;
    transition: all 0.2s ease;
}

body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%);
    border: 1px solid #f1f3f5;
}

body::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
}

button:focus-visible {
    outline: 2px solid #4a90e2 !important;
    outline: -webkit-focus-ring-color auto 5px !important;
}

a {
    text-decoration: none;
}

/* Main Container */
.element-light {
    position: relative;
    min-height: 100vh;
    background: linear-gradient(0deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 67px;
    background: #f4f4f4;
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    width: 61px;
    height: 51px;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #000;
    font-size: 16px;
    font-weight: 400;
    transition: color 0.2s;
}

.nav-link.active {
    color: #ef233c;
    font-weight: 600;
}

.nav-link:hover {
    color: #ef233c;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.language-switcher {
    display: flex;
    background: white;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    margin-right: 10px;
}

.lang-btn {
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #a9b0c3;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.lang-btn:hover {
    background: rgba(239, 35, 60, 0.1);
    color: #ef233c;
}

.lang-btn.active {
    background: #ef233c;
    color: white;
}

.lang-btn.active:hover {
    background: #d11a2b;
}

.cart-btn, .login-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-btn {
    background: #ef233c;
    color: white;
    text-decoration: none;
    display: inline-block;
}

.cart-btn:hover {
    color: white;
}

.login-btn {
    background: white;
    color: #000;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: #000;
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: none; /* Override global scaling for mobile menu */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
}

.mobile-logo {
    width: 50px;
    height: 42px;
    object-fit: contain;
}



.mobile-nav {
    padding: 20px 0;
}

.mobile-nav-link {
    display: block;
    padding: 15px 20px;
    color: #000;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: rgba(239, 35, 60, 0.1);
    color: #ef233c;
}

.mobile-menu-actions {
    padding: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: auto;
}

.mobile-language-switcher {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.mobile-language-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.mobile-language-buttons {
    display: flex;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-lang-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-lang-btn.active {
    background: #ef233c;
    color: white;
}

.mobile-cart-btn,
.mobile-login-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
}

.mobile-cart-btn {
    background: #ef233c;
    color: white;
    text-decoration: none;
    display: block;
    text-align: center;
}

.mobile-cart-btn:hover {
    background: #d11a2b;
    color: white;
}

.mobile-login-btn {
    background: white;
    color: #000;
    border: 1px solid #ddd;
}

.mobile-login-btn:hover {
    background: #f5f5f5;
}

/* Main Content */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 40px;
    min-height: calc(100vh - 67px);
}

/* Page Header */
.page-header {
    grid-column: 1 / -1;
    margin-top: 91px;
    margin-bottom: 20px;
}

.heading {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 20px 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #000;
}

.breadcrumb-link {
    color: #000;
    opacity: 0.7;
}

.breadcrumb-separator {
    opacity: 0.5;
}

.breadcrumb-current {
    font-weight: 500;
}

/* Promo Section */
.promo-section {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    background: transparent;
    border-radius: 12px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    contain: layout;
}

.promo-container {
    display: contents;
}


/* Media query for tablet promo section */
@media (max-width: 1199px) and (min-width: 769px) { /* Tablet */
    .promo-section {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 20px;
        padding: 0 10px;
        position: relative;
    }
    
    .promo-section::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .promo-container {
        display: flex;
        gap: 20px;
        min-width: max-content;
        flex: 1;
    }
    
    .promo-banner {
        min-width: 200px;
        flex-shrink: 0;
        flex: 0 0 auto;
    }
    
}

/* Media query for mobile promo section */
@media (max-width: 768px) { /* Mobile */
    .promo-section {
        display: flex !important;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        gap: 15px;
        padding: 0 15px;
        position: relative;
        margin: 0 -15px 20px -15px; /* Extend to full width */
        grid-template-columns: none !important;
    }
    
    .promo-section::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .promo-container {
        display: flex !important;
        gap: 15px;
        min-width: max-content;
        flex: 1;
    }
    
    .promo-banner {
        min-width: 200px !important;
        flex-shrink: 0 !important;
        flex: 0 0 auto !important;
        height: 170px !important;
        display: flex !important;
        position: relative !important;
    }
    
}

/* Media query for very small mobile promo section */
@media (max-width: 480px) { /* Very small mobile */
    .promo-section {
        gap: 12px;
        padding: 0 12px;
        margin: 0 -12px 20px -12px;
        display: flex !important;
        grid-template-columns: none !important;
    }
    
    .promo-container {
        gap: 12px;
        display: flex !important;
    }
    
    .promo-banner {
        min-width: 160px !important;
        height: 160px !important;
        padding: 15px !important;
        flex-shrink: 0 !important;
        flex: 0 0 auto !important;
        display: flex !important;
        position: relative !important;
    }
    
    
    .promo-icon {
        width: 40px;
        height: 40px;
        border-radius: 20px;
    }
    
    .promo-text {
        font-size: 14px;
    }
}

.promo-banner {
    position: relative;
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Static gradients for fallback banners */
.promo-banner-1:not([style*="background-image"]) {
    background: linear-gradient(150deg, rgba(255, 107, 107, 1) 0%, rgba(238, 90, 36, 1) 100%);
}

.promo-banner-2:not([style*="background-image"]) {
    background: linear-gradient(150deg, rgba(78, 205, 196, 1) 0%, rgba(68, 160, 141, 1) 100%);
}

.promo-banner-3:not([style*="background-image"]) {
    background: linear-gradient(150deg, rgba(69, 183, 209, 1) 0%, rgba(150, 201, 61, 1) 100%);
}

.promo-banner-4:not([style*="background-image"]) {
    background: linear-gradient(150deg, rgba(249, 202, 36, 1) 0%, rgba(240, 147, 43, 1) 100%);
}

.promo-banner-5:not([style*="background-image"]) {
    background: linear-gradient(150deg, rgba(108, 92, 231, 1) 0%, rgba(162, 155, 254, 1) 100%);
}

.promo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-icon img {
    width: 24px;
    height: 24px;
}

.icon-placeholder {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
}

.promo-text {
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
    height: fit-content;
    display: block !important; /* Принудительно показываем сайдбар */
    position: relative;
    z-index: 10;
}

/* Mobile Categories Section */
.mobile-categories {
    display: none;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px;
}

.mobile-categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-categories-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.mobile-more-btn {
    background: #ef233c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(239, 35, 60, 0.2);
}

.mobile-more-btn:hover {
    background: #d11a2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 35, 60, 0.3);
}

.mobile-categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-lg, 20px);
}

/* Скрываем карточки после 10-й (показываем 2 строки по 5) */
.mobile-categories-grid .mobile-category-card:nth-child(n+11) {
    display: none;
}

/* Показываем все карточки при развернутом состоянии */
.mobile-categories-grid.expanded .mobile-category-card {
    display: block !important;
}

.mobile-category-card {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--color-bg-dark, #1a1a1a);
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    border: 1px solid var(--color-border-light, rgba(255, 255, 255, 0.1));
    cursor: pointer;
    transition: transform var(--transition-normal, 0.3s ease), box-shadow var(--transition-normal, 0.3s ease);
}

.mobile-category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg, 0 4px 20px rgba(0, 0, 0, 0.15));
}

.mobile-category-card.active {
    border: 2px solid #ef233c;
    box-shadow: 0 4px 20px rgba(239, 35, 60, 0.3);
}

.mobile-category-card.active .mobile-category-overlay {
    background: rgba(239, 35, 60, 0.8);
}

.mobile-category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mobile-category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 4px;
}

/* Loading placeholder for category images */
.image-loading-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #ffffff 25%, #f8f8f8 50%, #ffffff 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top: 2px solid #ef233c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

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

.vodka-bg {
    background: linear-gradient(150deg, rgba(108, 92, 231, 1) 0%, rgba(162, 155, 254, 1) 100%);
}

.beer-bg {
    background: linear-gradient(150deg, rgba(255, 107, 107, 1) 0%, rgba(238, 90, 36, 1) 100%);
}

.ice-bg {
    background: linear-gradient(150deg, rgba(69, 183, 209, 1) 0%, rgba(150, 201, 61, 1) 100%);
}

.fish-bg {
    background: linear-gradient(150deg, rgba(78, 205, 196, 1) 0%, rgba(68, 160, 141, 1) 100%);
}

.wine-bg {
    background: linear-gradient(150deg, rgba(249, 202, 36, 1) 0%, rgba(240, 147, 43, 1) 100%);
}

.whiskey-bg {
    background: linear-gradient(150deg, rgba(108, 92, 231, 1) 0%, rgba(162, 155, 254, 1) 100%);
}

.snacks-bg {
    background: linear-gradient(150deg, rgba(255, 107, 107, 1) 0%, rgba(238, 90, 36, 1) 100%);
}

.tea-coffee-bg {
    background: linear-gradient(150deg, rgba(69, 183, 209, 1) 0%, rgba(150, 201, 61, 1) 100%);
}

.fresh-bg {
    background: linear-gradient(150deg, rgba(78, 205, 196, 1) 0%, rgba(68, 160, 141, 1) 100%);
}

.honey-bg {
    background: linear-gradient(150deg, rgba(249, 202, 36, 1) 0%, rgba(240, 147, 43, 1) 100%);
}

.mobile-category-hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-out;
}

.mobile-category-hidden.show {
    display: block !important;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.mobile-category-overlay {
    position: absolute;
    width: calc(100% - 16px);
    left: 8px;
    bottom: 8px;
    height: auto;
    min-height: 40px;
    display: flex;
    gap: 10px;
    border-radius: 10px;
    border: 1px solid var(--color-border-light, rgba(255, 255, 255, 0.1));
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.55) 100%
    );
    align-items: center;
    padding: 6px var(--spacing-sm, 10px);
}

.mobile-category-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    height: auto;
}

.mobile-category-name {
    flex: 1;
    font-weight: 600;
    color: white;
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    text-align: left;
}

.mobile-category-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 10px;
    font-weight: 500;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    text-align: left;
}


.sidebar-heading {
    font-size: 18px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px 0;
}

.category-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
    width: 100%;
}

/* Categories loading indicator */
.categories-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 0.5rem;
}

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

/* Categories error indicator */
.categories-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #dc3545;
    font-size: 0.9rem;
    text-align: center;
}

.retry-button {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.2s;
}

.retry-button:hover {
    background: #0056b3;
}

.category-item {
    padding: 8px 12px;
    border: 2px solid transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    color: #000;
    display: block !important;
    width: 100%;
    text-align: left;
    border-radius: 6px;
    margin-bottom: 2px;
}

/* Скрываем изображения в обычном списке категорий (sidebar) */
.category-image {
    display: none;
}

.category-image img {
    display: none;
}

/* Убираем автоматическое выделение первой категории */
/* .category-item:first-child {
    background: #ef233c;
    color: white;
    font-weight: 600;
} */

.category-item:hover {
    background: rgba(239, 35, 60, 0.1);
    transform: translateX(2px);
}

/* ВАЖНО: По умолчанию у category-item.active НЕТ рамки */
/* Рамка будет только у category-main.active (дочерний элемент) */
.category-item.active {
    border: 2px solid transparent !important;
    background: transparent !important;
    color: inherit !important;
    font-weight: normal !important;
}

/* Если category-item.active НЕ содержит category-main вообще, применяем рамку */
/* Это для старых элементов без структуры category-main */
.category-item.active:not(:has(.category-main)) {
    border: 2px solid #ef233c !important;
    color: #ef233c !important;
    font-weight: 600 !important;
}

/* Выделяем только category-main при активности - ТОЛЬКО ОДНА РАМКА */
.category-main.active {
    border: 2px solid #ef233c !important;
    background: transparent !important;
    color: #ef233c !important;
    font-weight: 600;
}

/* Убираем рамку у родительского category-item, если активен дочерний category-main */
.category-item:has(.category-main.active) {
    border: 2px solid transparent !important;
}

.category-main.active .category-name {
    color: #ef233c !important;
}

.category-main.active .category-arrow {
    color: #ef233c !important;
}

.category-item:last-child {
    border-bottom: none;
}

/* ===== SUBCATEGORIES STYLES ===== */

.category-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.category-main:hover {
    background-color: var(--hover-bg);
}

.category-name {
    flex: 1;
    font-weight: 500;
}

.category-count {
    margin-left: auto;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 400;
    padding-left: 0.5rem;
}

.category-count {
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 400;
    margin-left: auto;
    padding-left: 0.5rem;
}

.category-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.subcategories-list {
    margin-left: 1rem;
    margin-top: 0.25rem;
    /* Убираем анимацию для стабильности */
    /* animation: slideDown 0.3s ease; */
}

.subcategory-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border-left: 2px solid #ef233c;
    margin-left: 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 0 4px 4px 0;
    /* Убираем фоновый цвет */
    background-color: transparent;
}

.subcategory-item:hover {
    /* При наведении только легкое изменение цвета полоски */
    border-left-color: #d32f2f;
}

.subcategory-item.active {
    /* При выборе только изменение цвета полоски, без заливки */
    border-left-color: #d32f2f;
    border-left-width: 3px;
    font-weight: 500;
    color: #d32f2f;
}

.subcategory-name {
    font-size: 0.9rem;
    color: inherit;
}

/* Убеждаемся, что подкатегории не наследуют фон от активной категории */
.category-main.active .subcategories-list {
    background: transparent;
}

.category-main.active .subcategory-item {
    background: transparent !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 200px;
    }
}

/* ===== SUBCATEGORIES BAR STYLES ===== */
.subcategories-bar {
    grid-column: 1 / -1; /* Занимает всю ширину grid */
    margin-top: 20px; /* Верхний отступ */
    margin-bottom: 1.5rem;
    padding: 0;
    position: relative;
}

.subcategories-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 1rem 1.25rem; /* Симметричные отступы слева и справа */
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.subcategories-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef233c 0%, #d91e2f 100%);
    opacity: 0.8;
    border-radius: 16px 16px 0 0;
}

.subcategories-container:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #dee2e6;
}

.subcategories-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
    min-width: 0; /* Позволяет контенту сжиматься */
}

.subcategories-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem 0.5rem; /* Симметричные отступы */
    scrollbar-width: thin; /* Firefox - тонкая полоса */
    scrollbar-color: rgba(239, 35, 60, 0.3) transparent;
    -ms-overflow-style: -ms-autohiding-scrollbar; /* IE and Edge */
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.subcategories-scroll::-webkit-scrollbar {
    height: 6px; /* Тонкая полоса прокрутки */
}

.subcategories-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.subcategories-scroll::-webkit-scrollbar-thumb {
    background: rgba(239, 35, 60, 0.3);
    border-radius: 10px;
}

.subcategories-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(239, 35, 60, 0.5);
}

.subcategory-chip {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 24px;
    padding: 0.625rem 1.25rem; /* Симметричные отступы */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.subcategory-name {
    flex: 1;
}

.subcategory-count {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 400;
    margin-left: auto;
}

.subcategory-chip::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #ef233c, #d91e2f);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.subcategory-chip:hover {
    border-color: #ef233c;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    color: #ef233c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.2);
}

.subcategory-chip:hover::before {
    opacity: 1;
}

.subcategory-chip.active {
    background: linear-gradient(135deg, #ef233c 0%, #d91e2f 100%);
    border-color: #ef233c;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.35);
    transform: translateY(-1px);
}

.subcategory-chip.active .subcategory-count {
    color: rgba(255, 255, 255, 0.9);
}

.subcategory-chip.active::before {
    opacity: 0;
}

/* ===== ПОИСК ТОВАРОВ В КАТАЛОГЕ ===== */

.catalog-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    flex-grow: 1;
    min-width: 180px;
    max-width: 400px;
}

.catalog-search-input {
    width: 100%;
    height: 40px;
    padding: 0 36px 0 38px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 0.875rem;
    font-family: 'Manrope', sans-serif;
    font-weight: 500;
    color: #212529;
    background: white;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.catalog-search-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.catalog-search-input:focus {
    border-color: #ef233c;
    box-shadow: 0 0 0 3px rgba(239, 35, 60, 0.1), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.catalog-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    transition: color 0.3s ease;
    cursor: pointer;
}

.catalog-search-submit {
    cursor: pointer;
    pointer-events: auto;
}

.catalog-search-submit:hover {
    color: #ef233c;
}

.catalog-search-input:focus ~ .catalog-search-icon,
.catalog-search-wrapper:focus-within .catalog-search-icon {
    color: #ef233c;
}

.catalog-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: none;
    background: #e9ecef;
    color: #495057;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.catalog-search-clear:hover {
    background: #ef233c;
    color: white;
}

/* Состояние активного поиска */
.catalog-search-wrapper.active .catalog-search-input {
    border-color: #ef233c;
    background: #fff5f5;
}

/* Сообщение "Ничего не найдено" */
.search-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6c757d;
}

.search-no-results__icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.search-no-results__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.search-no-results__text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.25rem;
}

.search-no-results__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, #ef233c 0%, #d91e2f 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(239, 35, 60, 0.3);
}

.search-no-results__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.4);
}

/* Ряд подкатегорий (под поиском) */
.subcategories-chips-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0.5rem 0;
}

.subcategories-chips-row .subcategories-scroll {
    padding: 0.25rem 0;
}

/* Иконка фильтра */
.filter-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-left: auto;
}

.filter-icon:hover {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border-color: #ef233c;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.25);
}

.filter-icon:active {
    transform: translateY(0) scale(1);
}

/* Изображение фильтра */
.filter-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(0.6);
}

.filter-icon:hover img {
    filter: brightness(1) drop-shadow(0 2px 4px rgba(239, 35, 60, 0.4));
    transform: rotate(5deg);
}

/* ===== МОДАЛЬНОЕ ОКНО ФИЛЬТРОВ - ПРОФЕССИОНАЛЬНЫЙ ДИЗАЙН ===== */
.filters-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    font-family: 'Manrope', sans-serif;
}

.filters-modal.active {
    display: flex;
    opacity: 1;
}

.filters-modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2), 0 8px 16px rgba(0, 0, 0, 0.1);
    animation: filtersModalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes filtersModalSlideUp {
    from {
        transform: translateY(20px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Заголовок модального окна */
.filters-modal-header {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: relative;
}

/* Полоса выбранных фильтров (chips) */
.filters-selected-bar {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
    border-bottom: 1px solid #fecaca;
    flex-shrink: 0;
}

.filters-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    flex: 1;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #495057;
    white-space: nowrap;
    transition: all 0.2s ease;
    cursor: default;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-chip-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
    border: none;
    padding: 0;
}

.filter-chip-remove:hover {
    background: #ef233c;
    color: white;
}

.filters-selected-clear {
    background: none;
    border: none;
    color: #ef233c;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.3rem 0;
    transition: opacity 0.2s;
    font-family: 'Manrope', sans-serif;
}

.filters-selected-clear:hover {
    opacity: 0.7;
}

.filters-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filters-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.filters-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    flex-shrink: 0;
}

.filters-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.filters-close-btn:active {
    transform: scale(0.95);
}

.filters-close-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

/* Тело модального окна */
.filters-modal-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    background: #fafbfc;
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.filters-modal-body::-webkit-scrollbar {
    width: 8px;
}

.filters-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.filters-modal-body::-webkit-scrollbar-thumb {
    background: #e1e5e9;
    border-radius: 4px;
}

.filters-modal-body::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Accordion секции фильтров */
.filter-accordion {
    border-bottom: 1px solid #e9ecef;
    background: white;
}

.filter-accordion:first-child {
    border-top: none;
}

.filter-accordion-header {
    width: 100%;
    padding: 1.25rem 2rem;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Manrope', sans-serif;
}

.filter-accordion-header:hover {
    background: #f8f9fa;
}

.filter-accordion-header:active {
    background: #f1f3f5;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    user-select: none;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    color: #ef233c;
    flex-shrink: 0;
    stroke-width: 2;
}

.accordion-chevron {
    width: 16px;
    height: 16px;
    color: #64748b;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    stroke-width: 2.5;
}

.filter-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafbfc;
}

.filter-accordion.active .filter-accordion-content {
    padding: 15px 2rem 1.5rem 2rem;
}

.filter-accordion.active .filter-accordion-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Фильтр по цене */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 0.75rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.price-input {
    flex: 1;
    padding: 0.875rem 1.125rem;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
    font-family: 'Manrope', sans-serif;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.price-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.price-input:focus {
    outline: none;
    border-color: #ef233c;
    background: white;
    box-shadow: 0 0 0 4px rgba(239, 35, 60, 0.12), 0 2px 8px rgba(239, 35, 60, 0.15);
    transform: translateY(-1px);
}

.price-input:hover:not(:focus) {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.price-separator {
    color: #64748b;
    font-weight: 600;
    font-size: 1.25rem;
    user-select: none;
    padding: 0 0.25rem;
    opacity: 0.7;
}

.price-slider {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.price-slider-wrapper {
    position: relative;
    width: 100%;
    padding: 0.5rem 0;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #e1e5e9 0%, #e1e5e9 100%);
    outline: none;
    -webkit-appearance: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.range-slider:hover {
    background: linear-gradient(90deg, #d1d5db 0%, #d1d5db 100%);
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.4), 0 0 0 3px rgba(239, 35, 60, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid white;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(239, 35, 60, 0.5), 0 0 0 4px rgba(239, 35, 60, 0.15);
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%);
}

.range-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(239, 35, 60, 0.6), 0 0 0 5px rgba(239, 35, 60, 0.2);
}

.range-slider::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.4), 0 0 0 3px rgba(239, 35, 60, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(239, 35, 60, 0.5), 0 0 0 4px rgba(239, 35, 60, 0.15);
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%);
}

.range-slider::-moz-range-thumb:active {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(239, 35, 60, 0.6), 0 0 0 5px rgba(239, 35, 60, 0.2);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    padding: 0 0.25rem;
    margin-top: 0.25rem;
}

/* Список брендов */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding-top: 0.5rem;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #e1e5e9 transparent;
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.brand-list::-webkit-scrollbar {
    width: 6px;
}

.brand-list::-webkit-scrollbar-track {
    background: transparent;
}

.brand-list::-webkit-scrollbar-thumb {
    background: #e1e5e9;
    border-radius: 3px;
}

.brand-list::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: white;
}

.brand-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.brand-item:active {
    background: #f1f3f5;
}

.brand-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #ef233c;
    cursor: pointer;
    flex-shrink: 0;
}

.brand-checkbox:checked {
    background-color: #ef233c;
}

.brand-name {
    flex: 1;
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.brand-count {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

/* Фильтры по характеристикам */
.spec-filter-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.spec-filter-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.spec-filter-title {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 0.9375rem;
    font-weight: 600;
}

.spec-filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
    padding-top: 0.5rem;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #e1e5e9 transparent;
    -webkit-overflow-scrolling: touch; /* Плавная прокрутка на iOS */
}

.spec-filter-options::-webkit-scrollbar {
    width: 6px;
}

.spec-filter-options::-webkit-scrollbar-track {
    background: transparent;
}

.spec-filter-options::-webkit-scrollbar-thumb {
    background: #e1e5e9;
    border-radius: 3px;
}

.spec-filter-options::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.spec-filter-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    background: white;
}

.spec-filter-item:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.spec-filter-item:active {
    background: #f1f3f5;
}

.spec-filter-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #ef233c;
    cursor: pointer;
    flex-shrink: 0;
}

.spec-filter-label {
    flex: 1;
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.spec-filter-count {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.spec-filter-range {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spec-range-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    font-family: 'Manrope', sans-serif;
}

.spec-range-input:focus {
    outline: none;
    border-color: #ef233c;
    background: white;
    box-shadow: 0 0 0 3px rgba(239, 35, 60, 0.1);
}

.range-separator {
    color: #666;
    font-weight: 500;
    font-size: 1rem;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
}

/* Футер модального окна */
.filters-modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: center; /* Кнопки центрированы */
    align-items: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid #e9ecef;
    background: white;
    flex-wrap: nowrap; /* Кнопки не переносятся */
}

.filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
}

.filter-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.filter-btn-clear {
    background: #f1f3f5;
    color: #64748b;
    border: 1px solid #e1e5e9;
}

.filter-btn-clear:hover {
    background: #e9ecef;
    color: #475569;
    border-color: #d1d5db;
    transform: translateY(-1px);
}

.filter-btn-clear:active {
    transform: translateY(0);
}

.filter-btn-apply {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.3);
    flex: 0 0 auto; /* Кнопка не растягивается */
    min-width: auto;
}

.filter-btn-apply:hover {
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%);
    box-shadow: 0 6px 16px rgba(239, 35, 60, 0.4);
    transform: translateY(-1px);
}

.filter-btn-apply:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 35, 60, 0.3);
}

/* Категории и подкатегории в фильтрах */
.selected-categories-preview {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.selected-category-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #991b1b;
}

.category-filter-item {
    margin-bottom: 0.75rem;
}

.category-filter-label {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    background: white;
    border: 2px solid transparent;
}

.category-filter-label:hover {
    background: #f8f9fa;
    border-color: #e9ecef;
}

.category-filter-label:active {
    background: #f1f3f5;
}

.category-filter-checkbox {
    width: 20px;
    height: 20px;
    accent-color: #ef233c;
    cursor: pointer;
    flex-shrink: 0;
}

.category-filter-name {
    flex: 1;
    font-size: 0.9375rem;
    color: #1e293b;
    font-weight: 500;
}

.subcategories-filter-container {
    margin-left: 1.5rem;
    margin-top: 0.75rem;
    padding-left: 1rem;
    border-left: 2px solid #e9ecef;
}

.subcategory-filter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 0.375rem;
    background: #fafbfc;
    border: 2px solid transparent;
}

.subcategory-filter-item:hover {
    background: #f1f3f5;
    border-color: #e9ecef;
}

.subcategory-filter-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #ef233c;
    cursor: pointer;
    flex-shrink: 0;
}

.subcategory-filter-name {
    flex: 1;
    font-size: 0.875rem;
    color: #475569;
    font-weight: 500;
}

/* Индикатор активных фильтров */
.filter-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(239, 35, 60, 0.4);
    z-index: 10;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Manrope', sans-serif;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: white;
    color: #666;
    border: 2px solid #e1e5e9;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%);
    box-shadow: 0 6px 20px rgba(239, 35, 60, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Mobile responsive for subcategories bar */
@media (max-width: 768px) {
    .subcategories-bar {
        grid-column: 1 / -1; /* Занимает всю ширину grid на мобильных */
        padding: 0; /* Убираем левый и правый padding на мобильных */
        margin-bottom: 1rem;
        margin-top: 15px;
    }
    
    .subcategories-container {
        padding: 0.75rem 1rem; /* Отступы на мобильных */
    }
    
    .subcategories-scroll {
        gap: 0.5rem;
    }
    
    .subcategory-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .filter-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .filter-icon img {
        width: 18px;
        height: 18px;
    }
    
    .catalog-search-wrapper {
        min-width: 0;
        max-width: none;
        flex: 1 1 120px;
        order: 0;
    }

    .catalog-search-input {
        height: 36px;
        font-size: 0.8rem;
        padding: 0 30px 0 34px;
    }

    .catalog-search-icon {
        width: 16px;
        height: 16px;
        left: 10px;
    }

    .catalog-search-clear {
        width: 20px;
        height: 20px;
        font-size: 12px;
        right: 6px;
    }

    .subcategories-chips-row {
        padding: 0.5rem 0.25rem 0;
    }

    .search-no-results {
        padding: 2rem 1rem;
    }
    
    .search-no-results__icon {
        font-size: 2.5rem;
    }

    .search-no-results__title {
        font-size: 1.1rem;
    }
    
    /* Модальное окно фильтров на мобильных */
    .filters-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .filters-modal-content {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }
    
    .filters-modal-header {
        padding: 1.25rem 1.5rem;
    }
    
    .filters-selected-bar {
        padding: 0.5rem 1.25rem;
        gap: 0.5rem;
    }
    
    .filter-chip {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
        max-width: 160px;
    }
    
    .filter-chip-remove {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
    
    .filters-selected-clear {
        font-size: 0.7rem;
    }
    
    .accordion-badge {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
        padding: 0 5px;
    }
    
    .filters-close-btn {
        width: 36px;
        height: 36px;
    }
    
    .filter-accordion-header {
        padding: 1rem 1.25rem;
    }
    
    .accordion-title {
        font-size: 0.9375rem;
    }
    
    .accordion-icon {
        width: 18px;
        height: 18px;
    }
    
    .filter-accordion.active .filter-accordion-content {
        padding: 15px 1.5rem 1.25rem 1.5rem;
    }
    
    .filters-modal-footer {
        padding: 1.25rem 1.5rem;
        flex-direction: row; /* Кнопки остаются на одной строке */
        gap: 0.75rem;
        flex-wrap: nowrap; /* Не переносятся */
        justify-content: center; /* Кнопки центрированы */
    }
    
    .filter-btn {
        width: auto; /* Кнопки не растягиваются на всю ширину */
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
        flex: 0 0 auto; /* Не растягиваются */
    }
    
    .filter-btn-apply {
        order: 0; /* Порядок по умолчанию */
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .price-input {
        width: 100%;
    }
    
    .price-separator {
        display: none;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
    .filters-modal-footer {
        gap: 0.5rem;
        padding: 1rem 1.25rem;
    }
    
    .filter-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Перенос кнопок разрешен только на экранах 319px и меньше */
@media (max-width: 319px) {
    .filters-modal-footer {
        flex-direction: column; /* Перенос на новую строку */
        flex-wrap: wrap; /* Разрешаем перенос */
        gap: 0.75rem;
    }
    
    .filter-btn {
        width: 100%; /* Кнопки на всю ширину */
        flex: 1 1 100%;
    }
    
    .filter-btn-apply {
        order: -1; /* Кнопка "Искать" сверху */
    }
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: start;
    grid-auto-rows: auto;
    align-content: start;
}

/* Loading Skeletons */
.skeleton {
    background: linear-gradient(90deg, #ffffff 25%, #f8f8f8 50%, #ffffff 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skeleton-image {
    width: 100%;
    height: 218px;
    background: #ffffff;
}

.skeleton-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.skeleton-title {
    height: 20px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-price {
    height: 16px;
    width: 80px;
    margin-bottom: 12px;
    border-radius: 4px;
}

.skeleton-button {
    height: 44px;
    border-radius: 8px;
    margin-top: auto;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

/* Filter Sections */
.filter-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.filter-heading {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin: 0 0 16px 0;
}

/* Price Filter */
.price-range {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.price-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.price-input:focus {
    outline: none;
    border-color: #ef233c;
    box-shadow: 0 0 0 3px rgba(239, 35, 60, 0.12), 0 2px 6px rgba(239, 35, 60, 0.15);
}

.price-separator {
    color: #64748b;
    font-weight: 600;
    font-size: 1.125rem;
    opacity: 0.7;
}

.price-slider {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    padding: 0.875rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.range-slider {
    width: 100%;
    height: 5px;
    border-radius: 3px;
    background: linear-gradient(90deg, #e1e5e9 0%, #e1e5e9 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: all 0.3s ease;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(239, 35, 60, 0.4), 0 0 0 2px rgba(239, 35, 60, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(239, 35, 60, 0.4), 0 0 0 2px rgba(239, 35, 60, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #a9b0c3;
}

.price-slider-value {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(239, 35, 60, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2);
    z-index: 10;
    pointer-events: none;
    display: none;
    font-family: 'Manrope', sans-serif;
    transition: left 0.15s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
    letter-spacing: 0.3px;
}

.price-slider-value::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #d11a2b;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.price-range-display {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    padding: 12px 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 10px;
    margin-top: 0.5rem;
    font-family: 'Manrope', sans-serif;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.price-range-display:hover {
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.1);
    border-color: #ef233c;
}

.price-range-display span {
    color: #ef233c;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.3px;
}

.apply-filter-btn {
    background: #ef233c;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.apply-filter-btn:hover {
    background: #d11a2b;
}

/* Brand Filter - дополнительные стили для sidebar */
.sidebar .brand-item {
    padding: 8px 0;
    gap: 8px;
}

.sidebar .brand-checkbox {
    width: 16px;
    height: 16px;
}

.sidebar .brand-name {
    font-size: 14px;
    color: #000;
    font-weight: 400;
}

.brand-count {
    font-size: 12px;
    color: #a9b0c3;
    font-weight: 400;
}

/* Filter Actions */
.filter-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.clear-filters-btn {
    width: 100%;
    background: transparent;
    color: #a9b0c3;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background: rgba(239, 35, 60, 0.05);
    color: #ef233c;
    border-color: #ef233c;
}

.product-card {
    background: white;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 320px;
    align-self: start;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Product Card Link */
.product-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.product-card__link:hover {
    text-decoration: none;
    color: inherit;
}

.product-card:hover .product-card__link {
    transform: translateY(-2px);
}

.product-image,
.product-card__image {
    position: relative;
    width: 100%;
    height: 218px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img,
.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Stock Badge */
.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(34, 197, 94, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    z-index: 2;
    display: none; /* Временно скрыто */
}

.stock-badge-text {
    color: white;
    font-size: 12px;
    font-weight: 600;
}

/* Discount Badge on Image */
.discount-badge-image {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    z-index: 2;
}

.discount-badge-text {
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 0 0 auto;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 0 0 12px 0;
    line-height: 1.4;
    min-height: 40px;
    max-height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 24px;
}

.old-price {
    font-size: 14px;
    color: #a9b0c3;
    text-decoration: line-through;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.price-unit {
    font-weight: 400;
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.discount-badge {
    background: #ef233c;
    color: white;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 12px;
}

/* Stock Info */
.stock-info {
    display: none; /* Временно скрыто */
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    padding: 6px 10px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.stock-label {
    font-size: 12px;
    color: #16a34a;
    font-weight: 500;
}

.stock-count {
    font-size: 12px;
    color: #16a34a;
    font-weight: 600;
}

.add-to-cart-container {
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

.add-to-cart-btn {
    width: 100%;
    background: #ef233c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    min-height: 48px;
    height: 48px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    z-index: 1000 !important;
    pointer-events: auto !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.add-to-cart-btn:hover {
    background: #d11a2b;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 35, 60, 0.3);
}

/* Quantity Selector */
.quantity-selector {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: white;
    border: 2px solid #ef233c;
    border-radius: 8px;
    padding: 6px 12px;
    flex-shrink: 0;
    min-height: 48px;
    height: 48px;
    box-sizing: border-box;
    position: relative;
}

.quantity-selector.show {
    display: flex !important;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #ef233c;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    min-width: 32px;
    max-width: 32px;
    box-sizing: border-box;
    line-height: 1;
}

.quantity-btn:hover {
    background: #d11a2b;
    transform: scale(1.1);
}

.quantity-btn:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.quantity-display {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #000;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}


.cart-icon {
    font-size: 14px;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    text-align: center;
    flex-wrap: wrap;
}

.footer-description {
    font-size: 18px;
    color: #334155;
    margin: 0;
    line-height: 1.6;
    max-width: 400px;
    flex: auto;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 44px;
    height: 44px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.social-link:hover {
    background: #ef233c;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 35, 60, 0.3);
}

.social-icon {
    font-size: 18px;
}

.social-icon-svg {
    width: 20px;
    height: 20px;
    display: block;
    transition: fill 0.3s ease;
}

.social-link:hover .social-icon-svg path {
    fill: white;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    justify-items: center;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.footer-heading {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #64748b;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1.5;
}

.footer-links a:hover {
    color: #ef233c;
    transform: translateX(4px);
}

.footer-copyright {
    text-align: center;
    font-size: 14px;
    color: #94a3b8;
    margin: 0;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

/* Floating Filter Button */
.floating-filter-btn {
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0px 10px 30px rgba(239, 35, 60, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 999 !important;
    border: none !important;
    padding: 0 !important;
}

.floating-filter-btn:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0px 15px 40px rgba(239, 35, 60, 0.4) !important;
    background: linear-gradient(135deg, #d11a2b 0%, #b91c1c 100%) !important;
}

.floating-filter-btn:active {
    transform: translateY(-1px) scale(0.98) !important;
}

@media (max-width: 768px) {
    .floating-filter-btn {
        width: 56px !important;
        height: 56px !important;
        bottom: 80px !important;
    }
}

@media (max-width: 480px) {
    .floating-filter-btn {
        width: 44px !important;
        height: 44px !important;
        bottom: 72px !important;
        right: 15px !important;
    }
}

/* Footer Map Button (for pages using catalog.css) */
.footer-map-btn {
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    margin: 0;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Manrope', sans-serif;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    position: relative;
}

.footer-map-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-map-btn:hover {
    color: #ef233c;
    padding-left: 16px;
    background: linear-gradient(90deg, rgba(239, 35, 60, 0.08) 0%, rgba(239, 35, 60, 0.02) 100%);
    transform: translateX(4px);
}

.footer-map-btn:hover::before {
    opacity: 1;
    height: 60%;
}

.footer-map-btn:active {
    transform: translateX(2px) scale(0.98);
}

.footer-address {
    font-size: 14px;
    color: #64748b;
    font-style: italic;
}

/* Contact Button (Phone Icon) */
.whatsapp-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    background: #ef233c !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0px 10px 30px rgba(239, 35, 60, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    transform: none !important;
    overflow: hidden !important;
    border: none !important;
    padding: 0 !important;
}

.whatsapp-button:hover {
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0px 15px 40px rgba(239, 35, 60, 0.4) !important;
}

.whatsapp-button:active {
    transform: translateY(-1px) scale(0.98) !important;
}

.whatsapp-icon {
    width: 24px !important;
    height: 24px !important;
    fill: white !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.whatsapp-button span {
    display: none !important;
}

/* Contact Modal Styles */
.contact-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Manrope', sans-serif;
    backdrop-filter: blur(4px);
}

.contact-modal.show {
    display: flex;
}

.contact-modal-content {
    background: #ffffff;
    border-radius: 16px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0px 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.contact-modal-header {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    padding: 24px;
    text-align: center;
    color: white;
    position: relative;
}

.contact-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.contact-modal-body {
    padding: 24px;
}

.contact-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1e293b;
    font-size: 16px;
    font-weight: 500;
}

.contact-action-btn:hover {
    border-color: #ef233c;
    background: #fef2f2;
    transform: translateX(4px);
    box-shadow: 0px 4px 12px rgba(239, 35, 60, 0.15);
}

.contact-action-btn:active {
    transform: translateX(2px);
}

.contact-action-btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-action-btn-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
    display: block;
}

.contact-action-btn--call .contact-action-btn-icon {
    background: linear-gradient(135deg, #ef233c 0%, #d11a2b 100%);
    color: white;
}

.contact-action-btn--whatsapp .contact-action-btn-icon {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
}

.contact-action-btn-text {
    flex: 1;
    text-align: left;
}

.contact-action-btn-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-action-btn-subtitle {
    font-size: 13px;
    color: #64748b;
}

.contact-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.contact-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Mobile styles */
@media (max-width: 768px) {
    .whatsapp-button {
        width: 56px !important;
        height: 56px !important;
    }
    
    .whatsapp-icon {
        width: 22px !important;
        height: 22px !important;
    }
    
    .contact-modal-content {
        max-width: 90%;
        border-radius: 12px;
    }
    
    .contact-modal-header {
        padding: 20px;
    }
    
    .contact-modal-header h3 {
        font-size: 18px;
    }
    
    .contact-modal-body {
        padding: 20px;
    }
    
    .contact-action-btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .contact-action-btn-icon {
        width: 36px;
        height: 36px;
    }
    
    .contact-action-btn-icon svg {
        width: 18px;
        height: 18px;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .whatsapp-button {
        width: 44px !important;
        height: 44px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .whatsapp-icon {
        width: 18px !important;
        height: 18px !important;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .main {
        grid-template-columns: 200px 1fr;
        gap: 30px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: auto;
        align-items: start;
    }
    
    .promo-section {
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .promo-section::-webkit-scrollbar {
        display: none;
    }
    
    .promo-container {
        display: flex;
        gap: 20px;
        min-width: max-content;
    }
    
    .promo-banner {
        min-width: 200px;
        flex-shrink: 0;
    }
    
    .promo-scroll-btn {
        display: flex;
    }
}

@media (max-width: 1024px) {
    .mobile-categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-md, 16px);
    }
    
    /* Скрываем карточки после 8-й (9-я и далее) */
    .mobile-categories-grid .mobile-category-card:nth-child(n+9) {
        display: none;
    }
}

@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
        margin-top: 0;
    }
    
    .page-header {
        margin-top: 80px;
    }
    
    .sidebar {
        display: none !important;
    }
    
    .mobile-categories {
        display: block;
        order: 1;
        margin: 0 0 20px 0;
        padding: 15px;
    }
    
    .mobile-categories-title {
        font-size: 16px;
    }
    
    .mobile-more-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .mobile-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm, 12px);
    }
    
    /* Скрываем карточки после 6-й (7-я и далее) */
    .mobile-categories-grid .mobile-category-card:nth-child(n+7) {
        display: none;
    }
    
    .mobile-category-card {
        aspect-ratio: 1 / 1;
    }
    
    .mobile-category-overlay {
        min-height: 30px;
        padding: 4px 6px;
        gap: 6px;
        left: 5px;
        bottom: 5px;
        width: calc(100% - 10px);
        border-radius: 8px;
    }
    
    .mobile-category-name {
        font-size: 12px;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        text-align: left;
    }
    
    .mobile-category-subtitle {
        font-size: 9px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
        text-align: left;
    }
    
    
    .products-grid {
        order: 2;
        grid-template-columns: repeat(2, 1fr);
        align-items: start;
        grid-auto-rows: auto;
    }
    
    .promo-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .promo-banner:nth-child(3),
    .promo-banner:nth-child(4),
    .promo-banner:nth-child(5) {
        display: none;
    }
    
    .footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-main {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .footer-description {
        flex: auto;
        margin-right: 20px;
        font-size: 16px;
    }
    
    .social-links {
        flex-shrink: 0;
    }
    
    .footer-columns {
        justify-items: center;
    }
    
    .footer-column {
        align-items: center;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        gap: 10px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
    }
    
    .social-icon {
        font-size: 16px;
    }
    
    .footer-heading {
        font-size: 16px;
    }
    
    .footer-links a {
        font-size: 15px;
    }
    
    .footer-copyright {
        font-size: 13px;
        padding-top: 25px;
    }
    
    .header-content {
        padding: 0 15px;
        justify-content: space-between;
    }
    
    .header-content .logo {
        flex: none;
    }
    
    .header-content .header-actions {
        flex: none;
        margin-left: auto;
    }
    
    .nav {
        display: none;
    }
    
    .header-actions {
        display: flex;
        gap: 0;
        align-items: center;
        justify-content: flex-end;
        width: auto;
        flex: none;
    }
    
    .language-switcher {
        display: none;
    }
    
    .login-btn {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        margin-left: 10px;
    }
    
    .cart-btn {
        margin: 0;
        white-space: nowrap;
        margin-right: 0;
        order: 1;
    }
    
    .mobile-menu-btn {
        order: 2;
    }
    
    .language-switcher {
        margin-right: 5px;
    }
    
    .lang-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 32px;
    }
}

@media (max-width: 330px) {
    .add-to-cart-btn {
        font-size: 9px;
        min-height: 28px;
        height: 28px;
    }
    
    .quantity-selector {
        min-height: 28px;
        height: 28px;
    }
    
    .stock-badge {
        top: 4px;
        right: 4px;
        padding: 2px 4px;
        font-size: 8px;
    }
    
    .discount-badge-image {
        bottom: 4px;
        right: 4px;
        padding: 2px 4px;
        font-size: 8px;
    }
    
    .quantity-selector {
        padding: 0px;
        gap: 0px;
        min-height: 20px;
    }
    
    .quantity-btn {
        width: 14px;
        height: 14px;
        font-size: 7px;
        flex-shrink: 0;
    }
    
    .quantity-display {
        font-size: 7px;
        min-width: 10px;
        text-align: center;
        flex: 1;
    }
    
    .footer {
        padding: 20px 0 15px;
        margin-top: 30px;
    }
    
    .footer-content {
        padding: 0 10px;
        gap: 20px;
    }
    
    .footer-main {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .footer-description {
        flex: auto;
        margin-right: 10px;
        font-size: 13px;
        line-height: 1.4;
    }
    
    .social-links {
        flex-shrink: 0;
    }
    
    .footer-columns {
        justify-items: center;
    }
    
    .footer-column {
        align-items: center;
        text-align: center;
    }
    
    .social-link {
        width: 32px;
        height: 32px;
    }
    
    .social-icon {
        font-size: 12px;
    }
    
    .footer-heading {
        font-size: 13px;
    }
    
    .footer-links a {
        font-size: 12px;
    }
    
    .footer-copyright {
        font-size: 10px;
        padding-top: 15px;
    }
    
    .filter-heading {
        font-size: 14px;
        margin-bottom: 12px;
    }
}

/* Стили для очень маленьких экранов - одна колонка */
@media (max-width: 320px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Payment Icons Styles */
.payment-icons {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

.payment-icon {
    width: 20px;
    height: 16px;
    object-fit: contain;
}

/* Very Small Mobile (up to 450px) - Extra compact quantity selector */
@media (max-width: 450px) {
    .add-to-cart-container {
        min-height: 48px;
        margin-top: 0;
    }
    
    .quantity-selector {
        padding: 6px 10px; /* Симметричные отступы */
        gap: 12px; /* Увеличенный отступ для лучшей визуальной симметрии */
        min-height: 44px;
        height: 44px;
        justify-content: space-between;
        align-items: center;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
        font-weight: 700;
        flex-shrink: 0;
        min-width: 28px;
        max-width: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .quantity-display {
        font-size: 18px;
        font-weight: 700;
        min-width: 32px;
        text-align: center;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .price-inputs {
        gap: 6px;
    }
    
    .price-input {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .brand-item {
        padding: 6px 0;
    }
    
    .brand-name {
        font-size: 13px;
    }
    
    .brand-count {
        font-size: 11px;
    }
    
    .apply-filter-btn,
    .clear-filters-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    /* Mobile Stock Badge */
    .stock-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .stock-badge-text {
        font-size: 10px;
    }
    
    /* Mobile Discount Badge */
    .discount-badge-image {
        bottom: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .discount-badge-text {
        font-size: 10px;
    }
    
    /* Mobile Stock Info */
    .stock-info {
        padding: 4px 8px;
        margin-bottom: 10px;
    }
    
    .stock-label,
    .stock-count {
        font-size: 11px;
    }
    
    /* Mobile Quantity Selector - улучшенная симметрия */
    .quantity-selector {
        padding: 6px 10px; /* Симметричные отступы */
        gap: 12px; /* Увеличенный отступ для лучшей визуальной симметрии */
        min-height: 44px;
        height: 44px;
        justify-content: space-between;
        align-items: center;
    }
    
    .quantity-btn {
        width: 28px;
        height: 28px;
        font-size: 16px;
        font-weight: 700;
        flex-shrink: 0;
        min-width: 28px;
        max-width: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
    .quantity-display {
        font-size: 18px;
        font-weight: 700;
        min-width: 32px;
        text-align: center;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }
    
}
}