/* ============================================================
   ÁLVORA BASE — v3.1.0
   Reset suave + tipografías + helpers + layout base
   ------------------------------------------------------------
   Este archivo se carga ANTES que cards.css, filters.css,
   header.css y listado.css.
============================================================ */

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

html {
    scroll-behavior: smooth;
    /* Red de seguridad anti scroll-horizontal: overflow-x:clip en body (abajo)
       NO contiene elementos position:fixed que se desborden (topbar/header
       del sitio son fixed) — el bloqueo real tiene que vivir en <html>,
       que es quien gobierna el viewport de scroll horizontal de la página. */
    overflow-x: hidden;
}

body {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #222;
    background: #fff;
    overflow-x: clip;
}

/* ------------------------------
   TIPOGRAFÍA GLOBAL
------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    color: #111;
}

p {
    margin-bottom: 1rem;
}

/* ======================================================
   HERO · TÍTULO BLANCO (OVERRIDE BASE)
====================================================== */

/* Título y textos blancos sobre hero */
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-hero-overlay h1,
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-hero-overlay h2,
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-hero-overlay h3,
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-hero-overlay h4,
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-hero-overlay h5,
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-hero-overlay h6,
body.page-ficha:not(.is-ficha-scrolled) .alv-ficha-price {
  color: #fff;
}

/* ------------------------------
   ENLACES
------------------------------ */
a {
    color: #0c0c0c;
    text-decoration: none;
}

a:hover {
    opacity: .7;
}

/* ------------------------------
   CONTENEDOR GLOBAL
------------------------------ */
.alv-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* ------------------------------
   UTILS
------------------------------ */
.hidden { display: none !important; }
.flex { display: flex !important; }
.center { display: flex; align-items: center; justify-content: center; }
.justify-between { display: flex; justify-content: space-between; }
.text-center { text-align: center; }

.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

/* ------------------------------
   BOTONES GLOBAL
------------------------------ */
button, .alv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    padding: 10px 18px;
    font-size: 15px;
    border-radius: 30px;
    background: #f4f4f4;
    color: #222;
    transition: all .2s ease;
}

button:hover,
.alv-btn:hover {
    background: #e6e6e6;
}

/* ------------------------------
   INPUTS / SELECTS
------------------------------ */
input {
    border: 1px solid #e8e4de;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 15px;
    background: #fff;
}

input:focus {
    outline: none;
    border-color: #172534;
}

/* Título dinámico de listado (?listado=X), ej. "Áticos", "Garaje en finca" */
.alv-listado-heading {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 40px 8px;
    text-align: center;
}
.alv-listado-heading__eyebrow {
    font-family: 'Jost', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #b49a6e;
    margin-bottom: 8px;
}
.alv-listado-heading__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 400;
    color: #172534;
}

/* El estilo de los selects de filtros (Modalidad, Tipo inmueble,
   Dormitorios) vive en el TEMA, en assets/css/filters.css
   (.alv-filter-select select). No duplicar aquí — causaba
   conflictos de especificidad con el diseño ya correcto. */

/* ------------------------------
   GRID BASE
------------------------------ */
.alv-grid {
    display: grid;
    gap: 24px;
}

.alv-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.alv-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

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

/* ------------------------------
   HEADER / FOOTER BASE
------------------------------ */
.alv-header,
.alv-footer {
    width: 100%;
}

.alv-footer {
    padding: 40px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* ------------------------------
   ESTADO DE CARGA
------------------------------ */
.alv-loading {
    opacity: .4;
    pointer-events: none;
}

/* ------------------------------
   MENSAJES
------------------------------ */
.alv-error-msg {
    margin-top: 20px;
    padding: 14px 20px;
    background: #ffecec;
    color: #b30000;
    border-left: 4px solid #b30000;
    border-radius: 4px;
    font-size: 14px;
}

/* ------------------------------
   PX SPACERS
------------------------------ */
.sp-10  { height: 10px; }
.sp-20  { height: 20px; }
.sp-30  { height: 30px; }
.sp-40  { height: 40px; }
.sp-60  { height: 60px; }

/* ============================================================
   FIN BASE
============================================================ */