/* ===================================================================
   RESET E STILI BASE
   =================================================================== */

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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
    line-height: 1.4;
}



/* Personalizzazione scrollbar per browser Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar-thumb {
    background: #FFB100; /* Il colore oro che volevi */
    border-radius: 10px;
    border: 2px solid #f1f1f1; /* Bordo per staccare dal track */
}

::-webkit-scrollbar-thumb:hover {
    background: #FFC700; /* Colore leggermente più scuro al hover */
}

/* Per Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #FFB100 #f1f1f1;
}



/* ===================================================================
   HEADER
   =================================================================== */

.header {
    text-align: center;
    margin-bottom: 40px;
    background-color: #FFB100;
    color: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.header[onclick] {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.header h1 {
    font-size: 3.5em;
    margin-bottom: 10px;
    font-weight: bold;
}

.header p {
    font-size: 1.8em;
    opacity: 0.9;
}

.header:hover {
    background-color: #FFB100;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.header:active {
    transform: translateY(0);
    background-color: #F9C349;
}

        .site-footer {
            margin-top: 5px;
            padding: 20px 10px;
            background-color: #FFB100;
            color: whitesmoke;
            text-align: center;
            border-radius: 0 0 15px 15px;
        }

        .footer-content p {
            margin-bottom: 5px;
            font-size: 0.9em;
        }

        .footer-subtitle {
            font-size: 0.7em;
            opacity: 0.6;
        }


        /* Link admin nascosto - appare come testo normale */
        .admin-link {
            color: inherit;
            text-decoration: none;
            cursor: default;
            transition: color 0.3s ease;
        }

        /* Effetto hover molto discreto - solo un leggero cambio di colore */
        .admin-link:hover {
            color: #8B4513;
            cursor: pointer;
        }

        .separator {
            margin: 0 10px;
        }

/* Fix per la categoria principale */
.category {
    background-color: white;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Header della categoria con sfondo giallo che si estende completamente */
.category-header {
    background-color: #F9C349;
    color: white;
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    min-height: 80px;
}

/* Container dell'immagine */
.category-image-container {
    flex-shrink: 0;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 4px solid white;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    background-color: white;
}

.category-image-container:hover {
    transform: scale(1.08);
}


/* Immagine della categoria */
.category-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Container del testo della categoria */
.category-text {
    flex: 1;
    margin-right: 20px;
}

/* Titolo della categoria */
.category-title {
    font-size: 2.6em;
    font-weight: bold;
    margin: 0;
    background: none;
    padding: 0;
    text-align: left;
}

/* Descrizione della categoria */
.category-description {
    font-size: 1.4em;
    font-style: italic;
    margin-top: 10px;
    margin-bottom: 0;
    background: none;
    padding: 0;
    text-align: left;
}

/* ===================================================================
   Modal per visualizzare l'immagine ingrandita nel menu.html
   =================================================================== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    animation: fadeIn 0.3s ease;
}

.image-modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 80%;
    text-align: center;
}

.modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.modal-caption {
    color: white;
    font-size: 1.5em;
    margin-top: 15px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.image-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.image-close:hover {
    color: #3498db;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===================================================================
   IMMAGINI E SEZIONI HERO
   =================================================================== */

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.opening-hours {
    background-image: url('img/rotoli.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.opening-hours::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    border-radius: 10px;
    z-index: -1;
}

.opening-hours h3,
.opening-hours div {
    color: white !important;
    position: relative;
    z-index: 2;
}

/* ===================================================================
   CATEGORIE E MENU
   =================================================================== */

.category {
    background-color: white;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.category-title {
    background-color: #F9C349;
    color: white;
    padding: 25px;
    font-size: 2.6em;
    font-weight: bold;
    text-align: center;
}

.category-description {
    text-align: center;
    font-size: 1.4em;
    color: white;
    background-color: #F9C349;
    padding: 10px 15px;
    font-style: italic;
    margin-top: -25px;
}

/* ===================================================================
   GRIGLIA PIADINE
   =================================================================== */

.piadina-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 0;
}

.piadina {
    padding: 35px;
    border-bottom: 3px solid #f0f0f0;
    transition: background-color 0.3s ease;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
}

.piadina:hover {
    background-color: #e8f5e8;
    transform: scale(1.02);
}

.piadina:active {
    background-color: #d4edda;
    transform: scale(0.98);
}

.piadina:last-child {
    border-bottom: none;
}

.piadina-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    min-height: 60px;
}

.piadina-name {
    font-size: 2.2em;
    font-weight: bold;
    color: #333;
    flex: 1;
    margin-right: 15px;
    line-height: 1.2;
    max-width: calc(100% - 120px);
}

.piadina-price {
    font-size: 2.5em;
    font-weight: bold;
    color: #8B4513;
    flex-shrink: 0;
    min-width: 100px;
    text-align: right;
    white-space: nowrap;
    align-self: flex-start;
}

.piadina-description {
    font-size: 1.6em;
    color: #666;
    line-height: 1.5;
    margin-top: 10px;
}

.unavailable {
    opacity: 0.5;
    position: relative;
}

.unavailable::after {
    content: "NON DISPONIBILE";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 15px 30px;
    font-size: 1.8em;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* ===================================================================
   NAVIGAZIONE CATEGORIE (STICKY)
   =================================================================== */

.category-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #FFB100, #F9C349);
    padding: 18px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-bottom: 3px solid #e6a000;
    border-radius: 20px 20px 20px 20px;
    margin-bottom: 30px;
}

.category-buttons {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: space-between;
}

.category-buttons::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    padding: 16px 28px;
    border-radius: 35px;
    font-weight: bold;
    font-size: 26px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-width: 140px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.category-btn:hover {
    background: white;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
    border-color: rgba(255, 177, 0, 0.3);
}

.category-btn.active {
    background: #fff;
    color: #FFB100;
    box-shadow: 0 6px 20px rgba(255, 177, 0, 0.3);
    transform: translateY(-2px);
    border-color: #FFB100;
    font-size: 28px;
}

.category-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.language-btn {
    background-color: #F4B400!important;
    color: white !important;
    box-shadow: 0 6px 20px rgba(255, 177, 0, 0.3)!important;
    font-weight: bold;
    margin-right: 10px;
    border: 3px solid whitesmoke !important;
}

.language-btn:hover {
    background-color: #0F9D58 !important;
    transform: scale(1.0);
}

/* ===================================================================
   CARRELLO
   =================================================================== */

.cart-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    max-height: 80vh;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cart-hidden {
    transform: translateX(100%);
    opacity: 0;
}

.cart-header {
    background-color: #27ae60;
    color: white;
    padding: 20px;
    text-align: center;
    font-size: 1.8em;
    font-weight: bold;
    position: relative;
}

.cart-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 0.5em;
    font-weight: bold;
    cursor: pointer;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.cart-toggle:active {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(0.95);
}

.cart-body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.cart-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-item:last-child {
    border-bottom: none;
}

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

.cart-item-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #666;
    font-size: 1em;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-btn {
    background-color: #3498db;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-btn:hover {
    background-color: #2980b9;
}

.cart-btn-remove {
    background-color: #e74c3c;
}

.cart-btn-remove:hover {
    background-color: #c0392b;
}

.cart-quantity {
    font-size: 1.3em;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.cart-footer {
    padding: 20px;
    border-top: 2px solid #eee;
    background-color: #f8f9fa;
}

.cart-total {
    font-size: 2em;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
    margin-bottom: 15px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-action-btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1.4em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-clear {
    background-color: #95a5a6;
    color: white;
}

.btn-clear:hover {
    background-color: #7f8c8d;
}

.btn-order {
    background-color: #27ae60;
    color: white;
}

.btn-order:hover {
    background-color: #229954;
}

.cart-empty {
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 1.2em;
}

.cart-icon {
    position: fixed;
    top: 30px;
    right: 30px;
    background-color: rgba(255, 177, 0, 0.8);
    color: white;
    border: none;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    font-size: 2em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1001;
    transition: transform 0.2s ease;
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* ===================================================================
   PAGINA INDEX - SEZIONI PRINCIPALI
   =================================================================== */

.main-content {
    margin: 0 auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

.hero-section {
    background-color: #F9C349;
    color: white;
    padding: 40px;
    text-align: center;
}

.hero-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-section p {
    font-size: 1.6em;
    opacity: 0.9;
    margin-bottom: 30px;
}

.info-section {
    padding: 40px;
}

.contact-info {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.contact-info h3 {
    font-size: 2em;
    color: #8B4513;
    margin-bottom: 20px;
    font-weight: bold;
    text-align: center;
}

.address, .phone {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.address:hover {
    background-color: #e8f5e8;
    border-radius: 8px;
    transform: scale(1.02);
}

.address:active {
    background-color: #d4edda;
    transform: scale(0.98);
}

/* ===================================================================
   BOTTONI E LINKS
   =================================================================== */

.menu-button {
    background-color: #8B4513;
    color: white;
    padding: 20px 40px;
    font-size: 1.8em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.menu-button:hover {
    background-color: #6B3410;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.menu-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.order-online-btn {
    background-color: #8B4513 !important;
    color: white !important;
    padding: 20px 40px;
    font-size: 1.8em;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
}

.order-online-btn:hover {
    background-color: #6B3410 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.order-online-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.phone .phone-call,
.phone-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid #8B4513;
    padding: 10px 10px;
    border-radius: 8px;
    background: #FFB100;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
    margin: 0 auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.phone .phone-call .icon,
.phone-call .icon {
    color: white;
    margin-right: 8px;
    font-size: 1.2em;
}

.phone .phone-call:focus,
.phone-call:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(255,177,0,0.12);
}

.phone .phone-call:hover,
.phone-call:hover {
    background: #F9C349;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.whatsapp-link {
    background-color: #128C7E;
    color: white;
    padding: 15px 25px;
    font-size: 1.4em;
    font-weight: bold;
    border: 2px solid #8B4513;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
    width: 40%;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.whatsapp-link:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

.icon {
    font-size: 1.2em;
}

/* ===================================================================
   GALLERIA FOOTER
   =================================================================== */

.footer-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    background-color: #F9C349;
    padding: 40px 20px;
    border-radius: 15px 15px 0 0;
    margin-top: -20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 177, 0, 0.85);
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 1.6em;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* ===================================================================
   NOTIFICHE DINAMICHE
   =================================================================== */

#dynamicNotice {
    width: 50%;
    margin: 10px auto;
    padding: 15px 20px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1em;
    border-bottom: 3px solid;
    animation: slideDown 0.9s ease-out;
    border-radius: 8px;
}

#dynamicNotice.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #17a2b8;
}

#dynamicNotice.warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffc107;
}

#dynamicNotice.danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

#dynamicNotice.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===================================================================
   MESSAGGI DI STATO
   =================================================================== */

.success-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #27ae60;
    color: white;
    padding: 30px 40px;
    border-radius: 15px;
    font-size: 2.5em;
    font-weight: bold;
    z-index: 2000;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    text-align: center;
}

.loading {
    text-align: center;
    font-size: 2em;
    color: #666;
    padding: 50px;
}

.error {
    text-align: center;
    font-size: 1.8em;
    color: #d32f2f;
    padding: 30px;
    background-color: #ffebee;
    border-radius: 10px;
    margin: 20px;
}

/* ===================================================================
   MEDIA QUERIES - DESKTOP LARGE (1600px+)
   =================================================================== */

@media (min-width: 1600px) {
    .header h1 {
        font-size: 4em;
    }
    
    .category-title {
        font-size: 4.5em;
        padding: 30px;
    }
    
    .category-description {
        font-size: 1.6em;
        padding: 12px 18px;
    }
    
    .piadina-name {
        font-size: 2.5em;
    }
    
    .piadina-price {
        font-size: 2.8em;
    }
    
    .piadina-description {
        font-size: 1.8em;
    }
}

/* ===================================================================
   MEDIA QUERIES - DESKTOP STANDARD (1200px+)
   =================================================================== */

@media (min-width: 1200px) {
    .piadina-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-image-container {
        width: 160px; /* Ancora più grandi su monitor grandi */
        height: 160px;
        border-width: 5px;
    }
    
    .category-header {
        gap: 25px; /* Più spazio tra testo e immagine */
        margin-bottom: 25px;
    }
}

/* ===================================================================
   MEDIA QUERIES - MONITOR PORTRAIT (769px+ in portrait) - per un 16" in verticale con risoluzione 1600×2560:
   =================================================================== */

@media screen and (min-width: 769px) and (orientation: portrait) {
    .piadina-header {
        margin-bottom: 2px;
    }
    
    .cart-toggle {
        font-size: 0.8em;
        padding: 8px 12px;
    }

    .cart-container {
        width: 500px;
        top: 140px;
        right: 20px;
    }
    
    .cart-item {
        padding: 18px 25px;
    }
    
    .cart-item-name {
        font-size: 1.3em;
        word-wrap: break-word;
        line-height: 1.2;
    }

    .cart-icon {
        top: 140px;
        right: 30px;
    }

    .category-title {
        font-size: 3.6em;
    }

    .category-description {
        font-size: 2.0em;
    }

    .cart-action-btn {
        font-size: 2.0em;
    }

    .category-image-container {
        width: 170px; /* AUMENTATO da 70px a 100px */
        height: 170px; /* AUMENTATO da 70px a 100px */
        border-width: 4px;
    }
}

/* ===================================================================
   MEDIA QUERIES - TABLET (768px e sotto)
   =================================================================== */

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 20px;
        margin-bottom: 20px;
    }

    .header h1 {
        font-size: 2.5em;
    }

    .header p {
        font-size: 1.3em;
    }

    .hero-image {
        margin: 15px 0;
    }

    .category-text {
        margin-right: 15px;
    }
    
    .category-title {
        font-size: 2.2em;
    }

    .category-description {
        font-size: 1.1em;
    }


    .category-header {
        padding: 20px;
        min-height: 70px;
        flex-direction: row; /* Mantieni in riga anche su tablet */
    }
    
    .category-image {
        width: 100px;
        height: 100px;
    }
    
    .category-image-container {
        width: 100px;
        height: 100px;
        border-width: 3px;
    }
    
    .image-modal-content {
        margin: 10% auto;
        max-width: 95%;
    }
    
    .modal-image {
        max-height: 60vh;
    }
    
    .modal-caption {
        font-size: 1.2em;
        margin-top: 10px;
    }
    
    .image-close {
        font-size: 30px;
        top: -35px;
    }

    .piadina-grid {
        grid-template-columns: 1fr;
    }

    .piadina {
        padding: 25px;
        min-height: auto;
    }

    .piadina-name {
        font-size: 1.6em;
    }

    .piadina-price {
        font-size: 1.8em;
    }

    .piadina-description {
        font-size: 1.2em;
    }

    .cart-container {
        width: 300px;
        top: 10px;
        right: 10px;
    }

    .cart-icon {
        top: 30px;
        right: 20px;
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }

    .unavailable::after {
        font-size: 1.3em;
        padding: 10px 20px;
    }

    .hero-section h2 {
        font-size: 2em;
    }

    .hero-section p {
        font-size: 1.3em;
    }

    .menu-button {
        font-size: 1.8em;
        padding: 20px 40px;
    }

    .info-section {
        padding: 30px;
    }

    .contact-info h3 {
        font-size: 1.6em;
    }

    .address, .phone {
        font-size: 1.3em;
    }

    .whatsapp-link {
        font-size: 1.2em;
        padding: 12px 20px;
        width: auto;
    }

    .gallery-caption {
        font-size: 1.3em;
        padding: 10px;
    }

    #dynamicNotice {
        width: 90%;
    }
}

/* ===================================================================
   MEDIA QUERIES - SMARTPHONE (480px e sotto)
   =================================================================== */

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .header {
        padding: 15px;
        margin-bottom: 15px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 1em;
    }
    .site-footer {
        margin-top: 5px;
        padding: 10px 10px;
    }
    .separator {
        margin: 0 5px;
        font-size: 1.0em;
    }

    .category {
        margin-bottom: 15px;
        border-radius: 10px;
    }

    /* DESIGN MOBILE PERSONALIZZATO PER CATEGORIE */
    
    /* Per categorie CON immagine - design completamente diverso */
    .category-header {
        position: relative;
        padding: 20px;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        background: linear-gradient(135deg, #F9C349 0%, #FFD700 100%);
        overflow: hidden;
    }
    
/* Modifica solo questa parte nel tuo CSS mobile: */

/* Sfondo immagine sfumato per mobile - VERSIONE MIGLIORATA */
.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%; /* AUMENTATO da 60% a 75% */
    background-image: var(--category-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8; /* AUMENTATO da 0.25 a 0.4 */
    z-index: 1;
    border-radius: 0 0 0 50px;
    /* Sfumatura migliorata per più visibilità a sinistra */
    mask: linear-gradient(to left, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,0.9) 25%, 
        rgba(0,0,0,0.6) 50%, 
        rgba(0,0,0,0.2) 75%, 
        rgba(0,0,0,0) 100%);
    -webkit-mask: linear-gradient(to left, 
        rgba(0,0,0,1) 0%, 
        rgba(0,0,0,0.9) 25%, 
        rgba(0,0,0,0.6) 50%, 
        rgba(0,0,0,0.2) 75%, 
        rgba(0,0,0,0) 100%);
}
    
    /* Nascondi il container dell'immagine circolare su mobile */
    .category-image-container {
        display: none;
    }
    
    /* Contenuto testo sopra lo sfondo */
    .category-text {
        position: relative;
        z-index: 2;
        margin: 0;
        width: 100%;
        text-align: left;
    }
    
    .category-title {
        font-size: 2.0em;
        font-weight: bold;
        margin: 0;
        margin-bottom: 8px;
        background: none;
        padding: 0;
        text-align: left;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
        line-height: 1.1;
    }

    .category-description {
        font-size: 1.1em;
        font-style: italic;
        margin: 0;
        background: none;
        padding: 0;
        text-align: left;
        line-height: 1.3;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
        opacity: 0.95;
        max-width: 85%;
    }
    
    /* Per categorie SENZA immagine - design semplificato */
    .category-header:not([style*="--category-bg-image"]) {
        min-height: 80px;
        padding: 15px 20px;
        background: linear-gradient(135deg, #F9C349 0%, #FFD700 100%);
    }
    
    .category-header:not([style*="--category-bg-image"])::before {
        display: none;
    }
    
    .category-header:not([style*="--category-bg-image"]) .category-title {
        font-size: 2.0em;
        margin-bottom: 5px;
    }
    
    .category-header:not([style*="--category-bg-image"]) .category-description {
        font-size: 1.0em;
        max-width: 100%;
    }

    /* FINE DESIGN CATEGORIE MOBILE */

    .image-modal-content {
        margin: 15% auto;
    }
    
    .modal-image {
        max-height: 50vh;
    }
    
    .modal-caption {
        font-size: 1em;
    }

    .piadina {
        padding: 15px;
    }

    .piadina-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 10px;
        min-height: 50px;
        margin-bottom: 2px;
    }

    .piadina-name {
        font-size: 1.3em;
        margin-bottom: 2px;
        margin-right: 10px;
        max-width: calc(100% - 80px);
        line-height: 1.3;
    }

    .piadina-price {
        font-size: 1.5em;
        margin-left: 0;
        align-self: flex-start;
        min-width: 70px;
        white-space: nowrap;
        text-align: right;
    }

    .piadina-description {
        font-size: 1.1em;
        margin-top: 0px;
        line-height: 1.3;
    }

    .cart-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        top: 10px;
        right: 10px;
        left: 10px;
        max-height: none;
        border-radius: 10px;
    }

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

    .cart-header {
        font-size: 1.3em;
        padding: 15px;
    }

    .cart-body {
        max-height: calc(100vh - 200px);
    }

    .cart-item {
        padding: 10px 15px;
    }

    .cart-item-name {
        font-size: 1em;
    }

    .cart-item-price {
        font-size: 0.9em;
    }

    .cart-btn {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }

    .cart-quantity {
        font-size: 1.1em;
    }

    .cart-total {
        font-size: 1.5em;
    }

    .cart-action-btn {
        padding: 12px;
        font-size: 1em;
    }

    .cart-icon {
        top: 45px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.2em;
    }

    .cart-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7em;
        top: -3px;
        right: -3px;
    }

    .success-message {
        padding: 20px 25px;
        font-size: 1.2em;
        width: 90%;
        text-align: center;
    }

    .unavailable::after {
        font-size: 1em;
        padding: 8px 15px;
    }

    .loading {
        font-size: 1.5em;
        padding: 30px;
    }

    .error {
        font-size: 1.3em;
        padding: 20px;
        margin: 10px;
    }

    .main-content {
        margin: 0;
        border-radius: 10px;
    }

    .hero-section {
        padding: 25px 20px;
    }

    .hero-section h2 {
        font-size: 1.6em;
        margin-bottom: 15px;
    }

    .hero-section p {
        font-size: 1.1em;
        margin-bottom: 20px;
    }

    .menu-button {
        font-size: 1.3em;
        padding: 15px 25px;
    }

    .order-online-btn {
        font-size: 1.3em !important;
        padding: 15px 25px !important;
    }

    .info-section {
        padding: 20px;
    }

    .contact-info {
        padding: 20px;
        margin-bottom: 20px;
    }

    .contact-info h3 {
        font-size: 1.4em;
        margin-bottom: 15px;
    }

    .address, .phone {
        font-size: 1.4em;
        margin-bottom: 10px;
        flex-direction: column;
        gap: 5px;
    }

    .phone .phone-call,
    .phone-call {
        font-size: 0.9em;
    }

    .whatsapp-link {
        font-size: 1.1em;
        padding: 12px 20px;
        margin-top: 15px;
        width: auto;
    }

    #dynamicNotice {
        padding: 12px 15px;
        font-size: 1em;
        width: 90%;
    }
}

/* ===================================================================
   MEDIA QUERIES - DISPOSITIVI TOUCH (no hover)
   =================================================================== */

@media (hover: none) and (pointer: coarse) {
    .header:hover {
        background-color: #FFB100;
        transform: none;
    }
    
    .header:active {
        background-color: #F9C349;
        transform: scale(0.98);
    }

    .piadina:hover {
        transform: none;
    }
    
    .piadina:active {
        transform: scale(0.95);
        background-color: #d4edda;
    }
    
    .cart-btn:hover {
        background-color: #3498db;
    }
    
    .cart-btn:active {
        background-color: #2980b9;
        transform: scale(0.95);
    }
    
    .cart-btn-remove:hover {
        background-color: #e74c3c;
    }
    
    .cart-btn-remove:active {
        background-color: #c0392b;
        transform: scale(0.95);
    }

    .menu-button:hover {
        background-color: #8B4513;
        transform: none;
    }

    .menu-button:active {
        background-color: #8B4513;
        transform: scale(0.95);
    }

    .whatsapp-link:hover {
        background-color: #128C7E;
        transform: none;
    }

    .whatsapp-link:active {
        background-color: green;
        transform: scale(0.95);
    }

    .address:hover {
        background-color: transparent;
        transform: none;
    }
    
    .address:active {
        background-color: #d4edda;
        border-radius: 8px;
        transform: scale(0.95);
    }
}