/* properties.css - Lala Builders and Decor 
   Only properties page specific styles - No conflicts with main styles.css */

/* ============================================
   PAGE HERO SECTION (Properties Page Only)
   ============================================ */

.page-hero {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    padding: 140px 0 70px;
    text-align: center;
    margin-top: 0;
    width: 100%;
    overflow-x: hidden;
}

.page-hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.8);
}

/* ============================================
   FILTER BAR (Properties Page Only)
   ============================================ */

.filter-bar {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    width: 100%;
}

.search-input,
.filter-select {
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 40px;
    font-size: 0.95rem;
    min-width: 220px;
    max-width: 100%;
    transition: all 0.3s;
    font-family: var(--font-primary);
    background: var(--white);
    box-sizing: border-box;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,169,81,0.1);
}

/* ============================================
   PROPERTY SPECS (Properties Page Only)
   ============================================ */

.property-specs {
    display: flex;
    gap: 15px;
    margin: 12px 0;
    color: var(--gray);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.property-specs span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ============================================
   PROPERTY DESCRIPTION (Properties Page Only)
   ============================================ */

.property-description {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 10px 0;
}

/* ============================================
   INQUIRE BUTTON (Properties Page Only)
   ============================================ */

.inquire-btn {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--black);
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.inquire-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(200,169,81,0.3);
}

/* ============================================
   PROPERTY GRID - FIXED OVERFLOW
   ============================================ */

.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    width: 100%;
    overflow-x: hidden;
}

/* Property Card - Prevent overflow */
.property-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Property Image Container */
.property-img {
    position: relative;
    height: 250px;
    overflow: hidden;
    width: 100%;
}

.property-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.property-card:hover .property-img img {
    transform: scale(1.05);
}

/* Property Tag */
.property-tag {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--gold);
    color: var(--black);
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

/* Gallery Icon */
.property-gallery-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}

/* Property Details */
.property-details {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 5px;
}

.property-details h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.property-location {
    color: var(--gray);
    margin: 8px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Map Button */
.map-icon-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.map-icon-btn:hover {
    background: var(--gold);
    color: var(--black);
    transform: translateY(-2px);
}

/* ============================================
   NO RESULTS MESSAGE (Properties Page Only)
   ============================================ */

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 20px;
    display: block;
}

/* ============================================
   LIGHTBOX STYLES - ADDED
   ============================================ */

#property-lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

#property-lightbox-modal.active {
    display: flex;
}

#property-lightbox-modal .lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: 100%;
    height: auto;
}

#property-lightbox-modal .lightbox-content {
    position: relative;
    text-align: center;
}

#property-lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

#property-lightbox-modal .lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 15px;
}

#property-lightbox-modal .lightbox-caption h3 {
    color: var(--gold);
    margin-bottom: 5px;
}

#property-lightbox-modal .lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.3s ease;
}

#property-lightbox-modal .lightbox-close:hover {
    color: var(--gold);
}

#property-lightbox-modal .lightbox-prev,
#property-lightbox-modal .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

#property-lightbox-modal .lightbox-prev {
    left: -60px;
}

#property-lightbox-modal .lightbox-next {
    right: -60px;
}

#property-lightbox-modal .lightbox-prev:hover,
#property-lightbox-modal .lightbox-next:hover {
    background: var(--gold);
    color: var(--black);
}

#property-lightbox-modal .lightbox-thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#property-lightbox-modal .lightbox-thumbnail {
    width: 80px;
    height: 60px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

#property-lightbox-modal .lightbox-thumbnail:hover,
#property-lightbox-modal .lightbox-thumbnail.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--gold);
}

#property-lightbox-modal .lightbox-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ============================================
   RESPONSIVE STYLES (Properties Page Only)
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .property-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-hero {
        padding: 110px 0 50px;
    }
    
    .page-hero h1 {
        font-size: 2rem;
    }
    
    .page-hero p {
        font-size: 1rem;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin-bottom: 40px;
    }
    
    .search-input,
    .filter-select {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .property-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .property-specs {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .property-img {
        height: 220px;
    }
    
    /* Lightbox mobile adjustments */
    #property-lightbox-modal .lightbox-prev {
        left: 10px;
    }
    
    #property-lightbox-modal .lightbox-next {
        right: 10px;
    }
    
    #property-lightbox-modal .lightbox-prev,
    #property-lightbox-modal .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    #property-lightbox-modal .lightbox-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    #property-lightbox-image {
        max-height: 60vh;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .page-hero {
        padding: 100px 0 40px;
    }
    
    .page-hero h1 {
        font-size: 1.6rem;
    }
    
    .page-hero p {
        font-size: 0.9rem;
    }
    
    .property-img {
        height: 200px;
    }
    
    .property-price {
        font-size: 1.3rem;
    }
    
    .property-details h3 {
        font-size: 1rem;
    }
    
    .property-specs {
        gap: 8px;
        font-size: 0.75rem;
    }
    
    .property-description {
        font-size: 0.75rem;
    }
    
    .inquire-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .map-icon-btn {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
}

/* Ensure footer doesn't overflow */
.footer {
    width: 100%;
    overflow-x: hidden;
    margin-top: 0;
}

.footer-grid {
    width: 100%;
    overflow-x: hidden;
}

/* Fix for any potential margin collapse */
.section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}