/**
 * Каталог v2.0 — Горизонтальные карточки товаров
 * Naked Technologies
 */

:root {
    --cat-primary: #2c3df5;
    --cat-primary-hover: #1e2ed4;
    --cat-text: #1a1a2e;
    --cat-text-secondary: #6b7280;
    --cat-border: #e5e7eb;
    --cat-bg: #f9fafb;
    --cat-card-radius: 12px;
    --cat-sidebar-width: 280px;
}

/* ==================== LAYOUT ==================== */
.nt-catalog-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nt-catalog-container {
    display: grid;
    grid-template-columns: var(--cat-sidebar-width) 1fr;
    gap: 30px;
    margin-top: 20px;
}

/* ==================== SIDEBAR ==================== */
.nt-catalog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.nt-filter-section {
    background: #fff;
    border: 1px solid var(--cat-border);
    border-radius: var(--cat-card-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.nt-filter-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cat-text);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nt-filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nt-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.2s;
}

.nt-filter-item:hover {
    color: var(--cat-primary);
}

.nt-filter-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--cat-primary);
}

.nt-filter-label {
    flex: 1;
    font-size: 14px;
    color: var(--cat-text);
}

.nt-filter-count {
    font-size: 12px;
    color: var(--cat-text-secondary);
    background: var(--cat-bg);
    padding: 2px 8px;
    border-radius: 10px;
}

/* ==================== MAIN CONTENT ==================== */
.nt-catalog-main {
    min-width: 0;
}

/* Заголовок и сортировка */
.nt-catalog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.nt-catalog-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--cat-text);
    margin: 0;
}

.nt-catalog-count {
    font-size: 16px;
    color: var(--cat-text-secondary);
    font-weight: 400;
}

.nt-catalog-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nt-sort-select {
    padding: 10px 16px;
    border: 1px solid var(--cat-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--cat-text);
    background: #fff;
    cursor: pointer;
    min-width: 180px;
}

/* ==================== QUICK FILTERS (CHIPS) ==================== */
.nt-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.nt-quick-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--cat-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--cat-text);
    cursor: pointer;
    transition: all 0.2s;
}

.nt-quick-filter:hover {
    border-color: var(--cat-primary);
    color: var(--cat-primary);
}

.nt-quick-filter.active {
    background: var(--cat-primary);
    border-color: var(--cat-primary);
    color: #fff;
}

/* ==================== PRODUCT CARDS ==================== */
.nt-products-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Горизонтальная карточка товара */
.nt-product-card {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    background: #fff;
    border: 1px solid var(--cat-border);
    border-radius: var(--cat-card-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.nt-product-card:hover {
    border-color: var(--cat-primary);
    box-shadow: 0 4px 20px rgba(44, 61, 245, 0.1);
}

/* Изображение */
.nt-product-image {
    flex: 0 0 200px;
    width: 200px;
    height: 200px;
    position: relative;
    background: var(--cat-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nt-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nt-product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.nt-product-badge.hit {
    background: #ef4444;
    color: #fff;
}

.nt-product-badge.new {
    background: #22c55e;
    color: #fff;
}

.nt-product-badge.sale {
    background: #f59e0b;
    color: #fff;
}

/* Информация о товаре */
.nt-product-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.nt-product-category {
    font-size: 12px;
    color: var(--cat-primary);
    font-weight: 500;
    margin-bottom: 6px;
}

.nt-product-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--cat-text);
    margin: 0 0 8px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nt-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.nt-product-stars {
    color: #f59e0b;
    font-size: 14px;
}

.nt-product-rating-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--cat-text);
}

.nt-product-rating-count {
    font-size: 13px;
    color: var(--cat-text-secondary);
}

/* Характеристики */
.nt-product-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: auto;
}

.nt-product-spec {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.nt-product-spec-label {
    color: var(--cat-text-secondary);
}

.nt-product-spec-value {
    color: var(--cat-text);
    font-weight: 500;
}

/* Сайдбар карточки (цена) */
.nt-product-sidebar {
    flex: 0 0 220px;
    width: 220px;
    padding: 20px;
    background: var(--cat-bg);
    border-left: 1px solid var(--cat-border);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nt-product-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--cat-text);
    margin-bottom: 4px;
}

.nt-product-price-old {
    font-size: 14px;
    color: var(--cat-text-secondary);
    text-decoration: line-through;
    margin-bottom: 8px;
}

.nt-product-credit {
    font-size: 13px;
    color: var(--cat-text-secondary);
    margin-bottom: 16px;
}

.nt-product-credit strong {
    color: var(--cat-text);
}

.nt-product-availability {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #22c55e;
    font-weight: 500;
}

.nt-product-availability.out-of-stock {
    color: var(--cat-text-secondary);
}

/* ==================== PAGINATION ==================== */
.nt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-bottom: 40px;
}

.nt-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--cat-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--cat-text);
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.nt-pagination-btn:hover {
    border-color: var(--cat-primary);
    color: var(--cat-primary);
}

.nt-pagination-btn.active {
    background: var(--cat-primary);
    border-color: var(--cat-primary);
    color: #fff;
}

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

/* ==================== SEO CONTENT ==================== */
.nt-catalog-seo {
    margin-top: 60px;
    padding: 40px;
    background: #fff;
    border: 1px solid var(--cat-border);
    border-radius: var(--cat-card-radius);
}

.nt-catalog-seo h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--cat-text);
    margin: 0 0 20px 0;
}

.nt-catalog-seo p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--cat-text-secondary);
    margin-bottom: 16px;
}

/* ==================== FAQ ==================== */
.nt-catalog-faq {
    margin-top: 40px;
}

.nt-faq-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--cat-text);
    margin: 0 0 24px 0;
}

.nt-faq-item {
    border: 1px solid var(--cat-border);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.nt-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--cat-text);
}

.nt-faq-question:hover {
    background: var(--cat-bg);
}

.nt-faq-icon {
    font-size: 20px;
    color: var(--cat-text-secondary);
    transition: transform 0.2s;
}

.nt-faq-item.open .nt-faq-icon {
    transform: rotate(180deg);
}

.nt-faq-answer {
    padding: 0 20px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--cat-text-secondary);
    display: none;
}

.nt-faq-item.open .nt-faq-answer {
    display: block;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 1024px) {
    .nt-catalog-container {
        grid-template-columns: 1fr;
    }
    
    .nt-catalog-sidebar {
        position: static;
        max-height: none;
    }
    
    .nt-product-card {
        flex-wrap: wrap;
    }
    
    .nt-product-image {
        flex: 0 0 180px;
        width: 180px;
        height: 180px;
    }
    
    .nt-product-sidebar {
        flex: 0 0 100%;
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--cat-border);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nt-catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nt-catalog-title {
        font-size: 22px;
    }
    
    .nt-quick-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        margin: 0 -20px 20px;
        padding: 0 20px 8px;
    }
    
    .nt-quick-filter {
        flex-shrink: 0;
    }
    
    .nt-product-card {
        flex-direction: column;
    }
    
    .nt-product-image {
        flex: 0 0 auto;
        width: 100%;
        height: 200px;
    }
    
    .nt-product-info {
        padding: 16px;
    }
    
    .nt-product-title {
        font-size: 16px;
    }
    
    .nt-product-specs {
        grid-template-columns: 1fr;
    }
    
    .nt-product-sidebar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .nt-product-price {
        font-size: 20px;
    }
    
    .nt-catalog-seo {
        padding: 24px;
    }
}
