/* ========== КОНТЕЙНЕР КАТАЛОГА ========== */
.catalog-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.catalog-sidebar {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

/* ========== БЛОКИ БОКОВОЙ ПАНЕЛИ ========== */
.sidebar-block {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E0E0E0;
}

.sidebar-block:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-block h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1A1A1A;
}

/* ========== ПОИСК ========== */
.sidebar-search {
    margin-bottom: 20px;
}

.sidebar-search form {
    display: flex;
    width: 100%;
    border: 2px solid #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.sidebar-search form:focus-within {
    border-color: #FF6B35;
}

.sidebar-search input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    font-size: 13px;
    font-family: inherit;
    min-width: 0;
}

.sidebar-search input:focus {
    outline: none;
}

.sidebar-search button {
    padding: 10px 14px;
    background: #FF6B35;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    flex-shrink: 0;
}

/* ========== КНОПКА СБРОСА ФИЛЬТРОВ ========== */
.btn-reset-filters {
    display: block;
    text-align: center;
    padding: 8px;
    margin-bottom: 20px;
    background: #FFF5F0;
    color: #FF6B35;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 107, 53, 0.3);
    transition: all 0.3s;
}

.btn-reset-filters:hover {
    background: #FF6B35;
    color: white;
}

/* ========== НАЛИЧИЕ ========== */
.stock-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1A1A1A;
    font-weight: 500;
}

.stock-toggle input {
    width: 16px;
    height: 16px;
    accent-color: #FF6B35;
    cursor: pointer;
}

/* ========== КАТЕГОРИИ ========== */
.categories-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.categories-list a {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #666;
    border-left: 3px solid transparent;
    transition: all 0.3s;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
}

.categories-list a:hover {
    color: #FF6B35;
    background: rgba(255, 107, 53, 0.05);
    border-left-color: #FF6B35;
}

.categories-list a.active {
    color: white;
    background: #FF6B35;
    border-left-color: #FF6B35;
}

.categories-list a.parent-active {
    color: #FF6B35;
    background: rgba(255, 107, 53, 0.08);
    border-left-color: #FF6B35;
}

.subcategories-list {
    list-style: none;
    margin: 0 0 10px 0;
    padding: 0;
    display: none;
}

.subcategories-list.expanded {
    display: block;
}

.subcategory-link {
    padding: 8px 12px 8px 30px !important;
    font-size: 13px !important;
    border-left: none !important;
}

.subcategory-link:hover {
    border-left: none !important;
}

.subcategory-link.active {
    color: white !important;
    background: #FF6B35 !important;
}

/* ========== ФИЛЬТРЫ ========== */
.filter-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
}

.filter-toggle.has-value {
    color: #FF6B35;
}

.toggle-arrow {
    font-size: 12px;
    color: #999;
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-content.open {
    max-height: 300px;
    overflow-y: auto;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    border-radius: 4px;
    transition: background 0.2s;
}

.filter-checkbox:hover {
    background: rgba(255, 107, 53, 0.05);
}

.filter-checkbox.active {
    color: #FF6B35;
    font-weight: 600;
}

.filter-checkbox input {
    accent-color: #FF6B35;
    cursor: pointer;
}

.filter-count {
    margin-left: auto;
    font-size: 11px;
    color: #999;
    background: #F0F0F0;
    padding: 2px 8px;
    border-radius: 10px;
}

.filter-checkbox.active .filter-count {
    background: rgba(255, 107, 53, 0.15);
    color: #FF6B35;
}

/* ========== ЦЕНЫ ========== */
.price-slider-container {
    margin-bottom: 15px;
}

.price-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.price-slider-wrapper {
    position: relative;
    height: 30px;
}

.price-slider {
    position: absolute;
    width: 100%;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    outline: none;
    top: 50%;
    transform: translateY(-50%);
}

.price-slider::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #FF6B35;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.price-inputs input {
    width: 80px;
    padding: 8px 10px;
    border: 1px solid #E0E0E0;
    border-radius: 4px;
    font-size: 13px;
}

.price-inputs span {
    color: #999;
}

.btn-filter {
    width: 100%;
    padding: 8px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-filter:hover {
    background: #E55A2B;
}

/* ========== СОРТИРОВКА ========== */
.sort-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sort-link {
    display: block;
    padding: 8px 12px;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s;
}

.sort-link:hover {
    color: #FF6B35;
    background: rgba(255, 107, 53, 0.05);
}

.sort-link.active {
    color: white;
    background: #FF6B35;
}

/* ========== КОНТЕЙНЕР КАТАЛОГА ========== */
.catalog-main {
    flex: 1;
}

.catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.catalog-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1A1A1A;
    margin: 0;
}

.catalog-count {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* ========== СЕТКА ТОВАРОВ ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* ========== КАРТОЧКА ТОВАРА ========== */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.12);
}

/* ========== ФОТО ТОВАРА ========== */
.product-image {
    position: relative;
    width: 100%;
    height: 220px;
    background: #F8FAFC;
    overflow: hidden;
}

.product-image a {
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-card:hover .product-image img {
    transform: scale(1.06);
}

.product-image .no-image {
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BBB;
    font-size: 14px;
    background: #F8FAFC;
}

/* ========== КНОПКА ДОБАВЛЕНИЯ В ИЗБРАННОЕ ========== */
.wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.85);
    color: #CCC;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.wishlist-btn:hover {
    color: #E74C3C;
    background: white;
    transform: scale(1.1);
}

/* ========== БЭЙДЖ НАЛИЧИЯ ========== */
.stock-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
    backdrop-filter: blur(4px);
}

.stock-badge.in-stock {
    background: rgba(39, 174, 96, 0.15);
    color: #27AE60;
}

.stock-badge.out-of-stock {
    background: rgba(150, 150, 150, 0.2);
    color: #999;
}

/* ========== ИНФОРМАЦИЯ О ТОВАРЕ ========== */
.product-info {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name-link {
    text-decoration: none;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1A1A1A;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.product-name:hover {
    color: #FF6B35;
}

/* ========== ХАРАКТЕРИСТИКИ ТОВАРА ========== */
.product-specs {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 12px;
}

.spec {
    font-size: 12px;
    color: #999;
    line-height: 1.3;
}

/* ========== ПОДВАЛ КАРТОЧКИ ТОВАРА ========== */
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #F0F0F0;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #FF6B35;
    white-space: nowrap;
}

.btn-add-cart {
    width: 38px;
    height: 38px;
    padding: 0;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    background: #E55A2B;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.35);
}

.no-products {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 16px;
}

/* ========== ВКЛАДКИ КАТАЛОГА ========== */
.catalog-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #E0E0E0;
}

.catalog-tab {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 15px;
    font-weight: 600;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
}

.catalog-tab:hover {
    color: #FF6B35;
}

.catalog-tab.active {
    color: #FF6B35;
    border-bottom-color: #FF6B35;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: grid;
}

/* ========== БЭЙДЖ НАБОРА ========== */
.set-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 107, 53, 0.9);
    color: white;
    z-index: 2;
}

.set-placeholder {
    font-size: 48px !important;
    color: white !important;
    background: linear-gradient(135deg, #FF6B35, #E55A2B);
}

.set-description {
    font-size: 12px;
    color: #999;
    margin: 0 0 12px 0;
}

.battle-set-card-item:hover {
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.18);
}

/* ========== ПАГИНАЦИЯ ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.pagination-btn, .pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #E0E0E0;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.pagination-btn:hover, .pagination-num:hover {
    border-color: #FF6B35;
    color: #FF6B35;
}

.pagination-num.active {
    background: #FF6B35;
    color: white;
    border-color: #FF6B35;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1024px) {
    .catalog-container {
        grid-template-columns: 1fr;
    }
    .catalog-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
    .catalog-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* ========== АКТИВНЫЕ ФИЛЬТРЫ ========== */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #FFF5F0;
    color: #FF6B35;
    text-decoration: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(255, 107, 53, 0.3);
    transition: all 0.2s;
}

.filter-chip:hover {
    background: #FF6B35;
    color: white;
}

/* ========== НЕАКТИВНЫЕ ФИЛЬТРЫ ========== */
.filter-block.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.sidebar-block.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.btn-add-cart.disabled {
    background: #CCC !important;
    cursor: not-allowed !important;
    pointer-events: none;
}

.product-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========== СКИДКИ ========== */
.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: #E53935;
    color: white;
    z-index: 2;
}

.product-price-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.product-price-old {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-price-new {
    font-size: 18px !important;
    color: #E53935 !important;
}

.product-discount-label {
    font-size: 10px;
    font-weight: 700;
    color: #E53935;
    background: #FFEBEE;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* ========== УВЕДОМЛЕНИЯ ========== */
.catalog-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1A1A1A;
    color: white;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    white-space: nowrap;
}

.catalog-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.catalog-toast a {
    color: #FF6B35;
    font-weight: 600;
    text-decoration: none;
}

/* ========== ДЕЙСТВИЯ С КОРЗИНОЙ ========== */
.cart-action {
    display: flex;
    align-items: center;
}

.cart-qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #FF6B35;
    border-radius: 6px;
    overflow: hidden;
    height: 34px;
}

.cart-qty-minus, .cart-qty-plus {
    width: 28px;
    height: 100%;
    border: none;
    background: #FFF5F0;
    color: #FF6B35;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.cart-qty-minus:hover, .cart-qty-plus:hover {
    background: #FF6B35;
    color: white;
}

.cart-qty-input {
    width: 36px;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #FF6B35;
    background: white;
}

.cart-qty-input:focus { outline: none; }

.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty-input {
    -moz-appearance: textfield;
    appearance: textfield;
}