/* Valassi Immobili Plugin Styles */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

.valassi-immobili-container,
.valassi-dettaglio-container {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #333333;
    background-color: transparent;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    box-sizing: border-box;
}

/* Titoli con Poppins SemiBold verde scuro */
.valassi-immobili-container h1,
.valassi-immobili-container h2,
.valassi-immobili-container h3,
.valassi-dettaglio-container h1,
.valassi-dettaglio-container h2,
.valassi-dettaglio-container h3,
.property-title h2,
.sidebar h3,
.description-box h3,
.features-section h3,
.map-section h3,
.contact-info-section h3,
.detail-contact-box h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #2E5C5C;
}

/* Testi regolari con Poppins Regular */
.valassi-immobili-container,
.valassi-dettaglio-container,
.valassi-immobili-container p,
.valassi-dettaglio-container p,
.valassi-immobili-container span,
.valassi-dettaglio-container span,
.valassi-immobili-container label,
.valassi-dettaglio-container label {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.valassi-map-marker {
    background: transparent !important;
    border: none !important;
}

/* Gallery Lightbox */
.valassi-gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.valassi-gallery-lightbox.active {
    display: flex;
}

.valassi-gallery-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.valassi-gallery-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.valassi-gallery-counter {
    margin-top: 20px;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

.valassi-gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 10001;
}

.valassi-gallery-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.valassi-gallery-prev,
.valassi-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 10001;
}

.valassi-gallery-prev {
    left: 20px;
}

.valassi-gallery-next {
    right: 20px;
}

.valassi-gallery-prev:hover,
.valassi-gallery-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.gallery-image {
    transition: opacity 0.2s;
}

.gallery-image:hover {
    opacity: 0.9;
}

/* Ensure full width on WordPress pages - but keep content centered */
body .valassi-immobili-container,
body .valassi-dettaglio-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
}

body .valassi-dettaglio-container .top-bar,
body .valassi-dettaglio-container .detail-container {
    margin-left: auto !important;
    margin-right: auto !important;
}

body.single-immobile .site-main,
body.single-immobile .content-area,
body.valassi-single-immobile .site-main,
body.valassi-single-immobile .content-area {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
}

/* Center content relative to WordPress header/footer */
body.single-immobile .site-content,
body.valassi-single-immobile .site-content {
    margin: 0 auto !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

body.single-immobile .site,
body.valassi-single-immobile .site {
    margin: 0 auto !important;
}

/* Hide WordPress default content on single immobile pages */
body.single-immobile .site-content,
body.single-immobile .content-area,
body.single-immobile .entry-content,
body.valassi-single-immobile .site-content,
body.valassi-single-immobile .content-area,
body.valassi-single-immobile .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.single-immobile .entry-header,
body.single-immobile .entry-meta,
body.single-immobile .entry-footer,
body.single-immobile .entry-title,
body.valassi-single-immobile .entry-header,
body.valassi-single-immobile .entry-meta,
body.valassi-single-immobile .entry-footer,
body.valassi-single-immobile .entry-title {
    display: none !important;
}

/* Show only our template content */
body.single-immobile .valassi-dettaglio-container,
body.valassi-single-immobile .valassi-dettaglio-container {
    display: block !important;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(245, 245, 245, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader.active {
    display: flex;
}

.loader-icon {
    width: 80px;
    height: 80px;
    position: relative;
}

.loader-icon svg {
    width: 100%;
    height: 100%;
}

.loader-icon .spinner {
    animation: spin 1s linear infinite;
    transform-origin: center;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Switch Bar */
.switch-bar {
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
    border-bottom: 1px solid #ddd;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
}

.switch-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

.switch-option.active {
    color: #2E5C5C;
}

.toggle-switch {
    width: 50px;
    height: 28px;
    background-color: #ddd;
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s;
}

.toggle-switch.active {
    background-color: #2E5C5C;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch.active::after {
    transform: translateX(22px);
}

/* Main Content */
.main-content {
    display: flex;
    width: 100% !important;
    max-width: 100% !important;
    margin: 30px 0;
    padding: 0;
    padding-bottom: 40px;
    gap: 30px;
    padding-left: 0;
    padding-right: 0;
}

/* Sidebar Filters */
.sidebar {
    width: 320px;
    background-color: #3A605D;
    padding: 0;
    color: #fff;
    border-radius: 0;
    flex-shrink: 0;
    margin: 0;
    margin-left: 0;
    align-self: flex-start;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    z-index: 1000;
}

.sidebar-header {
    display: none;
}

.sidebar-content {
    padding: 30px;
}

.sidebar h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    font-family: 'Poppins', sans-serif;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-section .reset-price-filter {
    margin-left: auto;
    margin-right: auto;
    display: flex;
}

.filter-section > label:first-child {
    display: block;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.sidebar label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    cursor: pointer;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
}

.sidebar input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #2E5C5C;
}

.sidebar input[type="range"] {
    width: 100%;
    margin-top: 10px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: #2E5C5C;
    outline: none;
    border-radius: 3px;
}

.sidebar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
}

.sidebar input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 8px;
    color: #fff;
    font-weight: 500;
}

.range-labels span {
    color: #fff;
}

/* Property Grid */
.property-grid {
    flex-grow: 1;
    padding-right: 0;
    margin-left: 40px;
    width: 100%;
}

.property-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    row-gap: 30px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

/* Responsive grid for property items */
@media (max-width: 1200px) {
    .property-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 0;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 0;
        position: relative;
        top: 0;
        max-height: none;
        overflow-y: visible;
        z-index: 100;
    }
    
    .sidebar.collapsed {
        max-height: 60px;
        overflow: hidden;
    }
    
    .sidebar.collapsed .sidebar-content {
        display: none;
    }
    
    .sidebar-header {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        background-color: #3A605D;
        cursor: pointer;
        user-select: none;
        min-height: 60px;
        height: 60px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .sidebar.collapsed .sidebar-header {
        margin-bottom: 30px;
    }
    
    .sidebar-header h3 {
        margin: 0;
        color: #fff;
        font-size: 18px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        text-align: center;
        line-height: 1;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 40px);
        padding: 0 20px;
        padding-bottom: 25px;
    }
    
    .sidebar-header h3 svg {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        vertical-align: middle;
    }
    
    .sidebar-toggle {
        display: none !important;
    }
    
    .sidebar.collapsed .sidebar-toggle {
        display: none !important;
    }
    
    .sidebar-content {
        padding: 20px;
        background-color: #3A605D;
    }
    
    .filter-section {
        margin-bottom: 20px;
    }
    
    .filter-section > label:first-child {
        margin-bottom: 12px;
        font-size: 14px;
        font-weight: 600;
    }
    
    .filter-section label {
        display: block;
        margin-bottom: 10px;
        padding: 8px 0;
        font-size: 14px;
    }
    
    .range-labels {
        display: flex;
        justify-content: space-between;
        margin-top: 10px;
        font-size: 14px;
    }
    
    .sidebar > h3 {
        display: none;
    }
    
    .property-grid {
        width: 100%;
        margin-left: 0;
        padding: 0;
        margin-top: 0;
    }
    
    .property-items {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        margin-top: 0;
    }
    
    .property-card {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 4 / 5 !important;
        height: auto !important;
        position: relative;
    }
    
    .property-card img {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: 4 / 5 !important;
        min-height: auto !important;
        object-fit: cover;
        object-position: center;
    }
}

.property-card {
    background-color: #fff;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    height: 420px;
    aspect-ratio: 3 / 4;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    padding: 0;
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.property-card img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: filter 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
}

.property-card:hover img {
    filter: brightness(0.5);
}

.property-card .property-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(46, 92, 92, 0.9), rgba(46, 92, 92, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.property-card:hover .property-overlay {
    opacity: 1;
}

.property-card .property-overlay .property-title {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}

.image-overlay {
    position: relative;
    height: 250px;
    background-color: #ddd;
}

.image-overlay .label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
}

/* Pagination */
.pagination {
    text-align: center;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    text-decoration: none;
    color: #333333;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
    min-width: 40px;
    display: inline-block;
}

.pagination a:hover {
    background-color: #f5f5f5;
}

.pagination .current,
.pagination a.active {
    background-color: #2E5C5C;
    color: #fff;
    border-color: #2E5C5C;
}

.pagination .dots {
    border: none;
    background: transparent;
}

/* SVG Icons */
.icon-house,
.icon-building {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


/* Detail Page Styles */
.top-bar {
    background-color: #fff;
    padding: 10px 50px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 5px;
}

.breadcrumb a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #2E5C5C;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.pagination-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #999;
    font-size: 14px;
    flex-wrap: wrap;
}

.pagination-bar a {
    color: #999;
    text-decoration: none;
}

.pagination-bar a:hover {
    color: #2E5C5C;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.action-btn:hover {
    color: #2E5C5C;
}

.action-btn.saved svg path {
    fill: #ff4444 !important;
}

.action-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.detail-container {
    max-width: 1400px !important;
    margin: 30px auto !important;
    padding: 0 50px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    left: auto !important;
    right: auto !important;
}

.valassi-dettaglio-container .top-bar {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    position: relative;
    left: auto !important;
    right: auto !important;
}

.valassi-dettaglio-container .detail-container {
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
}

.detail-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    align-items: start;
    margin-top: 20px;
}

.detail-main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.gallery-contact-row {
    display: grid;
    grid-template-columns: 1fr 350px;
    margin-top: 20px;
    gap: 40px;
    align-items: start;
}

.gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

/* Gallery grid mode - more compact */
.gallery.grid-mode {
    grid-template-columns: repeat(3, 1fr);
}

.gallery.grid-mode .main-image {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery.grid-mode .main-image img {
    height: 100%;
    min-height: 400px;
}

.gallery.grid-mode .side-images {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
}

/* Description Popup */
.valassi-description-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.valassi-description-popup.active {
    display: flex;
}

.valassi-description-popup-content {
    position: relative;
    max-width: 800px;
    max-height: 90vh;
    width: 100%;
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.valassi-description-popup-content h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #2E5C5C;
}

.valassi-description-popup-body {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.valassi-description-popup-body p {
    margin-bottom: 15px;
}

.valassi-description-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background-color: #2E5C5C !important;
    border: none !important;
    border-radius: 50%;
    color: #fff !important;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
    z-index: 10001;
    line-height: 1;
    font-weight: bold;
}

.valassi-description-close:hover {
    background-color: #3A605D !important;
}

@media (max-width: 768px) {
    .valassi-description-popup-content {
        max-width: 100%;
        max-height: 95vh;
        padding: 20px;
        margin: 10px;
    }
    
    .valassi-description-popup-content h3 {
        font-size: 20px;
        margin-bottom: 15px;
    }
    
    .valassi-description-popup-body {
        font-size: 14px;
    }
}

/* Responsive gallery - mobile: stacked */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 4px;
        margin-bottom: 12px !important;
    }
    
    .gallery.grid-mode {
        grid-template-columns: 1fr;
    }
    
    .gallery.grid-mode .main-image {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .main-image img {
        height: 150px;
        object-fit: cover;
        object-position: center;
    }
    
    .side-images {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 4px;
        margin-bottom: 0;
    }
    
    .side-images img,
    .side-images > div {
        height: 80px;
        object-fit: cover;
        object-position: center;
    }
    
    /* Reduce spacing after gallery */
    .gallery {
        margin-bottom: 12px !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
    }
    
    .gallery * {
        margin-bottom: 0 !important;
    }
    
    .side-images {
        margin-bottom: 0 !important;
    }
    
    .detail-main-content .gallery + .mobile-contact-box {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
    }
    
    .detail-main-content {
        gap: 0 !important;
    }
    
    .detail-main-content .gallery {
        margin-bottom: 12px !important;
        margin-top: 0 !important;
    }
    
    .description-box {
        margin-top: 20px;
        padding-top: 15px;
    }
    
    /* Reduce spacing in property cards */
    .property-card .property-overlay {
        padding: 10px;
    }
    
    .property-card .property-title {
        font-size: 16px;
        margin: 0;
    }
}

.main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.side-images {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
}

.side-images img {
    width: 100%;
    height: 195px;
    object-fit: cover;
    border-radius: 8px;
}

.image-overlay-detail {
    position: relative;
}

.image-overlay-detail .photos-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.detail-contact-box {
    position: sticky;
    top: 20px;
    padding: 25px;
    background-color: #3A605D;
    border-radius: 8px;
    height: fit-content;
    width: 100%;
    max-width: 350px;
}

/* Mobile contact box - hidden on desktop */
.mobile-contact-box {
    display: none;
}

.detail-contact-box h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    text-align: center;
}

.detail-contact-box button {
    width: 100%;
    padding: 12px 20px;
    margin-bottom: 12px;
    border: 1px solid #2E5C5C;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 400;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.detail-contact-box button:hover {
    background-color: #2E5C5C;
    color: #fff;
}

.contact-call,
.contact-write {
    background-color: #fff;
    color: #2E5C5C;
    border: 1px solid #2E5C5C !important;
}

.contact-call:hover,
.contact-write:hover {
    background-color: #2E5C5C;
    color: #fff;
}

.contact-call:disabled,
.contact-write:disabled,
.detail-contact-box button:disabled {
    background-color: #f5f5f5 !important;
    color: #999 !important;
    border-color: #ddd !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
}

.detail-contact-box button:disabled:hover {
    background-color: #f5f5f5 !important;
    color: #999 !important;
}

.contact-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 30px 0 20px 0;
}

.property-title h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: bold;
    color: #333333;
}

.property-title p {
    margin: 0;
    font-size: 14px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.location-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

.map-icon-square {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #000;
    display: inline-block;
}

.description-toggle {
    background-color: #0d3d3d !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: background-color 0.2s;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    display: inline-block;
}

.description-toggle:hover {
    background-color: #154848 !important;
}

.description-short {
    display: block;
}

.description-short p {
    display: block;
}

.description-preview {
    position: relative;
}

.description-full {
    margin-top: 10px;
    display: none !important;
}

.description-full.active,
.description-full[style*="display: block"] {
    display: block !important;
    visibility: visible !important;
}

/* Responsive mobile styles for description */
@media (max-width: 768px) {
    .description-preview {
        padding: 0;
    }
    
    .description-short p {
        font-size: 14px;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    .description-full {
        font-size: 14px;
        line-height: 1.6;
        padding: 15px 0;
    }
    
    .description-full p {
        margin-bottom: 15px;
    }
    
    .description-toggle {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        margin-top: 15px;
    }
    
    .detail-container {
        padding: 15px !important;
    }
    
    .property-header {
        margin: 20px 0 15px 0 !important;
    }
    
    .description-box {
        margin-top: 15px !important;
    }
    
    .contact-info-section {
        margin: 20px 0 !important;
        padding: 0 !important;
    }
    
    .features-section {
        margin-top: 15px !important;
    }
    
    .map-section {
        margin-top: 15px !important;
    }
    
    .detail-content-wrapper {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Hide desktop contact box on mobile */
    .detail-contact-box:not(.mobile-contact-box) {
        display: none !important;
    }
    
    /* Show mobile contact box on mobile - positioned right after gallery */
    .mobile-contact-box {
        display: block !important;
        position: relative !important;
        max-width: 100% !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 20px !important;
        padding-top: 0 !important;
        order: 2 !important;
        width: 100% !important;
    }
    
    .mobile-contact-box h3 {
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Ensure no extra spacing in contact box wrapper */
    .mobile-contact-box > * {
        margin-top: 0 !important;
    }
    
    .mobile-contact-box > *:first-child {
        margin-top: 0 !important;
    }
    
    /* Remove any empty spacer divs */
    .detail-main-content > *:empty {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
        height: 0 !important;
    }
    
    .detail-main-content .gallery {
        order: 1 !important;
        margin-bottom: 0 !important;
    }
    
    .detail-main-content .property-header {
        order: 3 !important;
        margin-top: 20px !important;
    }
    
    .detail-main-content .description-box {
        order: 4 !important;
        margin-top: 20px !important;
    }
    
    .detail-main-content .contact-info-section {
        order: 5 !important;
    }
    
    .detail-main-content .features-section {
        order: 6 !important;
    }
    
    .detail-main-content .map-section {
        order: 7 !important;
    }
}

.property-price {
    font-size: 36px;
    font-weight: 600;
    color: #2E5C5C;
    font-family: 'Poppins', sans-serif;
}

.description-box {
    margin-top: 30px;
    line-height: 1.8;
}

.description-box h3 {
    color: #2E5C5C;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.description-box p {
    color: #333333;
    font-size: 14px;
    margin: 0 0 10px 0;
}

.contact-info-section {
    margin: 40px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info-section h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: #2E5C5C;
}

.contact-btn {
    background-color: #2E5C5C;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.2s;
}

.contact-btn:hover {
    opacity: 0.9;
}

.phone-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.features-section {
    margin-top: 30px;
}

.features-section h3 {
    color: #2E5C5C;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.features-list {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #999;
    gap: 8px;
}

.feature-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.map-section {
    margin-top: 30px;
    width: 100%;
    padding: 0;
    margin-bottom: 0;
}

.map-section h3 {
    margin-bottom: 15px;
}

.map-section h3 {
    color: #2E5C5C;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ddd;
}

.map-container {
    position: relative;
    height: 400px;
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    border: none;
}

.map-container iframe,
.map-container #valassi-map {
    width: 100% !important;
    height: 100% !important;
    border: none;
    margin: 0;
    padding: 0;
    display: block;
}


.map-container #valassi-map {
    width: 100%;
    height: 100%;
}

.map-expand-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #2E5C5C;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.2s;
    z-index: 10;
}

.map-expand-btn:hover {
    opacity: 0.9;
}

.expand-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Full width container fix */
.valassi-immobili-container *,
.valassi-dettaglio-container *,
.valassi-detail-modal-content * {
    box-sizing: border-box;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-left: 0;
        margin-bottom: 20px;
    }
    
    .property-grid {
        margin-left: 0;
        width: 100%;
    }
    
    .detail-content-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .detail-contact-box {
        max-width: 100%;
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        padding: 0 15px;
    }
    
    .sidebar {
        width: 100%;
        padding: 20px;
        margin-left: 0;
        margin-bottom: 20px;
    }
    
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-left: 0;
        width: 100%;
    }
    
    .property-card {
        height: auto;
        aspect-ratio: 4 / 5 !important;
    }
    
    .property-card img {
        aspect-ratio: 4 / 5 !important;
        min-height: auto !important;
        height: 100% !important;
    }
    
    .gallery-contact-row {
        flex-direction: column;
    }
    
    
    .gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .gallery-main {
        height: 250px;
    }
    
    .gallery-side {
        height: 120px;
    }
    
    .property-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .detail-content-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .detail-contact-box {
        position: relative;
        max-width: 100%;
        margin-top: 30px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        gap: 15px;
    }
    
    .breadcrumb {
        width: 100%;
        order: 1;
    }
    
    .action-bar {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        order: 2;
    }
    
    .pagination-bar {
        width: 100%;
        justify-content: flex-start;
        order: 1;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-start;
        order: 2;
        gap: 10px;
    }
    
    .action-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .switch-bar {
        padding: 15px 0;
    }
    
    .description-box {
        padding: 20px;
    }
    
    .features-section {
        padding: 20px;
    }
    
    .contact-info-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .property-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .property-card {
        height: auto;
        aspect-ratio: 4 / 5 !important;
        position: relative;
    }
    
    .property-card img {
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: 4 / 5 !important;
        min-height: auto !important;
        object-fit: cover;
        object-position: center;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .breadcrumb {
        width: 100%;
        order: 1;
    }
    
    .action-bar {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        order: 2;
    }
    
    .pagination-bar {
        width: 100%;
        justify-content: flex-start;
        order: 1;
        flex-wrap: wrap;
    }
    
    .action-buttons {
        width: 100%;
        justify-content: flex-start;
        order: 2;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .switch-bar {
        padding: 10px 0;
    }
    
    .switch-option {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .filter-section {
        margin-bottom: 20px;
    }
    
    .gallery-main {
        height: 200px;
    }
    
    .gallery-side {
        height: 100px;
    }
    
    .detail-container {
        padding: 0 15px;
    }
    
    .description-box,
    .features-section,
    .contact-info-section {
        padding: 15px;
    }
    
    .property-price {
        font-size: 28px;
    }
    
    .detail-contact-box {
        padding: 20px;
    }
    
    .map-icon-square {
        width: 30px;
        height: 30px;
    }
    
    #valassi-map {
        height: 250px !important;
    }
}

.reset-price-filter {
    margin-top: 12px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.reset-price-filter:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    border-color: #fff !important;
}

.reset-price-filter span {
    color: #fff !important;
}

.reset-price-filter * {
    color: #fff !important;
}

