/* PALETTE COLORI:
   Giallo Energico: #FFD700
   Rosso Vivace: #E63946
   Nero Industriale: #1D3557
   Bianco Pulito: #F1FAEE
*/

@import url('https://fonts.googleapis.com/css2?family=Bangers&family=Montserrat:wght@400;700;900&display=swap');

:root {
    --primary-color: #FFD700;
    --secondary-color: #E63946;
    --dark-color: #1D3557;
    --light-color: #F1FAEE;
    --font-display: 'Bangers', cursive;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.4;
}

h1, h2, h3 {
    font-family: var(--font-display);
    letter-spacing: 2px;
}

/* HEADER */
header {
    background-color: var(--dark-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid var(--primary-color);
}

.whatsapp-link {
    background: white;
    color: #25D366;
    padding: 8px 15px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    box-shadow: 3px 3px 0px var(--secondary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-link:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0px var(--secondary-color);
}

.whatsapp-link img {
    width: 24px;
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .logo-container {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    .whatsapp-link {
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-img {
    height: 100px;
    width: 100px;
    object-fit: contain;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    background: white;
    box-shadow: 5px 5px 0px var(--secondary-color);
}

.logo-text-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--primary-color);
    text-shadow: 3px 3px var(--secondary-color);
    line-height: 1;
}

/* HERO / MENU DEL GIORNO */
.hero-menu {
    background-color: var(--primary-color);
    padding: 2rem 5%;
    text-align: center;
}

.hero-menu h1 {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.daily-menu-container {
    background: white;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 15px;
    border: 4px dashed var(--dark-color);
    box-shadow: 10px 10px 0px var(--secondary-color);
}

.menu-section {
    margin-bottom: 2.5rem;
    text-align: left;
}

.menu-section h3 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-display);
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
    padding-right: 1rem;
}

.menu-item {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.menu-items-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.menu-item-row {
    display: flex;
    gap: 1rem;
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid #eee;
    align-items: center;
    text-align: left;
    transition: all 0.2s ease;
}

.menu-item-row:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

@media (max-width: 480px) {
    .menu-item-row {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    .menu-item-header {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
}

.menu-item-info {
    flex: 1;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.3rem;
}

.menu-item-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.menu-item-price {
    font-weight: 900;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* TABS / NAVIGATION */
.nav-tabs {
    display: flex;
    justify-content: center;
    background: var(--dark-color);
    padding: 0.5rem;
}

.tab-btn {
    background: none;
    border: none;
    color: white;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
}

/* SETTIMANA */
.weekly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem 5%;
}

.day-card {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid var(--dark-color);
}

.day-card h4 {
    color: var(--secondary-color);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

/* ORDER FORM */
.order-section {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 5%;
    text-align: center;
}

.order-form {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    color: var(--dark-color);
    text-align: left;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--dark-color);
    border-radius: 5px;
}

.btn-order {
    width: 100%;
    background: var(--primary-color);
    color: var(--dark-color);
    font-family: var(--font-display);
    font-size: 1.8rem;
    padding: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    box-shadow: 0 5px 0 #b89b00;
}

.btn-order:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #b89b00;
}

/* FOOTER */
footer {
    background: var(--dark-color);
    color: white;
    padding: 2rem;
    text-align: center;
}

footer a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

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

/* MODAL CONFERMA */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border-top: 8px solid var(--primary-color);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--dark-color);
    margin: 1rem 0;
}

.modal-icon {
    font-size: 4rem;
}

.modal-body {
    text-align: left;
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
    margin: 1.5rem 0;
}

.summary-item {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.hidden { display: none !important; }

/* ADMIN TABLE STYLES */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.9rem;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.admin-table th {
    background-color: #f8f9fa;
    color: var(--dark-color);
    text-transform: uppercase;
    font-weight: bold;
}

.admin-table tr:hover {
    background-color: #f1f1f1;
}

.admin-phone-link {
    background-color: var(--secondary-color);
    color: white !important;
    font-weight: bold;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    transition: 0.2s;
    display: inline-block;
}

.admin-phone-link:hover {
    background-color: var(--dark-color);
    transform: scale(1.05);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
}

.badge.tavolo {
    background-color: #1D3557; /* Blu Industriale */
}

/* ADMIN BUTTONS */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    font-family: var(--font-body);
    display: inline-block;
    text-align: center;
}

.btn-save {
    background-color: #2d5a27; /* Verde scuro */
    color: white !important;
}

.btn-save:hover {
    background-color: #1e3d1a;
}

.btn-delete {
    background-color: var(--secondary-color);
    color: white !important;
}

.btn-delete:hover {
    background-color: #b32d38;
}

.btn-add-item {
    background-color: var(--dark-color);
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color);
}

.btn-add-item:hover {
    background-color: var(--primary-color);
    color: var(--dark-color) !important;
}

/* ADMIN PANEL STYLES */
.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.admin-header {
    background: var(--dark-color);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    margin-top: 2rem;
    border-left: 5px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.admin-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-section-card {
    background: #f9f9f9;
    border: 3px solid #ff0000 !important; /* Spesso e rosso */
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 10px;
    position: relative;
    display: block !important;
}

.admin-items-container {
    border: 3px solid #0000ff !important; /* Spesso e blu */
    padding: 1rem;
    margin: 1.5rem 0;
    background: #fff;
    border-radius: 8px;
    display: block !important;
    min-height: 50px;
}

.admin-item-card {
    margin-bottom: 0 !important;
    padding: 1.5rem 0 !important;
    background: white !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 3px solid #800080 !important; /* Spesso e viola */
    position: relative;
    display: block !important;
}

.admin-item-card:last-child {
    border-bottom: none !important;
    border-radius: 0 0 8px 8px !important;
}

.admin-item-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: 10px;
}

.admin-day-group {
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    padding: 1rem;
    background: white;
    border-radius: 8px;
}

.admin-flex-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-flex-group.no-stack {
    flex-direction: row !important;
    align-items: center !important;
}

/* RESPONSIVE ADMIN */
@media (max-width: 768px) {
    .admin-item-grid {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .admin-section-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
        border: 3px solid #ff0000 !important;
    }
    
    .admin-items-container {
        border: 3px solid #0000ff !important;
        padding: 0.5rem;
        margin: 1rem 0;
    }
    
    .admin-item-card {
        padding: 1rem 0 !important;
        margin-bottom: 0 !important;
        border-bottom: 3px solid #800080 !important;
    }
    
    .admin-item-card:last-child {
        border-bottom: none !important;
    }
    
    .admin-item-card .btn-delete {
        width: auto !important;
        margin-bottom: 0;
    }

    .admin-container {
        margin: 1rem auto;
        padding: 0 10px;
    }
    
    header nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }
    
    .admin-header {
        padding: 0.8rem 1rem;
        margin-top: 1rem;
    }
    
    .admin-header h2 {
        font-size: 1.1rem;
    }
    
    .admin-form {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .admin-table th, .admin-table td {
        padding: 6px;
        font-size: 0.75rem;
    }
    
    .order-controls {
        flex-direction: column;
    }
    
    .order-controls .btn {
        width: 100%;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .admin-flex-group:not(.no-stack) {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .admin-flex-group:not(.no-stack) .btn {
        width: 100%;
    }
    
    .admin-flex-group input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
}

/* COOKIE BANNER */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark-color);
    color: white;
    padding: 1.5rem;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2);
    transition: transform 0.5s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-content {
    max-width: 800px;
    font-size: 0.9rem;
    line-height: 1.4;
}

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

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    font-size: 0.8rem;
    transition: opacity 0.2s;
}

.btn-accept {
    background: var(--primary-color);
    color: var(--dark-color);
}

.btn-reject {
    background: transparent;
    color: white;
    border: 1px solid white;
}

.btn-cookie:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .cookie-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* PRINT STYLES */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    header, footer, .admin-header, .admin-form, .no-print, .nav-tabs, .btn-save, .btn-delete, .order-controls {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
    .admin-container {
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }
    .order-day-group {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        margin-top: 1rem !important;
        page-break-inside: avoid;
    }
    .admin-table th {
        background: #eee !important;
        color: black !important;
    }
    .badge {
        border: 1px solid #000 !important;
        color: black !important;
        background: transparent !important;
    }
}
