/* Конфигуратор санузла: слева сцена (план / 3D), справа компактная панель; на мобильных — друг под другом */
.bathcfg {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
    color: var(--color-whte, #fff);
}

/* Сцена: в 3D — светлая студия, на плане — «бумага» с сеткой (рисует SVG) */
/* Липкая колонка, высота сцены и плашка итога — общие (configurator-kit/kit.css: .cfg-view, .cfg-stage, .cfg-deal) */
.bathcfg__stage {
    border-radius: 32px;
    overflow: hidden;
    background: linear-gradient(180deg, #e3e7eb 0%, #eef0f2 60%, #f6f7f8 100%);
    border: 1px solid rgba(0, 0, 0, .06);
}

.bathcfg__stage.is-plan {
    background: #f5f6f7;
}

/* Вечер: тёмная студия */
.bathcfg__stage.is-night:not(.is-plan) {
    background: linear-gradient(180deg, #14171c 0%, #1b1f25 60%, #22262d 100%);
}

.bathcfg__stage.is-night:not(.is-plan) .bathcfg__hint {
    color: rgba(255, 255, 255, .6);
}

.bathcfg__stage canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
    cursor: grab;
    touch-action: none;
}

.bathcfg__stage canvas:active {
    cursor: grabbing;
}

.bathcfg__plan {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    touch-action: none;
    user-select: none;
    font-family: inherit;
}

.bathcfg__stage.is-plan .bathcfg__plan {
    display: block;
}

.bathcfg__stage.is-plan canvas {
    visibility: hidden;
}

.bathcfg__v {
    cursor: grab;
    transition: r .15s;
}

.bathcfg__v:hover {
    filter: drop-shadow(0 0 4px rgba(79, 125, 51, .6));
}

.bathcfg__mid {
    cursor: copy;
    opacity: .75;
}

.bathcfg__mid:hover {
    opacity: 1;
}

.bathcfg__plan.is-dragging,
.bathcfg__plan.is-dragging * {
    cursor: grabbing;
}

/* Курсоры плана — с !important и повышенной специфичностью: сайт глушит курсоры кастомным (site-cursor.css) */
html.has-site-cursor .bathcfg__plan .bathcfg__v,
html.has-site-cursor .bathcfg__plan .bathcfg__v * {
    cursor: grab !important;
}

html.has-site-cursor .bathcfg__plan .bathcfg__mid,
html.has-site-cursor .bathcfg__plan .bathcfg__mid * {
    cursor: copy !important;
}

html.has-site-cursor .bathcfg__plan.is-dragging,
html.has-site-cursor .bathcfg__plan.is-dragging * {
    cursor: grabbing !important;
}

.bathcfg__item,
.bathcfg__area-shape {
    cursor: grab;
}

.bathcfg__h {
    cursor: grab;
}

.bathcfg__h--move {
    cursor: move;
}

.bathcfg__plan.is-drawing,
.bathcfg__plan.is-drawing * {
    cursor: crosshair;
}

html.has-site-cursor .bathcfg__plan .bathcfg__item,
html.has-site-cursor .bathcfg__plan .bathcfg__item *,
html.has-site-cursor .bathcfg__plan .bathcfg__area-shape,
html.has-site-cursor .bathcfg__plan .bathcfg__h {
    cursor: grab !important;
}

html.has-site-cursor .bathcfg__plan .bathcfg__h--move {
    cursor: move !important;
}

html.has-site-cursor .bathcfg__plan.is-drawing,
html.has-site-cursor .bathcfg__plan.is-drawing * {
    cursor: crosshair !important;
}

.bathcfg__loader {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    background: #f5f6f7;
    transition: opacity .4s;
}

.bathcfg__loader span {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, .1);
    border-top-color: var(--color-alt, #97bf74);
    animation: bathcfg-spin 1s linear infinite;
}

@keyframes bathcfg-spin {
    to { transform: rotate(360deg); }
}

.bathcfg--ready .bathcfg__loader {
    opacity: 0;
    pointer-events: none;
}

.bathcfg__nogl {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 5;
    place-items: center;
    padding: 24px;
    text-align: center;
    color: #2d3a24;
}

.bathcfg--nogl .bathcfg__nogl {
    display: grid;
}

/* Панель инструментов на сцене */
.bathcfg__tools {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bathcfg--nogl .bathcfg__tools {
    display: none;
}

.bathcfg__tool {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: rgba(29, 31, 29, .78);
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background .2s, color .2s, opacity .2s;
}

.bathcfg__tool:hover:not(:disabled) {
    background: #1d1f1d;
}

.bathcfg__tool.is-active,
.bathcfg__tool.is-active:hover:not(:disabled) {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

/* Ракурс: слои — вид сверху, «Сатурн» — идёт презентация */
.bathcfg__tool--view .bathcfg__icon-saturn,
.bathcfg__tool--view.is-tour .bathcfg__icon-layers {
    display: none;
}

.bathcfg__tool--view.is-tour .bathcfg__icon-saturn {
    display: block;
}

/* День/вечер: одна иконка — куда переключит (днём луна, вечером солнце) */
.bathcfg__tool--night .bathcfg__icon-sun,
.bathcfg__tool--night[aria-pressed="true"] .bathcfg__icon-moon {
    display: none;
}

.bathcfg__tool--night[aria-pressed="true"] .bathcfg__icon-sun {
    display: block;
}

.bathcfg__tool:disabled {
    opacity: .3;
    cursor: default;
}

.bathcfg__mode {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(29, 31, 29, .78);
    backdrop-filter: blur(6px);
}

.bathcfg__mode button {
    min-width: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.bathcfg__mode button.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__hint {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;
    z-index: 2;
    font-size: 13px;
    color: rgba(40, 44, 50, .62);
    pointer-events: none;
}

.bathcfg__hint[hidden] {
    display: none;
}

/* Панель */
.bathcfg__panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: #1d1f1d;
}

.bathcfg__group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bathcfg__label {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--color-alt, #97bf74);
}

.bathcfg__label output {
    color: var(--color-whte, #fff);
}

.bathcfg__meta {
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
}

.bathcfg__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bathcfg__split {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
}

.bathcfg__split > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Плитки «иконка + подпись» */
.bathcfg__tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.bathcfg__tiles--4 {
    grid-template-columns: repeat(4, 1fr);
}

.bathcfg__tiles--5 {
    grid-template-columns: repeat(5, 1fr);
}

/* Типы покрытия — плитки фиксированной ширины (подпись переносится) одной строкой, что не влезло — листается */
.bathcfg__tiles--fixed {
    display: flex;
    margin: -2px;
    padding: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.bathcfg__tiles--fixed::-webkit-scrollbar {
    display: none;
}

.bathcfg__tiles--fixed .bathcfg__tile {
    flex: 0 0 80px;
    width: 80px;
    scroll-snap-align: start;
}

.bathcfg__tiles--fixed .bathcfg__tile svg {
    width: 34px;
    height: 28px;
}

.bathcfg__tiles--fixed .bathcfg__tile small {
    white-space: normal;
    text-align: center;
}

.bathcfg__tiles--5 .bathcfg__tile svg {
    width: 34px;
    height: 28px;
}

.bathcfg__tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 4px 7px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s;
}

.bathcfg__tile svg {
    width: 40px;
    height: 32px;
}

.bathcfg__tile small {
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: .75;
}

.bathcfg__tile:hover {
    border-color: var(--color-alt, #97bf74);
}

.bathcfg__tile.is-active {
    background: var(--color-alt, #97bf74);
    border-color: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__tile.is-active small {
    opacity: 1;
}

/* Сегменты */
.bathcfg__seg {
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
}

.bathcfg__opt {
    flex: 1 1 auto;
    padding: 7px 11px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.bathcfg__opt:hover {
    background: rgba(255, 255, 255, .08);
}

.bathcfg__opt.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__range {
    width: 100%;
    height: 30px;
    margin: 0;
    accent-color: var(--color-alt, #97bf74);
    cursor: pointer;
}

.bathcfg__area {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Столешница: ползунок ширины и кнопки глубины в одну строку */
.bathcfg__wd {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bathcfg__wd .bathcfg__range {
    flex: 1;
    min-width: 0;
}

.bathcfg__wd .bathcfg__seg {
    flex: none;
}

/* Цвета */
.bathcfg__swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bathcfg__swatch {
    width: 26px;
    height: 26px;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sw);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), inset -3px -5px 7px rgba(0, 0, 0, .3);
    outline: 2px solid transparent;
    outline-offset: 2px;
    cursor: pointer;
    transition: outline-color .2s, transform .15s;
}

.bathcfg__swatch--wood {
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 4px),
        var(--sw);
}

.bathcfg__swatch:hover {
    transform: scale(1.1);
}

.bathcfg__swatch.is-active {
    outline-color: var(--color-alt, #97bf74);
}

/* Кнопка «+» (карточки каталога) */
.bathcfg__addons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bathcfg__addon {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 5px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .15);
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color .2s;
}

.bathcfg__addon:hover {
    border-color: var(--color-alt, #97bf74);
}

.bathcfg__addon.is-shake {
    animation: bathcfg-shake .35s;
}

@keyframes bathcfg-shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.bathcfg__plus {
    position: relative;
    width: 20px;
    height: 20px;
    flex: none;
    border-radius: 50%;
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__plus::before,
.bathcfg__plus::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 9px;
    height: 2px;
    margin: -1px 0 0 -4.5px;
    border-radius: 1px;
    background: currentColor;
}

.bathcfg__plus::after {
    transform: rotate(90deg);
}

.bathcfg__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    white-space: nowrap;
}

.bathcfg__chip.is-bad {
    opacity: .5;
    text-decoration: line-through;
}

.bathcfg__chip button {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.bathcfg__chip button:hover {
    background: #c8453b;
}

/* Название выбранного цвета — только в окне на телефоне */
.bathcfg__swatch-name {
    display: none;
}

/* Смета: материалы из той же раскладки, что 3D */
.bathcfg__spec {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    margin: 0;
    font-size: 13px;
}

.bathcfg__spec dt {
    color: rgba(255, 255, 255, .6);
}

.bathcfg__spec dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Низ широкой сцены занят плашкой итога — подсказка уходит наверх, влево от инструментов */
@container (min-width: 900px) {
    .bathcfg__hint {
        top: 24px;
        bottom: auto;
        right: 330px;
        line-height: 1.35;
    }
}

@media (max-width: 1024px) {
    .bathcfg {
        grid-template-columns: 1fr;
    }
}

/* Телефон: сцена, кнопки разделов и итог — в один экран; панель — окном поверх кнопок (kit.css: .cfg-panel) */
@media (max-width: 600px) {
    .bathcfg__stage {
        border-radius: 20px;
    }

    /* В окне: плитки и кружки — одной строкой от края до края (листаются свайпом), кружки крупнее */
    .bathcfg__panel .bathcfg__tile:not(.bathcfg__tiles--fixed > *) {
        width: 96px;
    }

    .bathcfg__panel .bathcfg__swatches {
        gap: 12px;
        margin-block: -9px;
        padding-block: 9px;
    }

    .bathcfg__panel .bathcfg__swatch {
        width: 52px;
        height: 52px;
        outline-offset: 3px;
    }

    .bathcfg__tools {
        top: 10px;
        right: 10px;
        gap: 4px;
    }

    .bathcfg__tool {
        width: 36px;
        height: 36px;
    }

    .bathcfg__hint {
        display: none;
    }

    .bathcfg__split {
        grid-template-columns: 1fr;
    }
}





/* Заголовок группы с переключателем или выпадающим фильтром справа (как у декоров стола) */
.bathcfg__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.bathcfg__seg--small .bathcfg__opt {
    padding: 5px 10px;
    font-size: 12px;
}

.bathcfg__opt:disabled {
    opacity: .35;
    cursor: default;
}

.bathcfg__opt:disabled:hover {
    background: transparent;
}

.bathcfg__seg--wide {
    width: 100%;
}

/* Ванна или душевая и «Изменить» — одной строкой над выбранным изделием */
.bathcfg__bathbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bathcfg__bathbar[hidden] {
    display: none;
}

.bathcfg__filter {
    flex: 1 1 auto;
    min-width: 0;
}

.bathcfg__bathbar .bathcfg__change {
    flex: none;
    height: 40px;
    padding: 0 16px 0 12px;
}

.bathcfg__bathbar .bathcfg__change[hidden] {
    display: none;
}

.bathcfg__change.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__swatch[hidden],
.bathcfg__card[hidden] {
    display: none !important;
}

/* Каталог: карточки «снимок + название» в один ряд, что не влезло — листается свайпом */
.bathcfg__cards {
    display: flex;
    gap: 8px;
    margin: -2px;
    padding: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.bathcfg__cards::-webkit-scrollbar {
    display: none;
}

/* Стрелка прокрутки каталога — на середине снимка (kit.css: .cfg-arrow) */
.cfg-rail:has(> .bathcfg__cards) {
    --cfg-arrow-top: 26px;
}

.bathcfg__card {
    flex: 0 0 104px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    min-width: 0;
    text-align: left;
    scroll-snap-align: start;
    cursor: pointer;
}

.bathcfg__card-img {
    position: relative;
    display: block;
    aspect-ratio: 6 / 5;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #c8ccd4, #d9dce2 60%, #cfd2d8);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
    transition: box-shadow .2s;
}

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

.bathcfg__card-img img[hidden] {
    display: none;
}

.bathcfg__card-img .bathcfg__plus {
    position: absolute;
    right: 6px;
    bottom: 6px;
    background: rgba(29, 31, 29, .75);
    color: #fff;
}

.bathcfg__card-name {
    /* Две строки у всех карточек — высота одинаковая; длинное слово переносится, а не раздвигает карточку */
    min-height: 2.4em;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.bathcfg__card:hover .bathcfg__card-img {
    box-shadow: inset 0 0 0 2px var(--color-alt, #97bf74);
}

.bathcfg__card:hover .bathcfg__plus {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__card.is-shake {
    animation: bathcfg-shake .35s;
}

@keyframes bathcfg-shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Выбранный на плане экземпляр */
.bathcfg__pick {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
}

.bathcfg__pick-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
}

.bathcfg__pick-head > span {
    display: flex;
    gap: 4px;
}

.bathcfg__iconbtn {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.bathcfg__iconbtn:hover {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__iconbtn--del:hover {
    background: #c8453b;
    color: #fff;
}

.bathcfg__note {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, .55);
}

/* Стены для плитки: «Все стены» и буквы, как на плане */
.bathcfg__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bathcfg__chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 4px 4px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
    transition: background .2s;
}

.bathcfg__chip:hover {
    background: rgba(255, 255, 255, .14);
}

.bathcfg__chip.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__chip-sw {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--sw);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.bathcfg__chip button {
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.bathcfg__chip button:hover {
    background: #c8453b;
    color: #fff;
}

.bathcfg__row[hidden],
.bathcfg__area[hidden] {
    display: none;
}

@media (max-width: 600px) {
    .bathcfg__panel .bathcfg__card {
        flex-basis: 112px;
    }

    /* Шапка раздела с фильтром — левее крестика окна */
    .bathcfg__panel .bathcfg__head {
        padding-right: 44px;
    }

    .bathcfg__panel .bathcfg__head [data-cfg-title] {
        padding-right: 0;
    }

}

/* 3D: над изделием — «рука», пока тащим — «сжатая рука» */
.bathcfg__stage.is-grab canvas,
html.has-site-cursor .bathcfg__stage.is-grab canvas {
    cursor: grab !important;
}

.bathcfg__stage.is-grabbing canvas,
html.has-site-cursor .bathcfg__stage.is-grabbing canvas {
    cursor: grabbing !important;
}

/* ----- Санузел ----- */

/* План: стены (выбор и сдвиг), буквы стен, дверь, изделия */
.bathcfg__wall,
.bathcfg__letter {
    cursor: pointer;
}

.bathcfg__wall:hover {
    fill: #4b6f98;
}

.bathcfg__letter:hover circle {
    stroke: #2f7fd8;
}

.bathcfg__door,
.bathcfg__item {
    cursor: grab;
}

html.has-site-cursor .bathcfg__plan .bathcfg__wall,
html.has-site-cursor .bathcfg__plan .bathcfg__letter *,
html.has-site-cursor .bathcfg__plan .bathcfg__door *,
html.has-site-cursor .bathcfg__plan .bathcfg__item * {
    cursor: pointer !important;
}

/* Плашка над выбранным изделием в 3D */
.bathcfg__badge {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 12px;
    border-radius: 999px;
    background: rgba(29, 31, 29, .88);
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    pointer-events: auto;
    will-change: transform;
}

.bathcfg__badge[hidden] {
    display: none;
}

.bathcfg__badge b {
    font-weight: 500;
    margin-right: 4px;
}

.bathcfg__badge button {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: inherit;
    cursor: pointer;
}

.bathcfg__badge button[hidden] {
    display: none;
}

.bathcfg__badge button:hover {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__badge button[data-bath-badge-del]:hover {
    background: #c8453b;
    color: #fff;
}

/* Плитка: карточки с превью текстуры */
.bathcfg__tiles--tex .bathcfg__tile {
    padding: 6px 6px 8px;
}

.bathcfg__tiles--tex .bathcfg__tile img {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}

.bathcfg__tile:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* Цвет плитки: основной и второй (прожилки, вкрапления) */
.bathcfg__swatch[style*="--sw2"] {
    background: linear-gradient(135deg, var(--sw) 0 58%, var(--sw2) 58% 64%, var(--sw) 64%);
}

.bathcfg__swatch--glass {
    background: linear-gradient(135deg, var(--sw), rgba(255, 255, 255, .6) 55%, var(--sw));
}

.bathcfg__swatches--small .bathcfg__swatch {
    width: 22px;
    height: 22px;
}

.bathcfg__chip {
    border: 0;
    color: inherit;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 6px 12px;
}

.bathcfg__chip.is-own:not(.is-active) {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}

.bathcfg__link {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-alt, #97bf74);
    font: inherit;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.bathcfg__link[hidden],
.bathcfg__chips[hidden] {
    display: none;
}

/* Настройки выбранного изделия */
.bathcfg__seg--wrap {
    flex-wrap: wrap;
}

/* До четырёх коротких вариантов (размеры ванны, экран, смеситель) — одной строкой, поровну */
.bathcfg__seg--row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
}

.bathcfg__seg--row .bathcfg__opt {
    padding-inline: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bathcfg__seg--wrap .bathcfg__opt {
    flex: 1 0 auto;
}

.bathcfg__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--sw);
    vertical-align: -1px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}

.bathcfg__pick-head b {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-weight: 600;
}

.bathcfg__pick-head small {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-alt, #97bf74);
}

.bathcfg__addon {
    white-space: normal;
    text-align: left;
}

.bathcfg__addon small {
    opacity: .55;
}

.bathcfg__addon .bathcfg__plus {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    transition: transform .2s, background .2s;
}

.bathcfg__addon.is-active {
    border-color: var(--color-alt, #97bf74);
}

.bathcfg__addon.is-active .bathcfg__plus {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
    transform: rotate(45deg);
}

.bathcfg__picked.is-flash .bathcfg__pick,
[data-bath-open-box].is-flash .bathcfg__pick,
[data-bath-cab].is-flash .bathcfg__pick {
    animation: bathcfg-flash .9s;
}

@keyframes bathcfg-flash {
    0%, 100% { box-shadow: none; }
    30% { box-shadow: 0 0 0 2px var(--color-alt, #97bf74); }
}

/* Проверка проекта */
.bathcfg__warn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    line-height: 1.35;
}

.bathcfg__warn li {
    position: relative;
    padding-left: 18px;
    color: #f0b2aa;
}

.bathcfg__warn li::before {
    content: "!";
    position: absolute;
    left: 0;
    top: 1px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #c8453b;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
}

.bathcfg__warn button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: underline dotted;
    cursor: pointer;
}

.bathcfg__ok {
    margin: 0;
    padding-left: 18px;
    font-size: 12px;
    line-height: 1.35;
    color: var(--color-alt, #97bf74);
    background: no-repeat 0 2px / 13px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2397bf74' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E");
}

@media (max-width: 600px) {
    .bathcfg__badge {
        font-size: 11px;
    }
}

/* Двери, окна, радиаторы: кнопки «+» со счётчиком */
.bathcfg__tile--add {
    position: relative;
}

.bathcfg__tile--add i {
    position: absolute;
    top: 5px;
    right: 7px;
    min-width: 16px;
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--color-alt, #97bf74);
}

.bathcfg__tile.is-shake {
    animation: bathcfg-shake .35s;
}

.bathcfg__opair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bathcfg__oseg {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Каталог места и «Изменить» */
.bathcfg__catalog {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bathcfg__catalog[hidden],
.bathcfg__picked[hidden],
.bathcfg__addcab[hidden] {
    display: none;
}

.bathcfg__card.is-active .bathcfg__card-img {
    box-shadow: inset 0 0 0 2px var(--color-alt, #97bf74);
}

.bathcfg__change {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 12px 0 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.bathcfg__change:hover {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

/* Смеситель и душевая система — блок внутри настроек изделия */
.bathcfg__part {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.bathcfg__part-head {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.bathcfg__part-head small {
    font-size: 12px;
    font-weight: 400;
    color: var(--color-alt, #97bf74);
}

.bathcfg__seg--num .bathcfg__opt {
    flex: 1 0 44px;
    padding-inline: 6px;
}

.bathcfg__opt--ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.bathcfg__opt--ico svg {
    flex: none;
}

/* Пенал — кнопка с картинкой рядом с раковиной */
.bathcfg__addcab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px 6px 6px;
    border: 1px dashed rgba(255, 255, 255, .25);
    border-radius: 16px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .2s;
}

.bathcfg__addcab:hover {
    border-color: var(--color-alt, #97bf74);
}

.bathcfg__addcab img {
    width: 72px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.bathcfg__addcab img[hidden] {
    display: block;
    visibility: hidden;
    background: #dfe9ec;
}

.bathcfg__addcab span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
}

.bathcfg__addcab small {
    font-size: 11px;
    opacity: .6;
}

/* Стекло: матовое и рифлёное */
.bathcfg__swatch--frost {
    background: radial-gradient(circle at 35% 35%, #fff, var(--sw) 60%);
}

.bathcfg__swatch--flute {
    background: repeating-linear-gradient(90deg, var(--sw) 0 3px, #fff 3px 5px);
}

/* Карточки плитки прячутся скриптом (узорные 20×20 — только у пола) */
.bathcfg__tile[hidden] { display: none; }

/* Цвет двери: круг оттенков (к центру — белее), справа текущий цвет и яркость */
.bathcfg__color {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bathcfg__wheel {
    position: relative;
    flex: none;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    cursor: crosshair;
    touch-action: none;
}

.bathcfg__wheel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(closest-side, #fff, rgba(255, 255, 255, 0)),
        conic-gradient(red, #ff0, lime, cyan, blue, #f0f, red);
    filter: brightness(var(--v, 1));
}

.bathcfg__wheel i {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .5);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.bathcfg__color-side {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.bathcfg__color-now {
    width: 100%;
    height: 26px;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

/* Места санузла (ванна/душ, унитаз, раковина): свёрнуты до шапки, развёрнуто одно */
[data-bath-picked] .bathcfg__pick-head {
    cursor: pointer;
}

.bathcfg__iconbtn.is-active {
    background: var(--color-alt, #97bf74);
    color: #1d1f1d;
}

.bathcfg__pick--empty {
    align-items: flex-start;
}

.bathcfg__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bathcfg__body[hidden],
[data-bath-tiles-seg][hidden] {
    display: none;
}

[data-bath-tiles-head] .bathcfg__pick-head,
[data-bath-open-box] .bathcfg__pick-head {
    cursor: pointer;
}

/* Цвет металла сцены — кружки под отделкой, название выбранного — под ними */
.bathcfg__metal {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
}

.bathcfg__metal-name {
    font-size: 12px;
    color: rgba(255, 255, 255, .6);
}

.bathcfg__metal-name b {
    font-weight: 500;
    color: #fff;
}

/* Брашированный металл — продольные штрихи */
.bathcfg__swatch--brushed {
    background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .14) 0 1px, transparent 1px 3px, rgba(0, 0, 0, .1) 3px 4px), var(--sw);
}

/* Ширина × глубина ограждения — два списка в строку */
.bathcfg__dims {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.bathcfg__select {
    height: 34px;
    min-width: 76px;
    padding: 0 30px 0 14px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%2397bf74' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E") right 12px center no-repeat;
    color: #fff;
    font: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.bathcfg__select:focus-visible {
    outline: 2px solid var(--color-alt, #97bf74);
    outline-offset: 2px;
}

.bathcfg__select option {
    background: #1d1f1d;
    color: #fff;
}

/* Открывание душевой — схемы вместо подписей */
.bathcfg__seg--ico .bathcfg__opt {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
}

.bathcfg__seg--ico svg {
    display: block;
    width: 46px;
    height: 32px;
}

.bathcfg__optname {
    margin-left: 4px;
    color: #fff;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}
