/* ========================================
   MOBILE.CSS - Media Queries e Responsive
   ======================================== */

/* MOBILE FOOTER MENU */
@media (max-width: 768px) {
    .mobile-footer-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background-color: #ffffff;
        border-top: 1px solid #ddd;
        display: flex;
        align-items: center;
        justify-content: space-around;
        padding: 0 8px;
        z-index: 9999;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
    }

    .mobile-footer-menu button {
        background: none;
        border: none;
        font-size: 20px;
        color: #333;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px;
        flex-shrink: 0;
    }

    .pagination-controls {
        display: flex;
        align-items: center;
        gap: 4px;
        background-color: #f4f4f4;
        border-radius: 6px;
        padding: 4px 6px;
    }

    .pagination-controls select {
        font-size: 13px;
        padding: 4px 6px;
        border-radius: 4px;
        border: 1px solid #ccc;
        background: white;
    }

    .pagination-controls button {
        font-size: 16px;
        background: none;
        border: none;
        color: #333;
        padding: 4px;
    }

    .pagination-controls button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .desktop-only {
        display: block;
    }
}

/* Nascondi su desktop */
@media (min-width: 769px) {
    .mobile-footer-menu {
        display: none;
    }
}

/* RESPONSIVE GENERALE */
@media (max-width: 992px) {
    .sidebar {
        display: none;
    }

    .burger {
        display: block;
        margin-right: 30px;
    }

    .content {
        flex: 1;
        padding: 0px;
        min-width: 0;
    }
}

/* FILTRI BAR MOBILE */
@media (max-width: 768px) {
    .burger {
        display: block;
        margin-right: 0px;
    }

    .sidebar ul {
        padding-bottom: 160px;
        padding-bottom: calc(160px + env(safe-area-inset-bottom, 0px));
    }

    .sidebar ul li:last-child {
        margin-bottom: 140px;
        margin-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    }

    .filters-bar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        font-size: 9px;
    }

    .filters-left,
    .filters-center,
    .filters-right {
        width: 100%;
    }

    .filters-center {
        justify-content: flex-start;
        margin-top: 6px;
    }

    .local-search-form {
        flex-direction: column;
        width: 100%;
    }

    .local-search-form input[type="text"],
    .local-search-form button {
        width: 100%;
    }
}

/* PRODUCT CARD MOBILE */
@media (max-width: 992px) {
    .product-card {
        height: 340px;
    }

    .product-card p {
        font-size: 9px;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .prezzo-info {
        font-size: 9px;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .prezzo {
        font-size: 12px !important;
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .input-note {
        font-size: 9px!important;
    }
}

/* CARRELLO MOBILE */
@media (max-width: 768px) {
    .carrello-layout {
        flex-direction: column;
    }

    .carrello-articoli,
    .carrello-riepilogo {
        width: 100%;
    }

    .carrello-articoli {
        order: 1;
    }

    .carrello-riepilogo {
        order: 2;
        margin-top: 20px;
    }

    .carrello-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .item-foto {
        width: 92px;
        height: 69px;
    }

    .ean {
        font-size: 9px;
    }

    .descrizione {
        font-size: 12px;
    }

    .info-piccole {
        font-size: 9px;
    }

    .totale-riga {
        font-size: 12px;
    }
}

/* CATEGORIE HOME MOBILE */
@media (max-width: 768px) {
    .categorie-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .info-box {
        font-size: 0.93rem;
    }
}

