/* ==================================================
   BUTTON: BACK
================================================== */
.back-btn {
    background: var(--white);
    border: 1px solid var(--border-light);
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    padding: 10px 20px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
    margin-top: 9%;
}

.back-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* ==================================================
   SECTION HEADINGS
================================================== */
.section-heading {
    margin: 40px 0px 20px;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-dark);
    border-left: 5px solid var(--primary);
    padding-left: 15px;
}

/* ==================================================
   FILTER BAR
================================================== */
.filter-bar {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin: 30px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.filter-select {
    width: 100%;
    padding: 14px;
    background: var(--bg-light);
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 16px;
}

/* ==================================================
   PROPERTY GRID & CARDS
================================================== */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.property-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: auto !important;       /* FIXED */
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.card-image-wrapper {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.type-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent);
    color: var(--white);
    padding: 5px 14px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 100px;
    text-transform: uppercase;
    z-index: 2;
}

.card-body {
    padding: 20px;
    flex-grow: 1;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.card-location {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    position: relative;               /* FIXED */
    z-index: 5;                       /* FIXED */
    border-top: 1px solid var(--border-light);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}

.card-size {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
}

.card-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer !important;       /* FIXED */
    text-decoration: none;
    z-index: 20 !important;           /* FIXED */
    pointer-events: auto !important;  /* FIXED */
}

/* ==================================================
   DETAIL PAGE LAYOUT
================================================== */
/* Layout Padding to account for fixed header */
        .property-details-section {
            padding-top: 125px;
            padding-bottom: 60px;
            background: var(--bg);
        }

        .container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
        
        .back-link { text-decoration: none; color: var(--primary); font-weight: 700; display: inline-flex; align-items: center; gap: 8px; margin-bottom: 25px; transition: 0.3s; }
        .back-link:hover { transform: translateX(-5px); }
        
        .layout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
        
        .gallery-main { width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #ddd; margin-bottom: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
        .gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s ease; }
        
        .thumbs { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
        .thumb { flex: 0 0 80px; height: 80px; border-radius: 8px; cursor: pointer; overflow: hidden; border: 2px solid transparent; transition: 0.3s; }
        .thumb.active { border-color: var(--primary); opacity: 1; }
        .thumb:not(.active) { opacity: 0.7; }
        .thumb img { width: 100%; height: 100%; object-fit: cover; }
        
        .card { background: #fff; padding: 30px; border-radius: 15px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 1px solid #eee; margin-bottom: 20px; }
        
        .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin: 25px 0; padding: 25px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; }
        .stat-item { text-align: center; }
        .stat-label { font-size: 11px; color: #888; text-transform: uppercase; display: block; margin-bottom: 5px; letter-spacing: 0.5px; }
        .stat-value { font-weight: 700; font-size: 16px; color: var(--dark); }

        .amenity-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 15px; }
        .amenity { background: #f9fbf9; padding: 12px 15px; border-radius: 8px; font-size: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid #edf2ed; }
        .amenity i { color: var(--primary); width: 20px; text-align: center; }

        .blueprint-preview { margin-top: 24px; padding: 16px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; box-shadow: 0 10px 30px rgba(0,0,0,0.04); }
        .blueprint-preview img { width: 100%; border-radius: 10px; display: block; }

        .inquiry-form input, .inquiry-form textarea { width: 100%; padding: 14px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; font-size: 14px; }
        .inquiry-form input:focus, .inquiry-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1); }
        
        .btn-send { width: 100%; padding: 16px; background: var(--primary); color: white; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; transition: all 0.3s; font-size: 16px; }
        .btn-send:hover { background: #1b5e20; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3); }

        .sticky-col { position: sticky; top: 100px; }

        @media (max-width: 991px) {
            .layout-grid { grid-template-columns: 1fr; }
            .sticky-col { position: static; }
        }
        .property-details-section{
            padding-top: 80px;
        }

/* ==================================================
   ANIMATIONS
================================================== */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================================================
   RESPONSIVE
================================================== */
.properties-margin {
    margin-top: 10% !important;
}

@media (max-width: 1024px) {
    .detail-header-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .properties-margin {
        margin-top: 14% !important;
    }
    .property-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .section-heading {
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    .filter-bar {
        grid-template-columns: 1fr;
        padding: 10px;
    }
    .content-box {
        padding: 20px;
    }
    .detail-title {
        font-size: 24px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .amenity-grid {
        grid-template-columns: 1fr;
    }
    .back-btn {
        margin-top: 14vh;
    }
    .properties-margin {
        margin-top: 14vh !important;
    }
}
