/* ========================================
 Catalog Page Styles - Царский Сон
 Кастомные стили для страницы каталога
 Используются вместе с основными стилями
 ======================================== */

/* ========================================
   Заголовок секции с декоративными линиями
   ======================================== */
.catalog-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.catalog-divider-line {
    height: 0.5px;
    flex: 1;
}

.catalog-divider-left {
    background: linear-gradient(to right, transparent, rgba(201, 169, 97, 0.3));
}

.catalog-divider-right {
    background: linear-gradient(to left, transparent, rgba(201, 169, 97, 0.3));
}

/* ========================================
   Сетка категорий
   ======================================== */
.catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   Карточка категории
   ======================================== */
.category-card {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    text-decoration: none;
}

.category-card:hover {
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.2), 0 2px 8px rgba(201, 169, 97, 0.1);
}

/* ========================================
   Изображение категории
   ======================================== */
.category-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

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

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

/* Градиентный оверлей */
.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(46, 21, 0, 0.8), rgba(46, 21, 0, 0.3), transparent);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-card-overlay {
    opacity: 0.8;
}

/* Золотая акцентная линия */
.category-card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #C9A961, #F56200);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.category-card:hover .category-card-accent {
    transform: scaleX(1);
}

/* ========================================
   Контент карточки
   ======================================== */
.category-card-content {
    padding: 1.5rem;
    position: relative;
}

.category-card-title {
    font-family: 'Futura LT', 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: #1f2937;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.category-card:hover .category-card-title {
    color: #F56200;
}

.category-card-count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

/* ========================================
   Подкатегории
   ======================================== */
.category-card-subcategories {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.category-subcategories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-subcategory-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.category-subcategory-dot {
    width: 4px;
    height: 4px;
    background-color: #C9A961;
    flex-shrink: 0;
}

/* ========================================
   Кнопка действия
   ======================================== */
.category-card-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #F56200;
    transition: gap 0.3s ease;
    font-size: 0.875rem;
}

.category-card:hover .category-card-action {
    gap: 0.75rem;
}

.category-card-arrow {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* ========================================
   Декоративный угловой элемент
   ======================================== */
.category-card-corner {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(to bottom left, rgba(201, 169, 97, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover .category-card-corner {
    opacity: 1;
}

/* ========================================
   Блок преимуществ
   ======================================== */
.benefits-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .benefits-grid {
        gap: 2rem;
    }
}

/* ========================================
   Элемент преимущества
   ======================================== */
.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: default;
    min-width: 280px;
}

@media (min-width: 1024px) {
    .benefit-item {
        min-width: 0;
    }
}

/* Иконка преимущества */
.benefit-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #C9A961 0%, #A88B4D 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: box-shadow 0.3s ease;
}

.benefit-item:hover .benefit-icon {
    box-shadow: 0 4px 20px rgba(201, 169, 97, 0.2), 0 2px 8px rgba(201, 169, 97, 0.1);
}

/* Текст преимущества */
.benefit-text {
    text-align: left;
}

.benefit-title {
    font-family: 'Futura LT', 'Montserrat', sans-serif;
    font-size: 1.125rem;
    font-weight: 400;
    color: #2E1500;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.benefit-item:hover .benefit-title {
    color: #F56200;
}

.benefit-desc {
    font-size: 0.875rem;
    color: rgba(46, 21, 0, 0.6);
    line-height: 1.6;
}

/* ========================================
   Адаптивность для очень маленьких экранов
   ======================================== */
@media (max-width: 480px) {
    .catalog-grid {
        gap: 1.5rem;
    }

    .category-card-content {
        padding: 1rem;
    }

    .category-card-title {
        font-size: 1.125rem;
    }

    .benefit-item {
        min-width: 100%;
    }

    .benefits-grid {
        gap: 1rem;
    }
}

/* ========================================
   Дополнительные утилиты
   ======================================== */
.mb-10 {
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .mb-10 {
        margin-bottom: 5rem;
    }
}


/* Catalog Toolbar */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.sort-select {
    width: 200px;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: #C9A961;
}

/* Column Toggle Buttons */
.column-btn {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.column-btn:hover {
    border-color: #C9A961;
}

.column-btn.active {
    background-color: #2E1500;
    color: white;
    border-color: #2E1500;
}

.column-btn svg {
    display: block;
}

/* Products Grid */
.products-grid {
    display: grid;
    gap: 1.5rem;
}

.products-grid.grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.products-grid.grid-cols-4 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .products-grid.grid-cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (min-width: 1024px) {
    .products-grid.grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .products-grid.grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Pagination */
.pagination-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pagination-btn {
    min-width: 40px;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    border-color: #C9A961;
    color: #C9A961;
}

.pagination-btn.active {
    background-color: #2E1500;
    color: white;
    border-color: #2E1500;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
