/* Каркасные дома: стили только для страниц категории (префикс frame-).
   Базовая сетка, кнопки и галерея — из design.css. */

.frame-page {
  background: var(--design-paper);
  color: var(--design-ink);
}

.frame-page .site-header {
  background: rgba(243, 241, 236, 0.92);
}

.frame-main {
  overflow: hidden;
}

/* ---------- Хлебные крошки ---------- */

.frame-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
  font-size: 13px;
  color: rgba(32, 32, 31, 0.6);
}

.frame-crumbs a {
  color: inherit;
  text-decoration: none;
}

.frame-crumbs a:hover {
  color: var(--design-ink);
}

/* ---------- Вводный блок категории ---------- */

.frame-hero {
  padding: 150px 0 80px;
}

.frame-hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.frame-hero__lead {
  max-width: 640px;
  margin: 28px 0 0;
  font-size: 19px;
  line-height: 1.6;
  color: rgba(32, 32, 31, 0.78);
}

.frame-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 56px;
  background: var(--design-line);
  border: 1px solid var(--design-line);
}

.frame-facts > div {
  padding: 22px 24px;
  background: var(--design-paper);
}

.frame-facts strong {
  display: block;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.frame-facts span {
  font-size: 13px;
  color: rgba(32, 32, 31, 0.65);
}

/* ---------- Фильтры каталога ---------- */

.frame-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 40px;
}

.frame-filters__group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.frame-filters__title {
  margin-right: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(32, 32, 31, 0.6);
}

.frame-chip {
  padding: 10px 18px;
  border: 1px solid var(--design-line);
  border-radius: 999px;
  background: transparent;
  color: var(--design-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.frame-chip:hover {
  border-color: var(--design-ink);
}

.frame-chip[aria-pressed="true"] {
  background: var(--design-ink);
  border-color: var(--design-ink);
  color: var(--design-paper);
}

.frame-count {
  margin-left: auto;
  font-size: 14px;
  color: rgba(32, 32, 31, 0.6);
}

/* ---------- Сетка карточек ---------- */

.frame-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.frame-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.frame-card__image {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
}

.frame-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.frame-card:hover .frame-card__image img {
  transform: scale(1.03);
}

.frame-card__body {
  padding: 20px 4px 0;
}

.frame-card__number {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(32, 32, 31, 0.5);
}

.frame-card h2 {
  margin: 6px 0 10px;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.frame-card__meta {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(32, 32, 31, 0.72);
}

.frame-card__price {
  margin: 14px 0 0;
  font-size: 18px;
  font-weight: 600;
}

.frame-card__price small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(32, 32, 31, 0.55);
}

.frame-empty {
  display: none;
  padding: 40px 0;
  font-size: 16px;
  color: rgba(32, 32, 31, 0.7);
}

.frame-empty.is-visible {
  display: block;
}

[hidden].frame-card {
  display: none;
}

/* ---------- Страница дома ---------- */

.frame-house-head {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: end;
  padding: 130px 0 56px;
}

.frame-house-head h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 88px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.frame-house-head__number {
  display: block;
  margin-bottom: 18px;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: rgba(32, 32, 31, 0.55);
}

.frame-price-box {
  padding: 28px 30px;
  background: var(--design-ink);
  color: var(--design-paper);
}

.frame-price-box__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

.frame-price-box__value {
  margin: 10px 0 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.frame-price-box__variant {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.85;
}

.frame-price-box__note {
  margin: 16px 0 22px;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.65;
}

.frame-price-box .design-btn {
  width: 100%;
  justify-content: center;
}

.frame-specs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin: 0 0 80px;
  background: var(--design-line);
  border: 1px solid var(--design-line);
}

.frame-specs > div {
  padding: 22px 20px;
  background: var(--design-paper);
}

.frame-specs dt {
  font-size: 12px;
  color: rgba(32, 32, 31, 0.6);
}

.frame-specs dd {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.frame-description {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  padding: 0 0 100px;
}

.frame-description h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.frame-description p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: rgba(32, 32, 31, 0.82);
}

.frame-disclaimer {
  margin: 28px 0 0;
  padding: 18px 20px;
  border-left: 3px solid var(--design-accent);
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: rgba(32, 32, 31, 0.7) !important;
  background: rgba(255, 255, 255, 0.4);
}

.frame-gallery-title {
  margin: 0 0 32px;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.frame-gallery-group + .frame-gallery-group {
  margin-top: 56px;
}

.frame-gallery-group__label {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(32, 32, 31, 0.55);
}

.frame-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 60px 0 120px;
  border-top: 1px solid var(--design-line);
  font-size: 16px;
}

.frame-prevnext a {
  color: inherit;
  text-decoration: none;
}

.frame-prevnext a:hover {
  text-decoration: underline;
}

.frame-cta {
  padding: 100px 0;
  background: var(--design-brick);
  color: var(--design-paper);
}

.frame-cta h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.frame-cta p {
  max-width: 640px;
  margin: 24px 0 36px;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.85;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1100px) {
  .frame-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .frame-specs {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .frame-hero {
    padding: 120px 0 56px;
  }

  .frame-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .frame-facts strong {
    font-size: 24px;
  }

  .frame-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .frame-count {
    margin-left: 0;
    width: 100%;
  }

  .frame-house-head,
  .frame-description {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 110px;
  }

  .frame-specs {
    grid-template-columns: repeat(2, 1fr);
  }

  .frame-description p {
    font-size: 16px;
  }

  .frame-cta {
    padding: 72px 0;
  }
}

/* ---------- Галерея дома: картинка целиком, на белом фоне ---------- */

.frame-page .design-gallery__item {
  aspect-ratio: 4 / 3;
  background: #fff;
}

.frame-page .design-gallery__item img {
  object-fit: contain;
}

.frame-page .design-gallery__item:hover img {
  transform: none;
  opacity: 0.92;
}

.frame-page .design-lightbox figure img {
  background: #fff;
}

/* Первая (широкая) картинка помещается в экран целиком */
.frame-page .design-gallery__item--wide {
  aspect-ratio: auto;
  height: min(68vh, 620px);
}

@media (max-width: 767px) {
  .frame-page .design-gallery__item--wide {
    aspect-ratio: 4 / 3;
    height: auto;
  }
}
