:root {
  color-scheme: light;
  --ink: #101713;
  --muted: #64716a;
  --line: #dfe7df;
  --panel: #ffffff;
  --soft: #f3f7f1;
  --cream: #fbfaf3;
  --forest: #09221d;
  --green: #0c7c4a;
  --gold: #d6a742;
  --coral: #d94a32;
  --blue: #176f9f;
  --shadow: 0 18px 42px rgba(9, 34, 29, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 28px;
  align-items: center;
  min-height: 74px;
  padding: 12px clamp(16px, 4vw, 56px);
  background: rgba(251, 250, 243, 0.94);
  border-bottom: 1px solid rgba(9, 34, 29, 0.1);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--forest), var(--green));
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(12, 124, 74, 0.24);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 22px;
  color: #27342e;
  font-weight: 750;
}

.nav a {
  white-space: nowrap;
}

.language-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lang-button {
  min-width: 42px;
  height: 34px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.lang-button.is-active {
  color: #fff;
  background: var(--forest);
}

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 390px);
  gap: 32px;
  align-items: end;
  min-height: 620px;
  padding: clamp(54px, 7vw, 92px) clamp(16px, 4vw, 56px) 34px;
  color: #fff;
  overflow: hidden;
  background: #06120f;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(90deg, rgba(6, 18, 15, 0.84), rgba(6, 18, 15, 0.42));
}

.hero-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.03);
  transition:
    opacity 0.7s ease,
    transform 4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

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

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

.hero .eyebrow {
  color: var(--gold);
}

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

h1 {
  overflow-wrap: normal;
  word-break: keep-all;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.94;
}

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

.hero-text {
  max-width: 660px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.72;
}

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

.primary-action,
.secondary-action,
.reset-button,
.details-button,
.load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.primary-action {
  color: #fff;
  background: var(--coral);
  border: 1px solid var(--coral);
}

.secondary-action {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.reset-button,
.details-button,
.load-more {
  color: var(--forest);
  background: #fff;
  border: 1px solid var(--line);
}

.quick-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-panel div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.quick-panel div:last-child {
  border-bottom: 0;
}

.metric {
  color: var(--green);
  font-size: 34px;
  font-weight: 950;
}

.inventory-band,
.process-band,
.about-band,
.inquiry-band {
  padding: 62px clamp(16px, 4vw, 56px);
}

.inventory-band {
  background: #fff;
}

.section-heading {
  display: flex;
  gap: 24px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, minmax(130px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 24px;
  padding: 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filters label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filters input,
.filters select,
.advanced-grid input,
.advanced-grid select,
.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.filters input:focus,
.filters select:focus,
.advanced-grid input:focus,
.advanced-grid select:focus,
.inquiry-form input:focus,
.inquiry-form textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(12, 124, 74, 0.12);
}

.advanced-filters {
  margin: -8px 0 24px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.advanced-filters summary {
  cursor: pointer;
  color: var(--forest);
  font-weight: 900;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.advanced-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.advanced-grid select[multiple] {
  min-height: 92px;
}

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

.car-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(9, 34, 29, 0.08);
}

.image-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  cursor: pointer;
  background: #d7e1dc;
  border: 0;
}

.image-button img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10.4;
  object-fit: cover;
  transition: transform 220ms ease;
}

.car-card:hover .image-button img {
  transform: scale(1.035);
}

.stock-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 7px 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(9, 34, 29, 0.86);
  border-radius: 8px;
}

.car-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.car-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.car-brand {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.car-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.28;
}

.price {
  white-space: nowrap;
  color: var(--coral);
  font-size: 20px;
  font-weight: 950;
}

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

.spec-list span,
.service-list span,
.tag-row span,
.condition-strip span {
  min-width: 0;
  padding: 8px 10px;
  color: #304039;
  background: var(--soft);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 760;
}

.tag-row,
.condition-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  color: #7a5400;
  background: #fff4d6;
}

.card-footer {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.location,
.dialog-location {
  color: var(--muted);
  font-size: 14px;
}

.details-button {
  color: var(--forest);
  background: #edf7f1;
  border-color: #cde8d6;
}

.load-more {
  width: min(260px, 100%);
  margin: 26px auto 0;
}

.load-more[hidden] {
  display: none;
}

.process-band {
  background: var(--cream);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.process-step {
  min-height: 198px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  margin-bottom: 18px;
  color: #fff;
  font-weight: 950;
  background: var(--green);
  border-radius: 8px;
}

.process-step h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.process-step p,
.about-copy p,
.dialog-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.about-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(251, 250, 243, 0.96), rgba(251, 250, 243, 0.78)),
    url("https://www.ucautoexport.com/api/v1/uploads/car/car_1779443678057737263.jpg") center / cover;
}

.about-copy p {
  max-width: 620px;
  margin-top: 14px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-list span {
  padding: 18px;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
}

.inquiry-band {
  background: #fff;
}

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

.inquiry-form textarea {
  grid-column: 1 / -1;
  resize: vertical;
}

.inquiry-form .primary-action {
  width: fit-content;
}

.form-message {
  align-self: center;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: space-between;
  padding: 28px clamp(16px, 4vw, 56px);
  color: #d5e2dc;
  background: var(--forest);
}

.car-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.car-dialog::backdrop {
  background: rgba(6, 18, 15, 0.68);
}

.dialog-close {
  position: sticky;
  top: 10px;
  float: right;
  z-index: 2;
  width: 38px;
  height: 38px;
  margin: 10px 10px -48px 0;
  color: #fff;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.52);
  border: 0;
  border-radius: 8px;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  background: #fff;
}

.dialog-gallery {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  background: #0d1814;
}

.dialog-main-image {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 8px;
}

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

.thumb-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  opacity: 0.82;
}

.thumb-grid img:hover {
  opacity: 1;
}

.thumb-grid button {
  min-height: 64px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  background: #18352d;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.dialog-info {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 30px;
}

.dialog-info h2 {
  margin: 0;
  font-size: 30px;
}

.dialog-info h3 {
  margin: 0 0 8px;
}

.dialog-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dialog-specs div {
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
}

.dialog-specs small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}

.defect-note {
  padding: 10px 12px;
  color: #7a5400;
  background: #fff4d6;
  border-radius: 8px;
}

.detail-page {
  padding: 24px clamp(16px, 4vw, 56px) 96px;
  background: var(--cream);
}

.detail-topbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.detail-gallery,
.detail-summary,
.detail-sections section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(9, 34, 29, 0.08);
}

.detail-gallery {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.detail-main-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 8px;
}

.is-previewable {
  cursor: zoom-in;
}

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

.detail-summary {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.detail-summary h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.04;
}

.price-line {
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.price-line small {
  color: var(--muted);
  font-weight: 900;
}

.whatsapp-action {
  width: 100%;
}

.fob-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fbf6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.fob-box h2 {
  font-size: 20px;
}

.fob-box label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.fob-box select {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.fob-grid div {
  padding: 10px;
  background: #fff;
  border-radius: 8px;
}

.fob-grid small {
  display: block;
  color: var(--muted);
}

.detail-sections {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.detail-sections section {
  padding: 20px;
}

.detail-sections h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.detail-sections p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.appearance-panel {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

.appearance-map {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 16px;
  background: linear-gradient(180deg, #f8fbf6 0%, #edf4ea 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.car-silhouette {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1.75 / 1;
  border-radius: 46% 46% 42% 42% / 35% 35% 34% 34%;
  background: #ffffff;
  border: 2px solid #b8c7bd;
  box-shadow: inset 0 0 0 10px rgba(9, 34, 29, 0.04), 0 18px 38px rgba(9, 34, 29, 0.1);
}

.car-silhouette::before,
.car-silhouette::after {
  position: absolute;
  top: 14%;
  bottom: 14%;
  width: 10px;
  content: "";
  background: #253a35;
  border-radius: 999px;
}

.car-silhouette::before {
  left: -5px;
}

.car-silhouette::after {
  right: -5px;
}

.windshield {
  position: absolute;
  top: 38%;
  width: 14%;
  height: 24%;
  background: #dfeae6;
  border: 1px solid #bfd0c8;
  border-radius: 40%;
}

.windshield.front {
  right: 18%;
}

.windshield.rear {
  left: 18%;
}

.appearance-part {
  position: absolute;
  border: 1px solid rgba(9, 34, 29, 0.16);
  border-radius: 8px;
  background: rgba(225, 235, 230, 0.72);
  cursor: default;
}

.appearance-part span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 4px auto 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
}

.appearance-part.has-defect {
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(255, 201, 66, 0.16);
}

.appearance-part.has-defect span {
  background: #c82f2f;
}

.appearance-part.paint {
  border-color: #d7a229;
  background: rgba(255, 232, 162, 0.78);
}

.appearance-part.repair {
  border-color: #d26b2f;
  background: rgba(255, 207, 175, 0.78);
}

.appearance-part.changed {
  border-color: #316fd1;
  background: rgba(196, 219, 255, 0.82);
}

.appearance-part.defect {
  border-color: #bf3030;
  background: rgba(255, 202, 202, 0.82);
}

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

.defect-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
}

.defect-grid span {
  color: var(--muted);
}

.defect-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.appearance-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.appearance-legend span {
  padding: 8px 10px;
  background: var(--soft);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.appearance-legend .paint {
  background: #ffe8a2;
}

.appearance-legend .repair {
  background: #ffcfae;
}

.appearance-legend .changed {
  background: #c4dbff;
}

.appearance-legend .defect {
  background: #ffcaca;
}

.bottom-action-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 18;
  display: flex;
  justify-content: center;
  padding: 12px clamp(16px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.bottom-action-bar .primary-action {
  width: min(520px, 100%);
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(3, 12, 10, 0.88);
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox img {
  max-width: min(1120px, 96vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .advanced-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .about-band,
  .dialog-layout,
  .detail-shell,
  .appearance-panel {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    max-width: 540px;
  }

  .car-grid,
  .process-grid,
  .inquiry-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    gap: 14px;
    padding: 10px 14px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    display: none;
  }

  .lang-button {
    min-width: 34px;
  }

  .hero {
    min-height: 560px;
  }

  h1 {
    font-size: 40px;
  }

  .section-heading,
  .card-footer,
  .car-title-row {
    align-items: start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .filters,
  .advanced-grid,
  .car-grid,
  .process-grid,
  .inquiry-form,
  .service-list,
  .spec-list,
  .dialog-specs,
  .fob-grid,
  .thumb-grid,
  .defect-grid {
    grid-template-columns: 1fr;
  }

  .appearance-map {
    min-height: 260px;
  }

  .inquiry-form .primary-action,
  .reset-button {
    width: 100%;
  }
}
