/* ========== БАЗОВЫЕ СТИЛИ КАТАЛОГА ========== */
body {
  background: #090d11;
  color: #f2eee7;
}

.nav nav a.active {
  color: #dca257;
}

.catalog-hero {
  padding: 150px 0 80px;
  background: radial-gradient(circle at 80% 20%, #23303b 0, transparent 35%), #090d11;
  border-bottom: 1px solid #26303a;
}

.catalog-hero h1,
.detail-content h1 {
  font-size: clamp(50px, 7vw, 105px);
  line-height: .95;
  letter-spacing: -.065em;
  margin: 18px 0 28px;
}

.catalog-hero > div > p:last-child {
  max-width: 760px;
  color: #9da9b4;
  font-size: 19px;
  line-height: 1.65;
}

.catalog-main {
  padding: 70px 0 110px;
}

.catalog-filter {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr) auto;
  gap: 12px;
  padding: 22px;
  border: 1px solid #2a333c;
  background: #10161c;
  align-items: end;
}

.catalog-filter label {
  display: grid;
  gap: 10px;
  color: #9da9b4;
  font-size: 13px;
}

.catalog-filter select {
  height: 50px;
  background: #0a0f13;
  color: #f2eee7;
  border: 1px solid #313b45;
  padding: 0 14px;
  font: inherit;
}

.budget-field input {
  accent-color: #dca257;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 58px 0 24px;
}

.catalog-toolbar h2 {
  font-size: 32px;
  margin: 0;
}

.catalog-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.catalog-product {
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  border: 1px solid #28323b;
  background: #10171d;
  transition: .25s;
}

.catalog-product:hover {
  transform: translateY(-5px);
  border-color: #dca257;
}

/* ========== КАРТОЧКА АВТОМОБИЛЯ (без изображений) ========== */
.catalog-product-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
}

.catalog-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.catalog-product-tags span {
  background: #1a2028;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 11px;
  color: #dca257;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.catalog-product-body h3 {
  font-size: 24px;
  margin: 0;
  line-height: 1.2;
}

.catalog-product-desc {
  color: #9da9b4;
  font-size: 13px;
  line-height: 1.5;
}

.catalog-product-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.catalog-product-specs span {
  background: #0f1419;
  padding: 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #c4cdd4;
}

.catalog-product-body strong {
  font-size: 22px;
  margin-top: auto;
  color: #f2eee7;
}

.catalog-product-body small {
  color: #71808e;
  font-size: 11px;
}

.catalog-cta {
  margin-top: 15px;
  width: 100%;
  text-align: center;
  background: #dca257;
  color: #111;
  font-weight: 800;
  font-size: 12px;
  padding: 12px 0;
  text-decoration: none;
  border-radius: 4px;
  transition: background .25s;
}

.catalog-cta:hover {
  background: #ebb16f;
}

/* ========== ПУСТОЕ СОСТОЯНИЕ И ФУТЕР ========== */
.catalog-empty {
  text-align: center;
  padding: 80px;
  border: 1px solid #28323b;
}

.catalog-footer {
  border-top: 1px solid #28323b;
  padding: 35px 0;
}

.catalog-footer .shell {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.catalog-footer a {
  color: #aab5bf;
}

/* ========== СТРАНИЦА ДЕТАЛЕЙ АВТОМОБИЛЯ ========== */
.detail-hero {
  padding: 120px 0 30px;
}

.detail-back {
  display: inline-block;
  color: #dca257;
  margin-bottom: 24px;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  height: 500px;
  gap: 10px;
}

.detail-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-width: 0;
}

.detail-content {
  padding: 35px 0 110px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 80px;
}

.detail-content h1 {
  font-size: clamp(52px, 6vw, 86px);
}

.detail-lead {
  font-size: 24px;
  line-height: 1.5;
  color: #c5cdd4;
}

.detail-content article > p:not(.section-kicker):not(.detail-lead):not(.detail-note) {
  font-size: 18px;
  line-height: 1.75;
  color: #aab4bd;
}

.detail-content h2 {
  font-size: 30px;
  margin: 50px 0 18px;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0;
}

.detail-specs li {
  list-style: none;
  padding: 18px;
  border: 1px solid #2b353e;
}

.detail-specs span {
  color: #dca257;
  margin-right: 10px;
}

.detail-variants {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.detail-variants div {
  padding: 22px;
  border: 1px solid #2b353e;
  display: grid;
  gap: 8px;
}

.detail-variants b {
  font-size: 22px;
}

.detail-variants span,
.detail-note {
  color: #82909b;
}

.detail-note {
  border-left: 3px solid #dca257;
  padding: 18px 22px;
  line-height: 1.6;
}

.detail-layout aside {
  position: sticky;
  top: 110px;
  height: max-content;
  border: 1px solid #3a444d;
  padding: 30px;
  background: #11181e;
  display: grid;
  gap: 20px;
}

.detail-layout aside p {
  color: #a7b0b9;
  margin: 0;
}

.detail-layout aside strong {
  font-size: 34px;
  line-height: 1.25;
}

.detail-layout aside span {
  color: #7f8b95;
  font-size: 13px;
  line-height: 1.5;
}

.detail-layout aside > a:last-child {
  color: #dca257;
  text-align: center;
}

.spec-source {
  display: block;
  color: #dca257;
  margin-top: 20px;
}

.catalog-empty[hidden] {
  display: none;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 1000px) {
  .catalog-filter {
    grid-template-columns: 1fr 1fr;
  }
  .catalog-full-grid {
    grid-template-columns: 1fr 1fr;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-layout aside {
    position: static;
  }
  .detail-gallery {
    height: 380px;
  }
  .nav nav {
    display: none;
  }
}

@media (max-width: 650px) {
  .catalog-hero {
    padding: 115px 0 60px;
  }
  .catalog-hero h1 {
    font-size: 48px;
  }
  .catalog-filter,
  .catalog-full-grid {
    grid-template-columns: 1fr;
  }
  .catalog-filter .button {
    width: 100%;
  }
  .catalog-toolbar {
    margin-top: 38px;
  }
  .detail-hero {
    padding-top: 100px;
  }
  .detail-gallery {
    height: auto;
    grid-template-columns: 1fr 1fr;
  }
  .detail-gallery img {
    height: 160px;
  }
  .detail-gallery img:first-child {
    grid-column: 1 / -1;
    height: 260px;
  }
  .detail-content h1 {
    font-size: 50px;
  }
  .detail-layout {
    gap: 35px;
  }
  .detail-specs,
  .detail-variants {
    grid-template-columns: 1fr;
  }
  .catalog-footer .shell {
    display: grid;
  }
}