/* ---------- PRODUCT HERO ------------ */

.product-hero {
    width: 100%;
    min-height: 650px;
    background-position: center;
    background-size: cover;
    background-color: var(--grigio-2);
    display: flex;
}

.product-hero__content {
    color: white;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 65%);
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    padding: var(--spacing-l) var(--padding-laterale);
}

.product-hero__text {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 16px;
}

.product-hero__text>.titolo-massimo {
    line-height: 90%;
}

.product-hero__text>.titolo-piccolo-serif::before {
    content: '/ ';
    margin-left: 6px;
}

.product-hero__buttons {
    display: flex;
    gap: 12px;
}



/* ---------- PRODUCT INTRO ------------ */

.product-intro {
    display: flex;
    background-color: var(--bianco);
}

.product-intro__emotional {
    display: flex;
    flex-direction: column;
    max-width: 65%;
    flex-grow: 2;
    color: var(--grigio-1);
}

.product-intro__payoff {
    padding: var(--spacing-xl) var(--padding-laterale);
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.product-intro__video {
    aspect-ratio: 16 / 9;
    width: 100%;
}

.product-intro__video>iframe {
    height: 100%;
    width: 100%;
    border: 0px;
}

.product-intro__info {
    width: 35%;
    padding: var(--spacing-xl) var(--padding-laterale) var(--spacing-l) var(--spacing-m);
    background-color: var(--grigio-5);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-m);
}

.product-intro__info>.testo-base {
    color: var(--grigio-1);
}

.product-intro__categories {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.product-intro__category {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--grigio-1);
}

.product-intro__category>img {
    width: 24px;
    opacity: 50%;
}





/* ---------- IMAGE GALLERY AFFIANCATE ------------ */

.image-gallery-columns {
    width: 100%;
    padding: var(--spacing-xl) var(--padding-laterale);
}

.image-gallery-columns__wrapper {
    display: flex;
    gap: var(--spacing-m);
}

.image-gallery-columns__item {
    flex: 1 1 0;
    aspect-ratio: 9 / 11;
    overflow: hidden;
}

.image-gallery-columns__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* ---------- APPLICATIONS ------------ */

.product-applications {
    width: 100%;
    padding: var(--spacing-xl) var(--padding-laterale);
}

.product-applications__description {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    color: var(--grigio-1);
    padding: 0 0 var(--spacing-xl) 0;
}

.product-applications__description>.titolo-grande {
    max-width: 1000px;
}

.product-applications__cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    cursor: pointer;
}

.product-applications__small-cards {
    width: 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-applications__card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 2;
}

.product-applications__card--small {
    max-width: 30%;
}


.product-applications__card-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease-in-out;
}

.product-applications__card--big .product-applications__card-image {
    aspect-ratio: 16/9;
}

.product-applications__card-info {
    display: flex;
    justify-content: space-between;
    text-underline-offset: 4px;
}

.product-applications__card-info::after {
    content: '';
    width: 16px;
    background-image: url("../img/system/Arrow-small-black.png");
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.product-applications__city {
    color: var(--grigio-1);
}

.product-applications__card-image:hover {
    opacity: 0.9;
}

.product-applications__card:hover .product-applications__card-info {
    text-decoration: underline;
}










/* --------- PRODUCT DESIGN --------- */


.product-design {
    background-color: var(--nero);
    color: var(--bianco);
    padding: var(--spacing-l) var(--padding-laterale);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 40px;
    user-select: none;
}

.product-design__main {
    display: flex;
    gap: 20px;
}

.product-design__slider-wrapper {
    width: 60%;
}

.product-design__slider {
    width: 100%;
    overflow: hidden;
}

.product-design__track {
    display: flex;
    width: 100%;
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    gap: 2px;
}

.product-design__group {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-design__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
}

.product-design__media {
    flex: 0 0 42%;
    min-height: 160px;
    height: 170px;
    width: 250px;
    overflow: hidden;
}

.product-design__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-design__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px 0 0;
}

.product-design__nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 50px;
}

.product-design__arrow {
    cursor: pointer;
    width: 16px;
    height: 16px;
    background-image: url("../img/system/Slider-arrow-white.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.product-design__arrow--next {
    transform: rotate(180deg);
}

.product-design__arrow.is-disabled {
    background-image: url("../img/system/Slider-arrow-grey.png");
}

/* --------- DIMENSIONI --------- */

.product-dimensions {
    padding: var(--spacing-l) var(--padding-laterale);
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.product-dimensions > p {
    width: 40%;
}

.product-dimensions__main {
    display: flex;
    gap: 20px;
    width: 60%;
}




/* --------- OVERLAY DOCUMENTAZIONE --------- */


.docs-overlay {
    position: absolute;
    max-height: 250px;
    background-color: var(--nero-60);
    backdrop-filter: blur(15px);
    overflow-y: scroll;
    padding: 32px;
    opacity: 0;
    z-index: 3;
}

.docs-overlay__list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.docs-overlay__item {
    color: white;
    cursor: pointer;
    text-align: left;
    width: fit-content;
    border-bottom: 1px solid transparent;
}

.docs-overlay__item::after {
    content: '';
    width: 12px;
    height: 12px;
    display: inline-block;
    background-image: url("../img/system/Arrow-down-white.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.docs-overlay__item:hover {
    border-bottom: 1px solid var(--bianco);
}

.docs-overlay {
    scrollbar-color: var(--grigio-1) transparent;
}

.docs-overlay.docs-overlay::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.docs-overlay::-webkit-scrollbar-track {
    background: transparent;
}

.docs-overlay::-webkit-scrollbar-thumb {
    background-color: var(--grigio-1);

    border: 4px solid transparent;
    background-clip: padding-box;
}

.docs-overlay::-webkit-scrollbar-thumb:hover {
    background-color: var(--grigio-1);
}








/* --------- CAROSELLO ASSETTI --------- */


.product-setup {
    position: relative;
    width: 100%;
    background-color: var(--bianco);
    padding: var(--spacing-xxl) var(--padding-laterale);
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

.product-setup__container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    box-sizing: border-box;
    gap: 40px;
}

.product-setup__slider {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.product-setup__track {
    display: flex;
    width: 100%;
    will-change: transform;
    transition: transform 0.6s ease-in-out;
}

.product-setup__track.is-dragging {
    transition: none;
}

.product-setup__slide {
    flex: 0 0 100%;
    width: 100%;
    aspect-ratio: 16 / 7;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-setup__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.product-setup__arrow {
    cursor: pointer;
    width: 16px;
    height: 16px;
    background-image: url("../img/system/Slider-arrow-black.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.product-setup__arrow--next {
    transform: rotate(180deg);
}

.product-setup__arrow.is-disabled {
    background-image: url("../img/system/Slider-arrow-grey.png");
}

.product-setup__dots {
    display: flex;
    gap: 6px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.product-setup__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--grigio-2);
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.product-setup__dot.is-active {
    background-color: var(--nero);
}

.product-setup__content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.product-setup__content {
    grid-area: 1 / 1 / 2 / 2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s linear;
}

.product-setup__content.is-active {
    opacity: 1;
    visibility: visible;
}





.product-technology {
    position: relative;
    width: 100%;
}

.product-technology__selectors {
    position: absolute;
    top: var(--spacing-l);
    left: var(--padding-laterale);
    z-index: 2;
    display: flex;
    gap: 28px;
}

.product-technology__selector {
    color: var(--grigio-2);
    cursor: pointer;
}

.product-technology__selector:hover {
    color: var(--nero);
}


.product-technology__selector--active {
    color: var(--nero);
}

.product-techfeatures {
    width: 100%;
    padding: var(--spacing-xxxl) var(--padding-laterale);
}

.product-techfeatures__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 80px;
    column-gap: 20px;
}

.product-techfeature {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 0 1 calc(25% - 15px);
}

.product-techfeature__image {
    aspect-ratio: 5 / 4;
    object-fit: cover;
}








.product-variants {
    position: relative;
    width: 100%;
    padding: var(--spacing-xxxl) var(--padding-laterale);
    user-select: none;
}


.product-variants__viewport {
    width: 100%;
    overflow: hidden;
    cursor: grab;
}

.product-variants__viewport:active {
    cursor: grabbing;
}

.product-variants__wrapper {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-variants__wrapper.is-dragging {
    transition: none;
}

.product-variant {
    flex: 0 0 calc((100% - (2 * 20px)) / 3);
    background-color: var(--grigio-6);
    padding: 28px;
    box-sizing: border-box;
}

.product-variant__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
}

.product-variant__icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 50%;
}

.product-variant__content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-variant__value>.label-media {
    color: var(--grigio-2);
    margin-bottom: 4px;
}

.product-variants__nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.product-variants__arrow {
    cursor: pointer;
    width: 16px;
    height: 16px;
    background-image: url("../img/system/Slider-arrow-black.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.product-variants__arrow--next {
    transform: rotate(180deg);
}

.product-variants__arrow.is-disabled {
    background-image: url("../img/system/Slider-arrow-grey.png");
}





.configure-block {
    width: 100%;
    padding: var(--spacing-l) var(--padding-laterale);
    display: flex;
    background-color: var(--grigio-5);
    height: 550px;
}

.configure-block__content {
    height: 100%;
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.configure-block__description {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.configure-block__image-wrapper {
    width: 50%;
}

.configure-block__image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}





.contacts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--nero-60);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: var(--padding-laterale);
    opacity: 0;
    z-index: 3;
}

.contacts-overlay>.titolo-piccolo {
    color: var(--bianco);
}

.contacts-overlay__content {
    background-color: var(--bianco);
    padding: 40px;
    width: 500px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    align-items: center;
}

.contacts-overlay__fields {
    width: 100%;
}


.contacts-overlay__fields>.input-field--black {
    height: 50px;
}

.contacts-overlay__fields>.input-field--long {
    height: 150px;
    padding: 10px 0;
}



.contacts-overlay__close-btn {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* .register-overlay styles moved to components.css (global) — the overlay
   markup lives in base.html, so its CSS must load on every page, not just
   product pages that include product.css. */

.mobile-actions {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
    background-color: var(--nero-35);
    backdrop-filter: blur(10px);
    gap: 12px;
    padding: var(--padding-laterale);
    justify-content: center;
}








/* ---------- SCHERMI PICCOLI ---------- */

@media screen and (max-width: 1024px) {

    .product-hero__content {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-end;
        gap: 50px;
    }

    .product-intro {
        flex-direction: column;
    }

    .product-intro__emotional {
        max-width: 100%;
    }

    .product-intro__info {
        width: 100%;
        padding: var(--spacing-l) var(--padding-laterale);
        gap: var(--spacing-s);
    }

    .product-intro__payoff {
        padding: var(--spacing-l) var(--padding-laterale);
        gap: var(--spacing-m);
    }

    .image-gallery-columns {
        padding: var(--spacing-l) var(--padding-laterale);
    }

    .image-gallery-columns__wrapper {
        flex-direction: column;
        gap: var(--spacing-s);
    }

    .image-gallery-columns__item {
        flex: 1 1 auto;
    }


    .product-applications__cards {
        flex-direction: column;
    }

    .product-applications__small-cards {
        width: 100%;
    }


    .product-applications__card--small {
        max-width: 100%;
    }




    .product-design {
        padding: var(--spacing-m) 0;
    }

    .product-design .label-media,
    .product-design .titolo-medio {
        padding: 0 var(--padding-laterale);
    }

    .product-design__main {
        flex-direction: column;
        gap: 80px;
    }

    .product-design__nav {
        display: none;
    }

    .product-design__slider-wrapper {
        width: 100%;
    }

    .product-design__track {
        scrollbar-width: 0px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .product-design__track::-webkit-scrollbar {
        display: none;
    }

    .product-design__track {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
        padding-right: var(--padding-laterale);
        cursor: grab;
        touch-action: pan-y;
    }

    .product-design__track.is-dragging {
        cursor: grabbing;
        scroll-snap-type: none;
    }

    .product-design__group {
        display: contents;
    }

    .product-design__item {
        flex: 0 0 90%;
        scroll-snap-align: start;
        flex-direction: column;
        gap: 20px;
    }

    .product-design__item:first-of-type {
        margin-left: var(--padding-laterale);
    }

    .product-design__media {
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .product-design__content {
        padding: 0;
    }



    .product-setup {
        padding: var(--spacing-xxl) 0 var(--spacing-l) 0;
    }

    .product-setup__arrow {
        display: none;
    }

    .product-setup__container {
        padding: 0;
    }

    .product-setup__slider {
        cursor: grab;
        touch-action: pan-y;
    }

    .product-setup__slider:active {
        cursor: grabbing;
    }

    .product-setup__track {
        padding: 0 5%;
        gap: 10%;
    }

    .product-setup__slide {
        aspect-ratio: 4 / 3;
    }

    .product-techfeature {
        flex-basis: calc(50% - 10px);
    }



    .product-variants__viewport {
        overflow-x: auto;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }

    .product-variants__wrapper {
        transform: none !important;
        transition: none !important;
        gap: 16px;
        padding: 0 var(--padding-laterale);
        width: fit-content;
    }

    .product-variants__viewport {
        scrollbar-width: 0px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .product-variants__viewport::-webkit-scrollbar {
        display: none;
    }

    .product-variant {
        flex: 0 0 280px;
        min-width: 80vw;
        padding: 25px 20px;
    }


    .product-variants__nav {
        display: none;
    }

    .product-variants {
        padding: var(--spacing-xxl) 0 var(--spacing-m) 0;
    }

}



@media screen and (max-width: 700px) {

    .product-hero__buttons {
        width: 100%;
        flex-wrap: wrap;
        gap: 10px;
    }

    .product-hero__buttons>* {
        flex: 1 1 auto;
        text-align: center;
    }

    .product-hero {
        min-height: 550px;
    }

    .product-hero__content {
        padding: var(--spacing-m) var(--padding-laterale);
    }

    .product-techfeatures {
        padding: var(--spacing-xxxl) 0 var(--spacing-l) 0;
    }

    .product-techfeatures__wrapper {
        width: 100%;
        overflow-x: scroll;
        scrollbar-width: 0px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .product-techfeatures__wrapper::-webkit-scrollbar {
        display: none;
    }

    .product-techfeatures__grid {
        display: flex;
        gap: 20px;
        width: fit-content;
        padding-right: var(--padding-laterale);
    }


    .product-techfeature {
        width: 80vw;
    }

    .product-techfeature:first-child {
        margin-left: var(--padding-laterale);
    }

    .product-technology__selectors {
        top: var(--spacing-m);
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .configure-block {
        flex-direction: column;
        height: auto;
        gap: 60px;
    }

    .configure-block__content {
        height: auto;
        width: 100%;
        justify-content: flex-start;
        gap: 20px;
    }

    .configure-block__description {
        max-width: 100%;
        gap: 20px;
    }

    .configure-block__image-wrapper {
        width: 75%;
    }

    .configure-block__image {
        max-height: none;
    }


    .contacts-overlay__content {
        padding: 20px;
        width: 100%;
    }

    .mobile-actions {
        display: flex;
    }

    .docs-overlay {
        left: var(--padding-laterale);
        right: var(--padding-laterale);
        width: auto;
        max-width: none;
    }


    /* --------- DIMENSIONI --------- */

    .product-dimensions {
        padding: var(--spacing-l) var(--padding-laterale);
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .product-dimensions > p {
        width: 100%;
    }

    .product-dimensions__main {
        display: flex;
        gap: 20px;
        width: 100%;
    }
}