/* ============================================================
   Parque Chacabuco — casero · claro · actual
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
    /* Paleta tierra (más luminosa) */
    --color-cream:       #F6F3EE;
    --color-cream-dark:  #EBE6DE;
    --color-paper:       #FFFFFF;
    --color-ink:         #2C2622;
    --color-ink-muted:   #5C534C;
    --color-terracotta:  #B85C38;
    --color-terracotta-d:#9A4A2C;
    --color-olive:       #5C6B4F;
    --color-olive-light: #E8EDE3;
    --color-honey:       #C9A227;
    --color-honey-soft:  #F5EDD4;
    --color-border:      #DDD4C6;
    --color-shadow:      rgba(44, 38, 34, 0.06);
    --color-shadow-hover:rgba(44, 38, 34, 0.12);

    --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body:    'Source Sans 3', system-ui, sans-serif;

    --radius-sm:  0.5rem;
    --radius-md:  0.75rem;
    --radius-lg:  1rem;
    --radius-xl:  1.25rem;

    /* Bootstrap overrides */
    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--color-ink);
    --bs-body-bg: var(--color-cream);
    --bs-primary: var(--color-terracotta);
    --bs-primary-rgb: 184, 92, 56;
    --bs-success: var(--color-olive);
    --bs-success-rgb: 92, 107, 79;
    --bs-secondary: var(--color-ink-muted);
    --bs-secondary-rgb: 107, 94, 84;
    --bs-border-color: var(--color-border);
    --bs-border-radius: var(--radius-md);
    --bs-link-color: var(--color-terracotta);
    --bs-link-hover-color: var(--color-terracotta-d);
}

/* Fondo con textura sutil */
body.site-body {
    font-family: var(--font-body);
    color: var(--color-ink);
    background-color: var(--color-cream);
    background-image:
        radial-gradient(ellipse 90% 60% at 100% -10%, rgba(184, 92, 56, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 0% 100%, rgba(92, 107, 79, 0.06) 0%, transparent 50%);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-font {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--color-ink);
    letter-spacing: -0.02em;
}

/* ---- Navbar ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 3px var(--color-shadow);
}

.navbar-site {
    background: transparent !important;
    padding: 0.5rem 0;
}

.site-nav-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
}

/* Marca compacta: nunca invade el menú */
.site-brand {
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(100%, 11rem);
    margin-right: 0;
    padding: 0;
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-ink) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}

@media (min-width: 1200px) {
    .site-brand {
        max-width: 14rem;
    }
}

.site-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.site-brand-name {
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-brand-zone {
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--color-ink-muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-site .brand-icon {
    width: 2rem;
    height: 2rem;
    background: var(--color-terracotta);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.site-nav-collapse {
    flex: 1 1 100%;
    min-width: 0;
}

@media (min-width: 992px) {
    .navbar-expand-lg .site-nav-collapse {
        flex: 1 1 0;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-end;
        gap: 0.35rem;
        min-width: 0;
    }

    .site-nav-links {
        flex-direction: row;
        flex-wrap: nowrap;
        flex: 0 1 auto;
        min-width: 0;
        margin-right: 0.5rem;
    }

    .site-nav-actions {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        flex: 0 0 auto;
    }
}

.navbar-site .nav-link strong {
    font-weight: 700;
    color: var(--color-ink);
}

.navbar-site .nav-link {
    color: var(--color-ink-muted) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.45rem 0.65rem !important;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.navbar-site .nav-link:hover,
.navbar-site .nav-link:focus {
    color: var(--color-terracotta) !important;
    background: var(--color-honey-soft);
}

.site-nav-user-name {
    display: inline-block;
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.navbar-site .navbar-toggler {
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.55rem;
    margin-left: auto;
    background-color: var(--color-paper);
}

.navbar-site .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(184, 92, 56, 0.2);
}

@media (min-width: 992px) {
    .navbar-site .navbar-toggler {
        display: none;
    }
}

/* Icono hamburguesa oscuro (visible sobre fondo claro) */
.navbar-site .navbar-toggler-icon {
    width: 1.35em;
    height: 1.35em;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232C2622' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.25' d='M4 8h22M4 15h22M4 22h22'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
}

.btn-nav-cta {
    background: var(--color-terracotta) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    border-radius: var(--radius-md) !important;
    padding: 0.45rem 1.1rem !important;
    box-shadow: 0 2px 8px rgba(184, 92, 56, 0.28);
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-nav-cta:hover {
    background: var(--color-terracotta-d) !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(184, 92, 56, 0.32);
}

.dropdown-menu {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px var(--color-shadow);
    padding: 0.35rem;
}

.dropdown-item {
    border-radius: var(--radius-sm);
}

.dropdown-item:hover {
    background: var(--color-honey-soft);
    color: var(--color-ink);
}

/* ---- Main ---- */
main.site-main {
    padding-top: 1.75rem;
    padding-bottom: 2.5rem;
}

/* ---- Hero ---- */
.hero-home {
    position: relative;
    background: linear-gradient(128deg, #C46842 0%, var(--color-terracotta) 42%, #6D7A5F 100%);
    border-radius: var(--radius-xl);
    color: #fff;
    padding: clamp(1.75rem, 5vw, 2.75rem) clamp(1.25rem, 4vw, 2.5rem);
    margin-bottom: 1.75rem;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(184, 92, 56, 0.18);
}

.hero-home--custom-bg {
    background: linear-gradient(135deg, rgba(58, 47, 40, 0.72) 0%, rgba(92, 107, 79, 0.65) 100%),
                var(--hero-bg-image) center / cover no-repeat;
}

.hero-home--custom-bg::before {
    opacity: 0.25;
}

.hero-home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.12) 0%, transparent 45%);
    pointer-events: none;
}

.hero-home .hero-inner {
    position: relative;
    z-index: 1;
}

.hero-home h1 {
    color: #fff;
    font-size: clamp(1.65rem, 4.5vw, 2.35rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.hero-home .hero-lead,
.hero-home p {
    opacity: 0.94;
    font-size: clamp(0.95rem, 2.5vw, 1.08rem);
    margin: 0;
    max-width: 36rem;
    line-height: 1.55;
    font-weight: 400;
}

.hero-home .hero-tag {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

/* ---- Filtros ---- */
.btn-filter-toggle {
    width: 100%;
    background: var(--color-paper);
    border: 1px dashed var(--color-border);
    color: var(--color-ink);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-filter-toggle:hover {
    background: var(--color-honey-soft);
    border-color: var(--color-honey);
    color: var(--color-ink);
}

.filter-panel {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.35rem;
    box-shadow: 0 4px 16px var(--color-shadow);
}

.filter-panel .filter-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--color-cream-dark);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-panel .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-ink-muted);
    letter-spacing: 0.01em;
    margin-bottom: 0.3rem;
}

@media (min-width: 992px) {
    #filterCollapse.collapse:not(.show) {
        display: block;
        height: auto !important;
        visibility: visible;
    }
    .btn-filter-toggle {
        display: none !important;
    }
}

/* ---- Cards propiedad ---- */
.property-card {
    background: var(--color-paper);
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
    box-shadow: 0 1px 3px var(--color-shadow), 0 4px 14px rgba(44, 38, 34, 0.04) !important;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px var(--color-shadow-hover) !important;
    border-color: var(--color-honey) !important;
}

.property-card .card-img-wrap {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 4 / 3;
}

.property-card img {
    height: 100%;
    min-height: 180px;
    object-fit: cover;
    width: 100%;
    background: var(--color-cream-dark);
    transition: transform 0.35s ease;
}

.property-card:hover img {
    transform: scale(1.03);
}

.property-card .card-body {
    padding: 1.15rem 1.25rem 1.25rem;
}

.price-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-ink-muted);
    margin-bottom: 0.15rem;
}

.price-block {
    line-height: 1.2;
}

.price-badge {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-terracotta);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.price-per-m2 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-ink-muted);
    margin-top: 0.2rem;
}

.price-expensas {
    font-size: 0.875rem;
    color: var(--color-ink-muted);
    margin-top: 0.35rem;
}

.detail-price-block {
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--color-border);
}

.detail-price-block .price-badge {
    font-size: clamp(1.65rem, 4vw, 2rem);
}

.community-strip {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 12px var(--color-shadow);
}

.community-strip-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.community-strip-title {
    display: block;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: var(--color-ink);
    margin-bottom: 0.15rem;
}

.community-strip-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--color-ink-muted);
    line-height: 1.45;
    max-width: 42rem;
}

.filter-panel .filter-hint {
    line-height: 1.4;
}

.property-card .card-title {
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.35;
}

.property-meta {
    font-size: 0.875rem;
    color: var(--color-ink-muted);
}

.badge-rustic {
    background: var(--color-olive-light) !important;
    color: var(--color-olive) !important;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.75em;
    border-radius: var(--radius-sm);
}

.badge-estado-activa {
    background: var(--color-olive) !important;
    color: #fff !important;
}

.badge-estado-pendiente {
    background: var(--color-honey) !important;
    color: #3D3228 !important;
}

.badge-estado-rechazada {
    background: #9A4A2C !important;
    color: #fff !important;
}

.badge-estado-pausada,
.badge-estado-otro {
    background: var(--color-ink-muted) !important;
    color: #fff !important;
}

.badge-feed-kind {
    position: absolute;
    bottom: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    background: rgba(44, 38, 34, 0.82) !important;
    color: #fff !important;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.badge-barrio {
    background: var(--color-honey-soft) !important;
    color: #7A6520 !important;
    font-weight: 600;
    font-size: 0.72rem;
}

/* ---- Botones ---- */
.btn-primary {
    background: var(--color-terracotta);
    border-color: var(--color-terracotta);
    font-weight: 600;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(184, 92, 56, 0.25);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--color-terracotta-d);
    border-color: var(--color-terracotta-d);
    box-shadow: 0 4px 12px rgba(184, 92, 56, 0.3);
}

.btn-success {
    background: var(--color-olive);
    border-color: #4A5642;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-success:hover {
    background: #4A5642;
    border-color: #3D4638;
}

.btn-outline-secondary {
    border-color: var(--color-border);
    color: var(--color-ink-muted);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.btn-outline-secondary:hover {
    background: var(--color-cream-dark);
    border-color: var(--color-ink-muted);
    color: var(--color-ink);
}

/* ---- Formularios ---- */
.form-control,
.form-select {
    border-color: var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-paper);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-terracotta);
    box-shadow: 0 0 0 0.2rem rgba(184, 92, 56, 0.15);
    background: #fff;
}

.panel-card {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 28px var(--color-shadow);
    overflow: hidden;
}

.panel-card .card-body {
    padding: clamp(1.25rem, 4vw, 2rem);
}

.panel-card .panel-title {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 3vw, 1.6rem);
}

.page-intro {
    color: var(--color-ink-muted);
    font-size: 0.95rem;
}

/* Tipo cuenta toggle */
.btn-check:checked + .btn-outline-primary {
    background: var(--color-terracotta);
    border-color: var(--color-terracotta-d);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--color-border);
    color: var(--color-ink-muted);
}

.btn-outline-primary:hover {
    background: var(--color-honey-soft);
    border-color: var(--color-honey);
    color: var(--color-ink);
}

/* ---- Alerts ---- */
.alert {
    border-radius: var(--radius-md);
    border-width: 1px;
}

.alert-success {
    background: var(--color-olive-light);
    border-color: #B8C9AE;
    color: #3D4A36;
}

.alert-danger {
    background: #FDF0ED;
    border-color: #E8C4B8;
    color: #7A3D2E;
}

.alert-warning {
    background: var(--color-honey-soft);
    border-color: #E5D49A;
    color: #5C4E1A;
}

/* ---- Empty state ---- */
.empty-state {
    background: var(--color-paper);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 6vw, 3.5rem);
    text-align: center;
}

.empty-state-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem;
    opacity: 0.35;
    background-color: var(--color-terracotta);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3L2 12h3v8h6v-5h2v5h6v-8h3L12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 3L2 12h3v8h6v-5h2v5h6v-8h3L12 3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- Galería detalle ---- */
.gallery-main {
    max-height: min(420px, 55vh);
    object-fit: cover;
    width: 100%;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: 0 6px 20px var(--color-shadow);
}

.gallery-thumb {
    height: 72px;
    object-fit: cover;
    cursor: pointer;
    border-radius: var(--radius-sm);
    opacity: 0.8;
    border: 2px solid transparent;
    transition: opacity 0.15s, border-color 0.15s;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
    border-color: var(--color-terracotta);
    outline: none;
}

.detail-sidebar {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 20px var(--color-shadow);
}

.detail-sidebar .price-badge {
    font-size: clamp(1.5rem, 4vw, 1.85rem);
}

.photo-preview {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
}

/* ---- Tabla mis publicaciones ---- */
.table-rustic {
    background: var(--color-paper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.table-rustic thead {
    background: var(--color-cream-dark);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-ink-muted);
}

.table-rustic tbody tr:hover {
    background: var(--color-honey-soft);
}

/* ---- Footer ---- */
.footer-site {
    background: #3A332E;
    color: rgba(255, 255, 255, 0.88);
    padding: 2.5rem 0;
    margin-top: auto;
    border-top: none;
}

.footer-site strong {
    font-family: var(--font-display);
    color: #fff;
    font-size: 1.1rem;
}

.footer-site .footer-tagline {
    opacity: 0.75;
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 28rem;
}

.footer-site .footer-copy {
    opacity: 0.55;
    font-size: 0.85rem;
}

/* ---- Breadcrumb ---- */
.breadcrumb {
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--color-terracotta);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* ---- Lista resultados header ---- */
.results-bar {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.1rem;
    box-shadow: 0 1px 3px var(--color-shadow);
}

.results-count {
    font-weight: 700;
    color: var(--color-ink);
    margin: 0;
    font-size: 0.95rem;
}

/* ---- Responsive tweaks ---- */
@media (max-width: 991.98px) {
    .site-nav-collapse {
        background: var(--color-paper);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        padding: 0.75rem;
        margin-top: 0.25rem;
    }

    .site-nav-links,
    .site-nav-actions {
        width: 100%;
    }

    .site-nav-actions {
        border-top: 1px solid var(--color-border);
        margin-top: 0.5rem;
        padding-top: 0.5rem;
    }

    .site-brand {
        max-width: calc(100% - 3.5rem);
    }
}

@media (max-width: 575.98px) {

    .property-card img {
        height: 200px;
    }

    .detail-sidebar {
        margin-top: 0.5rem;
    }
}

@media (min-width: 992px) {
    .filter-panel.sticky-lg-top {
        top: 1.25rem !important;
    }
}

/* WhatsApp btn custom */
.btn-whatsapp {
    background: #2D6A4F;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
}

.btn-whatsapp:hover {
    background: #245A42;
    color: #fff;
}

/* ---- Facebook comunidad ---- */
.fb-community-card {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: 0 4px 16px var(--color-shadow);
}

.fb-community-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #1877F2;
}

.fb-community-text {
    color: var(--color-ink-muted);
    line-height: 1.5;
}

.fb-embed-wrap {
    min-height: 200px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--color-cream-dark);
}

.fb-embed-wrap .fb-group,
.fb-embed-wrap iframe {
    max-width: 100% !important;
    width: 100% !important;
}

.btn-fb {
    background: #1877F2;
    color: #fff !important;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
}

.btn-fb:hover {
    background: #1464d8;
    color: #fff !important;
}

/* Tom Select + Bootstrap 5 */
.ts-wrapper {
    width: 100%;
}

.ts-wrapper.form-select,
.filter-panel .ts-wrapper,
.form-select + .ts-wrapper {
    min-height: calc(1.5em + 0.5rem + 2px);
}

.form-select-sm + .ts-wrapper .ts-control,
.ts-wrapper.form-select-sm .ts-control {
    min-height: calc(1.5em + 0.25rem + 2px);
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.ts-dropdown {
    z-index: 1056;
}

.ts-control input {
    font-size: inherit;
}

/* Registro: Tom Select alineado con inputs en la misma fila */
#formRegistro .reg-inline-fields .form-label {
    margin-bottom: 0.35rem;
}

#formRegistro .reg-inline-fields .ts-wrapper,
#formRegistro .reg-inline-fields .form-control,
#formRegistro .reg-inline-fields .form-select {
    min-height: calc(1.5em + 0.75rem + 2px);
}

#formRegistro .reg-inline-fields .ts-wrapper {
    width: 100%;
}

#formRegistro .reg-inline-fields .ts-control {
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
}

#formRegistro .reg-inline-fields > [class*="col-"] {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Promocionadas (front) */
.badge-promocionada {
    background: linear-gradient(135deg, #C9A227 0%, #E8B84A 100%) !important;
    color: #3D3228 !important;
    font-weight: 700;
    font-size: 0.68rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.property-card.is-promoted {
    border-color: #E8B84A !important;
    box-shadow: 0 2px 12px rgba(201, 162, 39, 0.18) !important;
}

.property-card.is-promoted .card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(201, 162, 39, 0.12) 0%, transparent 42%);
    pointer-events: none;
}

.promo-ribbon {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    z-index: 2;
}

.pub-banner-zone--hero {
    margin-bottom: 1.5rem;
}

.pub-banner-zone--hero .pub-banner--hero {
    max-width: 1200px;
    margin: 0 auto;
}

.pub-banner-link {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pub-banner-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.pub-banner-link img {
    display: block;
    width: 100%;
    height: auto;
}

.pub-banner-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pub-banner-stack .pub-banner--sidebar img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.pub-banner-strip .pub-banner--sidebar img {
    width: 100%;
    height: auto;
}

.pub-banner-zone--detalle .pub-banner--detalle img {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 0 auto;
}

.pub-banner-rail {
    position: fixed;
    top: 6rem;
    right: max(0.5rem, calc((100vw - 1320px) / 2 - 180px));
    z-index: 40;
    width: 160px;
    pointer-events: auto;
}

.pub-banner-rail .pub-banner--lateral_pc img {
    width: 160px;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
}

.banner-slot-card {
    background: var(--color-cream-dark);
}

@media (max-width: 1199.98px) {
    .pub-banner-rail {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .pub-banner-zone--hero {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
}

/* ---- 404 ---- */
.page-404 {
    max-width: 40rem;
    padding: clamp(2rem, 6vw, 3rem) clamp(1.25rem, 4vw, 2rem);
}

.page-404-code {
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 800;
    color: var(--color-terracotta);
    line-height: 1;
    opacity: 0.85;
}

.page-404-lead {
    color: var(--color-ink-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 34rem;
    margin-left: auto;
    margin-right: auto;
}

.page-404-quote {
    max-width: 32rem;
    padding: 1.25rem 1.5rem;
    margin-top: 0.5rem;
    background: var(--color-cream-dark);
    border-left: 3px solid var(--color-terracotta);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    text-align: left;
}

.page-404-quote-text {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-ink);
    line-height: 1.55;
    font-style: italic;
}

.page-404-quote-author {
    font-family: var(--font-body);
}

.explore-hero--bleed {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: 1.75rem;
}

.explore-hero {
    position: relative;
    min-height: clamp(220px, 38vw, 420px);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(125deg, #1a1512 0%, #3d2f28 35%, #2a3d4a 70%, #1a1512 100%);
    box-shadow: 0 12px 40px rgba(26, 21, 18, 0.25);
}

.explore-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.explore-hero-media--image {
    background-size: cover;
    background-position: center;
}

.explore-hero-fx {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(8, 6, 5, 0.55) 0%, rgba(8, 6, 5, 0.35) 45%, rgba(8, 6, 5, 0.75) 100%),
        radial-gradient(ellipse 80% 60% at 15% 20%, rgba(184, 92, 56, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(72, 140, 180, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.explore-hero-scanlines {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.12;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255, 255, 255, 0.03) 2px,
        rgba(255, 255, 255, 0.03) 4px
    );
    pointer-events: none;
    mix-blend-mode: overlay;
}

.explore-hero-content {
    position: relative;
    z-index: 3;
    padding: clamp(2rem, 6vw, 3.5rem) 1rem clamp(2rem, 5vw, 2.75rem);
    max-width: 42rem;
}

.explore-hero-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    margin-bottom: 0.85rem;
    color: rgba(255, 255, 255, 0.92);
}

.explore-hero-title {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #fff;
    margin: 0 0 0.35rem;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.explore-hero-title-primary {
    display: inline-block;
    position: relative;
    padding-bottom: 0.15rem;
    background: linear-gradient(120deg, #fff 0%, #f5e6c8 45%, #e8b84a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: #fff;
    text-shadow: 0 0 32px rgba(232, 184, 74, 0.45), 0 2px 20px rgba(0, 0, 0, 0.35);
}

.explore-hero-title-primary::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-terracotta), var(--color-honey));
    box-shadow: 0 0 12px rgba(232, 184, 74, 0.65);
}

.explore-hero-rotate-line {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 3.5vw, 1.65rem);
    font-weight: 600;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 0.75rem;
}

.explore-hero-rotate-prefix {
    font-weight: 500;
    opacity: 0.85;
}

.explore-hero-rotate-word {
    display: inline-block;
    min-width: 6ch;
    color: #fff;
    font-weight: 700;
    transition: opacity 0.38s ease, transform 0.38s ease;
}

.explore-hero-rotate-word.is-out {
    opacity: 0;
    transform: translateY(10px);
}

.explore-hero-lead {
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    max-width: 36rem;
}

.explore-filter-form .ts-wrapper {
    display: none !important;
}

.explore-filter-form select.explore-barrio-select {
    display: block !important;
    width: 100%;
}

.explore-mode-nav {
    width: 100%;
}

.explore-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
}

@media (max-width: 767.98px) {
    .explore-mode-tabs {
        grid-template-columns: 1fr;
    }
}

.explore-mode-tab {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    background: var(--color-paper);
    text-decoration: none;
    color: var(--color-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.explore-mode-tab:hover {
    border-color: var(--color-terracotta);
    box-shadow: 0 6px 20px var(--color-shadow);
    transform: translateY(-2px);
    color: var(--color-ink);
}

.explore-mode-tab.is-active {
    border-color: var(--color-terracotta);
    background: linear-gradient(145deg, #fff 0%, var(--color-honey-soft) 100%);
    box-shadow: 0 8px 24px rgba(184, 92, 56, 0.15);
}

.explore-mode-tab-kicker {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-terracotta);
}

.explore-mode-tab-label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.2;
}

.explore-mode-tab-desc {
    font-size: 0.8rem;
    color: var(--color-ink-muted);
}

.explore-submode-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.explore-submode-pill {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-ink-muted);
    background: var(--color-cream-dark);
    border: 1px solid var(--color-border);
}

.explore-submode-pill:hover,
.explore-submode-pill.is-active {
    color: var(--color-ink);
    background: var(--color-paper);
    border-color: var(--color-terracotta);
}

.explore-submode-pill.is-active {
    background: var(--color-terracotta);
    color: #fff;
    border-color: var(--color-terracotta);
}

.navbar-site .nav-link.active {
    color: var(--color-terracotta) !important;
    font-weight: 700;
}
