/* pages.css — Page-level layout only */
/* auth styles live in auth.css */
/* flash styles live in components.css */
/* components live in components.css */

/* Listing grid */
.listing-grid { display: grid; grid-template-columns: 1fr; gap: var(--s3); }
@media (min-width: 640px)  { .listing-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .listing-grid { grid-template-columns: repeat(3, 1fr); } }

/* Hero */
.hero {
    background: var(--hero-bg);
    color: white;
    padding: var(--s5) 0;
    text-align: center;
}
.hero h1 {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: var(--s2);
    letter-spacing: -0.03em;
    line-height: 1.08;
}
.hero p {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto var(--s3);
    line-height: 1.6;
}
.hero .btn { height: 52px; padding: 0 var(--s4); font-size: 1rem; }

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--s4);
    flex-wrap: wrap;
    gap: var(--s2);
}
.dashboard-table th,
.dashboard-table td {
    padding: var(--s2);
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.dashboard-table th {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    background: var(--bg);
}
.dashboard-table td { font-size: 0.875rem; }

/* Listing detail */
.detail-price {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--obsidian);
    letter-spacing: -0.02em;
}
.detail-grid  { display: grid; gap: var(--s3); }
.detail-info  {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: var(--s3);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.detail-info dt {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-bottom: 2px;
}
.detail-info dd {
    font-size: 1rem;
    color: var(--text);
    margin-bottom: var(--s2);
}

/* Empty state */
.empty-state { text-align: center; padding: var(--s5) var(--s2); }
.empty-state h2 { color: var(--text-muted); margin-bottom: var(--s2); font-weight: 600; }
.empty-state p { color: var(--text-light); max-width: 400px; margin: 0 auto var(--s3); }

/* Page section utility */
.page-section { padding: var(--s5) 0; }
.page-header  { margin-bottom: var(--s4); }

@media (min-width: 640px) {
    .detail-grid { grid-template-columns: 2fr 1fr; }
    .detail-price { font-size: 2rem; }
    .hero h1 { font-size: 3.25rem; }
    .hero p  { font-size: 1.125rem; }
    .hero    { padding: var(--s7) 0; }
}

@media (min-width: 1024px) {
    .hero h1 { font-size: 4rem; }
}

/* Profile header */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s4);
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: var(--s4);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--obsidian);
    color: #D8A25E;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.profile-info h1 {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-top: 6px;
}

.auth-badge-google {
    background: #EEF2FF;
    color: #4F46E5;
}

.auth-badge-email {
    background: var(--success-bg);
    color: var(--sage);
}

.dashboard-table-wrap {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

/* Dashboard table cells */
.td-title {
    font-weight: 600;
    color: var(--obsidian);
}

.td-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Auth badge inline icon */
.auth-badge svg {
    display: inline;
    vertical-align: middle;
    margin-right: 4px;
}


/* ═══ LISTING DETAIL ═══ */

.listing-detail {
    max-width: 760px;
    margin: 0 auto;
}

/* Gallery */
.listing-gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-bottom: var(--s3);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.listing-gallery-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: var(--bg);
}

.listing-gallery-img:first-child {
    height: 300px;
}

.listing-gallery-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--s1);
    height: 220px;
    background: var(--bg);
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-light);
    text-align: center;
    font-size: 0.875rem;
}

/* Header */
.listing-header {
    margin-bottom: var(--s3);
}

.listing-header-top {
    display: flex;
    align-items: center;
    gap: var(--s1);
    flex-wrap: wrap;
    margin-bottom: var(--s1);
}

.listing-header h1 {
    font-size: 2rem;
    margin-bottom: 6px;
}

.listing-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.listing-location svg {
    flex-shrink: 0;
    color: var(--text-light);
}

/* Price */
.listing-price-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--s3);
    margin-bottom: var(--s3);
    box-shadow: var(--shadow);
}

.listing-price-main {
    font-family: var(--font-mono);
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--obsidian);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.listing-price-currency {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-muted);
}

.listing-price-note {
    font-size: 0.6875rem;
    color: var(--text-light);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

/* Details grid */
.listing-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s2);
    margin-bottom: var(--s3);
}

.listing-detail-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--s2);
    box-shadow: var(--shadow);
}

.listing-detail-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    margin-bottom: 4px;
}

.listing-detail-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
}

/* Description */
.listing-description {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--s3);
    margin-bottom: var(--s3);
    box-shadow: var(--shadow);
}

.listing-description h2 {
    font-size: 1.125rem;
    margin-bottom: var(--s2);
}

.listing-description p {
    font-size: 0.9375rem;
    color: var(--text-muted);
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Contact CTA */
.listing-contact {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--s3);
    text-align: center;
    margin-bottom: var(--s3);
    box-shadow: var(--shadow);
}

.listing-contact h2 {
    font-size: 1.125rem;
    margin-bottom: 4px;
}

.listing-contact p {
    margin-bottom: var(--s2);
}

.listing-contact .btn-whatsapp {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

/* Owner actions */
.listing-owner-actions {
    display: flex;
    flex-direction: column;
    gap: var(--s2);
    padding: var(--s3);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--s4);
}

.listing-owner-actions .btn,
.listing-owner-actions form {
    width: 100%;
}

.listing-owner-actions form {
    margin: 0;
}

/* Responsive */
@media (min-width: 640px) {
    .listing-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .listing-gallery-img {
        height: 240px;
    }

    .listing-gallery-img:first-child {
        grid-column: 1 / -1;
        height: 360px;
    }

    .listing-gallery-empty {
        height: 260px;
    }

    .listing-header h1 {
        font-size: 2.25rem;
    }

    .listing-details-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .listing-price-main {
        font-size: 2.25rem;
    }

    .listing-contact .btn-whatsapp {
        width: auto;
        min-width: 260px;
    }

    .listing-owner-actions {
        flex-direction: row;
        align-items: center;
    }

    .listing-owner-actions .btn,
    .listing-owner-actions form {
        width: auto;
    }
}

/* USD secondary price */
.listing-price-usd {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 2px;
}

.listing-card-price-usd {
    font-family: var(--font-mono);
    margin-top: 1px;
}
