@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary: #D4A853;
    --primary-dark: #B8923F;
    --dark: #1A1A2E;
    --gray-900: #2D2D44;
    --gray-700: #4A4A68;
    --gray-500: #7A7A9A;
    --gray-300: #C4C4D4;
    --gray-100: #F5F5FA;
    --white: #FFFFFF;
    --shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
    --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.nav a {
    color: var(--gray-700);
    text-decoration: none;
    margin-left: 32px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: var(--primary);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--gray-700);
}

/* Filter Bar */
.filter-bar {
    background: var(--white);
    padding: 24px;
    border-radius: 16px;
    margin: 32px 0;
    box-shadow: var(--shadow);
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select,
.filter-bar input {
    padding: 12px 20px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: var(--white);
    min-width: 160px;
}

.filter-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
}

.btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.results-count {
    color: var(--gray-500);
    font-size: 15px;
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
    margin-bottom: 48px;
}

.property-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.property-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}

.property-card:hover .property-image img {
    transform: scale(1.08);
}

.property-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-subsale {
    background: var(--primary);
    color: var(--white);
}

.badge-project {
    background: var(--dark);
    color: var(--white);
}

.property-content {
    padding: 24px;
}

.property-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.property-location {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.property-meta {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-700);
    font-size: 14px;
}

.meta-item svg {
    width: 18px;
    height: 18px;
    color: var(--gray-500);
}

.property-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.view-details {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s;
}

.view-details:hover {
    gap: 10px;
}

/* Property Details Page */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    text-decoration: none;
    margin: 24px 0;
    font-weight: 500;
}

.back-link:hover {
    color: var(--primary);
}

.property-detail {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 48px;
}

.gallery {
    position: relative;
}

.gallery-main {
    height: 500px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--gray-100);
    overflow-x: auto;
}

.gallery-thumb {
    width: 100px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s;
    flex-shrink: 0;
}

.gallery-thumb.active,
.gallery-thumb:hover {
    opacity: 1;
    box-shadow: 0 0 0 3px var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-content {
    padding: 40px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.detail-title {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.detail-location {
    color: var(--gray-500);
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.detail-meta {
    display: flex;
    gap: 32px;
    padding: 24px;
    background: var(--gray-100);
    border-radius: 12px;
    margin-bottom: 32px;
}

.detail-meta .meta-item {
    font-size: 16px;
}

.detail-meta .meta-item span {
    display: block;
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.detail-section {
    margin-bottom: 32px;
}

.detail-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-100);
}

.detail-section p {
    color: var(--gray-700);
    line-height: 1.8;
}

.facilities-list,
.nearby-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.facility-tag,
.nearby-tag {
    padding: 10px 18px;
    background: var(--gray-100);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-700);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 40px;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background 0.3s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 14px;
    opacity: 0.7;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-300);
    padding: 48px 0;
    text-align: center;
}

.footer-text {
    font-size: 14px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--gray-500);
}

.no-results svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
    }

    .nav {
        display: none;
        width: 100%;
        padding-top: 16px;
        border-top: 1px solid var(--gray-100);
        margin-top: 16px;
    }

    .nav.open {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .nav a {
        margin-left: 0;
        padding: 10px 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav a:last-child {
        border-bottom: none;
    }

    .property-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }
    
    .detail-meta {
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .gallery-main {
        height: 300px;
    }
    
    .detail-content {
        padding: 24px;
    }
    
    .detail-title {
        font-size: 28px;
    }
    
    .detail-price {
        font-size: 28px;
    }

    .lightbox-content {
        padding: 60px 16px;
    }

    .lightbox-nav {
        width: 36px;
        height: 36px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }
}
