body {
  font-family: "Inter", sans-serif;
  background: #f6f6f6;
  color: #111;
}

.car-page {
  width: min(1380px, calc(100% - 50px));
  margin: auto;
  padding: 35px 0 90px;
}

.car-breadcrumb {
  margin-bottom: 25px;
}

.car-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  color: #777;
  text-decoration: none;

  font-size: 12px;
  font-weight: 600;

  transition: 0.2s;
}

.car-breadcrumb a:hover {
  color: #111;
}

.car-hero {
  display: grid;

  grid-template-columns:
    minmax(0, 1.65fr)
    minmax(390px, 0.8fr);

  gap: 45px;

  align-items: start;
}

.main-photo {
  position: relative;

  width: 100%;
  aspect-ratio: 16 / 10;

  background: #e8e8e8;

  overflow: hidden;

  border-radius: 3px;
}

.main-photo img {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;
}

.fullscreen-viewer {
  display: none;
}

.photo-arrow {
  position: absolute;

  top: 50%;
  transform: translateY(-50%);

  width: 48px;
  height: 48px;

  border: 0;
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.7);

  color: white;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.2s;
}

.photo-arrow:hover {
  background: #000;
}

.photo-arrow-left {
  left: 18px;
}

.photo-arrow-right {
  right: 18px;
}

.photo-counter {
  position: absolute;

  right: 18px;
  bottom: 18px;

  padding: 8px 12px;

  background: rgba(0, 0, 0, 0.75);

  color: white;

  font-size: 11px;
  font-weight: 600;
}

.thumbnail-bar {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-top: 10px;
}

.thumbnails {
  display: flex;

  gap: 8px;

  flex: 1;

  overflow-x: auto;

  scrollbar-width: none;
}

.thumbnails::-webkit-scrollbar {
  display: none;
}

.thumbnail {
  flex: 0 0 105px;

  width: 105px;
  height: 68px;

  padding: 0;

  border: 2px solid transparent;

  background: #eee;

  overflow: hidden;

  cursor: pointer;
}

.thumbnail img {
  width: 100%;
  height: 100%;

  object-fit: cover;
}

.thumbnail.active {
  border-color: #111;
}

.thumb-control {
  width: 35px;
  height: 35px;

  flex: 0 0 35px;

  border: 1px solid #ddd;

  background: white;

  cursor: pointer;
}

.thumb-control:hover {
  background: #111;
  color: white;
}

.car-info {
  padding-top: 5px;
}

.car-status {
  display: flex;
  align-items: center;

  gap: 8px;

  margin-bottom: 14px;

  color: #777;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.5px;
}

.car-status span {
  width: 7px;
  height: 7px;

  border-radius: 50%;

  background: #69a84f;
}

.car-info h1 {
  margin: 0;

  font-size: clamp(34px, 4vw, 52px);

  line-height: 1.03;

  letter-spacing: -2px;

  font-weight: 800;
}

.car-subtitle {
  margin: 13px 0 0;

  color: #777;

  font-size: 13px;

  line-height: 1.7;
}

.car-price-area {
  margin-top: 25px;

  padding-top: 23px;

  border-top: 1px solid #ddd;
}

.price-title {
  display: block;

  margin-bottom: 4px;

  color: #999;

  text-transform: uppercase;

  letter-spacing: 1px;

  font-size: 9px;
  font-weight: 800;
}

.car-price {
  font-size: 38px;

  line-height: 1.1;

  font-weight: 800;

  letter-spacing: -1px;
}

.car-exvat {
  margin-top: 6px;

  color: #777;

  font-size: 11px;
}

.quick-info {
  display: grid;

  grid-template-columns: 1fr 1fr;

  margin-top: 24px;

  border-top: 1px solid #ddd;
  border-left: 1px solid #ddd;
}

.quick-info-item {
  display: flex;
  align-items: center;

  gap: 12px;

  padding: 14px;

  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

.quick-icon {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  background: #f0f0f0;

  display: flex;
  align-items: center;
  justify-content: center;

  color: #555;
}

.quick-icon i {
  color: #111;
}

.quick-info-item span {
  display: block;

  margin-bottom: 4px;

  color: #999;

  font-size: 9px;
}

.quick-info-item strong {
  font-size: 11px;
}

.finance-card {
  margin-top: 18px;

  padding: 20px;

  background: #111;

  color: white;
}

.finance-top {
  display: flex;
  align-items: center;

  justify-content: space-between;
}

.finance-top span {
  display: block;

  margin-bottom: 5px;

  color: #777;

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 1.2px;
}

.finance-top strong {
  font-size: 13px;
}

.finance-top > i {
  color: #777;
  font-size: 20px;
}

.finance-price {
  display: flex;
  align-items: baseline;

  gap: 5px;

  margin-top: 15px;
}

.finance-price small {
  color: #777;
  font-size: 11px;
}

.finance-price strong {
  font-size: 27px;
}

.finance-terms {
  position: relative;
  margin-left: 3px;
}

.finance-terms {
  display: flex;
  align-items: center;
  cursor: help;
}

.finance-terms > i {
  color: #bdbdbd;
  font-size: 14px;
  transition: color 0.2s ease;
}

.finance-terms:hover > i,
.finance-terms:focus > i {
  color: #ffffff;
}

.finance-terms-panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 10px);
  left: 50%;
  width: 210px;
  padding: 13px 14px;
  color: #111111;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
}

.finance-terms:hover .finance-terms-panel,
.finance-terms:focus .finance-terms-panel {
  visibility: visible;
  opacity: 1;
}

.finance-terms-panel strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
}

.finance-terms-panel p {
  margin: 6px 0 0;
  color: #555555;
  font-size: 10px;
  line-height: 1.6;
}

.finance-terms-panel .finance-terms-note {
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid #e5e5e5;
  color: #333333;
  font-weight: 600;
}

.loan-warning {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  margin: 17px 0 0;
  padding: 13px 0 0;
  border-top: 1px solid #333;
}

.loan-warning > i {
  margin-top: 2px;
  color: #e33b32;
  font-size: 15px;
}

.loan-warning > div {
  margin-right: 60px;
}

.loan-warning strong {
  display: block;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
}

.loan-warning p {
  margin: 5px 0 0;
  color: #c5c5c5;
  font-size: 11px;
  line-height: 1.55;
  text-align: justify;
}

.loan-warning a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.finance-card > a {
  display: inline-flex;
  align-items: center;

  gap: 7px;

  margin-top: 12px;

  color: white;

  text-decoration: none;

  font-size: 10px;
  font-weight: 700;
}

.car-actions {
  display: grid;

  grid-template-columns: 1.3fr 1fr;

  gap: 9px;

  margin-top: 13px;
}

.btn-main,
.btn-outline {
  min-height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  text-decoration: none;

  font-size: 11px;
  font-weight: 700;

  transition: 0.2s;
}

.btn-main {
  background: #111;
  color: white;
}

.btn-main:hover {
  background: #333;
}

.btn-outline {
  background: white;
  color: #111;

  border: 1px solid #111;
}

.btn-outline:hover {
  background: #111;
  color: white;
}

.booking-message {
  display: flex;
  align-items: center;

  gap: 10px;

  margin-top: 15px;

  color: #777;

  font-size: 10px;
}

.booking-message i {
  color: #999;
  font-size: 15px;
}

.booking-message strong {
  display: block;

  color: #555;

  font-size: 10px;
}

.booking-message span {
  display: block;
  margin-top: 2px;
}

.content-card {
  margin-top: 25px;

  padding: 35px;

  background: white;

  border: 1px solid #e1e1e1;
}

.content-title {
  display: flex;
  align-items: center;

  gap: 14px;

  margin-bottom: 30px;
}

.content-title-icon {
  width: 44px;
  height: 44px;

  flex: 0 0 44px;

  background: #111;

  color: white;

  display: flex;
  align-items: center;
  justify-content: center;
}

.content-title span {
  display: block;

  margin-bottom: 5px;

  color: #999;

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 1.5px;
}

.content-title h2 {
  margin: 0;

  font-size: 23px;

  font-weight: 800;

  letter-spacing: -0.5px;
}

.specifications {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  border-top: 1px solid #e2e2e2;
  border-left: 1px solid #e2e2e2;
}

.spec-item {
  display: flex;
  align-items: center;

  gap: 13px;

  padding: 17px;

  border-right: 1px solid #e2e2e2;
  border-bottom: 1px solid #e2e2e2;
}

.spec-icon {
  width: 34px;
  height: 34px;

  flex: 0 0 34px;

  background: #f1f1f1;

  color: #555;

  display: flex;
  align-items: center;
  justify-content: center;
}

.spec-icon i {
  color: #111;
}

.spec-content span {
  display: block;

  margin-bottom: 4px;

  color: #999;

  font-size: 9px;
}

.spec-content strong {
  display: block;

  font-size: 11px;
}

.equipment {
  display: grid;

  grid-template-columns: repeat(3, 1fr);

  gap: 7px;
}

.equipment-item {
  display: flex;
  align-items: center;

  gap: 8px;

  padding: 11px 13px;

  background: #f5f5f5;

  color: #444;

  font-size: 10px;
}

.equipment-item i {
  color: #777;
  font-size: 9px;
}

.description {
  color: #555;

  font-size: 13px;

  line-height: 1.85;
}

.description p {
  margin: 0 0 18px;
}

.description p:last-child {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .car-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }
  main {
    overflow: hidden;
  }
  .car-page {
    width: calc(100% - 28px);
    max-width: calc(100vw - 28px);
    padding: 18px 0 55px;
  }
  .car-gallery,
  .car-info,
  .finance-card,
  .car-actions,
  .content-card {
    min-width: 0;
    max-width: 100%;
  }
  .car-breadcrumb {
    margin-bottom: 16px;
  }
  .car-breadcrumb a {
    font-size: 11px;
  }
  .car-hero {
    gap: 24px;
  }
  .main-photo {
    height: 180px;
    aspect-ratio: auto;
    border-radius: 2px;
  }
  .main-photo img {
    object-fit: contain;
  }
  .main-photo img {
    cursor: zoom-in;
  }
  .fullscreen-viewer.is-open {
    position: fixed;
    z-index: 1000;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #080808;
  }
  .fullscreen-viewer img {
    width: 100%;
    max-height: 100dvh;
    object-fit: contain;
  }
  .fullscreen-close,
  .fullscreen-arrow {
    position: absolute;
    z-index: 1;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 15px;
  }
  .fullscreen-close {
    top: 18px;
    right: 16px;
  }
  .fullscreen-arrow {
    top: 50%;
    transform: translateY(-50%);
  }
  .fullscreen-arrow-left {
    left: 12px;
  }
  .fullscreen-arrow-right {
    right: 12px;
  }
  .fullscreen-counter {
    position: absolute;
    bottom: 22px;
    left: 50%;
    padding: 7px 10px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
  }
  body.fullscreen-open {
    overflow: hidden;
  }
  .photo-arrow {
    width: 36px;
    height: 36px;
    font-size: 11px;
  }
  .photo-arrow-left {
    left: 10px;
  }
  .photo-arrow-right {
    right: 10px;
  }
  .photo-counter {
    right: 10px;
    bottom: 10px;
    padding: 6px 9px;
    font-size: 10px;
  }
  .thumbnail-bar {
    width: 100%;
    margin-top: 8px;
    overflow: hidden;
  }
  .thumb-control {
    display: none;
  }
  .thumbnails {
    width: 100%;
    min-width: 0;
    gap: 6px;
    padding-bottom: 2px;
  }
  .thumbnail {
    flex-basis: 72px;
    width: 72px;
    height: 48px;
  }
  .car-info {
    padding-top: 0;
  }
  .car-status {
    margin-bottom: 9px;
  }
  .car-info h1 {
    font-size: clamp(27px, 8vw, 34px);
    letter-spacing: -1.2px;
  }
  .car-subtitle {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.55;
  }
  .car-price-area {
    margin-top: 18px;
    padding-top: 16px;
  }
  .car-price {
    font-size: 32px;
  }
  .quick-info {
    margin-top: 18px;
  }
  .quick-info,
  .specifications,
  .equipment {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quick-info-item {
    gap: 9px;
    padding: 11px 9px;
  }
  .quick-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 11px;
  }
  .quick-info-item span {
    font-size: 8px;
  }
  .quick-info-item strong {
    font-size: 10px;
  }
  .finance-card {
    margin-top: 14px;
    padding: 17px;
  }
  .finance-price {
    margin-top: 11px;
  }
  .finance-price strong {
    font-size: 24px;
  }
  .finance-terms-panel {
    left: auto;
    right: -8px;
    width: 200px;
    transform: none;
  }
  .car-actions {
    margin-top: 12px;
  }
  .btn-main,
  .btn-outline {
    min-height: 48px;
  }
  .booking-message {
    margin-top: 13px;
  }
  .content-card {
    margin-top: 18px;
    padding: 22px 14px;
  }
  .content-title {
    gap: 10px;
    margin-bottom: 20px;
  }
  .content-title-icon {
    width: 37px;
    height: 37px;
    flex-basis: 37px;
    font-size: 13px;
  }
  .content-title h2 {
    font-size: 19px;
  }
  .content-title span {
    margin-bottom: 3px;
    font-size: 8px;
  }
  .spec-item {
    gap: 8px;
    padding: 11px 8px;
  }
  .spec-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    font-size: 10px;
  }
  .spec-content span {
    margin-bottom: 2px;
    font-size: 8px;
  }
  .spec-content strong {
    font-size: 10px;
    overflow-wrap: anywhere;
  }
  .equipment {
    gap: 6px;
  }
  .equipment-item {
    gap: 6px;
    min-width: 0;
    padding: 9px 8px;
    font-size: 9px;
    line-height: 1.35;
  }
  .description {
    font-size: 12px;
    line-height: 1.7;
  }
  .car-actions {
    grid-template-columns: 1fr;
  }
  .loan-warning > div {
    margin-right: 0;
  }
  .loan-warning p {
    font-size: 10px;
  }
}

#mainImage,
#fullscreenImage {
  touch-action: pan-y pinch-zoom;
}
