* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    overflow-x: hidden;
    background: #000;
}

.hero-carousel {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.backgrounds {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ridotto da 1.2s a 0.5s per sincronizzare con le slide */
    transition: clip-path 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* STATI DEI BACKGROUND */
.bg.previous {
    clip-path: circle(0% at 50% 50%);
    z-index: 1;
}

.bg.current {
    clip-path: circle(150% at 50% 50%);
    z-index: 2;
}

.bg.next {
    clip-path: circle(0% at 50% 50%);
    z-index: 3;
}

/* CONTENUTO */
.carousel-container {
    position: relative;
    height: 100%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.slide {
    position: relative;
    min-width: 100%;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 1;
    padding: 2rem;
    flex-shrink: 0;
    overflow: hidden;
}

.slide::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    top: -25%;
    left: -25%;
    z-index: 4;
    pointer-events: none;
    font-size: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5rem, 1fr));
    grid-auto-rows: 5rem;
    align-items: center;
    justify-items: center;
    gap: 0;
    padding: 2rem;
    opacity: 0.25;
    animation: diagonalScroll 30s linear infinite;
    overflow: hidden;
}

.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}


.product-title {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    z-index: 15;
    margin: 0;
    padding: 0 2rem;
}

.product-title.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 
        3px 3px 0 rgba(0,0,0,0.3),
        6px 6px 12px rgba(0,0,0,0.5),
        -1px -1px 2px rgba(255,255,255,0.1);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    word-spacing: 0.1em;
    text-align: center;
    animation: titleFadeIn 0.8s ease-out;
}

.product-image{
    width: 70%;
    height: auto;
    object-fit: contain;
    max-height: 80vh;
    margin-bottom: 2rem;
    filter: drop-shadow(0 50px 100px rgb(0, 0, 0));
    aspect-ratio: 1 / 1;
    position: relative;
    z-index: 11;
}

/* Container per i due bottoni affiancati */
.menu-buttons {
    position: absolute;
    z-index: 14;
    bottom: 20%;
    display: flex;
    gap: 15px;
    align-items: center;
}

.menu-btn {
    display: inline-block;
    padding: 14px 35px;
    background: #E65100;
    color: white;
    border: 3px solid #000000;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease-out;
    box-shadow:
        5px 5px 0 0 #000000,
        0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translate(0, 0);
    font-size: 1.7em;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.menu-btn:hover {
    background: #FF7043;
    transform: translateY(-2px);
    text-decoration: none;
}

.menu-btn:active {
    transform: translate(3px, 3px);
}

/* Bottone Deliveroo con colori brand */
.menu-btn.deliveroo {
    background: #00CCBC;
    border-color: #000000;
    box-shadow: 5px 5px 0 0 #000000, 0 10px 20px rgba(0, 204, 188, 0.3);
}

.menu-btn.deliveroo:hover {
    background: #00B3A5;
    box-shadow: 5px 5px 0 0 #000000, 0 12px 24px rgba(0, 204, 188, 0.4);
}

@media (max-width: 768px) {
    .menu-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .menu-btn {
        padding: 14px 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .menu-buttons {
        bottom: 18%;
        gap: 10px;
    }
    
    .menu-btn {
        padding: 16px 45px;
        font-size: 1.15rem;
        min-width: 200px;
    }
}

.slide:nth-child(1) .product-image,
.slide:nth-child(3) .product-image {
    width: 85%;
    max-height: 90vh;
}

.slide.active .product-image {
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, floatingRotate 8s ease-in-out 0.8s infinite;
}

/* CONTROLLI */
.controls {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 20;
}

.nav-btn {
    padding: 12px 20px;
    background: #E65100;
    color: white;
    border: 3px solid #000000;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s ease-out;
    box-shadow:
        5px 5px 0 0 #000000,
        0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translate(0, 0);
    font-size: 1.1em;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: #FF7043;
    transform: translateY(-2px);
}

.nav-btn:active {
    transform: translate(3px, 3px);
}

.dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 20;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    /* Transizione più rapida per i dots */
    transition: all 0.2s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotateZ(-15deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotateZ(5deg);
    }
    70% {
        transform: scale(0.95) rotateZ(-3deg);
    }
    100% {
        transform: scale(1) rotateZ(0deg);
    }
}

@keyframes floatingRotate {
    0% {
        transform: rotateZ(0deg);
    }
    25% {
        transform: rotateZ(2deg);
    }
    50% {
        transform: rotateZ(0deg);
    }
    75% {
        transform: rotateZ(-2deg);
    }
    100% {
        transform: rotateZ(0deg);
    }
}

@keyframes titleFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes diagonalScroll {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-50%) translateY(-50%);
    }
}

.slide.wave::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url('../images/ico/waves.svg');
    background-repeat: repeat;
    background-size: 160px 160px;
    opacity: 0.18;
    animation: waveDrift 14s linear infinite;
}

@keyframes waveDrift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 200px -200px;
    }
}

.hero-title .title-c {
    color: #FF4E1F;
    font-weight: 900;
}

.hero-title .title-b {
    color: #0E6EB8;
    font-weight: 900;
}

@media (max-width: 1024px) {
    .product-image {
        width: 95%;
        max-height: 95vh;
    }

    .slide:nth-child(1) .product-image,
    .slide:nth-child(3) .product-image {
        width: 95%;
        max-height: 95vh;
    }
}

@media (max-width: 768px) {
    .product-image {
        width: 100%;
        max-height: 100vh;
    }

    .slide:nth-child(1) .product-image,
    .slide:nth-child(3) .product-image {
        width: 100%;
        max-height: 100vh;
    }
}

@media (max-width: 480px) {
    .product-image {
        width: 100%;
        max-height: 100vh;
    }

    .slide:nth-child(1) .product-image,
    .slide:nth-child(3) .product-image {
        width: 100%;
        max-height: 100vh;
    }
}