/* Основные стили каталога */
.catalog-page {
    padding: 30px 0 60px;
}

.breadcrumbs {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
}

.breadcrumbs ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumbs li {
    margin-right: 10px;
    color: #6c757d;
}

.breadcrumbs li:after {
    content: '/';
    margin-left: 10px;
    color: #6c757d;
}

.breadcrumbs li:last-child:after {
    display: none;
}

.breadcrumbs a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumbs a:hover {
    color: #0056b3;
}

/* Контролы каталога */
.catalog-controls {
    margin-bottom: 30px;
}

.controls-grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
}

.filter-btn {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    position: relative;
    max-width: 500px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-box input:focus {
    border-color: #007bff;
    outline: none;
}

.search-box .search-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
}

.sorting {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.sorting label {
    font-size: 14px;
    color: #495057;
}

.sorting select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Фильтры */
.catalog-filters {
    position: fixed;
    top: 0;
    left: -350px;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
}

.catalog-filters.show {
    left: 0;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filters-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-filters {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    transition: color 0.3s;
}

.close-filters:hover {
    color: #333;
}

.filter-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-title i {
    transition: transform 0.3s;
}

.filter-title.collapsed i {
    transform: rotate(-90deg);
}

.filter-content {
    padding: 5px 0;
}

.filter-checkbox, .filter-radio {
    margin-bottom: 8px;
}

.filter-checkbox input, .filter-radio input {
    margin-right: 8px;
}

.price-range {
    padding: 5px 0;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.range-inputs input {
    width: 100px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.range-slider {
    position: relative;
    height: 5px;
    background: #eee;
    border-radius: 5px;
    margin: 20px 0;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    height: 17px;
    width: 17px;
    border-radius: 50%;
    background: #007bff;
    pointer-events: auto;
    -webkit-appearance: none;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.apply-filters, .reset-filters {
    flex: 1;
}

/* Сетка товаров */
.catalog-products {
    margin-bottom: 50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.products-count {
    font-size: 14px;
    color: #6c757d;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-badge.hot {
    background: #ff6b6b;
    color: white;
}

.product-badge.new {
    background: #51cf66;
    color: white;
}

.product-badge.discount {
    background: #fcc419;
    color: #212529;
}

.product-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.quick-view, .add-to-wishlist {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-view:hover, .add-to-wishlist:hover {
    background: #007bff;
    color: white;
}

.add-to-wishlist.active {
    background: #ff6b6b;
    color: white;
}

.product-status {
    position: absolute;
    bottom: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.product-status.in-stock {
    background: rgba(40, 167, 69, 0.9);
    color: white;
}

.product-status.on-order {
    background: rgba(23, 162, 184, 0.9);
    color: white;
}

.product-content {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #212529;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #6c757d;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.current-price {
    font-size: 18px;
    font-weight: 700;
    color: #212529;
}

.old-price {
    font-size: 14px;
    color: #6c757d;
    text-decoration: line-through;
}

.add-to-cart {
    padding: 8px 15px;
    font-size: 14px;
    white-space: nowrap;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 40px;
}

.page-nav, .page-number {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: white;
    color: #007bff;
    cursor: pointer;
    transition: all 0.3s;
}

.page-nav.disabled {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-number {
    font-weight: 500;
}

.page-number.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-number:hover:not(.active), .page-nav:hover:not(.disabled) {
    background: #f8f9fa;
    border-color: #007bff;
}

.page-dots {
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #6c757d;
}

/* Преимущества в каталоге */
.catalog-benefits {
    background: #f8f9fa;
    padding: 40px 0;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-card {
    text-align: center;
    padding: 25px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.benefit-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #212529;
}

.benefit-card p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Адаптивность */
@media (max-width: 992px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .sorting {
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}
/* Дополнительные стили для каталога */
.product-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background-color: #f8f9fa;
    margin-top: 15px;
    border-radius: 8px;
}

.product-details.show {
    max-height: 1000px;
    padding: 15px;
}

.details-content h4 {
    font-size: 16px;
    margin: 15px 0 10px;
    color: var(--primary);
}

.details-content h4:first-child {
    margin-top: 0;
}

.details-content p {
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 15px;
}

.specifications {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dashed #dee2e6;
}

.spec-name {
    font-weight: 500;
    color: #495057;
}

.spec-value {
    color: #212529;
    font-weight: 600;
}

.collapse-details {
    width: 100%;
    text-align: center;
    padding: 8px;
    font-size: 14px;
}

/* Анимация добавления в корзину */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.add-to-cart.added {
    animation: bounce 0.8s;
}

/* Адаптивность для деталей товара */
@media (max-width: 768px) {
    .specifications {
        grid-template-columns: 1fr;
    }
}

/* Стили для ползунков цены */
.range-slider {
    position: relative;
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

.range-slider .progress {
    height: 100%;
    left: 0%;
    right: 0%;
    position: absolute;
    border-radius: 5px;
    background: var(--secondary);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.range-inputs input {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.range-inputs span {
    color: #6c757d;
}

/* Стили для фильтров на мобильных */
@media (max-width: 576px) {
    .catalog-filters {
        width: 100%;
        left: -100%;
    }

    .catalog-filters.show {
        left: 0;
    }
}