/* Listing detail: gallery, buy box, contact reveal, similar listings. */
[x-cloak] { display: none !important; }

.ld-page { max-width: 1120px; margin: 0 auto; padding: 20px 16px 96px; }
.ld-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) {
  .ld-layout { grid-template-columns: minmax(0, 3fr) minmax(320px, 2fr); }
  .ld-side { position: sticky; top: 88px; }
  .ld-page { padding-bottom: 48px; }
}

/* Module offer pages share the shop page width (.shop-detail-main) and its
   column proportions. */
.shop-detail-main > .ld-page { max-width: none; padding: 0 0 96px; }
@media (min-width: 900px) {
  .shop-detail-main .ld-layout { grid-template-columns: minmax(0, 1.85fr) minmax(315px, .85fr); gap: 20px; }
  .shop-detail-main > .ld-page { padding-bottom: 0; }
}

.ld-card { background: #fff; border: 1px solid #e7e5df; border-radius: 16px; padding: 20px; box-shadow: 0 1px 2px rgba(21, 62, 53, .04); margin-bottom: 16px; }
.ld-card h2 { font-size: 1rem; font-weight: 700; color: #153e35; margin: 0 0 10px; }

/* Gallery */
.ld-gallery { margin-bottom: 16px; }
.ld-stage { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #e7e5df; cursor: zoom-in; isolation: isolate; }
.ld-stage::before { content: ""; position: absolute; inset: -24px; background: var(--ld-bg) center / cover no-repeat; filter: blur(28px) brightness(.85); z-index: -1; }
.ld-stage-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ld-stage--empty { display: flex; align-items: center; justify-content: center; color: #64748b; cursor: default; background: #f1efe8; }
.ld-stage--empty::before { display: none; }
.ld-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .9); color: #153e35; font-size: 26px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.ld-nav--prev { left: 12px; }
.ld-nav--next { right: 12px; }
.ld-stage:hover .ld-nav, .ld-nav:focus-visible, .ld-lightbox .ld-nav { opacity: 1; }
@media (hover: none) { .ld-stage .ld-nav { opacity: 1; } }
.ld-counter { position: absolute; right: 12px; bottom: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(15, 48, 41, .78); color: #fff; font-size: 12px; font-weight: 600; }
.ld-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
.ld-thumb { flex: 0 0 76px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: .75; }
.ld-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-thumb.is-active { border-color: #153e35; opacity: 1; }
.ld-lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8, 20, 17, .94); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ld-lightbox-img { max-width: 100%; max-height: 92vh; object-fit: contain; border-radius: 8px; }
.ld-lightbox-close { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: #fff; font-size: 36px; line-height: 1; cursor: pointer; }
.ld-lightbox .ld-counter { bottom: 20px; }

/* Buy box */
.ld-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ld-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #eef2ef; color: #153e35; font-size: 12px; font-weight: 600; }
.ld-chip--accent { background: #dff0e8; color: #0b5745; }
.ld-buybox h1 { font-size: 1.5rem; line-height: 1.25; color: #153e35; margin: 0 0 8px; }
.ld-price { font-size: 2rem; font-weight: 800; color: #0b5745; margin: 0 0 8px; }
.ld-meta { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; color: #64748b; font-size: 13px; }
.ld-desc p { margin: 0; color: #334155; line-height: 1.6; }
.ld-desc p.is-clamped { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.ld-more { border: 0; background: none; padding: 6px 0 0; color: #0b5745; font-weight: 700; cursor: pointer; }
.ld-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ld-facts li { padding: 4px 12px; border-radius: 999px; background: #f4f2ec; color: #334155; font-size: 13px; }

/* Contacts */
.ld-contact { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ld-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 13px 16px; border: 0; border-radius: 12px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; color: #fff; background: #0b5745; }
.ld-btn:hover { filter: brightness(1.08); }
.ld-btn--whatsapp { background: #1f9d55; }
.ld-btn--telegram { background: #229ed9; }
.ld-btn--ghost { background: #fff; color: #153e35; border: 1px solid #cfd8d3; }
.ld-mask { font-variant-numeric: tabular-nums; opacity: .85; letter-spacing: .02em; }
.ld-notice { border: 1px solid #f2d48a; background: #fff8e6; border-radius: 12px; padding: 14px 16px; color: #5c4a12; font-size: 14px; }
.ld-notice p { margin: 6px 0 12px; line-height: 1.5; }
.ld-notice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ld-notice-actions .ld-btn { width: auto; flex: 1 1 120px; padding: 10px 14px; }
.ld-safety { margin: 0; border: 1px solid #f2d48a; background: #fff8e6; border-radius: 12px; padding: 12px 14px; font-size: 12.5px; color: #5c4a12; }
.ld-safety p { margin: 4px 0 0; }

@media (max-width: 899px) {
  .ld-main { display: contents; }
  .ld-gallery { order: 1; }
  .ld-side { order: 2; }
  .ld-main > .ld-card { order: 3; }
  .ld-contact-slot:first-child { flex: 1.5 1 0; }
  .ld-contact { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); flex-direction: row; flex-wrap: wrap; background: #fff; border-top: 1px solid #e7e5df; box-shadow: 0 -4px 16px rgba(0, 0, 0, .08); }
  .ld-contact-slot { flex: 1 1 0; min-width: 0; }
  #contact-feedback { flex: 1 1 100%; }
  .ld-contact .ld-btn { padding: 11px 10px; font-size: 14px; }
  .ld-contact .ld-mask { display: none; }
}

/* Similar listings */
.ld-similar { margin-top: 24px; }
.ld-similar h2 { font-size: 1.1rem; color: #153e35; margin: 0 0 12px; }
.ld-similar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 900px) { .ld-similar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ld-similar-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; background: #fff; border: 1px solid #e7e5df; border-radius: 14px; text-decoration: none; color: #153e35; }
.ld-similar-card img, .ld-similar-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #f1efe8; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 12px; }
.ld-similar-price { color: #0b5745; font-weight: 700; }
.ld-similar-meta { color: #64748b; font-size: 12px; }

/* Vehicle specifications */
.ld-subtitle { margin: -4px 0 8px; color: #475569; font-size: 14px; }
.ld-specs { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.ld-specs > div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #efede6; font-size: 14px; }
.ld-specs dt { color: #64748b; }
.ld-specs dd { margin: 0; font-weight: 600; color: #153e35; text-align: right; overflow-wrap: anywhere; }
.ld-note { margin: 0 0 10px; color: #64748b; font-size: 13px; }
.ld-verifications { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
@media (max-width: 640px) { .ld-specs { grid-template-columns: 1fr; } }
