        :root {
            --primary-color: #ffdb4d;
            --bg-color: #f8f9fa;
            --text-color: #333;
            --border-radius: 12px;
        }

        body { 
            font-family: -apple-system, system-ui, sans-serif; 
            background: var(--bg-color); 
            margin: 0; 
            color: var(--text-color); 
            display: flex; 
            flex-direction: column; 
            min-height: 100vh;
        }

        /* ШАПКА */
        header {
            background: #fff;
            border-bottom: 1px solid #eee;
            padding: 15px 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .logo {
            font-size: 24px;
            font-weight: 900;
            text-decoration: none;
            color: #000;
            display: flex;
            align-items: center;
        }

        .logo span {
            background: var(--primary-color);
            padding: 2px 8px;
            border-radius: 6px;
            margin-left: 5px;
        }

        .search-box { display: flex; gap: 8px; margin-left: 20px; align-items: center; flex-grow: 1; max-width: 400px; }
        .search-box input { width: 100%; padding: 8px 12px; border-radius: 6px; border: 1px solid #ccc; outline: none; }
        .search-box button, .btn-filter { padding: 8px 15px; border-radius: 6px; border: none; background: var(--primary-color); font-weight: bold; cursor: pointer; transition: 0.2s; }
        .search-box button:hover, .btn-filter:hover { background: #e6c545; }

        .nav-links { display: flex; align-items: center; }
        .nav-links a { text-decoration: none; color: #666; margin-left: 20px; font-size: 14px; font-weight: 600; }
        .nav-links a:hover { color: #000; }

        /* ОСНОВНОЙ КОНТЕЙНЕР КАТАЛОГА */
        .catalog-layout {
            display: flex;
            flex: 1;
            overflow: hidden; 
            height: calc(100vh - 70px); 
        }

        /* САЙДБАР */
        .sidebar { 
            width: 280px; 
            background: white; 
            border-right: 1px solid #e0e0e0; 
            display: flex; 
            flex-direction: column;
            flex-shrink: 0;
        }
        
        /* Скрываем плашку мобильного каталога на ПК */
        .mobile-catalog-toggle {
            display: none;
        }

        .sidebar-header { padding: 25px; font-size: 18px; font-weight: 800; border-bottom: 1px solid #f0f0f0; margin: 0; }

        .category-list { overflow-y: auto; padding: 10px 0; flex-grow: 1; }

        .category-item { 
            padding: 12px 25px; 
            cursor: pointer; 
            font-size: 15px; 
            transition: 0.2s; 
            display: flex;
            justify-content: space-between;
            align-items: center;
            text-decoration: none; 
            color: inherit;
        }

        .category-item:hover { background: #fff9e6; }

        .category-item.active { 
            background: var(--primary-color); 
            font-weight: bold; 
            color: #000; 
            border-left: 5px solid #000;
        }

        .count-badge { font-size: 11px; opacity: 0.5; background: #eee; padding: 2px 7px; border-radius: 10px; }

        /* КОНТЕНТНАЯ ОБЛАСТЬ */
        .main-content { flex-grow: 1; overflow-y: auto; padding: 30px 40px; position: relative; }

        /* ГОРИЗОНТАЛЬНЫЙ ФИЛЬТР НАД ТОВАРАМИ */
        .top-filter-bar {
            background: #fff;
            padding: 15px 25px;
            border-radius: var(--border-radius);
            border: 1px solid #eee;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        }

        .top-filter-bar .filter-title {
            font-weight: 700;
            font-size: 15px;
            color: #333;
        }

        .top-filter-bar form { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
        .sort-select { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; outline: none; cursor: pointer; }
        .filter-group { display: flex; align-items: center; gap: 10px; }

        .price-inputs { display: flex; align-items: center; gap: 8px; }
        .price-inputs input { width: 110px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; box-sizing: border-box; outline: none; }
        .price-inputs input:focus { border-color: var(--primary-color); }
        .price-inputs span { color: #888; font-size: 14px; }

        /* КАРТОЧКА ТОВАРА */
        .product-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); 
            gap: 25px; 
        }

        .product-card { 
            background: white; 
            border-radius: var(--border-radius); 
            text-decoration: none; 
            color: inherit; 
            transition: 0.3s; 
            border: 1px solid #eee;
            display: flex; 
            flex-direction: column;
        }

        .product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: var(--primary-color); }

        .img-wrap { width: 100%; height: 200px; display: flex; align-items: center; justify-content: center; padding: 15px; box-sizing: border-box; }
        .img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }

        .content { padding: 15px; border-top: 1px solid #f9f9f9; }
        .name { font-size: 14px; font-weight: 600; line-height: 1.4; height: 40px; overflow: hidden; margin-bottom: 10px; color: #555; }
        .price { font-size: 18px; font-weight: 800; color: #000; }

        .loader { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 18px; color: #999; }
        .no-results { grid-column: 1/-1; text-align: center; padding: 40px; color: #888; background: #fff; border-radius: var(--border-radius); }

        /* ПОДВАЛ */
        footer { background: #1a1a1a; color: #fff; padding: 60px 40px; z-index: 10; }
        .footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
        .footer-section h4 { margin-bottom: 20px; color: var(--primary-color); }
        .footer-section p, .footer-section a { color: #ccc; text-decoration: none; font-size: 14px; line-height: 1.8; }
        .footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #333; font-size: 12px; color: #666; }
        .footer-disclaimer { max-width: 1200px; margin: 20px auto 0; padding: 20px; border-top: 1px solid #333; font-size: 13px; color: #888; line-height: 1.6; }
        .footer-disclaimer b { color: #aaa; }

        /* --- Стили для сетки товаров и пагинации --- */
        .products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
        .pagination { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 40px; padding-bottom: 40px; flex-wrap: wrap; }
        .page-link { padding: 8px 14px; border: 1px solid #e0e0e0; text-decoration: none; color: #333; border-radius: 6px; transition: all 0.2s ease; background: #fff; font-weight: 500; }
        .page-link.active { background-color: #007bff; color: white; border-color: #007bff; pointer-events: none; }
        .page-link:hover:not(.active) { background-color: #f5f5f5; border-color: #ccc; }
        .page-dots { color: #888; padding: 0 5px; font-weight: bold; }

        /* МОБИЛЬНАЯ ВЕРСИЯ */
        @media (max-width: 768px) {
            header { padding: 15px 20px; flex-wrap: wrap; gap: 15px; }
            .search-box { margin-left: 0; max-width: 100%; order: 3; }
            .catalog-layout { flex-direction: column; height: auto; overflow: visible; }
            .sidebar { width: 100%; height: auto; border-right: none; border-bottom: none; }
            .sidebar-header { display: none; }
            
            /* Плашка каталога */
         /* Мобильная кнопка каталога (базовое состояние) */
        .mobile-catalog-toggle { 
            display: block; 
            padding: 12px; 
            margin: 15px 20px 0; 
            background: var(--primary-color); 
            text-align: center; 
            font-weight: 700; 
            border-radius: var(--border-radius); 
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            transition: all 0.3s ease; /* Плавная анимация */
            z-index: 1001; /* Чтобы кнопка была поверх других элементов */
        }
        
        /* Миниатюрное "залипшее" состояние при скролле */
      /* Миниатюрное "залипшее" состояние при скролле */
        .mobile-catalog-toggle.scrolled {
            position: fixed;
            top: 140px; /* УВЕЛИЧИЛИ ОТСТУП СВЕРХУ */
            left: -5px; 
            margin: 0;
            padding: 10px 15px 10px 20px; 
            width: auto;
            border-radius: 0 15px 15px 0; 
            box-shadow: 3px 3px 12px rgba(0,0,0,0.15);
            font-size: 13px;
            opacity: 0.95;
        }         /* Настройки списка категорий (скрыт по умолчанию) */
            .category-list { 
                display: none; 
                flex-direction: column; 
                padding: 10px 20px; 
                animation: slideDown 0.3s ease;
            }
            .category-list.show { display: flex; }
            
            @keyframes slideDown {
                from { opacity: 0; transform: translateY(-10px); }
                to { opacity: 1; transform: translateY(0); }
            }

            .category-item { 
                white-space: normal; 
                padding: 10px 15px; 
                border-radius: 8px; 
                border: 1px solid #eee; 
                margin-bottom: 8px; 
                margin-right: 0; 
            }
            .category-item.active { border-left: 5px solid #000; }
            
            .main-content { padding: 20px; }
            .top-filter-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 15px; }
            .top-filter-bar form { justify-content: space-between; }
            .price-inputs input { width: calc(50% - 15px); }
            .btn-filter { width: 100%; }
        }
/* МОБИЛЬНАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    /* ... ваши предыдущие мобильные стили ... */

    /* Делаем сетку строго в 2 колонки */
    .product-grid, 
    .products-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px; /* Уменьшаем расстояние между карточками */
    }

    /* Адаптируем содержимое карточки, чтобы оно красиво смотрелось в узкой колонке */
    .img-wrap { 
        height: 140px; /* Уменьшаем высоту картинки */
        padding: 10px; 
    }
    
    .content { 
        padding: 10px; 
    }
    
    .name { 
        font-size: 12px; /* Чуть уменьшаем шрифт названия */
        height: 34px; /* Оставляем высоту ровно под 2 строки */
        margin-bottom: 8px; 
    }
    
    .price { 
        font-size: 15px; /* Немного уменьшаем цену */
    }
}

/* Общие стили для баннера (для больших экранов) */
.promo-banner {
    width: 100%;
    max-width: 1800px; /* Максимальная ширина */
    margin: 20px auto; /* Центрирование */
    overflow: hidden;
    line-height: 0; /* Убираем отступы */
}

.banner-link {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.banner-link:hover {
    opacity: 0.95; /* Эффект при наведении */
}

.banner-img {
    width: 100%;
    height: auto; /* Сохраняет пропорции */
    display: block;
    border-radius: 8px; /* Скругление */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Тень */
}

@media screen and (max-width: 768px) {
    .promo-banner {
        display: none !important; /* Баннер полностью скрывается и не занимает места на странице */
    }
}
