@import url(https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;600&family=DM+Sans:wght@400;500&display=swap);
/* ─── Fonts ─────────────────────────────────────────────────────────────────── */

/* ─── Animations ─────────────────────────────────────────────────────────────── */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Wrapper ─────────────────────────────────────────────────────────────────── */
.listings-wrapper {
    font-family: 'EB Garamond', Georgia, serif;
    max-width: 85rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Tabs ───────────────────────────────────────────────────────────────────── */
.listings-tabs-wrapper {
    position: relative;
    margin-bottom: 48px;
}

.listings-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e2e2;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 0;
}

.listings-refetch-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #111;
    animation: pulse 1s ease-in-out infinite;
}

.listings-grid.is-fetching {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.listings-tabs::-webkit-scrollbar {
    display: none;
}

.listings-tab {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    font-size: 14px;
    color: #888;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.01em;
    white-space: nowrap;
    transition: color 0.2s;
}

.listings-tab:hover {
    color: #444;
}

.listings-tab.active {
    color: #111;
    border-bottom: 2px solid #111;
    font-weight: 600;
}

.listings-tab-icon {
    opacity: 0.5;
    display: flex;
    align-items: center;
}

.listings-tab.active .listings-tab-icon {
    opacity: 0.7;
}

/* ─── Skeleton Tabs ──────────────────────────────────────────────────────────── */
.listings-tab-skeleton {
    height: 14px;
    background: #e8e8e8;
    border-radius: 4px;
    margin: 12px 20px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ─── Grid ───────────────────────────────────────────────────────────────────── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px 28px;
}

@media (max-width: 900px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .listings-wrapper {
        padding: 0 16px;
    }

    .listings-grid {
        grid-template-columns: 1fr;
    }

    .listings-tabs {
        justify-content: flex-start;
    }

    /* ─── Tabs ───────────────────────────────────────────────────────────────────── */
    .listings-tabs-wrapper {
        margin-bottom: 1.5rem;
    }
}

/* ─── Card ───────────────────────────────────────────────────────────────────── */
.property-card {
    display: block;
    text-align: left;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    animation: fadeUp 0.4s ease forwards;
    opacity: 0;
}

.property-card:hover .property-name {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── Card Image ─────────────────────────────────────────────────────────────── */
.property-image-wrapper {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
    margin-bottom: 14px;
}

.property-image-placeholder {
    position: absolute;
    inset: 0;
    background: #e8e8e8;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, opacity 0.3s ease;
}

.property-card:hover .property-image {
    transform: scale(1.04);
}

/* ─── Card Body ──────────────────────────────────────────────────────────────── */
.property-card-body {
    padding: 0 2px;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 13px;
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
}

.property-name {
    font-size: 22px;
    font-weight: 400;
    color: #111;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.property-meta-row {
    display: flex;
    gap: 18px;
    align-items: center;
}

.property-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
}

/* ─── Skeleton Card ──────────────────────────────────────────────────────────── */
.skeleton-card {
    display: block;
}

.skeleton-image {
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    background: #e8e8e8;
    margin-bottom: 14px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-card-body {
    padding: 0 2px;
}

.skeleton-line {
    background: #e8e8e8;
    border-radius: 4px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-line.short {
    width: 80px;
    height: 12px;
    margin-bottom: 10px;
}

.skeleton-line.medium {
    width: 65%;
    height: 18px;
    margin-bottom: 14px;
}

.skeleton-line.small {
    width: 60px;
    height: 12px;
}

.skeleton-meta-row {
    display: flex;
    gap: 16px;
}

/* ─── Error State ────────────────────────────────────────────────────────────── */
.listings-error {
    padding: 48px 0;
    text-align: center;
    color: #888;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
}

/* ─── CTA ────────────────────────────────────────────────────────────────────── */
.listings-cta-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 64px;
}

.listings-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #111;
    color: #fff;
    padding: 14px 28px;
    border-radius: 4px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.2s, gap 0.2s;
}

.listings-cta-button:hover {
    background: #333;
    gap: 14px;
}
