/* ===== LISTING DETAIL PAGE STYLES ===== */

/* Header Modifications for Detail Page */
.favorite-btn-header,
.share-btn-header {
    padding: 10px 16px;
    background-color: var(--background-white);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.favorite-btn-header:hover,
.share-btn-header:hover {
    border-color: var(--primary-coral);
    color: var(--primary-coral);
}

/* ===== LISTING GALLERY ===== */
.listing-hero {
    background-color: var(--text-primary);
    padding-bottom: 0;
}

.listing-gallery {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-main {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .gallery-main {
        height: 300px;
    }
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #f5f5f5;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    font-size: 30px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.gallery-nav:hover {
    background-color: var(--background-white);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: 20px;
}

.gallery-nav.next {
    right: 20px;
}

.view-all-photos {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.view-all-photos:hover {
    background-color: var(--background-white);
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    padding: 20px;
    overflow-x: auto;
    background-color: var(--text-primary);
}

.thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    border: 3px solid transparent;
}

.thumbnail:hover,
.thumbnail.active {
    opacity: 1;
    border-color: var(--primary-coral);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== LISTING DETAILS SECTION ===== */
.listing-details-section {
    padding: 40px 0 80px;
    background-color: var(--background-white);
}

.listing-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
}

@media (max-width: 1024px) {
    .listing-layout {
        grid-template-columns: 1fr;
    }
}

/* ===== MAIN CONTENT ===== */
.listing-main {
    min-width: 0;
}

.listing-header {
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.listing-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .listing-title {
        font-size: 24px;
    }
}

.listing-location {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.listing-price-large {
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-coral);
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .listing-price-large {
        font-size: 32px;
    }
}

.listing-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background-color: var(--background-light);
    border-radius: 8px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Listing Sections */
.listing-section {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.listing-section:last-child {
    border-bottom: none;
}

.listing-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.listing-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* Property Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--background-light);
}

.detail-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.status-active {
    color: #28A745;
}

.status-pending {
    color: #FFC107;
}

.status-sold {
    color: #DC3545;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.feature-item {
    padding: 12px 16px;
    background-color: var(--background-light);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-primary);
}

/* Map */
.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: var(--background-light);
    border-radius: 12px;
    overflow: hidden;
}

.map-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-note {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Similar Listings */
.similar-listings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.placeholder-text {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ===== SIDEBAR ===== */
.listing-sidebar {
    position: sticky;
    top: 90px;
    height: fit-content;
}

@media (max-width: 1024px) {
    .listing-sidebar {
        position: static;
    }
}

.sidebar-card {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.sidebar-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-coral);
}

.contact-form textarea {
    resize: vertical;
    font-family: inherit;
}

.contact-note {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 12px;
    text-align: center;
}

/* Schedule Buttons */
.btn-secondary-full {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--background-white);
    color: var(--primary-coral);
    border: 2px solid var(--primary-coral);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
}

.btn-secondary-full:last-child {
    margin-bottom: 0;
}

.btn-secondary-full:hover {
    background-color: var(--primary-coral);
    color: var(--background-white);
}

/* Mortgage Calculator */
.calculator {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.calc-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.calc-input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.calc-input-group input {
    padding: 10px 12px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
}

.calc-input-group input:focus {
    outline: none;
    border-color: var(--primary-coral);
}

.calc-result {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(135deg, #FFF5F4 0%, #FFF9E6 100%);
    border-radius: 8px;
    margin-top: 8px;
}

.calc-result span {
    font-size: 14px;
    color: var(--text-secondary);
}

.calc-result strong {
    font-size: 28px;
    color: var(--primary-coral);
    font-weight: 700;
}

.btn-text-link {
    background: none;
    color: var(--primary-coral);
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    text-align: left;
}

.btn-text-link:hover {
    text-decoration: underline;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.share-btn {
    padding: 12px 16px;
    background-color: var(--background-light);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    width: 100%;
}

.share-btn:hover {
    background-color: var(--border-color);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
    .listing-sidebar {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .header-actions .btn-secondary {
        display: none;
    }
    
    .favorite-btn-header,
    .share-btn-header {
        padding: 8px 12px;
        font-size: 13px;
    }
}


