/* ==========================================================================
   SECTION PAGE — CSS для посадочных страниц разделов каталога
   Файл: css/section_page.css
   Префикс: sp- (section page)
   ========================================================================== */

/* --- 1. Хлебные крошки --- */
.sp-breadcrumbs {
    padding: 16px 0 12px;
}

.sp-breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.sp-breadcrumbs ol li {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #888;
}

.sp-breadcrumbs ol li a {
    color: #555;
    text-decoration: none;
}

.sp-breadcrumbs ol li a:hover {
    color: #A61221;
    text-decoration: underline;
}

.sp-breadcrumbs ol li + li::before {
    content: "\2192";
    margin-right: 4px;
    color: #aaa;
}

.sp-breadcrumbs ol li.active {
    color: #333;
    font-weight: 600;
}

/* --- 2. Баннер раздела (внутри .container) --- */
.sp-banner {
    position: relative;
    width: 100%;
    height: 398px;
    background-color: #2F2424;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 32px;
}

.sp-banner__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(47, 36, 36, 0.88) 0%, rgba(47, 36, 36, 0.5) 60%, rgba(47, 36, 36, 0.2) 100%);
    display: flex;
    align-items: center;
    padding: 32px 40px;
}

.sp-banner__content {
    max-width: 550px;
}

.sp-banner__title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 36px;
    line-height: 44px;
    color: #FFFFFF;
    margin: 0 0 12px 0;
}

.sp-banner__desc {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 26px;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-align: justify;
}

/* --- 3. Карточки подразделов --- */
.sp-cards {
    margin-bottom: 48px;
}

.sp-cards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.sp-cards__item {
    display: block;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sp-cards__item:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.sp-cards__img-wrap {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #F5F5F5;
}

.sp-cards__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sp-cards__item:hover .sp-cards__img {
    transform: scale(1.05);
}

.sp-cards__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E8E8E8, #D0D0D0);
}

.sp-cards__info {
    padding: 16px 20px 20px;
}

.sp-cards__name {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 18px;
    line-height: 24px;
    color: #2F2424;
    margin: 0 0 6px 0;
}

.sp-cards__count {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #888;
}

.sp-cards__price {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 22px;
    color: #A61221;
}

/* --- 3a-mod. Карточки — модификатор для товарных фото (contain) --- */
.sp-cards--contain .sp-cards__img-wrap {
    background: #FFFFFF;
    padding: 12px 12px 0;
}

.sp-cards--contain .sp-cards__img {
    object-fit: contain;
    border-radius: 6px;
}

/* --- 3b. Карточки подразделов — компактные (5 в ряд) --- */
.sp-cards-sm {
    margin-bottom: 48px;
}

.sp-cards-sm__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.sp-cards-sm__item {
    display: block;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sp-cards-sm__item:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.sp-cards-sm__img-wrap {
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: #FFFFFF;
    padding: 8px 8px 0;
}

.sp-cards-sm__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

.sp-cards-sm__item:hover .sp-cards-sm__img {
    transform: scale(1.05);
}

.sp-cards-sm__img-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #E8E8E8, #D0D0D0);
}

.sp-cards-sm__info {
    padding: 10px 12px 14px;
}

.sp-cards-sm__name {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 18px;
    color: #2F2424;
    margin: 0 0 4px 0;
}

.sp-cards-sm__count {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #888;
}

/* --- 4. SEO-текст --- */
.sp-seo {
    margin-bottom: 48px;
    padding: 32px 0;
    border-top: 1px solid #E8E8E8;
}

.sp-seo__title {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 36px;
    color: #2F2424;
    margin: 0 0 20px 0;
}

.sp-seo__text {
    font-family: 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 26px;
    color: #555;
}

.sp-seo__text p {
    margin: 0 0 16px 0;
}

.sp-seo__text p:last-child {
    margin-bottom: 0;
}

/* --- 5. Адаптив --- */

/* Планшет */
@media (max-width: 992px) {
    .sp-banner {
        height: 340px;
    }

    .sp-banner__overlay {
        padding: 24px 28px;
    }

    .sp-banner__title {
        font-size: 30px;
        line-height: 36px;
    }

    .sp-banner__desc {
        font-size: 15px;
        line-height: 23px;
    }

    .sp-cards-sm__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .sp-cards__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Мобильный */
@media (max-width: 576px) {
    .sp-banner {
        height: 300px;
        margin-bottom: 20px;
    }

    .sp-banner__overlay {
        padding: 20px;
    }

    .sp-banner__title {
        font-size: 24px;
        line-height: 30px;
        margin-bottom: 8px;
    }

    .sp-banner__desc {
        font-size: 14px;
        line-height: 21px;
    }

    .sp-cards-sm__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .sp-cards-sm__img-wrap {
        height: 110px;
    }

    .sp-cards-sm__info {
        padding: 8px 10px 10px;
    }

    .sp-cards-sm__name {
        font-size: 13px;
        line-height: 16px;
    }

    .sp-cards {
        margin-bottom: 32px;
    }

    .sp-cards__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .sp-cards__img-wrap {
        height: 160px;
    }

    .sp-cards__info {
        padding: 12px 14px 16px;
    }

    .sp-cards__name {
        font-size: 14px;
        line-height: 20px;
    }

    .sp-cards__count {
        font-size: 12px;
    }

    .sp-seo {
        margin-bottom: 32px;
        padding: 24px 0;
    }

    .sp-seo__title {
        font-size: 22px;
        line-height: 28px;
    }

    .sp-seo__text {
        font-size: 14px;
        line-height: 22px;
    }
}

/* ==========================================================================
   6. Карточки товаров mp-products — переопределение для section pages
   На главной карточки 374px (3 шт. без wrap), здесь много товаров → wrap + 3 в ряд
   ========================================================================== */
.mp-products {
    margin-top: 32px;
}

.mp-products__grid {
    flex-wrap: wrap;
}

.mp-products__card {
    width: calc(33.333% - 17px);
    min-width: 0;
}

/* Планшет — 2 в ряд */
@media (max-width: 991px) {
    .mp-products__card {
        width: calc(50% - 13px);
    }
}

/* Мобильный — 1 в ряд */
@media (max-width: 576px) {
    .mp-products__card {
        width: 100%;
    }
}
