@import url('global.css');

/* ===================================================================
                CONTENT SECTION - Contenitore principale
=================================================================== */

.content-section {
}

    .content-section .content-top {
        display: flex;
        padding-top: 10px;
    }

    .content-section .content-middle {
        margin: 60px;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }

/* ===================================================================
                CAROUSEL - Sezione galleria immagini
=================================================================== */
.carousel-container {
    max-width: 1920px;
    margin: 0 auto;
    background: white;
    overflow: hidden;
}


.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}


.carousel-track {
    display: flex;
    width: 500%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}


.carousel-slide {
    width: 1500px;
    height: 100%;
    flex-shrink: 0;
    position: relative;
    margin-right: 10px;
}


    .carousel-slide:last-child {
        margin-right: 0;
    }


    .carousel-slide img {
        width: 100%;
        height: 100%;
    }


.carousel-controls {
    padding: 20px;
    background: var(--main-lightgray);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 10px 0 10px 0;
}


.progress-container {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    padding-top: 25px;
}


.progress-bar {
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    overflow: visible;
    position: relative;
    display: flex;
    margin-bottom: 20px;
}


.progress-segment {
    flex: 1;
    height: 100%;
    background: #e0e0e0;
    position: relative;
    border-right: 2px solid var(--main-lightgray);
    cursor: pointer;
}


    .progress-segment:last-child {
        border-right: none;
    }


    .progress-segment.completed {
        background: var(--main-blue);
    }


    .progress-segment.active {
        background: #e0e0e0;
        position: relative;
    }


        .progress-segment.active::after {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            background: linear-gradient(90deg, #ccc, #999);
            transition: width 0.1s linear;
            width: var(--progress, 0%);
        }


    .progress-segment::before {
        content: attr(data-slide-number);
        position: absolute;
        top: -22px;
        left: 0;
        font-size: 12px;
        font-weight: 600;
        color: #666;
        transition: all 0.3s ease;
    }


    .progress-segment.active::before {
        color: var(--main-darkgray);
        transform: scale(1.1);
    }


    .progress-segment.completed::before {
        color: var(--main-blue);
    }


.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--main-gray);
}


.nav-buttons {
    display: flex;
    gap: 10px;
}


.nav-btn {
    background: transparent;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: unset !important;
    min-height: unset !important;
    padding: unset !important;
}

    .nav-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }


.slide-indicator {
    display: flex;
    gap: 8px;
    align-items: center;
}


.dot {
    width: 10px;
    height: 10px;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}


    .dot.active {
        background: #007bff;
        transform: scale(1.2);
    }


.auto-play-toggle {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}


    .auto-play-toggle:hover {
        background: #218838;
    }


    .auto-play-toggle.paused {
        background: #dc3545;
    }






/* ===================================================================
                PRODUCT INFO - Sezione informazioni prodotto
=================================================================== */

.product-container-info {
    display: flex;
    margin: 0 auto;
    padding-bottom: 70px;
}

.info-name {
    flex: 1;
    align-items: flex-start;
}

    .info-name h1 {
        max-width: 450px;
    }

    .info-name h2 {
        max-width: 450px;
        padding: 20px 20px 0 0;
    }

    .info-name p.product-code {
        padding-top: 20px;
        max-width: 450px;
        font-size: 2rem;
        line-height: 2.5rem;
    }

.info-desc {
    flex: 1;
    align-items: flex-start;
}

    .info-desc a {
        color: var(--main-blue);
        cursor: pointer;
    }

    .info-desc h3 {
        font-size: 1rem;
        line-height: 1.5rem;
        font-weight: 300;
    }

    .info-desc .desc-tech {
        padding-top: 100px;
    }

    .info-desc .desc-mat-comp {
        display: flex;
        margin: 0 auto;
        padding-top: 100px;
    }

        .info-desc .desc-mat-comp .mat-comp-materials,
        .info-desc .desc-mat-comp .mat-comp-components {
            flex: 1;
            align-items: flex-start;
            min-width: 50%;
            font-weight: 500;
        }

            .info-desc .desc-mat-comp .mat-comp-materials h3,
            .info-desc .desc-mat-comp .mat-comp-components h3 {
                font-size: 3rem;
                line-height: 3.5rem;
            }

            .info-desc .desc-mat-comp .mat-comp-materials ul,
            .info-desc .desc-mat-comp .mat-comp-components ul {
                padding-top: 50px;
                display: flex;
                gap: 40px;
                flex-wrap: wrap;
                max-width: 80%;
            }

            .info-desc .desc-mat-comp .mat-comp-materials li,
            .info-desc .desc-mat-comp .mat-comp-components li {
                flex: 0 0 auto;
                width: 120px;
                text-align: center
            }

            .info-desc .desc-mat-comp .mat-comp-materials img,
            .info-desc .desc-mat-comp .mat-comp-components img {
                width: 50px;
            }

/* ===================================================================
                PRODUCT ACTIONS - Sezione azioni su prodotto
=================================================================== */
.product-action {
    width: 100%;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 20px;
    flex-wrap: wrap;
}

    .product-action.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

.action-share {
    position: relative;
}

.action-button {
    display: flex;
    justify-content: center;
    align-items: center;
}

    .action-button img {
        width: 24px;
        height: 24px;
        float: left;
    }

    .action-button span {
        color: var(--main-white);
        padding-left: 10px;
    }

.share-dropdown {
    position: absolute;
    top: 60px;
    left: 20px;
    background-color: var(--main-gray);
    padding: 15px;
    display: none;
    z-index: 1000;
    width: 200px;
    box-shadow: 5px 5px 5px rgba(0,0,0,0.2);
}

    .share-dropdown.active {
        display: block;
        animation: fadeInUp 0.3s ease;
    }

@keyframes fadeInUp {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


.social-grid {
    display: flex;
    /*grid-template-columns: repeat(2, 1fr);*/
    gap: 10px;
    flex-direction: column;
}

.social-item {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: black;
    font-weight: 500;
    transition: all 0.2s ease;
    gap: 10px;
}

    .social-item:hover {
        transform: scale(1.05);
    }

.facebook {
}

.linkedin {
}

.email {
}

.social-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.copy-button {
    background: black;
    color: white;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    min-width: 100px;
}

    .copy-button:hover {
        transform: scale(1.02);
    }

    .copy-button.copied {
        background: linear-gradient(45deg, #4CAF50, #8BC34A);
    }

/* Overlay per chiudere il dropdown */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 999;
    display: none;
}

    .overlay.active {
        display: block;
    }





/* ===================================================================
                PRODUCT MODAL - Modale per aggiunta al carrello
=================================================================== */

#modal-cart {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    background-color: rgba(187, 187, 187, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

    #modal-cart.show {
        display: flex;
    }

.modal-content {
    position: relative;
    padding: 20px;
    margin: 20px;
    width: 100%;
    max-width: 600px;
    overflow-y: auto;
    border-radius: 0;
    box-shadow: none;
}

.modal-header {
    margin-bottom: 15px;
}

.modal-title {
    font-size: 3rem;
    line-height: 3rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-product-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.modal-product-image img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
}

.modal-product-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

    .modal-product-detail div {
        border-bottom: 1px solid black;
        padding: 10px;
        display: flex;
        align-items: baseline;
    }

    .modal-product-detail select {
        flex: 1 1 0%;
        min-width: 0px;
        width: 100%;
        padding: 4px 6px;
        font-size: 0.8rem;
        text-align: left;
        border: medium;
        font-weight:300;
        background-color: transparent;
    }

.modal-detail-model, .modal-detail-code, .modal-detail-qty {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    width: 100%;
}


.modal-detail-label {
    width: 100px;
    flex-shrink: 0;
}

.modal-value-label {
    font-weight: 300;
}

.modal-detail-qty input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: 1px solid #ccc;
    padding: 4px 6px;
    font-size: 1rem;
    text-align: right;
    border: none;
    background-color: transparent;
}

.modal-product-note textarea {
    background-color: transparent;
    border: 1px solid #000;
    width: 100%;
    padding: 8px;
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding-top: 20px;
    text-align: right;
    display: flex;
    gap: 20px;
    justify-content: flex-end;
}


@media (max-width: 500px) {


    .modal-product-info {
        flex-direction: column;
        align-items: center;
    }

    .modal-product-detail {
        flex-direction: column;
    }

    .modal-title {
        font-size: 2rem;
        line-height: 2rem;
        text-align: center;
    }

    .modal-footer {
        flex-direction: column;
        justify-content: center;
        gap: 10px;
    }
}



/* ===================================================================
                PRODUCT CERTIFICATION - Sezione certificazioni
=================================================================== */
.product-container-certification {
    display: flex;
    margin: 0 auto;
    margin-top: 100px;
}

.certification-desc {
    flex: 1;
    align-items: flex-start;
}

    .certification-desc h3, .variant-desc h3 {
        font-size: 1rem;
        line-height: 1.5rem;
        font-weight: 300;
        color: var(--main-darkgray);
    }

.variant-desc p.variant-subtitle {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 500;
    padding: 0 0 50px 0;
}

.anchor-desc h3 {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 500;
}

.anchor-desc a {
    margin: 50px 0 0 0;
}

.certification-desc h4, .variant-desc h4 {
    font-size: 2rem;
    line-height: 2.5rem;
    font-weight: 500;
    padding: 0 0 50px 0;
}

.certification-desc p {
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
}

.certification-desc a {
    margin: 50px 0 0 0;
}

.certification-desc * {
    max-width: 600px;
}


.certification-list {
    flex: 1;
    align-items: flex-start;
}

    .certification-list ul {
        margin-top: 25px;
        display: flex;
        gap: 40px;
        flex-wrap: wrap;
    }

    .certification-list li {
        flex: 0 0 auto;
    }

/* ===================================================================
                PRODUCT EXTRA - Sezione contenuti custom
=================================================================== */

.product-container-extra {
    margin-top: 100px;
    padding: 60px;
    background-color: var(--main-lightgray);
}

/* ===================================================================
                PRODUCT VARIANT - Sezione varianti prodotto
=================================================================== */

.product-container-variant {
    display: flex;
    flex-direction: column;
    margin-top: 100px;
}

    .product-container-variant .variant-list ul {
        gap: 20px;
    }

    .product-container-variant .variant-list ul, .list-item {
        display: flex;
        flex-wrap: wrap;
        justify-content: left;
    }

    .product-container-variant .variant-list li, .item-left, .item-middle, .item-right {
        flex: 0 0 auto;
    }

.item-left {
    width: 280px;
}

.item-middle {
    padding-top: 74px;
}

.item-right {
    padding-top: 55px;
}

.item-left .left-code {
    margin-top: 10px;
    padding: 10px;
    color: var(--main-black);
    font-size: 2rem;
    line-height: 2.5rem;
}

.item-left .left-desc {
    background-color: var(--main-lightgray);
    margin-top: 10px;
    padding: 10px;
    max-width: 300px;
    height: 300px;
    color: var(--main-black);
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 300;
}

.middle-dimensions, .middle-materials, .middle-components {
    display: flex;
    gap: 40px;
    color: var(--main-black);
    flex: 0 0 auto;
    padding: 10px;
}

    .middle-dimensions img, .middle-materials img, .middle-components img {
        width: 35px;
    }

/* ===================================================================
                PRODUCT ANCHOR - Sezione ancoraggio
=================================================================== */

.product-container-anchor {
    display: flex;
    margin-top: 100px;
}

.anchor-desc {
    flex: 0 0 35%;
}

    .anchor-desc h4 {
        max-width: 450px;
    }

    .anchor-desc h3 {
        max-width: 450px;
    }

.anchor-list {
    flex: 1;
    align-content: center;
}

    .anchor-list ul {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .anchor-list li {
        flex: 1;
        min-height: 300px;
        width: 200px;
        align-content: center;
        background-color: var(--main-lightgray);
        flex: 0 0 auto;
    }

.item-name, .item-code {
}

    .item-name h3 {
        color: var(--main-black);
        padding: 0 20px;
        font-size: 1.5rem;
        line-height: 1.5rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .item-name h4 {
        color: var(--main-black);
        font-size: 1rem;
        line-height: 1rem;
        font-weight: 300;
        padding: 0 20px;
    }

    .item-code h4 {
        color: var(--main-black);
        font-size: 1.5rem;
        padding: 0 20px;
    }

.item-image {
    width: 150px;
    margin: 0 auto;
    padding-top: 20px;
}

    .item-image img {
        width: 100%;
    }

/* ===================================================================
                PRODUCT RELATED - Sezione prodotti correlati
=================================================================== */

.product-container-related {
    display: flex;
    margin-top: 100px;
}

.related-desc {
    flex: 0 0 35%;
}

    .related-desc h4 {
        max-width: 450px;
    }

    .related-desc h3 {
        max-width: 450px;
    }

.related-list {
    flex: 1;
    align-content: center;
}

    .related-list ul {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

    .related-list li {
        flex: 1;
        min-height: 300px;
        width: 200px;
        align-content: center;
        background-color: var(--main-lightgray);
        flex: 0 0 auto;
    }

        .related-list li .item-name {
            height: 60px;
        }

/* ===================================================================
                PRODUCT DOWNLOAD - Sezione download
=================================================================== */
.product-container-download {
    margin-top: 100px;
    display: flex;
    background-color: var(--main-lightgray);
    padding: 60px;
}

.download-left {
    flex: 0 0 75%;
}

    .download-left h3 {
        padding-bottom: 20px;
    }

    .download-left .left-list {
        display: flex;
        flex-wrap: wrap;
    }

        .download-left .left-list .item {
            flex: 1;
            display: flex;
            gap: 20px;
            flex-basis: 50%;
            max-width: 50%;
            padding-top: 20px;
        }

        .download-left .left-list .disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }



        .download-left .left-list .item a {
            display: contents;
        }

            .download-left .left-list .item a:hover .text {
                color: var(--main-blue);
            }

            .download-left .left-list .item a:hover .ext {
                color: var(--main-blue);
            }

            .download-left .left-list .item a:hover .download-ico {
                fill: var(--main-blue);
            }

        .download-left .left-list .item .image * {
            width: 35px;
        }

        .download-left .left-list .item .text {
            min-width: 160px;
            color: var(--main-black);
            transition: all 0.3s ease;
        }

        .download-left .left-list .item .ext {
            min-width: 50px;
            color: var(--main-black);
            transition: all 0.3s ease;
        }

        .download-left .left-list .item .download-ico {
            justify-content: flex-start;
            width: 15px;
            transition: all 0.3s ease;
        }

.download-right {
    flex: 1;
}

    .download-right * {
        color: var(--main-black);
    }

    .download-right h3, .download-left h3 {
        font-size: 1.5rem;
        line-height: 1.5rem;
    }

    .download-right h4:nth-child(2) {
        padding: 30px 0 30px 0;
    }

    .download-right > a {
        margin: 30px 0 30px 0;
        color: var(--main-white);
    }

/* ===================================================================
                RESPONSIVE - TABLET E MOBILE (max-width: 1279px)
=================================================================== */

@media (max-width: 1279px) {
    .content-middle {
        margin: 10px !important;
    }

    .info-name h1, .info-name h2, .info-name h3 {
        max-width: unset;
    }

    .product-container-info,
    .product-container-certification,
    .product-container-anchor,
    .download-left .left-list,
    .product-container-download,
    .anchor-list ul li .list-item {
        flex-direction: column;
        padding: 15px;
    }

        .product-container-info .info-desc,
        .product-container-anchor .anchor-list {
            padding-top: 50px;
        }

    .certification-list ul {
        gap: 10px !important;
        justify-content: center;
    }

    .certification-desc *,
    .anchor-desc * {
        max-width: unset !important;
    }

    .variant-list {
        padding-top: 50px;
    }

        .variant-list .item-left, .item-middle, .item-right {
            padding: 0 !important;
        }
}

/* ===================================================================
                RESPONSIVE - TABLET E MOBILE (max-width: 768px)
=================================================================== */

@media (max-width: 768px) {
    .carousel-container {
        margin: 0;
    }

    .carousel-wrapper {
        height: 250px;
    }

    .carousel-slide {
        width: 100vw;
        max-width: 1500px;
    }

    .carousel-controls {
        gap: 15px;
    }

    .progress-container {
        width: 200px;
        margin: 0;
        order: 1;
    }

    .nav-buttons {
        order: 2;
        margin-left: 20px;
    }

    .slide-indicator {
        order: 3;
    }

    .list-item {
        flex-direction: column;
        border: 1px solid var(--main-lightgray);
    }

    .item-middle, .item-right {
        padding-top: unset !important;
    }

    .item-left .left-desc {
        height: unset !important;
    }

    .desc-mat-comp {
        flex-direction: column;
    }

    .mat-comp-components {
        padding-top: 50px;
    }

    .anchor-list ul {
        justify-content: center;
    }

    .download-right {
        text-align: center;
        padding-top: 50px;
    }
}

/* ===================================================================
                RESPONSIVE - CAROUSEL ALTEZZE (Media Queries)
=================================================================== */

@media (max-width: 1400px) {
    .carousel-wrapper {
        height: 400px;
    }
}

@media (max-width: 1200px) {
    .carousel-wrapper {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .carousel-wrapper {
        height: 300px;
    }
}

@media (max-width: 830px) {
    .product-action span {
        display: none;
    }

    .product-container-extra {
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .carousel-wrapper {
        height: 200px;
    }
}

@media (max-width: 400px) {
    .carousel-wrapper {
        height: 150px;
    }
}

/* ===================================================================
                STATI INTERATTIVI - Touch e Drag
=================================================================== */

.carousel-wrapper.dragging {
    cursor: grabbing;
}

    .carousel-wrapper.dragging .carousel-track {
        transition: none;
    }


