/* Стили для каталога товаров */

/* Хлебные крошки */
.breadcrumbs {
    padding: 20px 0 30px;
    font-size: 0.9rem;
    color: #666;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Фильтры каталога */
.catalog-filters {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section h3 i {
    color: var(--primary-color);
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    padding: 10px 24px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    font-weight: 500;
    color: #555;
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Сетка каталога */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Стили для карточек товаров в каталоге */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-image {
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
    line-height: 1.4;
    flex-grow: 1;
}

.product-specs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.product-spec {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #555;
}

.product-spec i {
    color: var(--primary-color);
    width: 16px;
    font-size: 0.9rem;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-details {
    padding: 12px 25px;
    background: var(--metal-gradient);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    flex: 1;
    text-align: center;
}

.btn-details:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-metal);
}

.btn-quick-view {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-quick-view:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(90deg) scale(1.1);
}

/* Пустая страница */
.no-products {
    text-align: center;
    padding: 80px 20px;
    grid-column: 1 / -1;
}

.no-products i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 25px;
    opacity: 0.7;
}

.no-products h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.no-products p {
    color: #666;
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

/* Сортировка и управление видом (если понадобится) */
.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.sorting {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-label {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    font-size: 0.95rem;
    transition: var(--transition);
    min-width: 200px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover,
.view-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.view-btn i {
    font-size: 1.1rem;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0;
}

.pagination-btn {
    width: 45px;
    height: 45px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.disabled:hover {
    border-color: #e0e0e0;
    color: #666;
}

.pagination-dots {
    color: #666;
    font-size: 1.2rem;
}

/* Статистика каталога */
.catalog-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.stat-info p {
    margin: 5px 0 0;
    color: #666;
    font-size: 0.9rem;
}

/* Адаптивность каталога */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .catalog-filters {
        margin: 0 20px 40px;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .sorting {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .catalog-filters {
        padding: 25px;
    }

    .filter-options {
        justify-content: center;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-details {
        width: 100%;
    }

    .btn-quick-view {
        width: 100%;
        border-radius: 25px;
        height: 45px;
    }

    .pagination {
        flex-wrap: wrap;
    }
}

@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: 100%;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    .product-content {
        padding: 20px;
    }

    .no-products {
        padding: 60px 15px;
    }

    .no-products h3 {
        font-size: 1.5rem;
    }

    .no-products i {
        font-size: 3rem;
    }
}

/* Анимации для каталога */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }
.product-card:nth-child(6) { animation-delay: 0.6s; }
.product-card:nth-child(7) { animation-delay: 0.7s; }
.product-card:nth-child(8) { animation-delay: 0.8s; }

/* Заголовок каталога */
.catalog-title {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.catalog-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Подсказка фильтров */
.filter-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: #666;
}

.filter-hint i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Активный фильтр */
.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-right: 10px;
    margin-bottom: 10px;
}

.active-filter i {
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.active-filter i:hover {
    opacity: 0.8;
}

/* Кнопка сброса фильтров */
.btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    margin-top: 15px;
}

.btn-reset-filters:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Группа фильтров */
.filter-group {
    margin-bottom: 25px;
}

.filter-group h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.range-slider {
    width: 100%;
    height: 5px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-top: 25px;
    position: relative;
}

.range-slider .track {
    position: absolute;
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: auto;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #666;
}

/* Чекбоксы и радиокнопки для фильтров */
.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-item, .radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"],
.radio-item input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item label,
.radio-item label {
    font-size: 0.95rem;
    color: #555;
    cursor: pointer;
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ КАТАЛОГА */

/* Планшеты и маленькие ноутбуки */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* Планшеты в портретной ориентации */
@media (max-width: 992px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .catalog-filters {
        padding: 25px;
        margin: 0 0 30px 0;
    }

    .catalog-title {
        font-size: 2.2rem;
        margin-bottom: 25px;
    }

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .sorting {
        flex-wrap: wrap;
    }

    .sort-select {
        min-width: 180px;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-details {
        width: 100%;
        padding: 12px 20px;
    }

    .btn-quick-view {
        width: 100%;
        height: 45px;
        border-radius: 25px;
    }

    .catalog-stats {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .stat-item {
        width: 100%;
        justify-content: center;
    }
}

/* Телефоны */
@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .breadcrumbs {
        padding: 15px 0;
        font-size: 0.85rem;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .catalog-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .catalog-filters {
        padding: 20px;
        border-radius: 12px;
    }

    .filter-section {
        margin-bottom: 20px;
    }

    .filter-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .filter-options {
        justify-content: center;
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .product-card {
        border-radius: 12px;
    }

    .product-badge {
        top: 10px;
        left: 10px;
        padding: 5px 12px;
        font-size: 0.8rem;
    }

    .product-image {
        height: 160px;
    }

    .product-content {
        padding: 15px;
    }

    .product-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .product-spec {
        font-size: 0.85rem;
        gap: 8px;
    }

    .product-actions {
        gap: 8px;
    }

    .no-products {
        padding: 40px 15px;
    }

    .no-products i {
        font-size: 3rem;
        margin-bottom: 20px;
    }

    .no-products h3 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .no-products p {
        font-size: 1rem;
        margin-bottom: 20px;
    }

    .pagination {
        margin: 30px 0;
        gap: 8px;
    }

    .pagination-btn {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .filter-hint {
        padding: 12px;
        font-size: 0.9rem;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .active-filter {
        font-size: 0.85rem;
        padding: 6px 14px;
        margin-right: 8px;
        margin-bottom: 8px;
    }

    .range-slider {
        margin-top: 20px;
    }

    .checkbox-item,
    .radio-item {
        font-size: 0.9rem;
    }
}

/* Меньшие телефоны - показываем 1 колонку */
@media (max-width: 576px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card {
        max-width: 100%;
        margin: 0 auto;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        flex: 1;
        min-width: 120px;
    }

    .filter-options {
        justify-content: center;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .product-image {
        height: 120px;
    }

    .product-content {
        padding: 12px;
    }

    .product-title {
        font-size: 1rem;
    }

    .catalog-title {
        font-size: 1.6rem;
    }
}

/* Очень маленькие телефоны */
@media (max-width: 400px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-image {
        height: 140px;
    }

    .filter-btn {
        padding: 6px 15px;
        font-size: 0.85rem;
        min-width: 100px;
    }

    .catalog-title {
        font-size: 1.6rem;
    }

    .sort-select {
        min-width: 150px;
    }
}

/* Для высоких экранов */
@media (max-width: 768px) and (min-height: 800px) {
    .product-image {
        height: 180px;
    }

    .catalog-title {
        font-size: 2rem;
    }
}

/* Исправления для iOS */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .breadcrumbs {
            -webkit-overflow-scrolling: touch;
        }

        .btn-details,
        .btn-reset-filters {
            -webkit-appearance: none;
        }

        .range-slider input[type="range"] {
            -webkit-appearance: none;
        }

        .range-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            transform: scale(1.3);
        }
    }
}

/* Для больших планшетов в альбомной ориентации */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: landscape) {
    .catalog-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .product-image {
        height: 150px;
    }

    .product-content {
        padding: 15px;
    }
}