/**
 * LoyalMLS Built-in Template Styles — v1.3.0
 *
 * Shared CSS for all listing card templates and single listing templates.
 * Colors and grid columns are driven by CSS variables injected by LoyalMLSDesignSystem.
 * Templates may add their own <style> blocks for unique structural overrides.
 */

/* ═══════════════════════════════════════════
   BASE RESETS & TYPOGRAPHY
   ═══════════════════════════════════════════ */
.lmls-listings,
.lmls-single {
    font-family: var(--lmls-font, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    font-size: var(--lmls-font-size, 16px);
    color: var(--lmls-text, #111827);
    -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════
   SHARED BADGE (status / "New")
   ═══════════════════════════════════════════ */
.lmls-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    background: var(--lmls-primary, #1D4ED8);
    color: #fff;
    backdrop-filter: blur(4px);
}
.lmls-badge--new { background: #16a34a; }

/* ═══════════════════════════════════════════
   SHARED FAVORITE HEART BUTTON
   ═══════════════════════════════════════════ */
.lmls-fav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    font-size: 17px;
    color: #9ca3af;
    transition: color .2s, transform .15s, background .15s;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    line-height: 1;
}
.lmls-fav-btn:hover { color: #e53e3e; background: rgba(255,255,255,.92); transform: scale(1.12); text-decoration: none; }
.lmls-fav-btn.active { color: #e53e3e; background: #fff5f5; }
.lmls-fav-btn:focus { outline: none; background: rgba(255,255,255,.92); color: #9ca3af; text-decoration: none; }
.lmls-fav-btn:focus:not(:focus-visible) { background: rgba(255,255,255,.92); color: #9ca3af; box-shadow: 0 1px 4px rgba(0,0,0,.12); }

/* ═══════════════════════════════════════════
   SHARED PRICE DISPLAY
   ═══════════════════════════════════════════ */
.lmls-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--lmls-primary, #1D4ED8);
    letter-spacing: -.3px;
}
.lmls-price--hero { font-size: 32px; }
.lmls-price--small { font-size: 17px; }

/* ═══════════════════════════════════════════
   SHARED SPECS ROW (beds / baths / sqft)
   ═══════════════════════════════════════════ */
.lmls-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: var(--lmls-text-muted, #6B7280);
}
.lmls-specs__item { display: flex; align-items: center; gap: 3px; }
.lmls-specs__val { font-weight: 700; color: var(--lmls-text, #111827); }

/* ═══════════════════════════════════════════
   SHARED IMAGE CONTAINER (aspect-ratio based)
   ═══════════════════════════════════════════ */
.lmls-img {
    position: relative;
    overflow: hidden;
    background: #e8edf2;
    display: block;
}
.lmls-img img,
.lmls-img > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.lmls-img--16-9  { aspect-ratio: 16/9; }
.lmls-img--4-3   { aspect-ratio: 4/3; }
.lmls-img--3-2   { aspect-ratio: 3/2; }
.lmls-img--16-7  { aspect-ratio: 16/7; }
.lmls-img--square { aspect-ratio: 1; }

.lmls-img__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
}
.lmls-img__fav {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}
.lmls-img__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 55%);
    pointer-events: none;
}
.lmls-img__overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px;
    color: #fff;
}

/* ═══════════════════════════════════════════
   SHARED NO-IMAGE PLACEHOLDER
   ═══════════════════════════════════════════ */
.lmls-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #9ca3af;
    background: linear-gradient(135deg, #f0f4f8, #e2e8f0);
}

/* ═══════════════════════════════════════════
   SHARED PAGINATION
   ═══════════════════════════════════════════ */
.lmls-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 28px 0 8px;
}
.lmls-pagination a,
.lmls-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    color: var(--lmls-primary, #1D4ED8);
    transition: background .15s, color .15s, border-color .15s;
}
.lmls-pagination a:hover { background: var(--lmls-primary, #1D4ED8); color: #fff; border-color: var(--lmls-primary, #1D4ED8); }
.lmls-pagination .current { background: var(--lmls-primary, #1D4ED8); color: #fff !important; border-color: var(--lmls-primary, #1D4ED8); pointer-events: none; }

/* ═══════════════════════════════════════════
   NO RESULTS
   ═══════════════════════════════════════════ */
.lmls-no-results {
    text-align: center;
    padding: 48px 20px;
    color: var(--lmls-text-muted, #6B7280);
    font-size: 15px;
}

/* ═══════════════════════════════════════════
   ── CLASSIC GRID TEMPLATE ──
   ═══════════════════════════════════════════ */
.lmls-template-classic-grid .lmls-grid {
    display: grid;
    grid-template-columns: repeat(var(--lmls-cols, 3), 1fr);
    gap: 20px;
    padding: 4px 0 20px;
}
@media (max-width: 900px) {
    .lmls-template-classic-grid .lmls-grid { grid-template-columns: repeat(min(var(--lmls-cols, 3), 2), 1fr); }
}
@media (max-width: 560px) {
    .lmls-template-classic-grid .lmls-grid { grid-template-columns: 1fr; }
}

.lmls-template-classic-grid .lmls-card {
    border-radius: 14px;
    overflow: hidden;
    background: var(--lmls-card-bg, #fff);
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
    transition: transform .22s ease, box-shadow .22s ease;
    display: flex;
    flex-direction: column;
}
.lmls-template-classic-grid .lmls-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.lmls-template-classic-grid .lmls-card:hover .lmls-img img {
    transform: scale(1.04);
}

.lmls-template-classic-grid .lmls-card__image .lmls-img { aspect-ratio: 4/3; }

.lmls-template-classic-grid .lmls-card__link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }

.lmls-template-classic-grid .lmls-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.lmls-template-classic-grid .lmls-card__price {
    font-size: 20px;
    font-weight: 800;
    color: var(--lmls-primary, #1D4ED8);
    letter-spacing: -.2px;
}
.lmls-template-classic-grid .lmls-card__address {
    font-size: 14px;
    font-weight: 600;
    color: var(--lmls-text, #111827);
    margin: 0;
    line-height: 1.35;
}
.lmls-template-classic-grid .lmls-card__location {
    font-size: 12px;
    color: var(--lmls-text-muted, #6B7280);
    margin: 0;
}
.lmls-template-classic-grid .lmls-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--lmls-text-muted, #6B7280);
    padding-top: 8px;
    margin-top: auto;
    border-top: 1px solid #f3f4f6;
}
.lmls-template-classic-grid .lmls-card__meta strong { color: var(--lmls-text, #111827); }
.lmls-template-classic-grid .lmls-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #9ca3af;
    padding-top: 6px;
    border-top: 1px solid #f3f4f6;
    margin-top: 4px;
}
.lmls-template-classic-grid .lmls-mls { color: #9ca3af; }

/* ═══════════════════════════════════════════
   ── FEATURED (MODERN) CARD TEMPLATE ──
   ═══════════════════════════════════════════ */
.lmls-template-featured .lmls-featured-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    cursor: pointer;
}
.lmls-template-featured .lmls-featured-hero .lmls-img { aspect-ratio: 16/7; }
.lmls-template-featured .lmls-featured-hero:hover .lmls-img img { transform: scale(1.03); }

.lmls-template-featured .lmls-featured-hero__info { color: #fff; }
.lmls-template-featured .lmls-featured-hero__price { font-size: 28px; font-weight: 800; margin-bottom: 4px; text-shadow: 0 1px 6px rgba(0,0,0,.3); }
.lmls-template-featured .lmls-featured-hero__addr  { font-size: 15px; font-weight: 600; opacity: .95; margin-bottom: 2px; }
.lmls-template-featured .lmls-featured-hero__loc   { font-size: 13px; opacity: .7; margin-bottom: 8px; }
.lmls-template-featured .lmls-featured-hero__desc  { font-size: 13px; opacity: .8; line-height: 1.5; margin-bottom: 8px; max-width: 520px; }
.lmls-template-featured .lmls-featured-hero__specs { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: rgba(255,255,255,.85); }
.lmls-template-featured .lmls-featured-hero__specs strong { color: #fff; font-weight: 700; }

.lmls-template-featured .lmls-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
@media (max-width: 900px) { .lmls-template-featured .lmls-featured-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px)  { .lmls-template-featured .lmls-featured-grid { grid-template-columns: 1fr; } }

.lmls-template-featured .lmls-featured-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform .22s ease, box-shadow .22s ease;
}
.lmls-template-featured .lmls-featured-card .lmls-img { aspect-ratio: 4/3; }
.lmls-template-featured .lmls-featured-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.15); }
.lmls-template-featured .lmls-featured-card:hover .lmls-img img { transform: scale(1.05); }

.lmls-template-featured .lmls-featured-card__info { color: #fff; }
.lmls-template-featured .lmls-featured-card__price { font-size: 15px; font-weight: 800; margin-bottom: 3px; text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.lmls-template-featured .lmls-featured-card__addr  { font-size: 12px; opacity: .9; margin-bottom: 2px; }
.lmls-template-featured .lmls-featured-card__loc   { font-size: 11px; opacity: .65; }
.lmls-template-featured .lmls-featured-card__specs { display: flex; gap: 8px; font-size: 11px; color: rgba(255,255,255,.8); margin-top: 4px; }
.lmls-template-featured .lmls-featured-card__specs strong { color: #fff; }

/* ═══════════════════════════════════════════
   ── HORIZONTAL LIST TEMPLATE ──
   ═══════════════════════════════════════════ */
.lmls-template-horizontal-list { display: flex; flex-direction: column; gap: 14px; }

.lmls-template-horizontal-list .lmls-row-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    border-radius: 14px;
    overflow: hidden;
    background: var(--lmls-card-bg, #fff);
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06);
    transition: transform .22s ease, box-shadow .22s ease;
}
.lmls-template-horizontal-list .lmls-row-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
@media (max-width: 680px) {
    .lmls-template-horizontal-list .lmls-row-card { grid-template-columns: 1fr; }
}

.lmls-template-horizontal-list .lmls-row-card__image .lmls-img { height: 100%; min-height: 180px; }
.lmls-template-horizontal-list .lmls-row-card__image .lmls-img img { height: 100%; }
@media (max-width: 680px) {
    .lmls-template-horizontal-list .lmls-row-card__image .lmls-img { aspect-ratio: 4/3; height: auto; }
}

.lmls-template-horizontal-list .lmls-row-card__body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lmls-template-horizontal-list .lmls-row-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.lmls-template-horizontal-list .lmls-row-card__price { font-size: 22px; font-weight: 800; color: var(--lmls-primary, #1D4ED8); }
.lmls-template-horizontal-list .lmls-row-card__address { font-size: 15px; font-weight: 600; text-decoration: none; color: var(--lmls-text, #111827); line-height: 1.3; display: block; }
.lmls-template-horizontal-list .lmls-row-card__location { font-size: 13px; color: var(--lmls-text-muted, #6B7280); margin: 2px 0 0; }
.lmls-template-horizontal-list .lmls-row-card__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 4px;
}
.lmls-template-horizontal-list .lmls-spec { display: flex; flex-direction: column; gap: 1px; }
.lmls-template-horizontal-list .lmls-spec__val { font-size: 18px; font-weight: 700; color: var(--lmls-text, #111827); }
.lmls-template-horizontal-list .lmls-spec__lbl { font-size: 11px; color: var(--lmls-text-muted, #6B7280); text-transform: uppercase; letter-spacing: .4px; }
.lmls-template-horizontal-list .lmls-row-card__desc { font-size: 13px; color: var(--lmls-text-muted, #6B7280); line-height: 1.6; flex: 1; }
.lmls-template-horizontal-list .lmls-row-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
    font-size: 12px;
    color: #9ca3af;
    margin-top: auto;
}
.lmls-template-horizontal-list .lmls-row-card__btn {
    font-size: 13px;
    font-weight: 600;
    color: var(--lmls-primary, #1D4ED8);
    text-decoration: none;
    padding: 6px 14px;
    border: 1.5px solid var(--lmls-primary, #1D4ED8);
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.lmls-template-horizontal-list .lmls-row-card__btn:hover { background: var(--lmls-primary, #1D4ED8); color: #fff; }
.lmls-template-horizontal-list .lmls-row-card__fav { font-size: 18px; cursor: pointer; color: #9ca3af; flex-shrink: 0; }
.lmls-template-horizontal-list .lmls-row-card__fav.active { color: #e53e3e; }

/* ═══════════════════════════════════════════
   ── MINIMAL OVERLAY TEMPLATE ──
   ═══════════════════════════════════════════ */
.lmls-template-minimal .lmls-minimal-grid {
    display: grid;
    grid-template-columns: repeat(var(--lmls-cols, 3), 1fr);
    gap: 16px;
    padding: 4px 0 20px;
}
@media (max-width: 900px) { .lmls-template-minimal .lmls-minimal-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lmls-template-minimal .lmls-minimal-grid { grid-template-columns: 1fr; } }

.lmls-template-minimal .lmls-minimal-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform .22s ease, box-shadow .22s ease;
}
.lmls-template-minimal .lmls-minimal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,.14);
}
.lmls-template-minimal .lmls-minimal-card:hover .lmls-img img { transform: scale(1.04); }

.lmls-template-minimal .lmls-minimal-card__image-wrap .lmls-img { aspect-ratio: 3/4; }

.lmls-template-minimal .lmls-minimal-card__overlay-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}
.lmls-template-minimal .lmls-minimal-card__overlay-bottom { width: 100%; }
.lmls-template-minimal .lmls-minimal-card__price { font-size: 19px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); margin-bottom: 4px; }
.lmls-template-minimal .lmls-minimal-card__address { font-size: 13px; color: rgba(255,255,255,.9); line-height: 1.35; }

.lmls-template-minimal .lmls-minimal-card__meta {
    padding: 10px 12px;
    background: var(--lmls-card-bg, #fff);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}
.lmls-template-minimal .lmls-minimal-card__loc { font-size: 11px; color: var(--lmls-text-muted, #6B7280); }
.lmls-template-minimal .lmls-minimal-card__specs { display: flex; gap: 10px; font-size: 12px; color: var(--lmls-text-muted, #6B7280); }
.lmls-template-minimal .lmls-mls-num { font-size: 10px; color: #9ca3af; }
.lmls-template-minimal .lmls-minimal-fav { color: rgba(255,255,255,.9); font-size: 18px; cursor: pointer; }
.lmls-template-minimal .lmls-minimal-fav.active { color: #e53e3e; }

/* ═══════════════════════════════════════════
   ── COMPACT TABLE TEMPLATE ──
   ═══════════════════════════════════════════ */
.lmls-template-compact .lmls-compact-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.06); }
.lmls-template-compact .lmls-compact-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--lmls-card-bg, #fff);
    font-size: 13px;
}
.lmls-template-compact .lmls-compact-table thead th {
    background: var(--lmls-primary, #1D4ED8);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 11px 14px;
    text-align: left;
    white-space: nowrap;
}
.lmls-template-compact .lmls-compact-table thead th:first-child { border-radius: 12px 0 0 0; }
.lmls-template-compact .lmls-compact-table thead th:last-child  { border-radius: 0 12px 0 0; }

.lmls-template-compact .lmls-compact-row { border-bottom: 1px solid #f3f4f6; transition: background .12s; }
.lmls-template-compact .lmls-compact-row:hover { background: #f8fafc; }
.lmls-template-compact .lmls-compact-row--new { background: #f0fdf4; }
.lmls-template-compact .lmls-compact-row td { padding: 10px 14px; vertical-align: middle; }
.lmls-template-compact .lmls-col-img { width: 70px; padding: 8px 10px; }
.lmls-template-compact .lmls-col-img .lmls-img,
.lmls-template-compact .lmls-col-img img { width: 60px; height: 44px; border-radius: 6px; object-fit: cover; display: block; }
.lmls-template-compact .lmls-col-address a { font-weight: 600; text-decoration: none; color: var(--lmls-text, #111827); }
.lmls-template-compact .lmls-col-address a:hover { color: var(--lmls-primary, #1D4ED8); }
.lmls-template-compact .lmls-col-address small { color: var(--lmls-text-muted, #6B7280); font-size: 11px; }
.lmls-template-compact .lmls-col-price { font-weight: 700; color: var(--lmls-primary, #1D4ED8); white-space: nowrap; }
.lmls-template-compact .lmls-col-center { text-align: center; color: var(--lmls-text, #111827); font-weight: 600; }
.lmls-template-compact .lmls-col-mls { font-size: 11px; color: #9ca3af; }
.lmls-template-compact .lmls-col-actions { display: flex; align-items: center; gap: 8px; }
.lmls-template-compact .lmls-tag-new { background: #dcfce7; color: #15803d; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; margin-left: 6px; }
.lmls-template-compact .lmls-status-badge { background: #f0f4ff; color: var(--lmls-primary, #1D4ED8); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.lmls-template-compact .lmls-compact-fav { font-size: 16px; cursor: pointer; color: #9ca3af; }
.lmls-template-compact .lmls-compact-fav.active { color: #e53e3e; }
.lmls-template-compact .lmls-compact-view-btn {
    font-size: 12px;
    font-weight: 600;
    color: var(--lmls-primary, #1D4ED8);
    text-decoration: none;
    padding: 5px 10px;
    border: 1.5px solid var(--lmls-primary, #1D4ED8);
    border-radius: 6px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.lmls-template-compact .lmls-compact-view-btn:hover { background: var(--lmls-primary, #1D4ED8); color: #fff; }
.lmls-template-compact .lmls-thumb-placeholder { width: 60px; height: 44px; background: #e8edf2; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 16px; }

/* ═══════════════════════════════════════════
   ── SINGLE LISTING SHARED ──
   ═══════════════════════════════════════════ */
.lmls-single { max-width: 1200px; margin: 0 auto; padding: 20px 16px 48px; }
@media (max-width: 768px) { .lmls-single { padding: 12px 12px 32px; } }

/* Shared gallery grid (classic/compact single) */
.lmls-gal-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 6px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}
.lmls-gal-grid__item { overflow: hidden; }
.lmls-gal-grid__item .lmls-img { height: 100%; min-height: 120px; cursor: pointer; }
.lmls-gal-grid__item:first-child { grid-row: 1 / 3; }
.lmls-gal-grid__item:first-child .lmls-img { min-height: 360px; }
.lmls-gal-grid__more { position: relative; }
.lmls-gal-grid__more-label {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.48);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px; font-weight: 700; cursor: pointer;
}
@media (max-width: 680px) {
    .lmls-gal-grid { grid-template-columns: 1fr 1fr; }
    .lmls-gal-grid__item:first-child { grid-column: 1 / -1; grid-row: 1; }
    .lmls-gal-grid__item:first-child .lmls-img { min-height: 220px; }
}

/* Shared stats bar */
.lmls-stats-bar {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}
.lmls-stats-bar__item {
    flex: 1;
    min-width: 100px;
    padding: 16px 12px;
    text-align: center;
    border-right: 1px solid #f3f4f6;
}
.lmls-stats-bar__item:last-child { border-right: none; }
.lmls-stats-bar__val { display: block; font-size: 22px; font-weight: 800; color: var(--lmls-text, #111827); margin-bottom: 4px; }
.lmls-stats-bar__lbl { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--lmls-text-muted, #6B7280); }
@media (max-width: 600px) {
    .lmls-stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); }
    .lmls-stats-bar__item { border-right: 1px solid #f3f4f6; border-bottom: 1px solid #f3f4f6; }
    .lmls-stats-bar__val { font-size: 18px; }
}

/* Shared details grid */
.lmls-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    overflow: hidden;
}
.lmls-details-grid__item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    border-right: 1px solid #f3f4f6;
}
.lmls-details-grid__item:nth-child(even) { border-right: none; }
.lmls-details-grid__item:nth-last-child(-n+2) { border-bottom: none; }
.lmls-details-grid__lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--lmls-text-muted, #6B7280); margin-bottom: 3px; font-weight: 600; }
.lmls-details-grid__val { font-size: 14px; font-weight: 700; color: var(--lmls-text, #111827); }
@media (max-width: 500px) {
    .lmls-details-grid { grid-template-columns: 1fr; }
    .lmls-details-grid__item { border-right: none; }
    .lmls-details-grid__item:nth-last-child(-n+2) { border-bottom: 1px solid #f3f4f6; }
    .lmls-details-grid__item:last-child { border-bottom: none; }
}

/* Shared lightbox */
.lmls-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.94);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
.lmls-lightbox--open { display: flex !important; }
.lmls-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.lmls-lb-close { position: fixed; top: 18px; right: 22px; color: #fff; font-size: 30px; cursor: pointer; z-index: 100000; line-height: 1; opacity: .8; transition: opacity .15s; }
.lmls-lb-close:hover { opacity: 1; }
.lmls-lb-prev, .lmls-lb-next { position: fixed; top: 50%; transform: translateY(-50%); color: #fff; font-size: 40px; cursor: pointer; z-index: 100000; background: rgba(0,0,0,.3); border-radius: 8px; padding: 8px 14px; line-height: 1; user-select: none; opacity: .8; transition: opacity .15s; }
.lmls-lb-prev:hover, .lmls-lb-next:hover { opacity: 1; }
.lmls-lb-prev { left: 10px; }
.lmls-lb-next { right: 10px; }

/* ── Single listing favorite button (icon-only) ── */
.lmls-single-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(4px);
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    transition: color .2s, background .2s, transform .15s;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    flex-shrink: 0;
    line-height: 1;
}
.lmls-single-fav:hover  { color: #e53e3e; transform: scale(1.1); }
.lmls-single-fav.active { color: #e53e3e; background: #fff5f5; }
/* On dark hero backgrounds */
.lmls-lux .lmls-single-fav,
.lmls-mod-hero .lmls-single-fav,
.lmls-lux-hero .lmls-single-fav { background: rgba(0,0,0,.45); color: rgba(255,255,255,.65); }
.lmls-lux .lmls-single-fav:hover,
.lmls-lux .lmls-single-fav.active,
.lmls-mod-hero .lmls-single-fav:hover,
.lmls-mod-hero .lmls-single-fav.active,
.lmls-lux-hero .lmls-single-fav:hover,
.lmls-lux-hero .lmls-single-fav.active { color: #e53e3e; background: rgba(0,0,0,.6); }

/* ── Details group heading — used in all single templates ── */
.lmls-detail-group {
    margin-top: 24px;
}
.lmls-detail-group:first-child { margin-top: 0; }

.lmls-detail-group__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--lmls-primary, #1D4ED8);
    padding: 8px 12px;
    background: color-mix(in srgb, var(--lmls-primary, #1D4ED8) 8%, transparent);
    border-left: 3px solid var(--lmls-primary, #1D4ED8);
    border-radius: 0 6px 6px 0;
    margin-bottom: 10px;
}
/* Luxury dark theme override — applied inside .lmls-lux */
.lmls-lux .lmls-detail-group__title {
    color: #c9a96e;
    background: rgba(201,169,110,.1);
    border-left-color: #c9a96e;
}

/* Shared section heading */
.lmls-section-h {
    font-size: 18px;
    font-weight: 700;
    color: var(--lmls-text, #111827);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

/* Shared primary / outline buttons */
.lmls-btn-primary {
    display: block;
    width: 100%;
    padding: 13px;
    background: var(--lmls-primary, #1D4ED8);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s;
    margin-bottom: 10px;
}
.lmls-btn-primary:hover { background: var(--lmls-secondary, #1344c0); color: #fff; }

.lmls-btn-outline {
    display: block;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--lmls-primary, #1D4ED8);
    border: 2px solid var(--lmls-primary, #1D4ED8);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s;
    margin-bottom: 10px;
}
.lmls-btn-outline:hover { background: var(--lmls-primary, #1D4ED8); color: #fff; }

/* Shared single listing MLS ref */
.lmls-mls-ref { font-size: 12px; color: #9ca3af; text-align: center; margin-top: 8px; }

/* Filmstrip (modern gallery) */
.lmls-gal-filmstrip {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    border-radius: 10px;
    padding-bottom: 4px;
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.lmls-gal-filmstrip::-webkit-scrollbar { height: 4px; }
.lmls-gal-filmstrip::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 2px; }
.lmls-gal-filmstrip img {
    flex: 0 0 auto;
    width: 130px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}
.lmls-gal-filmstrip img:hover { opacity: .85; transform: scale(1.03); }
