/* =========================================================
   single-product.css — кастомный Single Product
========================================================= */

/* =======================================
   ГЛАВНЫЙ КОНТЕЙНЕР
======================================= */

.sp-container {
    width: 1420px;
    margin: 40px auto 0;
    display: grid;
    grid-template-columns: 1fr 628px;
    gap: 40px;
    position: relative;
}

/* Левая колонка */
.sp-left {
    display: flex;
    align-items: flex-start;
}

.sp-block sp-block-size-table {
    display: none;
}

/* ---------- КАСТОМНАЯ ГАЛЕРЕЯ ---------- */

.sp-gallery-wrapper {
    width: 100%;
}

/* Десктоп: миниатюры слева, большое фото справа */
.sp-gallery-container {
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

/* Миниатюры слева (только десктоп) */
.sp-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Кнопка-миниатюра */
.sp-gallery-thumb {
    display: block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
    width: 48px;
    height: 80px;
    overflow: hidden;
}

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

/* Большое фото справа */
.sp-gallery-main {
    width: 700px;
    height: 934px;
    position: relative;
    overflow: hidden;
}

.sp-gallery-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.sp-gallery-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sp-gallery-slide.is-active {
    opacity: 1;
}

.sp-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* вместо cover */
    display: block;
}

/* Точки-слайдер (по центру) — по умолчанию скрыты (для десктопа) */
.sp-gallery-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: none;
    gap: 8px;
}

.sp-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid #fff;
    padding: 0;
    margin: 0;
    cursor: pointer;
    outline: none;
}

.sp-gallery-dot.is-active {
    background: #fff;
}

/* ---------- Избранное поверх фото ---------- */

.sp-fav-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    z-index: 5;
}

.sp-fav-btn img {
    width: 100%;
    height: 100%;
}

.fav-active {
    display: none;
}

.sp-fav-btn.active .fav-default {
    display: none;
}

.sp-fav-btn.active .fav-active {
    display: block;
}

/* ---------- Избранное на десктопе рядом с хлебными крошками ---------- */
.sp-breadcrumbs-desktop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    border-bottom: 1px solid #cdcdcd;
}

.sp-fav-btn-desktop {
    width: 30px;
    height: 27px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
}

.sp-fav-btn-desktop img {
    width: 100%;
    height: 100%;
}

.sp-fav-btn-desktop .fav-active {
    display: none;
}

.sp-fav-btn-desktop.active .fav-default {
    display: none;
}

.sp-fav-btn-desktop.active .fav-active {
    display: block;
}

/* ---------- Правая колонка ---------- */

.sp-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

/* Breadcrumbs только для single-product */
.single-product .breadcrumbs-section {
    position: static !important;
    top: auto !important;
    margin-bottom: 10px;
}

/* Опционально: заголовок товара, если используется */
.sp-title {
    font-size: 30px;
    font-weight: 600;
    margin: 0 0 10px;
}

/* Ряд: Оплата долями + Цена */
.sp-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Кнопка "Оплата долями" — базовый стиль (десктоп) */
.sp-pay-badge {
    min-width: 244px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 5px 11px;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--Base-Gray_02, #CDCDCD);
    color: #000;
}

.sp-pay-badge:hover {
    opacity: 1;
}

.sp-pay-badge-logo {
    height: 20px;
    width: auto;
    display: block;
}

.sp-pay-badge-text {
    white-space: nowrap;
}

/* Цена справа — одна */
.sp-price {
    font-size: 24px;
    font-weight: 500;
    text-align: right;
    white-space: nowrap;
}

/* Базовые блоки 628×112 */
.sp-block {
    width: 628px;
    min-height: 112px;
    padding-top: 20px;
    padding-bottom: 20px;
    border-top: 1px solid #cdcdcd;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp-block-title {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
}

.sp-block-content {
    font-size: 15px;
    line-height: 1.4;
}

/* ---------- РАЗМЕРЫ ---------- */

.sp-block-sizes {
    /* наследует базовые размеры */
}

/* строка: слева "Размер", справа "Таблица размеров" */
.sp-size-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sp-size-table-link {
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    color: #555555;
    text-decoration: underline;
    text-transform: none;
    opacity: 0.9;
}

.sp-size-table-link:hover {
    opacity: 1;
}

.sp-size-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Квадрат 36×36 */
.sp-size-swatch {
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.3);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    opacity: 1;
    padding: 0;
}

/* Выбранный размер */
.sp-size-swatch.is-selected {
    border-color: #000;
}

/* Нет в наличии — крестик поверх, но кликабельно */
.sp-size-swatch.is-out {
    opacity: 0.4;
    position: relative;
}

.sp-size-swatch.is-out::before,
.sp-size-swatch.is-out::after {
    content: "";
    position: absolute;
    width: 140%;
    height: 1px;
    background: #000;
    top: 50%;
    left: -20%;
}

.sp-size-swatch.is-out::before {
    transform: rotate(45deg);
}

.sp-size-swatch.is-out::after {
    transform: rotate(-45deg);
}

/* Подсказки */
.sp-size-empty,
.sp-size-single {
    font-size: 14px;
    opacity: 0.8;
}

/* ---------- Таблица размеров внутри панели ---------- */

.sp-size-table-wrap {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    font-size: 14px;
}

.sp-size-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border: 1px solid var(--Base-Gray_02, #CDCDCD);
}

.sp-size-table th,
.sp-size-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--Base-Gray_02, #CDCDCD);
    text-align: left;
}

.sp-size-table th {
    font-size: 14px;
    text-transform: uppercase;
    background: #f8f8f8;
    font-weight: 600;
}

.sp-size-table tbody tr:nth-child(odd) {
    background: #f8f8f8;
}

.sp-size-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.sp-size-table-note {
    margin-top: 12px;
    font-size: 12px;
    color: #929292;
}

/* Вертикальная линия между "Российский размер" и "Длина стельки" */
.sp-size-table th+th,
.sp-size-table td+td {
    border-left: 1px solid var(--Base-Gray_02, #CDCDCD);
}

/* ---------- Блок действий 628×140 ---------- */

.sp-block-actions {
    min-height: 140px;
    gap: 10px;
}

/* Строка наличия (232×24 по макету) */
.sp-stock-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 2px;
    border-radius: 4px;
    background: #7FFF00;
    font-size: 14px;
    font-weight: 400;
    color: #000;
    width: 280px;
    height: 30px;
}

/* Обёртка кнопок */
.sp-actions-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Скрываем стандартные элементы вариаций Woo */
.sp-block-actions .variations,
.sp-block-actions .variations label,
.sp-block-actions .reset_variations,
.sp-block-actions .woocommerce-variation-description,
.sp-block-actions .woocommerce-variation-price,
.sp-block-actions .woocommerce-variation-availability {
    display: none !important;
}

/* Форма добавления в корзину */
.sp-add-to-cart .cart {
    margin: 0;
}

/* Основная кнопка */
.sp-add-to-cart .single_add_to_cart_button {
    width: 100%;
    height: 48px;
    padding: 0 32px;
    text-align: center;
    border: 1px solid #000;
    background: #000;
    color: #fff;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.8;
}

/* Кол-во в форме */
.sp-add-to-cart .quantity {
    margin-right: 10px;
    display: none !important;
}

/* Вторичная кнопка "Написать менеджеру" */
.sp-btn-secondary {
    width: 100%;
    height: 48px;
    padding: 0 32px;
    border: 1px solid #000;
    background: transparent;
    color: #000;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    opacity: 0.8;
}

/* Hover */
.sp-add-to-cart .single_add_to_cart_button:hover {
    opacity: 1;
}

.sp-btn-secondary:hover {
    background: #000;
    color: #fff;
    opacity: 1;
}

/* ---------- Табы Описание / Доставка / Оплата ---------- */

.sp-info-tabs {
    display: flex;
    gap: 24px;
    margin-top: 20px;
}

.sp-info-tab {
    border: none;
    background: none;
    padding: 0;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
}

.sp-info-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 1px;
    background: #000;
}

/* ---------- Правая панель как модалка с фоном ---------- */

.sp-info-panel {
    position: fixed;
    inset: 0;
    background: #00000099;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    z-index: 4000;
}

.sp-info-panel.is-open {
    display: flex;
}

.sp-info-panel-inner {
    width: 460px;
    height: 100vh;
    padding: 40px 20px;
    background: #fff;
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

/* Хедер модалки */
.sp-block-header {
    width: 420px;
    max-width: 100%;
    height: 56px;
    margin: 0 auto 0;
    padding-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-bottom: 1px solid var(--Base-Gray_02, #CDCDCD);
}

/* Заголовок модалки (ХАРАКТЕРИСТИКИ / ДОСТАВКА / ОПЛАТА / ТАБЛИЦА РАЗМЕРОВ) */
.sp-info-panel-title {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-weight: 400;
    font-style: normal;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #000;
}

/* ОБЩИЕ СТИЛИ ДЛЯ КНОПОК ЗАКРЫТИЯ (36x36) */
.sp-info-panel-close,
.sp-pay-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    z-index: 1;
}

.sp-info-panel-close img,
.sp-pay-modal-close img {
    width: 54%;
    height: 50px;
    margin-top: 48px;
}

.sp-info-panel-section {
    display: none;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
}

.sp-info-panel-section.is-active {
    display: block;
}

/* Текстовые блоки внутри модалок */
.sp-info-section {
    margin-bottom: 24px;
}

.sp-info-section:last-child {
    margin-bottom: 0;
}

.sp-info-block-title {
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0 0 8px;
}

/* Список для Доставки/Оплаты */
.sp-info-list {
    margin: 0;
    padding-left: 18px;
    list-style-type: disc;
}

.sp-info-list li {
    margin-bottom: 4px;
}

/* Таблица ХАРАКТЕРИСТИК */
.sp-attrs-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    border-top: 1px solid var(--Base-Gray_02, #CDCDCD);
    border-bottom: 1px solid var(--Base-Gray_02, #CDCDCD);
    font-size: 14px;
}

.sp-attrs-table tr {
    border-top: 1px solid var(--Base-Gray_02, #CDCDCD);
}

.sp-attrs-table tr:first-child {
    border-top: none;
}

.sp-attr-label,
.sp-attr-value {
    padding: 8px 0;
    vertical-align: top;
}

.sp-attr-label {
    width: 40%;
    font-weight: 600;
}

.sp-attr-value {
    width: 60%;
    font-weight: 400;
}

/* ---------- Модалка "Оплата долями" ---------- */

.sp-pay-modal {
    position: fixed;
    inset: 0;
    background: #00000099;
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 4100;
}

.sp-pay-modal.is-open {
    display: flex;
}

.sp-pay-modal-inner {
    width: 700px;
    height: 740px;
    margin-top: 112px;
    background: #fff;
    padding: 60px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-sizing: border-box;
}

/* Лого Долями сверху */
.sp-pay-modal-logo-wrap {
    text-align: center;
}

.sp-pay-modal-logo {
    height: 32px;
    width: auto;
    display: inline-block;
    margin-bottom: 16px;
}

/* Заголовок по центру */
.sp-pay-modal-title {
    font-family: var(--font-body, inherit);
    font-weight: 400;
    font-style: normal;
    font-size: 32px;
    line-height: 100%;
    text-align: center;
    text-transform: uppercase;
}

/* Подзаголовок */
.sp-pay-modal-subtitle {
    text-align: center;
    font-size: 14px;
    line-height: 1.4;
}

/* Блок графика платежей */
.sp-pay-modal-schedule {
    width: 580px;
    min-height: 138px;
    margin: 0 auto 8px;
    box-sizing: border-box;
}

/* 4 колонки с шагами */
.sp-pay-steps {
    display: flex;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

/* Блок одного платежа */
.sp-pay-step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #808080;
}

.sp-pay-step-percent {
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.sp-pay-step-amount {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.sp-pay-step-label {
    font-size: 12px;
    text-align: center;
}

/* Полоса снизу */
.sp-pay-step-bar {
    margin-top: 6px;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: var(--Base-Gray_02, #CDCDCD);
}

/* Активный платеж */
.sp-pay-step--active {
    color: #000000;
}

.sp-pay-step--active .sp-pay-step-bar {
    background: var(--Accent-Chartreuse, #7FFF00);
}

/* Текст под графиком */
.sp-pay-modal-text {
    font-size: 14px;
    line-height: 1.4;
}

.sp-pay-modal-text p {
    margin: 0 0 6px;
}

/* Примечание с ссылкой */
.sp-pay-modal-note {
    font-size: 13px;
    line-height: 1.4;
}

/* КНОПКА "ЗАКРЫТЬ" В МОДАЛКЕ ОПЛАТЫ */
.sp-pay-modal-btn-close1 {
    width: 580px;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 32px;
    border: 1px solid #000 !important;
    background: #000 !important;
    color: #fff !important;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin: 0 auto;
    margin-top: auto;
    line-height: 46px !important;
    box-sizing: border-box !important;
    display: block !important;
    text-align: center !important;
    text-decoration: none !important;
}

.sp-pay-modal-btn-close1:hover {
    opacity: 0.9 !important;
}

/* ---------- Блоки под товаром ---------- */

.sp-bottom-section {
    width: 1420px;
    margin: 120px auto 0;
}

.sp-bottom-title {
    font-family: var(--font-body, inherit);
    font-weight: 400;
    font-style: normal;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0;
    text-transform: uppercase;
    margin: 0 0 32px;
}

.sp-bottom-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0px;
    margin-bottom: 120px;
}

.sp-bottom-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sp-bottom-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.sp-bottom-name {
    font-size: 14px;
}

.sp-bottom-price {
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Мобильные/планшетные хлебные крошки (контейнер) ---------- */

.sp-breadcrumbs-mobile {
    display: none;
}

/* =========================================================
   АДАПТИВ
========================================================= */

/* <= 1439px: растягиваем контейнеры на всю ширину */
@media (max-width: 1439px) {
    .sp-container {
        width: 100%;
        padding: 0 16px;
        grid-template-columns: minmax(0, 1fr);
    }

    .sp-block,
    .sp-block-actions,
    .sp-block-sizes {
        width: 100%;
    }

    .sp-bottom-section {
        width: 100%;
        padding: 0 16px;
    }

    .sp-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sp-info-panel-inner {
        width: 80%;
    }

    .sp-pay-modal-inner {
        width: 100%;
        max-width: 700px;
    }
}

/* ПЛАНШЕТ + МОБИЛКА до 1024px */
@media (max-width: 1024px) {

    /* общий контейнер: галерея сверху, контент ниже */
    .sp-container {
        width: 100%;
        margin: 0 auto 40px;
        padding: 0;
        display: block;
    }

    .sp-left,
    .sp-right {
        width: 100%;
    }

    /* галерея */
    .sp-gallery-container {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

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

    .sp-gallery-main {
        width: 100%;
        max-width: 900px;
        height: auto;
    }

    .sp-gallery-slides,
    .sp-gallery-slide,
    .sp-gallery-slide img {
        height: auto;
    }

    /* на планшет/мобилу — один активный слайд, не absolute */
    .sp-gallery-slide {
        position: relative;
        display: none;
        opacity: 0;
    }

    .sp-gallery-slide.is-active {
        display: block;
        opacity: 1;
    }

    /* Точки включаем и делаем квадратными:
       неактивные — белые, активная — чёрная */
    .sp-gallery-dots {
        display: flex;
    }

    .sp-gallery-dot {
        width: 8px;
        height: 8px;
        border-radius: 0;
        background: #ffffff;
        border: 0px solid #000000;
        opacity: 1;
    }

    .sp-gallery-dot.is-active {
        background: #000000;
    }

    /* избранное ближе к краю */
    .sp-fav-btn {
        top: 12px;
        right: 12px;
    }

    /* правая колонка — блок под картинкой */
    .sp-right {
        padding: 16px;
        box-sizing: border-box;
        gap: 16px;
    }

    .sp-title {
        font-size: 22px;
        line-height: 1.2;
    }

    /* Ряд оплата/цена — на всю ширину */
    .sp-top-row {
        width: 100%;
        box-sizing: border-box;
        height: 46px;
        margin: 0 0 10px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .sp-pay-badge {
        width: 250px;
        height: 42px;
        gap: 4px;
        padding: 9px 14px;
        border-width: 1px;
        justify-content: flex-start;
        font-size: 12px;
    }

    .sp-price {
        text-align: right;
        font-size: 18px;
        white-space: nowrap;
    }

    .sp-block,
    .sp-block-actions,
    .sp-block-sizes {
        width: 100%;
        border-left: none;
        border-right: none;
        border-top: none;
    }

    .sp-bottom-section {
        width: 100%;
        padding: 0 16px;
        margin-top: 80px;
    }

    .sp-bottom-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0px;
    }

    .sp-info-panel-inner {
        width: 100%;
    }

    .sp-pay-modal-inner {
        width: 100%;
        margin-top: 100px;
        padding: 32px 16px;
        height: auto;
    }

    .sp-pay-modal-schedule,
    .sp-pay-modal-btn-close1 {
        width: 100%;
    }

    /* Хлебные крошки: отдельный блок для мобилы/планшета */
    .sp-breadcrumbs-mobile {
        display: block;
        padding: 0 0px 20px;
        box-sizing: border-box;
    }

    .sp-info-panel-title {
        font-family: var(--font-body, 'Roboto', sans-serif);
        font-weight: 400;
        font-style: normal;
        font-size: 28px;
        line-height: 100%;
        letter-spacing: 0;
        text-transform: uppercase;
        color: #000;
    }

    .sp-breadcrumbs-mobile .breadcrumbs-section {
        position: static;
        height: auto;
        top: auto;
        margin: 0;
    }

    /* прячем десктопные крошки внутри правой колонки */
    .sp-right .sp-breadcrumbs-desktop {
        display: none;
    }

    /* Кнопки закрытия — те же 36x36, только ближе к краю */
    .sp-info-panel-close,
    .sp-pay-modal-close {
        top: 16px;
        right: 16px;
    }
}

/* ТЕЛЕФОНЫ: модалка "Оплата долями" на полный экран */
@media (max-width: 768px) {

    .sp-pay-modal {
        align-items: stretch;
        justify-content: center;
    }

    .sp-pay-modal-inner {
        width: 100%;
        height: 100vh;
        margin-top: 0;
        padding: 24px 16px;
        border-radius: 0;
        box-sizing: border-box;
    }

    .sp-pay-modal-schedule,
    .sp-pay-modal-btn-close1 {
        width: 100%;
    }
}

/* Доп. правки по блокам */

/* у блока "Размер" — только верхняя линия, снизу нет */
.sp-block-sizes {
    border-bottom: none;
}

/* у блока с наличием/кнопками:
   сверху ОДНА линия (перед зелёной плашкой),
   снизу линии нет */
.sp-block-actions {
    border-top: 1px solid #cdcdcd;
    border-bottom: none;
}

/* Прячем сердечко поверх фото на сингле (оставляем только справа в хлебных крошках) */
.sp-fav-btn {
    display: none !important;
}

/* -------- ХАРАКТЕРИСТИКИ / ОПИСАНИЕ В ПРАВОЙ ПАНЕЛИ -------- */

.sp-char-section {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    font-family: var(--font-body, 'Roboto', sans-serif);
    font-size: 14px;
}

.sp-char-block+.sp-char-block {
    margin-top: 24px;
}

.sp-char-subtitle {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.sp-char-text p {
    margin: 0 0 8px;
}

/* Таблица характеристик */

.sp-char-table {
    width: 100%;
    border-collapse: collapse;
}

.sp-char-table th,
.sp-char-table td {
    padding: 10px 0;
    font-size: 14px;
    font-weight: 400;
    text-align: left;
    vertical-align: top;
}

.sp-char-table th {
    width: 42%;
}

.sp-char-table tr+tr th,
.sp-char-table tr+tr td {
    border-top: 1px solid var(--Base-Gray_02, #CDCDCD);
}

/* Доставка */

.sp-delivery-item+.sp-delivery-item {
    margin-top: 16px;
}

.sp-delivery-title {
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.sp-delivery-text {
    font-size: 14px;
}

/* Оплата */

.sp-payment-list {
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
}

.sp-payment-list li {
    position: relative;
    padding-left: 14px;
    margin-bottom: 4px;
}

.sp-payment-list li::before {
    content: "—";
    position: absolute;
    left: 0;
    top: 0;
}

/* Крестики 36×36 везде */

.sp-info-panel-close,
.sp-pay-modal-close {
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
}

.sp-preorder-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    /* по умолчанию скрыта */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.sp-preorder-modal.is-open {
    display: flex;
    /* показываем, когда есть класс is-open */
}

.sp-preorder-modal-inner {
    width: min(420px, 100% - 40px);
    max-height: 90vh;
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px 28px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
    position: relative;
    overflow-y: auto;
}

/* Кнопка закрытия */
.sp-preorder-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
}

/* Заголовок / текст / поля */
.sp-preorder-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.sp-preorder-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 16px;
}

.sp-preorder-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.sp-preorder-form input {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 0 12px;
    font-size: 14px;
}

.sp-preorder-submit {
    width: 100%;
    height: 48px;
    border-radius: 999px;
    border: none;
    background: #000;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.sp-preorder-msg {
    font-size: 13px;
    margin-top: 4px;
}

.sp-preorder-success {
    text-align: center;
    padding-top: 10px;
}

.sp-preorder-success img {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.sp-preorder-success-text {
    font-size: 14px;
}

.sp-defect-badge {
    position: absolute;
    z-index: 1000;
    background: #000;
    color: #FF003C;
    font-family: var(--font-body, 'Roboto', sans-serif);
    padding-top: 2px;
    padding-left: 6px;
    padding-right: 6px;
}

.sp-magic-text {
    background: #fff;
    padding: 20px;
    color: #000;
    font-family: var(--font-body, 'Roboto', sans-serif);
}

.ubei-cvg-variants {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    /* Запрещаем перенос на новую строку */
    overflow-x: auto;
    /* Добавляем горизонтальный скролл если не помещается */
    gap: 15px;
    /* Расстояние между элементами */
    padding-bottom: 10px;
    /* Отступ для скролла */
    -webkit-overflow-scrolling: touch;
    /* Плавный скролл на мобильных */
}

/* Сами строки вариантов */
.sp-color-variant-row {
    flex: 0 0 auto;
    /* Не растягиваем, не сжимаем, автоширина */
    width: 150px;
    /* Фиксированная ширина или min-width */
    min-width: 150px;
    /* Минимальная ширина */
}

/* Альтернатива: если хотите равномерное распределение */
.ubei-cvg-variants.sp-color-variant-row {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    /* или space-between для равномерного распределения */
}

.sp-color-variant-row {
    flex: 1;
    /* Равномерное распределение пространства */
    min-width: 150px;
    max-width: 200px;
    /* Ограничение максимальной ширины */
}

a.added_to_cart.wc-forward,
.woocommerce-message a.wc-forward,
.woocommerce-notices-wrapper a.wc-forward,
.woocommerce-message .button.wc-forward,
.woocommerce-notices-wrapper .button.wc-forward {
    display: none !important;
}