/* ------------------------ BASE ------------------------ */
body{
    margin: 0;  
    background-color: #39201Eff;
    font-family: "Zalando Sans Expanded", sans-serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;   
}

/* navbar */
#navbar{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    z-index: 1;
}

#div_logo{
    display: flex;
    justify-content: center;
    align-items: center;
}

#img_logo{
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 120px;
    width: auto;      
}

#div_login{
    display: flex;
    justify-content: right;
    align-items: center;
}

#div_login:hover{
    cursor: pointer;
}

/* icona login */
#icona_login{
    color:#E2AD78ff;
    margin-right:20px;
    font-size:40px;
}

/* link arrotondati */
#div_link {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #E2AD78ff;
    border-radius: 50px;
    margin-top: 20px;
}

#div_link a {
    text-decoration: none;
    color: #E2AD78ff;
    padding: 10px 20px;   
    border-radius: 20px;    
    display: flex;          
    align-items: center;
}

#div_link a.active {
    border: 1px solid #E2AD78ff;
    color: #ffffff;
    background-color: rgba(226, 173, 120, 0.15);
}

#div_link a:hover {
    border: 1px solid #E2AD78ff;
    color: #ffffff;
}

/* footer */
footer{
    color: #E2AD78ff;
    text-align: center;
    padding: 10px 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

#link_footer_privacy{
    color: #E2AD78ff;
    text-decoration: none;
    font-size: 14px;
}
#img_logo_footer{
    height: 300px;
}

.social-links{
    color: #E2AD78ff;
    margin-top:15px; 
}

.link_social{
    color: #E2AD78ff;
    margin: 20px 15px 10px 15px; 
    font-size: 30px;
    transition: 0.3s;
}

.social-links a:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

#footer_info{
    display:flex;
    justify-content:center;
    gap: 50px;
    color:#E2AD78ff;
    font-size:14px;
    flex-wrap:wrap;
    text-align:center;
    margin-bottom: 50px;
}

/* container principale */
#container{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 150px;
    flex-direction: column;
}

#container_top{
    display: flex;
    justify-content: center;
    align-items: center;
}

#div_comeNasce{
    background-color:#E2AD78ff;
    color:#39201Eff;
    border-radius:15px;
    text-align: center;
    font-size:20px;
    height: 220px;
    width: 800px;
}

#div_comeNasce:hover{
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

#container_bottom{
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius:15px;
    flex-direction: column;
    width:100%;
    margin-top: 50px;
}

/* gallery immagini */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 100px auto 0;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    height: 400px;
    width:400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.card:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.75);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-size: 18px;
    line-height: 1.5;
}

.card:hover .overlay {
    opacity: 1;
}

/* ------------------------ TABLET ------------------------ */
@media (max-width: 1023px) { 

    /* Navbar */
    #navbar {
        flex-wrap: wrap;
        gap: 15px;
    }

    #img_logo {
        max-height: 100px;
    }

    #icona_login {
        font-size: 35px;
        margin-right: 0;
    }

    /* Contenitore prodotti */
    .prodotti-container {
        flex-direction: column; /* impila le righe di prodotti */
        gap: 40px;
    }

    .prodotto-row {
        flex-direction: column; /* immagine sopra testo */
        gap: 20px;
        width: 100%;
    }

    .prodotto-img {
        width: 400px; /* mantieni larghezza desktop */
        height: 400px; /* mantieni altezza desktop */
        object-fit: cover;
        border-radius: 15px;
    }

    .prodotto-info {
        width: 100%; /* testo sotto l’immagine */
        max-width: 400px;
        text-align: center;
        padding: 20px;
        margin-top: 10px;
    }

    /* Card caratteristiche */
    .cards {
        flex-wrap: wrap; /* permetti alle card di andare a capo */
        justify-content: center;
        gap: 20px;
    }

    .card {
        flex-direction: column;
        width: 400px;
        margin-bottom: 200px;
        overflow: visible; /* importante! */
    }

    .card img {
        width: 400px;
        height: 400px;
        object-fit: cover;
        border-radius: 15px;
    }

    /* Overlay sempre visibile sotto l’immagine */
    .card .overlay {
        position: relative;
        opacity: 1 !important;
        background: rgba(0,0,0,0.6); /* sfondo semi-trasparente leggero */
        color: #fff;
        padding: 15px;
        text-align: center;
        margin-top: 5px; /* sotto immagine */
        height: auto;
        display: block;
        font-size: 16px;
        line-height: 1.5;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* Sezione sostenibilità */
    .sostenibilita-box {
        flex-direction: column; /* immagine sopra testo */
        align-items: center;
        text-align: center;
    }

    .sostenibilita-img, .sostenibilita-text {
        width: 90%;
        max-width: 500px;
    }

    .sostenibilita-text {
        padding: 20px;
    }

    /* Pulsante listino prezzi */
    #button_listinoPrezzi {
        font-size: 18px;
        padding: 12px 25px;
    }

}



/* ------------------------ TELEFONO ------------------------ */
@media (max-width: 767px) {

    body {
        overflow-x: hidden;
    }

    #navbar{
        flex-direction: column;
        gap: 15px;
    }

    #img_logo{
        max-height: 80px;
    }

    #icona_login{
        font-size: 30px;
        margin-right: 0;
    }

    #div_link{
        flex-wrap: wrap;
        padding: 5px;
    }

    #div_link a{
        padding: 8px 12px;
        font-size: 13px;
    }

    #container,
    #container_top,
    #container_bottom {
        width: 100%;
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
        box-sizing: border-box;
    }

    #div_comeNasce {
        width: 95%;
        height: auto;
        font-size: 16px;
        padding: 15px;
    }

    .gallery {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 50px auto 0;
    }

    .card {
        width: 100%;
        height: auto;
        margin-bottom: 15px; /* ridotta da 20-30px a 1 */
    }

    .card img {
        height: auto;
    }

    /* Overlay testo sempre visibile su mobile */
    .overlay {
        opacity: 1 !important;
        position: relative;
        background: rgba(0,0,0,0.7);
        color: #fff;
        height: auto;
        padding: 15px;
        text-align: center;
        font-size: 14px;
        line-height: 1.4;
    }

    footer {
        flex-direction: column;
        gap: 20px;
    }

    #img_logo_footer {
        height: 180px;
    }

    #footer_info {
        font-size: 12px;
        gap: 15px;
    }
}
