:root {
  --primary: #1f6392;
  --primary-hover: #0f4b6e;
  --primary-light: #e3eefa;
  --bg-light: #f8fafd;
  --radius: 10px;
  --shadow: 0 8px 30px rgba(0,0,0,0.08);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #eef2f8; font-family: var(--font); color: #1a2c3e; line-height: 1.5; }
.wrapper { max-width: 1320px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.breadcrumbs {
  background: #fff;
  padding: 12px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  margin: 0 0 24px;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform: translateY(0);
  opacity: 1;
}
.breadcrumbs.hidden { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { color: #aaa; }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  margin-bottom: 30px;
}
@media (max-width: 820px) { .product-grid { grid-template-columns: 1fr; padding: 20px; } }

.gallery { display: flex; flex-direction: column; gap: 16px; }
.gallery .main-img {
  background: #faf8f4;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  min-height: 320px;
}
.gallery .main-img img { max-width: 100%; max-height: 480px; object-fit: contain; cursor: pointer; transition: 0.3s; }
.gallery .main-img img:hover { transform: scale(1.02); }
.gallery .thumbnails { display: flex; gap: 10px; justify-content: center; }
.gallery .thumbnails img {
  width: 70px; height: 70px; object-fit: cover; border-radius: 8px;
  border: 2px solid transparent; cursor: pointer; transition: 0.2s;
}
.gallery .thumbnails img.active { border-color: var(--primary); }
.gallery .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.gallery .badge { background: var(--bg-light); padding: 4px 14px; border-radius: 50px; font-size: 0.75rem; font-weight: 600; }
.gallery .in-stock { background: #d4edda; color: #155724; padding: 4px 16px; border-radius: 50px; font-weight: 700; display: inline-block; }
.gallery .color-info { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.config { display: flex; flex-direction: column; gap: 20px; }
.config h1 { font-size: 2rem; font-weight: 800; line-height: 1.2; margin-bottom: 4px; }
.config .sub { color: #4a5a6a; border-left: 4px solid var(--primary); padding-left: 14px; margin-bottom: 6px; }

.size-selector {
  background: var(--bg-light);
  padding: 12px 16px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.size-selector select {
  background: #fff;
  border: 1px solid #cddfea;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 1rem;
  transition: 0.3s;
}
.size-selector select.highlight { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(31,99,146,0.2); }

.price-block {
  background: #fff4e5;
  border-left: 5px solid var(--primary);
  padding: 12px 18px;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}
.price-block .old { text-decoration: line-through; color: #888; font-size: 1rem; }
.price-block .new { font-size: 2rem; font-weight: 800; color: #b22234; }

.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.presets button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
  flex: 1 1 auto;
  min-width: 120px;
  box-shadow: var(--shadow);
}
.presets button:hover { background: var(--primary-hover); transform: scale(1.02); }

.total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafcff;
  border: 1px solid #e6edf4;
  border-radius: var(--radius);
  padding: 10px 16px;
  font-weight: 700;
  flex-wrap: wrap;
  gap: 8px;
}
.total-line .price { font-size: 2rem; color: var(--primary); }
.total-line .reset-btn {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}
.total-line .reset-btn:hover { background: var(--primary); color: #fff; }

.color-selector {
  display: flex;
  gap: 20px;
  background: var(--bg-light);
  padding: 10px 16px;
  border-radius: var(--radius);
  flex-wrap: wrap;
  align-items: center;
}
.color-selector label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s;
}
.color-selector label.highlight { background: var(--primary-light); padding: 4px 10px; border-radius: var(--radius); }
.color-selector input[type="radio"] { accent-color: var(--primary); width: 18px; height: 18px; }
.color-swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #ccc; display: inline-block; }
.color-swatch.chrome { background: linear-gradient(135deg, #e8e8e8, #b0b0b0); }
.color-swatch.black { background: #2a2a2a; }

.furniture-list { display: flex; flex-direction: column; gap: 10px; }
.furniture-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e6edf4;
  border-radius: var(--radius);
  padding: 8px 14px;
  transition: 0.2s;
}
.furniture-item:hover { border-color: var(--primary); }
.furniture-item img { width: 60px; height: 60px; object-fit: contain; border-radius: 6px; background: #fff; }
.furniture-item .info { flex: 1; }
.furniture-item .info .name { font-weight: 600; }
.furniture-item .info .price { color: #1a6e4b; font-weight: 500; }
.furniture-item .actions { display: flex; gap: 6px; }
.furniture-item .actions button {
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid #d0d5db;
  background: #eef0f2;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s;
}
.furniture-item .actions .on { background: var(--primary); color: #fff; border-color: var(--primary); }
.furniture-item .actions .on:hover { background: var(--primary-hover); }
.furniture-item .actions .off:hover { background: #dde0e4; }

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: var(--bg-light);
  padding: 16px;
  border-radius: var(--radius);
}
@media (max-width: 600px) { .services-grid { grid-template-columns: 1fr; } }
.service-group { background: #fff; padding: 10px; border-radius: 8px; border: 1px solid #e6edf4; }
.service-group .title { font-weight: 600; margin-bottom: 8px; }
.service-group .options { display: flex; flex-wrap: wrap; gap: 6px; }
.service-group .options button {
  flex: 1;
  min-width: 80px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #d0d5db;
  background: #fff;
  cursor: pointer;
  font-weight: 500;
  transition: 0.2s;
  font-size: 0.8rem;
}
.service-group .options .selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.service-group .options .selected:hover { background: var(--primary-hover); }
.service-group .options button:hover:not(.selected) { background: #f0f2f5; }

.floor-stepper {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.floor-stepper button {
  background: #f0f5fc;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--primary);
}
.floor-stepper span { font-weight: 600; min-width: 30px; text-align: center; }

.total-card {
  background: #fafcff;
  border: 1px solid #e6edf4;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
  font-weight: 700;
}
.total-card .price { font-size: 2.8rem; color: var(--primary); }

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  width: 100%;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-2px); }

.trust-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  background: #fff;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  margin: 30px 0;
}
.trust-item { text-align: center; padding: 10px; }
.trust-item .icon { font-size: 2.4rem; }
.trust-item .title { font-weight: 700; margin: 8px 0 4px; }
.trust-item .desc { font-size: 0.9rem; color: #4a5a6a; }

.banner-call {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 30px 20px;
  text-align: center;
  margin: 30px 0;
  box-shadow: var(--shadow);
}
.banner-call h2 { font-size: 1.8rem; margin-bottom: 10px; }
.banner-call .phone {
  font-size: 2.2rem;
  font-weight: 800;
  display: inline-block;
  margin: 10px 0;
  background: #fff;
  color: var(--primary);
  padding: 8px 30px;
  border-radius: 50px;
  text-decoration: none;
  transition: 0.3s;
}
.banner-call .phone:hover { transform: scale(1.05); box-shadow: 0 4px 20px rgba(0,0,0,0.2); }
.banner-call .sub { font-size: 1rem; opacity: 0.9; }

.seo-block, .reviews-block, .faq-block {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  margin: 30px 0;
}
.seo-block h2 { font-size: 1.6rem; border-left: 5px solid var(--primary); padding-left: 18px; margin-bottom: 16px; }
.seo-block table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.seo-block table td { padding: 8px 12px; border-bottom: 1px solid #e6edf4; }
.seo-block table td:first-child { font-weight: 600; width: 40%; }
.seo-block .advantages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.seo-block .advantages .item { background: var(--bg-light); padding: 10px; border-radius: var(--radius); text-align: center; font-weight: 500; }

.similar-models {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
}
.similar-item {
  flex: 1 1 calc(25% - 16px);
  min-width: 100px;
  background: var(--bg-light);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  transition: 0.2s;
  border: 1px solid transparent;
}
.similar-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.similar-item a { text-decoration: none; color: #1a2c3e; }
.similar-item img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
.similar-item span { display: block; margin-top: 6px; font-weight: 600; color: var(--primary); }

.review-item { border-bottom: 1px solid #ecf1f7; padding: 14px 0; }
.review-item .stars { color: #f5a623; font-size: 1.1rem; letter-spacing: 2px; }
.review-item .author { font-weight: 600; margin: 4px 0; }
.review-item .date { font-size: 0.7rem; color: #8ba0b5; }

.write-review textarea {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius);
  border: 1px solid #cddfea;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.rating-input { display: inline-flex; direction: rtl; margin: 8px 0; }
.rating-input input { display: none; }
.rating-input label {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: 0.2s;
}
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color: #f5a623; }

.faq-item { border-bottom: 1px solid #ecf1f7; }
.faq-question {
  background: none;
  border: none;
  font-weight: 700;
  font-size: 1rem;
  width: 100%;
  padding: 14px 0;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-answer { display: none; padding: 6px 0 16px; color: #4a627a; }
.faq-answer.open { display: block; }

.fixed-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--primary);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: 900;
  padding: 12px 16px;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.fixed-panel.show { transform: translateY(0); }
.fixed-panel .inner {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.fixed-panel .price { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.fixed-panel .btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 24px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  min-width: 160px;
}
.fixed-panel .btn:hover { background: var(--primary-hover); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 179, 71, 0.6); }
  70% { box-shadow: 0 0 0 12px rgba(255, 179, 71, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 179, 71, 0); }
}
.pulse { animation: pulse 2s infinite; }

.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 600px) {
  .wrapper { padding: 0 10px; }
  .product-grid { padding: 16px; gap: 20px; }
  .config h1 { font-size: 1.5rem; }
  .price-block .new { font-size: 1.5rem; }
  .total-line .price { font-size: 1.5rem; }
  .total-card .price { font-size: 2rem; }
  .fixed-panel .price { font-size: 1.4rem; }
  .fixed-panel .btn { min-width: 120px; font-size: 0.9rem; padding: 8px 16px; }
  .banner-call .phone { font-size: 1.6rem; padding: 6px 20px; }
  .similar-item { flex: 1 1 calc(50% - 16px); }
}

.tooltip-trigger { background: none; border: none; color: var(--primary); cursor: help; font-weight: 700; font-size: 0.9rem; }
.tooltip-box { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #e6edf4; border-radius: 8px; padding: 10px 14px; box-shadow: 0 8px 24px rgba(0,0,0,0.12); font-size: 0.85rem; max-width: 260px; z-index: 100; text-align: left; }
.tooltip-box .close { position: absolute; top: 4px; right: 8px; background: none; border: none; font-size: 18px; cursor: pointer; }
.highlight { transition: 0.2s; }

.nav-trigger {
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 2rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.5s 2s forwards;
}
.nav-trigger:hover { transform: scale(1.1); background: var(--primary-hover); }
.nav-trigger svg { width: 36px; height: 36px; fill: #fff; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nav-modal.open { display: flex; }
.nav-modal .modal-box {
  background: #fff;
  max-width: 560px;
  width: 100%;
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.nav-modal .close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #999;
}
.nav-modal .close-modal:hover { color: #333; }

.nav-character {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.nav-character svg {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}
.nav-character .bubble {
  background: var(--bg-light);
  padding: 12px 16px;
  border-radius: var(--radius);
  border-top-left-radius: 4px;
  font-size: 0.95rem;
  flex: 1;
  position: relative;
}
.nav-character .bubble::after {
  content: '';
  position: absolute;
  left: -10px;
  top: 12px;
  border: 6px solid transparent;
  border-right-color: var(--bg-light);
}

.nav-progress {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 20px;
}
.nav-progress .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.nav-progress .step .num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d0d5db;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  transition: 0.3s;
}
.nav-progress .step.active .num { background: var(--primary); }
.nav-progress .step.done .num { background: #28a745; }
.nav-progress .step .label {
  font-size: 0.6rem;
  color: #6a7a8a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-progress .step.active .label { color: var(--primary); font-weight: 600; }
@media (max-width: 600px) { .nav-progress .step .label { display: none; } }

.nav-question { margin-bottom: 20px; }
.nav-question .q-text { font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.nav-question .options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-question .options button {
  padding: 10px 16px;
  border: 2px solid #e6edf4;
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}
.nav-question .options button:hover {
  border-color: var(--primary);
  background: var(--bg-light);
}
.nav-question .options button.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.nav-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.nav-actions button {
  padding: 10px 20px;
  border-radius: var(--radius);
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}
.nav-actions .btn-primary {
  background: var(--primary);
  color: #fff;
}
.nav-actions .btn-primary:hover { background: var(--primary-hover); }
.nav-actions .btn-secondary {
  background: #e6edf4;
  color: #1a2c3e;
}
.nav-actions .btn-secondary:hover { background: #d0d5db; }
.nav-actions .btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.nav-actions .btn-outline:hover { background: var(--primary); color: #fff; }

.nav-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
}
.nav-result .result-item { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid #e6edf4; }
.nav-result .result-item:last-child { border-bottom: none; }
.nav-result .result-label { font-weight: 600; }
.nav-result .result-value { color: var(--primary); }

.nav-price-preview {
  background: #fff4e5;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin: 12px 0;
  text-align: center;
  font-weight: 600;
  font-size: 1.1rem;
}
.nav-price-preview span { color: var(--primary); font-size: 1.4rem; }

@media (max-width: 600px) {
  .nav-trigger { bottom: 100px; right: 16px; width: 50px; height: 50px; }
  .nav-modal .modal-box { padding: 20px; }
  .nav-character svg { width: 48px; height: 48px; }
}