/* ===========================
   Listing Page (dark theme)
   Uses Lisa Tiger Team design tokens
   =========================== */

/* Local tokens scoped to the listing page so we don’t affect other sections */
.listing {
    --card: #343336;
    --card-2: #3b3a3c;
    --border: #4a494c;
    --muted: rgba(243, 237, 230, 0.72);
    --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    --radius: 14px;
    --radius-sm: 10px;
    --gap: 20px;
    --thumb-h: 74px;
}

/* Page container */
#listing.listing,
#listing .listing {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    font-family: var(--sans-font);
    color: var(--white);
    background: var(--d-grey);
}

/* Empty / error state */
.listing__empty {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    color: var(--muted);
}

/* ===========================
     HERO
     =========================== */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    margin-bottom: 28px;
}

.hero__media {
    position: relative;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    padding: 10px;
    /* inner pad for thumb rail spacing */
}

/* Status badge */
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 6px 10px;
    font-size: 12px;
    letter-spacing: .02em;
    font-weight: 700;
    color: var(--d-grey);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}

.badge--active {
    background: var(--teal);
}

.badge--pending {
    background: var(--orange);
}

.badge--coming {
    background: var(--b-blue);
}

.badge--closed {
    background: var(--l-grey);
    color: #111;
}

.badge--other {
    background: var(--gold);
    color: #161616;
}

/* Main gallery "view" */
.gallery {
    position: relative;
    border-radius: calc(var(--radius) - 8px);
    overflow: hidden;
    background: #111;
    aspect-ratio: 16 / 9;
    box-shadow: inset 0 0 0 1px var(--border);
}

.gallery__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    user-select: none;
    background: #0b0b0b;
}

/* Thumbnail rail */
.gallery__thumbs {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 4px 2px 2px;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
}

.gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.thumb {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 10px;
    outline: none;
    scroll-snap-align: center;
    position: relative;
    cursor: pointer;
}

.thumb__img {
    height: var(--thumb-h);
    width: auto;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .22);
    opacity: .95;
    transform: translateY(0);
    transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.thumb:hover .thumb__img {
    opacity: 1;
    transform: translateY(-1px);
}

.thumb.is-active .thumb__img,
.thumb:focus-visible .thumb__img {
    opacity: 1;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(255, 214, 117, .6), 0 10px 22px rgba(0, 0, 0, .28);
}

/* Meta panel */
.hero__meta {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 18px 16px;
}

<<<<<<< HEAD
.address {
    margin: 0 0 8px;
    line-height: 1.2;
    font-family: var(--serif-font);
    font-size: clamp(18px, 2.4vw, 32px);
    font-weight: 400;
    color: var(--white);
}
=======
.address{
    display:block;
    max-width:100%;
    overflow-wrap:anywhere;   /* modern, breaks anywhere if needed */
    word-break:break-word;    /* fallback */
    hyphens:auto;             /* helps when language supports it */
    white-space:normal;
    /* keep your clamp, or tighten it a bit if you like */
    font-size: clamp(20px, 2.4vw, 32px);
  }
>>>>>>> asdf

.meta__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin: 6px 0 8px;
}

.price {
    font-size: clamp(20px, 2.2vw, 26px);
    font-weight: 700;
    color: var(--gold);
}

.pill {
    font-size: 14px;
    color: var(--white);
    background: var(--card-2);
    border: 1px solid var(--border);
    padding: 6px 10px;
    border-radius: 999px;
}

.meta__sub {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--muted);
    font-size: 13.5px;
}

/* ===========================
     GENERIC BLOCKS
     =========================== */
.block {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin: 20px 0;
}

.block h2 {
    margin: 0 0 14px;
    font-size: 20px;
    letter-spacing: .01em;
    font-family: var(--serif-font);
    color: var(--white);
}

/* ===========================
     KEY FACTS
     =========================== */
.facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.fact {
    background: var(--card-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 70px;
    display: grid;
    grid-template-rows: auto 1fr;
}

.fact__label {
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.fact__value {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--white);
}

/* ===========================
     FEATURES
     =========================== */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.feature {
    background: var(--card-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 12px 12px 12px 14px;
}

.feature h3 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--gold);
    letter-spacing: .02em;
    font-family: var(--sans-font);
}

.feature__list {
    color: var(--white);
    font-size: 14.5px;
    line-height: 1.5;
}

/* ===========================
     REMARKS
     =========================== */
.remarks {
    margin: 0;
    line-height: 1.7;
    color: var(--white);
    white-space: pre-wrap;
}

/* ===========================
     MEDIA THUMBS (bottom grid)
     =========================== */
.media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.media__thumb {
    display: block;
    background: #0d0f12;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, opacity .12s ease;
    cursor: pointer;
}

.media__thumb:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #5a5960;
}

.media__thumb img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

/* ===========================
     MAP
     =========================== */
#mapLink {
    display: inline-block;
    margin-top: 1rem;
    padding: 10px 14px;
    background: var(--gold);
    color: var(--d-grey);
    font-weight: 800;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform .12s ease, filter .12s ease;
}

#mapLink:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* ===========================
     RAW JSON
     =========================== */
.raw summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--b-blue);
    outline: none;
    font-family: var(--sans-font);
}

.raw__pre {
    background: #0e1116;
    color: #cfe3ff;
    border: 1px solid #1f2430;
    border-radius: 10px;
    padding: 14px;
    margin-top: 12px;
    max-height: 420px;
    overflow: auto;
    font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    tab-size: 2;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===========================
     LIGHTBOX
     =========================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .88);
    display: none;
    /* toggled inline by JS */
    align-items: center;
    justify-content: center;
    padding: 28px;
    backdrop-filter: blur(2px);
}

.lightbox__img {
    max-width: min(96vw, 1600px);
    max-height: 86vh;
    width: auto;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .6);
    user-select: none;
}

.lightbox__close,
.lightbox__nav {
    position: absolute;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: white;
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease, opacity .15s ease;
    user-select: none;
}

.lightbox__close {
    top: 18px;
    right: 18px;
    z-index: 2;
}

.lightbox__nav--prev {
    left: 14px;
}

.lightbox__nav--next {
    right: 14px;
}

.lightbox__nav,
.lightbox__close {
    /* icon text size */
    font: 700 20px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.lightbox__nav:hover,
.lightbox__close:hover {
    background: rgba(255, 255, 255, .18);
    transform: translateY(-1px);
}

/* ===========================
     RESPONSIVE
     =========================== */
@media (min-width: 820px) {
    .hero {
        grid-template-columns: 1.35fr .9fr;
        align-items: start;
    }

    .gallery {
        aspect-ratio: 21 / 9;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1140px) {
    .gallery {
        aspect-ratio: 21 / 9;
    }
}

@media (max-width: 592px){
    .hero{
        display:flex;
        flex-direction: column;
        gap:2rem;
    }
}