/*=============================================
                Страница каталога
===============================================*/

.catalog-page {
    margin-top: 25px;
}

.catalog-header {
    margin-bottom: 30px;
    text-align: center;
}

.catalog-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 600;
    color: #000000;
    margin: 0 0 15px 0;
    letter-spacing: -1.5px;
}

.catalog-description {
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    color: #666666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/*=============================================
                Сетка категорий
===============================================*/

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-card {
    background-color: #ffffff;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1;
    min-height: 220px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #e0e0e0;
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.category-card-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-image img {
    transform: scale(1.05);
}

.category-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.category-card-placeholder::before {
    content: "🌹";
    font-size: 48px;
    opacity: 0.6;
}

/* Градиентный оверлей для лучшей читаемости текста */
.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 20px 15px 15px 15px;
    z-index: 2;
}

.category-card-title {
    font-size: clamp(14px, 1.5vw, 18px);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 6px 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.category-card-count {
    font-size: 12px;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Иконка стрелки в правом нижнем углу */
.category-card-arrow {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
}

.category-card:hover .category-card-arrow {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.category-card-arrow::after {
    content: "→";
    font-size: 12px;
    color: #000000;
    font-weight: bold;
}

/* Адаптивность для больших экранов - 5 карточек */
@media (min-width: 1400px) {
    .categories-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
}

/* Адаптивность для десктопов - 4 карточки */
@media (min-width: 1200px) and (max-width: 1399px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* Адаптивность для планшетов - 3 карточки */
@media (min-width: 900px) and (max-width: 1199px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .category-card {
        min-height: 200px;
    }
    
    .category-card-overlay {
        padding: 18px 12px 12px 12px;
    }
    
    .category-card-arrow {
        width: 22px;
        height: 22px;
        bottom: 10px;
        right: 10px;
    }
    
    .category-card-arrow::after {
        font-size: 11px;
    }
}

/* Адаптивность для мобильных устройств - 2 карточки */
@media (max-width: 899px) {
    .catalog-page {
        margin-top: 20px;
    }
    
    .catalog-header {
        margin-bottom: 30px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-card {
        min-height: 180px;
    }
    
    .category-card-overlay {
        padding: 15px 10px 10px 10px;
    }
    
    .category-card-placeholder::before {
        font-size: 32px;
    }
    
    .category-card-arrow {
        width: 20px;
        height: 20px;
        bottom: 8px;
        right: 8px;
    }
    
    .category-card-arrow::after {
        font-size: 10px;
    }
}

/* Адаптивность для маленьких мобильных - 1 карточка */
@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-card {
        min-height: 200px;
    }
    
    .category-card-overlay {
        padding: 18px 12px 12px 12px;
    }
    
    .category-card-placeholder::before {
        font-size: 28px;
    }
}

/*=============================================
            Дополнительная информация
===============================================*/

.catalog-info {
    margin-top: 50px;
    text-align: center;
}

.info-block {
    background-color: #f8f8f8;
    padding: 30px;
    border-radius: 24px;
    max-width: 600px;
    margin: 0 auto;
}

.info-block h3 {
    font-size: clamp(20px, 2vw, 24px);
    font-weight: 600;
    color: #000000;
    margin: 0 0 15px 0;
}

.info-block p {
    font-size: 16px;
    font-weight: 400;
    color: #666666;
    margin: 0;
    line-height: 1.5;
}

.info-block strong {
    color: #000000;
    font-weight: 600;
}

@media (max-width: 768px) {
    .catalog-info {
        margin-top: 40px;
    }
    
    .info-block {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .info-block {
        padding: 20px;
    }
    
    .info-block p {
        font-size: 14px;
    }
}
