:root {
  --ink: #15202b;
  --muted: #637182;
  --line: #dce3ea;
  --paper: #f7f8f6;
  --white: #ffffff;
  --green: #0f6b50;
  --green-deep: #0a4636;
  --steel: #23313f;
  --gold: #c89a3d;
  --shadow: 0 20px 50px rgba(21, 32, 43, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

body.modal-open {
  overflow: hidden;
}

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

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

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 48px);
  background: rgba(247, 248, 246, 0.92);
  border-bottom: 1px solid rgba(220, 227, 234, 0.9);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  background: var(--green);
  border-radius: 8px;
  font-weight: 800;
}

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

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

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  color: var(--steel);
  font-size: 14px;
  font-weight: 700;
}

.nav-links a {
  padding: 8px 0;
}

.header-actions,
.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-btn,
.filter-btn {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--steel);
  background: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-btn {
  min-width: 44px;
  padding: 0 12px;
  font-weight: 800;
}

.filter-btn {
  padding: 0 16px;
  font-weight: 700;
}

.lang-btn.is-active,
.filter-btn.is-active {
  color: var(--white);
  background: var(--green);
  border-color: var(--green);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: clamp(32px, 6vw, 76px) clamp(18px, 4vw, 48px);
}

.hero-media {
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #dfe6e4;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

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

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

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

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
}

h2 {
  max-width: 820px;
  font-size: clamp(30px, 4vw, 52px);
}

h3 {
  margin: 0;
  font-size: 18px;
}

.lead {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  max-width: 560px;
}

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

.primary-btn,
.secondary-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
}

.primary-btn {
  color: var(--white);
  background: var(--green);
}

.secondary-btn {
  color: var(--green-deep);
  border: 1px solid var(--green);
  background: transparent;
}

.secondary-btn.light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.72);
}

.top-search-wrap {
  margin: 12px clamp(18px, 4vw, 48px);
  position: relative;
  z-index: 5;
}

.top-search {
  box-shadow: var(--shadow);
}

.section {
  padding: clamp(56px, 8vw, 96px) clamp(18px, 4vw, 48px);
}

.section-soft {
  background: #eef2ef;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

.section-heading.with-filter {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.search-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid rgba(220, 227, 234, 0.95);
  border-radius: var(--radius);
  background: var(--white);
}

.search-label {
  color: var(--steel);
  font-size: 15px;
  font-weight: 900;
}

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

.search-box input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--ink);
  background: #fbfcfb;
  font: inherit;
  outline: none;
}

.search-box input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px rgba(15, 107, 80, 0.12);
}

.clear-search {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: var(--steel);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.result-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.vehicle-grid,
.product-grid,
.guide-grid {
  display: grid;
  gap: 18px;
}

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

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

.vehicle-card,
.product-card,
.guide article {
  background: var(--white);
  border: 1px solid rgba(220, 227, 234, 0.9);
  border-radius: var(--radius);
  overflow: hidden;
}

.vehicle-card,
.product-card {
  content-visibility: auto;
  contain-intrinsic-size: 430px;
}

.vehicle-card[data-halfcut],
.product-card[data-product],
.vehicle-card[data-halfcut] img,
.product-card[data-product] img {
  cursor: pointer;
}

.vehicle-card[data-halfcut] .details-btn,
.product-card[data-product] .details-btn {
  display: none;
}

.vehicle-card img,
.product-cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #dfe6e4;
}

.vehicle-body,
.product-body {
  padding: 18px;
}

.vehicle-body p {
  margin: 10px 0 0;
  color: var(--muted);
}

.vehicle-meta,
.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--green-deep);
  background: #e3f0ea;
  font-size: 12px;
  font-weight: 800;
}

.status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--white);
  background: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.status-badge.reserved {
  background: var(--gold);
}

.status-badge.sold {
  background: var(--muted);
}

.status-badge.draft {
  background: #b42318;
}

.product-card {
  display: flex;
  flex-direction: column;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed #b8c3cc;
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--white);
  text-align: center;
  font-weight: 700;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
}

.product-body p {
  margin: 0;
  color: var(--muted);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}

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

.modal-info .price {
  font-size: 24px;
}

.modal-top-price {
  display: none;
}

.details-btn {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 14px;
  color: var(--white);
  background: var(--steel);
  cursor: pointer;
  font-weight: 800;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.page-btn {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--steel);
  background: var(--white);
  cursor: pointer;
  font-weight: 900;
}

.page-btn.is-active {
  color: var(--white);
  border-color: var(--green);
  background: var(--green);
}

.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.page-status {
  width: 100%;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 800;
}

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

.guide article {
  padding: 22px;
}

.guide span {
  display: inline-flex;
  margin-bottom: 24px;
  color: var(--gold);
  font-weight: 900;
}

.guide p {
  margin: 10px 0 0;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 0 clamp(18px, 4vw, 48px) clamp(18px, 4vw, 48px);
  padding: clamp(28px, 5vw, 56px);
  color: var(--white);
  background: var(--green-deep);
  border-radius: var(--radius);
}

.contact .eyebrow {
  color: #aee1ca;
}

.contact h2 {
  max-width: 760px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(11, 22, 31, 0.72);
}

.modal.is-open {
  display: flex;
}

.modal-panel {
  position: relative;
  width: min(1180px, 100%);
  max-height: 92vh;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--white);
}

.modal-close {
  position: sticky;
  top: 14px;
  z-index: 2;
  float: right;
  width: 42px;
  height: 42px;
  margin: 14px 14px 0 0;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--steel);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.mobile-swipe-close-zone {
  display: none;
}

.modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  padding: 28px;
}

.gallery-main {
  width: 100%;
  height: min(68vh, 640px);
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f8f7;
}

.gallery-main-button {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: zoom-in;
  touch-action: pan-y;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(5, 12, 18, 0.88);
  touch-action: none;
}

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

.image-lightbox img {
  max-width: min(1200px, 100%);
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: #dfe6e4;
  transition: transform 0.18s ease;
  user-select: none;
}

.image-lightbox-count {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--white);
  background: rgba(21, 32, 43, 0.68);
  font-size: 13px;
  font-weight: 900;
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--steel);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.gallery-count {
  display: none;
}

.thumb-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 4px 8px 0;
  scroll-snap-type: x proximity;
}

.thumb-row button {
  position: relative;
  flex: 0 0 82px;
  border: 2px solid transparent;
  border-radius: 7px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
}

.thumb-row button.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(15, 107, 80, 0.16);
}

.thumb-row img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.thumb-row span {
  display: none;
}

.modal-info h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.modal-info p {
  color: var(--muted);
}

.modal-info .modal-description {
  white-space: pre-line;
}

.spec-list {
  display: grid;
  gap: 8px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}

.spec-list li {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #f0f4f2;
  font-weight: 700;
}

@media (max-width: 1040px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero,
  .modal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .modal {
    padding: 0;
    align-items: stretch;
  }

  .modal-panel {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-layout {
    gap: 16px;
    padding: 12px;
  }

  .modal-close {
    display: none;
  }

  .mobile-swipe-close-zone {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 3;
    display: block;
    width: 34px;
    touch-action: pan-y;
  }

  .gallery-main {
    display: block;
    height: auto;
    max-height: 58vh;
    border-radius: 7px;
    background: transparent;
  }

  .image-lightbox {
    padding: 0;
    background: rgba(0, 0, 0, 0.94);
  }

  .image-lightbox img {
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    background: transparent;
  }

  .image-lightbox-close {
    top: 12px;
    right: 12px;
    background: rgba(21, 32, 43, 0.68);
  }

  .image-lightbox-count {
    top: 16px;
  }

  .thumb-row {
    gap: 8px;
  }

  .thumb-row button {
    flex-basis: 64px;
  }

  .modal-info h2 {
    font-size: 24px;
  }

  .modal-info .modal-description {
    color: var(--ink);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.45;
  }

  .modal-info .modal-keywords {
    display: none;
  }

  .spec-list {
    margin: 16px 0;
  }

  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    min-width: 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
    padding-top: 28px;
    padding-bottom: 26px;
    gap: 20px;
  }

  .hero-media img {
    aspect-ratio: 16 / 8;
  }

  h1 {
    font-size: 36px;
  }

  .lead {
    margin-top: 16px;
    font-size: 16px;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .top-search-wrap {
    margin: 10px 18px;
  }

  .guide-grid,
  .contact,
  .section-heading.with-filter {
    grid-template-columns: 1fr;
  }

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

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

  .vehicle-card,
  .product-card {
    border-radius: 7px;
  }

  .vehicle-card img,
  .product-cover {
    aspect-ratio: 1 / 1;
  }

  .vehicle-body,
  .product-body {
    padding: 7px;
    gap: 5px;
  }

  .vehicle-meta,
  .product-meta,
  .vehicle-body p,
  .product-body p,
  .pill-row {
    display: none;
  }

  .vehicle-body h3,
  .product-body h3 {
    display: -webkit-box;
    min-height: 28px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-size: 10px;
    line-height: 1.25;
  }

  .product-footer,
  .halfcut-footer {
    display: grid;
    gap: 5px;
  }

  .price {
    font-size: 13px;
    line-height: 1.15;
  }

  .modal-info .product-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
  }

  .modal-info .modal-top-price {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    align-self: flex-start;
    margin: -2px 0 2px;
    font-size: 22px;
    line-height: 1.2;
  }

  .modal-info .modal-footer-price {
    display: none;
  }

  .modal-info .primary-btn {
    justify-self: end;
    white-space: nowrap;
  }

  .filter-row {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .contact-actions {
    margin-top: 0;
  }

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