/**
 * catalog.css — Стили каталога / категорий / подкатегорий
 *
 * Содержит:
 * 1. Catalog Header (заголовок + мета)
 * 2. CPA Block (быстрая заявка)
 * 3. Catalog Text (SEO-текст сверху/снизу)
 * 4. Subcategories Cloud
 * 5. Filters
 * 6. Products Table
 * 7. Pagination
 * 8. Related Categories
 * 9. Catalog Empty
 * 10. Catalog CTA (нижний)
 * 11. Toast
 * 12. Responsive
 *
 * @package RegionTrade
 */


/* ===================================================
   1. CATALOG HEADER
   =================================================== */

.catalog-header {
    padding: 28px 0 20px;
}

.catalog-header__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.catalog-header__title {
    font-size: 28px;
    font-weight: 800;
    color: var(--c-dark);
    margin-bottom: 8px;
    line-height: 1.2;
}

.catalog-header__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--c-gray);
}

.catalog-header__city {
    display: flex;
    align-items: center;
    gap: 4px;
}

.catalog-header__city svg {
    color: #e8a530;
    flex-shrink: 0;
}

.catalog-header__count {
    padding: 3px 12px;
    background: var(--c-light);
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.catalog-header__actions {
    flex-shrink: 0;
}


/* ===================================================
   2. CPA BLOCK
   =================================================== */

.cpa-block {
    padding: 0 0 10px;
}

.cpa-block__inner {
    background: linear-gradient(135deg, #212b62 0%, #191f4a 100%);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 30px rgba(33, 43, 98, 0.3);
    position: relative;
    overflow: hidden;
}

.cpa-block__inner::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
}

.cpa-block__icon {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,.18);
}

.cpa-block__content {
    color: #fff;
    flex-shrink: 0;
    min-width: 200px;
}

.cpa-block__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
}

.cpa-block__desc {
    font-size: 13px;
    opacity: .9;
    margin-bottom: 8px;
    color: rgba(255,255,255,.85);
}

.cpa-block__features {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255,255,255,.85);
}

.cpa-block__features span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* CPA Form */
.cpa-block__form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.cpa-block__form-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cpa-block__input {
    padding: 11px 14px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    min-width: 130px;
    flex: 1;
    outline: none;
    transition: all .25s;
    background: rgba(255,255,255,.95);
}

.cpa-block__input:focus {
    border-color: #e8a530;
    box-shadow: 0 0 0 3px rgba(232,165,48,.2);
}

.cpa-block__input::placeholder {
    color: #999;
    font-size: 12px;
}

/* File */
.cpa-block__file-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cpa-block__file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
}

.cpa-block__file-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.15);
    color: #fff;
    border: 2px dashed rgba(255,255,255,.4);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    transition: all .25s;
    white-space: nowrap;
}

.cpa-block__file-btn:hover {
    background: rgba(255,255,255,.25);
    border-color: rgba(255,255,255,.7);
}

.cpa-block__file-btn svg {
    flex-shrink: 0;
}

.cpa-block__file-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Submit */
.cpa-block__submit {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8a530;
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(232,165,48,.35);
    font-family: inherit;
}

.cpa-block__submit:hover {
    background: #d4922a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232,165,48,.5);
}

.cpa-block__agree {
    padding-top: 2px;
}

.cpa-block__agree .form__checkbox-label {
    color: rgba(255,255,255,.7);
    font-size: 11px;
}

.cpa-block__agree .form__checkbox-box {
    width: 16px;
    height: 16px;
    border-color: rgba(255,255,255,.4);
}

.cpa-block__agree .form__checkbox:checked + .form__checkbox-box {
    background: #e8a530;
    border-color: #e8a530;
}

.cpa-block__agree .form__checkbox-text a {
    color: rgba(255,255,255,.8);
}


/* ===================================================
   3. CATALOG TEXT (SEO)
   =================================================== */

.catalog-text {
    padding: 20px 0;
}

.catalog-text--top {
    padding-bottom: 10px;
}

.catalog-seo {
    padding: 40px 0;
}

.catalog-seo__box {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-radius: 16px;
    padding: 36px 40px;
    border: 1px solid var(--c-border);
}

.catalog-seo__text {
    max-width: none;
}

.catalog-seo__text h2 {
    font-size: 22px;
    color: #212b62;
    margin-top: 28px;
}

.catalog-seo__text h3 {
    font-size: 18px;
    color: #212b62;
}


/* ===================================================
   4. SUBCATEGORIES CLOUD
   =================================================== */

.catalog-subcats {
    padding: 20px 0;
}

.catalog-subcats__heading {
    font-size: 18px;
    color: #212b62;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-subcats__heading svg {
    color: #212b62;
}

.catalog-subcats__cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.catalog-subcats__tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--c-light);
    border: 2px solid var(--c-border);
    border-radius: 25px;
    font-size: 14px;
    color: var(--c-dark);
    text-decoration: none;
    transition: all .25s;
}

.catalog-subcats__tag:hover {
    background: #212b62;
    color: #fff;
    border-color: #212b62;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 43, 98, .18);
}

.catalog-subcats__tag-count {
    background: #212b62;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.catalog-subcats__tag:hover .catalog-subcats__tag-count {
    background: #fff;
    color: #212b62;
}


/* ===================================================
   5. FILTERS
   =================================================== */

.catalog-filters {
    padding: 10px 0 20px;
}

.catalog-filters__box {
    background: var(--c-light);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--c-border);
}

.catalog-filters__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.catalog-filters__title {
    font-size: 17px;
    font-weight: 700;
    color: #212b62;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.catalog-filters__title svg {
    color: #212b62;
}

.catalog-filters__toggle {
    display: none;
    background: #212b62;
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
}

.catalog-filters__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.catalog-filters__group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #212b62;
    font-size: 13px;
}

.catalog-filters__group select,
.catalog-filters__group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--c-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    transition: border-color .25s;
    outline: none;
}

.catalog-filters__group select:focus,
.catalog-filters__group input:focus {
    border-color: #212b62;
}

.catalog-filters__price-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-filters__price-range input {
    flex: 1;
    min-width: 0;
}

.catalog-filters__price-range span {
    color: var(--c-gray);
    font-size: 14px;
}

.catalog-filters__buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--c-border);
    margin-top: 8px;
    grid-column: 1 / -1;
}

.catalog-filters__active-badge {
    font-size: 12px;
    font-weight: 600;
    color: #27ae60;
    padding: 4px 12px;
    background: rgba(39,174,96,.1);
    border-radius: 20px;
}


/* ===================================================
   6. PRODUCTS TABLE
   =================================================== */

.catalog-products__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.catalog-products__count {
    color: var(--c-gray);
    font-size: 14px;
}

.catalog-products__sort {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-products__sort label {
    font-size: 13px;
    color: var(--c-gray);
}

.catalog-products__sort select {
    padding: 8px 14px;
    border: 2px solid var(--c-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .25s;
}

.catalog-products__sort select:focus {
    border-color: #212b62;
}

/* Table wrap */
.catalog-table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.catalog-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.catalog-table thead {
    background: #212b62;
    color: #fff;
}

.catalog-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}

.catalog-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: middle;
}

.catalog-table tbody tr {
    transition: background .2s;
}

.catalog-table tbody tr:hover {
    background: #f8f9fa;
}

.catalog-table tbody tr:last-child td {
    border-bottom: none;
}

/* Columns */
.catalog-table__th--photo { width: 80px; }
.catalog-table__th--action { width: 140px; }

.catalog-table__img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--c-border);
}

.catalog-table__no-img {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--c-light);
    border-radius: 8px;
    border: 1px solid var(--c-border);
}

.catalog-table__product-name {
    font-weight: 600;
    color: #212b62;
    display: block;
    margin-bottom: 3px;
    text-decoration: none;
    transition: color .2s;
}

.catalog-table__product-name:hover {
    color: #3a4580;
    text-decoration: underline;
}

.catalog-table__sku {
    font-size: 12px;
    color: var(--c-gray);
    display: block;
}

.catalog-table__specs-text {
    font-size: 13px;
    color: var(--c-gray);
    line-height: 1.5;
}

/* Price */
.catalog-table__price {
    font-size: 17px;
    font-weight: 700;
    color: #212b62;
    white-space: nowrap;
}

.catalog-table__price-from {
    font-size: 12px;
    font-weight: 500;
    color: var(--c-gray);
    text-transform: lowercase;
}

.catalog-table__price-unit {
    font-size: 12px;
    font-weight: 400;
    color: var(--c-gray);
}

.catalog-table__price--request {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-gray);
}

/* Stock */
.catalog-table__stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.catalog-table__stock--in {
    background: rgba(34,197,94,.1);
    color: #22c55e;
}

.catalog-table__stock--out {
    background: rgba(107,114,128,.1);
    color: var(--c-gray);
}

/* Cart button */
.catalog-table__cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #212b62;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    white-space: nowrap;
    font-family: inherit;
}

.catalog-table__cart-btn:hover {
    background: #191f4a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 43, 98, .25);
}

.catalog-table__cart-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.catalog-table__cart-btn.is-added {
    background: #27ae60;
}


/* ===================================================
   7. PAGINATION (extends base.css)
   =================================================== */

/* Already in base.css — just override specifics */
.catalog-products .pagination {
    padding-top: 28px;
}


/* ===================================================
   8. RELATED CATEGORIES
   =================================================== */

.catalog-related {
    padding: 40px 0;
    border-top: 1px solid var(--c-border);
}

.catalog-related__title {
    font-size: 22px;
    color: #212b62;
    text-align: center;
    margin-bottom: 24px;
}

.catalog-related__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.catalog-related__card {
    background: var(--c-light);
    border: 2px solid var(--c-border);
    border-radius: 12px;
    padding: 22px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--c-dark);
    transition: all .25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.catalog-related__card:hover {
    border-color: #212b62;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(33, 43, 98, .12);
}

.catalog-related__card-icon {
    width: 52px;
    height: 52px;
    background: #212b62;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
}

.catalog-related__card-icon svg {
    width: 24px;
    height: 24px;
}

.catalog-related__card h3 {
    font-size: 15px;
    font-weight: 700;
    color: #212b62;
    margin-bottom: 0;
}

.catalog-related__card-count {
    font-size: 12px;
    color: #fff;
    background: #212b62;
    padding: 3px 10px;
    border-radius: 12px;
}


/* ===================================================
   9. CATALOG EMPTY
   =================================================== */

.catalog-empty {
    text-align: center;
    padding: 60px 0;
}

.catalog-empty svg {
    margin: 0 auto 16px;
}

.catalog-empty h3 {
    font-size: 20px;
    color: var(--c-dark);
    margin-bottom: 8px;
}

.catalog-empty p {
    color: var(--c-gray);
    margin-bottom: 20px;
}


/* ===================================================
   10. TOAST
   =================================================== */

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #27ae60;
    color: #fff;
    padding: 14px 22px;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    transform: translateY(100px);
    opacity: 0;
    transition: all .3s;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    pointer-events: none;
}

.toast.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.toast--success { background: #27ae60; }
.toast--error { background: #e74c3c; }

.toast__icon {
    flex-shrink: 0;
}


/* ===================================================
   11. BADGE PULSE (cart)
   =================================================== */

@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

.header__cart-count.is-pulse {
    animation: badge-pulse .4s ease;
}


/* ===================================================
   12. RESPONSIVE
   =================================================== */

@media (max-width: 1100px) {
    .cpa-block__inner {
        flex-wrap: wrap;
    }

    .cpa-block__content {
        min-width: auto;
    }

    .catalog-filters__grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    /* Header */
    .catalog-header__inner {
        flex-direction: column;
        gap: 12px;
    }

    .catalog-header__title {
        font-size: 22px;
    }

    .catalog-header__actions {
        width: 100%;
    }

    .catalog-header__actions .btn {
        width: 100%;
    }

    /* CPA */
    .cpa-block__inner {
        flex-direction: column;
        text-align: center;
        padding: 22px 18px;
    }

    .cpa-block__icon {
        margin: 0 auto;
        width: 60px;
        height: 60px;
    }

    .cpa-block__features {
        justify-content: center;
    }

    .cpa-block__form-row {
        flex-direction: column;
    }

    .cpa-block__input {
        min-width: unset;
    }

    .cpa-block__file-label {
        width: 100%;
    }

    .cpa-block__file-btn {
        width: 100%;
        justify-content: center;
    }

    .cpa-block__submit {
        width: 100%;
        justify-content: center;
    }

    /* Filters */
    .catalog-filters__toggle {
        display: block;
    }

    .catalog-filters__grid {
        display: none;
        grid-template-columns: 1fr 1fr;
    }

    .catalog-filters__grid.is-active {
        display: grid;
        margin-top: 14px;
    }

    .catalog-filters__header {
        margin-bottom: 0;
    }

    /* Table — mobile card view */
    .catalog-table thead {
        display: none;
    }

    .catalog-table,
    .catalog-table tbody,
    .catalog-table tr {
        display: block;
    }

    .catalog-table tr {
        padding: 14px;
        border-bottom: 1px solid var(--c-border);
        display: grid;
        grid-template-columns: 70px 1fr;
        grid-template-rows: auto auto;
        gap: 8px 14px;
    }

    .catalog-table__td--photo {
        grid-row: 1 / 3;
        padding: 0;
    }

    .catalog-table__td--name {
        padding: 0;
        grid-column: 2;
    }

    .catalog-table__td--specs {
        display: none;
    }

    .catalog-table__td--price {
        padding: 0;
        grid-column: 2;
    }

    .catalog-table__td--stock {
        grid-column: 1 / -1;
        padding: 4px 0 0;
    }

    .catalog-table__td--action {
        grid-column: 1 / -1;
        padding: 4px 0 0;
    }

    .catalog-table__cart-btn {
        width: 100%;
        justify-content: center;
    }

    /* Subcats */
    .catalog-subcats__tag {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* Related */
    .catalog-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* SEO text */
    .catalog-seo__box {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .catalog-header__title {
        font-size: 19px;
    }

    .catalog-header__meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .catalog-filters__grid {
        grid-template-columns: 1fr;
    }

    .catalog-table tr {
        grid-template-columns: 56px 1fr;
    }

    .catalog-table__img {
        width: 56px;
        height: 56px;
    }

    .catalog-table__no-img {
        width: 56px;
        height: 56px;
    }

    .catalog-table__price {
        font-size: 15px;
    }

    .catalog-table__cart-btn span {
        display: none;
    }

    .catalog-related__grid {
        grid-template-columns: 1fr;
    }

    .catalog-subcats__tag {
        padding: 7px 12px;
        font-size: 12px;
    }
}


/* =============================================================
   SEO-ОПИСАНИЕ ПОД ТОВАРАМИ (красивое оформление)
   ============================================================= */

.catalog-seo {
    padding: 40px 0 20px;
}

.catalog-seo__box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 32px 36px;
    box-shadow: 0 2px 12px rgba(0,0,0,.04);
}

.catalog-seo__text.prose h2 {
    font-size: 22px;
    color: #212b62;
    margin: 28px 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8a530;
    display: block;
    width: 100%;
    clear: both;
}

.catalog-seo__text.prose h2:first-child {
    margin-top: 0;
}

.catalog-seo__text.prose h3 {
    font-size: 18px;
    color: #212b62;
    margin: 22px 0 10px;
}

.catalog-seo__text.prose p {
    margin-bottom: 14px;
    line-height: 1.75;
    color: #444;
}

/* Блок преимуществ с иконками */
.seo-features { margin: 28px 0; }
.seo-features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.seo-features__card {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 12px;
    padding: 22px 18px;
    text-align: center;
    transition: border-color .2s, box-shadow .2s;
}
.seo-features__card:hover {
    border-color: #212b62;
    box-shadow: 0 4px 16px rgba(33,43,98,.1);
}
.seo-features__icon { font-size: 34px; margin-bottom: 10px; }
.seo-features__title {
    font-weight: 700;
    color: #212b62;
    margin-bottom: 6px;
    font-size: 15px;
}
.seo-features__text {
    font-size: 13px;
    color: #666;
    line-height: 1.55;
}

/* Таблица характеристик */
.seo-table-wrap { margin: 28px 0; overflow-x: auto; }
.seo-table-wrap h3 {
    font-size: 18px;
    color: #212b62;
    margin-bottom: 14px;
}
.seo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 10px;
    overflow: hidden;
}
.seo-table th {
    background: #212b62;
    color: #fff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
}
.seo-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #eee;
    color: #444;
}
.seo-table tbody tr:nth-child(even) { background: #fafbfc; }
.seo-table tbody tr:hover { background: #f0f4ff; }

/* Области применения */
.seo-usecases { margin: 28px 0; }
.seo-usecases h3 {
    font-size: 18px;
    color: #212b62;
    margin-bottom: 14px;
}
.seo-usecases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.seo-usecases__item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: border-color .2s;
}
.seo-usecases__item:hover { border-color: #212b62; }
.seo-usecases__icon { font-size: 26px; flex-shrink: 0; margin-top: 2px; }
.seo-usecases__item strong { color: #212b62; display: block; margin-bottom: 4px; font-size: 14px; }
.seo-usecases__item p { font-size: 13px; color: #666; margin: 0; line-height: 1.5; }

/* CTA-блок в описании */
.seo-cta-text {
    margin-top: 28px;
    padding: 26px 28px;
    background: linear-gradient(135deg, #212b62 0%, #191f4a 100%);
    border-radius: 14px;
    color: #fff;
}
.seo-cta-text h3 {
    color: #fff !important;
    margin-bottom: 10px !important;
    border: none !important;
    font-size: 20px;
}
.seo-cta-text p {
    color: rgba(255,255,255,.9) !important;
    line-height: 1.7;
    margin-bottom: 0;
}
.seo-cta-text strong { color: #e8a530; }

/* Мобилка для SEO-блока */
@media (max-width: 768px) {
    .catalog-seo__box { padding: 22px 18px; }
    .seo-features__grid { grid-template-columns: 1fr 1fr; }
    .seo-usecases__grid { grid-template-columns: 1fr; }
    .seo-table { font-size: 13px; }
    .seo-table th, .seo-table td { padding: 9px 10px; }
}

@media (max-width: 480px) {
    .seo-features__grid { grid-template-columns: 1fr; }
    .seo-cta-text { padding: 20px 16px; }
}


/* =============================================================
   КОРНЕВОЙ КАТАЛОГ /catalog/ — поиск, дерево, оформление
   ============================================================= */

/* Поиск */
.catalog-search { padding: 24px 0 8px; }
.catalog-search__box { max-width: 600px; margin: 0 auto; }
.catalog-search__input {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.catalog-search__input:focus {
    border-color: #212b62;
    box-shadow: 0 0 0 4px rgba(33,43,98,.08);
}

/* Дерево категорий */
.catalog-tree { padding: 24px 0 40px; }
.catalog-tree__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.catalog-tree__branch {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 14px;
    padding: 22px 24px;
    transition: border-color .2s, box-shadow .2s;
}
.catalog-tree__branch:hover {
    border-color: #212b62;
    box-shadow: 0 4px 20px rgba(33,43,98,.08);
}
.catalog-tree__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}
.catalog-tree__icon {
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #212b62, #2a3578);
    border-radius: 12px;
    color: #fff;
    flex-shrink: 0;
    font-size: 18px;
    overflow: hidden;
}
.catalog-tree__icon img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.catalog-tree__icon svg { stroke: #fff; }
.catalog-tree__title {
    font-size: 17px;
    font-weight: 700;
    color: #212b62;
    text-decoration: none;
    flex: 1;
    line-height: 1.3;
}
.catalog-tree__title:hover { color: #e8a530; }
.catalog-tree__count {
    background: #e8a530;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

/* Подкатегории */
.catalog-tree__children {
    list-style: none;
    padding: 0;
    margin: 0;
}
.catalog-tree__child {
    margin-bottom: 8px;
}
.catalog-tree__child-link {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    padding: 6px 0 6px 12px;
    border-left: 3px solid #e0e0e0;
    transition: border-color .2s, color .2s;
}
.catalog-tree__child-link:hover {
    border-left-color: #212b62;
    color: #212b62;
}
.catalog-tree__child-count {
    font-weight: 400;
    color: #999;
    font-size: 13px;
}

/* Товары внутри подкатегории */
.catalog-tree__products {
    list-style: none;
    padding: 4px 0 4px 24px;
    margin: 0;
}
.catalog-tree__products li {
    padding: 2px 0;
}
.catalog-tree__products a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    display: block;
    padding: 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.catalog-tree__products a::before {
    content: '→ ';
    color: #ccc;
    font-size: 11px;
}
.catalog-tree__products a:hover {
    color: #212b62;
}
.catalog-tree__products a:hover::before { color: #212b62; }

/* Мобилка */
@media (max-width: 768px) {
    .catalog-tree__grid { grid-template-columns: 1fr; }
    .catalog-tree__branch { padding: 16px 18px; }
    .catalog-search__input { font-size: 15px; padding: 12px 16px; }
}

@media (max-width: 480px) {
    .catalog-tree__grid { gap: 14px; }
    .catalog-tree__title { font-size: 15px; }
    .catalog-tree__child-link { font-size: 13px; }
    .catalog-tree__products { display: none; }
}


/* ===================================================
   RELATED PRODUCTS GRID + PRODUCT CARD
   =================================================== */
.related-products {
    padding: 48px 0;
    background: #f8f9fa;
}
.related-products .section__title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 28px;
}

.related-products__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ── Product Card ── */
.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}
.product-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,.1);
    transform: translateY(-3px);
}

/* Image */
.product-card__image-link {
    display: block;
    text-decoration: none;
}
.product-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
    overflow: hidden;
}
.product-card__image img,
.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}
.product-card:hover .product-card__image img,
.product-card:hover .product-card__img {
    transform: scale(1.04);
}
.product-card__no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
}
.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: .72rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 1;
}
.product-card__badge--stock {
    background: #dcfce7;
    color: #166534;
}

/* Content */
.product-card__content {
    padding: 14px 16px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-card__category {
    font-size: .75rem;
    color: #888;
    display: block;
    margin-bottom: 4px;
}
.product-card__title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}
.product-card__title-link {
    color: #1a1a2e;
    text-decoration: none;
    transition: color .2s;
}
.product-card__title-link:hover {
    color: #f5c518;
}
.product-card__article {
    font-size: .78rem;
    color: #999;
}
.product-card__desc {
    font-size: .82rem;
    color: #666;
    margin: 6px 0 0;
    line-height: 1.4;
}

/* Footer */
.product-card__footer {
    padding: 12px 16px 14px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.product-card__price {
    font-size: .9rem;
}
.product-card__price-from {
    color: #999;
    font-size: .78rem;
}
.product-card__price-value {
    font-weight: 700;
    color: #1a1a2e;
}
.product-card__price-value--request {
    color: #888;
    font-weight: 600;
    font-size: .85rem;
}
.product-card__price-currency {
    font-weight: 700;
    color: #1a1a2e;
}
.product-card__price-unit {
    color: #999;
    font-size: .78rem;
}
.product-card__actions {
    display: flex;
    gap: 8px;
}

/* ── Product card responsive ── */
@media (max-width: 1024px) {
    .related-products__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .related-products__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .related-products { padding: 32px 0; }
}
@media (max-width: 480px) {
    .related-products__grid { grid-template-columns: 1fr; }
    .product-card__footer { flex-direction: column; align-items: flex-start; }
    .product-card__actions { width: 100%; }
    .product-card__actions .btn { flex: 1; justify-content: center; }
}
