:root {
    --ctp-blue: #0a2596;
    --ctp-blue-dark: #051a6e;
    --ctp-blue-light: #1e3bc7;
    --ctp-gold: #f1d229;
    --ctp-gold-light: #f5e066;
    --ctp-gold-dark: #c9a91f;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --gray-800: #343a40;
    --gray-900: #212529;
}

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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--gray-100);
    overflow-x: hidden;
}

/* ── Header (igual al home) ── */
.header {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(10, 37, 150, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--ctp-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ctp-gold);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.lang-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid var(--gray-300);
}

.lang-btn {
    background: none;
    border: 2px solid transparent;
    padding: 5px 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-600);
    transition: all 0.3s ease;
    border-radius: 20px;
}

.lang-btn:hover {
    color: var(--ctp-blue);
}

.lang-btn.active {
    background: var(--ctp-blue);
    color: var(--white);
    border-color: var(--ctp-blue);
}

/* ── Page Hero / Banner ── */
.page-hero {
    margin-top: 90px;
    background: linear-gradient(135deg, var(--ctp-blue) 0%, var(--ctp-blue-dark) 100%);
    padding: 60px 30px;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(241, 210, 41, 0.06);
    pointer-events: none;
}

.page-hero-inner {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 13px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--ctp-gold);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumb .current {
    color: var(--ctp-gold);
    font-weight: 600;
}

.page-hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 10px;
}

.page-hero h1 span {
    color: var(--ctp-gold);
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
}

.results-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
}

.results-count strong {
    color: var(--ctp-gold);
}

/* ── Main Layout ── */
.catalog-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px 80px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    align-items: start;
}

/* ── Sidebar Filters ── */
.sidebar {
    position: sticky;
    top: 110px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(10, 37, 150, 0.07);
    margin-bottom: 20px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ctp-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-title button {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 12px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: color 0.2s;
}

.sidebar-title button:hover {
    color: var(--ctp-blue);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-600);
    margin-bottom: 12px;
    display: block;
}

.filter-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color 0.3s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--ctp-blue);
}

.filter-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    color: var(--gray-800);
    transition: border-color 0.3s;
}

.filter-input:focus {
    outline: none;
    border-color: var(--ctp-blue);
}

/* Price range dual inputs */
.price-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.price-range span {
    text-align: center;
    color: var(--gray-600);
    font-size: 12px;
}

/* Checkbox Pills */
.checkbox-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.pill-label:hover {
    border-color: var(--ctp-blue);
    color: var(--ctp-blue);
}

.pill-label input {
    display: none;
}

.pill-label.checked {
    background: var(--ctp-blue);
    border-color: var(--ctp-blue);
    color: var(--white);
}

/* Bedrooms/Bathrooms row */
.number-pills {
    display: flex;
    gap: 8px;
}

.num-pill {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.num-pill:hover {
    border-color: var(--ctp-blue);
    color: var(--ctp-blue);
}

.num-pill input {
    display: none;
}

.num-pill.checked {
    background: var(--ctp-blue);
    border-color: var(--ctp-blue);
    color: var(--white);
}

.btn-filter {
    width: 100%;
    padding: 15px;
    background: var(--ctp-blue);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s;
}

.btn-filter:hover {
    background: var(--ctp-blue-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 37, 150, 0.25);
}

.btn-reset {
    width: 100%;
    padding: 12px;
    background: none;
    color: var(--gray-600);
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    margin-top: 10px;
    transition: all 0.3s;
}

.btn-reset:hover {
    border-color: var(--gray-600);
    color: var(--gray-800);
}

/* Active filters badges */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--ctp-blue);
    color: var(--white);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.filter-badge button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.filter-badge button:hover {
    color: var(--white);
}

/* ── Toolbar (sort + view mode) ── */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 15px;
    flex-wrap: wrap;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    white-space: nowrap;
}

.sort-select {
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
    color: var(--gray-800);
    cursor: pointer;
    transition: border-color 0.3s;
    background: var(--white);
}

.sort-select:focus {
    outline: none;
    border-color: var(--ctp-blue);
}

.view-toggle {
    display: flex;
    gap: 6px;
}

.view-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--ctp-blue);
    border-color: var(--ctp-blue);
    color: var(--white);
}

.view-btn:hover:not(.active) {
    border-color: var(--ctp-blue);
}

/* ── Properties Grid ── */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.properties-grid.list-view {
    grid-template-columns: 1fr;
}

.property-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(10, 37, 150, 0.15);
}

/* List view card */
.properties-grid.list-view .property-card {
    flex-direction: row;
}

.properties-grid.list-view .property-image {
    width: 280px;
    min-width: 280px;
    height: 200px;
}

.properties-grid.list-view .property-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-image {
    height: 220px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f4f8 0%, #d9e2ec 100%);
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #bcccdc;
    opacity: 0.6;
}

/* Badges */
.property-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.badge {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-type {
    background: var(--ctp-gold);
    color: var(--ctp-blue-dark);
}

.badge-status-sale {
    background: var(--ctp-blue);
    color: var(--white);
}

.badge-status-rent {
    background: #198754;
    color: var(--white);
}

.badge-featured {
    background: rgba(241, 210, 41, 0.95);
    color: var(--ctp-blue-dark);
}

/* Favorite button */
.btn-fav {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-fav:hover {
    transform: scale(1.15);
    background: var(--white);
}

.btn-fav.active {
    color: #e74c3c;
}

.property-content {
    padding: 22px;
}

.property-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--ctp-blue);
    margin-bottom: 6px;
}

.property-price span {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
}

.property-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 8px;
    line-height: 1.4;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 16px;
}

.property-features {
    display: flex;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 500;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
}

.page-btn {
    width: 42px;
    height: 42px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    background: var(--white);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.page-btn:hover {
    border-color: var(--ctp-blue);
    color: var(--ctp-blue);
}

.page-btn.active {
    background: var(--ctp-blue);
    border-color: var(--ctp-blue);
    color: var(--white);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 80px 30px;
    background: var(--white);
    border-radius: 20px;
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ctp-blue);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-600);
    font-size: 15px;
    margin-bottom: 25px;
}

/* ── Footer (igual al home) ── */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: 80px 30px 30px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand img {
    height: 70px;
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--ctp-gold);
    color: var(--ctp-blue);
}

.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--ctp-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: var(--gray-600);
    font-size: 14px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .catalog-layout {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .sidebar-card {
        display: none;
    }

    .sidebar-card.mobile-open {
        display: block;
    }

    .mobile-filter-btn {
        display: flex !important;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .page-hero h1 {
        font-size: 28px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
    }

    .properties-grid.list-view .property-card {
        flex-direction: column;
    }

    .properties-grid.list-view .property-image {
        width: 100%;
        min-width: 0;
    }

    .catalog-layout {
        padding: 20px 15px 60px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* Mobile filter toggle (visible only on mobile) */
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--ctp-blue);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    margin-bottom: 20px;
    width: 100%;
    justify-content: center;
}

/* Ajuste para que las amenidades no ocupen demasiado espacio vertical */
.checkbox-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 250px;
    /* Limita la altura */
    overflow-y: auto;
    /* Agrega scroll si hay demasiadas */
    padding-right: 5px;
}

/* Estilo del scrollbar para que se vea limpio */
.checkbox-pills::-webkit-scrollbar {
    width: 4px;
}

.checkbox-pills::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}