/* =============================================
   Property Detail Page - Premium Styles
   ============================================= */

.property-detail-page {
    padding-top: 70px;
    padding-bottom: 100px;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: var(--space-6);
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: var(--gray-100);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-badges {
    position: absolute;
    top: var(--space-4);
    left: var(--space-4);
    display: flex;
    gap: var(--space-2);
}

.badge-listing {
    padding: 6px 14px;
    background: var(--primary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-listing.rent {
    background: var(--accent);
}

.badge-type {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-700);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

/* Gallery Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    overflow-x: auto;
    background: var(--gray-50);
}

.thumb {
    flex-shrink: 0;
    width: 70px;
    height: 50px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumb.active,
.thumb:hover {
    opacity: 1;
    border-color: var(--primary);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Detail Layout */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: var(--space-8);
    padding-top: var(--space-6);
}

/* Main Content */
.detail-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Property Header */
.property-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    line-height: 1.2;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--gray-500);
    font-size: var(--text-sm);
}

.property-location ion-icon {
    font-size: 16px;
}

/* Price & Features Card */
.price-features-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-5);
    background: var(--gray-50);
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
}

.price-section {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.price-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: var(--space-2);
}

.price-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.price-period {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.features-section {
    display: flex;
    gap: var(--space-6);
}

.feature {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.feature ion-icon {
    font-size: 22px;
    color: var(--primary);
}

.feature-value {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-900);
    display: block;
}

.feature-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
}

/* Content Sections */
.content-section h2 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-2);
    border-bottom: 2px solid var(--gray-100);
}

.description {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--gray-600);
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
}

.detail-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-900);
}

/* Amenities */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.amenity {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-700);
}

.amenity ion-icon {
    font-size: 18px;
    color: var(--primary);
}

/* Sidebar */
.detail-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

.contact-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-100);
}

.contact-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.contact-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-5);
}

.contact-form .form-group {
    margin-bottom: var(--space-3);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-3);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-contact {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-contact:hover {
    background: var(--primary-dark);
}

.contact-divider {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin: var(--space-4) 0;
    color: var(--gray-400);
    font-size: var(--text-sm);
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.btn-whatsapp,
.btn-call {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: var(--space-2);
}

.btn-whatsapp:hover {
    border-color: #25D366;
    color: #25D366;
}

.btn-call:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Mobile Fixed Contact Bar */
.mobile-contact-bar {
    display: none;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 1024px) {
    .detail-layout {
        grid-template-columns: 1fr 300px;
    }

    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .property-detail-page {
        padding-top: 60px;
        padding-bottom: 80px;
    }

    .gallery-main {
        height: 280px;
    }

    .gallery-thumbs {
        padding: var(--space-2);
    }

    .thumb {
        width: 60px;
        height: 45px;
    }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: var(--space-4);
        padding-top: var(--space-4);
    }

    .property-header h1 {
        font-size: 1.375rem;
    }

    .price-features-card {
        flex-direction: column;
        gap: var(--space-4);
        padding: var(--space-4);
    }

    .price-section {
        width: 100%;
        padding-bottom: var(--space-3);
        border-bottom: 1px solid var(--gray-200);
    }

    .price-value {
        font-size: 1.5rem;
    }

    .features-section {
        width: 100%;
        justify-content: space-around;
    }

    .feature {
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .details-grid {
        grid-template-columns: 1fr 1fr;
    }

    .amenities-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Hide desktop sidebar on mobile */
    .detail-sidebar {
        display: none;
    }

    /* Show mobile contact bar */
    .mobile-contact-bar {
        display: flex;
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        padding: var(--space-3) var(--space-4);
        background: white;
        border-top: 1px solid var(--gray-200);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 90;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-price {
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--primary);
    }

    .mobile-price span {
        font-size: 0.75rem;
        font-weight: 500;
        color: var(--gray-500);
    }

    .mobile-btn-contact {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        padding: var(--space-3) var(--space-5);
        background: var(--primary);
        color: white;
        border-radius: var(--radius-full);
        font-weight: 600;
        font-size: var(--text-sm);
    }
}

@media (max-width: 400px) {
    .gallery-main {
        height: 220px;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .amenities-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   NEW FEATURES - Gallery, Lightbox, Map
   ============================================= */

/* Gallery Count Button */
.gallery-count {
    position: absolute;
    bottom: var(--space-4);
    right: var(--space-4);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s;
}

.gallery-count:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-count ion-icon {
    font-size: 18px;
}

/* Thumbnail More Overlay */
.thumb-more {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 700;
}

.thumb {
    position: relative;
}

/* Map Link */
.map-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: var(--space-3);
    padding: 4px 12px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.map-link:hover {
    background: var(--primary-dark);
}

/* Gallery Tabs */
.gallery-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 8px 16px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-tab:hover {
    background: var(--gray-200);
}

.gallery-tab.active {
    background: var(--primary);
    color: white;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Map Container */
.map-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

.map-open-btn {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: white;
    color: var(--gray-700);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.map-open-btn:hover {
    background: var(--primary);
    color: white;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
}

.lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-prev {
    left: var(--space-4);
}

.lightbox-next {
    right: var(--space-4);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: var(--text-base);
    font-weight: 600;
}

/* Mobile Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: var(--space-2);
    }

    .gallery-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .map-container iframe {
        height: 200px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
}