/* 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 */
}

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: 180px !important;
        flex-shrink: 0 !important;
        flex: 0 0 auto !important;
        height: 150px !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: 140px !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: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 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%;
    height: 142px;
    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;
}

/* 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% - 22px);
    left: 11px;
    bottom: 11px;
    height: 62px;
    display: flex;
    gap: 17.2px;
    border-radius: 12px;
    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: 0 var(--spacing-sm, 12px);
}

.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 {
    border: 2px solid #ef233c !important;
    background: transparent !important;
    color: #ef233c !important;
    font-weight: 600;
}

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

.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 {
    font-size: 0.8rem;
    color: var(--text-muted);
    background-color: var(--bg-light);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-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-bottom: 1.5rem;
    padding: 0; /* Убираем левый и правый padding */
}

.subcategories-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem 0; /* Только верхний и нижний padding */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.subcategories-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    overflow: hidden;
}

.subcategories-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem 0;
    /* Убираем визуальную полосу прокрутки */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.subcategories-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.subcategory-chip {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #495057;
}

.subcategory-chip:hover {
    border-color: #ef233c;
    background: #fff5f5;
    color: #ef233c;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(239, 35, 60, 0.2);
}

.subcategory-chip.active {
    background: #ef233c;
    border-color: #ef233c;
    color: white;
    box-shadow: 0 2px 8px rgba(239, 35, 60, 0.3);
}

/* Иконка фильтра */
.filter-icon {
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 1rem;
}

.filter-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

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

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

/* Модальное окно фильтров */
.filters-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    transform: none; /* Override global scaling for modals */
}

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

.filters-modal-content {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.filters-modal.active .filters-modal-content {
    transform: scale(1);
}

.filters-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.filters-modal-header h3 {
    margin: 0;
    color: #333;
}

.filters-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
}

.filters-close-btn:hover {
    color: #ef233c;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-heading {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
}

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

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

.price-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: #ef233c;
}

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

.price-slider {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef233c;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef233c;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.brand-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

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

.brand-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #ef233c;
    cursor: pointer;
}

.brand-name {
    flex: 1;
    font-size: 0.9rem;
    color: #333;
}

.brand-count {
    font-size: 0.8rem;
    color: #666;
}

.filters-modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #e9ecef;
}

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

.btn-primary:hover {
    background: #d32f2f;
}

/* Mobile responsive for subcategories bar */
@media (max-width: 768px) {
    .subcategories-bar {
        grid-column: 1 / -1; /* Занимает всю ширину grid на мобильных */
        padding: 0; /* Убираем левый и правый padding на мобильных */
        margin-bottom: 1rem;
    }
    
    .subcategories-container {
        padding: 0.75rem 0; /* Только верхний и нижний padding на мобильных */
    }
    
    .subcategories-scroll {
        gap: 0.5rem;
    }
    
    .subcategory-chip {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* 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: 16px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.price-input:focus {
    outline: none;
    border-color: #ef233c;
}

.price-separator {
    color: #a9b0c3;
    font-weight: 500;
}

.price-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.range-slider {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef233c;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(239, 35, 60, 0.3);
}

.range-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef233c;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(239, 35, 60, 0.3);
}

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

.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 */
.brand-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.brand-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
}

.brand-item:hover {
    background: rgba(239, 35, 60, 0.05);
}

.brand-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #ef233c;
    cursor: pointer;
}

.brand-name {
    flex: 1;
    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;
}

.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;
}

.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;
}

.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: flex;
    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-btn {
    width: 100%;
    background: #ef233c;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: auto;
    min-height: 48px;
    height: 48px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.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: 8px;
    width: 100%;
    background: white;
    border: 2px solid #ef233c;
    border-radius: 8px;
    padding: 8px;
    margin-top: auto;
    flex-shrink: 0;
    min-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: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    min-width: 32px;
    box-sizing: border-box;
}

.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: 16px;
    font-weight: 600;
    color: #000;
    min-width: 40px;
}


.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;
}

.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;
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed !important;
    bottom: 18px !important;
    right: 20px !important;
    width: 136px !important;
    height: 46px !important;
    background: #ef233c !important;
    border-radius: 999px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 16px !important;
    cursor: pointer !important;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.12) !important;
    transition: all 0.3s ease !important;
    z-index: 1000 !important;
    transform: none !important; /* Override global scaling for WhatsApp button */
    overflow: hidden !important;
}

.whatsapp-button:hover {
    transform: translateY(-2px) !important;
}

.whatsapp-icon {
    width: 16px !important;
    height: 16px !important;
    font-size: 16px !important;
}

.whatsapp-button span {
    color: white !important;
    font-size: 16px !important;
    font-weight: 400 !important;
}

/* Tablet styles - промежуточный размер */
@media (max-width: 1024px) and (min-width: 769px) {
    .whatsapp-button {
        width: 120px !important;
        height: 44px !important;
        gap: 6px !important;
    }
    
    .whatsapp-button span {
        font-size: 14px !important;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .whatsapp-button {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        justify-content: center !important;
        gap: 0 !important;
        transition: all 0.3s ease !important;
    }
    
    .whatsapp-button span {
        display: none !important;
    }
    
    .whatsapp-icon {
        font-size: 20px !important;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .whatsapp-button {
        width: 44px !important;
        height: 44px !important;
        bottom: 15px !important;
        right: 15px !important;
    }
    
    .whatsapp-icon {
        font-size: 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 {
        height: 100px;
    }
    
    .mobile-category-overlay {
        height: 35px;
        padding: 0 6px;
        gap: 6px;
    }
    
    .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) {
    .mobile-categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-xs, 10px);
    }
    
    /* Скрываем карточки после 6-й (7-я и далее) - показываем 3 строки по 2 карточки */
    .mobile-categories-grid .mobile-category-card:nth-child(n+7) {
        display: none;
    }
    
    .mobile-category-card {
        height: 90px;
    }
    
    .mobile-category-overlay {
        height: 32px;
        padding: 0 6px;
        gap: 6px;
    }
    
    .mobile-category-name {
        font-size: 11px;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
        text-align: left;
    }
    
    .mobile-category-subtitle {
        font-size: 8px;
        font-weight: 500;
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
        text-align: left;
    }
}

@media (max-width: 480px) {
    .main {
        padding: 0 10px;
        margin-top: 0;
    }
    
    .mobile-categories {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .mobile-categories-title {
        font-size: 14px;
    }
    
    .mobile-more-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        align-items: start;
        grid-auto-rows: auto;
    }
    
    .product-card {
        padding: 8px 8px 4px 8px;
        min-height: 320px;
    }
    
    .product-image,
    .product-card__image {
        height: 120px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 12px;
        margin-bottom: 6px;
        line-height: 1.3;
        min-height: 32px;
        display: flex;
        align-items: flex-start;
    }
    
    .product-prices {
        margin-bottom: 4px;
    }
    
    .old-price {
        font-size: 10px;
    }
    
    .current-price {
        font-size: 13px;
    }
    
    .discount-badge {
        font-size: 9px;
        padding: 2px 4px;
    }
    
    .add-to-cart-btn {
        padding: 6px;
        font-size: 10px;
        min-height: 32px;
        height: 32px;
    }
    
    .stock-badge {
        top: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .discount-badge-image {
        bottom: 6px;
        right: 6px;
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .promo-section {
        grid-template-columns: 1fr;
    }
    
    .promo-banner:nth-child(2),
    .promo-banner:nth-child(3),
    .promo-banner:nth-child(4),
    .promo-banner:nth-child(5) {
        display: none;
    }
    
    .footer {
        padding: 30px 0 20px;
        margin-top: 40px;
    }
    
    .footer-content {
        padding: 0 15px;
        gap: 30px;
    }
    
    .footer-columns {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .footer-main {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    
    .footer-description {
        flex: auto;
        margin-right: 15px;
        font-size: 15px;
    }
    
    .social-links {
        flex-shrink: 0;
    }
    
    .footer-columns {
        justify-items: center;
    }
    
    .footer-column {
        align-items: center;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        gap: 8px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
    }
    
    .social-icon {
        font-size: 14px;
    }
    
    .footer-heading {
        font-size: 15px;
        text-align: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-links {
        align-items: center;
    }
    
    .footer-links a {
        font-size: 14px;
    }
    
    .footer-copyright {
        font-size: 12px;
        padding-top: 20px;
    }
    
    /* Mobile Filter Adjustments */
    .filter-section {
        margin-top: 20px;
        padding-top: 15px;
    }
}

/* Extra Small Mobile (up to 300px) - 1 column */
@media (max-width: 300px) {
    .main {
        margin-top: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
        grid-auto-rows: auto;
        align-items: start;
    }
    
    .product-card {
        padding: 6px 6px 3px 6px;
        min-height: 300px;
    }
    
    .product-image,
    .product-card__image {
        height: 100px;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 11px;
        margin-bottom: 4px;
        line-height: 1.2;
        min-height: 28px;
        display: flex;
        align-items: flex-start;
    }
    
    .product-prices {
        margin-bottom: 4px;
    }
    
    .old-price {
        font-size: 9px;
    }
    
    .current-price {
        font-size: 12px;
    }
    
    .discount-badge {
        font-size: 8px;
        padding: 1px 3px;
    }
    
    .add-to-cart-btn {
        padding: 4px;
        font-size: 9px;
        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;
    }
}

/* Very Small Mobile (up to 450px) - Extra compact quantity selector */
@media (max-width: 450px) {
    .quantity-selector {
        padding: 0px;
        gap: 0px;
        min-height: 24px;
    }
    
    .quantity-btn {
        width: 18px;
        height: 18px;
        font-size: 9px;
        flex-shrink: 0;
    }
    
    .quantity-display {
        font-size: 9px;
        min-width: 14px;
        text-align: center;
        flex: 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: 1px;
        gap: 1px;
        min-height: 28px;
    }
    
    .quantity-btn {
        width: 20px;
        height: 20px;
        font-size: 10px;
        flex-shrink: 0;
    }
    
    .quantity-display {
        font-size: 10px;
        min-width: 16px;
        text-align: center;
        flex: 1;
    }
    
}