/**
 * Zillow Listing Card — front-end styles.
 * Editorial real-estate aesthetic: serif display type, warm neutrals, generous spacing.
 */

.zlc-card-wrap {
    --zlc-accent: #0d4b3c;
    --zlc-text: #1a1a1a;
    --zlc-muted: #6b6b6b;
    --zlc-bg: #faf7f2;
    --zlc-line: rgba(0, 0, 0, 0.08);
    --zlc-radius: 4px;
    --zlc-font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --zlc-font-body: 'Inter', system-ui, sans-serif;

    color: var(--zlc-text);
    font-family: var(--zlc-font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    container-type: inline-size;
}

.zlc-card-wrap *,
.zlc-card-wrap *::before,
.zlc-card-wrap *::after {
    box-sizing: border-box;
}

.zlc-card-wrap .zlc-card {
    background: var(--zlc-bg);
    border-radius: var(--zlc-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px -16px rgba(0, 0, 0, 0.12);
}

/* ---------- Media area ---------- */
.zlc-card-wrap .zlc-media {
    position: relative;
    overflow: hidden;
}

.zlc-card-wrap .zlc-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.zlc-card-wrap:hover .zlc-hero {
    transform: scale(1.03);
}

.zlc-card-wrap .zlc-hero-fallback {
    background:
        linear-gradient(135deg, #d9cdb8 0%, #b8a48a 100%);
    aspect-ratio: 4 / 3;
}

.zlc-card-wrap .zlc-status {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--zlc-accent);
    color: #fff;
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    z-index: 2;
}

.zlc-card-wrap .zlc-status-sold { background: #b00020; }
.zlc-card-wrap .zlc-status-pending { background: #b07a00; }
.zlc-card-wrap .zlc-status-coming-soon { background: #1d4e89; }

/* ---------- Body ---------- */
.zlc-card-wrap .zlc-body {
    padding: 32px;
}

.zlc-card-wrap .zlc-price {
    font-family: var(--zlc-font-display);
    font-size: clamp(1.8rem, 4cqi, 2.6rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--zlc-accent);
    margin-bottom: 12px;
    font-variation-settings: "opsz" 144;
}

.zlc-card-wrap .zlc-address {
    font-family: var(--zlc-font-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin: 0 0 4px;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--zlc-text);
}

.zlc-card-wrap .zlc-citystate {
    margin: 0 0 24px;
    color: var(--zlc-muted);
    font-size: 0.95rem;
}

.zlc-card-wrap .zlc-specs {
    list-style: none;
    margin: 0 0 24px;
    padding: 20px 0;
    display: flex;
    gap: 32px;
    border-top: 1px solid var(--zlc-line);
    border-bottom: 1px solid var(--zlc-line);
}

.zlc-card-wrap .zlc-specs li {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.zlc-card-wrap .zlc-spec-num {
    font-family: var(--zlc-font-display);
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1;
    color: var(--zlc-text);
}

.zlc-card-wrap .zlc-spec-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--zlc-muted);
}

.zlc-card-wrap .zlc-description {
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--zlc-text);
    margin: 0 0 24px;
    max-width: 56ch;
}

/* ---------- Gallery thumbs ---------- */
.zlc-card-wrap .zlc-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 28px;
}

.zlc-card-wrap .zlc-gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 2px;
    display: block;
}

.zlc-card-wrap .zlc-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}

.zlc-card-wrap .zlc-gallery-item:hover img {
    transform: scale(1.08);
}

/* ---------- CTA ---------- */
.zlc-card-wrap .zlc-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--zlc-accent);
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.2);
}

.zlc-card-wrap .zlc-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.25);
    color: #fff;
}

.zlc-card-wrap .zlc-cta svg {
    transition: transform 200ms ease;
}

.zlc-card-wrap .zlc-cta:hover svg {
    transform: translateX(3px);
}

/* ====================================================
   STYLE 1: EDITORIAL — image + sidebar layout
==================================================== */
.zlc-style-editorial .zlc-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.zlc-style-editorial .zlc-media {
    min-height: 420px;
}

@container (max-width: 700px) {
    .zlc-style-editorial .zlc-card {
        grid-template-columns: 1fr;
    }
    .zlc-style-editorial .zlc-media {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }
}

/* ====================================================
   STYLE 2: OVERLAY — text on top of full-bleed image
==================================================== */
.zlc-style-overlay .zlc-card {
    position: relative;
    isolation: isolate;
    min-height: 560px;
    display: flex;
    align-items: flex-end;
}

.zlc-style-overlay .zlc-media {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.zlc-style-overlay .zlc-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.85) 100%);
}

.zlc-style-overlay .zlc-body {
    color: #fff;
    width: 100%;
    padding: 48px;
}

.zlc-style-overlay .zlc-price,
.zlc-style-overlay .zlc-address,
.zlc-style-overlay .zlc-spec-num {
    color: #fff;
}

.zlc-style-overlay .zlc-citystate,
.zlc-style-overlay .zlc-spec-label,
.zlc-style-overlay .zlc-description {
    color: rgba(255,255,255,0.85);
}

.zlc-style-overlay .zlc-specs {
    border-color: rgba(255,255,255,0.2);
}

.zlc-style-overlay .zlc-cta {
    background: #fff;
    color: var(--zlc-accent);
}

.zlc-style-overlay .zlc-cta:hover {
    color: var(--zlc-accent);
    background: #f0ebe1;
}

/* ====================================================
   STYLE 3: MINIMAL — stacked, compact
==================================================== */
.zlc-style-minimal .zlc-card {
    max-width: 460px;
}

.zlc-style-minimal .zlc-media {
    aspect-ratio: 4 / 3;
}

.zlc-style-minimal .zlc-body {
    padding: 24px;
}

.zlc-style-minimal .zlc-price {
    font-size: 1.7rem;
}

.zlc-style-minimal .zlc-address {
    font-size: 1.1rem;
}

.zlc-style-minimal .zlc-specs {
    padding: 14px 0;
    gap: 20px;
    margin-bottom: 16px;
}

.zlc-style-minimal .zlc-spec-num {
    font-size: 1.1rem;
}

.zlc-style-minimal .zlc-description {
    font-size: 0.88rem;
    margin-bottom: 18px;
}

/* ---------- Empty / editor state ---------- */
.zlc-empty-state {
    border: 2px dashed #cbd5e0;
    padding: 32px;
    text-align: center;
    background: #f7fafc;
    border-radius: 6px;
    font-family: system-ui, sans-serif;
    color: #4a5568;
}

.zlc-empty-state strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #2d3748;
}

.zlc-empty-state a {
    color: #2b6cb0;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .zlc-card-wrap .zlc-hero,
    .zlc-card-wrap .zlc-cta,
    .zlc-card-wrap .zlc-gallery-item img,
    .zlc-card-wrap .zlc-cta svg {
        transition: none;
    }
}
