

    /* ========================================================
       DEFAULT DESKTOP
       ======================================================== */

    .dipalma-mobile-shop-controls {
        display: none !important;
    }


    /*
     * IMPORTANTE:
     * il pulsante X viene creato via JS,
     * ma su desktop deve essere SEMPRE invisibile.
     */

    #dipalma-filter-close {
        display: none !important;
    }


    #dipalma-shop-overlay {
        display: none;
    }



    /* ========================================================
       MOBILE / TABLET VERTICALE
       ======================================================== */

    @media screen and (max-width: 900px) {


        /* ====================================================
           LAYOUT SHOP
           ==================================================== */

        .dipalma-shop-v2 {

            display: block !important;

            width: 100% !important;
        }



        /* ====================================================
           TOOLBAR
           ==================================================== */

        .dipalma-shop-toolbar-v2 {

            display: flex !important;

            flex-direction: column !important;

            align-items: stretch !important;

            gap: 10px !important;

            margin-bottom: 12px !important;

            padding: 12px !important;
        }


        .dipalma-results-v2 {

            order: 2;

            font-size: 12px !important;

            line-height: 1.4 !important;
        }



        /* ====================================================
           ORDINAMENTO
           ==================================================== */

        .dipalma-order-v2 {

            order: 1;

            display: flex !important;

            width: 100% !important;

            align-items: center !important;

            gap: 8px !important;

            margin: 0 !important;
        }


        .dipalma-order-v2 label {

            flex: 0 0 auto !important;

            font-size: 11px !important;

            white-space: nowrap !important;
        }


        .dipalma-order-v2 select {

            flex: 1 1 auto !important;

            width: auto !important;

            min-width: 0 !important;

            height: 44px !important;

            margin: 0 !important;

            font-size: 16px !important;
        }



        /* ====================================================
           SIDEBAR -> DRAWER
           ==================================================== */

        .dipalma-shop-sidebar-v2 {

            position: fixed !important;

            top: 0 !important;
            left: 0 !important;
            bottom: 0 !important;

            z-index: 2147483200 !important;

            width: min(
                360px,
                88vw
            ) !important;

            height: 100dvh !important;

            margin: 0 !important;

            padding:
                calc(
                    68px +
                    env(safe-area-inset-top)
                )
                18px
                calc(
                    30px +
                    env(safe-area-inset-bottom)
                ) !important;

            overflow-y: auto !important;

            overscroll-behavior: contain !important;

            -webkit-overflow-scrolling: touch !important;

            background: #ffffff !important;

            border: 0 !important;

            border-radius: 0 !important;

            box-shadow:
                15px 0 50px
                rgba(16,36,62,.20) !important;

            transform:
                translateX(-105%) !important;

            transition:
                transform .24s ease !important;
        }


        body.dipalma-filter-open
        .dipalma-shop-sidebar-v2 {

            transform:
                translateX(0) !important;
        }



        /* ====================================================
           OVERLAY
           ==================================================== */

        #dipalma-shop-overlay {

            position: fixed;

            inset: 0;

            z-index: 2147483100;

            display: none;

            background:
                rgba(8,25,45,.42);

            backdrop-filter:
                blur(1px);

            -webkit-backdrop-filter:
                blur(1px);
        }


        body.dipalma-filter-open
        #dipalma-shop-overlay {

            display: block !important;
        }



        /* ====================================================
           PULSANTE X
           ==================================================== */

        #dipalma-filter-close {

            display: flex !important;

            position: absolute !important;

            top:
                calc(
                    14px +
                    env(safe-area-inset-top)
                ) !important;

            right: 14px !important;

            width: 42px !important;

            height: 42px !important;

            align-items: center !important;

            justify-content: center !important;

            margin: 0 !important;

            padding: 0 !important;

            background:
                #f1f5f9 !important;

            background-image:
                none !important;

            color:
                #17283b !important;

            border:
                0 !important;

            border-radius:
                50% !important;

            box-shadow:
                none !important;

            font-size:
                26px !important;

            font-weight:
                400 !important;

            line-height:
                1 !important;

            cursor:
                pointer !important;
        }


        #dipalma-filter-close:hover {

            background:
                #e5ebf2 !important;

            color:
                #0b5ab5 !important;
        }



        /* ====================================================
           CONTROLLI MOBILE
           ==================================================== */

        .dipalma-mobile-shop-controls {

            display: grid !important;

            grid-template-columns:
                1fr 1fr;

            gap: 8px;

            margin-bottom: 12px;
        }



        /* PULSANTE FILTRI */

        #dipalma-filter-open {

            min-height: 44px;

            display: flex;

            align-items: center;

            justify-content: center;

            gap: 7px;

            margin: 0;

            padding: 8px 12px;

            background: #ffffff;

            background-image: none;

            color: #17283b;

            border:
                1px solid
                #dce4ed;

            border-radius: 7px;

            box-shadow: none;

            font-size: 12px;

            font-weight: 800;

            line-height: 1.2;

            cursor: pointer;
        }


        #dipalma-filter-open::before {

            content: "☰";

            color: #0b5ab5;

            font-size: 15px;
        }


        #dipalma-filter-open:hover {

            background:
                #f5f8fc;

            color:
                #0b5ab5;
        }



        /* ====================================================
           CATEGORIA ATTIVA
           ==================================================== */

        .dipalma-mobile-category-name {

            min-height: 44px;

            display: flex;

            align-items: center;

            justify-content: center;

            min-width: 0;

            padding: 8px 10px;

            overflow: hidden;

            background:
                #edf5fd;

            color:
                #0b5ab5;

            border-radius: 7px;

            font-size: 11px;

            font-weight: 800;

            line-height: 1.2;

            text-align: center;

            white-space: nowrap;

            text-overflow: ellipsis;
        }



        /* ====================================================
           SEARCH NEL DRAWER
           ==================================================== */

        .dipalma-product-search {

            margin-bottom:
                22px !important;
        }


        .dipalma-product-search
        input[type="search"] {

            height: 46px !important;

            font-size: 16px !important;
        }


        .dipalma-product-search
        button {

            height: 46px !important;
        }



        /* ====================================================
           SIDEBAR TITLE
           ==================================================== */

        .dipalma-sidebar-heading {

            padding-right:
                50px !important;

            margin-bottom:
                18px !important;
        }



        /* ====================================================
           CATEGORIE
           ==================================================== */

        .dipalma-root-category,
        .dipalma-child-category {

            min-height: 43px !important;

            padding:
                9px 10px !important;

            font-size:
                13px !important;
        }



        /* ====================================================
           GRID MOBILE
           ==================================================== */

        .dipalma-products-v2 {

            display: grid !important;

            grid-template-columns:
                repeat(
                    2,
                    minmax(0,1fr)
                ) !important;

            gap:
                14px 10px !important;

            align-items:
                stretch !important;
        }



        /* ====================================================
           CARD
           ==================================================== */

        .dipalma-product-card-v2 {

            min-width:
                0 !important;

            border-radius:
                8px !important;
        }



        /* ====================================================
           IMMAGINE
           ==================================================== */

        .dipalma-image-v2 {

            height:
                145px !important;

            padding:
                8px !important;
        }


        .dipalma-image-v2 img {

            width:
                100% !important;

            max-width:
                100% !important;

            height:
                100% !important;

            max-height:
                130px !important;

            object-fit:
                contain !important;

            object-position:
                center !important;
        }



        /* ====================================================
           BODY
           ==================================================== */

        .dipalma-card-body-v2 {

            padding:
                10px !important;
        }



        /* ====================================================
           TITOLO
           ==================================================== */

        .dipalma-title-v2 {

            height:
                54px !important;

            min-height:
                54px !important;

            max-height:
                54px !important;

            margin-bottom:
                7px !important;

            font-size:
                11px !important;

            line-height:
                18px !important;

            -webkit-line-clamp:
                3 !important;

            line-clamp:
                3 !important;
        }



        /* ====================================================
           PREZZO
           ==================================================== */

        .dipalma-price-v2 {

            min-height:
                40px !important;

            font-size:
                13px !important;
        }



        /* ====================================================
           STOCK
           ==================================================== */

        .dipalma-stock-v2 {

            font-size:
                10.5px !important;
        }



        /* ====================================================
           PULSANTE PRODOTTO
           ==================================================== */

        .dipalma-button-v2 {

            min-height:
                42px !important;

            padding:
                7px 5px !important;

            font-size:
                11px !important;
        }



        /* ====================================================
           PAGINATION
           ==================================================== */

        .dipalma-pagination-v2 {

            gap:
                5px !important;

            margin-top:
                24px !important;
        }


        .dipalma-pagination-v2
        .page-numbers {

            width:
                36px !important;

            height:
                36px !important;

            margin:
                0 !important;
        }



        /* ====================================================
           BLOCCO SCROLL BODY
           ==================================================== */

        body.dipalma-filter-open {

            overflow:
                hidden !important;

            touch-action:
                none;
        }


        body.dipalma-filter-open
        .dipalma-shop-sidebar-v2 {

            touch-action:
                pan-y;
        }

    }



    /* ========================================================
       SMARTPHONE MOLTO STRETTO
       ======================================================== */

    @media screen and (max-width: 390px) {

        .dipalma-products-v2 {

            gap:
                12px 8px !important;
        }


        .dipalma-image-v2 {

            height:
                130px !important;
        }


        .dipalma-image-v2 img {

            max-height:
                115px !important;
        }


        .dipalma-card-body-v2 {

            padding:
                8px !important;
        }


        .dipalma-title-v2 {

            font-size:
                10.5px !important;
        }


        .dipalma-button-v2 {

            font-size:
                10.5px !important;
        }

    }

    