/* Detail Page Styles */

.cursor-pointer {
    cursor: pointer;
}

.agent-avatar-md {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.4);
}

.agent-avatar-sm {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    font-size: 27px;
    border: 2px solid rgba(255,255,255,0.4);
}

.agent-contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.agent-contact-item {
    display: flex;
    align-items: center;
}

.agent-contact-icon {
    width: 1.5rem;
    flex-shrink: 0;
    text-align: center;
    margin-right: 0.75rem;
    color: inherit;
}

/* Gallery styling */
.gallery-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #0d6efd;
    transform: scale(1.05);
}

.main-image {
    width: 100%;
    height: 55vh;
    max-height: 520px;
    min-height: 320px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
}

/* Carousel preview images */
.carousel-previews {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
}

.carousel-preview {
    flex: 0 0 auto;
    width: 120px;
    height: 90px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.carousel-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-preview:hover,
.carousel-preview.active {
    border-color: #0d6efd;
    transform: scale(1.05);
}

/* Price styling */
.price-tag {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0d6efd;
}

/* Property meta information */
.property-meta {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
    font-weight: 500;
}

.meta-item i {
    color: #0d6efd;
}

/* Feature items */
.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
}

.feature-item i {
    font-size: 1.5rem;
    color: #0d6efd;
}

/* Agent contact section */
.agent-contact {
    background: white;
    padding: 1.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Review styling */
.review-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.rating-stars {
    color: #ffc107;
}

/* Map container */
.map-container {
    height: 400px;
    border-radius: 0.375rem;
    overflow: hidden;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Badge utilities */
.badge-outline-primary {
    background: transparent !important;
    border: 2px solid #0d6efd;
    color: #0d6efd !important;
}

.badge-outline-danger {
    background: transparent !important;
    border: 2px solid #dc3545;
    color: #dc3545 !important;
}

/* Font size utilities */
.fs-6 {
    font-size: 1rem !important;
}

.fs-4 {
    font-size: 1.5rem !important;
}

.fs-2 {
    font-size: 2rem !important;
}

/* Price color utilities */
.price-sale-color {
    color: var(--price-sale-color);
}

.price-rent-color {
    color: var(--price-rent-color);
}

/* Line height utilities */
.line-height-18 {
    line-height: 1.8;
}

/* Avatar styling */
.avatar-large {
    width: 60px;
    height: 60px;
    font-size: 24px;
    font-weight: bold;
}

/* Position utilities */
.position-absolute-top-end {
    position: absolute;
    top: 0;
    right: 0;
}

.margin-3 {
    margin: 1rem;
}

/* Text utilities */
.text-decoration-none {
    text-decoration: none;
}

/* Icon utilities */
.icon-large {
    font-size: 3rem;
}

.icon-medium {
    font-size: 2rem;
}

/* Print Styles */
@media print {
    /* Hide unnecessary elements */
    .breadcrumb,
    .btn,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-previews,
    .fullscreen-previews,
    .contact-form,
    .map-section,
    .similar-properties,
    .back-to-top,
    footer,
    nav,
    .listing-action-buttons,
    .badge-featured,
    .social-share {
        display: none !important;
    }
    
    /* Reset body and container */
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
        margin: 0;
        padding: 0;
    }
    
    .container {
        max-width: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* Layout adjustments */
    .row {
        display: block;
        width: 100%;
    }
    
    .col-lg-8,
    .col-lg-4 {
        width: 100%;
        float: none;
        margin: 0;
        padding: 0;
    }
    
    /* Image gallery */
    .listing-gallery {
        page-break-inside: avoid;
        margin-bottom: 20pt;
    }
    
    .carousel,
    .carousel-inner,
    .carousel-item {
        position: static !important;
        height: auto !important;
    }
    
    .main-image {
        width: 100%;
        height: auto;
        max-height: 400pt;
        object-fit: contain;
        margin-bottom: 10pt;
    }
    
    /* Text styling */
    h1 {
        font-size: 18pt;
        margin-bottom: 10pt;
        color: black;
    }
    
    h2 {
        font-size: 16pt;
        margin-bottom: 8pt;
        page-break-after: avoid;
        color: black;
    }
    
    h3 {
        font-size: 14pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
        color: black;
    }
    
    p {
        margin-bottom: 6pt;
        orphans: 3;
        widows: 3;
    }
    
    /* Property details */
    .property-price {
        font-size: 16pt;
        font-weight: bold;
        margin-bottom: 10pt;
    }
    
    .property-meta {
        margin-bottom: 15pt;
    }
    
    .property-meta span {
        display: inline-block;
        margin-right: 15pt;
        margin-bottom: 5pt;
    }
    
    /* Lists */
    ul, ol {
        margin-bottom: 10pt;
        padding-left: 20pt;
    }
    
    li {
        margin-bottom: 3pt;
    }
    
    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 10pt;
    }
    
    th, td {
        border: 1pt solid black;
        padding: 5pt;
        text-align: left;
    }
    
    th {
        background-color: #f0f0f0;
        font-weight: bold;
    }
    
    /* Agent information */
    .agent-card {
        border: 1pt solid #ccc;
        padding: 10pt;
        margin: 20pt 0;
        page-break-inside: avoid;
    }
    
    /* Ensure images don't break */
    img {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }
    
    /* Avoid breaking important sections */
    .property-details,
    .property-description,
    .agent-card {
        page-break-inside: avoid;
    }
    
    /* Print links as text */
    a {
        color: black;
        text-decoration: none;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
    
    a[href^="#"]:after {
        content: "";
    }
    
    /* Availability badge */
    .badge {
        background: white !important;
        color: black !important;
        border: 1pt solid black !important;
        font-weight: normal !important;
    }
}

/* Property detail action buttons - brand colors */
.property-actions .btn-property-action {
    border-radius: 0.5rem;
    font-weight: 600;
    padding: 0.625rem 1rem;
    transition: all 0.2s ease-in-out;
}

/* Primary edit button: navy background, white text, gold hover */
.property-actions .btn-property-edit {
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: #ffffff;
}

.property-actions .btn-property-edit:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--primary-color);
}

/* Facebook button: brand blue with darker hover */
.property-actions .btn-property-facebook {
    background-color: #1877F2;
    border: 2px solid #1877F2;
    color: #ffffff;
}

.property-actions .btn-property-facebook:hover,
.property-actions .btn-property-facebook:focus {
    background-color: #166fe5;
    border-color: #166fe5;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
    transform: translateY(-1px);
}

/* Outline buttons: navy border/text, navy fill on hover */
.property-actions .btn-property-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.property-actions .btn-property-outline:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Keep the red heart indicator inside the favorite button */
.property-actions .btn-property-outline .text-danger {
    color: #dc3545 !important;
}

/* =========================================================
   Property Detail Page — refreshed layout styles
   ========================================================= */

/* Listing hero card */
.listing-hero {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    padding: 2rem;
    transition: var(--transition-slow);
}

.listing-hero:hover {
    box-shadow: var(--box-shadow-lg);
}

.listing-hero-compact {
    padding: 1rem 1.25rem;
}

.listing-hero-compact .listing-title {
    font-size: 1.65rem;
}

@media (min-width: 768px) {
    .listing-hero-compact .listing-title {
        font-size: 2rem;
    }
}

.listing-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark-color);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .listing-title {
        font-size: 2.5rem;
    }
}

.badge-hidden {
    background-color: var(--warning-color);
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
}

.listing-location {
    color: var(--secondary-color);
    font-size: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.listing-location i {
    color: var(--accent-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* Price display */
.listing-price-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem;
}

.price-sale-display,
.price-rent-display {
    font-weight: 800;
    line-height: 1.1;
}

.price-sale-display {
    font-size: 2rem;
    color: var(--price-sale-color);
}

.price-rent-display {
    font-size: 1.75rem;
    color: var(--price-rent-color);
}

@media (min-width: 768px) {
    .price-sale-display {
        font-size: 2.5rem;
    }

    .price-rent-display {
        font-size: 2rem;
    }
}

/* Lease terms pill — smaller and less conspicuous */
.lease-terms {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--secondary-color);
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 50rem;
    padding: 0.35rem 0.85rem;
}

.lease-terms i {
    color: var(--accent-color);
    font-size: 0.85rem;
}

/* Quick stats row */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quick-stats-sidebar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 0;
    padding-top: 0.75rem;
}

.quick-stats-sidebar .quick-stat {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: var(--light-color);
    text-align: left;
}

.quick-stats-sidebar .quick-stat i {
    font-size: 1.1rem;
    margin-bottom: 0;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 1rem 0.75rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.quick-stat:hover {
    background-color: #ffffff;
    box-shadow: var(--box-shadow-md);
    transform: translateY(-2px);
}

.quick-stat i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 0.25rem;
}

.quick-stat-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.2;
}

.quick-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--secondary-color);
    line-height: 1.2;
}

/* Section cards */
.description-card,
.features-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    padding: 2rem;
    transition: var(--transition-slow);
}

.description-card:hover,
.features-card:hover {
    box-shadow: var(--box-shadow-lg);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
}

.listing-description {
    color: var(--body-color);
    line-height: 1.8;
    font-size: 1rem;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-card:hover {
    background-color: #ffffff;
    box-shadow: var(--box-shadow-md);
    transform: translateY(-2px);
}

.feature-card i {
    font-size: 1.35rem;
    color: var(--accent-color);
    flex-shrink: 0;
}

.feature-card span {
    font-weight: 500;
    color: var(--dark-color);
}

.features-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Sticky sidebar */
.sidebar-sticky {
    position: sticky;
    top: 1rem;
    align-self: start;
    z-index: 10;
}

/* Responsive tweaks */
@media (max-width: 576px) {
    .listing-hero,
    .description-card,
    .features-card {
        padding: 1.25rem;
    }

    .listing-title {
        font-size: 1.75rem;
    }

    .price-sale-display {
        font-size: 1.75rem;
    }

    .price-rent-display {
        font-size: 1.5rem;
    }

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

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