/* Стили для каталога товаров */
.catalog-container {
    max-width: 2000px;
    margin: 0 auto;
    padding: 20px;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.catalog-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    background: linear-gradient(45deg, #8B4513, #2c3e50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.catalog-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    border: 2px solid #8B4513;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

/* Фильтры */
.filters-sidebar {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid #e9ecef;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #8B4513;
    padding-bottom: 8px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.filter-option:hover {
    background: rgba(139, 69, 19, 0.1);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8B4513;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
    color: #2c3e50;
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-inputs {
    display: flex;
    gap: 10px;
}

.price-inputs input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.apply-filters {
    background: linear-gradient(45deg, #8B4513, #D2691E);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s ease;
}

.apply-filters:hover {
    background: linear-gradient(45deg, #654321, #8B4513);
}

/* СЕТКА ТОВАРОВ */
.products-grid-main {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    padding: 20px 0;
}

/* Карточка товара */
.product-card-main {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: visible; /* ИЗМЕНЕНО: было hidden */
    z-index: 1;
    transition: all 0.3s ease;
}

/* Кликабельная область карточки */
.product-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Контейнер изображения */
.product-image-container {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 2;
    position: relative;
}

/* ВИДЕО-КОНТЕЙНЕР - КРИТИЧЕСКИЕ ИСПРАВЛЕНИЯ */
.product-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    border-radius: 0;
}

.product-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    z-index: 11;
    position: relative;
}

/* Бейдж скидки */
.discount-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 20;
}

/* Информация о товаре - ВИДИМАЯ ВСЕГДА */
.product-info-main {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 0;
    line-height: 1.3;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Панель при наведении */
.product-hover-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 15;
    border-radius: 0 0 12px 12px;
    height: auto;
    max-height: 300px;
}

/* Контент панели */
.panel-content {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 20px 15px 15px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Дополнительная информация в панели */
.product-details {
    margin-bottom: 15px;
}

/* Категория */
.product-category {
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Мета-информация */
.product-meta {
    margin: 12px 0;
}

.stock-info {
    margin-bottom: 6px;
}

.stock-badge.in-stock {
    background: #27ae60;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.rating-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 10px;
}

.stars {
    position: relative;
    display: inline-block;
    color: #ddd;
    font-size: 14px;
}

.stars-filled {
    position: absolute;
    top: 0;
    left: 0;
    color: #f39c12;
    overflow: hidden;
    white-space: nowrap;
}

.review-count {
    font-size: 13px;
    color: #7f8c8d;
}

/* Цены */
.base-price {
    margin-top: 12px;
}

.old-price-small {
    text-decoration: line-through;
    color: #95a5a6;
    font-size: 14px;
    margin-right: 8px;
}

.current-price-small {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

/* Кнопка купить в панели */
.product-actions {
    margin-top: 10px;
}

.buy-now-btn {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #353535, #000000);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.buy-now-btn:hover {
    background: linear-gradient(135deg, #000000, #000000);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

/* Состояния кнопки добавления в корзину */
.buy-now-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-text, .btn-loading, .btn-success {
    transition: opacity 0.3s ease;
}

/* Анимация для состояний кнопки */
.btn-loading {
    display: none;
}

.btn-success {
    display: none;
}

/* ===== АКТИВАЦИЯ ВИДЕО И ПАНЕЛИ ПРИ НАВЕДЕНИИ ===== */
.product-card-main:hover {
    z-index: 5;
    border-radius: 12px 12px 0 0;
}

.product-card-main:hover .product-video-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.product-card-main:hover .product-image {
    transform: translateX(-100%);
}

.product-card-main:hover .product-hover-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Отключение видео на мобильных устройствах */
@media (max-width: 768px) {
    .product-video-container {
        display: none !important;
    }
    
    .product-card-main:hover .product-image {
        transform: none !important;
    }
}

/* Индикатор загрузки */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #7f8c8d;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Сообщение о отсутствии товаров */
.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-products p {
    font-size: 1.2rem;
    margin: 0;
}

/* Аккордеон с плавной анимацией */
.categories-accordion {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-header {
    padding: 12px 15px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
}

.accordion-header::after {
    content: "▼";
    font-size: 12px;
    transition: transform 0.3s ease;
}

.accordion-header.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.accordion-content.open {
    max-height: 1000px;
    overflow: visible;
}

.categories-links {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 8px;
}

.category-link {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.category-link:hover {
    background: #e3f2fd;
    border-color: #3498db;
    color: #1976d2;
    transform: translateX(5px);
}

.category-link.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1200px) {
    .products-grid-main {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .products-grid-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-grid-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-hover-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        height: 65%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 2;
        border-radius: 0 0 12px 12px;
        max-height: none;
        box-shadow: none;
    }

    .product-card-main:hover .product-hover-panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .product-card-main:hover .product-image {
        transform: scale(1.05);
    }
    
    /* На мобильных панель всегда поверх карточки */
    .panel-content {
        background: rgba(255, 255, 255, 0.9);
        border-radius: 0 0 12px 12px;
        padding: 25px 20px 20px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .product-card-main:hover {
        z-index: 1;
        border-radius: 12px;
    }
}

@media (max-width: 576px) {
    .products-grid-main {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .catalog-container {
        padding: 15px;
    }
    
    .product-category {
        font-size: 8px;
    }
}

/* Убираем стандартные стили для форм */
.add-to-cart-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* ===== ИСПРАВЛЕННЫЕ СТИЛИ ФИЛЬТРОВ ===== */
.filters-sidebar {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.filters-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
}

.clear-filters {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 4px;
}

.clear-filters:hover {
    color: #c0392b;
    background: rgba(231, 76, 60, 0.1);
}

.filter-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ecf0f1;
}

.filter-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

/* Стили для поиска */
.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #2d2d2d;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

/* Стили для цены */
.price-range {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
}

.price-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.price-input:focus {
    outline: none;
    border-color: #232223;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

.price-range span {
    text-align: center;
    color: #7f8c8d;
    font-weight: 600;
}

/* Стили для чекбокса наличия */
.availability-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px 0;
    transition: all 0.3s ease;
    border-radius: 6px;
    padding-left: 5px;
}

.availability-checkbox:hover {
    background: #f8f9fa;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.availability-checkbox input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, #333333, #000000);
    border-color: #6A0DAD;
}

.availability-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: bold;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Кнопка Применить фильтры */
.apply-filters-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #000000, #000000);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.apply-filters-btn:hover {
    background: linear-gradient(135deg, #333333, #000000);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(106, 13, 173, 0.3);
}

.apply-filters-btn:active {
    transform: translateY(0);
}

/* Аккордеон категорий */
.categories-accordion {
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.accordion-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    color: #2c3e50;
    transition: all 0.3s ease;
    border-bottom: 1px solid #ecf0f1;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-header.active {
    background: linear-gradient(135deg, #333334, #000000);
    color: white;
}

.accordion-header::after {
    content: "▼";
    font-size: 12px;
    transition: transform 0.3s ease;
}

.accordion-header.active::after {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background: white;
}

.accordion-content.open {
    max-height: 400px;
    overflow-y: auto;
}

.categories-links {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 8px;
}

.category-link {
    padding: 12px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.category-link:hover {
    background: linear-gradient(135deg, #000000, #000000);
    color: white;
    border-color: #6A0DAD;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.2);
}

.category-link.active {
    background: linear-gradient(135deg, #383838, #000000);
    color: white;
    border-color: #6A0DAD;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(106, 13, 173, 0.3);
}

/* Сортировка */
.sorting-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sorting-controls label {
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    white-space: nowrap;
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.sort-select:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.1);
}

/* Хлебные крошки */
.breadcrumb {
    margin-bottom: 25px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb li {
    color: #5d6d7e;
    font-size: 14px;
}

.breadcrumb li a {
    color: #5d6d7e;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.breadcrumb li a:hover {
    color: #6A0DAD;
}

.breadcrumb li.active {
    color: #6A0DAD;
    font-weight: 700;
}

.breadcrumb li:not(:last-child)::after {
    content: "›";
    color: #bdc3c7;
    margin-left: 10px;
    font-weight: bold;
}

/* Заголовок каталога */
.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.catalog-title {
    font-size: 2.5rem;
    color: #2c3e50;
    margin: 0;
    background: linear-gradient(135deg, #323232, #000000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Основной контейнер */
.catalog-container {
    max-width: 2000px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

.products-main {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Адаптивность */
@media (max-width: 768px) {
    .catalog-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters-sidebar {
        position: static;
        margin-bottom: 20px;
    }
    
    .catalog-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .sorting-controls {
        justify-content: center;
    }
    
    .price-range {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .price-range span {
        display: none;
    }
    
    .catalog-title {
        font-size: 1.4rem;
    }
}

/* Стили для системы фильтров и пагинации */
.filter-form {
    transition: all 0.3s ease;
}

.load-more-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.load-more-btn {
    background: linear-gradient(135deg, #393939, #000000);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.load-more-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pagination {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
}

.pagination .step-links {
    display: inline-block;
}

.pagination a {
    color: #2c3e50;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    margin: 0 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: #0e0d0e;
    color: white;
    border-color: #0a0a0a;
}

.pagination .current {
    padding: 8px 16px;
    background-color: #2d2d2d;
    color: white;
    border: 1px solid #2d2d2d;
    border-radius: 4px;
    margin: 0 4px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .pagination {
        display: none;
    }
    
    .load-more-container {
        display: block;
    }
    
    .filter-form {
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
}

@media (min-width: 769px) {
    .load-more-container {
        display: none;
    }
}

/* === БАННЕР КАТЕГОРИИ === */
.category-banner {
    position: relative;
    width: 100%;
    height: clamp(180px, 25vw, 400px); /* Адаптивная высота */
    margin: 0 0 30px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #f8f9fa; /* Фон на случай если изображение не загрузится */
}

.category-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.category-banner:hover .category-banner-image {
    transform: scale(1.02);
}

.category-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.2) 100%
    ); */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(20px, 5vw, 60px);
    color: white;
    text-align: left;
}

.category-banner-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(1.5rem, 4vw, 2.8rem);
    font-weight: bold;
    margin-bottom: clamp(10px, 2vw, 20px);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
    max-width: 80%;
    visibility: hidden;
}

.category-banner-description {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    line-height: 1.5;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    opacity: 0.95;
    visibility: hidden;
}

/* === БАННЕР ДЛЯ ВСЕГО КАТАЛОГА === */
.catalog-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: clamp(25px, 5vw, 50px);
    margin: 0 0 30px 0;
    text-align: center;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.catalog-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.catalog-banner-content {
    position: relative;
    z-index: 2;
}

.catalog-banner-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: bold;
    margin-bottom: clamp(10px, 2vw, 15px);
    visibility: hidden;
}

.catalog-banner-description {
    font-size: clamp(1rem, 2vw, 1.3rem);
    opacity: 0.95;
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.4;
}

/* === УЛУЧШЕННАЯ АДАПТИВНОСТЬ === */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1024px) {
    .category-banner {
        height: clamp(160px, 30vw, 350px);
        margin-bottom: 25px;
        border-radius: 10px;
    }
    
    .category-banner-overlay {
        padding: clamp(15px, 4vw, 40px);
    }
    
    .catalog-banner {
        padding: clamp(20px, 4vw, 40px);
        margin-bottom: 25px;
        border-radius: 10px;
    }
}

/* Планшеты (портрет) */
@media (max-width: 768px) {
    .category-banner {
        height: clamp(140px, 35vw, 300px);
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    .category-banner-overlay {
        padding: clamp(12px, 3vw, 30px);
        justify-content: flex-end; /* Текст внизу на мобильных */
        /* background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.9) 0%,
            rgba(0, 0, 0, 0.5) 50%,
            rgba(0, 0, 0, 0.2) 100%
        ); */
    }
    
    .category-banner-title {
        max-width: 100%;
        text-align: center;
    }
    
    .category-banner-description {
        display: none; /* Скрываем описание на мобильных */
    }
    
    .catalog-banner {
        padding: clamp(15px, 3vw, 30px);
        margin-bottom: 20px;
        border-radius: 8px;
    }

    .product-title {
        font-size: 11px; /* было ~16px */
    }
}

/* Мобильные устройства */
@media (max-width: 480px) {
    .category-banner {
        height: clamp(120px, 40vw, 250px);
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .category-banner-overlay {
        padding: 15px;
    }
    
    .category-banner-title {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
        margin-bottom: 8px;
    }
    
    .catalog-banner {
        padding: 20px 15px;
        margin-bottom: 15px;
        border-radius: 6px;
    }
    
    .catalog-banner-title {
        font-size: clamp(1.4rem, 6vw, 1.9rem);
    }
    
    .catalog-banner-description {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
    }

    .catalog-title {
        font-size: 1.1rem;
    }

    .product-title {
        font-size: 7px; /* было ~16px */
    }

}

/* Очень маленькие мобильные устройства */
@media (max-width: 360px) {
    .category-banner {
        height: clamp(100px, 45vw, 200px);
    }
    
    .category-banner-overlay {
        padding: 12px;
    }
    
    .category-banner-title {
        font-size: 1.2rem;
    }
    
    .catalog-banner {
        padding: 15px 12px;
    }
    
    .catalog-banner-title {
        font-size: 1.3rem;
    }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    .category-banner {
        background: #2d3748;
    }
    
    .catalog-banner {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    }
}

/* Улучшенная доступность */
@media (prefers-reduced-motion: reduce) {
    .category-banner-image {
        transition: none;
    }
}

/* Поддержка высоких экранов */
@media (min-height: 800px) and (max-width: 768px) {
    .category-banner {
        height: clamp(160px, 25vh, 250px);
    }
}

/* Горизонтальная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .category-banner {
        height: clamp(100px, 40vh, 180px);
    }
    
    .category-banner-overlay {
        padding: 10px 20px;
    }
    
    .category-banner-title {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
}

/* Стили для кнопки Загрузить еще */
.load-more-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px 0;
    width: 100%;
}

.load-more-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: inline-block;
    min-width: 280px;
}

.load-more-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.load-more-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.no-more-products {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 30px 0;
    color: #666;
    font-style: italic;
    border: 2px dashed #dee2e6;
}

/* Стили для пагинации цифрами */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0 30px 0;
    padding: 25px 0;
}

.pagination-numbers {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.page-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 46px;
    padding: 0 6px;
    background: transparent;
    border: none;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: 'Arial', sans-serif;
}

.page-number:hover {
    background: #f8f9fa;
    color: #667eea;
    transform: translateY(-2px);
}

.page-number.current {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

/* === БАННЕР КАТЕГОРИИ - ИСПРАВЛЕННАЯ ВЕРСИЯ === */

/* Базовый контейнер баннера */
.category-banner {
    position: relative;
    width: 100%;
    border-radius: 12px;
    margin: 20px 0;
    overflow: hidden;
    background: #ffffff;
}

/* Контейнер для изображения */
.category-banner picture {
    display: block;
    width: 100%;
    height: 100%;
}

/* Стили для изображения баннера */
.category-banner-image {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.3s ease;
}

/* Оверлей баннера */
.category-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    text-align: left;
    z-index: 2;
}

/* Заголовок баннера */
.category-banner-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

/* Описание баннера */
.category-banner-description {
    line-height: 1.5;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    opacity: 0.95;
}

/* ===== ДЕСКТОПНАЯ ВЕРСИЯ (> 1000px) ===== */
@media (min-width: 1001px) {
    .category-banner {
        height: 400px;
        max-height: 400px;
    }
    
    .category-banner-image {
        object-fit: contain;
    }
    
    /* Оверлей для десктопа */
    .category-banner-overlay {
        padding-left: 5%;
        padding-right: 40%;
    }
    
    .category-banner-title {
        font-size: 2.8rem;
        max-width: 80%;
    }
    
    .category-banner-description {
        font-size: 1.3rem;
        background: rgb(255, 255, 255);
        padding: 10px 15px;
        border-radius: 8px;
        max-width: 80%;
    }
    
    /* Пропорциональное уменьшение при сужении окна */
    @media (max-width: 1400px) {
        .category-banner {
            height: calc(100vw * 0.2857); /* 400/1400 = 0.2857 */
        }
        
        .category-banner-title {
            font-size: 2.4rem;
        }
        
        .category-banner-description {
            font-size: 1.1rem;
        }
    }
    
    @media (max-width: 1200px) {
        .category-banner-title {
            font-size: 2.2rem;
        }
        
        .category-banner-description {
            font-size: 1rem;
        }
        
        .category-banner-overlay {
            padding-right: 35%;
        }
    }
    
    @media (min-width: 1001px) and (max-width: 1100px) {
        .category-banner-title {
            font-size: 2rem;
        }
        
        .category-banner-overlay {
            padding-right: 30%;
        }
    }
}

/* ===== МОБИЛЬНАЯ ВЕРСИЯ (≤ 1000px) ===== */
@media (max-width: 1000px) {
    .category-banner {
        /* Квадратный контейнер */
        height: 0;
        padding-bottom: 100%; /* 1:1 квадрат */
        position: relative;
    }
    
    .category-banner picture {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .category-banner-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
    
    /* Оверлей для мобильных */
    .category-banner-overlay {
        justify-content: flex-end;
        align-items: center;
        text-align: center;
        padding: 20px;
        
    }
    
    .category-banner-title {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 10px;
        background: rgba(0, 0, 0, 0.6);
        padding: 12px 18px;
        border-radius: 8px;
        width: 100%;
    }
    
    .category-banner-description {
        font-size: 1rem;
        background: rgb(255, 255, 255);
        padding: 10px 15px;
        border-radius: 6px;
        width: 100%;
        display: none; /* Скрываем на маленьких экранах */
    }
    
    /* Показываем описание на планшетах */
    @media (min-width: 600px) and (max-width: 1000px) {
        .category-banner-description {
            display: block;
        }
    }
    
    /* Адаптация для телефонов */
    @media (max-width: 768px) {
        .category-banner-title {
            font-size: 1.5rem;
            padding: 10px 15px;
        }
    }
    
    @media (max-width: 480px) {
        .category-banner {
            border-radius: 8px;
            margin: 15px 0;
        }
        
        .category-banner-title {
            font-size: 1.3rem;
            padding: 8px 12px;
        }
        
        .category-banner-overlay {
            padding: 15px;
        }
    }
}

/* Для очень узких экранов (< 400px) */
@media (max-width: 400px) {
    .category-banner-title {
        font-size: 1.1rem;
    }
}

/* Поддержка темной темы */
@media (prefers-color-scheme: dark) {
    .category-banner {
        background: #ffffff;
    }
}

/* Улучшенная доступность */
@media (prefers-reduced-motion: reduce) {
    .category-banner-image {
        transition: none;
    }
}

/* Поддержка высоких экранов */
@media (min-height: 800px) and (max-width: 768px) {
    .category-banner {
        height: clamp(160px, 25vh, 250px);
        padding-bottom: 0;
    }
}

/* Горизонтальная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .category-banner {
        height: clamp(100px, 40vh, 180px);
        padding-bottom: 0;
    }
    
    .category-banner-overlay {
        padding: 10px 20px;
    }
    
    .category-banner-title {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }
}