/* Reset & Base */
:root {
    --primary: #c59d5f; /* Oro Ristorante */
    --primary-dark: #a07d45;
    --dark: #222;
    --light: #f4f4f4;
    --white: #fff;
    --gray: #888;
    --border: #e0e0e0;
    --shadow: 0 5px 15px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; color: var(--dark); line-height: 1.6; }
h1, h2, h3, .restaurant-name { font-family: 'Playfair Display', serif; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* Utility */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.btn-primary { 
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    background: var(--primary); color: var(--white); 
    padding: 12px 30px; border-radius: 50px; font-weight: bold; transition: 0.3s; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-large { font-size: 1.1rem; padding: 15px 40px; margin-top: 1.5rem; width: 100%; max-width: 350px; text-align: center; }
.pulsante-interattivo { margin-top: 20px; }
.small-note { font-size: 0.85rem; opacity: 0.8; margin-top: 10px; display: block; }

.btn-block { width: 100%; padding: 15px; font-size: 1.1rem; }

/* Pulsanti Navigazione Demo */
.back-link { font-size: 0.9rem; color: #ccc; }
.design-switcher {
    position: fixed; bottom: 20px; left: 20px; z-index: 2000;
    background: #222; padding: 5px; border-radius: 30px; display: flex; gap: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); border: 1px solid #444;
}
.design-switcher a { color: #fff; padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; }
.design-switcher a.active { background: var(--primary); font-weight: bold; }

/* --- STILI LANDING PAGE (index.php) --- */
.landing-body { background-color: var(--light); }
.navbar { background: var(--dark); color: var(--white); padding: 1rem 0; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: bold; color: var(--primary); }

.hero { 
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?q=80&w=2070&auto=format&fit=crop');
    background-size: cover; background-position: center; background-attachment: fixed;
    color: var(--white); text-align: center; padding: 6rem 1rem;
}
.hero h1 { font-size: 3rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }

.section { padding: 4rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 4rem; }
.menu-card { background: var(--white); padding: 2rem; border-radius: 8px; box-shadow: var(--shadow); }
.menu-card h3 { color: var(--primary-dark); border-bottom: 2px solid var(--primary); padding-bottom: 0.5rem; margin-bottom: 1.5rem; }
.menu-list li { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; border-bottom: 1px dashed #eee; padding-bottom: 0.5rem; }
.menu-list li.total-price { border-top: 1px solid var(--border); border-bottom: none; padding-top: 1rem; font-size: 1.1rem; margin-top: 1rem; }

/* Box CTA Interattiva */
.interactive-cta-box {
    background: var(--dark); color: var(--white); border-radius: 15px; overflow: hidden;
    display: flex; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.cta-content { padding: 3rem; flex: 1; }
.cta-content h3 { font-size: 2rem; color: var(--primary); margin-bottom: 1rem; }
.cta-image { flex: 1; height: 100%; min-height: 300px; }
.cta-image img { width: 100%; height: 100%; object-fit: cover; }
.glow-effect { animation: pulse 2s infinite; }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(197, 157, 95, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(197, 157, 95, 0); }
    100% { box-shadow: 0 0 0 0 rgba(197, 157, 95, 0); }
}
footer { background: #fff; padding: 20px 0; text-align: center; border-top: 1px solid #eee; margin-top: 40px; }

@media (max-width: 768px) {
    .interactive-cta-box { flex-direction: column; }
    .hero h1 { font-size: 2.2rem; }
}

/* --- STILI APP INTERATTIVA (app.php) --- */
.app-body { background-color: #f9f9f9; padding-top: 130px; padding-bottom: 80px; }

.app-header {
    position: fixed; top: 0; left: 0; width: 100%; background: var(--white);
    z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header-top { 
    display: flex; justify-content: space-between; align-items: center; padding: 15px 20px;
    background: var(--dark); color: var(--white);
}
.restaurant-name { font-size: 1.1rem; }
.back-btn { font-size: 0.9rem; color: #ccc; }
.table-info { font-size: 0.8rem; background: rgba(255,255,255,0.2); padding: 4px 8px; border-radius: 4px; }

.categories-scroll {
    display: flex; overflow-x: auto; padding: 15px; background: var(--white);
    gap: 10px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.cat-btn {
    white-space: nowrap; padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border);
    background: var(--white); color: var(--dark); font-weight: 500; cursor: pointer; transition: 0.2s;
}
.cat-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.products-container { padding: 15px; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; }
.product-card {
    background: var(--white); border-radius: 12px; overflow: hidden; display: flex;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: 0.2s;
}
.product-img { width: 100px; height: 100px; object-fit: cover; flex-shrink: 0; }
.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.product-title { font-weight: bold; font-size: 1rem; margin-bottom: 4px; }
.product-desc { font-size: 0.8rem; color: #666; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.product-price { font-weight: bold; color: var(--primary-dark); }
.add-btn { 
    background: var(--light); width: 30px; height: 30px; border-radius: 50%; border: none; 
    color: var(--primary); font-size: 1.2rem; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.add-btn:active { background: var(--primary); color: var(--white); }

/* Cart Bar */
.cart-bar {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    width: 90%; max-width: 400px; background: var(--dark); color: var(--white);
    padding: 15px 20px; border-radius: 50px; display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); cursor: pointer; z-index: 2000; transition: 0.3s;
}
.cart-info { display: flex; align-items: center; gap: 10px; }
.badge { background: var(--primary); color: var(--white); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: bold; }
.cart-total { font-weight: bold; font-size: 1.1rem; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5);
    z-index: 3000; display: none; align-items: flex-end; /* Bottom sheet on mobile */
}
.modal-overlay.open { display: flex; }
.modal-content {
    background: var(--white); width: 100%; max-width: 500px; margin: 0 auto;
    border-radius: 20px 20px 0 0; padding: 20px; max-height: 90vh; overflow-y: auto;
    display: flex; flex-direction: column; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.close-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #999; }
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.item-qty-control { display: flex; align-items: center; gap: 10px; background: #f4f4f4; padding: 5px 10px; border-radius: 20px; }
.qty-btn { background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--primary); font-weight: bold; }
.modal-footer { border-top: 1px solid #eee; padding-top: 20px; margin-top: 20px; }
.final-total { font-size: 1.2rem; font-weight: bold; text-align: right; margin-bottom: 15px; }

/* Checkout Options */
.toggle-switch { display: flex; background: #eee; padding: 4px; border-radius: 8px; margin: 15px 0; }
.toggle-btn { flex: 1; border: none; background: none; padding: 10px; border-radius: 6px; font-weight: 500; cursor: pointer; }
.toggle-btn.active { background: var(--white); shadow: 0 2px 5px rgba(0,0,0,0.1); color: var(--primary-dark); }
.order-form { background: #f9f9f9; padding: 15px; border-radius: 8px; border: 1px solid #eee; }
.form-group { margin-bottom: 10px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 4px; color: #666; }
.form-group input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Success Modal */
.success-card { background: white; padding: 40px; border-radius: 20px; text-align: center; max-width: 300px; width: 90%; }
.success-icon { font-size: 4rem; color: #2ecc71; margin-bottom: 20px; }