/* assets/css/style.css */

/* Tipografia di base */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding-top: 70px; /* Compensa la navbar fixed-top */
}

/* HERO */
.hero-section {
    background: radial-gradient(circle at top left, #0d6efd 0, #6610f2 40%, #111 100%);
    color: #fff;
}

.hero-section .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
}

/* Card prodotti – immagine principale */
.product-card .card-img-top {
    display: block;
    width: 100%;
    border-radius: .5rem .5rem 0 0; /* opzionale se vuoi seguire la card */
}

/* Contenitore main image */
.product-gallery-main {
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* L'immagine dentro il contenitore: stessa altezza per tutte, senza crop */
.product-gallery-main img {
    width: 100%;
    height: 220px;      /* regola qui l'altezza globale delle macchine */
    object-fit: contain;
}


/* --- SLIDER APPLICAZIONI --- */

.app-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.app-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0;
}

.app-slider::-webkit-scrollbar {
    height: 6px;
}

.app-slider::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
}

.app-slide {
    flex: 0 0 auto;
    width: 180px;
    scroll-snap-align: start;
}

@media (min-width: 576px) {
    .app-slide {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .app-slide {
        width: 230px;
    }
}

.app-slide-btn {
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    display: block;
    width: 100%;
}

.app-slide img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-slide img:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
}

/* Pulsanti frecce slider applicazioni */
.app-slider-btn {
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.app-slider-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.app-slider-btn:active {
    transform: translateY(0);
}

/* --- LIGHTBOX APPLICAZIONI --- */

.app-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.app-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.6);
}

.app-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    filter: invert(1);
}

.app-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.app-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.app-lightbox-prev {
    left: -50px;
}

.app-lightbox-next {
    right: -50px;
}

@media (max-width: 767.98px) {
    .app-lightbox-prev {
        left: 10px;
    }

    .app-lightbox-next {
        right: 10px;
    }

    .app-lightbox-close {
        top: -45px;
        right: -5px;
    }
}

/* TAG APPLICAZIONI */

.app-tags {
    line-height: 2.2;
}

.app-tag {
    background: #f0f0f0;
    color: #333;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    margin: 0.15rem;
    border: 1px solid #e0e0e0;
    transition: background 0.15s ease, transform 0.15s ease;
    cursor: default;
}

.app-tag:hover {
    background: #e2e2e2;
    transform: translateY(-2px);
}

/* --- VIDEO GALLERY SLIDER --- */

.video-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.video-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0;
}

.video-slider::-webkit-scrollbar {
    height: 6px;
}

.video-slider::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.2);
}

.video-slide {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .video-slide {
        width: 260px;
    }
}

.video-thumb {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.video-thumb-inner {
    position: relative;
    border-radius: 0.6rem;
    overflow: hidden;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.video-thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.video-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.6rem 0.7rem;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 0.8rem;
}

.video-thumb-title {
    margin-bottom: 0.25rem;
}

.video-thumb-play {
    align-self: flex-start;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 999px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.video-thumb-play i {
    font-size: 1.1rem;
}

/* Hover stato thumb video */
.video-thumb:hover img {
    transform: scale(1.05);
}

.video-thumb:hover .video-thumb-overlay {
    opacity: 1;
}

/* Pulsanti frecce slider video */
.video-slider-btn {
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.video-slider-btn:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.video-slider-btn:active {
    transform: translateY(0);
}

/* --- LIGHTBOX VIDEO --- */

.video-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.video-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 90%;
}

.video-lightbox iframe {
    width: 100%;
    height: 500px;
    border: none;
    border-radius: 0.5rem;
}

@media (max-width: 767.98px) {
    .video-lightbox iframe {
        height: 250px;
    }
}

.video-lightbox-close {
    position: absolute;
    top: -45px;
    right: -10px;
    filter: invert(1);
}

/* Thumbs */
.product-gallery-thumbs {
    /* già flex da Bootstrap (d-flex, gap-2), qui puoi aggiungere se vuoi */
}

.product-thumb {
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 0.35rem;
    overflow: hidden;
    opacity: 0.7;
    transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.product-thumb img {
    display: block;
    width: 64px;
    height: 48px;
    object-fit: cover;
}

.product-thumb:hover,
.product-thumb.active {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

