/* ==========================================================
   HolstCalc — Калькулятор холстов (ananasposter style)
   Два столбца: загрузка фото слева, настройки справа
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --hc-brown:  #B85C38;
    --hc-light:  #DC8A69;
    --hc-text:   #363636;
    --hc-bg:     #faf7f5;
    --hc-border: rgba(54,54,54,0.14);
    --hc-radius: 30px;
    --hc-font:   'Inter', sans-serif;
    --hc-input:  54px;
}

/* Контейнер как на главной — чтобы отдельная страница конструктора была той же ширины.
   Значения 1:1 с holst_home.css (на главной конфликта нет — то же самое). */
.hl-section { width: 100%; }
.hl-container { max-width: 1360px; margin: 0 auto; padding: 0 32px; }

.hc-section {
    font-family: var(--hc-font);
    background: #fff;
    border-radius: var(--hc-radius);
    overflow: hidden;
    margin: 16px 0;
    box-shadow: 0 2px 32px rgba(54,54,54,0.06);
}

/* Два столбца */
.hc-layout {
    display: flex;
    min-height: 600px;
    align-items: stretch;
}

/* ===== ЛЕВАЯ ПАНЕЛЬ — загрузка фото ===== */
.hc-photo-panel {
    flex: 0 0 58%;
    background: var(--hc-bg);
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(54,54,54,0.07);
}

.hc-dropzone {
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 360px;
}

.hc-dropzone:hover, .hc-dropzone.drag-over { background: #f3ece7; }

/* Idle-состояние */
.hc-idle {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 48px 40px;
    text-align: center;
    transition: opacity 0.25s;
}
.hc-idle.hidden { opacity: 0; pointer-events: none; }

.hc-upload-icon-wrap {
    width: 88px;
    height: 88px;
    background: rgba(184,92,56,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}
.hc-dropzone:hover .hc-upload-icon-wrap { transform: scale(1.07); }

.hc-idle-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--hc-text);
    margin: 0;
}
.hc-idle-sub {
    font-size: 15px;
    color: rgba(54,54,54,0.55);
    margin: 0;
}
.hc-select-btn {
    background: var(--hc-brown);
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 13px 32px;
    font-family: var(--hc-font);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 6px;
}
.hc-select-btn:hover {
    background: #9e4f30;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184,92,56,0.3);
}
.hc-select-btn:active { transform: translateY(0); box-shadow: none; }
.hc-idle-hint {
    font-size: 13px;
    color: rgba(54,54,54,0.4);
    margin: 0;
    max-width: 280px;
    line-height: 1.6;
}

/* Preview-состояние */
.hc-preview {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
.hc-preview.visible { opacity: 1; pointer-events: auto; }

.hc-preview-img-box {
    flex: 1;
    overflow: hidden;
    background: var(--hc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px;            /* отступ вокруг фото, чтобы не было край-в-край */
    box-sizing: border-box;
}
@media (max-width: 560px) { .hc-preview-img-box { padding: 16px; } }
.hc-preview-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}
.hc-preview-bar {
    background: rgba(25,15,8,0.8);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.hc-preview-name {
    flex: 1;
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hc-change-file-btn {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.45);
    color: rgba(255,255,255,0.9);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 13px;
    font-family: var(--hc-font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
    flex-shrink: 0;
}
.hc-change-file-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.7); }

.hc-dpi-warn {
    background: #fff8e1;
    border-top: 1px solid #ffe082;
    padding: 10px 20px;
    font-size: 13px;
    color: #6b4c00;
    text-align: center;
    display: none;
    line-height: 1.5;
}
.hc-dpi-warn.show { display: block; }

[id^="hc-file-input"] { display: none !important; }

/* ===== ПРАВАЯ ПАНЕЛЬ — настройки ===== */
.hc-options-panel {
    flex: 1;
    position: relative;
    z-index: 3;
    overflow: visible;
    display: flex;
    flex-direction: column;
}
.hc-opts-inner {
    padding: 28px 34px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}
.hc-opts-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--hc-text);
    margin: 0;
    letter-spacing: -0.5px;
}

.hc-field { display: flex; flex-direction: column; gap: 6px; }
.hc-label {
    font-size: 12px;
    font-weight: 700;
    color: rgba(54,54,54,0.5);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Размер (два поля + знак) */
.hc-size-row { display: flex; align-items: flex-end; gap: 8px; }
.hc-size-row .hc-field { flex: 1; }
.hc-size-sep {
    font-size: 24px;
    font-weight: 800;
    color: var(--hc-brown);
    padding-bottom: 12px;
    flex-shrink: 0;
    line-height: 1;
}

/* Input */
.hc-input {
    height: var(--hc-input);
    border: 2px solid var(--hc-border);
    border-radius: 14px;
    padding: 0 18px;
    font-family: var(--hc-font);
    font-size: 16px;
    color: var(--hc-text);
    outline: none;
    background: #fff;
    transition: border-color 0.18s, box-shadow 0.18s;
    width: 100%;
    box-sizing: border-box;
    -moz-appearance: textfield;
}
.hc-input::-webkit-outer-spin-button,
.hc-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.hc-input:focus { border-color: var(--hc-brown); box-shadow: 0 0 0 3px rgba(184,92,56,0.12); }
.hc-input::placeholder { color: rgba(54,54,54,0.3); }

/* Select */
.hc-select-wrap { position: relative; }
.hc-select-wrap::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-top: 6px solid var(--hc-brown);
    pointer-events: none;
}
.hc-select {
    height: var(--hc-input);
    border: 2px solid var(--hc-border);
    border-radius: 14px;
    padding: 0 44px 0 18px;
    font-family: var(--hc-font);
    font-size: 15px;
    color: var(--hc-text);
    outline: none;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.hc-select:focus { border-color: var(--hc-brown); box-shadow: 0 0 0 3px rgba(184,92,56,0.12); }

.hc-divider { border: none; border-top: 1px solid rgba(54,54,54,0.07); margin: 2px 0; }

/* Количество */
.hc-qty-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hc-qty-label { font-size: 14px; font-weight: 600; color: rgba(54,54,54,0.6); }
.hc-qty-ctrl {
    display: flex;
    align-items: center;
    border: 2px solid var(--hc-border);
    border-radius: 100px;
    overflow: hidden;
    height: 48px;
    background: #fff;
}
.hc-qty-btn {
    width: 48px;
    height: 48px;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--hc-brown);
    cursor: pointer;
    font-family: var(--hc-font);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
}
.hc-qty-btn:hover { background: rgba(184,92,56,0.08); }
.hc-qty-btn:active { background: rgba(184,92,56,0.16); }
.hc-qty-num {
    width: 54px;
    border: none;
    outline: none;
    text-align: center;
    font-family: var(--hc-font);
    font-size: 18px;
    font-weight: 700;
    color: var(--hc-text);
    background: transparent;
    -moz-appearance: textfield;
}
.hc-qty-num::-webkit-outer-spin-button,
.hc-qty-num::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Цена */
.hc-price-box {
    background: var(--hc-bg);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.hc-price-left { display: flex; flex-direction: column; gap: 4px; }
.hc-price-lbl { font-size: 12px; font-weight: 700; color: rgba(54,54,54,0.45); text-transform: uppercase; letter-spacing: 0.6px; }
.hc-price-val { font-size: 34px; font-weight: 900; color: var(--hc-brown); letter-spacing: -1.5px; line-height: 1; }
.hc-price-per { font-size: 13px; color: rgba(54,54,54,0.45); text-align: right; line-height: 1.5; }

/* Кнопка В корзину */
.hc-add-btn {
    width: 100%;
    height: 58px;
    background: var(--hc-brown);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-family: var(--hc-font);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.hc-add-btn:hover {
    background: #9e4f30;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(184,92,56,0.38);
}
.hc-add-btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(184,92,56,0.2); }
.hc-add-btn:disabled { background: #c8b0a7; cursor: not-allowed; transform: none; box-shadow: none; }

/* Сообщение */
.hc-msg { display: none; padding: 14px 20px; border-radius: 12px; font-size: 15px; font-weight: 500; text-align: center; }
.hc-msg.ok  { display: block; background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.hc-msg.err { display: block; background: #fce4e4; color: #c62828; border: 1px solid #ffcdd2; }

/* ===== Холст в интерьере ===== */
.hc-rooms {
    display: none;
    padding: 14px 18px 16px;
    border-top: 1px solid rgba(54,54,54,0.07);
    background: var(--hc-bg);
}
.hc-rooms.visible { display: block; }
.hc-rooms-title {
    font-size: 12px; font-weight: 700; color: rgba(54,54,54,0.5);
    text-transform: uppercase; letter-spacing: 0.8px; margin: 0 0 12px;
}
.hc-rooms-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hc-room {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-color: #e9ddd5;
}
.hc-room-canvas {
    position: absolute;
    left: var(--wx, 50%);
    top: var(--wy, 30%);
    transform: translate(-50%, -50%);
    width: 14%; height: 20%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.32);
    transition: width 0.25s ease, height 0.25s ease, border 0.2s ease;
}
/* Рамка по цвету выбранной рамы — в интерьере (тонкая) */
.hc-room-canvas.hc-frame-black { border: 5px solid #2b2b2b; box-shadow: 0 5px 16px rgba(0,0,0,0.45); }
.hc-room-canvas.hc-frame-white { border: 5px solid #fff;    box-shadow: 0 0 0 1px rgba(54,54,54,0.18), 0 5px 16px rgba(0,0,0,0.35); }
.hc-room-canvas.hc-frame-wood  { border: 5px solid #9a673c; border-image: linear-gradient(135deg,#c08a57,#7e5230) 1; box-shadow: 0 5px 16px rgba(0,0,0,0.45); }

/* Рамка на основном превью (толще) */
.hc-preview-img-box img { box-sizing: border-box; transition: border 0.2s ease, box-shadow 0.2s ease; }
.hc-preview-img-box img.hc-frame-black { border: 16px solid #2b2b2b; box-shadow: 0 14px 38px rgba(0,0,0,0.3); }
.hc-preview-img-box img.hc-frame-white { border: 16px solid #fff;    box-shadow: 0 0 0 1px rgba(54,54,54,0.18), 0 14px 38px rgba(0,0,0,0.22); }
.hc-preview-img-box img.hc-frame-wood  { border: 16px solid #9a673c; border-image: linear-gradient(135deg,#c08a57,#7e5230) 1; box-shadow: 0 14px 38px rgba(0,0,0,0.3); }

/* ===== Чекбоксы доп.услуг ===== */
.hc-check {
    display: flex; align-items: center; gap: 13px;
    padding: 13px 16px;
    border: 2px solid var(--hc-border);
    border-radius: 14px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: border-color 0.18s, background 0.18s;
}
.hc-check:last-child { margin-bottom: 0; }
.hc-check:hover { border-color: rgba(184,92,56,0.4); }
.hc-check input { position: absolute; opacity: 0; pointer-events: none; }
.hc-check-box {
    width: 22px; height: 22px; flex-shrink: 0;
    border: 2px solid rgba(54,54,54,0.3);
    border-radius: 6px;
    position: relative;
    transition: background 0.18s, border-color 0.18s;
}
.hc-check-box::after {
    content: ''; position: absolute; left: 6px; top: 2px;
    width: 6px; height: 11px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0); transition: transform 0.18s;
}
.hc-check input:checked ~ .hc-check-box { background: var(--hc-brown); border-color: var(--hc-brown); }
.hc-check input:checked ~ .hc-check-box::after { transform: rotate(45deg) scale(1); }
.hc-check:has(input:checked) { border-color: var(--hc-brown); background: rgba(184,92,56,0.05); }
.hc-check-text { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.hc-check-text b { font-size: 15px; font-weight: 600; color: var(--hc-text); }
.hc-check-text small { font-size: 12px; color: rgba(54,54,54,0.5); line-height: 1.3; }
.hc-check-price { font-size: 14px; font-weight: 700; color: var(--hc-brown); white-space: nowrap; flex-shrink: 0; }

/* ===== Размер: пропорции + слайдер ===== */
.hc-lock {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer;
    font-family: var(--hc-font); font-size: 13px; font-weight: 600;
    color: rgba(54,54,54,0.45); padding: 4px 0; transition: color 0.18s;
}
.hc-lock-ico { display: inline-flex; color: rgba(54,54,54,0.4); transition: color 0.18s; }
.hc-lock.active, .hc-lock.active .hc-lock-ico { color: var(--hc-brown); }

/* Строка: пропорции слева + AI-улучшение справа */
.hc-ratio-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; }
.hc-ratio-side { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.hc-ai-toggle {
    position: relative;
    display: inline-flex; align-items: center; gap: 8px;
    cursor: pointer; margin: 0; padding: 4px 0;
    font-family: var(--hc-font); font-size: 13px; font-weight: 600;
    color: rgba(54,54,54,0.45); transition: color 0.18s;
    white-space: nowrap;
}
.hc-ai-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.hc-ai-box {
    width: 18px; height: 18px; flex-shrink: 0;
    border: 2px solid rgba(54,54,54,0.3);
    border-radius: 5px; position: relative;
    transition: background 0.18s, border-color 0.18s;
}
.hc-ai-box::after {
    content: ''; position: absolute; left: 4px; top: 1px;
    width: 5px; height: 9px;
    border: solid #fff; border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0); transition: transform 0.18s;
}
.hc-ai-toggle input:checked ~ .hc-ai-box { background: var(--hc-brown); border-color: var(--hc-brown); }
.hc-ai-toggle input:checked ~ .hc-ai-box::after { transform: rotate(45deg) scale(1); }
.hc-ai-toggle:has(input:checked) { color: var(--hc-brown); }
.hc-ai-price { font-weight: 700; color: var(--hc-brown); }

/* Тултип у правого края — раскрывается ВЛЕВО (перебивает право-раскрытие compact/join) */
body .hc-tip.hc-tip--left::after {
    bottom: auto; top: 50%; transform: translateY(-50%);
    left: auto; right: calc(100% + 10px);
}
body .hc-tip.hc-tip--left::before {
    bottom: auto; top: 50%; transform: translateY(-50%);
    left: auto; right: calc(100% + 4px);
    border: 6px solid transparent; border-left-color: #2a201b;
}
@media (max-width: 560px) {
    body .hc-tip.hc-tip--left::after {
        top: auto; bottom: calc(100% + 10px);
        left: auto; right: -30px; transform: none;
        width: 220px; max-width: 66vw;
    }
    body .hc-tip.hc-tip--left::before {
        top: auto; bottom: calc(100% + 3px);
        left: auto; right: 0; transform: none;
        border: 6px solid transparent; border-top-color: #2a201b;
    }
}

.hc-slider-wrap { margin: 4px 0 2px; }
.hc-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px; border-radius: 100px;
    background: rgba(184,92,56,0.18); outline: none; cursor: pointer;
}
.hc-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--hc-brown); border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(184,92,56,0.4); cursor: pointer;
}
.hc-slider::-moz-range-thumb {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--hc-brown); border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(184,92,56,0.4); cursor: pointer;
}
.hc-slider-ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11px; color: rgba(54,54,54,0.4); }

/* ===== Лейбл + тултип ===== */
.hc-label-row { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.hc-label-row .hc-label { margin: 0; }
.hc-tip {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 17px; height: 17px; border-radius: 50%;
    background: rgba(184,92,56,0.12); color: var(--hc-brown);
    font-size: 11px; font-weight: 800; cursor: help; flex-shrink: 0; z-index: 6;
}
.hc-tip:hover, .hc-tip:focus { z-index: 300; }
.hc-tip::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    width: 250px; max-width: 78vw;
    background: #2a201b; color: #fff; font-size: 12.5px; font-weight: 400; line-height: 1.5;
    text-align: left; padding: 12px 14px; border-radius: 12px;
    box-shadow: 0 10px 28px rgba(0,0,0,0.25);
    opacity: 0; visibility: hidden; transition: opacity 0.18s; z-index: 320; pointer-events: none;
}
.hc-tip::before {
    content: ''; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
    border: 6px solid transparent; border-top-color: #2a201b;
    opacity: 0; visibility: hidden; transition: opacity 0.18s; z-index: 320;
}
.hc-tip:hover::after, .hc-tip:focus::after, .hc-tip:hover::before, .hc-tip:focus::before { opacity: 1; visibility: visible; }

/* ===== Radio-карточки (компактные) ===== */
.hc-rcards { display: grid; gap: 7px; }
.hc-rcards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hc-rcards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hc-rcards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hc-rcard {
    position: relative;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 9px 6px; border: 1.5px solid var(--hc-border); border-radius: 12px;
    cursor: pointer; text-align: center;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.12s;
}
.hc-rcard:hover { border-color: rgba(184,92,56,0.45); transform: translateY(-1px); }
.hc-rcard input { position: absolute; opacity: 0; pointer-events: none; }
.hc-rcard-swatch { width: 100%; height: 30px; border-radius: 8px; }
.hc-swatch-none { background: repeating-linear-gradient(45deg, #f3ece7, #f3ece7 6px, #e6dcd4 6px, #e6dcd4 12px); box-shadow: inset 0 0 0 1px rgba(54,54,54,0.1); }
.hc-rcard-ico { width: 100%; height: 30px; display: flex; align-items: center; justify-content: center; }
.hc-rcard-ico svg { max-height: 24px; }
.hc-rcard-name { font-size: 12px; font-weight: 600; color: var(--hc-text); line-height: 1.2; }
.hc-rcard:has(input:checked) { border-color: var(--hc-brown); background: rgba(184,92,56,0.06); box-shadow: inset 0 0 0 1px var(--hc-brown); }
.hc-rcard:has(input:checked) .hc-rcard-name { color: var(--hc-brown); font-weight: 700; }

/* ===== Лайтбокс (зум по клику) ===== */
.hc-preview-img-box img { cursor: zoom-in; }
.hc-room { cursor: zoom-in; }
.hc-lightbox {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(20,12,8,0.92);
    display: none; align-items: center; justify-content: center; padding: 40px;
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.hc-lightbox.open { display: flex; }
.hc-lb-stage { max-width: 90vw; max-height: 86vh; display: flex; align-items: center; justify-content: center; }
.hc-lb-img { max-width: 90vw; max-height: 86vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); display: block; }
.hc-lb-room { position: relative; width: min(86vh, 90vw); aspect-ratio: 1 / 1; background-size: cover; background-position: center; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.hc-lb-close {
    position: absolute; top: 22px; right: 26px;
    width: 46px; height: 46px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: background 0.18s;
}
.hc-lb-close:hover { background: rgba(255,255,255,0.28); }
.hc-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 54px; height: 54px; border-radius: 50%; border: none;
    background: rgba(255,255,255,0.14); color: #fff; font-size: 32px; line-height: 1; cursor: pointer; transition: background 0.18s;
}
.hc-lb-nav:hover { background: rgba(255,255,255,0.28); }
.hc-lb-prev { left: 24px; } .hc-lb-next { right: 24px; }
@media (max-width: 560px) {
    .hc-lb-nav { width: 42px; height: 42px; font-size: 26px; }
    .hc-lb-prev { left: 8px; } .hc-lb-next { right: 8px; }
    .hc-lightbox { padding: 16px; }
}

/* ===== Попап корзины ===== */
.hc-cartpop { position: fixed; inset: 0; z-index: 99998; display: none; }
.hc-cartpop.open { display: block; }
.hc-cartpop-backdrop { position: absolute; inset: 0; background: rgba(20,12,8,0.45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.hc-cartpop-panel {
    position: absolute; top: 0; right: 0; bottom: 0;
    width: min(420px, 92vw); background: #fff;
    display: flex; flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.18);
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.hc-cartpop.open .hc-cartpop-panel { transform: translateX(0); }
.hc-cartpop-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid rgba(54,54,54,0.1); }
.hc-cartpop-title { font-family: var(--hc-font); font-size: 20px; font-weight: 800; color: var(--hc-text); }
.hc-cartpop-close { width: 36px; height: 36px; border: none; border-radius: 50%; background: rgba(54,54,54,0.06); color: var(--hc-text); font-size: 22px; cursor: pointer; transition: background 0.15s; }
.hc-cartpop-close:hover { background: rgba(184,92,56,0.12); color: var(--hc-brown); }
.hc-cartpop-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 12px; }
.hc-cartpop-empty { text-align: center; color: rgba(54,54,54,0.5); padding: 40px 0; font-family: var(--hc-font); }
.hc-cartpop-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--hc-bg); border-radius: 14px; }
.hc-cartpop-thumb-box { width: 52px; height: 52px; flex-shrink: 0; border-radius: 10px; overflow: hidden; background: #efe7df; }
.hc-cartpop-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.hc-cartpop-i-info { flex: 1; min-width: 0; }
.hc-cartpop-i-name { font-family: var(--hc-font); font-size: 14px; font-weight: 600; color: var(--hc-text); line-height: 1.35; }
.hc-cartpop-i-meta { font-family: var(--hc-font); font-size: 13px; color: var(--hc-brown); font-weight: 700; margin-top: 4px; }
.hc-cartpop-rm { width: 28px; height: 28px; flex-shrink: 0; border: none; border-radius: 50%; background: rgba(54,54,54,0.07); color: rgba(54,54,54,0.5); font-size: 18px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.hc-cartpop-rm:hover { background: #fce4e4; color: #c62828; }
.hc-cartpop-foot { padding: 20px 24px 24px; border-top: 1px solid rgba(54,54,54,0.1); }
.hc-cartpop-total { display: flex; align-items: center; justify-content: space-between; font-family: var(--hc-font); font-size: 18px; font-weight: 800; color: var(--hc-text); margin-bottom: 16px; }
.hc-cartpop-checkout {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 54px; background: var(--hc-brown); color: #fff !important;
    border-radius: 100px; font-family: var(--hc-font); font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    text-decoration: none !important; transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.hc-cartpop-checkout:hover { background: #9e4f30; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(184,92,56,0.35); color: #fff !important; }
.hc-cartpop-continue { width: 100%; height: 44px; margin-top: 8px; background: none; border: none; color: rgba(54,54,54,0.55); font-family: var(--hc-font); font-size: 14px; font-weight: 600; cursor: pointer; transition: color 0.15s; }
.hc-cartpop-continue:hover { color: var(--hc-brown); }
.hc-cartpop-hint { margin: 0 0 14px; font-family: var(--hc-font); font-size: 13px; line-height: 1.4; color: rgba(54,54,54,0.6); text-align: center; }
.hc-cartpop-addmore {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; height: 50px; margin-top: 10px;
    background: #fff; color: var(--hc-brown); border: 2px solid var(--hc-brown);
    border-radius: 100px; font-family: var(--hc-font); font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background 0.18s, color 0.18s, transform 0.15s;
}
.hc-cartpop-addmore:hover { background: var(--hc-brown); color: #fff; transform: translateY(-1px); }

/* ===== Адаптив ===== */
@media (max-width: 960px) {
    .hc-layout { flex-direction: column; }
    .hc-photo-panel { flex: none; border-right: none; border-bottom: 1px solid rgba(54,54,54,0.07); }
    .hc-dropzone { min-height: 280px; }
    .hc-idle { padding: 36px 28px; }
    .hc-opts-inner { padding: 28px 28px; gap: 14px; }
}
@media (max-width: 560px) {
    .hc-section { border-radius: 20px; }
    .hc-dropzone { min-height: 220px; }
    .hc-idle { padding: 28px 20px; gap: 10px; }
    .hc-idle-title { font-size: 18px; }
    .hc-upload-icon-wrap { width: 68px; height: 68px; }
    .hc-opts-inner { padding: 20px 16px; gap: 12px; }
    .hc-opts-title { font-size: 20px; }
    .hc-price-val { font-size: 28px; }
    .hc-add-btn { height: 52px; font-size: 15px; }
    .hc-rcards-3, .hc-rcards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hc-rcard { min-width: 0; }
    .hc-rcard-name { white-space: normal; }
    .hc-tip::after { left: auto; right: 0; transform: none; }
    .hc-tip::before { left: auto; right: 6px; transform: none; }
}

/* ===== Обёртки опций: ровные отступы между блоками (вместо разделителей) ===== */
.hc-opts-scroll { display: flex; flex-direction: column; gap: 14px; }
.hc-opts-foot  { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }

/* ===== Компактная вёрстка ТОЛЬКО для страницы /constructor: всё в один экран, цена закреплена снизу ===== */
@media (min-width: 961px) {
    .hl-constructor-page .hc-section { margin: 6px 0; }
    .hl-constructor-page .hc-layout { min-height: 0; height: calc(100vh - 100px); max-height: 920px; }

    /* левая панель: превью гибко, интерьеры компактнее */
    .hl-constructor-page .hc-dropzone { min-height: 0; }
    .hl-constructor-page .hc-rooms { padding: 12px 16px 14px; }
    .hl-constructor-page .hc-rooms-title { margin: 0 0 8px; }

    /* правая панель: заголовок (фикс) + опции (скролл при нужде) + цена и кнопка (всегда видны) */
    .hl-constructor-page .hc-options-panel { min-height: 0; }
    .hl-constructor-page .hc-opts-inner { padding: 22px 28px; gap: 12px; min-height: 0; overflow: hidden; }
    .hl-constructor-page .hc-opts-title { font-size: 19px; }
    .hl-constructor-page .hc-opts-inner > form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
    .hl-constructor-page .hc-opts-scroll {
        display: flex; flex-direction: column; gap: 12px; flex: 0 1 auto; min-height: 0;
        overflow-y: auto; padding-right: 8px; margin-right: -8px;
    }
    .hl-constructor-page .hc-opts-foot {
        display: flex; flex-direction: column; gap: 10px; flex-shrink: 0;
        padding-top: 0; margin-top: 14px;
    }

    /* компактные элементы */
    .hl-constructor-page .hc-input { height: 46px; }
    .hl-constructor-page .hc-divider { display: none; }
    .hl-constructor-page .hc-label-row { margin-bottom: 5px; }
    .hl-constructor-page .hc-slider-wrap { margin: 0; }
    .hl-constructor-page .hc-lock { margin: 0; }
    .hl-constructor-page .hc-price-box { padding: 12px 18px; }
    .hl-constructor-page .hc-price-val { font-size: 27px; }
    .hl-constructor-page .hc-add-btn { height: 50px; }
}
