.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover { background: var(--color-secondary); color: var(--color-on-secondary); }
.btn-accent { background: var(--color-accent); color: var(--color-on-accent); }
.btn-outline { background: transparent; border-color: var(--color-text); color: var(--color-text); }
.btn-outline:hover { background: var(--color-primary); color: var(--color-on-primary); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-danger { background: var(--color-error); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.card {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
}
.badge-accent { background: var(--color-accent); color: var(--color-on-accent); border-color: transparent; }
.badge-success { background: #dcfce7; color: var(--color-success); border-color: transparent; }
.badge-error { background: #fee2e2; color: var(--color-error); border-color: transparent; }

.alert {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius);
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
    font-size: 0.95rem;
}
.alert-success { background: #ecfdf5; color: var(--color-success); border-color: #a7f3d0; }
.alert-error { background: #fef2f2; color: var(--color-error); border-color: #fecaca; }

.breadcrumbs { display: flex; gap: var(--space-2); font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.breadcrumbs a:hover { color: var(--color-accent); }

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 60vh;
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
}
.hero video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero__slideshow { position: absolute; inset: 0; z-index: 0; }
.hero__slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.hero__slide.is-active { opacity: 1; }
.hero__overlay { position: absolute; inset: 0; background: #000; z-index: 1; }
.hero__content { position: relative; z-index: 2; margin-inline: auto; max-width: 760px; padding: var(--space-5); }
.hero h1 { color: #fff; }
.hero p { color: rgba(255,255,255,0.9); margin-top: var(--space-3); font-size: 1.1rem; }
.hero .btn { margin-top: var(--space-4); }

.property-card { display: flex; flex-direction: column; height: 100%; }
.property-card__image { aspect-ratio: 4/3; overflow: hidden; position: relative; background: var(--color-surface); }
.property-card__image img { width: 100%; height: 100%; object-fit: cover; }
.property-card__badges { position: absolute; top: var(--space-2); left: var(--space-2); display: flex; gap: var(--space-1); }
.property-card__favorite { position: absolute; top: var(--space-2); right: var(--space-2); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.9); border-radius: 50%; text-decoration: none; font-size: 1rem; line-height: 1; }
.property-card__favorite button { all: unset; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.property-card__body { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.property-card__price { font-size: 1.15rem; font-weight: 700; color: var(--color-text); }
.property-card__title { font-size: 1rem; font-weight: 600; }
.property-card__meta { display: flex; gap: var(--space-3); font-size: 0.85rem; color: var(--color-text-muted); flex-wrap: wrap; }

.pagination { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-5); }
.pagination a, .pagination span { padding: 0.5rem 0.85rem; border-radius: var(--radius-sm); border: 1px solid var(--color-border); }
.pagination .active { background: var(--color-primary); color: var(--color-on-primary); border-color: var(--color-primary); }

.empty-state { text-align: center; padding: var(--space-7) var(--space-4); color: var(--color-text-muted); }

/* Tarjeta discreta, deliberadamente distinta del CTA (que es oscuro/dorado y a todo lo ancho) -
   un aviso de cookies no debe competir visualmente con una llamada a la accion de negocio. */
.cookie-banner {
    position: fixed;
    left: var(--space-4);
    bottom: var(--space-4);
    z-index: 500;
    max-width: 380px;
    background: var(--color-background);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    box-shadow: var(--shadow-lg);
}
.cookie-banner p { color: var(--color-text-muted); font-size: 0.85rem; margin: 0; line-height: 1.5; }
.cookie-banner a.link { color: var(--color-text); text-decoration: underline; }
.cookie-banner .btn { align-self: flex-start; }
.cookie-banner[hidden] { display: none; }

@media (max-width: 480px) {
    .cookie-banner { left: var(--space-3); right: var(--space-3); bottom: var(--space-3); max-width: none; }
}

.loading-spinner { width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.6s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }