/* Property Page Premium Redesign */
:root {
    --primary-color: #0059A1;
    /* Blu Oceano */
    --accent-color: #F18825;
    /* Arancione Zucca */
    --secondary-blue: #70C4EF;
    /* Azzurro Maya */
    --light-blue: #99D9F9;
    /* Azzurro Cielo */

    --text-main: #222222;
    --bg-color: #FFFFFF;
    --secondary-bg: #F7F7F7;
    --border-color: #DDDDDD;
    --text-muted: #717171;
    --shadow-soft: 0 6px 16px rgba(0, 0, 0, 0.12);
    --radius-l: 12px;
    --radius-xl: 24px;
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    font-family: var(--font-heading);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Navbar overrides if needed for fixed/transparent */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

/* Photo Grid Layout */
.photo-grid-container {
    padding-top: 24px;
    position: relative;
    border-radius: var(--radius-l);
    overflow: hidden;
    margin-bottom: 32px;
}

.photo-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 8px;
    height: 408px;
}

.photo-main {
    grid-row: 1 / 3;
    grid-column: 1 / 2;
    height: 100%;
}

.photo-sub {
    height: 100%;
}

.photo-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.2s;
}

.photo-item:hover {
    filter: brightness(0.9);
}

/* Rounded corners for the grid edges */
.photo-grid .photo-item:first-child {
    border-top-left-radius: var(--radius-l);
    border-bottom-left-radius: var(--radius-l);
}

.photo-grid .photo-item:nth-child(2) {
    border-top-right-radius: var(--radius-l);
}

.photo-grid .photo-item:last-child {
    border-bottom-right-radius: var(--radius-l);
}

/* Show All Photos Button */
.btn-show-photos {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background-color: white;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

.btn-show-photos:hover {
    transform: scale(1.02);
    background-color: #f7f7f7;
}

/* Main Content Layout */
.property-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    /* Spacious gap */
    position: relative;
}

/* Left Column */
.property-main h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.property-address {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 24px;
    text-decoration: underline;
    cursor: pointer;
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 32px 0;
}

/* Features icons grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 16px;
}

.feature-icon-lg {
    font-size: 24px;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

/* Description Text */
.description-text {
    font-size: 16px;
    color: #222;
    white-space: pre-line;
}

/* Map Section */
.map-section {
    height: 480px;
    width: 100%;
    background: #eee;
    margin-bottom: 48px;
    border-radius: var(--radius-l);
    overflow: hidden;
}

/* Right Column: Sticky Card */
.sticky-wrapper {
    position: sticky;
    top: 100px;
    /* Offset for fixed navbar */
    align-self: start;
}

.booking-card {
    border: 1px solid rgb(221, 221, 221);
    border-radius: var(--radius-l);
    padding: 24px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    background: white;
}

.price-display {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-sub {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.contact-form .form-control {
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #b0b0b0;
    margin-bottom: 12px;
    font-size: 14px;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.btn-primary-luxe {
    background: linear-gradient(135deg, #F18825 0%, #FF9E40 100%);
    color: white;
    border: none;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn-primary-luxe:hover {
    transform: scale(0.98);
}

.contact-info-agency {
    margin-top: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .photo-grid {
        display: none;
        /* Hide grid on mobile */
    }

    .mobile-carousel {
        display: block !important;
        margin: -20px -20px 24px -20px;
        /* Full width breakout */
    }

    .mobile-carousel img {
        height: 300px;
        object-fit: cover;
    }

    .property-content {
        grid-template-columns: 1fr;
        /* Stack layout */
        gap: 32px;
    }

    .sticky-wrapper {
        position: static;
        /* No sticky on mobile usually, or bottom bar */
        margin-top: 24px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .mobile-gallery {
        display: block !important;
        margin: -20px -20px 24px -20px;
        position: relative;
    }

    .mobile-gallery-scroll {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: none;
        /* Firefox */
        padding-bottom: 8px;
        /* Room for shadow if any */
    }

    .mobile-gallery-scroll::-webkit-scrollbar {
        display: none;
        /* Safari and Chrome */
    }

    .mobile-gallery-img {
        scroll-snap-align: center;
        flex: 0 0 90%;
        height: 300px;
        object-fit: cover;
        margin-right: 8px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .mobile-gallery-img:first-child {
        margin-left: 20px;
    }

    .mobile-gallery-img:last-child {
        margin-right: 20px;
    }

    @keyframes peekScroll {

        0%,
        100% {
            transform: translateX(0);
        }

        30% {
            transform: translateX(-40px);
        }
    }

    .animate-peek {
        animation: peekScroll 1.5s cubic-bezier(0.25, 1, 0.5, 1) 0.5s 1;
    }
}

/* Better Desktop Gallery Arrows */
#lightboxCarousel .carousel-control-prev,
#lightboxCarousel .carousel-control-next {
    width: 80px;
    opacity: 1;
}

#lightboxCarousel .carousel-control-prev-icon,
#lightboxCarousel .carousel-control-next-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    padding: 24px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

#lightboxCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#lightboxCarousel .carousel-control-next:hover .carousel-control-next-icon {
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* Allow pinch to zoom on mobile lightbox */
#lightboxCarousel .carousel-item img {
    touch-action: pan-x pan-y pinch-zoom;
}