/* Calc5 Widget — стили (префикс c5- изолирует от стилей сайта) */

/* ─── Обёртка ─────────────────────────────────────────────── */
/* Calc5 Widget — стили (префикс c5- изолирует от стилей сайта) */

/* ─── Обёртка ─────────────────────────────────────────────── */
#calc5-app {
  max-width: 900px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #222;
  box-sizing: border-box;
}
#calc5-app *, #calc5-app *::before, #calc5-app *::after {
  box-sizing: inherit;
}

/* ─── Загрузка ────────────────────────────────────────────── */
.c5-loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}
.c5-spinner {
  display: inline-block;
  width: 44px;
  height: 44px;
  border: 4px solid #e0e0e0;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: c5-spin 0.8s linear infinite;
  margin-bottom: 12px;
}
@keyframes c5-spin {
  to { transform: rotate(360deg); }
}

/* ─── Ошибка ──────────────────────────────────────────────── */
.c5-error {
  background: #fff3f3;
  border: 1px solid #f5c6cb;
  color: #842029;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 20px 0;
}

/* ─── Пустой каталог ──────────────────────────────────────── */
.c5-empty {
  color: #666;
  font-style: italic;
  text-align: center;
  padding: 20px;
}

/* ─── Виджет ──────────────────────────────────────────────── */
.c5-widget {
  padding: 24px 10px 100px;
}
.c5-title {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 20px;
  text-align: center;
  color: #1a1a1a;
}

/* ─── Кнопки категорий ────────────────────────────────────── */
.c5-category-section {
  margin-bottom: 24px;
}
.c5-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.c5-category-btn {
  padding: 10px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #222;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 0.9rem;
  font-weight: 600;
}
.c5-category-btn:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.15);
}
.c5-category-btn--active {
  border-color: #1976d2;
  background: #e8f0fe;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.2);
}

/* ─── Кнопки продуктов ────────────────────────────────────── */
.c5-products {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-bottom: 32px;
}

.c5-product-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 160px;
  padding: 14px 12px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  text-align: center;
}
.c5-product-btn:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.15);
  transform: translateY(-2px);
}
.c5-product-btn--active {
  border-color: #1976d2;
  background: #e8f0fe;
  box-shadow: 0 2px 12px rgba(25, 118, 210, 0.2);
}

.c5-product-btn__img {
  width: 120px;
  height: 100px;
  object-fit: contain;
  border-radius: 6px;
}
.c5-product-btn__img--placeholder {
  background: #f0f0f0;
}

.c5-product-btn__name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #222;
  line-height: 1.3;
}
.c5-product-btn__desc {
  font-size: 0.75rem;
  color: #888;
  line-height: 1.3;
}

/* ─── Детали выбранного продукта ──────────────────────────── */
.c5-detail {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.c5-detail__name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #1a1a1a;
}
.c5-detail__desc {
  color: #666;
  margin: 0 0 20px;
  font-size: 0.95rem;
}
.c5-detail__img {
  display: block;
  max-width: 100%;
  min-width: 0;
  max-height: 340px;
  object-fit: contain;
  border-radius: 8px;
}
.c5-detail__img-note {
  font-size: 0.75rem;
  color: #999;
  margin: 8px 0 0;
  line-height: 1.4;
}
.c5-detail__img-copyright {
  font-size: 0.68rem;
  color: #bbb;
  margin: 4px 0 0;
  line-height: 1.4;
}

/* ─── Слайдер рендеров ────────────────────────────────────── */
.c5-slider-wrap {
  position: relative;
}
.c5-slider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.c5-slider__arrow {
  flex-shrink: 0;
  background: #e8e8e8;
  color: #333;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.c5-slider__arrow:hover {
  background: #d0d0d0;
}
.c5-slider__dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}
.c5-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.c5-slider__dot--active {
  background: #555;
  transform: scale(1.3);
}

/* ─── Секция (стекло, фурнитура, …) ──────────────────────── */
.c5-section {
  margin-top: 32px;
  margin-bottom: 20px;
}

/* ─── Редактор размеров ───────────────────────────────────── */
.c5-dim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.c5-dim-reset {
  font-size: 0.82rem;
  padding: 4px 12px;
  border: 1px solid #bdbdbd;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #555;
  transition: border-color 0.15s, color 0.15s;
}
.c5-dim-reset:hover { border-color: #1976d2; color: #1976d2; }
.c5-dim-reset--hidden { visibility: hidden; }

.c5-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.c5-dim-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c5-dim-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #222;
}
.c5-dim-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.c5-dim-input-wrap:focus-within { border-color: #1976d2; }

.c5-dim-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 10px;
  font-size: 1rem;
  width: 0; /* flex takes care of it */
  background: transparent;
}
/* Убираем стрелки у number-инпута */
.c5-dim-input::-webkit-inner-spin-button,
.c5-dim-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.c5-dim-input[type=number] { -moz-appearance: textfield; }

.c5-dim-unit {
  padding: 0 10px;
  font-size: 0.85rem;
  color: #888;
  background: #f5f5f5;
  border-left: 1px solid #e0e0e0;
  line-height: 38px;
  white-space: nowrap;
}

.c5-dim-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
}
.c5-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid;
  line-height: 1.4;
}
.c5-badge--noglass {
  color: #757575;
  border-color: #bdbdbd;
  background: #fafafa;
}
.c5-badge--changed {
  color: #e65100;
  border-color: #ffb74d;
  background: #fff3e0;
}
.c5-section__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 14px;
  text-align: center;
  color: #1a1a1a;
}

/* ─── Выпадающий список (мобильный) ──────────────────────── */
.c5-select-wrap {
  display: flex;
  justify-content: center;
}
.c5-select {
  width: 100%;
  max-width: 480px;
  padding: 11px 16px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #222;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.c5-select:focus {
  border-color: #1976d2;
}

/* ─── Кнопки стекла ───────────────────────────────────────── */
.c5-glass-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.c5-glass-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 0.9rem;
  color: #222;
  text-align: left;
}

.c5-glass-btn:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.15);
}
.c5-glass-btn--active {
  border-color: #1976d2;
  background: #e8f0fe;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.2);
}

/* Цветовой образец стекла */
.c5-glass-btn__swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}

.c5-glass-btn__name {
  font-weight: 600;
  line-height: 1.3;
}

/* ─── Инлайн-загрузка (фурнитура) ────────────────────────── */
.c5-loading-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  color: #666;
  font-size: 0.9rem;
  padding: 8px 0;
}
.c5-spinner--sm {
  width: 22px;
  height: 22px;
  border-width: 3px;
  margin-bottom: 0;
}

/* ─── Кнопки наборов фурнитуры ────────────────────────────── */
.c5-hw-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.c5-hw-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-size: 0.9rem;
  color: #222;
  text-align: left;
}
.c5-hw-btn:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.15);
}
.c5-hw-btn--active {
  border-color: #1976d2;
  background: #e8f0fe;
  box-shadow: 0 2px 10px rgba(25, 118, 210, 0.2);
}
.c5-hw-btn__swatch {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.12);
  flex-shrink: 0;
}
.c5-hw-btn__name {
  font-weight: 600;
  line-height: 1.3;
}
.c5-hw-btn__desc {
  font-size: 0.78rem;
  color: #888;
  line-height: 1.3;
}

/* Блок описания выбранного набора фурнитуры */
.c5-hw-desc {
  margin-top: 14px;
  padding: 12px 16px;
  background: #f5f7fa;
  border-left: 3px solid #1976d2;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: #333;
}
.c5-hw-desc p { margin: 0 0 8px; }
.c5-hw-desc p:last-child { margin-bottom: 0; }
.c5-hw-desc ul, .c5-hw-desc ol { margin: 0 0 8px; padding-left: 20px; }
.c5-hw-desc li { margin-bottom: 4px; }
.c5-hw-desc a { color: #1976d2; text-decoration: underline; }
.c5-hw-desc a:hover { color: #1254a1; }

/* ─── Секция расчёта ──────────────────────────────────────── */
.c5-calc-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.c5-calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  background: #1976d2;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: 0 3px 14px rgba(25, 118, 210, 0.35);
}
.c5-calc-btn:hover:not(:disabled) {
  background: #1565c0;
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(25, 118, 210, 0.4);
}
.c5-calc-btn--disabled,
.c5-calc-btn:disabled {
  background: #b0bec5;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

/* Мини-спиннер внутри кнопки */
.c5-calc-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: c5-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ─── Блоки результата ────────────────────────────────────── */
.c5-result {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  padding: 20px 28px;
  text-align: center;
}
/* Стоимость изделия — нейтральный серо-синий */
.c5-result--cabinet {
  background: #e8f0fe;
  border: 1px solid #90caf9;
}
/* Итоговая стоимость — зелёный акцент */
.c5-result--total {
  background: #e8f5e9;
  border: 2px solid #66bb6a;
  box-shadow: 0 3px 12px rgba(102, 187, 106, 0.2);
}

.c5-result__label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  color: #222;
}

.c5-result__price {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  color: #222;
}
/* Цена кабины — поменьше */
.c5-result__price--sm {
  font-size: 1.6rem;
  font-weight: 700;
}

.c5-result__area {
  font-size: 0.84rem;
  color: #222;
}
.c5-result__breakdown {
  font-size: 0.82rem;
  color: #222;
  margin-top: 6px;
}

/* ─── Заявка после расчёта ────────────────────────────────── */
.c5-lead {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.c5-lead__open,
.c5-lead__submit {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(17, 24, 39, 0.22);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.c5-lead__open:hover,
.c5-lead__submit:hover:not(:disabled) {
  background: #263244;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(17, 24, 39, 0.28);
}

.c5-lead__submit:disabled {
  background: #9ca3af;
  box-shadow: none;
  cursor: wait;
  transform: none;
}

.c5-lead__form,
.c5-lead--sent {
  padding: 18px;
  border: 1px solid #d8e1eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(31, 41, 55, 0.08);
}

.c5-lead__title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.c5-lead__text {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #4b5563;
  margin-bottom: 14px;
}

.c5-lead__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.c5-lead__input,
.c5-lead__comment {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: 0.92rem;
}

.c5-lead__input {
  height: 44px;
  padding: 0 12px;
}

.c5-lead__comment {
  min-height: 120px;
  margin-bottom: 10px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.45;
  background: #f8fafc;
}

.c5-lead__input:focus,
.c5-lead__comment:focus {
  outline: none;
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.c5-lead__error {
  margin: 0 0 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  font-size: 0.86rem;
}

.c5-lead--sent {
  background: #f0fdf4;
  border-color: #86efac;
}

/* ─── Свитч установки ─────────────────────────────────────── */
.c5-install-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  padding: 4px 0;
}
.c5-install-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #333;
}

.c5-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.c5-switch__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.c5-switch__slider {
  position: absolute;
  inset: 0;
  background: #cfd8dc;
  border-radius: 26px;
  transition: background 0.2s;
}
.c5-switch__slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.c5-switch__input:checked + .c5-switch__slider {
  background: #43a047;
}
.c5-switch__input:checked + .c5-switch__slider::before {
  transform: translateX(22px);
}

.c5-switch__state {
  font-size: 0.9rem;
  color: #222;
  min-width: 120px;
}
.c5-switch__state--on {
  color: #222;
  font-weight: 600;
}
.c5-install-price {
  font-size: 0.82rem;
  opacity: 0.85;
}

/* ─── Блок замера ─────────────────────────────────────────── */
.c5-measure-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px 20px;
}

.c5-measure-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
}

.c5-measure-toggle {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}
.c5-measure-btn {
  padding: 8px 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 0.88rem;
  color: #555;
  transition: background 0.15s, color 0.15s;
}
.c5-measure-btn + .c5-measure-btn {
  border-left: 1px solid #ccc;
}
.c5-measure-btn--active {
  background: #1976d2;
  color: #fff;
  font-weight: 600;
}
.c5-measure-btn:hover:not(.c5-measure-btn--active) {
  background: #f0f4f8;
}

.c5-measure-free {
  font-size: 0.88rem;
  color: #333;
  font-weight: 600;
}

.c5-measure-km-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.c5-measure-km-label {
  font-size: 0.85rem;
  color: #555;
}
.c5-measure-km-wrap {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}
.c5-measure-km-input {
  width: 80px;
  border: none;
  outline: none;
  padding: 7px 10px;
  font-size: 1rem;
  text-align: center;
  background: transparent;
}
.c5-measure-km-input::-webkit-inner-spin-button,
.c5-measure-km-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.c5-measure-km-input[type=number] { -moz-appearance: textfield; }
.c5-measure-km-unit {
  padding: 0 10px;
  font-size: 0.85rem;
  color: #888;
  background: #f5f5f5;
  border-left: 1px solid #e0e0e0;
  line-height: 36px;
  white-space: nowrap;
}

.c5-measure-delivery {
  display: flex;
  align-items: center;
  gap: 8px;
}
.c5-measure-delivery-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}

.c5-measure-cost {
  font-size: 0.88rem;
  color: #222;
  text-align: center;
  min-height: 1.2em;
}
.c5-measure-hint {
  font-size: 0.8rem;
  color: #555;
}

/* ─── Блок доставки ───────────────────────────────────────── */
.c5-delivery-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 420px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px 20px;
}
.c5-delivery-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
}
.c5-delivery-value {
  font-size: 0.9rem;
  text-align: left;
  color: #222;
}
.c5-delivery-value--free {
  color: #222;
  font-weight: 600;
}
.c5-delivery-value--paid {
  color: #222;
}
.c5-delivery-value--paid strong {
  color: #222;
}
.c5-delivery-hint {
  font-size: 0.8rem;
  color: #555;
  margin-left: 4px;
}

/* ─── Гарантия и дисклеймер ──────────────────────────────── */
.c5-guarantee {
  width: 100%;
  max-width: 420px;
  background: #fffbeb;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 16px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #222;
  text-align: center;
  line-height: 1.55;
}
.c5-disclaimer {
  max-width: 420px;
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  line-height: 1.45;
  margin: 0;
}

/* ─── Блок бесплатной зоны (не-московский город) ─────────── */
.c5-free-zone-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 420px;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 14px 20px;
}
.c5-free-zone-icon {
  font-size: 1.1rem;
  color: #222;
  flex-shrink: 0;
}
.c5-free-zone-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: #222;
}

/* ─── Фото продукта (обёртка + навигация) ──────────────────── */
.c5-photo-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.c5-photo-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.c5-photo-nav__btn {
  width: 36px;
  height: 36px;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  line-height: 1;
}
.c5-photo-nav__btn:hover {
  border-color: #1976d2;
  background: #e8f0fe;
  color: #1976d2;
}

.c5-photo-counter {
  font-size: 0.88rem;
  color: #666;
  min-width: 50px;
  text-align: center;
}

.c5-photo-status {
  font-size: 0.78rem;
  color: #999;
  font-style: italic;
  margin-top: 2px;
}
.c5-photo-status--sample {
  color: #1976d2;
  font-style: normal;
  font-weight: 500;
}
.c5-photo-status--schematic {
  color: #aaa;
}

/* ── Custom select (mobile dropdown with swatches) ────────────────── */
.c5-select-wrap {
  position: relative;
}

.c5-custom-select {
  position: relative;
  width: 100%;
  font-size: 0.97rem;
  color: #222;
}

.c5-custom-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 0.97rem;
  color: #222;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.c5-custom-select__trigger:hover {
  border-color: #aaa;
}
.c5-custom-select--open .c5-custom-select__trigger {
  border-color: #1976d2;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.c5-custom-select__current {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.c5-custom-select__current > span:last-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.c5-custom-select__placeholder {
  color: #999;
  font-style: italic;
}

.c5-custom-select__arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.c5-custom-select__arrow::after {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-right: 2px solid #777;
  border-bottom: 2px solid #777;
  transform: rotate(45deg) translateY(-3px);
}
.c5-custom-select--open .c5-custom-select__arrow {
  transform: rotate(180deg);
}

.c5-custom-select__list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #1976d2;
  border-top: none;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}
.c5-custom-select--open .c5-custom-select__list {
  display: block;
}

.c5-custom-select__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  color: #222;
  border-bottom: 1px solid #f0f0f0;
  box-sizing: border-box;
  transition: background 0.12s;
}
.c5-custom-select__opt:last-child {
  border-bottom: none;
}
.c5-custom-select__opt:hover {
  background: #f0f6ff;
}
.c5-custom-select__opt--active {
  background: #e8f0fe;
  font-weight: 600;
  color: #1565c0;
}

/* ─── Блок постоянной ссылки на расчёт ─────────────────────────────────────── */
.c5-calc-link {
  margin-top: 20px;
  padding: 16px;
  background: #f0f6ff;
  border: 1px solid #c5d9f5;
  border-radius: 10px;
}

.c5-result--total .c5-calc-link {
  background: transparent;
  border: none;
  border-top: 1px solid rgba(102, 187, 106, 0.4);
  border-radius: 0;
  padding: 14px 0 0;
  text-align: center;
}

.c5-result--total .c5-calc-link__row {
  justify-content: center;
}

.c5-calc-link__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1565c0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.c5-calc-link__row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.c5-calc-link__url {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: #1565c0;
  word-break: break-all;
  text-decoration: none;
}
.c5-calc-link__url:hover {
  text-decoration: underline;
}

.c5-calc-link__copy,
.c5-calc-link__share {
  flex-shrink: 0;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.c5-calc-link__copy {
  background: #1565c0;
  color: #fff;
}
.c5-calc-link__copy:hover {
  background: #1148a0;
}
.c5-calc-link__share {
  background: #e8f5e9;
  color: #2e7d32;
}
.c5-calc-link__share:hover {
  background: #c8e6c9;
}

.c5-calc-link__get {
  padding: 8px 20px;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.c5-calc-link__get:hover {
  background: #1148a0;
}

.c5-calc-link__hint {
  margin-top: 8px;
  font-size: 0.8rem;
  color: #555;
}

@media (max-width: 560px) {
  .c5-lead__fields {
    grid-template-columns: 1fr;
  }
}
