:root {
    --primary: #2d6a4f;
    --secondary: #95d5b2;
    --light: #f8f9fa;
    --dark: #1b4332;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light);
    margin: 0;
    padding-bottom: 160px; 
}

header {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 5px;
}

.container {
    max-width: 800px;
    margin: auto;
    padding: 1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 1.2rem;
    margin: 5px 0;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.price {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.controls span {
    font-size: 1.3rem;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.btn-qty {
    background: var(--secondary);
    border: none;
    border-radius: 50%;
    width: 46px;
    height: 46px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px 0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 1000;
}

#total-display {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
}

.btn-send {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-send:active {
    transform: scale(0.95);
}


.home-sections {
    display: flex;
    flex-direction: column;
    gap: 30px; /* Spazio tra le 3 sezioni */
    margin-top: 20px;
}

.section-title {
    color: var(--dark);
    font-size: 1.4rem;
    margin-bottom: 15px;
    text-align: center;
}

.btn-secondary {
    display: block;
    width: 100%;
    max-width: 300px;
    margin: 20px auto 0 auto;
    padding: 15px 20px;
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    line-height: 1.2;
    white-space: normal;
    box-sizing: border-box;
}

.btn-secondary:active {
    background-color: var(--secondary);
    color: var(--dark);
}

.accordion {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
    margin-bottom: 15px;
}

.accordion summary {
    padding: 18px 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--dark);
    cursor: pointer;
    list-style: none; /* Nasconde la freccia di default su alcuni browser */
    position: relative;
    outline: none;
}

/* Aggiungiamo un'icona personalizzata per la freccia della tendina */
.accordion summary::after {
    content: '▼';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) scale(1.5, 0.7);
    font-size: 1.8rem;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.accordion[open] summary::after {
    transform: translateY(-50%) rotate(180deg) scale(1.5, 0.7);
}

.accordion-content {
    padding: 0 15px 20px 15px;
    color: #444;
    line-height: 1.5;
    font-size: 1.05rem;
    border-top: 1px solid #eee;
    margin-top: 5px;
    padding-top: 15px;
}

.accordion-content p {
    margin-top: 0;
    margin-bottom: 10px;
}


footer {
    text-align: center;
    padding: 20px 10px;
    margin-top: 40px;
    color: var(--dark);
    font-size: 0.9rem;
    opacity: 0.8;
}

.site-footer {
    padding: 3rem 0 1.5rem 0;
    margin-top: 3rem;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 1rem;
    color: #666;
}

.legal-info {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.legal-info strong {
    color: var(--dark);
    font-size: 1rem;
}

.footer-nav {
    margin-bottom: 2rem;
}

.footer-nav a {
    color: #666;
    text-decoration: none;
    margin: 0 10px; /* Spaziatura tra i link */
    font-size: 0.95rem;
}

.home-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: bold;
    border: 1px solid var(--primary);
    padding: 8px 25px;
    border-radius: 25px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.home-link:hover {
    background-color: var(--primary);
    color: white;
    text-decoration: none;
}

@media (hover: hover) {
    .footer-nav a:hover {
        color: var(--primary);
        text-decoration: underline;
    }
}

.footer-copyright {
    border-top: 1px solid #f0f0f0;
    padding-top: 1.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Ottimizzazione footer per dispositivi mobili */
@media (max-width: 600px) {
    .footer-nav a {
        display: block;
        margin: 15px 0;
        font-size: 1rem;
    }
    .home-link {
        margin-bottom: 20px;
        padding: 10px 30px;
    }
    .legal-info {
        font-size: 0.95rem;
        text-align: center;
    }
    .legal-detail {
        display: block;
        margin: 5px 0;
    }
    .legal-sep {
        display: none;
    }
}

/* Modal Riepilogo Ordine */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 10px;
    backdrop-filter: blur(3px);
    box-sizing: border-box;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 20px;
    width: 92%;
    max-width: 380px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.modal-content h2 {
    margin: 0 0 10px 0;
    color: var(--dark);
    font-size: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
}

.address-label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--dark);
    text-align: left;
}

.address-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    margin-bottom: 10px;
    resize: vertical;
}

.order-summary-box {
    background: #fdfdfd;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 1rem;
    color: #444;
    line-height: 1.4;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-cancel {
    background: transparent;
    border: 1px solid #ccc;
    color: #888;
    padding: 12px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
}

.modal-row {
    display: flex;
    gap: 12px;
    width: 100%;
}

.modal-row .btn-cancel {
    flex: 1;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 3000;
    display: none;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    border: 1px solid var(--secondary);
}

.cookie-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.4;
}

.cookie-banner a {
    color: var(--primary);
    text-decoration: underline;
}