/* ============================================================================
   FCNC: Страница категорий (Archive)
   ============================================================================ */

:root {
    --primary: #1F2A44;
    --accent-cta: #E77C3C;
    --accent-links: #7896F7;
    --surface-light: #F7F3EE;
    --surface-white: #FFFFFF;
    --text-primary: #222222;
}

/* Контейнер архива */
.fcnc-archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Хлебные крошки */
.fcnc-archive-breadcrumbs {
    margin-bottom: 20px;
    padding: 12px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.fcnc-archive-breadcrumbs a {
    color: var(--accent-links);
    text-decoration: none;
    transition: color 0.3s ease;
}

.fcnc-archive-breadcrumbs a:hover {
    color: var(--accent-cta);
    text-decoration: underline;
}

/* Заголовок страницы */
.fcnc-archive-header {
    text-align: center;
    margin-bottom: 40px;
}

.fcnc-archive-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 16px;
    line-height: 1.2;
}

.fcnc-archive-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Меню категорий (табы) */
.fcnc-category-tabs {
    margin-bottom: 40px;
    border-bottom: 2px solid #e0e0e0;
}

.fcnc-tabs-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 0 8px 0;
}

.fcnc-tab-link {
    display: inline-block;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    text-decoration: none;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.fcnc-tab-link:hover {
    background: #e8f0ff;
    color: var(--accent-links);
}

.fcnc-tab-link.active {
    background: var(--accent-links);
    color: white;
    font-weight: 600;
}

.fcnc-tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-links);
}

/* Сетка товаров */
.fcnc-products-grid,
ul.fcnc-products-grid,
.fcnc-archive-container ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    list-style: none !important;
    margin: 0 0 40px 0 !important;
    padding: 0 !important;
    width: 100% !important;
    flex-direction: unset !important;
}

/* Карточка товара */
.fcnc-product-card {
    background: var(--surface-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.fcnc-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.fcnc-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Изображение */
.fcnc-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fcnc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.fcnc-product-card:hover .fcnc-card-image img {
    transform: scale(1.05);
}

/* Контент карточки */
.fcnc-card-content {
    padding: 20px;
}

/* Название товара */
.fcnc-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
    margin: 0 0 12px;
    line-height: 1.3;
    min-height: 48px;
}

/* Цена */
.fcnc-card-price {
    margin-bottom: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #f5f5fc 0%, #ffffff 100%);
    border-radius: 8px;
    text-align: center;
}

.fcnc-price-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.fcnc-price-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-cta);
}

/* Кнопка */
.fcnc-card-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: white;
    background: var(--accent-links);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.fcnc-product-card:hover .fcnc-card-button {
    background: var(--accent-cta);
    transform: translateX(4px);
}

/* Нет товаров */
.fcnc-no-products {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.fcnc-no-products p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Пагинация */
.woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}

.woocommerce-pagination ul.page-numbers {
    display: inline-flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination .page-numbers {
    display: inline-block;
    padding: 10px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    background: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.woocommerce-pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers.current {
    background: var(--accent-links);
    color: white;
}

/* ============================================================================
   Адаптивность
   ============================================================================ */

/* Планшеты */
@media (max-width: 968px) {
    .fcnc-archive-container {
        padding: 20px 16px;
    }

    .fcnc-archive-title {
        font-size: 28px;
    }

    .fcnc-archive-header {
        margin-bottom: 30px;
    }

    .fcnc-category-tabs {
        margin-bottom: 30px;
    }

    .fcnc-tab-link {
        padding: 10px 20px;
        font-size: 14px;
    }

    .fcnc-products-grid ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .fcnc-card-image {
        height: 200px;
    }

    .fcnc-card-title {
        font-size: 16px;
        min-height: auto;
    }

    .fcnc-price-value {
        font-size: 20px;
    }
}

/* Мобильные */
@media (max-width: 600px) {
    .fcnc-archive-container {
        padding: 16px 12px;
    }

    .fcnc-archive-breadcrumbs {
        font-size: 12px;
        padding: 8px 0;
        margin-bottom: 16px;
    }

    .fcnc-archive-title {
        font-size: 24px;
        margin-bottom: 12px;
    }

    .fcnc-archive-description {
        font-size: 14px;
    }

    .fcnc-archive-header {
        margin-bottom: 24px;
    }

    .fcnc-category-tabs {
        margin-bottom: 24px;
    }

    .fcnc-tabs-wrapper {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding: 0 0 8px;
        -webkit-overflow-scrolling: touch;
    }

    .fcnc-tab-link {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Сетка товаров - 1 колонка на мобильных */
    .fcnc-products-grid,
    ul.fcnc-products-grid,
    .fcnc-products-grid ul.products,
    .fcnc-archive-container ul.products {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .fcnc-card-image {
        height: 180px;
    }

    .fcnc-card-content {
        padding: 16px;
    }

    .fcnc-card-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .fcnc-card-price {
        padding: 10px;
        margin-bottom: 12px;
    }

    .fcnc-price-label {
        font-size: 12px;
    }

    .fcnc-price-value {
        font-size: 20px;
    }

    .fcnc-card-button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .fcnc-no-products {
        padding: 40px 16px;
    }

    .fcnc-no-products p {
        font-size: 16px;
    }

    .woocommerce-pagination .page-numbers {
        padding: 8px 12px;
        font-size: 14px;
    }
}

