:root {
  color-scheme: light;
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-soft: #fff7f2;
  --ink: #171717;
  --muted: #6f6f6f;
  --line: #e8e8e8;
  --accent: #f45b24;
  --accent-hover: #db4613;
  --accent-soft: #ffe4d8;
  --accent-ink: #ffffff;
  --radius: 20px;
  --radius-small: 14px;
  --shadow: 0 8px 28px rgba(24, 24, 24, .08);
  --shadow-hover: 0 16px 38px rgba(24, 24, 24, .13);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Avenir Next", Avenir, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.topbar {
  position: relative;
  z-index: 3;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 0 28px;
}

.topbar p,
.topbar > a:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.topbar > a:last-child:hover { color: var(--accent); }

.brand {
  color: var(--ink);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.055em;
  text-decoration: none;
}

.brand span {
  margin-left: 3px;
  color: var(--accent);
  font-weight: 650;
  letter-spacing: -.035em;
}

main {
  max-width: 1400px;
  margin: auto;
  padding: 34px 28px 80px;
}

.intro {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, .65fr);
  align-items: end;
  gap: 60px;
  margin-bottom: 38px;
  padding: clamp(32px, 5vw, 72px);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  border-radius: 30px;
}

.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  right: -9%;
  bottom: -95%;
  border: clamp(42px, 7vw, 92px) solid var(--accent);
  border-radius: 50%;
  opacity: .95;
}

.kicker {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 13px 0 0;
  font-size: clamp(38px, 5vw, 72px);
  line-height: .98;
  letter-spacing: -.055em;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 430px;
  margin: 0;
  color: #d5d5d5;
  font-size: 18px;
  line-height: 1.5;
}

.search-panel {
  position: sticky;
  top: 12px;
  z-index: 2;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(232, 232, 232, .9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:hover,
select:hover { background: #f0f0f0; }

input:focus,
select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.summary {
  display: flex;
  align-items: center;
  gap: 42px;
  padding: 28px 5px;
}

.summary div { display: grid; gap: 2px; }
.summary strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.summary span { color: var(--muted); font-size: 11px; }

button {
  margin-left: auto;
  padding: 10px 15px;
  background: var(--accent-soft);
  color: #a4320d;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

button:hover { background: #ffd5c4; }

.formula {
  margin-bottom: 24px;
  padding: 20px 22px;
  background: var(--surface-soft);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
}

.formula p { margin: 5px 0 0; color: var(--muted); }

.catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.model-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(24, 24, 24, .03);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.model-card:hover {
  transform: translateY(-5px);
  border-color: transparent;
  box-shadow: var(--shadow-hover);
}

.model-card > img,
.photo-empty {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #ededed;
}

.photo-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.card-body { padding: 18px; }

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.card-title h2 { margin: 0; font-size: 17px; line-height: 1.15; }
.card-title h2 a { text-decoration: none; }
.card-title h2 a:hover { color: var(--accent); }
.card-title p { margin: 5px 0; color: var(--muted); font-size: 12px; }
.card-title > strong { color: var(--accent); font-size: 14px; white-space: nowrap; }

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 14px 0 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

dl div { display: grid; gap: 3px; }
dt { color: var(--muted); font-size: 10px; }
dd { margin: 0; font-weight: 800; font-variant-numeric: tabular-nums; }

.card-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.card-foot > span { color: var(--muted); }
.card-foot a,
.primary { color: var(--accent); font-weight: 800; }

.status { padding: 50px; color: var(--muted); text-align: center; }

footer {
  display: flex;
  justify-content: space-between;
  max-width: 1400px;
  margin: auto;
  padding: 25px 28px 45px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.footer-links { display: flex; gap: 20px; }

footer .tg { color: var(--accent); font-weight: 650; }

.owner-note {
  width: min(100%, 1000px);
  margin-top: 20px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.owner-note a { color: var(--accent); font-weight: 800; }

.detail { min-height: calc(100dvh - 160px); display: grid; place-items: center; }

.profile-detail {
  width: min(100%, 1000px);
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: center;
}

.profile-detail > img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
}

.profile-detail h1 { font-size: clamp(38px, 5vw, 64px); }
.price { color: var(--accent); font-size: 28px; font-weight: 850; }
.price small { color: var(--muted); font-size: 12px; font-weight: 500; }
.profile-detail dl { grid-template-columns: repeat(4, 1fr); }
.score-copy { color: var(--muted); line-height: 1.55; }

.primary {
  display: inline-block;
  margin-top: 12px;
  padding: 15px 20px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(244, 91, 36, .25);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.primary:hover {
  transform: translateY(-2px);
  background: var(--accent-hover);
  box-shadow: 0 11px 25px rgba(244, 91, 36, .3);
}

.primary:active { transform: translateY(0); }

@media (max-width: 1050px) {
  .catalog { grid-template-columns: repeat(3, 1fr); }
  .search-panel { grid-template-columns: repeat(3, 1fr); }
  .search-wide { grid-column: 1 / -1; }
}

@media (max-width: 740px) {
  .topbar { padding: 0 16px; }
  .topbar p { display: none; }
  main { padding: 18px 16px 60px; }
  .intro { grid-template-columns: 1fr; gap: 15px; margin-bottom: 26px; padding: 34px 24px; border-radius: 24px; }
  .intro::after { right: -28%; bottom: -55%; opacity: .55; }
  .intro-copy { font-size: 16px; }
  .search-panel { position: static; grid-template-columns: 1fr 1fr; padding: 13px; }
  .search-wide { grid-column: 1 / -1; }
  .summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
  .summary button { grid-column: 1 / -1; margin: 0; justify-self: start; }
  .catalog { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 14px; }
  .card-title { display: block; }
  .card-title > strong { display: block; margin: 7px 0; }
  .profile-detail { grid-template-columns: 1fr; gap: 25px; }
  .profile-detail dl { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 450px) {
  .catalog { grid-template-columns: 1fr; }
  .search-panel { grid-template-columns: 1fr; }
  .search-wide { grid-column: auto; }
  .summary { grid-template-columns: 1fr 1fr; }
  .summary div:last-of-type { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .model-card,
  .primary { transition: none; }
}
