/* === Стили калькулятора подбора ламп. Цвета берутся из CSS-переменных
       страницы (--primary, --ink, --canvas, --surface-soft и т.д.) === */

/* Layout слева-фото / справа-калькулятор */
.cfg-photo {
  background: var(--surface-soft, #fbfbf9);
  border-radius: var(--r-lg, 32px);
  aspect-ratio: 3/4;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline-soft, #e5e5e0);
}
.cfg-photo img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.cfg-photo .cfg-photo-fallback {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--mute, #62625b);
}
.cfg-panel {
  background: var(--surface-soft, #fbfbf9);
  border: 1px solid var(--hairline-soft, #e5e5e0);
  border-radius: var(--r-lg, 32px);
  padding: 32px;
}
.cfg-eyebrow {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  background: var(--canvas, #fff);
  border-radius: var(--r-full, 9999px);
  font-size: 13px; font-weight: 600; color: var(--mute, #62625b);
  margin-bottom: 14px;
}
.cfg-title {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--ink, #000);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.cfg-sub { font-size: 14px; color: var(--mute, #62625b); margin-bottom: 24px; }
.cfg-section-label {
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: 18px; font-weight: 700;
  color: var(--ink, #000); margin-bottom: 16px;
  text-align: center;
}
.cfg-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.cfg-buttons .btn-primary, .cfg-buttons .btn-secondary {
  width: 100%; padding: 14px 18px; font-size: 15px; border-radius: var(--r-md, 16px);
}
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--canvas, #fff); color: var(--ink, #000);
  border: 1.5px solid var(--hairline, #dadad3);
  font-size: 14px; font-weight: 700;
  padding: 12px 18px; min-height: 40px;
  border-radius: var(--r-md, 16px);
  transition: border-color 0.15s, background 0.15s;
}
.btn-secondary:hover { border-color: var(--ash, #91918c); background: var(--surface-card, #f6f6f3); }
.cfg-credit-link {
  display: block;
  font-size: 13px;
  color: var(--primary, #e60023);
  font-weight: 500;
  text-decoration: underline;
}
.cfg-credit-link:hover { color: var(--primary-pressed, #cc001f); }

/* === Калькулятор === */
.lpc-hidden { display: none; }
.lpc-step { padding: 18px 0; border-top: 1px solid var(--hairline-soft, #e5e5e0); }
.lpc-step:first-of-type { border-top: 0; padding-top: 0; }
.lpc-step-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: 15px; font-weight: 700; color: var(--ink, #000);
}
.lpc-num {
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 8px;
  background: var(--ink, #000); color: #fff;
  font-size: 12px; font-weight: 700;
}
.lpc-sub { font-weight: 400; color: var(--mute, #62625b); font-size: 13px; }

/* Dropdown */
.lpc-dd { position: relative; }
.lpc-dd-btn {
  width: 100%; display: flex; align-items: center; gap: 12px;
  background: var(--canvas, #fff);
  border: 1.5px solid var(--hairline, #dadad3);
  border-radius: var(--r-md, 16px);
  padding: 12px 14px;
  cursor: pointer; text-align: left;
  transition: 0.15s;
  font-family: inherit; color: var(--ink, #000);
}
.lpc-dd-btn:hover { border-color: var(--ash, #91918c); }
.lpc-dd-btn.open { border-color: var(--primary, #e60023); box-shadow: 0 0 0 4px rgba(230,0,35,0.08); }
.lpc-dd-thumb {
  flex: none; width: 44px; height: 44px;
  border-radius: 8px; overflow: hidden;
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 10px;
  background: linear-gradient(135deg, #4a4a44, #262622);
  text-align: center; line-height: 1.1; padding: 3px;
}
.lpc-dd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lpc-dd-main { flex: 1; min-width: 0; }
.lpc-dd-brand { display: block; font-size: 11px; color: var(--mute, #62625b); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.lpc-dd-model { display: block; font-size: 15px; font-weight: 700; color: var(--ink, #000); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lpc-dd-placeholder { font-size: 14px; font-weight: 500; color: var(--mute, #62625b); }
.lpc-dd-caret { flex: none; color: var(--primary, #e60023); transition: 0.2s; }
.lpc-dd-btn.open .lpc-dd-caret { transform: rotate(180deg); }
.lpc-dd-panel {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px);
  z-index: 30;
  background: var(--canvas, #fff);
  border: 1.5px solid var(--hairline, #dadad3);
  border-radius: var(--r-md, 16px);
  box-shadow: 0 24px 50px -18px rgba(0,0,0,0.2);
  max-height: 320px; overflow: auto;
  padding: 6px; display: none;
}
.lpc-dd-panel.show { display: block; }
.lpc-dd-search {
  width: 100%;
  border: 1px solid var(--hairline-soft, #e5e5e0);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit; font-size: 14px;
  margin-bottom: 4px;
  position: sticky; top: 0; background: var(--canvas, #fff);
}
.lpc-dd-search:focus { outline: none; border-color: var(--primary, #e60023); }
.lpc-dd-opt { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; }
.lpc-dd-opt:hover { background: var(--surface-card, #f6f6f3); }
.lpc-dd-opt .lpc-dd-thumb { width: 38px; height: 38px; font-size: 9px; }
.lpc-dd-info .b { font-size: 11px; color: var(--mute, #62625b); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.lpc-dd-info .m { font-size: 14px; font-weight: 600; color: var(--ink, #000); }
.lpc-dd-empty { padding: 20px; text-align: center; color: var(--mute, #62625b); font-size: 13px; }

/* Specs tiles */
.lpc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lpc-tile { background: var(--canvas, #fff); border: 1px solid var(--hairline-soft, #e5e5e0); border-radius: 10px; padding: 12px; }
.lpc-tile .l { font-size: 11px; color: var(--mute, #62625b); margin-bottom: 4px; }
.lpc-tile .v { font-family: var(--font-display, 'Manrope', sans-serif); font-size: 22px; font-weight: 700; color: var(--ink, #000); line-height: 1; }
.lpc-tile .v .u { font-size: 12px; font-weight: 600; color: var(--mute, #62625b); margin-left: 3px; }

/* Lamps */
.lpc-lamps { display: flex; flex-direction: column; gap: 8px; }
.lpc-warn { display: flex; gap: 10px; padding: 12px; background: #fff4d6; border: 1px solid #f0d886; border-radius: 10px; font-size: 13px; color: #6b4a00; line-height: 1.4; margin-bottom: 4px; }
.lpc-warn svg { width: 18px; height: 18px; flex: none; color: #c89500; margin-top: 1px; }
.lpc-lamp { display: grid; grid-template-columns: 18px 48px 1fr auto; align-items: center; gap: 10px; padding: 10px; background: var(--canvas, #fff); border: 1.5px solid var(--hairline-soft, #e5e5e0); border-radius: 10px; cursor: pointer; transition: 0.15s; }
.lpc-lamp:hover { border-color: var(--ash, #91918c); }
.lpc-lamp.sel { border-color: var(--primary, #e60023); box-shadow: 0 0 0 4px rgba(230,0,35,0.08); }
.lpc-radio { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--hairline, #dadad3); display: grid; place-items: center; }
.lpc-lamp.sel .lpc-radio { border-color: var(--primary, #e60023); }
.lpc-lamp.sel .lpc-radio::after { content: ""; width: 8px; height: 8px; background: var(--primary, #e60023); border-radius: 50%; }
.lpc-lamp-thumb { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--surface-card, #f6f6f3); display: grid; place-items: center; position: relative; }
.lpc-lamp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lpc-lamp-thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--mute, #62625b); text-align: center; padding: 3px; }
.lpc-lamp-thumb.noimg img { display: none; }
.lpc-lamp-thumb:not(.noimg) .ph { display: none; }
.lpc-lamp-info { min-width: 0; }
.lpc-lamp-info .n { display: block; font-size: 13px; font-weight: 700; color: var(--ink, #000); }
.lpc-lamp-info .a { display: block; font-size: 12px; color: var(--charcoal, #262622); font-weight: 600; }
.lpc-lamp-info .s { display: block; font-size: 11px; color: var(--mute, #62625b); }
.lpc-lamp-price { text-align: right; }
.lpc-lamp-price .pp { display: block; font-family: var(--font-display, 'Manrope', sans-serif); font-size: 16px; font-weight: 700; color: var(--ink, #000); white-space: nowrap; }
.lpc-lamp-price .per { display: block; font-size: 10px; color: var(--mute, #62625b); }
.lpc-empty-msg { padding: 18px; background: var(--canvas, #fff); border: 1px dashed var(--hairline, #dadad3); border-radius: 10px; text-align: center; color: var(--mute, #62625b); font-size: 13px; }

/* Total card */
.lpc-total { margin-top: 12px; padding: 18px; background: var(--ink, #000); color: #fff; border-radius: var(--r-md, 16px); }
.lpc-total-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 13px; }
.lpc-total-row span:first-child { color: rgba(255,255,255,0.6); }
.lpc-total-row b { font-weight: 700; }
.lpc-total-div { height: 1px; background: rgba(255,255,255,0.12); margin: 8px 0 12px; }
.lpc-grand { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lpc-grand-lab { font-size: 13px; color: rgba(255,255,255,0.7); }
.lpc-grand-num { font-family: var(--font-display, 'Manrope', sans-serif); font-size: clamp(24px, 4vw, 32px); font-weight: 700; color: #fff; }
.lpc-total .cfg-credit-link { color: rgba(255,255,255,0.85); margin-top: 8px; }
.lpc-total .cfg-credit-link:hover { color: #fff; }
.lpc-total .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.3); }
.lpc-total .btn-secondary:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }

@media (max-width: 880px) {
  .cfg-buttons { grid-template-columns: 1fr; }
  .cfg-panel { padding: 22px; }
}
