@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
    --soil: #2C1810;
    --earth: #5C3D2E;
    --clay: #8B5E3C;
    --wheat: #D4A853;
    --sage: #7A8C6E;
    --sky: #4A7FA5;
    --cream: #F5F0E8;
    --white: #FDFCFA;
    --gray-100: #F0EDE7;
    --gray-200: #E2DDD5;
    --gray-400: #9E978C;
    --gray-600: #6B6460;
    --gray-800: #3A3530;
    --shadow-sm: 0 1px 3px rgba(44,24,16,0.08);
    --shadow-md: 0 4px 16px rgba(44,24,16,0.12);
    --shadow-lg: 0 12px 40px rgba(44,24,16,0.16);
    --radius: 8px;
    --radius-lg: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.25; }

a { color: var(--earth); text-decoration: none; transition: color .2s; }
a:hover { color: var(--wheat); }

/* ── Layout ── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ── Navigation ── */
nav {
    background: var(--soil);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 68px;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem; font-weight: 700;
    color: var(--cream); letter-spacing: -.5px;
}
.nav-logo .logo-icon { font-size: 1.8rem; }
.nav-logo span { color: var(--wheat); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
    color: rgba(245,240,232,.75); font-size: .9rem; font-weight: 500;
    padding: 6px 14px; border-radius: 6px; transition: all .2s;
}
.nav-links a:hover { color: var(--cream); background: rgba(255,255,255,.08); }
.nav-links .btn-nav {
    background: var(--wheat); color: var(--soil) !important;
    font-weight: 600; padding: 8px 20px;
}
.nav-links .btn-nav:hover { background: #e8b85a; }

/* ── Hero ── */
.hero {
    background: linear-gradient(160deg, var(--soil) 0%, var(--earth) 60%, var(--clay) 100%);
    padding: 90px 0 80px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); color: var(--cream); margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--wheat); }
.hero p { font-size: 1.15rem; color: rgba(245,240,232,.8); max-width: 560px; margin: 0 auto 40px; }
.hero-search {
    background: var(--white); border-radius: 12px;
    padding: 8px 8px 8px 20px;
    display: flex; gap: 8px; align-items: center;
    max-width: 620px; margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.hero-search input {
    flex: 1; border: none; outline: none; background: transparent;
    font-family: 'DM Sans', sans-serif; font-size: 1rem; color: var(--gray-800);
}
.hero-search input::placeholder { color: var(--gray-400); }
.hero-search select {
    border: none; outline: none; background: var(--gray-100);
    padding: 8px 12px; border-radius: 6px;
    font-family: 'DM Sans', sans-serif; font-size: .9rem; color: var(--gray-800);
    cursor: pointer;
}
.hero-stats {
    display: flex; justify-content: center; gap: 48px; margin-top: 50px;
}
.hero-stat { text-align: center; color: var(--cream); }
.hero-stat .num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--wheat); }
.hero-stat .lbl { font-size: .85rem; opacity: .7; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 24px; border-radius: var(--radius);
    font-family: 'DM Sans', sans-serif; font-size: .95rem; font-weight: 600;
    cursor: pointer; transition: all .2s; border: 2px solid transparent;
}
.btn-primary { background: var(--wheat); color: var(--soil); }
.btn-primary:hover { background: #e8b85a; color: var(--soil); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--earth); border-color: var(--clay); }
.btn-outline:hover { background: var(--earth); color: var(--cream); }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 7px 16px; font-size: .85rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; justify-content: center; }

/* ── Section ── */
.section { padding: 64px 0; }
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 36px; }
.section-title { font-size: 1.9rem; color: var(--soil); }
.section-title span { color: var(--wheat); }

/* ── Listing Cards ── */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img-wrap {
    position: relative; aspect-ratio: 16/10; overflow: hidden;
    background: var(--gray-100);
}
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-img-wrap img { transform: scale(1.04); }
.card-img-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; color: var(--gray-400);
}
.card-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--wheat); color: var(--soil);
    font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    padding: 4px 10px; border-radius: 4px;
}
.card-badge.featured { background: var(--soil); color: var(--wheat); }
.card-save-btn {
    position: absolute; top: 10px; right: 10px;
    background: white; border: none; width: 34px; height: 34px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 1rem; box-shadow: var(--shadow-sm);
    transition: all .2s; color: var(--gray-400);
}
.card-save-btn:hover, .card-save-btn.saved { color: #e53e3e; transform: scale(1.1); }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-type {
    font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
    color: var(--sage); margin-bottom: 6px;
}
.card-title { font-size: 1.1rem; color: var(--soil); margin-bottom: 8px; line-height: 1.3; }
.card-location { font-size: .88rem; color: var(--gray-600); display: flex; align-items: center; gap: 4px; margin-bottom: 14px; }
.card-meta { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.card-meta-item { font-size: .85rem; color: var(--gray-600); display: flex; align-items: center; gap: 4px; }
.card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--gray-200); }
.card-price { font-family: 'Playfair Display', serif; font-size: 1.35rem; font-weight: 700; color: var(--soil); }
.card-price small { font-family: 'DM Sans', sans-serif; font-size: .8rem; font-weight: 400; color: var(--gray-600); }

/* ── Forms ── */
.form-group { margin-bottom: 22px; }
.form-label { display: block; font-size: .88rem; font-weight: 600; color: var(--gray-800); margin-bottom: 7px; }
.form-label .req { color: var(--wheat); }
.form-control {
    width: 100%; padding: 11px 16px;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    background: var(--white); color: var(--gray-800);
    font-family: 'DM Sans', sans-serif; font-size: .95rem;
    transition: border-color .2s, box-shadow .2s; outline: none;
}
.form-control:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(92,61,46,.1); }
.form-control.is-invalid { border-color: #dc2626; }
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-hint { font-size: .8rem; color: var(--gray-400); margin-top: 5px; }
.form-check { display: flex; align-items: center; gap: 10px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--clay); cursor: pointer; }

/* ── Auth pages ── */
.auth-page {
    min-height: calc(100vh - 68px);
    display: flex; align-items: center; justify-content: center;
    padding: 40px 24px;
}
.auth-card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 48px 40px;
    width: 100%; max-width: 440px;
}
.auth-card h2 { font-size: 1.8rem; color: var(--soil); margin-bottom: 6px; }
.auth-card .subtitle { color: var(--gray-600); margin-bottom: 32px; }

/* ── Alert ── */
.alert {
    padding: 12px 18px; border-radius: var(--radius);
    font-size: .9rem; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Dashboard ── */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; padding: 40px 0; }
.sidebar {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 28px 20px; height: fit-content;
    box-shadow: var(--shadow-sm);
}
.sidebar-user { text-align: center; padding-bottom: 24px; border-bottom: 1px solid var(--gray-200); margin-bottom: 20px; }
.sidebar-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--clay), var(--earth));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; color: var(--cream); margin: 0 auto 12px; font-family: 'Playfair Display', serif;
}
.sidebar-user h4 { font-size: 1rem; color: var(--soil); }
.sidebar-user p { font-size: .82rem; color: var(--gray-400); }
.sidebar-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius);
    font-size: .9rem; color: var(--gray-600); font-weight: 500;
    transition: all .2s; margin-bottom: 2px;
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--gray-100); color: var(--soil); }
.sidebar-nav a.active { background: linear-gradient(135deg, rgba(139,94,60,.12), rgba(212,168,83,.12)); color: var(--earth); font-weight: 600; }
.main-content { min-width: 0; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin-bottom: 32px; }
.stat-card {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 24px 20px; box-shadow: var(--shadow-sm); text-align: center;
}
.stat-card .stat-icon { font-size: 2rem; margin-bottom: 10px; }
.stat-card .stat-value { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 700; color: var(--soil); }
.stat-card .stat-label { font-size: .82rem; color: var(--gray-400); margin-top: 2px; }

/* ── Table ── */
.table-wrap { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--gray-100); padding: 13px 18px; text-align: left; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); }
.data-table td { padding: 14px 18px; border-bottom: 1px solid var(--gray-100); font-size: .9rem; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-100); }

/* ── Status badges ── */
.badge {
    display: inline-block; padding: 3px 10px;
    border-radius: 100px; font-size: .75rem; font-weight: 600;
}
.badge-active { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef9c3; color: #854d0e; }
.badge-sold { background: #ede9fe; color: #5b21b6; }
.badge-inactive { background: var(--gray-200); color: var(--gray-600); }

/* ── Detail page ── */
.listing-detail { padding: 40px 0; }
.detail-header { margin-bottom: 32px; }
.detail-header h1 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); color: var(--soil); margin-bottom: 10px; }
.detail-images { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 36px; }
.detail-img-main { aspect-ratio: 16/10; background: var(--gray-200); }
.detail-img-main img, .detail-img-side img { width: 100%; height: 100%; object-fit: cover; }
.detail-img-side { display: flex; flex-direction: column; gap: 12px; }
.detail-img-side > div { flex: 1; background: var(--gray-200); }
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 36px; align-items: start; }
.detail-specs {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 28px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
}
.detail-specs h3 { font-size: 1.15rem; color: var(--soil); margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--gray-200); }
.specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.spec-item .spec-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); margin-bottom: 4px; }
.spec-item .spec-value { font-size: .95rem; color: var(--gray-800); font-weight: 500; }
.contact-box {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 28px; box-shadow: var(--shadow-md); position: sticky; top: 84px;
}
.contact-box .price { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: var(--soil); margin-bottom: 4px; }
.contact-box .price-per { font-size: .88rem; color: var(--gray-600); margin-bottom: 24px; }
.seller-info { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding: 16px; background: var(--gray-100); border-radius: var(--radius); }
.seller-avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--clay), var(--earth)); display: flex; align-items: center; justify-content: center; color: var(--cream); font-weight: 700; font-family: 'Playfair Display', serif; flex-shrink: 0; }

/* ── Filters ── */
.filters-bar {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 20px 24px; margin-bottom: 28px;
    box-shadow: var(--shadow-sm); display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end;
}
.filter-group { flex: 1; min-width: 140px; }
.filter-group label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); margin-bottom: 6px; }
.filter-group select, .filter-group input {
    width: 100%; padding: 9px 12px;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius);
    background: var(--white); font-family: 'DM Sans', sans-serif; font-size: .9rem;
    color: var(--gray-800); outline: none;
}

/* ── Page header ── */
.page-header { padding: 40px 0 12px; }
.page-header h1 { font-size: 2rem; color: var(--soil); }
.page-header p { color: var(--gray-600); margin-top: 6px; }
.breadcrumb { font-size: .85rem; color: var(--gray-400); margin-bottom: 8px; }
.breadcrumb a { color: var(--gray-400); }
.breadcrumb a:hover { color: var(--earth); }

/* ── Upload zone ── */
.upload-zone {
    border: 2px dashed var(--gray-200); border-radius: var(--radius-lg);
    padding: 40px; text-align: center; cursor: pointer;
    transition: all .2s; background: var(--gray-100);
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--clay); background: rgba(139,94,60,.05); }
.upload-zone .icon { font-size: 2.5rem; color: var(--gray-400); margin-bottom: 12px; }
.upload-zone p { color: var(--gray-600); font-size: .9rem; }
.upload-zone span { color: var(--clay); font-weight: 600; }
.image-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-top: 16px; }
.image-preview { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; }
.image-preview img { width: 100%; height: 100%; object-fit: cover; }
.image-preview .remove-img { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.7); color: white; border: none; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; font-size: .8rem; display: flex; align-items: center; justify-content: center; }

/* ── Footer ── */
footer {
    background: var(--soil); color: rgba(245,240,232,.7);
    padding: 60px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--cream); margin-bottom: 12px; }
.footer-brand .logo span { color: var(--wheat); }
.footer-brand p { font-size: .88rem; line-height: 1.7; }
.footer-col h5 { color: var(--cream); font-family: 'Playfair Display', serif; font-size: 1rem; margin-bottom: 16px; }
.footer-col a { display: block; font-size: .88rem; color: rgba(245,240,232,.6); margin-bottom: 10px; transition: color .2s; }
.footer-col a:hover { color: var(--wheat); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; }

/* ── Utilities ── */
.mt-0{margin-top:0} .mt-2{margin-top:8px} .mt-3{margin-top:12px} .mt-4{margin-top:16px} .mt-6{margin-top:24px} .mt-8{margin-top:32px}
.mb-4{margin-bottom:16px} .mb-6{margin-bottom:24px}
.text-center{text-align:center} .text-muted{color:var(--gray-400)} .text-sm{font-size:.85rem}
.d-flex{display:flex} .align-center{align-items:center} .gap-2{gap:8px} .gap-3{gap:12px} .gap-4{gap:16px}
.divider{border:none;border-top:1px solid var(--gray-200);margin:24px 0}
.no-results { text-align: center; padding: 80px 24px; color: var(--gray-400); }
.no-results .icon { font-size: 4rem; margin-bottom: 16px; }
.no-results h3 { color: var(--gray-600); margin-bottom: 8px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .detail-layout { grid-template-columns: 1fr; }
    .contact-box { position: static; }
}
@media (max-width: 768px) {
    .dashboard-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero-stats { gap: 28px; flex-wrap: wrap; }
    .detail-images { grid-template-columns: 1fr; }
    .detail-img-side { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .nav-links .btn-nav { display: none; }
    .specs-grid { grid-template-columns: 1fr; }
}
