.category-top {
    margin-top: 20px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-top p {
  font-size: 30px;
  font-weight: bold
}

/* правая часть */
.right-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* кнопка фильтр */
.filter-btn {
    padding: 8px 16px;
    border: 1px solid #333;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.filter-btn:hover {
    background: #f3f3f3;
}

/* сортировка */
.sort-wrapper select {
    font-size: 14px;
    padding: 6px 10px;
    border: 1px solid #333;
    background: white;
    cursor: pointer;
}

/* --- Модальное окно фильтра --- */
.filter-modal {
    display: none;
    position: fixed;
    z-index: 1000; /* Выше хедера */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.filter-content {
    background: white;
    width: 90%;
    max-width: 400px;
    max-height: 85vh; /* Занимает не более 85% высоты экрана */
    padding: 30px 30px 0 30px;
    position: relative;
    display: flex;
    flex-direction: column; /* Позволяет разделить заголовок и контент */
    overflow-y: auto; /* Включаем внутреннюю прокрутку, если контента много */
}

.close-filter {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 24px;
    cursor: pointer;
}

.filter-item {
    display: block;
    margin: 10px 0;
    font-size: 15px;
}

/* Контейнер для кружочков */
.colors-filter-grid {
    display: flex;
    gap: 12px; /* Увеличиваем расстояние между ними */
    flex-wrap: wrap;
    padding: 5px; /* Чтобы рамка крайних не обрезалась */
}

/* Сам кружок */
.color-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s ease, outline 0.2s ease;
    display: block; /* Убираем лишние отступы инлайновых элементов */
}

/* Состояние при выборе */
.color-filter-item input:checked + .color-circle {
    /* Используем box-shadow вместо outline, он лучше ложится на круги */
    box-shadow: 0 0 0 2px white, 0 0 0 4px black;
    transform: scale(1.1);
    z-index: 1; /* Чтобы выбранный был чуть "выше" соседей */
}

/* Стили для размеров, чтобы они тоже были аккуратными */
.sizes-filter-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.size-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #fff;
    user-select: none; /* Чтобы текст не выделялся при клике */
}

    /* Эффект при наведении */
    .size-box:hover {
        border-color: #000;
    }

/* Стиль для ВЫБРАННОГО размера */
.size-filter-item input:checked + .size-box {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
}

    .price-inputs input {
        width: 50%;
        padding: 10px;
        border: 1px solid #e0e0e0;
        outline: none;
    }

        .price-inputs input:focus {
            border-color: #000;
        }

.filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding: 15px 0 25px 0;
    border-top: 1px solid #eee;
    background: #fff;
    position: sticky;
    z-index: 10;
    bottom: 0;
}

.reset-filter {
    display: none; /* скрыта по умолчанию */
    padding: 10px;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
}

.reset-filter:hover {
    background: #ddd;
}

.apply-filter {
    padding: 10px;
    background: black;
    color: white;
    border: none;
    cursor: pointer;
}

.products-grid {
    padding: 30px 20px;
    display: grid;
    grid-gap: 30px;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}

/* карточка */
.product-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

/* изображение товара */
.product-img {
    width: 100%;
    border-radius: 6px;
    object-fit: cover;
}

/* блок с названием + ценой + сердцем */
.product-info {
    margin-top: -6px;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.product-info a {
    text-decoration: none;
    color: black;
}

/* название + цена */
.product-text {
    display: flex;
    flex-direction: column;
}

/* название товара */
.product-text p{
    font-size: 16px;
    color: #333;
}

/* цена */
.product-price-container {
    margin-top: -10px;
    font-size: 15px;
    font-weight: bold;
}

.price-new {
    color: #e60000; /* Яркий красный */
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 8px;
}

.price-old {
    color: #888;
    text-decoration: line-through;
    font-size: 0.9rem;
}

.price-regular {
    font-weight: bold;
    font-size: 1.1rem;
}

/* действия: кнопка + сердечко */
.product-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.cart-container {
    flex: 1;
    height: 45px; /* Фиксированная высота, чтобы ничего не прыгало */
    position: relative;
}

/* Общий стиль для кнопки и счетчика */
.add-to-cart-btn, .quantity-controls {
    width: 100%;
    height: 100%;
    background: #c62828;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили счетчика */
.quantity-controls {
    justify-content: space-between;
    padding: 0 15px;
}

.qty-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
}

.qty-count {
    font-weight: bold;
    font-size: 18px;
}

/* Стили для сердечка */
.wishlist-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 15px;
}

.heart-icon {
    font-size: 32px;
    color: #c62828; /* Красный контур */
    transition: all 0.2s;
}

    .heart-icon.bxs-heart {
        color: #c62828; /* Закрашенное сердце */
    }
