/* Основные стили для страницы каталога */
.catalog-section {
    padding: 40px 0;
}

.catalog-heading {
    position: relative;
    margin-bottom: 2rem;
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
}

.catalog-heading:after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background: var(--diva-primary);
    bottom: -10px;
    left: 0;
}

/* Стили для сетки товаров - 4 товара в ряд */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

/* Стили для карточек товаров */
.product-card {
    transition: all 0.3s ease;
    height: 100%;
    border: none;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    background-color: white;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.product-img-container {
    position: relative;
    overflow: hidden;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f9f9f9;
}

.product-img {
    width: 100%;
    aspect-ratio: 1/1.2;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--diva-danger);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(220, 107, 107, 0.25);
    z-index: 2;
}

.product-info {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: white;
}

.product-title {
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    line-height: 1.3;
    color: var(--diva-dark);
    height: 2.8rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-weight: 600;
    color: var(--diva-primary);
    margin-bottom: 0.8rem;
}

.old-price {
    text-decoration: line-through;
    color: #aaa;
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.current-price {
    font-size: 1.05rem;
}

.product-meta {
    margin-top: auto;
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.8rem;
}

/* Стили для закрепленного фильтра в боковой панели */
.filter-wrapper {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--diva-primary) #f5f5f5;
}

.filter-wrapper::-webkit-scrollbar {
    width: 5px;
}

.filter-wrapper::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.filter-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--diva-primary);
    border-radius: 10px;
}

.filter-card {
    border-radius: 12px;
    border: none;
    padding: 20px;
    background-color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.filter-header {
    font-family: 'Cormorant Garamond', serif;
    margin-bottom: 20px;
    color: var(--diva-dark);
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 12px;
    font-family: 'Cormorant Garamond', serif;
    color: var(--diva-dark);
    font-size: 1rem;
}

.filter-item {
    margin-bottom: 6px;
}

.form-check-label {
    cursor: pointer;
    font-weight: 400;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.form-check-label:hover {
    color: var(--diva-primary);
}

.form-check-input {
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--diva-primary);
    border-color: var(--diva-primary);
}

/* ПЕРЕРАБОТАННЫЕ стили для размеров */
.size-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.size-btn {
    min-width: 40px;
    height: 36px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background-color: white;
    color: var(--diva-dark);
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.size-btn:hover {
    border-color: var(--diva-primary);
    color: var(--diva-primary);
}

.size-btn.active {
    background-color: var(--diva-primary);
    border-color: var(--diva-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(211, 182, 146, 0.25);
}

/* Стили для кружков цветов */
.color-circles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.color-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid #f5f5f5;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.color-circle:hover {
    transform: scale(1.15);
}

.color-circle.active {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--diva-primary);
}

/* Стили для селекта сортировки */
.sort-select-container {
    position: relative;
}

.sort-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 8px 35px 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    background-color: white;
    color: var(--diva-dark);
    font-weight: 500;
    width: 220px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
    font-size: 0.9rem;
}

.sort-select:focus {
    border-color: var(--diva-primary);
    box-shadow: 0 0 0 3px rgba(211, 182, 146, 0.15);
    outline: none;
}

.sort-select-container:after {
    content: '\f107';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--diva-secondary);
    pointer-events: none;
}

/* Улучшенные стили для карточки "товары не найдены" */
.no-products {
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 30px;
    text-align: center;
    grid-column: 1 / -1;
}

.no-products i {
    font-size: 3rem;
    color: var(--diva-accent);
    margin-bottom: 15px;
}

.no-products h4 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--diva-dark);
}

/* Элегантная пагинация */
.pagination-container {
    margin-top: 2.5rem;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 5px;
}

.pagination .page-item .page-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--diva-dark);
    background-color: white;
    border: 1px solid #e0e0e0;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    font-size: 0.9rem;
}

.pagination .page-item.active .page-link,
.pagination .page-item.active .page-link:focus {
    background-color: var(--diva-primary);
    border-color: var(--diva-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(211, 182, 146, 0.3);
    transform: translateY(-2px);
}

.pagination .page-item .page-link:hover {
    background-color: var(--diva-accent);
    color: var(--diva-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.pagination .page-item.disabled .page-link {
    color: #ccc;
    pointer-events: none;
    background-color: #f8f8f8;
}

/* Улучшения для кнопок фильтра */
.filter-buttons {
    margin-top: 25px;
    display: flex;
    gap: 10px;
}

.filter-apply-btn {
    background-color: var(--diva-primary);
    border-color: var(--diva-primary);
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(211, 182, 146, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    flex: 1;
}

.filter-apply-btn:hover {
    background-color: var(--diva-secondary);
    border-color: var(--diva-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(211, 182, 146, 0.3);
}

.filter-reset-btn {
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    color: var(--diva-secondary);
    border-color: #e0e0e0;
    background-color: white;
    flex: 1;
}

.filter-reset-btn:hover {
    background-color: #f8f8f8;
    color: var(--diva-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Кнопка "Подробнее" в карточке товара */
.product-details-btn {
    color: var(--diva-primary);
    border-color: var(--diva-primary);
    border-radius: 25px;
    padding: 6px 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    margin-top: auto;
}

.product-details-btn:hover {
    background-color: var(--diva-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 182, 146, 0.25);
}

/* Стили для кнопки "Показать еще" */
.show-more-btn {
    background: none;
    border: none;
    color: var(--diva-primary);
    padding: 5px 0;
    margin-top: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    color: var(--diva-secondary);
}

.show-more-btn i {
    margin-left: 5px;
    font-size: 0.75rem;
}

/* Анимация для раскрывающихся элементов */
.hidden-items {
    margin-top: 6px;
}

/* Анимация появления товаров */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

/* Стили для текста наличия товара */
.stock-badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
}

/* Отзывчивый дизайн */
@media (max-width: 1400px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sort-select-container {
        margin-top: 15px;
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-wrapper {
        position: static;
        max-height: none;
        overflow-y: visible;
        margin-bottom: 30px;
    }

    .filter-buttons {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-img {
        aspect-ratio: 1/1;
    }

    .catalog-section {
        padding: 20px 0;
    }

    .pagination .page-item .page-link {
        width: 32px;
        height: 32px;
    }

    .size-container {
        gap: 6px;
    }

    .size-btn {
        min-width: 36px;
        height: 34px;
        font-size: 0.8rem;
    }
}