/* Wrapper generale */
.ahv-wrapper {
    display: flex;
    flex-wrap: nowrap; /* prima era wrap, ora le due colonne restano affiancate su desktop */
    gap: 3rem;
    align-items: flex-start;
    margin-bottom: 3rem;
}

/* Colonna immagine - STICKY su desktop */
.ahv-image-wrapper {
    flex: 2 1 60%;
    min-width: 280px;
    position: -webkit-sticky;
    position: sticky;
    top: 200px; /* regola in base all'altezza dell'header fissato */
    align-self: flex-start;
}

/* Colonna lista prodotti */
.ahv-products-wrapper {
    flex: 1 1 35%;
    min-width: 260px;
}

/* Contenitore immagine responsiva */
.ahv-image-inner {
    position: relative;
    display: inline-block;
    width: 100%;
}

.ahv-image-inner img {
    display: block;
    width: 100%;
    height: auto;
}

/* Hotspot */
.ahv-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.ahv-hotspot:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.ahv-hotspot-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    display: block;
}

.ahv-hotspot.is-active .ahv-hotspot-dot,
.ahv-hotspot:hover .ahv-hotspot-dot {
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgb(255 255 255 / 25%);
}

/* Lista prodotti */
.et-l--body ul.ahv-products-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.ahv-product {
    margin-bottom: .8rem;
    padding-bottom: 1.1rem;
    background-color:#fff;
    border-radius:4px;
}

.ahv-product a {
    display: flex;
    flex-direction:column;
    text-decoration: none;
    color: inherit;
    gap: 1rem;
}

/* Thumbnail prodotto */
.ahv-product-thumb{
    margin:auto;
}
.ahv-product-thumb img {
    display: block;
    width: 80%;
    height: auto;
    margin:auto;
}

/* Info prodotto */
.ahv-product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ahv-product-title {
    font-size: 1rem;
    padding-left:.8rem;
}

.ahv-product-price {
    font-size: 0.9rem;
}

/* Prodotto attivo evidenziato */
.ahv-product.is-active {
    border: 1px solid #000;
    padding: 0.75rem;
    border-radius: 4px;
}

/* ---------- Breakpoints ---------- */

@media (max-width: 1200px) {
    .ahv-wrapper {
        gap: 2.5rem;
    }

    .ahv-product-thumb img {
        width: 95px;
    }
}

/* Tablet e mobile: layout a colonna, niente sticky */
@media (max-width: 900px) {
    .ahv-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .ahv-image-wrapper,
    .ahv-products-wrapper {
        flex: 1 1 100%;
        min-width: 0;
    }

    .ahv-image-wrapper {
        position: static;  /* disattiva sticky */
        top: auto;
    }

    .ahv-products-wrapper {
        margin-top: 0.5rem;
    }
}

/* Mobile small */
@media (max-width: 600px) {
    .ahv-wrapper {
        gap: 1.5rem;
    }

    .ahv-product a {
        gap: 0.75rem;
    }

    .ahv-product-thumb img {
        width: 80px;
    }

    .ahv-product-title {
        font-size: 0.95rem;
    }

    .ahv-product-price {
        font-size: 0.85rem;
    }

    .ahv-hotspot-dot {
        width: 16px;
        height: 16px;
        box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
    }
}

/* Mobile extra small */
@media (max-width: 420px) {
    .ahv-product-thumb img {
        width: 70px;
    }

    .ahv-product.is-active {
        padding: 0.6rem;
    }
}
