/* ==========================================================================
   LISTING PAGE (item detail) - gallery left, info panel right
   Loaded only on ad pages, after style.css / responsive.css.
   ========================================================================== */

body#body-item #listing.inside {padding-top:20px;}

/* the theme's own right rail is replaced by the .ld-side panel */
body#body-item #listing .item {width:100%;float:none;margin:0 0 20px 0;}
body#body-item #listing .side {display:none!important;}

/* the image box is a transparent grid, every block is its own card now */
body#body-item #listing .wbox.imgbox {background:transparent;box-shadow:none;border-radius:0;padding:0;}

/* ---------------- GALLERY ---------------- */
body#body-item #listing .main-data {float:left;clear:none;width:calc(100% - 404px);margin:0;padding:0;background:transparent;border-radius:0;}
body#body-item #listing .main-data > .img {float:none;width:100%;position:relative;}

.ld-stage {position:relative;border-radius:12px;overflow:hidden;background:#e9ecf1;aspect-ratio:8/5;}
.ld-stage .swiper-container,
.ld-stage .swiper-wrapper {width:100%!important;height:100%!important;}
.ld-stage .swiper-slide {display:block;width:100%!important;height:100%!important;aspect-ratio:auto!important;border-radius:0;background-color:transparent;}
.ld-stage .swiper-slide > a {display:block;width:100%;height:100%;line-height:0;}
.ld-stage .swiper-slide img {display:block;width:100%;height:100%!important;aspect-ratio:auto!important;object-fit:cover;border-radius:0;}

.ld-stage .swiper-pg {display:none;}

.ld-stage .swiper-button,
body#body-item .ld-stage .swiper-button {
  top:50%;margin:-22px 0 0 0;width:44px;height:44px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  background:#fff;color:#2b3038;box-shadow:0 4px 14px rgba(16,24,40,.22);
  transition:transform .15s, box-shadow .15s, background .15s;
}
.ld-stage .swiper-button i {display:block;line-height:1;width:auto;height:auto;font-size:15px;font-weight:900;}
.ld-stage .swiper-button:not(.swiper-button-disabled):hover,
body#body-item .ld-stage .swiper-button:not(.swiper-button-disabled):hover {width:44px;background:#fff;transform:scale(1.07);box-shadow:0 6px 18px rgba(16,24,40,.3);}
.ld-stage .swiper-button-disabled {opacity:.45;cursor:default;}
.ld-stage .swiper-button.swiper-prev {left:14px;border-radius:50%;text-align:center;}
.ld-stage .swiper-button.swiper-next {right:14px;border-radius:50%;text-align:center;}

.ld-counter {position:absolute;left:14px;bottom:14px;z-index:3;background:rgba(17,24,39,.68);color:#fff;font-size:13px;font-weight:600;line-height:1;padding:8px 11px;border-radius:7px;letter-spacing:.4px;}
.ld-counter .cur {font-weight:800;}
.ld-counter .sep {opacity:.75;margin:0 4px;}

.ld-zoom {position:absolute;right:14px;top:14px;z-index:3;width:38px;height:38px;border-radius:50%;background:#fff;color:#1f2430;display:flex;align-items:center;justify-content:center;font-size:13px;box-shadow:0 4px 12px rgba(16,24,40,.22);text-decoration:none;}
.ld-zoom:hover {background:#fff;color:#111;text-decoration:none;transform:scale(1.05);}

/* bottom thumbnail strip */
body#body-item .main-data > .thumbs,
body#body-item .main-data > .thumbs[style] {
  display:block!important;position:relative;top:auto;right:auto;width:100%;height:auto;
  overflow:visible;padding:0;margin-top:10px;
}
body#body-item .main-data > .thumbs .scroll {display:none!important;}
body#body-item .main-data > .thumbs ul {
  position:static;top:auto;left:auto;width:100%;height:auto;display:flex;flex-wrap:nowrap;
  gap:8px;overflow-x:auto;overflow-y:hidden;padding:0;margin:0;
  scrollbar-width:none;-ms-overflow-style:none;
  overscroll-behavior-x:contain;
}
body#body-item .main-data > .thumbs ul::-webkit-scrollbar {display:none;height:0;width:0;}
body#body-item .main-data > .thumbs li {
  float:none;clear:none;width:66px;flex:0 0 66px;height:66px;padding:0;margin:0;border-radius:8px;
  background:transparent!important;overflow:hidden;
}
body#body-item .main-data > .thumbs li img {
  display:block;width:100%;height:100%;object-fit:cover;border-radius:8px;border:2px solid transparent;
  box-sizing:border-box;
  background:#eef0f4;transition:border-color .15s;
}
body#body-item .main-data > .thumbs li:hover img {border-color:#d6dae1;}
body#body-item .main-data > .thumbs li.active img {border-color:#f97316;}

body#body-item .main-data > .image-empty {border-radius:12px;background:#eef0f4;padding:80px 0;text-align:center;color:#8b929b;}

/* ---------------- INFO PANEL (right) ---------------- */
body#body-item #listing .ld-side {float:right;width:384px;margin:0 0 14px 20px;}

.ld-card {float:none;width:100%;background:#fff;border:1px solid #eceef2;border-radius:12px;padding:20px;margin:0 0 14px 0;box-shadow:0 1px 2px rgba(16,24,40,.04);}
.ld-card:after {content:"";display:table;clear:both;}

.ld-info-head {margin:0 0 16px;}
.ld-title,
body#body-item #listing .ld-title {
  display:block;width:100%;float:none;margin:0 0 12px 0;padding:0;
  font-family:'Nunito','Poppins',sans-serif;font-size:22px;line-height:1.28;
  font-weight:700;color:#111827;letter-spacing:-.1px;
}
.ld-price-row {display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px 0;}
.ld-price,
body#body-item #listing .ld-price {
  float:none;margin:0;font-size:20px;line-height:1.1;font-weight:800;letter-spacing:-.3px;
}
.ld-price .cur {font-size:.72em;font-weight:700;letter-spacing:.3px;margin-left:0;color:inherit;text-transform:none;vertical-align:1px;}
.ld-date {font-size:13px;color:#8b929b;white-space:nowrap;}

.ld-loc {display:flex;align-items:center;gap:8px;font-size:14px;line-height:20px;color:#6b7280;}
.ld-loc i {color:#9aa1a9;font-size:13px;width:12px;text-align:center;}
.ld-loc a {color:#6b7280;}
.ld-loc a:hover {color:#374151;}

.ld-cta {display:flex;flex-direction:column;gap:9px;margin:0 0 14px 0;}
.ld-btn {display:flex;align-items:center;justify-content:center;gap:9px;height:46px;padding:0 14px;border-radius:9px;border:1.5px solid transparent;font-size:15px;font-weight:600;line-height:1;text-decoration:none;transition:background .15s,border-color .15s,color .15s;}
.ld-btn i {font-size:16px;line-height:1;}
.ld-btn:hover {text-decoration:none;}
.ld-btn-wa {background:#16a34a;border-color:#16a34a;color:#fff!important;}
.ld-btn-wa:hover {background:#15803d;border-color:#15803d;color:#fff!important;}
.ld-btn-call {background:#fff;border-color:#16a34a;color:#15803d!important;}
.ld-btn-call:hover {background:#f0fdf4;color:#15803d!important;}
.ld-btn-call.shown {background:#f0fdf4;border-color:#15803d;cursor:default;}
.ld-btn-offer {background:#fff;border-color:#f2ab3c;color:#d97706!important;}
.ld-btn-offer:hover {background:#fffbeb;color:#b45309!important;}

.ld-actions {display:flex;gap:8px;margin:0 0 14px 0;}
.ld-action {position:relative;flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:10px 3px;border:1px solid #e7e9ee;border-radius:9px;background:#fff;font-size:11.5px;font-weight:600;line-height:1.1;color:#4b5563!important;text-decoration:none;cursor:pointer;transition:border-color .15s,background .15s,color .15s;}
.ld-action i {font-size:15px;color:#6b7280;line-height:1;}
.ld-action:hover {border-color:#d7dae0;background:#fafbfc;text-decoration:none;}
.ld-action.active {border-color:#f6c7cb;color:#ef404f!important;}
.ld-action.active i {color:#ef404f;}
.ld-action summary,
details.ld-action > summary {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;list-style:none;width:100%;}
.ld-action summary::-webkit-details-marker {display:none;}
.ld-report[open] {border-color:#d7dae0;background:#fafbfc;}
.ld-report-menu {position:absolute;right:0;top:calc(100% + 6px);z-index:20;display:flex;flex-direction:column;min-width:158px;padding:6px;background:#fff;border:1px solid #e7e9ee;border-radius:9px;box-shadow:0 12px 26px rgba(16,24,40,.16);}
.ld-report-menu a {padding:7px 10px;border-radius:6px;font-size:13px;font-weight:500;color:#374151!important;text-decoration:none;text-align:left;}
.ld-report-menu a:hover {background:#f5f6f8;text-decoration:none;}

.ld-tip {display:flex;gap:10px;padding:12px 14px;border:1px solid #eef0f3;border-radius:9px;background:#f8f9fb;font-size:13px;line-height:19px;color:#4b5563;}
.ld-tip > i {color:#9aa1a9;font-size:16px;margin-top:2px;flex:0 0 auto;}
.ld-tip b {color:#374151;font-weight:700;}

/* ---------------- LOWER LEFT COLUMN ---------------- */
body#body-item #listing .data {float:left;clear:left;width:calc(100% - 404px);margin:0;padding:0;background:transparent;}
body#body-item .data .description {float:none;width:100%;margin:0;}
body#body-item .data .description .text {float:none;width:100%;margin:0;color:#374151;font-size:15px;line-height:24px;}
body#body-item .data .description .text p {margin:0 0 10px 0;}
body#body-item .data .description .text p:last-child {margin-bottom:0;}

/* category path under the city in the info panel: menu icon + "Véhicules, Voitures" */
.ld-cats {display:flex;align-items:center;gap:9px;margin:0 0 7px 0;}
.ld-cats .ci {flex:0 0 auto;display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1;color:#6b7280;background:none;}
.ld-cats .ci img {width:15px;height:15px;object-fit:contain;}
.ld-cats .ct {min-width:0;font-size:14px;font-weight:400;line-height:20px;color:#6b7280;}
.ld-cats .ct a {font-size:14px;font-weight:400;line-height:20px;color:#6b7280;text-decoration:none;}
.ld-cats .ct a:hover {color:#111827;text-decoration:underline;}
.ld-cats .sep {color:#9aa1a9;}

.ld-card-head {display:flex;align-items:center;gap:11px;margin:0 0 16px 0;}
.ld-card-head .hd-ic {display:flex;align-items:center;justify-content:center;flex:0 0 34px;width:34px;height:34px;border-radius:9px;background:#f3f4f6;color:#b0b6bf;font-size:14px;}
.ld-card-head h2,
body#body-item #listing .ld-card-head h2 {float:none;clear:none;width:auto;display:block;margin:0;padding:0;font-family:'Nunito','Poppins',sans-serif;font-size:17px;line-height:22px;font-weight:700;color:#111827;}
.ld-card-head .hd-count {margin-left:auto;padding:4px 8px;border-radius:6px;background:#f3f4f6;color:#6b7280;font-size:12px;font-weight:700;line-height:1;}

.ld-specs {padding-bottom:18px;}
.ld-specs-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;}
.ld-spec {display:flex;align-items:center;gap:10px;min-width:0;padding:10px 12px;background:#fafbfc;border:1px solid #f0f1f4;border-radius:9px;}
.ld-spec .si {display:flex;align-items:center;justify-content:center;flex:0 0 26px;width:26px;height:26px;border-radius:50%;background:#f1f3f6;color:#4b5563;font-size:10.5px;}
.ld-spec .st {display:flex;flex-direction:column;gap:2px;min-width:0;}
.ld-spec .st em {font-style:normal;font-size:11.5px;line-height:14px;color:#8b929b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.ld-spec .st strong {font-size:14px;line-height:18px;font-weight:700;color:#1f2937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

/* ---------------- SELLER ---------------- */
.ld-seller-head {display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 16px 0;}
.ld-seller-head h2,
body#body-item #listing .ld-seller-head h2 {float:none;clear:none;width:auto;display:block;margin:0;padding:0;font-size:16px;line-height:20px;font-weight:700;color:#111827;}
.ld-badge {display:inline-flex;align-items:center;gap:5px;padding:4px 9px;border-radius:6px;background:#f3f4f6;color:#4b5563;font-size:11.5px;font-weight:600;line-height:1.2;}
.ld-badge i {font-size:10px;}
.ld-seller-center {text-align:center;margin:0 0 14px 0;}
.ld-avatar {display:flex;align-items:center;justify-content:center;width:62px;height:62px;margin:0 auto 9px auto;border-radius:50%;background:#6b7280;color:#fff;font-size:24px;font-weight:600;line-height:1;text-transform:uppercase;}
.ld-seller-name {display:block;font-size:16px;font-weight:700;color:#111827;line-height:20px;}
.ld-seller-name a {color:inherit!important;}
.ld-seller-rows {border:1px solid #eef0f3;border-radius:9px;overflow:hidden;}
.ld-seller-row {display:flex;align-items:center;gap:8px;padding:9px 12px;border-bottom:1px solid #f1f2f5;font-size:13px;line-height:18px;color:#4b5563;}
.ld-seller-row:last-child {border-bottom:none;}
.ld-seller-row > i {flex:0 0 14px;width:14px;text-align:center;color:#9aa1a9;font-size:12px;}
.ld-seller-row a {font-weight:600;color:#111827!important;}
.ld-seller-row .ok {margin-left:auto;color:#16a34a;font-size:12px;}
.ld-seller-row .muted {color:#8b929b;}
.ld-seller-count {display:block;margin-top:12px;padding:10px;border:1px solid #dfe2e7;border-radius:9px;text-align:center;font-size:14px;font-weight:600;color:#374151!important;text-decoration:none;}
.ld-seller-count:hover {background:#fafbfc;text-decoration:none;}
.ld-card.ld-seller {margin:0 0 28px 0;}
.ld-manage {display:flex;gap:8px;margin:0 0 14px 0;}
.ld-manage a {flex:1;padding:9px;border:1px solid #dfe2e7;border-radius:8px;text-align:center;font-size:13px;font-weight:600;color:#374151!important;}
.ld-manage a:hover {text-decoration:none;background:#fafbfc;}
.ld-manage a.remove {color:#dc2626!important;border-color:#f3c9c9;}

/* ---------------- RESPONSIVE ---------------- */
@media screen and (max-width:1180px) {
  body#body-item #listing .main-data,
  body#body-item #listing .data {width:calc(100% - 344px);}
  body#body-item #listing .ld-side {width:324px;margin-left:20px;}
  .ld-price, body#body-item #listing .ld-price {font-size:18px;}
  .ld-title, body#body-item #listing .ld-title {font-size:20px;}
}

@media screen and (min-width:768px) and (max-width:1024px) {
  .ld-specs-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .ld-card {padding:16px;}
  .ld-actions {gap:6px;}
  .ld-action {font-size:10.5px;padding:9px 2px;}
}

@media screen and (max-width:767px) {
  body#body-item #listing.inside {padding:0 0 20px 0;}
  body#body-item #listing .wbox.imgbox {padding:0;}
  body#body-item #listing .main-data,
  body#body-item #listing .data {float:none;width:100%;}
  body#body-item #listing .main-data {margin:0 0 10px 0;}
  body#body-item #listing .ld-side {float:none;width:100%;margin:0 0 10px 0;}
  body#body-item #listing .ld-card {border-radius:10px;padding:16px;margin:0 0 10px 0;}
  body#body-item #listing .ld-card.ld-seller {margin-bottom:24px;}
  .ld-stage {border-radius:10px;}
  .ld-stage {aspect-ratio:4/3;}
  .ld-stage .swiper-button,
  body#body-item .ld-stage .swiper-button {width:38px;height:38px;margin-top:-19px;}
  .ld-stage .swiper-button i {font-size:14px;}
  .ld-stage .swiper-button.swiper-prev {left:8px;}
  .ld-stage .swiper-button.swiper-next {right:8px;}
  .ld-stage .swiper-button.swiper-next,
  .ld-stage .swiper-button.swiper-prev {border-radius:50%;}
  .ld-counter {left:8px;bottom:8px;font-size:12px;padding:6px 9px;}
  .ld-zoom {right:8px;top:8px;width:32px;height:32px;font-size:11px;}
  .ld-title, body#body-item #listing .ld-title {font-size:18px;line-height:1.32;}
  .ld-price, body#body-item #listing .ld-price {font-size:16px;}
  .ld-specs-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
  .ld-spec {padding:8px 10px;gap:8px;}
  .ld-spec .si {flex:0 0 24px;width:24px;height:24px;font-size:10px;}
  .ld-spec .st strong {font-size:13px;}
  body#body-item .main-data > .thumbs {margin-top:8px;}
  body#body-item .main-data > .thumbs ul {gap:6px;}
  body#body-item .main-data > .thumbs li {width:54px;flex:0 0 54px;height:54px;}
  body#body-item .main-data > .thumbs li img {height:100%;border-radius:7px;}
}

@media screen and (max-width:420px) {
  .ld-specs-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
  .ld-action {font-size:10px;}
  .ld-action i {font-size:14px;}
  .ld-btn {height:44px;font-size:14px;}
}

/* ---------------- LIGHTBOX ---------------- */
/* near-opaque black backdrop; no blur, no caption */
.lg-backdrop {background:rgba(0,0,0,.9)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
.lg-outer .lg-sub-html {display:none!important;}

/* thumbnail strip: no black bar, group centred under the image */
.lg-outer .lg-thumb-outer {background:transparent!important;}
.lg-outer .lg-thumb {margin:0 auto!important;}
.lg-outer .lg-thumb {white-space:nowrap!important;overflow:visible;}
.lg-outer .lg-thumb-item {float:none!important;display:inline-block!important;vertical-align:top;margin-right:5px!important;}
.lg-outer .lg-thumb-item {border-radius:6px;overflow:hidden;opacity:.6;transition:opacity .15s,border-color .15s;}
.lg-outer .lg-thumb-item.active, .lg-outer .lg-thumb-item:hover {opacity:1;}
.lg-outer .lg-thumb-item img {border-radius:6px;object-fit:cover;}

/* mobile sticky summary bar (isMobile c3) removed */
#item-summary {display:none!important;}

/* desktop: breathing room under the gallery before the description */
@media screen and (min-width:768px) {
  body#body-item #listing .main-data {margin-bottom:22px;}
}

/* ---------------- RELATED ITEMS ---------------- */
/* one horizontal row like the home page category rows: 5 cards in view on desktop,
   3 on tablet, 2 on phones, the rest reached by swipe or the arrows */
#rel-block.ld-related .ld-rel-head {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
#rel-block.ld-related .ld-rel-head h3 {margin:0;}
#rel-block.ld-related .ld-rel-arrows {display:flex;gap:6px;}
#rel-block.ld-related .ld-rel-arrows.is-hidden {display:none;}
#rel-block.ld-related .ld-rel-arrow {width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;border-radius:50%;background:#fff;color:#4b5563;font-size:13px;line-height:1;cursor:pointer;transition:0.2s;}
#rel-block.ld-related .ld-rel-arrow:hover {background:#f3f4f6;color:#111;}
#rel-block.ld-related .ld-rel-arrow.is-off {opacity:0.35;pointer-events:none;}
#rel-block.ld-related .ld-rel-row {display:flex;gap:16px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:2px;}
#rel-block.ld-related .ld-rel-row::-webkit-scrollbar {display:none;width:0;height:0;}
#rel-block.ld-related .ld-rel-row > .simple-prod {flex:0 0 calc((100% - 64px) / 5);scroll-snap-align:start;}
#rel-block.ld-related .simple-prod {float:none!important;display:block!important;width:auto!important;margin:0!important;}

@media screen and (min-width:768px) and (max-width:1024px) {
  #rel-block.ld-related .ld-rel-row {gap:12px;}
  #rel-block.ld-related .ld-rel-row > .simple-prod {flex:0 0 calc((100% - 24px) / 3);}
}

@media screen and (max-width:767px) {
  #rel-block.ld-related .ld-rel-row {gap:10px;}
  #rel-block.ld-related .ld-rel-row > .simple-prod {flex:0 0 calc((100% - 10px) / 2);}
}

/* card look copied from the home page rows: picture, title, price, category, city/date */
#rel-block.ld-related .simple-prod {border:1px solid #eee;border-radius:8px;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.1);overflow:hidden;}
#rel-block.ld-related .simple-prod .img-wrap {position:relative;width:100%;height:150px;margin:0;overflow:hidden;}
#rel-block.ld-related .simple-prod .img-wrap img {width:100%;height:100%;object-fit:cover;transition:transform .4s ease;}
#rel-block.ld-related .simple-prod:hover .img-wrap img {transform:scale(1.08);}
#rel-block.ld-related .simple-prod .data {position:relative;display:grid;grid-template-columns:1fr;grid-template-areas:"title" "price" "category" "meta";align-items:start;padding:10px;background:#fff;}
#rel-block.ld-related .simple-prod .title {grid-area:title;float:none;width:auto;margin:0 0 4px 0;padding:0;font-size:14px;font-weight:700;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#rel-block.ld-related .simple-prod .price {grid-area:price;float:none;width:auto;margin:0 0 4px 0;padding:0;text-align:left;font-size:16px;font-weight:700;line-height:1.4;color:#DC2626;}
#rel-block.ld-related .simple-prod .category {grid-area:category;float:none;width:auto;margin:0;padding:0;font-size:12px;color:#666;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#rel-block.ld-related .simple-prod .meta-info {grid-area:meta;display:flex;flex-direction:column;margin:0;padding:0;line-height:1.5;}
#rel-block.ld-related .simple-prod .meta-info .city {font-size:12px;color:#999;}
#rel-block.ld-related .simple-prod .meta-info .date {font-size:11px;color:#999;}
#rel-block.ld-related .simple-prod:hover .title {text-decoration:underline;}

/* copy link feedback */
.ld-actions .ld-action.ld-share.is-copied {color:#16a34a;}
.ld-actions .ld-action.ld-share.is-copy-failed {color:#dc2626;}

/* delete actions are POST forms so link prefetching can never remove a listing */
.ld-manage form.ld-manage-del {flex:1;margin:0;}
.ld-manage button.remove {width:100%;padding:9px;border:1px solid #f3c9c9;border-radius:8px;background:#fff;font:inherit;font-size:13px;font-weight:600;color:#dc2626;cursor:pointer;}
.ld-manage button.remove:hover {background:#fafbfc;}
