/* ============================================
   Properties Page Styles
   ============================================ */

/* Hero Section */
.properties-hero {
    position: relative;
    padding: 10rem 0 6rem;
    margin-top: 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.properties-hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    background: #1a1a2e; /* Placeholder background */
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.hero-img.loaded {
    opacity: 1;
}

/* Reuse shimmer animation for hero images if not loaded */
.hero-slide:not(:has(.hero-img.loaded)) {
    background: linear-gradient(90deg, #1a1a2e 25%, #2d2d44 50%, #1a1a2e 75%);
    background-size: 200% 100%;
    animation: shimmer-dark 1.5s infinite;
}

@keyframes shimmer-dark {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.hero-slide.active {
    opacity: 1;
}

.properties-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(65, 65, 66, 0.9) 0%, rgba(210, 174, 52, 0.7) 100%);
    z-index: 2;
}

.properties-hero .container {
    position: relative;
    z-index: 2;
}

.properties-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    text-align: center;
}

.properties-hero .hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    margin-bottom: 3rem;
}

/* Quick Search */
.quick-search {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    background: var(--white);
    padding: 0.75rem;
    border-radius: 50px;
    box-shadow: var(--shadow-xl);
}

.search-input {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-family: var(--font);
    outline: none;
}

.search-btn {
    padding: 0.875rem 2rem;
    border-radius: 50px;
    white-space: nowrap;
}

/* Properties Section */
.properties-section {
    padding: 4rem 0 6rem;
    background: var(--gray);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.properties-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 3rem;
}

/* Filters Sidebar */
.filters-sidebar {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-dark);
}

.filters-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.btn-reset {
    background: none;
    border: none;
    color: var(--gold);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.btn-reset:hover {
    color: var(--gold-dark);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--dark-light);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-dark);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--dark);
    transition: all var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--gold);
}

.btn-apply-filters {
    width: 100%;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Properties Main */
.properties-main {
    min-height: 500px;
}

.properties-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Image Skeleton Loader */
.property-img {
    opacity: 0;
    transition: opacity 0.3s ease-in;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.property-img.loaded {
    opacity: 1;
    animation: none;
    background: none;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.property-image {
    position: relative;
    background: #f0f0f0;
}

.results-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.results-info span {
    color: var(--gold);
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-options label {
    font-weight: 600;
    color: var(--dark-light);
    font-size: 0.95rem;
}

.sort-select {
    padding: 0.625rem 1rem;
    border: 2px solid var(--gray-dark);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--dark);
    cursor: pointer;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.property-card-link {
    cursor: pointer;
}

.property-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--gray-dark);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.property-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.property-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-gold);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 2;
}

.badge-rent {
    background: var(--gradient-dark);
}

.badge-offplan {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.property-content {
    padding: 1.5rem;
}

.property-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.75rem;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-light);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.property-location svg {
    color: var(--gold);
    flex-shrink: 0;
}

.property-features {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.property-features span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--dark-light);
}

.property-features svg {
    color: var(--gold);
    width: 16px;
    height: 16px;
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-dark);
}

.property-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gold);
}

.property-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}

.property-card:hover .property-link {
    color: var(--gold);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.page-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--gray-dark);
    background: var(--white);
    color: var(--dark);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-block;
}

.page-btn:hover:not(:disabled) {
    border-color: var(--gold);
    background: var(--gold);
    color: var(--white);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--gold);
    color: var(--white);
    border-color: var(--gold);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1.5rem;
    transition: all var(--transition);
}

.mobile-filter-toggle:hover {
    background: var(--gold-dark);
}

.mobile-filter-toggle svg {
    stroke: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .properties-layout {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .mobile-filter-toggle {
        display: flex;
    }
    
    .filters-sidebar {
        display: none;
        margin-bottom: 2rem;
    }
    
    .filters-sidebar.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .properties-hero {
        padding: 8rem 0 4rem;
    }
    
    .properties-hero .hero-title {
        font-size: 2.5rem;
    }
    
    .quick-search {
        flex-direction: column;
        border-radius: 16px;
    }
    
    .search-btn {
        width: 100%;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .properties-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
