:root {
    --bg-dark: #0A1E15;
    --bg-dark-2: #0F2B1F;
    --gold: #C5A028;
    --gold-dark: #997A15;
    --gold-light: #E0C075;
    --ink: #13211A;
    --muted: #66736c;
    --line: #e6ece8;
    --paper: #f7f9f7;
    --danger: #d64545;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: var(--paper);
    margin: 0;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ── Navbar ── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { height: 34px; width: auto; }
.brand .brand-name { color: var(--bg-dark); font-size: 1.05rem; letter-spacing: .2px; }
.brand .brand-name span { color: var(--gold-dark); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: .95rem; }
.nav-links a:hover { color: var(--gold-dark); }

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 520px;
    display: flex; align-items: center;
    background: linear-gradient(rgba(10,30,21,.62), rgba(10,30,21,.78)), url('../img/hero.jpg') center/cover no-repeat;
    color: #fff;
    padding: 64px 0;
}
.hero-inner { width: 100%; }
.hero h1 {
    font-size: clamp(1.9rem, 4.2vw, 3.1rem);
    font-weight: 800; line-height: 1.12; margin: 0 0 12px; max-width: 640px;
}
.hero p.sub { font-size: 1.1rem; opacity: .92; max-width: 560px; margin: 0 0 28px; }

/* ── Buscador ── */
.search-box {
    background: #fff; color: var(--ink);
    border-radius: 14px; padding: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.search-box .row { display: flex; flex-wrap: wrap; gap: 12px; }
.search-box .field { flex: 1 1 160px; min-width: 150px; }
.search-box label { display: block; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin-bottom: 4px; }
.search-box select, .search-box input {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
    font-size: .95rem; background: #fff; color: var(--ink);
}
.search-box button {
    align-self: flex-end; padding: 10px 26px; border: 0; border-radius: 8px;
    background: var(--gold); color: #1a1305; font-weight: 700; cursor: pointer;
    transition: background .15s;
}
.search-box button:hover { background: var(--gold-light); }

/* ── Secciones ── */
.section { padding: 44px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 20px; }
.section-head h2 { font-size: 1.5rem; font-weight: 800; margin: 0; }
.section-head a { color: var(--gold-dark); font-weight: 600; font-size: .92rem; }
.section-head a:hover { text-decoration: underline; }

/* ── Grid / cards ── */
.grid { display: grid; gap: 22px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 992px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.prop-card {
    display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
    border-radius: 12px; overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.prop-card:hover { box-shadow: 0 12px 32px rgba(10,30,21,.12); transform: translateY(-3px); }
.prop-card-img { position: relative; height: 190px; background: #eef1ee; overflow: hidden; }
.prop-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prop-card-img .card-img { width: 100%; height: 100%; }
.prop-oper { position: absolute; left: 10px; top: 10px; }
.badge-destacada {
    position: absolute; right: 10px; top: 10px; background: var(--gold); color: #1a1305;
    font-size: .72rem; font-weight: 700; padding: 4px 8px; border-radius: 6px;
}
.prop-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 7px; }
.prop-precio { font-size: 1.15rem; font-weight: 800; color: var(--bg-dark); }
.prop-precio small { font-weight: 500; color: var(--muted); }
.prop-titulo { font-size: 1rem; font-weight: 600; margin: 0; line-height: 1.3; color: var(--ink); }
.prop-ubic { font-size: .85rem; color: var(--muted); display: flex; gap: 5px; align-items: center; }
.prop-detalles { display: flex; flex-wrap: wrap; gap: 12px; font-size: .82rem; color: var(--ink); }
.prop-detalles i { margin-right: 3px; color: var(--gold-dark); }
.prop-inmob { font-size: .78rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; }

/* ── Listado layout ── */
.layout { display: grid; grid-template-columns: 270px 1fr; gap: 26px; padding: 28px 0 48px; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.filters { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; height: fit-content; }
.filters h4 { font-size: .95rem; font-weight: 700; margin: 0 0 14px; }
.filter-group { margin-bottom: 16px; }
.filter-group label { display: block; font-size: .78rem; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.filter-group select, .filter-group input { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: .9rem; }
.filter-group .range { display: flex; gap: 8px; }
.filter-group .range input { width: 50%; }
.btn-aplicar { width: 100%; padding: 10px; border: 0; border-radius: 8px; background: var(--bg-dark); color: #fff; font-weight: 600; cursor: pointer; }
.btn-limpiar { width: 100%; margin-top: 8px; padding: 8px; background: transparent; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); cursor: pointer; }

.results-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.results-bar .count { font-weight: 600; }
.results-bar select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 600; font-size: .9rem;
}
.pagination .active { background: var(--bg-dark); color: #fff; border-color: var(--bg-dark); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ── Detalle ── */
.detail { padding: 28px 0 56px; }
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 16px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--gold-dark); }
.detail-head h1 { font-size: 1.7rem; font-weight: 800; margin: 6px 0 8px; }
.detail-head .precio { font-size: 1.5rem; font-weight: 800; color: var(--bg-dark); }
.detail-head .precio small { color: var(--muted); font-weight: 500; }
.detail-head .ubic { color: var(--muted); }

.gallery { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 20px 0; }
.gallery .main { border-radius: 12px; overflow: hidden; height: 420px; background: #eef1ee; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery .thumbs img {
    width: 90px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent;
}
.gallery .thumbs img.active { border-color: var(--gold); }

.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.card-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 20px; }
.card-panel h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 14px; }
.caracts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
.caract { display: flex; gap: 9px; align-items: center; font-size: .92rem; }
.caract i { color: var(--gold-dark); font-size: 1.05rem; }
.descripcion { white-space: pre-line; color: #2a3830; line-height: 1.65; }

#map { height: 300px; border-radius: 10px; border: 1px solid var(--line); }

/* ── Formulario de consulta ── */
.form-consulta label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.form-consulta input, .form-consulta textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .95rem;
}
.form-consulta button {
    width: 100%; margin-top: 16px; padding: 12px; border: 0; border-radius: 8px;
    background: var(--gold); color: #1a1305; font-weight: 700; cursor: pointer;
}
.form-consulta button:hover { background: var(--gold-light); }
.share-row { display: flex; gap: 8px; margin-top: 14px; }
.share-row a, .share-row button {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: .86rem; font-weight: 600; cursor: pointer;
}
.share-row .wa { color: #128c4a; }
.share-row a:hover, .share-row button:hover { background: var(--paper); }

/* ── Vacío / estados ── */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty i { font-size: 2.4rem; color: var(--line); }

/* ── Footer ── */
.footer { background: var(--bg-dark); color: #c9d6cd; padding: 36px 0; margin-top: 20px; }
.footer .container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.footer .brand img { height: 30px; }
.footer a { color: #c9d6cd; }
.footer a:hover { color: var(--gold-light); }
.footer small { display: block; margin-top: 18px; color: #8ba096; }

.spinner { display: flex; justify-content: center; padding: 50px; }
