/* Casas Nicas — hoja de estilos del sistema propio */
:root {
    --brand: #0e5a4a;        /* verde bosque nica */
    --brand-dark: #0a4237;
    --accent: #e8a13a;       /* dorado cálido */
    --wa: #25d366;
    --text: #24312e;
    --muted: #6b7a76;
    --bg: #ffffff;
    --bg-soft: #f4f7f6;
    --border: #dfe7e4;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(14, 90, 74, .08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.25; color: var(--brand-dark); }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 2.5rem 1rem; }
.center { text-align: center; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- header ---------- */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; }
.brand { font-size: 1.4rem; font-weight: 800; text-decoration: none; color: var(--brand-dark); }
.brand span { color: var(--accent); }
.main-nav a { margin-left: 1.1rem; text-decoration: none; color: var(--text); font-weight: 500; }
.main-nav a:hover { color: var(--brand); }

/* ---------- hero + búsqueda ---------- */
.hero {
    background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff; padding: 3.5rem 0;
}
.hero h1 { color: #fff; margin: 0 0 .3rem; font-size: 2.2rem; }
.hero p { margin: 0 0 1.5rem; opacity: .85; }
.search-bar {
    display: grid; gap: .6rem;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    background: #fff; padding: .8rem; border-radius: var(--radius); box-shadow: var(--shadow);
}
.search-bar input, .search-bar select {
    padding: .65rem .8rem; border: 1px solid var(--border); border-radius: 6px; font-size: .95rem;
    width: 100%; background: #fff; color: var(--text);
}
.search-bar button {
    padding: .65rem 1.4rem; background: var(--accent); color: #fff; font-weight: 700;
    border: 0; border-radius: 6px; cursor: pointer; font-size: .95rem;
}
.search-bar button:hover { filter: brightness(1.05); }
.search-bar-compact { box-shadow: none; border: 1px solid var(--border); margin-bottom: 1.5rem; }

/* ---------- grid de tarjetas ---------- */
.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card {
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    background: #fff; box-shadow: var(--shadow); transition: transform .15s ease;
}
.card:hover { transform: translateY(-3px); }
.card-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
    position: absolute; top: .7rem; left: .7rem;
    background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700;
    padding: .25rem .6rem; border-radius: 4px;
}
.badge-for-rent { background: var(--accent); }
.card-body { padding: .9rem 1rem 1.1rem; }
.card-body h3 { margin: 0 0 .3rem; font-size: 1.02rem; }
.card-body h3 a { text-decoration: none; color: var(--brand-dark); }
.card-location { margin: 0; font-size: .85rem; color: var(--muted); }
.card-price { margin: .5rem 0 .3rem; font-size: 1.15rem; font-weight: 800; color: var(--brand); }
.card-meta { list-style: none; display: flex; gap: .9rem; margin: 0; padding: 0; font-size: .85rem; color: var(--muted); }

/* ---------- chips ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
    display: inline-block; padding: .35rem .85rem; border-radius: 999px;
    background: var(--bg-soft); border: 1px solid var(--border);
    text-decoration: none; color: var(--text); font-size: .9rem;
}
.chip:hover { background: var(--brand); color: #fff; }
.chip small { color: inherit; opacity: .7; }

/* ---------- botones ---------- */
.btn {
    display: inline-block; padding: .6rem 1.3rem; border-radius: 6px;
    background: var(--brand); color: #fff; text-decoration: none; font-weight: 600;
}
.btn:hover { background: var(--brand-dark); }
.btn-wa { background: var(--wa); }
.btn-wa:hover { background: #1eb455; }

/* ---------- ficha de propiedad ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.property-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: end; margin-bottom: 1.2rem; }
.property-header h1 { margin: 0; font-size: 1.7rem; }
.property-address { margin: .2rem 0 0; color: var(--muted); }
.property-price { font-size: 1.5rem; font-weight: 800; color: var(--brand); display: flex; align-items: center; gap: .7rem; }
.property-price .badge { position: static; }

.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(4, 1fr); margin-bottom: 1.6rem; }
.gallery-main { grid-column: 1 / -1; }
.gallery-main img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--radius); }
.gallery-thumb img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }

.property-layout { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr; align-items: start; }
.property-highlights {
    list-style: none; padding: 1rem 1.2rem; margin: 0 0 1.4rem;
    display: grid; gap: .4rem 1.4rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    background: var(--bg-soft); border-radius: var(--radius);
}
.property-details { columns: 2; }
.contact-box {
    position: sticky; top: 80px;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.3rem; background: #fff; box-shadow: var(--shadow); text-align: center;
}
.contact-box h3 { margin-top: 0; }
.contact-box .btn-wa { width: 100%; }
.agent { font-size: .95rem; }

/* ---------- faqs ---------- */
.faq { border: 1px solid var(--border); border-radius: 8px; margin-bottom: .6rem; padding: .2rem 1rem; }
.faq summary { cursor: pointer; font-weight: 600; padding: .6rem 0; }

/* ---------- paginación ---------- */
.pagination { margin-top: 2rem; display: flex; gap: .4rem; justify-content: center; }
.pagination a, .pagination .current {
    padding: .45rem .85rem; border-radius: 6px; text-decoration: none;
    border: 1px solid var(--border);
}
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- footer ---------- */
.site-footer { background: var(--brand-dark); color: #cfe0db; margin-top: 3rem; }
.footer-inner { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 2.2rem 1rem 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer .brand { color: #fff; }
.copyright { padding: 1rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
    position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 60;
    width: 54px; height: 54px; border-radius: 50%;
    background: var(--wa); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
    .search-bar { grid-template-columns: 1fr 1fr; }
    .search-bar input[name="q"] { grid-column: 1 / -1; }
    .property-layout { grid-template-columns: 1fr; }
    .gallery { grid-template-columns: repeat(3, 1fr); }
    .main-nav { display: none; } /* TODO: menú móvil hamburguesa si el cliente lo pide */
    .property-details { columns: 1; }
}
