/* STILI BASE PER TUTTI I DISPOSITIVI */
body {
    font-family: inter;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: rgba(200, 200, 200, 0.5);
    line-height: 1.6;
}

a {
    text-decoration: none;
}

/* Barra di navigazione */
.menu-bar {
    display: flex;
    justify-content: center;
    background-color: #00FF00;
    padding: 15px 0;
    border-radius: 30px;
    margin: 20px auto;
    max-width: 90%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.menu-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.menu-bar li {
    padding: 10px 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 25px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.menu-bar li:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.menu-bar a {
    color: black;
    font-size: 24px;
    font-weight: bold;
    white-space: nowrap;
    text-align: center;
    transition: color 0.3s ease;
    text-decoration: none;
}

/* Slider immagini */
#slider {
    width: 80%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 10px auto;
}

#img_slider {
    width: 50%;
    height: 100%;
}

#img_slider img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    display: none;
    margin: 10px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

#img_slider img:nth-child(1) {
    display: block;
}

#slider button {
    padding: 2%;
    font-size: 15px;
    border: none;
    background: #00FF00;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.1s ease-in-out;
    margin: 0px;
}

#slider button:hover {
    transform: scale(1.05);
}

#slider button:active {
    transform: scale(0.95);
}

/* Tabelle */
.info-table {
    width: 80%;
    max-width: 80%;
    margin: 20px auto;
    border-collapse: separate;
    font-size: 20px;
    border: 2px solid #00FF00;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7), 0 0 20px rgba(76, 175, 80, 0.5);
    background-color: rgba(255, 255, 255, 0.9);
}

.info-table th {
    padding: 15px;
    border: 1px solid #00FF00;
    background-color: #00FF00;
    color: black;
    text-align: left;
    font-weight: bold;
}

.info-table td {
    padding: 15px;
    border: 1px solid #00FF00;
    text-align: left;
    background-color: rgba(242, 242, 242, 0.9);
    transition: background 0.3s ease;
}

.info-table tr:hover td {
    background-color: rgba(224, 224, 224, 0.9);
}

/* Calendario - Versione Desktop */
.calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.8);
    margin: 20px auto;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    box-sizing: border-box;
}

.calendar h2 {
    margin: 0;
    padding-bottom: 15px;
    color: black;
    font-size: 30px;
    font-weight: bold;
}

.cal, .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    text-align: center;
}

.cal {
    font-weight: bold;
    color: black;
    padding-bottom: 10px;
    gap: 10px;
}

.days {
    gap: 10px;
    padding-top: 10px;
}

.day {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ddd;
    border-radius: 5px;
    position: relative;
}

.day .date {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 2px;
}

.day .price {
    font-size: 12px;
    color: black;
    position: absolute;
    bottom: 5px;
}

/* Stili comuni per il calendario */
.day.selected {
    background-color: #00FF00;
    color: black;
}

.day.delivery {
    background-color: orange;
    color: black;
}

.day.unavailable {
    background: red;
    color: black;
}

.day:hover:not(.unavailable) {
    background: #00FF00;
    color: black;
    cursor: pointer;
}

.nav-buttons {
    display: flex;
    margin-bottom: 10px;
}

.nav-buttons button {
    padding: 10px 20px;
    border: none;
    background: #00FF00;
    color: black;
    cursor: pointer;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    margin: 0 10px;
}

.nav-buttons button:hover {
    background: #45a049;
    transform: scale(1.05);
}

.nav-buttons button:active {
    transform: scale(0.95);
}

/* Container calendario e prodotti */
.calendar-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 80%;
    max-width: 1200px;
    margin: 10px auto;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
    font-size: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #333;
}

.legend-color.red {
    background-color: red;
}

.legend-color.orange {
    background-color: orange;
}

.legend-color.green {
    background-color: #00FF00;
}

/* Tabella prodotti */
.product-table {
    width: 80%;
    max-width: 800px;
    margin: 20px auto;
    border-collapse: separate;
    font-size: 20px;
    border: 2px solid #00FF00;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.7), 0 0 20px rgba(76, 175, 80, 0.5);
    background-color: rgba(255, 255, 255, 0.9);
}

.product-table th {
    padding: 15px;
    border: 1px solid #00FF00;
    background-color: #00FF00;
    color: black;
    text-align: center;
    font-weight: bold;
}

.product-table td {
    padding: 15px;
    border: 1px solid #00FF00;
    text-align: center;
    background-color: rgba(242, 242, 242, 0.9);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-table tr:hover td {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.quote-button {
    width: 100%;
    background-color: #00FF00;
    color: black;
    font-size: 18px;
    padding: 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: background 0.3s ease;
}

.quote-button a {
    color: black;
}

.quote-button:hover {
    background-color: #45a049;
}

#total-final {
    font-weight: bold;
    color: black;
}

/* Icona info */
.info-icon {
    cursor: pointer;
    font-size: 18px;
    color: blue;
    margin-left: 5px;
}

/* Popup */
.popup {
    display: none;
    position: absolute;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    width: 300px;
    text-align: left;
    z-index: 1000;
    border: 2px solid #00FF00;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    background: linear-gradient(135deg, #ffffff, #f2fff2);
}

.popup.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.popup-content {
    position: relative;
}

.close {
    position: absolute;
    top: -25px;
    right: 10px;
    font-size: 22px;
    font-weight: bold;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.close:hover {
    transform: scale(1.2);
    color: #ff0000;
}

/* Pulsanti quantità */
.quantity-button {
    padding: 5px 10px;
    border: none;
    background: #00FF00;
    color: black;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.1s ease-in-out;
}

.quantity-button:hover {
    transform: scale(1.05);
}

.quantity-button:active {
    transform: scale(0.95);
}

/* Messaggio Box */
.info-box {
    background-color: rgba(255, 255, 255, 0.9);
    flex-direction: column;
    padding: 25px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    font-size: 1.5vw;
    margin: 20px auto;
	margin-bottom: 50px;
    align-items: center;
    width: 80%;
    box-sizing: border-box;
    display: flex;
    transform: translateY(30px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.info-box.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.contact-button {
    padding: 15px 25px;
    background-color: #00FF00;
    font-size: 15px;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 25px;
    transition: background 0.3s ease, transform 0.2s ease;
    animation: pulse 2s infinite;
}

.contact-button:hover {
    background-color: #45a049;
    transform: translateY(-3px);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Footer */
.footer {
    background-color: #333;
    color: white;
    padding: 40px 0;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    gap: 40px;
}

.footer-info, .footer-logo, .footer-orari {
    flex: 1;
    text-align: center;
    padding: 10px;
}

.footer-info {
    text-align: left;
}

.footer-orari {
    text-align: right;
}

.footer-logo img {
    max-width: 180px;
    height: auto;
}

.orari {
    width: 100%;
    border-collapse: collapse;
}

.orari th, .orari td {
    border: 1px solid white;
    padding: 8px;
    text-align: center;
}

.orari th {
    background-color: #444;
}

/* Per tablet e smartphone grandi (fino a 1024px) */
@media (max-width: 1024px) {
    .header {
        background-attachment: scroll;
    }
	
	.menu-bar a {
        font-size: 20px;
        white-space: nowrap;
        text-align: center;
    }

    .menu-bar ul {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        justify-content: center;
        align-items: center;
    }

    .menu-bar li {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .calendar-container {
        flex-direction: column;
        align-items: center;
    }
	
	.day {
        width: 40px;  /* Leggermente più largo */
        height: 44px;
        padding: 6px;
    }
    
    .product-table {
        width: 90%;
    }
	
	.info-box {
        font-size: 20px;
        width: 95%;
    }
	
	.popup {
        width: 280px;
        font-size: 15px;
        padding: 18px;
    }

    .close {
        font-size: 20px;
        top: 8px;
        right: 8px;
    }
}

/* Per smartphone (fino a 720px) */
@media (max-width: 720px) {
    .header {
        padding: 40px 10px;
        font-size: 32px;
    }

    .menu-bar {
        flex-direction: column;
        padding: 10px 0;
    }

    .menu-bar ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .menu-bar li {
        padding: 8px 15px;
    }

    .menu-bar a {
        font-size: 18px;
    }

    /* Calendario - Versione Mobile */
    .calendar {
        width: 95%;
        padding: 15px;
    }

    .cal, .days {
        gap: 5px;
    }

    .day {
        width: 40px;  /* Leggermente più largo */
        height: 44px;
        padding: 2px;
    }

    .day .date {
        font-size: 14px;
        margin-bottom: 0;  /* Riduci spazio tra data e prezzo */
        line-height: 1.2;
    }

    .day .price {
        font-size: 9px;
        bottom: 3px;  /* Posizione più alta */
        line-height: 1;
        padding-top: 2px;  /* Aggiungi spazio sopra il prezzo */
        border-top: 1px solid rgba(0,0,0,0.1);  /* Linea di separazione */
        width: 80%;  /* Non occupa tutta la larghezza */
    }

    /* Slider e tabelle */
    #slider {
        width: 100%;
        padding: 10px 0;
        position: relative;
    }

    #img_slider {
        width: 85%;
		margin: 0 auto;
    }
	
	#slider button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        padding: 15px 10px;
        font-size: 20px;
        background: rgba(76, 175, 80, 0.8);
        z-index: 10;
        min-width: 44px;  /* Dimensione minima per touch */
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
	
	#slider button:first-child {
        left: 5px;
    }

    #slider button:last-child {
        right: 5px;
    }

    #slider button:hover {
        background: rgba(76, 175, 80, 1);
        transform: translateY(-50%) scale(1.1);
    }

    .info-table, .product-table {
        width: 95%;
        font-size: 16px;
    }
	
	.info-box {
        font-size: 24px;
        width: 95%;
    }
	
	.popup {
        width: 280px;
        max-width: 90vw;
        left: 5% !important; /* forza margine laterale su piccoli schermi */
        font-size: 14px;
        padding: 16px;
    }

    .close {
        font-size: 18px;
        top: 6px;
        right: 6px;
    }

    /* Footer */
    .footer-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
    }

    .footer-info, .footer-orari {
        text-align: center;
    }
}

/* Per smartphone piccoli (fino a 480px) */
@media (max-width: 480px) {
    .header {
        font-size: 28px;
        padding: 30px 10px;
    }

    .menu-bar {
        flex-direction: column;
        align-items: center;
    }

    .menu-bar ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        justify-content: center;
        align-items: center;
    }

    .menu-bar li {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 8px 15px;
        text-align: center;
    }

    .menu-bar a {
        font-size: 16px;
        white-space: nowrap;
        text-align: center;
    }

    /* Calendario - Versione Mobile Piccola */
    .calendar {
        width: 100%;
        padding: 6px 2px;
    }
	
	.calendar h2 {
		margin: 0;
		padding-bottom: 15px;
		color: black;
		font-size: 20px;
		font-weight: bold;
	}

    .cal, .days {
        display: grid;
		font-size: 13px;
        grid-template-columns: repeat(7, minmax(0, 1fr)); /* Ogni colonna uguale */
        gap: 2px;
        justify-items: center; /* Centra i contenuti */
    }

    .day {
        width: 28px;   /* Celle più piccole */
        height: 36px;
        padding: 2px;
        font-size: 13px;
    }

    .day .date {
        font-size: 11px;
        line-height: 1.1;
    }

    .day .price {
        font-size: 7px;
        line-height: 1;
        width: 90%;   /* Prende quasi tutta la cella */
        margin-top: 1px;
        border-top: 1px solid rgba(0,0,0,0.1);
    }
	
	.calendar-legend {
		display: flex;
		justify-content: center;
		gap: 20px;
		margin-top: 10px;
		flex-wrap: wrap;
		font-size: 12px;
	}
	
	.legend-color {
		width: 8px;
		height: 8px;
		border-radius: 2px;
		display: inline-block;
		border: 1px solid #333;
	}

    /* Slider */
    #slider {
        flex-direction: column;
    }

    #img_slider {
        width: 100%;
        order: -1;
    }
	
	#slider button {
        padding: 10px 8px;
        font-size: 18px;
        min-width: 36px;
        min-height: 36px;
    }

    /* Info box */
    .info-box {
        font-size: 16px;
        width: 95%;
    }
	
	.popup {
        width: 260px;
        max-width: 90vw;
        left: 2.5% !important;
        padding: 14px;
        font-size: 13px;
        border-radius: 12px;
    }

    .close {
        font-size: 16px;
        top: 5px;
        right: 5px;
    }

    .contact-button {
        font-size: 14px;
        padding: 10px 20px;
    }
}

