/**
 * VIKEO — Страница товара (product-single.css)
 * Подключается только на is_product() страницах.
 * Mobile-first: базовые стили для мобайла, @media для десктопа.
 */

/* ═══════════════════════════════════════════════════════════════════
   ОБЁРТКИ СТРАНИЦЫ
   ═══════════════════════════════════════════════════════════════════ */

/* sp-page живёт внутри <main px-4 py-3> из header.php — не дублируем padding/max-width */
.sp-page {
    padding-bottom: 3rem;
}

/* ═══════════════════════════════════════════════════════════════════
   ХЛЕБНЫЕ КРОШКИ
   ═══════════════════════════════════════════════════════════════════ */

.sp-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0;
    margin-bottom: 1.25rem;
}

.sp-breadcrumbs__nav {
    flex: 1;
    min-width: 0;
}

.sp-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.8125rem;
    color: #8f8fa3;
}

.sp-breadcrumbs__item a {
    color: #8f8fa3;
    text-decoration: none;
    transition: color 0.15s;
}

.sp-breadcrumbs__item a:hover {
    color: #e12028;
}

.sp-breadcrumbs__item:last-child a,
.sp-breadcrumbs__item:last-child span {
    color: #111827;
    font-weight: 500;
    pointer-events: none;
}

.sp-breadcrumbs__sep {
    color: #c4c4d4;
    font-size: 0.75rem;
}

.sp-breadcrumbs__back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

.sp-breadcrumbs__back:hover {
    border-color: #e12028;
    color: #e12028;
}

.sp-breadcrumbs__actions {
    /* Меняй это значение, чтобы изменить размер иконок */
    --icon-size: 24px;
    
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.sp-breadcrumbs__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
    padding: 0;
}

/* Применение размера к иконкам внутри кнопок */
.sp-breadcrumbs__action-btn svg,
.sp-breadcrumbs__action-btn img,
.sp-breadcrumbs__action-btn i {
    width: var(--icon-size);
    height: var(--icon-size);
}

.sp-breadcrumbs__action-btn:hover {
    border-color: #e12028;
    color: #e12028;
}

.sp-breadcrumbs__action-btn.is-copied {
    border-color: #16a34a;
    color: #16a34a;
}

.sp-breadcrumbs__icon-copied {
    display: none;
}

.sp-breadcrumbs__action-btn.is-copied .sp-breadcrumbs__icon-default {
    display: none;
}

.sp-breadcrumbs__action-btn.is-copied .sp-breadcrumbs__icon-copied {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   ОСНОВНОЙ БЛОК: ГРИД [ГАЛЕРЕЯ | SUMMARY | PRICE-BOX]
   ═══════════════════════════════════════════════════════════════════ */

.sp-main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (min-width: 768px) {
    .sp-main {
        grid-template-columns: 480px 1fr;
        grid-template-rows: auto auto;
    }

    .sp-col-gallery {
        grid-row: 1 / 2;
    }

    .sp-col-summary {
        grid-column: 2;
        grid-row: 1;
    }

    .sp-col-price {
        grid-column: 2;
        grid-row: 2;
    }
}

@media (min-width: 1024px) {
    .sp-main {
        grid-template-columns: 600px 1fr 330px;
        grid-template-rows: auto;
        align-items: start;
    }

    .sp-col-gallery {
        grid-column: 1;
        grid-row: 1;
    }

    .sp-col-summary {
        grid-column: 2;
        grid-row: 1;
    }

    .sp-col-price {
        grid-column: 3;
        grid-row: 1;
        /* Растягиваем колонку до высоты ряда — даёт sticky price-box место для скролла. */
        align-self: stretch;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ГАЛЕРЕЯ ТОВАРА
   ═══════════════════════════════════════════════════════════════════ */

.sp-gallery {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

@media (min-width: 768px) {
    /* Галерея переходит в блок; высоту задаёт только главное фото */
    .sp-gallery {
        display: block;
        padding-left: calc(88px + 0.5rem);
    }
}

/* Вертикальная лента миниатюр (скрыта на мобайле) */
.sp-gallery__thumbs {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    /* Миниатюры вынесены из потока — не влияют на высоту галереи */
    .sp-gallery__thumbs {
        position: absolute;
        top: 0;
        left: 0;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 88px;
        height: 100%;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .sp-gallery__thumbs::-webkit-scrollbar {
        display: none;
    }
}

.sp-gallery__thumb {
    width: 88px;
    aspect-ratio: 3 / 4;
    height: auto;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #fff;
    transition: border-color 0.15s;
    flex-shrink: 0;
}

.sp-gallery__thumb:hover,
.sp-gallery__thumb.is-active {
    border-color: #e12028;
}

.sp-gallery__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Кнопка прокрутки миниатюр */
.sp-gallery__thumbs-btn {
    display: none;
}

@media (min-width: 768px) {
    .sp-gallery__thumbs-btn {
        display: flex;
        position: absolute;
        left: 44px; /* центр колонки миниатюр (88px / 2) */
        transform: translateX(-50%);
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        border: 0px solid #e5e7eb;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        color: #374151;
        transition: color 0.15s, background 0.15s, border-color 0.15s;
    }
    
    .sp-gallery__thumbs-btn--up {
        top: 0.25rem;
    }
    
    .sp-gallery__thumbs-btn--down {
        bottom: 0.25rem;
    }
    
    .sp-gallery__thumbs-btn:hover {
        color: #e12028;
        background: #fff;
        border-color: #e12028;
    }
}


/* Главное фото */
.sp-gallery__main-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 1rem;
    background: #fff;
    aspect-ratio: 3 / 4;
    box-shadow: 0 0 0 1.5px #e5e7eb;
}

.sp-gallery__slides {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease;
    will-change: transform;
}

.sp-gallery__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.sp-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Стрелки навигации */
.sp-gallery__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, border-color 0.15s;
    z-index: 2;
}

.sp-gallery__main-wrap:hover .sp-gallery__arrow {
    opacity: 1;
}

.sp-gallery__arrow--prev { left: 0.5rem; }
.sp-gallery__arrow--next { right: 0.5rem; }

.sp-gallery__arrow.is-hidden {
    opacity: 0 !important;
    pointer-events: none;
}

.sp-gallery__arrow:hover {
    border-color: #e12028;
    color: #e12028;
}

/* Модальное окно галереи */
.sp-gallery__modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-gallery__modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.sp-gallery__modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    width: 2.85rem;
    height: 2.85rem;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    padding: 0;
}

.sp-gallery__modal-close:hover {
    color: #111827;
}

.sp-gallery__modal-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: none;
    color: #111827;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
    padding: 0;
}

.sp-gallery__modal-arrow:hover {
    color: #e12028;
}

.sp-gallery__modal-arrow--prev {
    left: 1rem;
}

.sp-gallery__modal-arrow--next {
    right: 1rem;
}

.sp-gallery__modal-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    height: calc(100vh - 24px);
    padding: 0 1rem;
    box-sizing: border-box;
}

.sp-gallery__modal-body {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-gallery__modal-thumbs {
    display: none;
}

@media (min-width: 768px) {
    .sp-gallery__modal-thumbs {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        width: 88px;
        flex-shrink: 0;
        max-height: 100%;
        overflow-y: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        align-self: center;
    }

    .sp-gallery__modal-thumbs::-webkit-scrollbar {
        display: none;
    }
}

.sp-gallery__modal-thumb {
    width: 88px;
    aspect-ratio: 3 / 4;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    background: #fff;
    transition: border-color 0.15s;
    flex-shrink: 0;
}

.sp-gallery__modal-thumb:hover,
.sp-gallery__modal-thumb.is-active {
    border-color: #e12028;
}

.sp-gallery__modal-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-gallery__modal-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-gallery__modal-img {
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Точки (только на мобайле) */
.sp-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .sp-gallery__dots {
        display: none;
    }
}

.sp-gallery__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.sp-gallery__dot.is-active {
    background: #e12028;
    transform: scale(1.4);
}

/* ═══════════════════════════════════════════════════════════════════
   SUMMARY (ЗАГОЛОВОК, РЕЙТИНГ, ВАРИАЦИИ, ХАРАКТЕРИСТИКИ)
   ═══════════════════════════════════════════════════════════════════ */

.sp-summary {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Заголовок */
.sp-summary__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}

.sp-summary__brand {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: 100%;
}

.sp-summary__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 0;
    flex: 1;
}

@media (min-width: 768px) {
    .sp-summary__title {
        font-size: 1.25rem;
    }
}

.sp-summary__badge-discount,
.sp-summary__badge-sale {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2em 0.5em;
    border-radius: 0.375rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.sp-summary__badge-discount {
    background: #fee2e2;
    color: #e12028;
}

.sp-summary__badge-sale {
    background: #fef3c7;
    color: #b45309;
}

/* Рейтинг */
.sp-summary__rating {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.sp-summary__ask-question {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: 0.5rem;
    color: #8f8fa3;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.15s;
    white-space: nowrap;
}

.sp-summary__ask-question:hover {
    color: #374151;
}

.sp-summary__rating-star {
    color: #f59e0b;
    font-size: 1rem;
    line-height: 1;
}

.sp-summary__rating-value {
    font-weight: 600;
    color: #111827;
}

.sp-summary__rating-count {
    color: #6b7280;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s;
}

.sp-summary__rating-count:hover {
    color: #e12028;
    text-decoration: none;
}

/* Карусель товаров серии в центральной колонке */
.sp-summary__tag-carousel {
    margin: 0.25rem 0;
}

.sp-summary__tag-track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
}

.sp-summary__tag-track::-webkit-scrollbar {
    display: none;
}

.sp-summary__tag-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: block;
    width: 60px;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s;
}

.sp-summary__tag-item:hover {
    border-color: #e12028;
}

.sp-summary__tag-img {
    width: 60px;
    height: 80px; /* соотношение 3:4 (60x80) */
    object-fit: cover;
    display: block;
}

/* Краткое описание */
.sp-summary__short-desc {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.6;
}

.sp-summary__short-desc p {
    margin: 0;
}

/* Вариации */
.sp-summary__variations {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.sp-summary__variation-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sp-summary__variation-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.sp-summary__variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.sp-summary__variation-btn {
    padding: 0.375rem 0.875rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 1.5rem;
    background: #fff;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.sp-summary__variation-btn:hover {
    border-color: #e12028;
    color: #e12028;
}

.sp-summary__variation-btn.is-active {
    border-color: #e12028;
    background: #e12028;
    color: #fff;
}

/* Характеристики */
.sp-summary__attributes {
    padding-top: 0.25rem;
}

.sp-summary__attributes-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.75rem;
}

.sp-summary__attributes-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.sp-summary__attribute-row {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 0.25rem 0;
    font-size: 0.875rem;
    overflow: hidden;
}

.sp-summary__attribute-label {
    color: #8f8fa3;
    flex-shrink: 0;
    white-space: nowrap;
    padding-right: 0.35rem;
}

.sp-summary__attribute-dots {
    flex: 1;
    min-width: 1rem;
    border-bottom: 1px dotted #d1d5db;
    margin-bottom: 0.2em;
}

.sp-summary__attribute-value {
    color: #242429;
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
    text-align: right;
    padding-left: 0.35rem;
}

.sp-summary__details-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.875rem;
    padding: 0.3rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.875rem;
    color: #242429;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
}

.sp-summary__details-btn:hover {
    border-color: #e12028;
    color: #e12028;
}

/* ═══════════════════════════════════════════════════════════════════
   DRAWER (ШТОРКА ХАРАКТЕРИСТИКИ И ОПИСАНИЕ)
   ═══════════════════════════════════════════════════════════════════ */

.sp-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.sp-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: all;
}

.sp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 520px;
    max-width: 92vw;
    background: #fff;
    z-index: 999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}

.sp-drawer.is-open {
    transform: translateX(0);
}

.sp-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.375rem 1.375rem;
    border-bottom: 0px solid #f3f4f6;
    flex-shrink: 0;
}

.sp-drawer__title {
    font-size: 1.40rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.sp-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #6b7280;
    border-radius: 0.5rem;
    transition: background 0.15s, color 0.15s;
}

.sp-drawer__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.sp-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 1.25rem 1rem;
    -webkit-overflow-scrolling: touch;
}

.sp-drawer__group-title {
    margin: 1.75rem 0 0.5rem;
    padding-bottom: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.sp-drawer__group-title:first-child {
    margin-top: 0;
}

.sp-drawer__list {
    margin: 0;
    padding: 0;
}

.sp-drawer__row {
    display: flex;
    align-items: baseline;
    gap: 0;
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.sp-drawer__label {
    color: #6b7280;
    flex-shrink: 0;
    white-space: nowrap;
    padding-right: 0.35rem;
}

.sp-drawer__dots {
    flex: 1;
    min-width: 0.75rem;
    border-bottom: 1px dotted #d1d5db;
    margin-bottom: 0.2em;
}

.sp-drawer__value {
    color: #111827;
    font-weight: 500;
    margin: 0;
    /* Без flex-shrink: 0 + min-width: 0 → длинное значение переносится по словам, а не уезжает за край */
    min-width: 0;
    text-align: right;
    padding-left: 0.35rem;
    overflow-wrap: anywhere;
}

.sp-drawer__description {
    margin-top: 0;
    padding-top: 0;
    font-size: 0.875rem;
    line-height: 1.65;
    color: #374151;
}

.sp-drawer__footer {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sp-drawer__prices {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.sp-drawer__price {
    font-size: 1.375rem;
    font-weight: 700;
    color: #f44;
}

.sp-drawer__price-old {
    font-size: 0.9rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.sp-drawer__badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #e12028;
    padding: 0.1rem 0.4rem;
    border-radius: 0.375rem;
}

.sp-drawer__actions {
    display: flex;
    gap: 0.625rem;
}

.sp-drawer__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2.875rem;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.sp-drawer__btn:hover {
    opacity: 0.88;
}

.sp-drawer__btn--cart {
    background: #111827;
    color: #fff;
}

.sp-drawer__btn--buy {
    background: #e12028;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   PRICE-BOX (ЦЕНА, КНОПКИ, ДОСТАВКА)
   ═══════════════════════════════════════════════════════════════════ */

.sp-price-box {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    background: #fff;
    /* Убираем border и добавляем мягкую тень */
    border: none; 
    box-shadow: 0 2px 16px 0 rgba(0, 0, 0, 0.08); 
    border-radius: 1rem;
    padding: 1.25rem;
}


@media (min-width: 1024px) {
    .sp-price-box {
        position: sticky;
        /* top = высота sticky-шапки (полоска 24px + header ~72px) + 8px отступа */
        top: 1.25rem;
    }
}

/* Цены */
.sp-price-box__prices {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sp-price-box__price {
    font-size: 1.75rem;
    font-weight: 600;
    color: #e12028;
    line-height: 1;
}

.sp-price-box__price .woocommerce-Price-amount {
    color: inherit;
}

.sp-price-box__price-old {
    font-size: 1rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.sp-price-box__discount-badge {
    font-size: 0.8125rem;
    font-weight: 700;
    background: #fee2e2;
    color: #e12028;
    padding: 0.2em 0.5em;
    border-radius: 0.375rem;
}

/* Кнопки */
.sp-price-box__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3.25rem;
    border-radius: 1rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s, background 0.15s;
    cursor: pointer;
}

.sp-price-box__btn--cart {
    background: #5346ec;
    color: #fff;
}

.sp-price-box__btn--cart:hover {
    opacity: 0.88;
}

.sp-price-box__btn--buy {
    background: #5346ec45;
    color: #5346ec;
    border: 0px solid #5346ec;
}

.sp-price-box__btn--buy:hover {
    background: #5a4cff7a;
}

/* Доставка */
.sp-price-box__delivery {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    padding-top: .5rem;
    font-size: .8rem;
}

.sp-price-box__delivery-icon {
    flex-shrink: 0;
    color: #6b7280;
    margin-top: .125rem;
}

/* Контейнер текста доставки — колонка */
.sp-price-box__delivery-text {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

/* Обёртка первой строки: «Доставим 24 мая в пункт выдачи» */
.sp-price-box__delivery-line {
    display: inline;
}

/* Заголовок: жирный, чёрный */
.sp-price-box__delivery-title {
    display: inline;
    font-weight: 600;
    color: #111827;
}

/* «в пункт выдачи» — инлайн, серый, чуть легче */
.sp-price-box__delivery-pickup {
    display: inline;
    font-weight: 550;
    color: #a0a0ab;
}

/* Гарантия — мелкий серый текст */
.sp-price-box__delivery-note {
    display: block;
    font-size: .75rem;
    color: #9ca3af;
    line-height: normal;
    margin: 0;
    padding: 0;
}



/* ═══════════════════════════════════════════════════════════════════
   ОТЗЫВЫ И ВОПРОСЫ (ТАБЫ)
   ═══════════════════════════════════════════════════════════════════ */

.sp-reviews {
    margin-bottom: 2.5rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    overflow: hidden;
}

/* Табы */
.sp-reviews__tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 1.25rem;
}

.sp-reviews__tab {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 1rem 0;
    margin-right: 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.sp-reviews__tab:hover {
    color: #111827;
}

.sp-reviews__tab.is-active {
    color: #111827;
    font-weight: 600;
    border-bottom-color: #e12028;
}

.sp-reviews__tab-count {
    font-size: 0.8125rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
    padding: 0.125em 0.4em;
    border-radius: 0.375rem;
}

.sp-reviews__tab.is-active .sp-reviews__tab-count {
    background: #fee2e2;
    color: #e12028;
}

/* Панели */
.sp-reviews__panel {
    padding: 1.25rem;
}

.sp-reviews__empty {
    padding: 2rem 0;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9375rem;
}

/* Переопределение стандартных WooCommerce-отзывов */
.sp-reviews__panel #reviews,
.sp-reviews__panel .woocommerce-Reviews {
    padding: 0;
    margin: 0;
}

.sp-reviews__panel #comments {
    margin-bottom: 1.5rem;
}

.sp-reviews__panel .commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sp-reviews__panel .comment_container {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
}

/* Карусель товаров серии внутри блока отзывов */
.sp-reviews__tag-carousel {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.sp-reviews__tag-track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.sp-reviews__tag-track::-webkit-scrollbar {
    display: none;
}

.sp-reviews__tag-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: block;
    width: 72px;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s;
}

.sp-reviews__tag-item:hover {
    border-color: #e12028;
}

.sp-reviews__tag-img {
    width: 72px;
    height: 96px; /* соотношение 3:4 (72x96) */
    object-fit: cover;
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   КАРУСЕЛЬ «СМОТРИТЕ ТАКЖЕ»
   ═══════════════════════════════════════════════════════════════════ */

.sp-related {
    margin-bottom: 2rem;
}

.sp-related__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sp-related__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.sp-related__controls {
    display: flex;
    gap: 0.375rem;
}

.sp-related__arrow {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    color: #374151;
}

.sp-related__arrow:hover:not(:disabled) {
    border-color: #e12028;
    color: #e12028;
}

.sp-related__arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.sp-related__track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Скрываем полосу прокрутки, но оставляем функциональность */
    scrollbar-width: none;
}

.sp-related__track::-webkit-scrollbar {
    display: none;
}

.sp-related__list {
    display: flex;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-related__item {
    flex: 0 0 calc(50% - 0.375rem);
    scroll-snap-align: start;
    min-width: 0;
}

@media (min-width: 640px) {
    .sp-related__item {
        flex: 0 0 calc(33.333% - 0.5rem);
    }
}

@media (min-width: 1024px) {
    .sp-related__item {
        flex: 0 0 calc(20% - 0.6rem);
    }
}

@media (min-width: 1280px) {
    .sp-related__item {
        flex: 0 0 calc(16.666% - 0.625rem);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   КАРУСЕЛЬ ТОВАРОВ ПО ТЕГУ (миниатюры)
   ═══════════════════════════════════════════════════════════════════ */

.sp-tag-products {
    margin-bottom: 2rem;
}

.sp-tag-products__head {
    margin-bottom: 0.875rem;
}

.sp-tag-products__title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.sp-tag-products__tag-name {
    color: #e12028;
}

.sp-tag-products__scroll-wrap {
    position: relative;
}

.sp-tag-products__track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
}

.sp-tag-products__track::-webkit-scrollbar {
    display: none;
}

.sp-tag-products__item {
    flex: 0 0 88px;
    scroll-snap-align: start;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.sp-tag-products__thumb {
    position: relative;
    width: 88px;
    height: 88px;
    border: 1.5px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s;
    flex-shrink: 0;
}

.sp-tag-products__item:hover .sp-tag-products__thumb {
    border-color: #e12028;
}

.sp-tag-products__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sp-tag-products__badge {
    position: absolute;
    bottom: 0.25rem;
    left: 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    background: #e12028;
    color: #fff;
    padding: 0.1em 0.35em;
    border-radius: 0.25rem;
}

.sp-tag-products__name {
    font-size: 0.75rem;
    color: #374151;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sp-tag-products__price {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #e12028;
}

.sp-tag-products__arrow {
    display: none;
}

@media (min-width: 768px) {
    .sp-tag-products__item {
        flex: 0 0 96px;
    }

    .sp-tag-products__thumb {
        width: 96px;
        height: 96px;
    }

    .sp-tag-products__arrow {
        display: flex;
        position: absolute;
        top: calc(48px - 1.125rem);
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 50%;
        border: 1.5px solid #e5e7eb;
        background: rgba(255, 255, 255, 0.95);
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: border-color 0.15s, color 0.15s, opacity 0.15s;
        color: #374151;
        z-index: 2;
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

    .sp-tag-products__arrow--prev { left: -1.25rem; }
    .sp-tag-products__arrow--next { right: -1.25rem; }

    .sp-tag-products__arrow:hover {
        border-color: #e12028;
        color: #e12028;
    }

    .sp-tag-products__arrow.is-hidden {
        opacity: 0;
        pointer-events: none;
    }

    .sp-tag-products__scroll-wrap {
        padding: 0 1.5rem;
    }
}

/* [x-cloak] скрывает Alpine-элементы до инициализации */
[x-cloak] {
    display: none !important;
}
