/* ── Обёртка секции ── */
#calc { padding: 40px 0 56px; }
#calc .container { padding: 0 16px; }

/* ── Заголовок ── */
.cx-head { text-align: center; margin-bottom: 32px; }
.cx-head .eyebrow { margin-bottom: 10px; }
.cx-head h2 { margin: 0 auto; }

/* ══════════════════════════════════════
   КАРТОЧКА — 2 колонки на десктопе,
   1 колонка на мобильном
══════════════════════════════════════ */
.cx-card {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  background: var(--bg-soft);
  border-radius: 20px;
  padding: 28px;
  box-sizing: border-box;
  width: 100%;
}

/* ══════════════════════════════════════
   ЛЕВАЯ КОЛОНКА — форма
══════════════════════════════════════ */
.cx-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Лейбл секции */
.cx-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Чипы типа потолка */
.cx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cx-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--line);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  touch-action: manipulation;
}
.cx-chip:hover { border-color: var(--ink-2); }
.cx-chip.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

/* Сетка полей — 2×2 на десктопе */
.cx-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Одно поле */
.cx-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cx-field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Степпер */
.cx-stepper {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  height: 52px;
}
.cx-stepper-btn {
  flex: 0 0 48px;
  width: 48px;
  font-size: 22px;
  font-weight: 400;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.cx-stepper-btn:hover { background: var(--bg-soft); color: var(--accent); }
.cx-stepper-btn:active { background: var(--bg-soft); }
.cx-stepper-input {
  flex: 1 1 0;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  font-family: var(--f-display);
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
  padding: 0;
  width: 100%;
}
.cx-stepper-input::-webkit-outer-spin-button,
.cx-stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ══════════════════════════════════════
   ПРАВАЯ КОЛОНКА — результат
══════════════════════════════════════ */
.cx-result {
  background: var(--ink);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.cx-result::before {
  content: "";
  position: absolute;
  right: -50px; top: -50px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: .3;
  pointer-events: none;
}
.cx-result-label {
  font-size: 11px;
  opacity: .6;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
}
.cx-result-price {
  font-family: var(--f-display);
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.cx-result-price small {
  font-size: 20px;
  font-weight: 500;
  opacity: .7;
}
.cx-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.cx-breakdown-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  opacity: .85;
}
.cx-breakdown-line span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cx-breakdown-line span:last-child {
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Форма заявки */
.cx-phone-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.cx-phone-input {
  background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.16);
  border-radius: 12px;
  padding: 14px 16px;
  color: #fff;
  font-size: 16px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--f-body);
  transition: border-color .15s, background .15s;
}
.cx-phone-input::placeholder { color: rgba(255,255,255,.45); }
.cx-phone-input:focus { border-color: var(--accent); background: rgba(255,255,255,.13); }
.cx-submit-btn {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  background: var(--accent-2-grad, var(--accent));
  background-color: var(--accent-2, var(--accent));
  color: #fff;
  transition: filter .15s;
}
.cx-submit-btn:hover { filter: brightness(1.08); }
.cx-submit-btn:active { filter: brightness(.95); }

/* ══════════════════════════════════════
   МОБИЛЬНЫЙ: 1 колонка
══════════════════════════════════════ */
@media (max-width: 900px) {
  .cx-card { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .cx-result-price { font-size: 40px; }
}

@media (max-width: 600px) {
  #calc { padding: 24px 0 40px; }
  .cx-card { padding: 16px; gap: 16px; border-radius: 16px; }
  /* Поля: 1 колонка */
  .cx-fields { grid-template-columns: 1fr; gap: 12px; }
  /* Степпер: крупнее */
  .cx-stepper { height: 58px; border-radius: 14px; }
  .cx-stepper-btn { flex: 0 0 58px; width: 58px; font-size: 28px; }
  .cx-stepper-input { font-size: 22px; }
  .cx-result { padding: 18px; border-radius: 14px; gap: 12px; }
  .cx-result-price { font-size: 36px; }
  .cx-result-price small { font-size: 17px; }
  .cx-breakdown { font-size: 13px; gap: 5px; padding-top: 12px; }
  .cx-phone-input { padding: 15px 16px; font-size: 16px; }
  .cx-submit-btn { padding: 16px; font-size: 16px; }
}

/* ══ Sticky bar: скрыт по умолчанию, только мобильный ══ */
#calc-sticky-bar {
  display: none !important;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  background: var(--ink);
  color: #fff;
  padding: 12px 16px 20px;
  align-items: center;
  gap: 14px;
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -4px 32px rgba(0,0,0,.35);
  border-top: 1px solid rgba(255,255,255,.08);
}
.calc-sticky-bar__price { flex: 1; min-width: 0; }
.calc-sticky-bar__label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.calc-sticky-bar__total { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.calc-sticky-bar__btn {
  flex-shrink: 0;
  padding: 13px 20px;
  border-radius: 12px;
  border: none;
  background: var(--accent-2-grad, var(--accent-2, #3A54C5));
  color: #fff;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
@media (max-width: 720px) {
  #calc-sticky-bar { display: flex !important; }
  #calc-sticky-bar.is-visible { transform: translateY(0); }
}

.visually-hidden{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
