/* Современный сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Современные шрифты */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: 
        linear-gradient(135deg, #667eea 0%, #764ba2 100%),
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    /* animation: gradientShift 15s ease infinite; 
}*/


html, body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}
/* @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
} */

/* Добавляем плавающие частицы */
/* body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(2px 2px at 40% 70%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(2px 2px at 60% 20%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(2px 2px at 80% 50%, rgba(255,255,255,0.3) 50%, transparent 100%),
        radial-gradient(2px 2px at 30% 80%, rgba(255,255,255,0.3) 50%, transparent 100%);
    background-size: 300px 300px;
    animation: float 20s linear infinite;
    z-index: -1;
} */

/* @keyframes backgroundShift {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(1deg); }
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
} */

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    background: transparent;
}

/* Заголовок */
.header {
    text-align: center;
    margin-bottom: 60px;
    color: white;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    font-size: 1.3rem;
    opacity: 0.9;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Сетка товаров */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    padding: 20px 0;
    background: transparent;
}

/* Карточка товара */
.product-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.15),
        0 15px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.product-card.hidden {
    display: none;
}

.product-card.visible {
    display: flex;
    animation: fadeInUp 0.4s ease forwards;
}

/* Контейнер для изображения с фиксированными размерами */
.product-image-container {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* ВАЖНО: contain вместо cover */
    transition: all 0.5s ease;
    border-radius: 12px;
}

.product-image.horizontal {
    max-height: 240px;
    width: auto;
}

.product-image.vertical {
    max-width: 200px;
    height: auto;
}

/* .product-card:hover .product-image {
    transform: scale(1.05);
} */

/* Контент карточки */
.product-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* ВАЖНО: растягивается на всё доступное пространство */
}

.product-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 12px;
    line-height: 1.4;
    /* Ограничиваем высоту текста */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.actions-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: auto; /* ВАЖНО: прижимаем к низу */
    padding-top: 20px; /* Отступ сверху */
}

.details-btn {
    flex: 1;
    padding: 14px 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.details-btn:hover::before {
    left: 100%;
}

.details-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
}

/* Модальное окно для увеличения изображения */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: white;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.empty-state h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.empty-state p {
    font-size: 1.2rem;
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    position: relative;
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    top: 50%;
    transform: translateY(-50%);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: translateY(-50%) scale(0.8); opacity: 0; }
    to { transform: translateY(-50%) scale(1); opacity: 1; }
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Кнопка закрытия */
.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

/* Кнопка увеличения на превью */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
} */

.product-image-container:hover .image-overlay {
    background: rgba(0, 0, 0, 0.2);
    opacity: 1;
}

.zoom-icon {
    color: white;
    font-size: 2rem;
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

/* .image-overlay:hover .zoom-icon {
    transform: scale(1);
    background: rgba(102, 126, 234, 0.9);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* Stagger анимация для карточек */
.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; }

@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
        align-items: center; /* Центрируем по горизонтали */
        gap: 20px; /* Увеличиваем отступ между элементами */
        padding: 25px 20px;
        text-align: center; /* Центрируем текст */
    }
    
    .filter-group {
        min-width: auto;
        width: 100%; /* Занимает всю ширину */
        max-width: 300px; /* Но не более 300px */
    }
    
    .filter-select-wrapper {
        justify-content: center; /* Центрируем содержимое */
    }
    
    .filter-select {
        padding: 16px 50px 16px 50px;
        text-align: center; /* Центрируем текст в селекте */
        width: 100%;
    }
    
    .reset-btn {
        align-self: center;
        margin-top: 10px;
        padding: 16px 30px;
        width: auto;
        min-width: 200px;
    }
    
    /* Центрируем иконки в мобильной версии */
    .filter-icon {
        left: 20px;
    }
    
    .select-arrow {
        right: 20px;
    }
}

@media (max-width: 480px) {
    .filters-section {
        border-radius: 20px;
        padding: 25px 15px;
        gap: 15px;
    }
    
    .filter-group {
        max-width: 100%; /* На очень маленьких экранах занимаем всю ширину */
    }
    
    .filter-select {
        padding: 14px 45px 14px 45px;
        font-size: 0.95rem;
    }
    
    .reset-btn {
        min-width: 150px;
        padding: 14px 25px;
    }
}

@media (max-width: 768px) {
    .filter-group {
        flex: none; /* Убираем flex растягивание на мобильных */
    }
}


.filters-section {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.filters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.6), 
        transparent
    );
}

.filter-group {
    flex: 1;
    min-width: 200px;
    transition: all 0.3s ease;
}

.filter-select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-icon {
    position: absolute;
    left: 18px;
    color: #667eea;
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-label i {
    margin-right: 8px;
    color: #667eea;
}

.filter-select {
    width: 100%;
    padding: 16px 50px 16px 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    font-size: 1rem;
    font-weight: 500;
    color: #2d3748;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-select:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.8);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.filter-select:disabled {
    background: rgba(248, 250, 252, 0.8);
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.filter-select:hover {
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateY(-1px);
}

.reset-btn {
    padding: 16px 25px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
    color: #718096;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-arrow {
    position: absolute;
    right: 18px;
    color: #718096;
    font-size: 0.9rem;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.filter-select:focus + .select-arrow {
    transform: rotate(180deg);
    color: #667eea;
}

.reset-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.9));
    color: #4a5568;
    border-color: rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Активные фильтры */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 25px;
    min-height: 50px;
    align-items: center;
}

.filter-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-tag .remove {
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.filter-tag .remove:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.filter-tag .remove {
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    transition: background 0.2s;
}

.filter-tag .remove:hover {
    background: rgba(255, 255, 255, 0.2);
}


.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.gender-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gender-badge.men {
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    color: white;
}

.gender-badge.women {
    background: linear-gradient(135deg, #d53f8c, #b83280);
    color: white;
}

.gender-badge.unisex {
    background: linear-gradient(135deg, #38a169, #2f855a);
    color: white;
}

/* Информация о бренде и коллекции */
.product-brand {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product-collection {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 15px;
    font-style: italic;
}

.no-products-message {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    color: white;
    padding: 80px 20px;
}

.no-products-content {
    animation: fadeIn 0.5s ease;
}

.no-products-content i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-products-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-products-content p {
    font-size: 1.2rem;
    opacity: 0.8;
}
