/*
 * Modern listing cards + listing page, same design as the Find My Dress results (dress-finder.css).
 * Mobile first, RTL, site colours (#ec296b, #25d366, #292929).
 * Cards: views/listing/_card.php. Listing page: views/listing/view.php (.lv).
 */
:root {
  --lc-pink: #ec296b;
  --lc-pink-dark: #c81b56;
  --lc-pink-soft: #fdeef3;
  --lc-green: #25d366;
  --lc-green-dark: #1fb457;
  --lc-text: #292929;
  --lc-muted: #6b6b6b;
  --lc-line: #e1e1e1;
  --lc-bg: #fafafa;
  --lc-radius: 12px;
  --lc-bold: 'DroidKufiBold', 'DroidKufiRegular', sans-serif;
}

/* ---------------------------------------------------------------- buttons */
.lc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 8px 12px;
  border-radius: 10px; border: 2px solid transparent; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.4;
  background: #fff; color: var(--lc-text); transition: background-color .15s, color .15s, border-color .15s;
}
.lc-btn:hover, .lc-btn:focus { text-decoration: none; }
.lc-btn:focus-visible { outline: 3px solid rgba(236, 41, 107, .4); outline-offset: 2px; }
.lc-btn .fa { font-size: 17px; }
.lc-btn-outline { color: var(--lc-pink); border-color: var(--lc-pink); }
.lc-btn-outline:hover, .lc-btn-outline:focus { background: var(--lc-pink-soft); color: var(--lc-pink-dark); }
.lc-btn-ghost { border-color: var(--lc-line); }
.lc-btn-ghost:hover, .lc-btn-ghost:focus { border-color: #f59ab9; color: var(--lc-pink-dark); }
.lc-call { background: var(--lc-pink); color: #fff; }
.lc-call:hover, .lc-call:focus { background: var(--lc-pink-dark); color: #fff; }
.lc-wa { background: var(--lc-green); color: #fff; }
.lc-wa:hover, .lc-wa:focus { background: var(--lc-green-dark); color: #fff; }

/* ---------------------------------------------------------------- grid + card */
.lc-list { margin: 8px 0 32px; }
.lc-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
/* the category list wraps every card in .item (analytics): undo the classic tile styles */
.listings-list-2 .lc-grid > .item { padding: 0; margin: 0; border: 0; min-width: 0; }
.lc-cell { display: flex; min-width: 0; }
.lc-cell > .lc-item { flex: 1; }

.lc-item {
  background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); overflow: hidden; color: var(--lc-text);
  display: grid; grid-template-columns: 40% minmax(0, 1fr); grid-template-areas: "media body" "actions actions";
  transition: box-shadow .2s, border-color .2s;
}
.lc-item:hover { border-color: #f3c3d4; box-shadow: 0 6px 20px rgba(41, 41, 41, .08); }
.lc-media { grid-area: media; position: relative; background: #f3f3f3; align-self: start; }
.lc-img { display: block; }
.lc-img img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .35s ease; }
.lc-item:hover .lc-img img { transform: scale(1.03); }
.lc-media { overflow: hidden; }
.lc-badge { position: absolute; top: 8px; right: 8px; padding: 3px 9px; border-radius: 14px; font-size: 12px; line-height: 1.6; color: #fff; background: var(--lc-pink); }
.lc-badge-sale { background: #292929; }
.lc-promoted { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 10px; font-size: 11px; line-height: 1.6; }
.lc-fav {
  position: absolute; bottom: 6px; left: 6px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .92);
  display: flex; align-items: center; justify-content: center; color: var(--lc-pink); font-size: 20px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
}
.lc-fav:hover, .lc-fav:focus { color: var(--lc-pink-dark); text-decoration: none; }
.lc-body { grid-area: body; padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lc-title { font-size: 16px; margin: 0; line-height: 1.6; font-family: 'DroidKufiRegular', sans-serif; font-weight: normal; }
.lc-title a { color: var(--lc-pink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-title a:hover, .lc-title a:focus { color: var(--lc-pink-dark); text-decoration: none; }
.lc-price { font-size: 18px; margin: 0; font-family: var(--lc-bold); color: var(--lc-text); }
.lc-neg { font-size: 12px; color: var(--lc-muted); margin-right: 8px; font-family: 'DroidKufiRegular', sans-serif; }
.lc-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--lc-muted); font-size: 13px; margin: 0; }
.lc-meta:empty { display: none; }
.lc-tags { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lc-tag { font-size: 12.5px; padding: 3px 9px; border-radius: 12px; background: var(--lc-pink-soft); color: var(--lc-pink-dark); }
.lc-actions { grid-area: actions; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px 12px 12px; align-self: end; }
.lc-actions .lc-details { grid-column: 1 / -1; }

/* titled card section (related listings) */
.lc-section { padding: 8px 0 32px; }
.lc-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.lc-section-title { font-size: 20px; margin: 0; font-family: var(--lc-bold); line-height: 1.6; }
.lc-section-more { color: var(--lc-pink); white-space: nowrap; font-size: 14px; }

@media (min-width: 600px) {
  .lc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lc-item { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; grid-template-areas: "media" "body" "actions"; }
  .lc-body { padding: 12px 14px 4px; }
  .lc-fav { top: 8px; bottom: auto; left: 8px; }
}
@media (min-width: 992px) {
  .lc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .lc-list .lc-grid, .lc-section .lc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- listing page */
.lv { background: var(--lc-bg); color: var(--lc-text); padding: 12px 0 40px; }
.lv *, .lv *::before, .lv *::after { box-sizing: border-box; }
.lv-card { background: #fff; border: 1px solid var(--lc-line); border-radius: var(--lc-radius); padding: 16px; }
.lv-card + .lv-card { margin-top: 14px; }
.lv-card-title { font-size: 17px; margin: 0 0 12px; font-family: var(--lc-bold); line-height: 1.6; }

.lv-crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 12px; }
.lv-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: 13px; color: var(--lc-muted); }
.lv-crumbs li + li::before { content: "\f104"; font-family: FontAwesome; margin-left: 6px; color: #b5b5b5; }
.lv-crumbs a { color: var(--lc-muted); }
.lv-crumbs a:hover { color: var(--lc-pink); }
.lv-edit { min-height: 38px; font-size: 13px; }

.lv-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* gallery */
.lv-gallery { min-width: 0; }
.lv-stage { position: relative; background: #f3f3f3; border-radius: var(--lc-radius); overflow: hidden; margin: 0 -15px; }
.lv-stage .small-gallery .item { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 5; max-height: 72vh; cursor: zoom-in; background: #f3f3f3; }
.lv-stage .small-gallery .item img { width: 100%; height: 100%; object-fit: contain; }
.lv-stage .lc-badge { top: 12px; right: 12px; z-index: 3; font-size: 13px; padding: 4px 12px; }
.lv-stage .lc-fav { top: 12px; bottom: auto; left: 12px; z-index: 3; }
.lv-arrow {
  position: absolute; top: 50%; z-index: 3; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%;
  background: rgba(255, 255, 255, .92); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 6px rgba(0, 0, 0, .15);
}
.lv-arrow svg { width: 10px; height: 20px; }
.lv-arrow svg polyline { stroke: var(--lc-text); stroke-width: 2; }
.lv-arrow.gallery-left { left: 12px; }
.lv-arrow.gallery-right { right: 12px; }
.lv-zoom {
  position: absolute; bottom: 12px; left: 12px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: rgba(41, 41, 41, .65); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer;
}
.lv-count { position: absolute; bottom: 12px; right: 12px; z-index: 3; background: rgba(41, 41, 41, .65); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 12px; direction: ltr; }
.lv-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: thin; }
.lv-thumb { flex: 0 0 64px; width: 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #f3f3f3; cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.lv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lv-thumb:hover, .lv-thumb.is-active { opacity: 1; border-color: var(--lc-pink); }
.lv-thumb:focus-visible { outline: 3px solid rgba(236, 41, 107, .4); outline-offset: 1px; }

/* summary panel */
.lv-panel { min-width: 0; }
.lv-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lv-badges .lc-badge, .lv-badges .lc-promoted { position: static; display: inline-block; }
.lv-title { font-size: 21px; line-height: 1.6; margin: 0 0 6px; font-family: var(--lc-bold); color: var(--lc-text); word-wrap: break-word; }
.lv-price { font-size: 26px; margin: 0 0 12px; font-family: var(--lc-bold); color: var(--lc-pink); }
.lv-price .lc-neg { font-size: 13px; }
.lv-expired { display: inline-block; font-size: 15px; color: #a15c00; background: #fff6e6; padding: 4px 12px; border-radius: 12px; margin: 0 0 12px; }
.lv-facts { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lv-fact { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 18px; background: #f1f3f5; font-size: 13.5px; color: #444; }
.lv-fact .fa { color: var(--lc-pink); }
.lv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lv-actions .lc-btn { min-height: 52px; font-size: 16px; }
.lv-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.lv-secondary .lc-btn { min-height: 44px; }
.lv-secondary .favorite-listing .fa, .lv-share .fa { color: var(--lc-pink); }
.lv-social { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.lv-social a { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--lc-line); display: flex; align-items: center; justify-content: center; color: var(--lc-muted); }
.lv-social a:hover { color: var(--lc-pink); border-color: var(--lc-pink); }

/* seller */
.lv-seller-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.lv-avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: var(--lc-pink-soft); color: var(--lc-pink); display: flex; align-items: center; justify-content: center; font-size: 20px; font-family: var(--lc-bold); }
.lv-seller-name { font-size: 16px; margin: 0; font-family: var(--lc-bold); line-height: 1.5; }
.lv-seller-name a { color: var(--lc-text); }
.lv-seller-sub { font-size: 13px; color: var(--lc-muted); }
.lv-seller-sub a { color: var(--lc-pink); }
.lv-seller-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.lv-seller-list li { display: flex; align-items: center; gap: 10px; min-height: 24px; }
.lv-seller-list .fa { width: 18px; text-align: center; color: var(--lc-muted); }
.lv-seller-list a { color: var(--lc-pink); }

/* details */
.lv-details { margin-top: 0; }
.lv-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.lv-spec { background: var(--lc-bg); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.lv-spec dt { font-size: 12.5px; color: var(--lc-muted); font-weight: normal; margin: 0 0 2px; }
.lv-spec dd { font-size: 15px; margin: 0; word-wrap: break-word; }
.lv-features { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lv-features li { font-size: 13px; padding: 4px 12px; border-radius: 14px; background: #eefbf3; color: #17663a; }
.lv-features .fa { margin-left: 4px; }
.lv-links { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; }
.lv-links li + li { margin-top: 6px; }
.lv-links a { color: var(--lc-pink); word-break: break-all; }
.lv-desc { font-size: 15px; line-height: 2; white-space: normal; word-wrap: break-word; }
.lv-desc p { margin: 0 0 8px; }
.lv-map #map { height: 240px; border-radius: 10px; overflow: hidden; }
.lv-address { color: var(--lc-muted); font-size: 14px; margin: 0 0 10px; }
.lv-ad-slot { margin: 12px 0; }
.lv-ad-slot:empty { display: none; }

/* the contact bar stays at the bottom of the screen on phones */
@media (max-width: 991px) {
  .lv { padding-bottom: 96px; }
  .lv-actions.is-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; margin: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff; box-shadow: 0 -4px 16px rgba(0, 0, 0, .1);
  }
}
@media (min-width: 600px) {
  .lv-title { font-size: 24px; }
  .lv-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lv-stage { margin: 0; }
  .lv-thumb { flex-basis: 76px; width: 76px; height: 76px; }
}
@media (min-width: 992px) {
  .lv { padding-top: 20px; }
  /* gallery and details on one side, the summary panel follows the scroll on the other */
  .lv-top { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "gallery panel" "details panel"; gap: 0 24px; align-items: start; }
  .lv-gallery { grid-area: gallery; }
  .lv-panel { grid-area: panel; position: sticky; top: 120px; }
  .lv-details { grid-area: details; margin-top: 14px; }
  .lv-stage .small-gallery .item { max-height: 640px; }
}
@media (prefers-reduced-motion: reduce) {
  .lc-item, .lc-img img, .lc-btn, .lv-thumb { transition: none; }
  .lc-item:hover .lc-img img { transform: none; }
}

/* homepage lists (AdsListWidget 'cards' => true) */
.lc-home { padding-top: 24px; }
@media (min-width: 768px) { .lc-home { padding-top: 48px; } }
