:root {
  color-scheme: dark;
  --bg: #08090c;
  --panel: #11131a;
  --panel-soft: #1c1f28;
  --text: #f4f6f8;
  --muted: #aab2bd;
  --line: #282b35;
  --accent: #e7c46a;
  --accent-strong: #f4d882;
  --green: #28d59b;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding-bottom: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 9, 12, 0.9);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-weight: 800;
}

.brand img {
  width: 52px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
}

.brand span {
  white-space: nowrap;
}

nav {
  display: flex;
  gap: clamp(10px, 2vw, 24px);
  color: var(--muted);
  font-size: 14px;
}

main {
  overflow: hidden;
}

.hero {
  display: block;
  align-items: center;
  min-height: auto;
  padding: clamp(18px, 4vw, 46px) clamp(16px, 4vw, 48px) 18px;
}

.hero-copy {
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0;
}

.hero-copy > p:not(.eyebrow),
.contacts p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.hero-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  min-width: 118px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
  user-select: none;
}

.button:hover,
.button:focus-visible {
  border-color: var(--accent);
  outline: none;
  transform: translateY(-1px);
}

.button.primary {
  border-color: transparent;
  background: var(--green);
  color: #06130e;
}

.button.ghost {
  background: #171922;
  color: var(--text);
}

.button.disabled {
  cursor: default;
  opacity: 0.58;
  transform: none;
}

.section {
  padding: clamp(28px, 5vw, 58px) clamp(16px, 4vw, 48px);
}

.section-head {
  margin-bottom: 24px;
}

.section-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr)) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0d0f14;
}

.filter-reset {
  min-width: 112px;
}

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

.car-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #11131a;
  cursor: pointer;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.car-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.card-photo {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #050609;
}

.card-photo::after {
  position: absolute;
  inset: 28% 0 0;
  content: "";
  background: linear-gradient(180deg, rgba(5, 6, 9, 0), rgba(5, 6, 9, 0.55) 36%, rgba(5, 6, 9, 0.96));
  pointer-events: none;
}

.card-photo img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  background: #050609;
}

.featured-card .card-photo img {
  object-fit: cover;
  padding: 0;
}

.status-row {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1;
}

.status.available {
  background: var(--green);
  color: #062116;
}

.status.transit {
  background: var(--brand);
  color: #171107;
}

.status.place {
  background: rgba(255, 255, 255, 0.9);
  color: #121318;
}

.details-float {
  position: absolute;
  right: 18px;
  bottom: 88px;
  z-index: 3;
  min-height: 56px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #14151a;
  font: inherit;
  font-weight: 900;
  padding: 0 24px;
  cursor: pointer;
}

.photo-title {
  position: absolute;
  right: 20px;
  bottom: 24px;
  left: 20px;
  z-index: 2;
}

.photo-title span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
}

.photo-title h3 {
  max-width: 74%;
  color: #fff;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.06;
}

.car-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  padding: 0 24px 24px;
  transform: translateY(-1px);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.meta span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.price {
  color: var(--green);
  font-size: 30px;
  font-weight: 900;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.spec-grid span {
  display: grid;
  gap: 7px;
  min-height: 78px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(39, 42, 52, 0.92);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.spec-grid small {
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 2px;
}

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

.card-bottom p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 700;
}

.card-bottom p span {
  display: block;
  margin-bottom: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

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

.badge {
  flex: 0 0 auto;
  border: 1px solid rgba(231, 196, 106, 0.55);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.description {
  color: var(--muted);
  line-height: 1.5;
}

.card-actions {
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.card-actions .button {
  width: 100%;
  min-width: 0;
}

.detail-section[hidden] {
  display: none;
}

.detail-card {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  padding: clamp(14px, 3vw, 22px);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  background: #050609;
}

.detail-hero::after {
  position: absolute;
  inset: 35% 0 0;
  content: "";
  background: linear-gradient(180deg, rgba(5, 6, 9, 0), rgba(5, 6, 9, 0.92));
}

.detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 420px;
  object-fit: cover;
}

.detail-hero div {
  position: absolute;
  right: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 2;
}

.detail-hero span {
  color: rgba(255, 255, 255, 0.78);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.detail-gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.detail-gallery-head .eyebrow {
  margin-bottom: 0;
}

.detail-gallery-head span {
  color: var(--muted);
  font-weight: 800;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.detail-gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  background: var(--panel-soft);
  object-fit: cover;
}

.detail-meta {
  font-size: 15px;
}

.form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1180px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  padding: 12px;
}

textarea {
  border-radius: 18px;
  resize: vertical;
}

.wide {
  grid-column: 1 / -1;
}

.matches {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  max-width: 1180px;
}

.match {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.match strong {
  color: var(--accent-strong);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 24px;
}

.contacts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.contact-actions .primary {
  white-space: nowrap;
}

.mobile-cta {
  display: none;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 900px) {
  .topbar {
    align-items: center;
  }

  .catalog,
  .catalog-tools,
  .form {
    grid-template-columns: 1fr 1fr;
  }

  .detail-gallery {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  body {
    padding-bottom: 82px;
  }

  .topbar {
    gap: 10px;
    padding: 10px 16px 12px;
  }

  .brand img {
    width: 44px;
    height: 32px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .brand span {
    white-space: normal;
  }

  .hero {
    gap: 18px;
    padding: 16px 16px 30px;
  }

  h1 {
    font-size: 34px;
  }

  .hero-copy > p:not(.eyebrow) {
    font-size: 15px;
  }

  .hero-actions {
    gap: 10px;
    margin-top: 18px;
  }

  .hero-actions .button {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
  }

  .card-actions,
  .detail-head .card-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .button {
    min-height: 50px;
  }

  .section {
    padding: 28px 16px;
  }

  .catalog,
  .catalog-tools,
  .form {
    grid-template-columns: 1fr;
  }

  .contacts {
    align-items: flex-start;
    flex-direction: column;
  }

  .contact-actions,
  .contact-actions .button {
    width: 100%;
  }

  .detail-head {
    flex-direction: column;
  }

  .detail-gallery {
    grid-template-columns: 1fr;
  }

  .mobile-cta {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(15, 17, 21, 0.94);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(14px);
  }

  .mobile-cta .button {
    min-width: 0;
    min-height: 46px;
    padding: 10px 12px;
  }
}

/* Mobile mini-app layout matching the reference catalog. */
:root {
  --bg: #111114;
  --app-bg: #09090b;
  --panel: #101014;
  --panel-soft: rgba(255, 255, 255, 0.075);
  --text: #ffffff;
  --muted: #a1a1aa;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #38d996;
  --brand: #e7c46a;
}

body.light-theme {
  --bg: #111114;
  --app-bg: #f6f4f8;
  --panel: #ffffff;
  --panel-soft: #f0eef4;
  --text: #09090b;
  --muted: #666674;
  --line: #e4e1ea;
  --accent: #10b981;
  --brand: #111114;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Figtree, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  width: min(480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--app-bg);
  box-shadow: 0 0 70px rgba(0, 0, 0, 0.5);
}

.section {
  padding: 20px 20px 28px;
}

#catalog {
  padding-top: 0;
}

#catalog .section-head {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -20px 14px;
  padding: 20px 20px 15px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--app-bg) 92%, transparent);
  backdrop-filter: blur(18px);
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.top-actions {
  display: flex;
  gap: 8px;
}

.round-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 900;
}

.eyebrow {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

h2 {
  color: var(--text);
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
}

.catalog-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.catalog-tab {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 950;
  line-height: 1.1;
}

.catalog-tab.active {
  border-color: transparent;
  background: var(--accent);
  color: #06130e;
}

.section-note {
  color: var(--muted);
  font-weight: 800;
}

.catalog-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  background: transparent;
}

.catalog-tools label,
.form label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.catalog-tools .search-field,
.filter-reset {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0;
}

input,
select {
  padding: 0 14px;
}

textarea {
  padding: 14px;
}

.button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 950;
}

.button.primary {
  background: var(--accent);
  color: #04140d;
}

.button.ghost {
  background: var(--panel);
  color: var(--text);
}

.catalog {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.car-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.16);
}

.card-photo {
  position: relative;
  aspect-ratio: 1.12;
  min-height: 0;
  background: #17171b;
}

.card-photo::after {
  position: absolute;
  inset: 35% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
}

.card-photo img,
.detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.status-row {
  top: 14px;
  left: 14px;
  right: 56px;
}

.status {
  min-height: 30px;
  padding: 7px 11px;
  font-size: 12px;
}

.status.available {
  background: var(--accent);
  color: #04140d;
}

.favorite-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #09090b;
  font-size: 22px;
  font-weight: 950;
}

.photo-title {
  bottom: 18px;
  left: 18px;
  right: 18px;
}

.photo-title span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.photo-title h3 {
  max-width: 100%;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.05;
}

.car-card-body {
  gap: 14px;
  padding: 0 16px 16px;
}

.spec-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: -26px;
}

.spec-grid span {
  min-height: 68px;
  padding: 11px 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
}

body.light-theme .spec-grid span {
  background: #111114;
}

.spec-grid small {
  font-size: 9px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card-bottom {
  align-items: center;
}

.card-bottom p {
  color: var(--muted);
  font-size: 13px;
}

.price {
  color: var(--text);
  font-size: 28px;
  font-weight: 950;
}

.details-float {
  position: static;
  min-height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 950;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.card-actions .button {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px;
}

.detail-section {
  min-height: 100vh;
  padding: 0;
}

.detail-card {
  display: grid;
  gap: 20px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--app-bg);
  padding: 0 0 24px;
}

.detail-hero {
  position: relative;
  aspect-ratio: 0.92;
  min-height: 0;
  overflow: hidden;
  border-radius: 0;
  background: #050506;
}

.detail-hero::after {
  position: absolute;
  inset: 45% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
}

.back-button,
.share-button,
.detail-arrows button {
  position: absolute;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #09090b;
  font: inherit;
  font-size: 24px;
  font-weight: 950;
}

.back-button {
  top: 18px;
  left: 18px;
}

.share-button {
  top: 18px;
  right: 18px;
  font-size: 14px;
}

.detail-arrows {
  position: absolute;
  bottom: auto;
  left: 14px;
  right: 14px;
  top: 50%;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.detail-arrows button {
  position: static;
}

.detail-title {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 4;
  color: #fff;
}

.detail-title span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 850;
}

.detail-title h2 {
  margin-top: 6px;
  color: #fff;
  font-size: 32px;
  line-height: 1.05;
}

.detail-panel,
.detail-card > section:not(.detail-hero) {
  margin: 0 20px;
}

.detail-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  padding: 16px;
}

.detail-price-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.detail-price-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.calc-link {
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--text);
  color: var(--app-bg);
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 950;
}

.detail-actions {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.finance-panel {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 16px;
}

.finance-panel .block-title {
  margin-bottom: 0;
}

.finance-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.detail-gallery-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
}

.thumb-strip {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.thumb-strip button {
  flex: 0 0 78px;
  height: 62px;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  background: transparent;
  padding: 0;
}

.thumb-strip button.active {
  border-color: var(--accent);
}

.thumb-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.block-title {
  margin-bottom: 10px;
  font-size: 18px;
}

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

.info-tile {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 13px;
}

.info-tile small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.info-tile strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
}

.description {
  color: var(--muted);
  font-weight: 750;
  line-height: 1.55;
}

.detail-bottom-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  padding: 16px;
}

.detail-bottom-bar .block-title {
  grid-column: 1 / -1;
  margin-bottom: 2px;
}

.contacts {
  margin: 0 20px 20px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
}

.picker {
  position: fixed;
  right: max(18px, calc((100vw - 480px) / 2 + 18px));
  bottom: 18px;
  z-index: 80;
  pointer-events: none;
}

.ai-widget-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, transparent);
  border-radius: 999px;
  background: var(--accent);
  color: #06130e;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: 0;
  pointer-events: auto;
}

.ai-widget-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 28px));
  max-height: min(680px, calc(100vh - 112px));
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.ai-widget-panel[hidden] {
  display: none;
}

.ai-widget-panel .section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 0;
}

.ai-widget-panel h2 {
  font-size: 24px;
}

.ai-widget-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form .wide {
  grid-column: 1 / -1;
}

.matches {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.assistant-chat {
  display: grid;
  gap: 12px;
}

.chat-log {
  display: grid;
  gap: 8px;
  max-height: 210px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--app-bg);
}

.chat-bubble {
  width: fit-content;
  max-width: 86%;
  border-radius: 18px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.chat-bubble.ai {
  justify-self: start;
  background: var(--panel-soft);
  color: var(--text);
}

.chat-bubble.user {
  justify-self: end;
  background: var(--accent);
  color: #04140d;
}

.ai-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ai-search-form .button {
  min-width: 96px;
}

.match {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  color: var(--text);
  padding: 12px;
  text-align: left;
}

.match img {
  width: 86px;
  height: 70px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--panel);
}

.match > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.match small,
.match em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.match span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.contacts {
  display: grid;
  gap: 16px;
}

.contact-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.mobile-cta {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: min(480px, 100%);
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--app-bg) 92%, transparent);
  box-shadow: none;
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.empty-state {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  color: var(--muted);
  padding: 22px;
  font-weight: 850;
}

@media (min-width: 700px) {
  body {
    padding-bottom: 0;
  }
}

@media (max-width: 380px) {
  .section {
    padding-left: 14px;
    padding-right: 14px;
  }

  #catalog .section-head {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .spec-grid span {
    padding: 10px 8px;
    font-size: 12px;
  }

  .photo-title h3,
  .detail-title h2 {
    font-size: 26px;
  }

  .picker {
    right: 14px;
    bottom: 14px;
  }

  .ai-widget-toggle {
    width: 58px;
    height: 58px;
  }

  .ai-widget-panel {
    bottom: 72px;
    width: calc(100vw - 28px);
    padding: 14px;
  }

  .ai-search-form {
    grid-template-columns: 1fr;
  }
}
