/* ══════════════════════════════════════════════════
   Стили страницы: Рольворота (avtomaticheskie-rolvorota.php)
   ══════════════════════════════════════════════════ */

/* ── Информационные вкладки ── */
.info-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.info-tab-btn {
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #e0e4e8;
  background: #f7f8fa;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.info-tab-btn:hover,
.info-tab-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.info-tab-content {
  display: none;
  padding: 24px;
  background: #f7f8fa;
  border-radius: 12px;
}
.info-tab-content.active {
  display: block;
}
.info-tab-content table {
  width: 100%;
  border-collapse: collapse;
}
.info-tab-content table th,
.info-tab-content table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e0e4e8;
  font-size: 14px;
}
.info-tab-content table th {
  font-weight: 700;
  background: #eef1f5;
}
.info-tab-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0;
}
.info-tab-content p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}

/* ── Типы монтажа ── */
.montazh-types {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.montazh-type {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e0e4e8;
}
.montazh-type h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.montazh-type p {
  font-size: 13px;
  color: #555;
}

/* ── Цветовые кружки ── */
.color-swatch {
  position: relative;
  cursor: pointer;
}
.color-swatch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.color-swatch span {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: transform .15s, box-shadow .15s;
}
.color-swatch:hover span {
  transform: scale(1.15);
}
.color-swatch input:checked + span {
  transform: scale(1.2);
  box-shadow: 0 0 0 3px var(--blue);
}

/* ── Подсказка типа монтажа ── */
.montazh-hint-icon:hover + .montazh-hint-popup,
.montazh-hint-popup:hover {
  display: block !important;
}

/* ── Адаптив ── */
@media (max-width: 991px) {
  .calc-grid { grid-template-columns: 1fr !important; }
  .color-preview-box { width: 100% !important; height: auto !important; }
}
@media (max-width: 767px) {
  .info-tabs-nav { flex-direction: column; }
  .montazh-types { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   Каталог моделей (8 карточек) + блоки детализации
   ══════════════════════════════════════════════════ */

/* ── Сетка каталога 8 товаров ── */
.products-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.prod-card-8 {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh);
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  color: var(--ink) !important;
  transition: transform .22s ease, box-shadow .22s ease, border-color .2s ease;
  position: relative;
  min-height: 0;
}
.prod-card-8:hover {
  transform: translateY(-6px);
  box-shadow: var(--sh-lg);
}
.prod-card-8 .prod-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.prod-card-8 .prod-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform .35s ease;
}
.prod-card-8:hover .prod-img img { transform: scale(1.06); }
.prod-card-8 .prod-badge {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  position: absolute;
  top: 10px;
  left: 10px;
}
.prod-card-8 .prod-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prod-card-8 .prod-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.prod-card-8 .prod-desc {
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card-8 .prod-cta {
  margin: 10px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--blue);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  transition: background .18s;
}
.prod-card-8 .prod-cta i { font-size: 10px; transition: transform .2s; }
.prod-card-8:hover .prod-cta { background: var(--blue2); }
.prod-card-8:hover .prod-cta i { transform: translateX(4px); }
.prod-card-8.active-card {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold), var(--sh-lg);
}

/* ── Блоки детализации модели ── */
.product-detail-block {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}
.product-detail-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ── Информационные вкладки для каждой модели ──
   Кнопки в один ряд — синие пилюли (якоря к секциям).
   Всё содержимое показано одновременно, стек вертикально. */
.product-detail-block .info-tabs-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}
.product-detail-block .info-tabs-nav::-webkit-scrollbar { height: 6px; }
.product-detail-block .info-tabs-nav::-webkit-scrollbar-thumb { background: #cfd6de; border-radius: 3px; }
.info-tab-btn-p {
  flex: 0 0 auto;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}
.info-tab-btn-p:hover,
.info-tab-btn-p.active {
  background: var(--blue2);
  border-color: var(--blue2);
  transform: translateY(-1px);
}
.info-tab-content-p {
  display: none;
  padding: 20px 24px;
  background: #f7f8fa;
  border-radius: 12px;
  margin-bottom: 16px;
  scroll-margin-top: 100px;
}
.info-tab-content-p.active { display: block; }
.info-tab-content-p:last-child { margin-bottom: 0; }
.info-tab-content-p table {
  width: 100%;
  border-collapse: collapse;
}
.info-tab-content-p table th,
.info-tab-content-p table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #e0e4e8;
  font-size: 14px;
}
.info-tab-content-p table th {
  font-weight: 700;
  background: #eef1f5;
}
.info-tab-content-p p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.6;
}
.info-tab-content-p img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ── Цветовые кружки (для блока "Цвета" в моделях) ──
   Такие же как в форме .color-swatch-circle, но крупнее + подпись снизу */
.color-circles {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 20px;
  margin-top: 6px;
}
.color-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  color: #333;
  width: 72px;
}
.color-circle-item small {
  font-size: 11px;
  font-weight: 600;
  color: #333;
}
.cc-dot {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.12);
  transition: transform .18s;
}
.color-circle-item:hover .cc-dot { transform: scale(1.08); }

/* ── Адаптив каталога ──
   Десктоп — ровно 4 колонки × 2 ряда = 8 товаров,
   мобилка — 2 колонки × 4 ряда. Без 3-колоночного переходного состояния. */
@media (max-width: 1100px) {
  .products-grid-8 { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .info-tab-content-p > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 860px) {
  .products-grid-8 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .products-grid-8 { grid-template-columns: 1fr 1fr; gap: 8px; }
  .prod-card-8 .prod-body { padding: 10px; }
  .prod-card-8 .prod-name { font-size: 13px; }
  .prod-card-8 .prod-cta { margin: 8px 10px 10px; padding: 7px 10px; font-size: 11px; }
}
