/* ==========================================
   PAGINA PRODOTTO
========================================== */

.product-page{

    display:flex;
    gap:40px;
    max-width:1400px;
    margin:40px auto;
    padding:20px;
    align-items:flex-start;

}

.product-gallery{

    flex:1;
    min-width:320px;
    max-width:650px;

}

.product-info{

    flex:1;

}

.product-info h1{

    font-size:36px;
    margin-bottom:20px;

}

.product-price{

    font-size:34px;
    font-weight:bold;
    color:#8c5cff;
    margin-bottom:20px;

}

.product-description{

    font-size:17px;
    line-height:1.8;
    color:#555;
    margin-bottom:30px;

}

/* ==========================================
   IMMAGINE PRINCIPALE
========================================== */

.image-wrapper{

    position:relative;
    width:100%;

}

#main-image{

    display:block;
    width:100%;
    height:auto;
    max-height:70vh;
    object-fit:contain;
    border-radius:14px;
    cursor:zoom-in;
    user-select:none;

}

/* ==========================================
   FRECCE GALLERIA
========================================== */

.gallery-arrow{

    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:48px;
    height:48px;
    border:none;
    border-radius:50%;
    background:rgba(0,0,0,.45);
    color:white;
    font-size:24px;
    cursor:pointer;
    transition:.25s;
    z-index:10;

}

.gallery-arrow:hover{

    background:rgba(0,0,0,.75);

}

#prev-image{

    left:15px;

}

#next-image{

    right:15px;

}

/* ==========================================
   MINIATURE
========================================== */

.thumbnails-wrapper{

    width:100%;
    margin-top:20px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:thin;

}

.thumbnails{

    display:flex;
    gap:12px;
    width:max-content;
    padding-bottom:8px;

}

.thumbnails img{

    width:80px;
    height:80px;
    object-fit:cover;
    border-radius:10px;
    cursor:pointer;
    border:3px solid transparent;
    transition:.2s;
    flex-shrink:0;

}

.thumbnails img:hover{

    transform:scale(1.05);

}

.thumb.active{

    border-color:#8c5cff;

}

/* ==========================================
   CONTATORE IMMAGINI
========================================== */

.image-counter{

    text-align:center;
    margin-top:12px;
    font-size:15px;
    color:#666;

}

/* ==========================================
   PUNTINI
========================================== */

.gallery-dots{

    display:flex;
    justify-content:center;
    gap:8px;
    margin-top:12px;

}

.dot{

    width:10px;
    height:10px;
    border-radius:50%;
    background:#d0d0d0;
    cursor:pointer;
    transition:.25s;

}

.dot.active{

    background:#8c5cff;
    transform:scale(1.2);

}

/* ==========================================
   LIGHTBOX
========================================== */

.lightbox{

    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.92);
    justify-content:center;
    align-items:center;
    z-index:9999;
    animation:fadeIn .25s ease;

}

.lightbox img{

    max-width:95%;
    max-height:90%;
    border-radius:12px;
    object-fit:contain;
    box-shadow:0 0 40px rgba(0,0,0,.5);

}

/* ==========================================
   CHIUSURA LIGHTBOX
========================================== */

.lightbox-close{

    position:absolute;
    top:25px;
    right:30px;
    color:white;
    font-size:42px;
    cursor:pointer;
    user-select:none;
    transition:.25s;

}

.lightbox-close:hover{

    transform:scale(1.15);

}

/* ==========================================
   ANIMAZIONI
========================================== */

@keyframes fadeIn{

    from{

        opacity:0;

    }

    to{

        opacity:1;

    }

}

/* ==========================================
   PULSANTE CONDIVIDI
========================================== */

.share-btn{

    display:block;
    width:100%;
    margin-top:20px;
    padding:14px;
    border:none;
    border-radius:10px;
    background:#8c5cff;
    color:white;
    font-size:16px;
    cursor:pointer;
    transition:.25s;

}

.share-btn:hover{

    background:#7441ff;

}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width:992px){

    .product-page{

        flex-direction:column;
        gap:30px;
        padding:20px;

    }

    .product-gallery{

        max-width:100%;
        width:100%;

    }

    .product-info{

        width:100%;

    }

}

@media (max-width:768px){

    .product-page{

        padding:15px;

    }

    .product-info h1{

        font-size:28px;

    }

    .product-price{

        font-size:28px;

    }

    .product-description{

        font-size:16px;

    }

    #main-image{

        max-height:55vh;

    }

    .gallery-arrow{

        width:42px;
        height:42px;
        font-size:22px;

    }

    .thumbnails img{

        width:70px;
        height:70px;

    }

    .share-btn{

        font-size:15px;
        padding:13px;

    }

}

@media (max-width:480px){

    .product-page{

        padding:12px;

    }

    .product-info h1{

        font-size:24px;

    }

    .product-price{

        font-size:24px;

    }

    #main-image{

        max-height:45vh;

    }

    .gallery-arrow{

        width:38px;
        height:38px;
        font-size:20px;

    }

    .thumbnails{

        gap:10px;

    }

    .thumbnails img{

        width:60px;
        height:60px;

    }

    .image-counter{

        font-size:14px;

    }

    .gallery-dots{

        gap:6px;

    }

    .dot{

        width:9px;
        height:9px;

    }

}

.action-btn{

    display:block;

    width:100%;

    margin-top:15px;

    padding:15px;

    border:none;

    border-radius:14px;

    font-size:16px;

    font-weight:600;

    cursor:pointer;

    transition:.25s;

}

.share-btn{

    background:#6A1B9A;

    color:white;

}

.share-btn:hover{

    background:#54157a;

}
