body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f4f4;
}

header {
    background: #009688;
    color: white;
    padding: 20px;
    text-align: center;
}

.categorie-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
}

.categoria-btn {
    padding: 10px 15px;
    background: #009688;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.categoria-btn:hover {
    background: #00796b;
}

.prodotti-container {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 15px;
}

.card-prodotto {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-prodotto h3 {
    margin: 0 0 5px;
}

.card-prodotto .prezzo {
    font-weight: bold;
    margin: 10px 0;
}

.card-prodotto button {
    width: 100%;
    padding: 10px;
    background: #ff9800;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

#btn-carrello {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #009688;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-size: 22px;
    cursor: pointer;
}

#badge-carrello {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff3d00;
    color: white;
    padding: 4px 8px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.popup-content {
    background: white;
    width: 90%;
    max-width: 400px;
    margin: 80px auto;
    padding: 20px;
    border-radius: 8px;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.qty-selector button {
    background: #009688;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
}

#popup-note {
    width: 100%;
    height: 70px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    resize: none;
}

.agg-item {
    margin: 5px 0;
}

.btn-qty {
    background: #009688;
    color: white;
    border: none;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
}

.btn-qty:hover {
    background: #00796b;
}

/* Animazione vola nel carrello */
.fly-item {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ff9800;
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    animation: flyToCart 0.8s ease forwards;
}

@keyframes flyToCart {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; }
}

/* Pulsanti principali (popup e carrello) */
.btn-invia {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    border: none;
    color: white;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 16px;
    cursor: pointer;
}

.btn-invia:hover {
    background: #43a047;
}

.btn-chiudi {
    width: 100%;
    padding: 12px;
    background: #f44336;
    border: none;
    color: white;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 16px;
    cursor: pointer;
}

.btn-chiudi:hover {
    background: #d32f2f;
}

button {
    font-family: inherit;
    border: none;
    outline: none;
}