/**
 * Стили для страницы каталога
 */

/* Стили для навигации по категориям */
.catalog-categories .card-header {
    background-color: #1B3C59;
    cursor: pointer;
    transition: all 0.3s ease;
}

.catalog-categories .card-header:hover {
    background-color: #2c5d8c;
}

.catalog-categories .card-body {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.catalog-categories .category-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f1f1;
}

.catalog-categories .category-list li:last-child {
    border-bottom: none;
}

.catalog-categories .category-list a {
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}

.catalog-categories .category-list a:hover {
    color: #FF6B35;
    padding-left: 5px;
}

.card-header h5 {
    font-size: 1rem;
}

.catalog-categories .fa-chevron-down {
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .catalog-categories .col-md-4 {
        margin-bottom: 15px;
    }
}

/* Стили для блока "Часто ищут" */
.frequently-searched {
    padding-top: 15px;
    margin-top: 30px;
    border-top: 1px solid #f2f2f2;
}

.frequently-searched__header {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.frequently-searched__title {
    font-size: 18px;
    font-weight: 600;
    color: #1B3C59;
    margin: 0;
}

.frequently-searched__chevron {
    margin-left: 10px;
    color: #666;
    transition: transform 0.3s;
}

.frequently-searched.active .frequently-searched__chevron {
    transform: rotate(180deg);
}

.frequently-searched__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.frequently-searched.active .frequently-searched__content {
    max-height: 1000px;
}

.popular-search-link {
    color: #333;
    text-decoration: none;
    display: block;
    height: 100%;
}

.popular-search-link .card {
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.popular-search-link .card:hover {
    border-color: #FF6B35;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.popular-search-link .card-body {
    display: flex;
    align-items: center;
    justify-content: center;
}

.popular-search-link .card-body span {
    color: #1B3C59;
    font-size: 14px;
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .popular-search-link .card-body {
        padding: 8px;
    }
    
    .popular-search-link .card-body span {
        font-size: 12px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Карточка товара (B2B — без цен)                                            */
/* ──────────────────────────────────────────────────────────────────────────  */
.product-card {
    --opt-primary: #1B3C59;
    --opt-accent:  #F47A24;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    will-change: transform;
}

.product-card:hover,
.product-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(27, 60, 89, 0.12);
    border-color: #d8dde6;
}

/* ── Media (image area) ─────────────────────────────────────────────────── */
.product-card__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    background: #fafbfc;
    overflow: hidden;
    text-decoration: none;
}

.product-card__media img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__media img {
    transform: scale(1.05);
}

/* ── Top-left: маркер "Опт от 5шт / Экспресс" ──────────────────────────── */
.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: var(--opt-primary);
    color: #fff;
}
.product-card__badge--wholesale { background: var(--opt-primary); }
.product-card__badge--express   { background: var(--opt-accent); }

/* ── Top-right: stock-чип ──────────────────────────────────────────────── */
.product-card__stock {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    color: #1f2937;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.product-card__stock--in    { color: #15803d; }
.product-card__stock--order { color: #b45309; }
.product-card__stock--out   { color: #b91c1c; }
.product-card__stock i { font-size: 10px; }

/* ── Body ──────────────────────────────────────────────────────────────── */
.product-card__body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 16px 16px 14px;
    gap: 10px;
}

.product-card__title {
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    margin: 0;
    min-height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-card__title a {
    color: var(--opt-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.product-card__title a:hover,
.product-card__title a:focus {
    color: var(--opt-accent);
}

/* ── Meta: SKU + "Цена по запросу" в одной строке ──────────────────────── */
.product-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #6b7280;
}
.product-card__sku {
    color: #95a3b3;
    letter-spacing: 0.3px;
}
.product-card__price-hint {
    color: var(--opt-primary);
    font-weight: 600;
    background: #f4f6f8;
    padding: 3px 9px;
    border-radius: 10px;
}

/* ── CTA ───────────────────────────────────────────────────────────────── */
.product-card__cta {
    margin-top: auto;
    width: 100%;
    padding: 11px 14px;
    background: var(--opt-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.15s ease, transform 0.1s ease;
}
.product-card__cta:hover,
.product-card__cta:focus {
    background: var(--opt-accent);
    color: #fff;
    transform: translateY(-1px);
}
.product-card__cta:active {
    transform: translateY(0);
}
.product-card__cta i { font-size: 14px; }

/* Старые .stock-indicator / .product-card__image — оставлены для бэкомпата
   страниц, где ещё может встречаться старый шаблон. */
.stock-indicator {
    margin-bottom: 15px;
}
.stock-indicator .badge {
    font-size: 14px;
    padding: 6px 12px;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* B2B CTA card — заменяет "цена + quantity + add-to-cart" на single-product */
/* ──────────────────────────────────────────────────────────────────────────  */
.b2b-cta-card {
    --opt-primary: #1B3C59;
    --opt-accent:  #F47A24;
    margin: 24px 0;
    padding: 22px 22px 18px;
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(27, 60, 89, 0.06);
}
.b2b-cta-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eef0f3;
}
.b2b-cta-card__price-label {
    font-size: 22px;
    font-weight: 700;
    color: var(--opt-primary);
    letter-spacing: -0.2px;
}
.b2b-cta-card__hint {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #95a3b3;
    background: #f4f6f8;
    padding: 4px 10px;
    border-radius: 10px;
}
.b2b-cta-card__lead {
    font-size: 13px;
    line-height: 1.55;
    color: #4a5568;
    margin: 0 0 18px;
}

/* Quantity control (B2B style — labelled + clean) */
.b2b-cta-card__qty {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.b2b-cta-card__qty-label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}
.b2b-cta-card__qty-control {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #d8dde6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.b2b-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f8fafc;
    color: var(--opt-primary);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}
.b2b-qty-btn:hover { background: #eef2f6; }
.b2b-qty-btn:active { background: #e0e7ed; }
.b2b-qty-input {
    width: 56px;
    height: 36px;
    border: none;
    border-left: 1px solid #d8dde6;
    border-right: 1px solid #d8dde6;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    -moz-appearance: textfield;
}
.b2b-qty-input::-webkit-outer-spin-button,
.b2b-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Главный CTA */
.b2b-cta-card__btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(180deg, #FF8B40, var(--opt-accent));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 16px rgba(244, 122, 36, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.b2b-cta-card__btn:hover,
.b2b-cta-card__btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(244, 122, 36, 0.38);
    filter: brightness(1.04);
}
.b2b-cta-card__btn:active { transform: translateY(0); }
.b2b-cta-card__btn i { font-size: 16px; }

/* Trust list */
.b2b-cta-card__trust {
    list-style: none;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid #eef0f3;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    font-size: 13px;
    color: #4a5568;
}
.b2b-cta-card__trust li {
    display: flex;
    align-items: center;
    gap: 10px;
}
.b2b-cta-card__trust i {
    color: var(--opt-primary);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

@media (min-width: 480px) {
    .b2b-cta-card__trust {
        grid-template-columns: 1fr 1fr;
    }
}

/* Стили для облака тегов */
.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tag-item {
    display: inline-block;
    padding: 8px 15px;
    background-color: #f8f9fa;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background-color: #1B3C59;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
} 