/* Property Detail Page - Clean Design */

/* ===== NEW GALLERY LAYOUT ===== */
.property-gallery {
    margin-bottom: 25px;
    position: relative;
}

/* Desktop Gallery - Main + Grid Layout */
.gallery-desktop {
    display: flex;
    gap: 8px;
    border-radius: 12px;
    overflow: hidden;
    height: 480px;
}

.gallery-main {
    position: relative;
    flex: 1;
    min-width: 0;
    background: #f5f5f5;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
}

.gallery-main.gallery-single {
    border-radius: 12px;
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.gallery-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

/* Gallery Navigation Arrows */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gallery-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
    z-index: 10;
    border-radius: 20px;
}

/* Thumbnail Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    width: 320px;
    flex-shrink: 0;
    height: 100%;
}

.gallery-grid-item {
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
    overflow: hidden;
    background: #f5f5f5;
}

.gallery-grid-item:first-child {
    border-radius: 0;
}

.gallery-grid-item:nth-child(2) {
    border-radius: 0 12px 0 0;
}

.gallery-grid-item:nth-child(4),
.gallery-grid-item:last-child {
    border-radius: 0 0 12px 0;
}

.gallery-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gallery-grid-item:hover img {
    transform: scale(1.05);
}

/* Gallery Overlay for "View All" */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.gallery-overlay:hover {
    background: rgba(0, 0, 0, 0.65);
}

.overlay-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.overlay-text {
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    padding: 0 10px;
}

/* Mobile Gallery (Carousel) */
.gallery-mobile {
    display: none;
}

/* ===== LIGHTBOX MODAL ===== */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-modal.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 80px 120px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10001;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: calc(100vh - 200px);
}

.lightbox-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 28px;
    width: 55px;
    height: 55px;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 20px;
    border-radius: 20px;
}

/* Lightbox Thumbnails */
.lightbox-thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    max-width: 90%;
    overflow-x: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.lightbox-thumb {
    width: 70px;
    height: 50px;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
}

.lightbox-thumb:hover {
    opacity: 0.9;
}

.lightbox-thumb.active {
    opacity: 1;
    border-color: white;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== MOBILE CAROUSEL (existing styles) ===== */
.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
    border-radius: 12px;
}

.carousel-slides {
    position: relative;
    width: 100%;
    height: 350px;
    background: #f5f5f5;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    background: #f5f5f5;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f5f5f5;
}

/* Carousel Navigation Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.carousel-arrow:hover {
    background: #fff;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

/* Carousel Counter */
.carousel-counter {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    font-size: 0.9rem;
    z-index: 10;
    border-radius: 20px;
}

/* Property Header - Below Photos */
.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 0;
    background: transparent;
}

.property-header h1 {
    font-size: 1.8rem;
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 5px;
}

.property-location {
    color: #666;
    font-size: 1rem;
}

.property-price-large {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* Quick Stats Grid */
.property-quick-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.stat-item {
    text-align: center;
    padding: 10px;
    border-right: 1px solid #e0e0e0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Description Card */
.description-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 25px 30px;
    margin-bottom: 30px;
}

.description-card h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.description-card p {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* Property Details Grid */
.property-details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

/* Details Section with Tabs */
.details-section {
    background: #ffffff;
    padding: 0;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

/* Tabs Navigation */
.details-tabs {
    display: flex;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    color: #1a1a1a;
    background: #fff;
    border-bottom-color: #333;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 25px;
}

.tab-content.active {
    display: block;
}

.no-features {
    color: #888;
    font-style: italic;
}

/* Construction Grid */
.construction-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.construction-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
}

/* Feature items (no label, just value) */
.construction-item.feature-item {
    justify-content: center;
    align-items: flex-start;
}

.construction-item.feature-item .construction-value {
    font-size: 0.95rem;
    font-weight: 500;
}

.construction-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.construction-value {
    font-size: 1.1rem;
    color: #1a1a1a;
    font-weight: 600;
}

.no-features {
    color: #888;
    font-style: italic;
    padding: 20px 0;
}

/* Contact Sidebar */
.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 120px;
}

.contact-box {
    background: #ffffff;
    padding: 0;
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.contact-box h3 {
    color: #1a1a1a;
    margin: 0;
    padding: 18px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    background: #fafafa;
    border-bottom: 1px solid #e0e0e0;
}

.property-contact-form {
    padding: 20px;
}

.property-contact-form .form-group {
    margin-bottom: 15px;
}

.property-contact-form label {
    display: block;
    margin-bottom: 6px;
    color: #555;
    font-size: 0.85rem;
    font-weight: 600;
}

.property-contact-form input,
.property-contact-form textarea {
    width: 100%;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    color: #1a1a1a;
    font-size: 1rem;
    font-family: inherit;
}

.property-contact-form input:focus,
.property-contact-form textarea:focus {
    outline: none;
    border-color: #333;
}

.property-contact-form input::placeholder,
.property-contact-form textarea::placeholder {
    color: #999;
}

.property-contact-form textarea {
    min-height: 100px;
    resize: vertical;
}

.property-contact-form .btn {
    width: 100%;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.property-contact-form .btn:hover {
    background: #1a1a1a;
}

/* Contact Info Box */
.contact-info-box {
    padding: 25px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-item a,
.contact-info-item span {
    color: #555;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.contact-info-item a:hover {
    color: #1a1a1a;
}

#contactFormMessage {
    margin: 0 20px 20px;
    padding: 0;
    display: none;
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.4;
    background: transparent;
    border: none;
}

#contactFormMessage.success {
    color: #4a90d9;
}

#contactFormMessage.error {
    color: #c0392b;
}

/* Responsive */
@media (max-width: 1200px) {
    .gallery-desktop {
        height: 420px;
    }

    .gallery-grid {
        width: 280px;
    }

    .property-details-grid {
        grid-template-columns: 1fr 350px;
    }

    .property-quick-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .stat-item:nth-child(3) {
        border-right: none;
    }
}

@media (max-width: 1024px) {
    .gallery-desktop {
        height: 380px;
    }

    .gallery-grid {
        width: 240px;
    }

    .property-details-grid {
        grid-template-columns: 1fr;
    }

    .contact-sidebar {
        position: static;
    }

    .property-header {
        flex-direction: column;
        gap: 10px;
    }

    .property-price-large {
        font-size: 1.8rem;
    }

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

@media (max-width: 768px) {
    /* Switch to mobile carousel */
    .gallery-desktop {
        display: none !important;
    }

    .gallery-mobile {
        display: block !important;
    }

    .carousel-slides {
        height: 350px;
    }

    .carousel-arrow {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .carousel-prev {
        left: 10px;
    }

    .carousel-next {
        right: 10px;
    }

    .property-header h1 {
        font-size: 1.4rem;
    }

    .property-price-large {
        font-size: 1.5rem;
    }

    .property-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item {
        border-right: 1px solid #e0e0e0;
    }

    .stat-item:nth-child(2n) {
        border-right: none;
    }

    .details-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 0 0 50%;
    }

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

    /* Lightbox adjustments for mobile */
    .lightbox-content {
        padding: 50px 20px 100px;
    }

    .lightbox-arrow {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-thumbnails {
        max-width: 95%;
    }

    .lightbox-thumb {
        width: 55px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .carousel-slides {
        height: 280px;
    }

    .carousel-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .carousel-prev {
        left: 5px;
    }

    .carousel-next {
        right: 5px;
    }

    .carousel-dots {
        display: none;
    }

    .carousel-counter {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .property-header h1 {
        font-size: 1.2rem;
    }

    .property-price-large {
        font-size: 1.3rem;
    }

    .property-quick-stats {
        grid-template-columns: 1fr 1fr;
        padding: 15px;
    }

    .stat-item {
        padding: 8px;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .stat-value {
        font-size: 1rem;
    }

    .tab-btn {
        flex: 0 0 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

    .description-card {
        padding: 20px;
    }
}

