/* Первый экран карточки товара (hero-нео). Вынесено из template-parts/product/product-hero.php 11.10.2026: печаталось инлайном на каждой странице с этим блоком.
   Подключается <link> на том же месте шаблона — порядок каскада прежний. */

/* ==========================================================================
   Hero — нео (21.07.2026, утв. прототип): белая ценовая плита, плашка
   минимальной цены, опции-конфигуратор, живой сток из CRM.
   ========================================================================== */

/* Снят с поставок: архивная плашка (теперь на белой плите) */
.nt-discontinued-block .nt-discontinued-label {
    font-size: 24px;
    font-weight: 900;
    color: #000;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}
.nt-discontinued-block .nt-discontinued-text {
    font-size: 14px;
    color: #6F7580;
    margin-top: 8px;
    line-height: 1.55;
}
.nt-discontinued-block .nt-discontinued-link {
    display: inline-block;
    margin-top: 14px;
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000 !important;
    text-decoration: none !important;
    border-bottom: none !important;
    transition: color 0.15s ease;
}
.nt-discontinued-block .nt-discontinued-link:hover { color: #2C3DF5 !important; }

/* Тайтл — чёрный: щит от кита Elementor (красит h1 в navy) */
.nt-product-info .nt-product-title {
    color: #000 !important;
    font-weight: 900;
    font-size: clamp(24px, 2.2vw, 30px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 14px;
}

/* Сток-строка: тихий Unbounded caps, без зелёных точек (запрет системы) */
.nt-product-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nt-product-meta .nt-stock-status {
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #000;
}

/* Лейбл над ценой («Цена» / «Итого с опциями») */
.price-caption {
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6F7580;
    margin-bottom: 6px;
}

/* Строка цены: большая цифра + приписка «+ опции» рядом */
.price-main-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.price-addon-note {
    font-size: 13.5px;
    font-weight: 700;
    color: #2C3DF5;
    white-space: nowrap;
}

/* Старая цена + экономия — одна строка-пара (не space-between из базы) */
.price-header {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.price-header .old-price {
    flex: none;
}

.price-header .savings-text {
    font-size: 13.5px;
    color: #6F7580;
    font-weight: 500;
}

.price-header .savings-text strong {
    color: #000;
    font-weight: 700;
    font-size: 14px;
}

/* Markup/overpayment info line */
.installment-markup {
    font-size: 12.5px !important;
    color: #6F7580 !important;
    font-weight: 500 !important;
    margin-top: 4px !important;
    margin-bottom: 8px !important;
    font-family: var(--font-family-montserrat), 'Montserrat', sans-serif !important;
}

/* Toggle/All links — hidden/shown by JS via classes */
#installment-toggle.hidden {
    display: none !important;
}
#installment-all {
    display: none !important;
}
#installment-all.visible {
    display: inline-flex !important;
}

/* Сноска «Открыть подробные условия» — читается ссылкой, не кнопкой */
.nt-terms-note {
    align-items: center !important;
    gap: 6px !important;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #6F7580 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px;
    background: none !important;
    border: none !important;
    padding: 4px 0 !important;
    transition: color 0.15s ease !important;
}
.nt-terms-note:hover {
    color: #2C3DF5 !important;
    background: none !important;
}
.nt-terms-note svg { flex-shrink: 0; }

/* Ссылки рассрочки — Unbounded caps без коробок и стрелок */
.installment-info .installment-link-white {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 10.5px !important;
    font-weight: 400 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #000 !important;
    text-decoration: none !important;
    padding: 6px 0 !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    transition: color 0.15s ease !important;
    backdrop-filter: none !important;
    transform: none !important;
}

.installment-info .installment-link-white:visited,
.installment-info .installment-link-white:active {
    color: #000 !important;
    background: none !important;
}

.installment-info .installment-link-white:hover {
    background: none !important;
    border: none !important;
    color: #2C3DF5 !important;
    transform: none !important;
}

/* CTA в ценовой плите — синяя нео-кнопка во всю ширину */
.nt-plate-cta {
    display: block;
    width: 100%;
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #fff !important;
    background: #2C3DF5 !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: 4px 4px 0 0 #000 !important;
    padding: 15px 26px !important;
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.nt-plate-cta:hover {
    background: #1B2ACF !important;
    color: #fff !important;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 0 #000 !important;
}

/* Опции к аппарату — нео-чипы (утв. прототип) */
.nt-addons {
    margin: 18px 0 4px;
}
.nt-addons__label {
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 10px;
}
.nt-addon-chip {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: #FFFFFF;
    border: 2px solid #000;
    border-radius: 0;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    transition: background 0.13s ease, border-color 0.13s ease;
}
.nt-addon-chip + .nt-addon-chip {
    margin-top: 10px;
}
.nt-addon-chip:hover {
    background: #EEF0FF;
    box-shadow: none;
}
.nt-addon-chip--on {
    background: #EEF0FF;
    border-color: #2C3DF5;
}
.nt-addon-chip .nt-addon-check {
    display: none;
}
.nt-addon-chip__box {
    width: 22px;
    height: 22px;
    border: 2px solid #000;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.13s ease, border-color 0.13s ease;
}
.nt-addon-chip--on .nt-addon-chip__box {
    background: #2C3DF5;
    border-color: #2C3DF5;
}
.nt-addon-chip__box::after {
    content: "";
    width: 8px;
    height: 8px;
    background: #fff;
    opacity: 0;
    transition: opacity 0.13s ease;
}
.nt-addon-chip--on .nt-addon-chip__box::after {
    opacity: 1;
}
.nt-addon-chip__img {
    width: 54px;
    height: 54px;
    border-radius: 0;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
}
.nt-addon-chip__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}
.nt-addon-chip__name {
    font-size: 14.5px;
    font-weight: 700;
    color: #000;
    line-height: 1.3;
}
.nt-addon-chip__sub {
    font-size: 12px;
    color: #6F7580;
    line-height: 1.35;
}
.nt-addon-chip__sub a {
    color: #6F7580 !important;
    text-decoration: underline;
    border-bottom: none !important;
}
.nt-addon-chip__price {
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 13px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
}
.nt-addon-chip--on .nt-addon-chip__price {
    color: #2C3DF5;
}

/* Итог в точке действия — только на мобиле (на десктопе плита рядом) */
.nt-addons__total {
    margin-top: 10px;
    font-size: 13.5px;
    color: #16181D;
}
.nt-addons__total b { color: #000; }
@media (min-width: 1025px) {
    .nt-addons__total { display: none !important; }
}

/* Плашка минимальной цены — пунктир: «возможно», не оферта */
.nt-minprice {
    border: 2px dashed #000;
    background: #F7F7F7;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 18px;
    align-items: center;
    margin: 0 0 18px;
}
.nt-minprice__head {
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #000;
}
.nt-minprice__val {
    font-family: 'Montserrat', sans-serif !important;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
    white-space: nowrap;
}
.nt-minprice__note {
    grid-column: 1;
    font-size: 12.5px;
    color: #6F7580;
    line-height: 1.45;
}
.nt-minprice__btn {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-family: 'Unbounded', 'Montserrat', sans-serif !important;
    font-size: 9.5px !important;
    font-weight: 400 !important;
    letter-spacing: 0.07em !important;
    text-transform: uppercase !important;
    color: #000 !important;
    background: #fff !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    box-shadow: 3px 3px 0 0 #000 !important;
    padding: 10px 14px !important;
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.nt-minprice__btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0 0 #000 !important;
    background: #fff !important;
    color: #000 !important;
}
@media (max-width: 640px) {
    .nt-minprice { grid-template-columns: 1fr; }
    .nt-minprice__btn { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* Убираем старые стили для stock-badge и savings-badge внутри price-block */
.price-block .stock-badge {
    display: none !important;
}

.price-block .savings-badge {
    display: none !important;
}

/* ── Мобильная раскладка опции (27.07.2026) ──
   Было: flex-строка из 4 колонок (чекбокс + фото + текст + цена). На 375px
   тексту оставалось ~150px, заголовок ломался на 6 строк, описание шло лентой,
   а картинка терялась. Стало: фото и название сверху, описание во всю ширину,
   цена — отдельной строкой. */
@media (max-width: 768px) {
    .nt-addon-chip {
        display: grid;
        grid-template-columns: 22px 84px minmax(0, 1fr);
        grid-template-areas:
            "box img price"
            "name name name"
            "sub sub sub";
        align-items: start;
        column-gap: 12px;
        row-gap: 10px;
        padding: 14px 12px;
    }
    .nt-addon-chip__box   { grid-area: box; align-self: center; }
    .nt-addon-chip__img   { grid-area: img; width: 84px; height: 84px; }
    /* Обёртка растворяется, чтобы название и описание стали ячейками самого
       чипа: иначе описание — внук и в грид-область не встанет */
    .nt-addon-chip__body  { display: contents; }
    .nt-addon-chip__name  { grid-area: name; font-size: 15.5px; line-height: 1.28; }
    /* Описание — во всю ширину карточки, под фото */
    .nt-addon-chip__sub {
        grid-area: sub;
        font-size: 12.5px;
        line-height: 1.45;
    }
    .nt-addon-chip__price {
        grid-area: price;
        justify-self: end;
        align-self: center;
        font-size: 17px;
        font-weight: 800;
        white-space: nowrap;
    }
}
