/* ==========================================================================
   product.css — product page: interactive pricing selector (heat type + add-on
   options), the price note, and the financing (Лизинг / Рассрочка) modal.
   Loaded via product.njk's {% block head %}.
   ========================================================================== */

/* --- overview ("Большие возможности…") ---------------------------------- */
.product__overview {
  margin-top: clamp(36px, 5vw, 60px);
  max-width: 92ch;
}

.product__overview-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(23px, 3vw, 34px);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 18px;
  text-wrap: balance;
}

.product__overview-body {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.7;
  text-wrap: pretty;
}

.product__overview-body p + p {
  margin-top: 14px;
}

/* --- selling subtitle under the title ----------------------------------- */
.product__tagline {
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.5;
  margin: -2px 0 12px;
  max-width: 48ch;
  text-wrap: pretty;
}

/* --- video section ------------------------------------------------------- */
.product__videos-lead.prose p {
  margin-bottom: 10px;
}

.product__videos-lead.prose p:last-child {
  margin-bottom: 0;
}

.product__videos {
  margin-top: clamp(40px, 5vw, 64px);
}

.product__videos-head {
  margin-bottom: clamp(20px, 2.4vw, 30px);
  max-width: 70ch;
}

.product__videos-lead {
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.6;
  margin-top: 8px;
  text-wrap: pretty;
}

/* --- option groups (heat type / smoke options) -------------------------- */
.opt-group {
  margin: 18px 0;
}

.opt-group__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}

.opt-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.opt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: 14.5px;
  line-height: 1.1;
  transition: border-color 0.2s, background 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.opt-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.opt-btn.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.opt-btn__ic {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* dark line-art icons: keep natural on light, lighten on dark / active */
:root[data-theme="dark"] .opt-btn__ic {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.opt-btn.is-active .opt-btn__ic {
  filter: brightness(0) invert(1);
  opacity: 1;
}

/* --- price note ---------------------------------------------------------- */
.product__price-note {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-3);
}

/* --- financing modal ----------------------------------------------------- */
.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 13, 0.6);
  backdrop-filter: blur(3px);
  animation: modalFade 0.2s var(--ease);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  padding: clamp(26px, 3vw, 38px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  animation: modalRise 0.28s var(--ease);
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  line-height: 1;
  color: var(--text-3);
  transition: color 0.2s;
}

.modal__close:hover {
  color: var(--accent);
}

.modal__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.modal__text {
  color: var(--text-2);
  font-size: 15.5px;
  line-height: 1.62;
  margin-bottom: 22px;
  text-wrap: pretty;
}

@keyframes modalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalRise {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal__overlay,
  .modal__dialog {
    animation: none;
  }
}
