/* assets/css/lightbox.css - NEW for Phase 2 Gallery */
/* Lightbox overlay */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    cursor: pointer;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: fadeIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--primary);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 16px;
    cursor: pointer;
    font-size: 24px;
    border-radius: 50%;
    transition: 0.3s;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0,0,0,0.6);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Gallery Styles for property page */
.property-gallery {
    margin-bottom: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gallery-main {
    position: relative;
    background: #f5f5f5;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main img {
    width: 100%;
    max-height: 550px;
    object-fit: contain;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-main img:hover {
    opacity: 0.95;
}

.gallery-thumbnails {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail.active {
    border-color: var(--primary);
}

.thumbnail:hover:not(.active) {
    transform: scale(1.05);
    border-color: var(--primary-light);
}

.gallery-placeholder {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    color: var(--text-gray);
}

.gallery-placeholder i {
    font-size: 4rem;
    margin-bottom: 16px;
    color: var(--primary-light);
}

/* Property Details Grid */
.property-details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    margin-top: 32px;
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.info-card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    border-left: 4px solid var(--primary);
    padding-left: 16px;
}

.info-card h2 i {
    color: var(--primary);
    margin-right: 10px;
}

.description {
    line-height: 1.8;
    color: var(--text-gray);
}

.details-table {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
}

.detail-label i {
    width: 24px;
    color: var(--primary);
}

.detail-value {
    color: var(--text-gray);
}

/* Price History Table */
.price-history-table {
    overflow-x: auto;
}

.price-history-table table {
    width: 100%;
    border-collapse: collapse;
}

.price-history-table th,
.price-history-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.price-history-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-dark);
}

.price-down {
    color: #2E7D32;
    font-weight: 600;
}

.price-up {
    color: #C62828;
    font-weight: 600;
}

/* Map Container */
.map-container {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f0f0f0;
    min-height: 300px;
}

.map-placeholder {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.whatsapp-btn {
    background: #25D366;
    color: white;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.call-btn {
    background: var(--primary);
    color: white;
}

.call-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.email-btn {
    background: var(--text-dark);
    color: white;
}

.email-btn:hover {
    background: #333;
    transform: translateY(-2px);
}

.full-width {
    width: 100%;
    text-align: center;
    display: block;
    margin-top: 16px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn.fb {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.wa {
    background: #25D366;
}

.share-btn:hover {
    transform: translateY(-3px);
    filter: brightness(0.9);
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    color: var(--text-gray);
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow: auto;
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-gray);
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(189,113,13,0.1);
}

/* Responsive */
@media (max-width: 968px) {
    .property-details-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-main {
        min-height: 350px;
    }
    
    .gallery-main img {
        max-height: 350px;
    }
}

@media (max-width: 768px) {
    .info-card {
        padding: 20px;
    }
    
    .detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .modal-content {
        margin: 20% auto;
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .property-header h1 {
        font-size: 1.5rem;
    }
    
    .price-large {
        font-size: 1.25rem;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
    }
}