.ihp-container {
    display: flex;
    flex-wrap: wrap; 
    width: 100%;
    margin-bottom: 2rem;
    font-family: inherit; 
    /* CSS Variables for global icons */
    --ihp-icon-normal: initial;
    --ihp-icon-active: initial;
}

.ihp-view-panel {
    flex: 2;
    min-height: 400px;
    max-height: 900px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* NUOVO: Stile per tutte le immagini nella view panel */
.ihp-view-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    display: block;
    transition: opacity 400ms ease-in-out;
    opacity: 0;
    object-fit: contain;
}

/* DEPRECATED: Mantieni per retrocompatibilità se necessario */
.ihp-active-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    display: block;
    transition: opacity 400ms ease-in-out;
    object-fit: contain;
}

.ihp-map-panel {
    flex: 1;
    min-width: 300px;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; 
}

.ihp-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ihp-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
    opacity: 0.8;
}

.ihp-map-wrapper {
    position: relative;
    width: 100%;
    transition: transform 0.3s ease;
}

.ihp-floorplan {
    width: 100%;
    display: block;
    height: auto;
}

.ihp-hotspots-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ihp-hotspot {
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease;
    z-index: 10;
    width: 80px; 
    height: 80px;
    
    /* Background Image Logic */
    background-image: var(--ihp-icon-normal);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.ihp-hotspot.active {
    background-image: var(--ihp-icon-active);
}

.ihp-hotspot:hover {
    transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)) scale(1.1);
}

/* Mobile Rotation Logic */
@media (max-width: 1024px) {
    .ihp-container {
        flex-direction: column;
    }
    
    .ihp-view-panel {
        order: 2; 
    }
    
    .ihp-map-panel {
        width: 100%;
        padding: 1rem;
        order: 1;
        
    }

    .ihp-map-panel img {
        max-height: 500px;
        width: auto;
        margin: 0 auto;
    }

    /* Rotation Implementation */
    .ihp-mobile-rotate {
        transform: rotate(90deg);
        transform-origin: center center;
        width: 100%; 
        margin: 20% 0; 
    }
}