/* ============================================================
   TERA BUSCADOR — Eduardo Rodrigo Inmobiliaria
   Diseño premium · #001449 · #ffffff
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --navy:           #001449;
    --navy-900:       #000d30;
    --navy-800:       #001050;
    --navy-700:       #001a6a;
    --navy-600:       #002288;
    --navy-100:       #e8ecf8;
    --navy-50:        #f2f4fb;
    --white:          #ffffff;
    --off-white:      #f8f9fc;
    --gold:           #c9a84c;
    --gold-light:     #e8c96a;
    --gold-pale:      rgba(201,168,76,0.15);
    --text-primary:   #0a1433;
    --text-secondary: #3d4f7c;
    --text-muted:     #7b8db8;
    --text-light:     #a8b5d0;
    --border-light:   #dde3f2;
    --border-mid:     #c5cfe8;
    --surface:        #f4f6fd;

    /* Sombras */
    --shadow-xs: 0 1px 4px rgba(0,20,73,0.06);
    --shadow-sm: 0 2px 10px rgba(0,20,73,0.09);
    --shadow-md: 0 6px 24px rgba(0,20,73,0.13);
    --shadow-lg: 0 12px 40px rgba(0,20,73,0.18);
    --shadow-xl: 0 24px 64px rgba(0,20,73,0.22);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   RESET BASE
   ============================================================ */
.tera-wrap,
.tera-wrap *,
.tera-carrusel-wrap,
.tera-carrusel-wrap * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.tera-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
}

.tera-wrap-inicio { max-width: 1200px; }
.tera-oculto      { display: none !important; }

/* ============================================================
   FORMULARIO DE BÚSQUEDA
   ============================================================ */
.tera-buscador-form {
    position: relative;
    background: var(--navy-900);
    border-radius: var(--radius-lg);
    padding: 32px 28px 28px;
    margin-bottom: 44px;
    box-shadow: var(--shadow-xl);
    overflow: visible; /* CRÍTICO: permite que dropdowns salgan */
    z-index: 100;
}

/* Borde sutil luminoso */
.tera-buscador-form::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, rgba(201,168,76,0.5), rgba(255,255,255,0.08), rgba(201,168,76,0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Orbe decorativo */
.tera-buscador-form::after {
    content: '';
    position: absolute;
    top: -100px;
    right: -60px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

.tera-form-fila {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 16px;
}

.tera-form-fila:last-child { margin-bottom: 0; }

.tera-form-grupo { z-index: 1; 
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 140px;
    position: relative;
}

.tera-grupo-precio { flex: 2.8; min-width: 290px; }
.tera-grupo-pais   { flex: 0.65; min-width: 105px; }
.tera-grupo-btns   {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-end;
    gap: 8px;
    min-width: auto;
}

/* Labels */
.tera-buscador-form label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gold-light);
    padding-left: 1px;
    user-select: none;
    display: block;
}

/* ============================================================
   INPUTS Y SELECTS — diseño glassmorphism refinado
   ============================================================ */
.tera-select,
.tera-input {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 13.5px;
    font-weight: 400;
    padding: 11px 16px;
    width: 100%;
    transition: all 0.2s var(--ease);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    line-height: 1.4;
}

.tera-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='rgba(201,168,76,0.8)' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    background-color: rgba(255,255,255,0.07);
    padding-right: 36px;
}

.tera-select option {
    background: var(--navy-900);
    color: var(--white);
    font-size: 13px;
    padding: 8px;
}

.tera-input::placeholder { color: rgba(255,255,255,0.28); }

.tera-select:hover,
.tera-input:hover {
    background-color: rgba(255,255,255,0.11);
    border-color: rgba(255,255,255,0.22);
}

.tera-select:focus,
.tera-input:focus {
    background-color: rgba(255,255,255,0.12);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
    color: var(--white);
}

.tera-select:disabled,
.tera-input:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Precio row */
.tera-precio-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tera-precio-row .tera-input  { flex: 1; min-width: 0; }
.tera-precio-row .tera-select { flex: 1.4; min-width: 0; background-color: rgba(255,255,255,0.07); }

.tera-sep {
    color: rgba(255,255,255,0.25);
    font-size: 18px;
    flex-shrink: 0;
}

/* ============================================================
   DROPDOWN MULTI — DORMITORIOS
   POSICIÓN CORREGIDA: abre hacia arriba para no tapar Buscar
   ============================================================ */
.tera-dropdown-multi {
    position: relative;
    z-index: 500;
}

.tera-dropdown-multi-btn {
    background: rgba(255,255,255,0.07);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 13.5px;
    font-weight: 400;
    padding: 11px 36px 11px 16px;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    text-align: left;
    outline: none;
    transition: all 0.2s var(--ease);
    position: relative;
    line-height: 1.4;
}

.tera-dropdown-multi-btn:hover {
    background: rgba(255,255,255,0.11);
    border-color: rgba(255,255,255,0.22);
}

.tera-dropdown-multi-btn.active {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.18);
}

.tera-dm-texto {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--white);
    font-size: 13.5px;
}

.tera-arr {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: rgba(201,168,76,0.8);
    transition: transform 0.2s var(--ease);
    pointer-events: none;
}

.tera-dropdown-multi-btn.active .tera-arr {
    transform: translateY(-50%) rotate(180deg);
}

/* Panel — ABRE HACIA ARRIBA */
.tera-dropdown-multi-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px); /* HACIA ABAJO, z-index alto lo pone encima */
    left: 0;
    right: 0;
    background: var(--navy-800);
    border: 1.5px solid rgba(201,168,76,0.35);
    border-radius: var(--radius-sm);
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.tera-dropdown-multi-panel::-webkit-scrollbar       { width: 4px; }
.tera-dropdown-multi-panel::-webkit-scrollbar-track  { background: transparent; }
.tera-dropdown-multi-panel::-webkit-scrollbar-thumb  { background: rgba(255,255,255,0.15); border-radius: 2px; }
.tera-dropdown-multi-panel.open { display: block; }

.tera-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    transition: all 0.15s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tera-checkbox-item:last-child { border-bottom: none; }
.tera-checkbox-item:hover      { background: rgba(255,255,255,0.07); color: var(--white); }

.tera-checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gold);
    cursor: pointer;
    flex-shrink: 0;
}

/* ============================================================
   BOTONES
   ============================================================ */
.tera-btn-buscar {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 60%, #a8843a 100%);
    color: var(--navy-900);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 26px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s var(--spring);
    height: 44px;
    box-shadow: 0 4px 16px rgba(201,168,76,0.4);
    position: relative;
    overflow: hidden;
}

.tera-btn-buscar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.2s;
}

.tera-btn-buscar:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(201,168,76,0.55);
}
.tera-btn-buscar:hover::after { opacity: 1; }
.tera-btn-buscar:active       { transform: translateY(0); }

.tera-btn-buscar svg {
    width: 17px;
    height: 17px;
    fill: var(--navy-900);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.tera-btn-buscar span { position: relative; z-index: 1; }

.tera-btn-limpiar {
    background: transparent;
    color: rgba(255,255,255,0.55);
    border: 1.5px solid rgba(255,255,255,0.13);
    border-radius: var(--radius-sm);
    padding: 0 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s var(--ease);
    height: 44px;
}

.tera-btn-limpiar:hover {
    color: var(--white);
    border-color: rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.07);
}

/* ============================================================
   HEADER DE RESULTADOS — con fondo para legibilidad
   ============================================================ */
.tera-resultados-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 18px;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    flex-wrap: wrap;
    gap: 10px;
}

.tera-total {
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
}

.tera-total strong {
    color: var(--navy);
    font-weight: 700;
}

.tera-orden-select {
    background: var(--off-white);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 34px 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%233d4f7c' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: all 0.2s var(--ease);
}

.tera-orden-select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0,20,73,0.1);
}

/* ============================================================
   GRID
   ============================================================ */
.tera-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

/* ============================================================
   TARJETA
   ============================================================ */
.tera-tarjeta {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-light);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
    position: relative;
}

.tera-tarjeta:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-mid);
}

.tera-tarjeta-dest {
    border-color: var(--gold);
    box-shadow: 0 4px 20px rgba(201,168,76,0.18);
}

.tera-tarjeta-dest:hover {
    box-shadow: 0 16px 48px rgba(201,168,76,0.32);
    border-color: var(--gold-light);
}

.tera-tarjeta-link { text-decoration: none; color: inherit; display: block; }

/* Imagen */
.tera-img {
    position: relative;
    width: 100%;
    height: 215px;
    overflow: hidden;
    background: var(--navy-100);
}

.tera-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
    display: block;
}

.tera-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,10,40,0.52), transparent);
    pointer-events: none;
    z-index: 1;
}

.tera-tarjeta:hover .tera-img img { transform: scale(1.06); }

.tera-sin-foto {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 10px;
    color: var(--text-light);
    background: linear-gradient(135deg, var(--navy-50), var(--navy-100));
}

.tera-sin-foto svg   { width: 44px; height: 44px; fill: var(--text-light); }
.tera-sin-foto span  { font-size: 12px; font-weight: 500; }

/* Badges */
.tera-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    z-index: 3;
}

.tera-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(6px);
}

.tera-badge-venta    { background: rgba(0,20,73,0.82);   color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.tera-badge-alquiler { background: rgba(10,80,200,0.82);  color: #fff; border: 1px solid rgba(255,255,255,0.15); }
.tera-badge-dest     { background: linear-gradient(135deg, var(--gold-light), var(--gold)); color: var(--navy-900); }

.tera-tipo-tag {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.48);
    color: rgba(255,255,255,0.92);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    z-index: 3;
}

/* Body */
.tera-body { padding: 18px 20px 20px; }

.tera-titulo {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 7px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.tera-tarjeta:hover .tera-titulo { color: var(--navy); }

.tera-ubic {
    font-size: 12.5px;
    color: var(--text-muted);
    margin: 0 0 12px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    line-height: 1.4;
}

.tera-ubic svg { width: 13px; height: 13px; fill: var(--text-muted); flex-shrink: 0; margin-top: 1px; }

.tera-caracts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.tera-caract {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tera-caract svg { width: 14px; height: 14px; fill: var(--text-light); }

.tera-precio-wrap { display: flex; align-items: baseline; gap: 8px; }

.tera-precio-venta {
    font-size: 19px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
}

.tera-precio-alquiler {
    font-size: 13px;
    font-weight: 600;
    color: #0a50c8;
    background: rgba(10,80,200,0.08);
    padding: 3px 9px;
    border-radius: 4px;
}

.tera-precio-consultar {
    font-size: 13px;
    color: var(--text-muted);
    font-style: italic;
}

/* ============================================================
   LOADING
   ============================================================ */
.tera-loading {
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 80px 20px;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.tera-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: tera-spin 0.75s linear infinite;
}

@keyframes tera-spin { to { transform: rotate(360deg); } }

/* ============================================================
   SIN RESULTADOS
   ============================================================ */
.tera-no-resultados {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 20px;
}

.tera-no-resultados-icon { font-size: 52px; margin-bottom: 16px; }

.tera-no-resultados p {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 8px;
    font-weight: 500;
}

.tera-no-resultados-sub {
    font-size: 13px !important;
    color: var(--text-muted) !important;
    font-weight: 400 !important;
}

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.tera-paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 0 48px;
}

.tera-pag-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
    box-shadow: var(--shadow-xs);
}

.tera-pag-btn:hover:not(:disabled):not(.activa) {
    border-color: var(--navy);
    color: var(--navy);
    background: var(--navy-50);
    transform: translateY(-1px);
}

.tera-pag-btn.activa {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0,20,73,0.3);
}

.tera-pag-btn:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
.tera-pag-dots         { color: var(--text-light); font-size: 16px; padding: 0 4px; }

/* ============================================================
   CARRUSEL DE DESTACADAS
   ============================================================ */
.tera-carrusel-wrap {
    position: relative;
    width: 100%;
    padding: 12px 32px 24px;
    box-sizing: border-box;
}

.tera-carrusel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.tera-carrusel-inner {
    position: relative;
    display: flex;
    align-items: center;
}

.tera-car-viewport {
    flex: 1;
    overflow: hidden;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    padding: 8px 4px 12px;
    margin: -8px -4px -12px;
}

.tera-car-viewport:active { cursor: grabbing; }

.tera-car-track {
    display: flex;
    gap: 20px;
    will-change: transform;
    transition: transform 0.5s var(--ease);
}

/* Tarjeta del carrusel */
.tera-car-card {
    flex: 0 0 calc(25% - 15px);
    min-width: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--gold);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.tera-car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(201,168,76,0.3);
}

.tera-car-card-link { text-decoration: none; color: inherit; display: block; }

.tera-car-img {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: var(--navy-100);
}

.tera-car-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
    display: block;
    pointer-events: none;
}

.tera-car-card:hover .tera-car-img img { transform: scale(1.06); }

.tera-car-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,10,60,0.9) 0%, rgba(0,10,60,0.25) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px 16px;
    opacity: 0;
    transition: opacity 0.3s var(--ease);
    z-index: 3;
}

.tera-car-card:hover .tera-car-overlay { opacity: 1; }

.tera-car-titulo-overlay {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tera-car-ubic-overlay {
    color: rgba(255,255,255,0.78);
    font-size: 11.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 3px;
}

.tera-car-ubic-overlay svg { width: 11px; height: 11px; fill: rgba(255,255,255,0.7); flex-shrink: 0; }

.tera-car-body    { padding: 14px 16px 16px; }

.tera-car-titulo {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.tera-car-card:hover .tera-car-titulo { color: var(--navy); }

.tera-car-ubic {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.tera-car-ubic svg { width: 12px; height: 12px; fill: var(--text-muted); flex-shrink: 0; }

/* Flechas */
.tera-car-btn {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white);
    border: 1.5px solid var(--border-light);
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--spring);
    box-shadow: var(--shadow-md);
    z-index: 10;
    flex-shrink: 0;
}

.tera-car-prev { left: -22px;  transform: translateY(-50%); }
.tera-car-next { right: -22px; transform: translateY(-50%); }

.tera-car-btn svg { width: 22px; height: 22px; fill: var(--navy); transition: fill 0.2s; }

.tera-car-btn:hover {
    background: var(--navy);
    border-color: var(--navy);
    box-shadow: 0 6px 20px rgba(0,20,73,0.28);
}

.tera-car-btn:hover svg { fill: #fff; }
.tera-car-prev:hover    { transform: translateY(-50%) scale(1.1); }
.tera-car-next:hover    { transform: translateY(-50%) scale(1.1); }
.tera-car-prev:active   { transform: translateY(-50%) scale(0.95); }
.tera-car-next:active   { transform: translateY(-50%) scale(0.95); }

.tera-car-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    box-shadow: none;
}

.tera-car-btn:disabled:hover {
    background: var(--white);
    border-color: var(--border-light);
    transform: translateY(-50%);
}

.tera-car-btn:disabled svg { fill: var(--navy); }

/* Dots */
.tera-car-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tera-car-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-mid);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.25s var(--spring);
}

.tera-car-dot:hover    { background: rgba(0,20,73,0.35); transform: scale(1.2); }
.tera-car-dot.activo   { background: var(--navy); width: 24px; border-radius: 4px; transform: none; }

/* ============================================================
   RESPONSIVE CARRUSEL
   ============================================================ */
@media (min-width: 1200px) { .tera-car-card { flex: 0 0 calc(25% - 15px); } }

@media (min-width: 900px) and (max-width: 1199px) {
    .tera-car-card { flex: 0 0 calc(33.333% - 14px); }
}

@media (min-width: 600px) and (max-width: 899px) {
    .tera-car-card { flex: 0 0 calc(50% - 10px); }
    .tera-car-img  { height: 195px; }
}

@media (max-width: 599px) {
    .tera-car-card  { flex: 0 0 100%; }
    .tera-car-img   { height: 210px; }
    .tera-car-btn   { width: 36px; height: 36px; }
    .tera-car-btn svg { width: 18px; height: 18px; }
    .tera-car-prev  { left: -16px; }
    .tera-car-next  { right: -16px; }
    .tera-carrusel-wrap { padding: 0 4px 20px; }
}

/* ============================================================
   RESPONSIVE GENERAL
   ============================================================ */
@media (max-width: 1024px) {
    .tera-grupo-precio { flex: 2; min-width: 260px; }
    .tera-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
}

@media (max-width: 768px) {
    .tera-buscador-form { padding: 24px 18px 20px; border-radius: var(--radius-md); }
    .tera-form-fila     { flex-direction: column; gap: 10px; }
    .tera-form-grupo,
    .tera-grupo-precio,
    .tera-grupo-pais    { min-width: 100%; flex: none; width: 100%; }
    .tera-grupo-btns    { flex-direction: row; width: 100%; }
    .tera-btn-buscar    { flex: 1; justify-content: center; }
    .tera-precio-row    { flex-wrap: wrap; }
    .tera-precio-row .tera-select { min-width: 100%; order: 3; }
    .tera-sep           { display: none; }
    .tera-precio-row .tera-input { flex: 1; }
    .tera-grid          { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
    .tera-resultados-header { flex-direction: column; align-items: flex-start; }

    /* En móvil el dropdown abre hacia abajo si hay espacio */
    .tera-dropdown-multi-panel { bottom: auto; top: calc(100% + 6px); }
}

@media (max-width: 480px) {
    .tera-wrap  { padding: 0 14px; }
    .tera-grid  { grid-template-columns: 1fr; }
    .tera-img   { height: 195px; }
    .tera-paginacion { gap: 4px; }
    .tera-pag-btn    { min-width: 36px; height: 36px; font-size: 12.5px; }
}

/* ===== FIX: texto selects siempre visible ===== */
.tera-select {
    color: #ffffff !important;
}
.tera-select option {
    background-color: #001040 !important;
    color: #ffffff !important;
}
.tera-select:focus,
.tera-select:active {
    color: #ffffff !important;
}

/* ===== FIX: barra resultados con fondo sólido ===== */
.tera-resultados-header {
    background: #ffffff !important;
}
.tera-total,
.tera-total strong {
    color: #001449 !important;
}

/* ===== FIX: dropdown dormitorios z-index alto ===== */
.tera-dropdown-multi {
    z-index: 9999 !important;
}
.tera-dropdown-multi-panel {
    z-index: 99999 !important;
}
.tera-dropdown-multi-panel.open {
    display: block !important;
}

/* ===== FIX: input text color ===== */
.tera-input {
    color: #ffffff !important;
}
.tera-input::placeholder {
    color: rgba(255,255,255,.30) !important;
}

/* ===== FIX: dm-texto siempre blanco ===== */
.tera-dm-texto {
    color: #ffffff !important;
}
