/* ============================================
   Nik Catalog — стили каталога Dahua
   Акцент: #336666
   ============================================ */

.nik-catalog-wrap {
    font-family: inherit;
    margin: 0 0 40px;
}

/* --- Фильтр категорий --- */
.nik-catalog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.nik-cat-btn {
    background: #f0f5f5;
    border: 1px solid #c5d8d8;
    color: #336666;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
    white-space: nowrap;
}
.nik-cat-btn:hover,
.nik-cat-btn.active {
    background: #336666;
    border-color: #336666;
    color: #fff;
}
.nik-cat-count {
    background: rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    margin-left: 4px;
}
.nik-cat-btn.active .nik-cat-count {
    background: rgba(255,255,255,0.25);
}

/* --- Поиск --- */
.nik-catalog-search {
    margin-bottom: 24px;
}
#nik-catalog-search-input {
    width: 100%;
    max-width: 420px;
    padding: 10px 16px;
    border: 1px solid #c5d8d8;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
#nik-catalog-search-input:focus {
    border-color: #336666;
    box-shadow: 0 0 0 2px rgba(51,102,102,0.15);
}

/* --- Сетка --- */
.nik-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* --- Карточка товара --- */
.nik-product-card {
    background: #fff;
    border: 1px solid #e0eded;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s, transform .2s;
}
.nik-product-card:hover {
    box-shadow: 0 6px 24px rgba(51,102,102,0.12);
    transform: translateY(-2px);
}

/* --- Фото --- */
.nik-product-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nik-product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
}
.nik-no-img span {
    font-size: 48px;
    opacity: .3;
}

/* --- Тело карточки --- */
.nik-product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.nik-product-brand {
    display: inline-block;
    align-self: flex-start;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: .04em;
}
.nik-product-article {
    font-size: 13px;
    font-weight: 600;
    color: #336666;
    margin-bottom: 6px;
    word-break: break-all;
}
.nik-product-desc-short {
    font-size: 13px;
    color: #444;
    line-height: 1.45;
    margin-bottom: 8px;
}

/* --- Раскрываемые характеристики --- */
.nik-product-details {
    margin-bottom: 10px;
    font-size: 12px;
}
.nik-product-details summary {
    cursor: pointer;
    color: #336666;
    font-size: 12px;
    user-select: none;
    list-style: none;
}
.nik-product-details summary::before {
    content: '▶ ';
    font-size: 10px;
}
.nik-product-details[open] summary::before {
    content: '▼ ';
}
.nik-product-desc-full {
    margin-top: 6px;
    color: #555;
    line-height: 1.5;
    font-size: 12px;
    border-left: 2px solid #c5d8d8;
    padding-left: 10px;
}

/* --- Цены --- */
.nik-product-prices {
    margin: 10px 0 6px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}
.nik-price-rrz {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}
.nik-price-our {
    font-size: 20px;
    font-weight: 700;
    color: #336666;
}

/* --- Гарантия --- */
.nik-product-warranty {
    font-size: 11px;
    color: #888;
    margin-bottom: 12px;
}

/* --- Кнопка --- */
.nik-product-btn {
    display: block;
    text-align: center;
    background: #336666;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background .2s;
    margin-top: auto;
}
.nik-product-btn:hover {
    background: #265050;
    color: #fff !important;
}

/* --- Загрузить ещё --- */
.nik-catalog-more {
    text-align: center;
    margin-top: 10px;
}
.nik-load-more {
    background: transparent;
    border: 2px solid #336666;
    color: #336666;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: all .2s;
}
.nik-load-more:hover {
    background: #336666;
    color: #fff;
}
.nik-load-more:disabled {
    opacity: .4;
    cursor: default;
}

/* --- Пусто --- */
.nik-catalog-empty {
    grid-column: 1/-1;
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 16px;
}

/* --- Загрузка --- */
.nik-catalog-loading {
    grid-column: 1/-1;
    text-align: center;
    padding: 30px;
    color: #336666;
}

@media (max-width: 600px) {
    .nik-catalog-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .nik-product-img {
        height: 130px;
    }
    .nik-price-our { font-size: 17px; }
}
@media (max-width: 380px) {
    .nik-catalog-grid {
        grid-template-columns: 1fr;
    }
}

/* === ТУЛБАР (поиск + производитель) === */
.catalog-toolbar {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    align-items: stretch;
}
.catalog-toolbar #nik-catalog-search-input {
    flex: 1;
    padding: 11px 16px;
    border: 1px solid #c5d8d8;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    min-width: 0;
    transition: border-color .2s;
}
.catalog-toolbar #nik-catalog-search-input:focus {
    border-color: #336666;
    box-shadow: 0 0 0 2px rgba(51,102,102,.12);
}
.catalog-toolbar .catalog-brand-select {
    padding: 11px 14px;
    border: 1px solid #c5d8d8;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 160px;
}
.catalog-toolbar .catalog-brand-select:focus {
    border-color: #336666;
}

/* Бейдж скидки в карточке */
.nik-price-disc {
    background: #e8f5e8;
    color: #2e7d32;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

@media (max-width: 500px) {
    .catalog-toolbar { flex-wrap: wrap; }
    .catalog-toolbar #nik-catalog-search-input { border-right: 1px solid #c5d8d8; border-radius: 8px; }
    .catalog-toolbar .catalog-brand-select { border-radius: 8px; width: 100%; margin-top: 8px; }
}
/* v3.4.2 — taxonomy archives must use the same canvas width as the main catalog page. */
.tax-nik_product_cat #content > .ast-container,
.tax-nik_product_series #content > .ast-container {
    max-width:100% !important;
    width:100% !important;
    padding-left:0 !important;
    padding-right:0 !important;
}
.tax-nik_product_cat #primary,
.tax-nik_product_series #primary,
.tax-nik_product_cat #main,
.tax-nik_product_series #main {
    width:100% !important;
    max-width:none !important;
}
.tax-nik_product_cat #primary,
.tax-nik_product_series #primary {
    margin:0 !important;
    padding:0 !important;
}
.tax-nik_product_cat .catalog-page-wrap,
.tax-nik_product_series .catalog-page-wrap {
    width:100% !important;
    max-width:1200px !important;
    box-sizing:border-box;
}

/* 3.5.0 — видимая пагинация каталога */
.nik-seo-pagination { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0 8px; }
.nik-seo-pagination .page-numbers { min-width: 38px; padding: 7px 12px; border: 1px solid #c5d8d8; border-radius: 8px; text-align: center; color: #336666; text-decoration: none; font-size: 14px; }
.nik-seo-pagination .page-numbers.current, .nik-seo-pagination a.page-numbers:hover { background: #336666; color: #fff; border-color: #336666; }
.nik-seo-pagination .page-numbers.dots { border-color: transparent; }
