.listing-cover { position: relative; overflow: hidden; }
.listing-cover.has-photo { background: #111; }
.listing-cover.has-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.listing-cover.has-photo .car-sil { display: none; }
.listing-cover { height: 168px; }

.car-gal { margin: 0 0 1rem; min-width: 0; max-width: 100%; }
.car-gal-frame {
  position: relative; background: #0b1224; border-radius: 22px; overflow: hidden;
  min-width: 0; max-width: 100%;
}
.car-gal-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  min-width: 0; max-width: 100%;
}
.car-gal-track::-webkit-scrollbar { display: none; }
.car-gal-slide {
  margin: 0; flex: 0 0 100%; min-width: 0; max-width: 100%;
  scroll-snap-align: center; background: #0b1224; overflow: hidden;
}
.car-gal-slide img {
  width: 100%; max-width: 100%; height: 440px; object-fit: contain; display: block; cursor: zoom-in;
}
.car-gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: #0b1f4d; font-size: 1.4rem;
  cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.18);
}
.car-gal-nav.prev { left: 12px; }
.car-gal-nav.next { right: 12px; }
.car-gal-count {
  position: absolute; top: 12px; right: 12px;
  background: rgba(8,14,28,.62); color: #fff; border-radius: 999px;
  padding: .18rem .55rem; font-size: .75rem; font-weight: 800;
  backdrop-filter: blur(8px);
}
.car-gal-dots { display: none; }
.car-gal-thumbs {
  display: flex; gap: .4rem; overflow-x: auto; padding: .55rem 2px 0;
  scrollbar-width: thin;
}
.car-gal-thumb {
  flex: 0 0 86px; height: 58px; padding: 0; border: 2px solid transparent;
  border-radius: 10px; overflow: hidden; background: #111; cursor: pointer;
}
.car-gal-thumb.on { border-color: var(--orange); }
.car-gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.car-lite {
  position: fixed; inset: 0; z-index: 90; background: #000;
  display: grid; align-items: center;
}
.car-lite[hidden] { display: none; }
.car-lite-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  height: 100%; scrollbar-width: none;
}
.car-lite-track::-webkit-scrollbar { display: none; }
.car-lite-track figure {
  margin: 0; flex: 0 0 100%; scroll-snap-align: center;
  display: grid; place-items: center; height: 100%;
}
.car-lite-track img { max-width: 100%; max-height: 100dvh; object-fit: contain; }
.car-lite-x {
  position: absolute; top: calc(.6rem + env(safe-area-inset-top)); left: .7rem; z-index: 2;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.16); color: #fff; font-size: 1.4rem; cursor: pointer;
}
.car-lite-count {
  position: absolute; top: calc(.75rem + env(safe-area-inset-top)); right: .8rem;
  color: #fff; font-weight: 800; font-size: .86rem;
}
body.lite-open { overflow: hidden; }

.vs-card .cover.has-photo { background: #111; }
.vs-card .cover.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vs-card .cover.has-photo .car-sil { display: none; }

@media (max-width: 720px) {
  .listing-grid {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .listing-grid .listing-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: 14px;
    min-height: 0;
  }
  .listing-grid .listing-card:hover {
    transform: none;
    box-shadow: 0 8px 18px rgba(11, 31, 77, .1);
  }
  .listing-grid .listing-cover {
    flex: 0 0 112px;
    width: 112px;
    max-width: 38vw;
    height: auto !important;
    min-height: 104px;
    align-self: stretch;
    border-radius: 0;
  }
  .listing-grid .listing-cover.has-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .listing-grid .listing-cover .car-sil { height: 36px; inset: auto 6px 4px 6px; }
  .listing-grid .listing-cover .badges {
    top: 6px;
    right: 6px;
    left: 6px;
    flex-wrap: wrap;
    gap: .2rem;
  }
  .listing-grid .listing-cover .mini-badge {
    font-size: .62rem;
    padding: .1rem .35rem;
  }
  .listing-grid .listing-body {
    flex: 1;
    min-width: 0;
    padding: .5rem .65rem .55rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: .12rem;
  }
  .listing-grid .listing-body h3 {
    margin: 0;
    font-size: .88rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .listing-grid .listing-meta {
    margin: 0;
    font-size: .72rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .listing-grid .listing-price {
    font-size: .9rem;
    margin-top: .1rem;
  }
  .listing-grid .spark-hit,
  .listing-grid .listing-body > p.listing-meta:last-of-type {
    display: none;
  }
  .listing-grid .card-actions {
    margin-top: .35rem;
    gap: .3rem;
  }
  .listing-grid .card-actions .act-ghost,
  .listing-grid .card-actions .act-cmp {
    display: none;
  }
  .listing-grid .card-actions .act-link {
    padding: .22rem .55rem;
    font-size: .72rem;
  }

  .ads-grid {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .ads-grid .ad-rich {
    padding: .65rem .75rem .7rem;
    border-radius: 14px;
  }
  .ads-grid .ad-rich h3 { margin: .35rem 0 .15rem; font-size: .9rem; }
  .ads-grid .ad-rich .listing-meta { font-size: .72rem; margin: 0 0 .25rem; }
  .ads-grid .ad-rich .lead {
    margin: 0;
    font-size: .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .car-gal { margin: 0 0 .85rem; }
  .car-gal-frame {
    border-radius: 0;
    width: 100vw; margin-right: calc(50% - 50vw); margin-left: calc(50% - 50vw);
  }
  .car-gal-slide img { height: auto; aspect-ratio: 4 / 3; max-height: 72vw; object-fit: cover; }
  .car-gal-nav { display: none; }
  .car-gal-thumbs { display: none; }
  .car-gal-dots {
    display: flex; justify-content: center; gap: 5px;
    position: absolute; left: 0; right: 0; bottom: 10px;
  }
  .car-gal-dots i {
    width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.42);
  }
  .car-gal-dots i.on { background: #fff; width: 16px; border-radius: 99px; }
  .detail-page { padding-top: 0; }
  .detail-grid { padding-top: .4rem; }
}

@media (min-width: 721px) {
  .car-gal-frame { box-shadow: var(--shadow); border: 1px solid var(--line); }
}
