﻿/* =============================================================
   GLOBAL  

    per irpulire i css da classi inutili
    npx purgecss --config purgecss.config.js

   ============================================================= */

html {
    font-size: 0.875rem;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 1rem;
    }
}

/*body {
    margin-bottom: 60px;
}*/

button:focus,
button:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px orange !important;
    border-radius: 6px !important;
}


/*immagin eshceda*/
.product-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

    .product-thumbnails .thumb {
        width: 64px;
        height: 64px;
        object-fit: contain;
        border: 2px solid transparent;
        border-radius: 6px;
        cursor: pointer;
        background: #f8f8f8;
        padding: 4px;
        transition: border-color 0.2s;
    }

        .product-thumbnails .thumb:hover {
            border-color: #aaa;
        }

        .product-thumbnails .thumb.active {
            border-color: #3b5bdb;
        }

/* cursore su immagine principale */
#mainProductLink {
    cursor: zoom-in;
}

/* lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

    .lightbox:target {
        display: flex;
    }

    .lightbox img {
       /* max-width: 90vw;
        max-height: 90vh;*/
     /*   object-fit: contain;*/
        border-radius: 8px;
    }

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    color: white;
    text-decoration: none;
    line-height: 1;
}


/*banner home apge*/

.banner-wrapper {
    aspect-ratio: 4 / 1; /* più largo = più basso */
    width: 100%;
}

.banner-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* mostra tutto, senza taglio */
}

 


.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}


.tech-item i {
    width: 18px;
    text-align: center;
    margin-top: 3px;
}

/* colori semantici */
.fa-bolt {
    color: #f5b400;
}
/* energia */
.fa-lightbulb {
    color: #ffc107;
}
/* luce */
.fa-thermometer-half {
    color: #ff6b6b;
}
/* temperatura */
.fa-wind {
    color: #17a2b8;
}
/* aria */
.fa-volume-up {
    color: #6c757d;
}
/* rumore */
.fa-plug {
    color: #28a745;
}
/* consumo */
.fa-filter {
    color: #20c997;
}

.fa-sliders-h {
    color: #6f42c1;
}

.fa-ruler-combined {
    color: #0d6efd;
}

.fa-cogs {
    color: #adb5bd;
}


/* =============================================================
   LOADING OVERLAY
   ============================================================= */


.modal-backdrop {
    z-index: 1049;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    position: relative;
    width: 300px;
    height: 180px;
}

.loading-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 500;
    color: #2b3087;
    pointer-events: none;
}


/* =============================================================
   ANIMATIONS
   ============================================================= */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounceCart {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.2);
    }

    60% {
        transform: scale(0.95);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes loaderPulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}


/* =============================================================
   SPINNER
   ============================================================= */

.spinner {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 48px;
    height: 48px;
    border: 5px solid #ddd;
    border-top: 5px solid #2b3087;
    border-radius: 50%;
    animation: spin .9s linear infinite;
}

/* Variante piccola (usata nel btn-load-more) */
.btn-load-more .spinner {
    position: static;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: spin .8s linear infinite;
}


/* =============================================================
   SEARCH BAR
   ============================================================= */

.search-wrapper {
    display: flex;
    width: 100%;
    max-width: 600px;
    height: 42px;
}

.search-input {
    flex: 1;
    border: 1px solid #d9dbe7;
    border-right: none;
    padding: 0 16px;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

    .search-input:focus {
        border-color: #2b3087;
        box-shadow: 0 0 0 2px rgba(43,48,135,0.1);
    }

.btn-search-bar,
.btn-search-bar-ordine,
.btn-search-bar-carrello {
    width: 48px;
    border: none;
    background: #2b3087;
    color: white;
    border-radius: 0 30px 30px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-search-bar:hover,
    .btn-search-bar-ordine:hover,
    {
        background: #1f245f;
    }

/* Loader barra di ricerca */
.search-loader {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #2b2e87, #407afd);
    transition: width 0.25s ease;
    opacity: 0;
}

    .search-loader.active {
        width: 70%;
        opacity: 1;
        animation: loaderPulse 1s infinite;
    }


/* =============================================================
   COMBO FILTRI — checkbox personalizzate + button con selezione attiva
   ============================================================= */

/* Button combo con valori selezionati */
.btn-combo-active {
    background: rgba(43, 46, 135, 0.1) !important;
    color: #2b2e87 !important;
    border-color: #2b2e87 !important;
    border-width: 1.5px !important;
    font-weight: 600 !important;
}

.chk-marca,
.chk-gruppo,
.chk-sotgruppo {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    min-width: 17px;
    border: 2px solid #c8cce8;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    vertical-align: middle;
    flex-shrink: 0;
}

.chk-marca:checked,
.chk-gruppo:checked,
.chk-sotgruppo:checked {
    background-color: #2b2e87;
    border-color: #2b2e87;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8l3.5 3.5L13 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px;
}

.chk-marca:hover,
.chk-gruppo:hover,
.chk-sotgruppo:hover {
    border-color: #2b2e87;
}

.chk-marca:focus,
.chk-gruppo:focus,
.chk-sotgruppo:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 46, 135, 0.2);
}

/* Riga label hover coerente col sito */
.marca-item,
.grp-item,
.sgrp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px !important;
    border-radius: 6px;
    transition: background 0.1s;
    cursor: pointer;
}

.marca-item:hover,
.grp-item:hover,
.sgrp-item:hover {
    background-color: rgba(43, 46, 135, 0.08) !important;
    color: #2b2e87 !important;
}

/* Testo label checked → colore brand */
.marca-item:has(.chk-marca:checked),
.grp-item:has(.chk-gruppo:checked),
.sgrp-item:has(.chk-sotgruppo:checked) {
    background-color: rgba(43, 46, 135, 0.06) !important;
    color: #2b2e87 !important;
    font-weight: 600;
}

/* Check filtri top-bar (isDispo, isPromo, isOutlet, isLInstallazione, isIncasso) */
#formFiltri .form-check {
    padding-left: 1.75rem;
}

#formFiltri .form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    min-width: 17px;
    border: 2px solid #c8cce8;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    vertical-align: middle;
    flex-shrink: 0;
}

#formFiltri .form-check-input:checked {
    background-color: #2b2e87;
    border-color: #2b2e87;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8l3.5 3.5L13 4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px;
}

#formFiltri .form-check-input:hover {
    border-color: #2b2e87;
}

#formFiltri .form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(43, 46, 135, 0.2);
}

#formFiltri .form-check-input:checked + .form-check-label {
    color: #2b2e87 !important;
    font-weight: 600;
}

/* =============================================================
   NAVBAR / HEADER
   ============================================================= */




/* Pulsante utente */
.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f4f6fc;
    border: 1px solid #e4e6f2;
    padding: 6px 16px;
    border-radius: 40px;
    font-weight: 500;
    color: #2b3087;
    transition: all 0.2s ease;
}

    .user-chip:hover {
        background: #e9ecfb;
        border-color: #2b3087;
    }

.user-avatar {
    width: 32px;
    height: 32px;
    background: #2b3087;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
}

.user-name {
    font-size: 0.875rem;
}

.user-arrow {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Icona carrello */
.cart-wrapper {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #60b800 !important;
    color: white;
    font-size: 0.75rem;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.cart-bounce {
    animation: bounceCart 0.6s ease;
}

.cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 420px;
    max-width: 90vw;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 10px 30px rgba(0,0,0,.18);
    z-index: 9999;
    padding: 14px;
}

.cart-btn:hover {
    background: #f2f2f2;
}


/* =============================================================
   FILTRI / DROPDOWN
   ============================================================= */

.filters-wrapper {
    position: sticky;
    top: 60px;
    z-index: 100;
    max-height: calc(100vh - 60px - 20px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-left: 4px;
    padding-right: 10px;
}

.filters-scroll-area {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: clip;
    scrollbar-width: thin;
    scrollbar-color: rgba(43,46,135,0.55) rgba(43,46,135,0.08);
    padding-bottom: 8px;
}

.filters-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
    background: var(--bs-light);
}

    .filters-wrapper::-webkit-scrollbar {
        width: 4px;
    }


.filters-wrapper {
    scrollbar-width: none; /* Firefox */
}

    .filters-wrapper::-webkit-scrollbar {
        display: none; /* Chrome/Edge */
    }

    .filters-wrapper::-webkit-scrollbar-thumb {
        background: rgb(43, 46, 135);
        border-radius: 2px;
    }

    .filters-wrapper::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

.dropdown-menu {
    max-height: min(320px, calc(100vh - 180px)) !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(43,46,135,0.55) rgba(43,46,135,0.08);
}

 

#ddlSottogruppi1 .dropdown-menu,
#ddlGruppi1 .dropdown-menu,
#ddlMarca1 .dropdown-menu {
    max-height: 30vh; /* mai più del 40% della viewport */
    overflow-y: auto;
}


.dropdown-toggle {
    display: flex;
    align-items: center;
}

    .dropdown-toggle::after {
        margin-left: auto;
    }

/* Contatore risultati */
.results-count {
    font-size: 0.813rem;
    color: rgba(43,46,135,0.7);
}

    .results-count .count {
        transition: transform .2s ease, background .2s ease;
    }

    .results-count.updated .count {
        transform: scale(1.15);
        background: rgba(43,46,135,0.2);
    }


/* =============================================================
   PRODUCT CARD (catalogo e correlati)
   ============================================================= */

.product-card {
    border: none;
    border-radius: 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    margin: 5px;
}

    .product-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    }

/* Fade-in card al caricamento */
.prodotto-card {
    opacity: 0;
    transform: translateY(20px);
    transition: all .35s ease;
}

    .prodotto-card.show {
        opacity: 1;
        transform: translateY(0);
    }

.brand {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2B2E87;
}

.group {
    font-size: 0.813rem;
    color: #6c757d;
}

.image-wrapper {
    text-align: center;
    padding: 10px 0;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    max-height: 120px;
    object-fit: contain;
}

.fallback-img {
    opacity: 0.4;
    max-height: 90px;
}

.codice {
    font-size: 0.813rem;
    color: #6c757d;
}

.descrizione {
    font-size: 0.938rem;
    font-weight: 600;
    color: #2B2E87;
    line-height: 1.3;
}

.disponibilita {
    font-size: 0.938rem;
    font-weight: 600;
    color: #60B800;
    margin-top: 10px;
}

.prezzo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #60B800;
}

/* Descrizione nella ricerca */
.descr-articolo {
    min-height: 48px;
    line-height: 1.2;
}

/* Badge promo angolo card */
.badge-promo-corner {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #e63946;
    color: white;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 0.625rem;
    font-weight: 600;
    max-width: 45%;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 1;
}

/* Badge promo inline */
.badge-promo {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.813rem;
    font-weight: 600;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 4px;
    background-color: transparent;
}

/* Badge sconto */
.discount-badge {
    font-size: 0.875rem;
    font-weight: 600;
    color: #60b800;
    background: rgba(96,184,0,0.12);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
}

.discount-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #60b800;
    color: #fff;
    font-size: 0.875rem;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Toast aggiunto al carrello */
.added-badge {
    position: absolute;
    background: #ffc107;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.813rem;
    font-weight: 600;
    z-index: 9999;
}

/*.added-badge2 {
    position: absolute;
    background: #60b800;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 1.125rem;
    font-weight: 600;
}*/

.added-badge2 {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #2b3087, #3940b8);
    color: #fff;
    padding: 14px 22px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(43, 48, 135, 0.25);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.35s ease;
    z-index: 9999;
}

    .added-badge2.show {
        opacity: 1;
        transform: translateY(0);
    }

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

    .toast-icon svg {
        color: white;
    }

.toast-text strong {
    font-weight: 700;
}




/* =============================================================
   BUTTON: CARICA ALTRI
   ============================================================= */

.btn-quick-perc:hover {
    background: #f0f1ff !important;
    border-color: #2b2e87 !important;
}

.btn-quick-perc.active {
    background: #2b2e87 !important;
    color: white !important;
    border-color: #2b2e87 !important;
    box-shadow: 0 4px 12px rgba(43,46,135,0.3);
}

#btnConfermaRicarico:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(43,46,135,0.4) !important;
}

#btnRimuoviRicarico:hover {
    background: #e53935 !important;
    color: white !important;
    border-color: #e53935 !important;
}









/* Icone FontAwesome colorate */
.fa-newspaper {
    color: orange !important;
}

.fa-shopping-cart,
.fa-percent,
.fa-euro-sign,
.fa-dollar-sign,
.fa-box,
.fa-home,
.fa-tag,
.fa-file-invoice {
    color: #2b3087 !important;
}


/* =============================================================
   BUTTON: CARICA ALTRI
   ============================================================= */

.load-more-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px auto 60px;
    position: relative;
    z-index: 10;
}

    .load-more-wrapper.sticky {
        position: sticky;
        bottom: 20px;
    }

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 36px;
    background: #ffffff;
    color: #2b2e87;
    border: 2px solid #2b2e87;
    border-radius: 30px;
    font-weight: 800;
    letter-spacing: .3px;
    box-shadow: 0 6px 16px rgba(0,0,0,.08);
    transition: all .25s ease;
}

    .btn-load-more:hover:not(:disabled) {
        background: #2b2e87;
        color: #fff;
    }

    .btn-load-more:disabled {
        opacity: .6;
        cursor: not-allowed;
    }


/* =============================================================
   SCHEDA PRODOTTO
   ============================================================= */

.product-page {
    max-width: 1200px;
}

.product-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.75rem;
    color: #2B2E87;
    border-bottom: 1px solid #2B2E87;
    padding-bottom: 12px;
}

.product-image-box {
    position: relative;
    padding: 20px;
    background: #f9f9fb;
    border-radius: 20px;
}

.main-product-image {
    max-height: 350px;
    object-fit: contain;
}

.badge-promo-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    font-size: 0.813rem;
    font-weight: 600;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 4px;
}

.product-meta .brand {
    font-weight: 600;
    color: #2B2E87;
    font-size: 0.938rem;
}

.product-meta .group {
    font-size: 0.875rem;
    color: #6c757d;
}

.product-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2B2E87;
    margin-top: 10px;
}

.subtitle {
    font-size: 1.125rem;
    font-weight: 500;
    color: #333;
}

.price-box {
    margin-top: 20px;
}

.price-label {
    font-size: 0.813rem;
    color: #6c757d;
}

.price-value {
    font-size: 2.125rem;
    font-weight: 700;
    color: #2B2E87;
}

.main-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000;
}

.secondary-price {
    font-size: 0.9rem;
    color: #777;
}

.secondary-label {
    font-size: 0.8rem;
    color: #999;
}

.raee-inline {
    font-size: 0.75rem;
    color: #999;
    margin-left: 6px;
}


.purchase-box {
    display: flex;
    gap: 15px;
    align-items: center;
}

.qty-input {
    width: 90px;
    border: 1px solid #2B2E87;
    border-radius: 8px;
    padding: 6px;
}

.btn-add-cart {
    background: #2B2E87;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .btn-add-cart:hover {
        background: #1e2166;
    }

.btn-wishlist {
    background: white;
    border: 1px solid #2B2E87;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    color: #2B2E87;
}

.product-tabs .nav-link {
    color: #2B2E87;
    font-weight: 600;
}

    .product-tabs .nav-link.active {
        background: #2B2E87;
        color: white;
    }

.tab-card {
    background: #f8f9fc;
    padding: 25px;
    border-radius: 16px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: #2B2E87;
}

.descrizione-card {
    padding: 15px;
}

.descrizione-main {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.descrizione-tecnica {
    /* margin-top: 15px;*/
    padding-top: 10px;
    /* border-top: 1px solid #eee;*/
}

.descrizione-tecnica-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.descrizione-tecnica-content {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    white-space: pre-line; /* IMPORTANTISSIMO */
}

.product-tabs-nav {
    gap: 8px;
}

    .product-tabs-nav .nav-link {
        border-radius: 20px;
        padding: 6px 14px;
        font-size: 0.9rem;
        color: #555;
        background: #f3f3f3;
        transition: all 0.2s ease;
    }

        .product-tabs-nav .nav-link.active {
            background: linear-gradient(135deg, #0d6efd, #3a8bfd);
            color: #fff;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
        }

        .product-tabs-nav .nav-link:hover {
            background: #e6e6e6;
        }

.tab-card {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.descrizione-tecnica-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px 20px;
}

.tech-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9rem;
    color: #444;
}

    .tech-item i {
        color: #0d6efd;
        margin-top: 3px;
        font-size: 0.8rem;
        min-width: 14px;
    }

.descrizione-tecnica-content {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.5;
    white-space: pre-line;
}

/* stato vuoto allegati */
.empty-state {
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

    .empty-state i {
        font-size: 1.25rem;
        margin-bottom: 5px;
        display: block;
        color: #ccc;
    }


/* Torna indietro */
.back-to-results {
    margin-top: 15px;
    margin-bottom: 10px;
}

    .back-to-results a {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 0.875rem;
        font-weight: 500;
        color: #565959;
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .back-to-results a:hover {
            color: #2B2E87;
        }

.back-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
}

.back-to-results a:hover .back-arrow {
    transform: translateX(-4px);
    opacity: 0.8;
}


/* =============================================================
   LISTA ORDINI
   ============================================================= */

.ordini-page {
    background: #f7f8fc;
    padding: 30px 40px;
    width: 85%;
}

.page-title {
    font-weight: 600;
    color: #2b3087;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

.ordini-card {
    border-radius: 12px;
    border: none;
}

.ordine-card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    padding: 7px 25px;
    border: 1px solid #e8ebf5;
    transition: all 0.25s ease;
    cursor: pointer;
}

    .ordine-card:hover {
        border-color: #2b3087;
        box-shadow: 0 6px 20px rgba(43,48,135,0.08);
    }

.ordine-accent {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: #2b3087;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.ordine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ordine-numero {
    font-size: 0.938rem;
    color: #6c757d;
}

    .ordine-numero span {
        font-weight: 600;
        color: #2b3087;
        font-size: 1.125rem;
    }

.ordine-meta {
    font-size: 0.813rem;
    color: #8c8f99;
    margin-top: 4px;
}

.ordine-divider {
    height: 1px;
    background: #f0f0f5;
    margin: 5px 0;
}

.ordine-body {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1fr;
    align-items: center;
    gap: 40px;
    margin-bottom: 12px;
    padding-top: 10px;
}

    .ordine-body > div:not(:last-child) {
        border-right: 1px solid #f0f0f5;
        padding-right: 40px;
    }

.ordine-group {
    display: flex;
    gap: 40px;
}

.center-group {
    justify-content: center;
}

.right-group {
    justify-content: flex-end;
}

.ordine-col,
.ordine-item {
    display: flex;
    flex-direction: column;
}

.ordine-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #8c8f99;
    margin-bottom: 4px;
}

.ordine-value {
    font-size: 0.938rem;
    font-weight: 500;
    color: #2b3087;
}

/*.ordine-content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-top: 5px;
}

.ordine-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 18px;
}*/


.ordine-content-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    margin-top: 5px;
}

.ordine-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
    margin-top: 18px;
}

.totale-item {
    text-align: right;
}

.totale-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2b3087;
}

.section-title {
    font-size: 0.813rem;
    font-weight: 600;
    color: #2b3087;
    margin-bottom: 12px;
}

@media (max-width: 992px) {
    .ordine-body {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .right-group,
    .totale-item {
        justify-content: flex-start;
        text-align: left;
    }
}


/* =============================================================
   BADGE STATO ORDINE
   ============================================================= */

.badge-spedito {
    background: #8c8f99;
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-evaso {
    background: linear-gradient(135deg, #28a745, #34c759);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
}


.badge-preparazione {
    background: linear-gradient(135deg, #ffb020, #ffcc00);
    color: #333;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 20px;
}


/* =============================================================
   INFO CHIP (spedizione, pagamento, ecc.)
   ============================================================= */

.graphic-body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    flex: 1;
    margin-top: 12px;
}

.info-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px;
    border-radius: 14px;
    min-width: 200px;
    transition: all 0.2s ease;
}

    .info-chip i {
        font-size: 1.125rem;
        opacity: 0.8;
    }

    .info-chip:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    }

.chip-label {
    font-size: 0.688rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    opacity: 0.8;
}

.info-chip {
    min-width: 0; /*  fondamentale nel flex */
    width: 320px;
    height: 70px;
}

    .info-chip > div {
        min-width: 0; /*  necessario anche qui */
        overflow: hidden;
    }

.chip-value {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap; /* non va a capo */
    overflow: hidden; /* nasconde quello che esce */
    text-overflow: ellipsis; /* mostra ... alla fine */
    display: block; /* necessario per ellipsis */
}

.chip-articoli {
    background: rgba(43,48,135,0.08);
    color: #2b3087;
}

.chip-spedizione {
    background: rgba(0,123,255,0.08);
    color: #0066cc;
    width: 320px;
    align-items: flex-start; /* icona resta in alto quando il testo va a capo */
}


.chip-pagamento {
    background: rgba(255,193,7,0.15);
    color: #b8860b;
    align-items: flex-start;
}

.chip-totale {
    background: rgba(43,48,135,0.12);
    color: #2b3087;
    margin-left: 70px;
    width: 120px;
}


/* =============================================================
   BUTTONS GENERICI
   ============================================================= */

.btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: none;
    background: #2b3087;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

    .btn-icon:hover {
        background: #1f245f;
    }

    .btn-icon.disabled {
        background: #c8ccd8;
        cursor: not-allowed;
    }

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.btn-primary-eff2 {
    background: #2b3087;
    color: white;
    border-radius: 10px;
    padding: 10px 26px;
    border: none;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #de3646;
    color: #de3646;
    border-radius: 10px;
    padding: 10px 26px;
}

.btn-delete {
    background: rgba(222,54,70,0.1);
    color: #de3646;
}

    .btn-delete:hover {
        background: #de3646;
        color: white;
    }


/* =============================================================
   DETTAGLIO ORDINE / CARRELLO
   ============================================================= */




.pill-badge {
    position: absolute;
    top: -15px;
    right: -8px;
    display: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    font-size: 0.688rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

    .pill-badge:not(:empty) {
        min-width: 22px;
        width: auto;
        padding: 0 5px;
        border-radius: 11px; /* Diventa pillola se troppo largo */
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
    }
}

/* Rimuovi animazione se attivo */
.pill-filtro.active .pill-badge {
    animation: none;
}

.pill-filtro {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    background: white;
    color: #495057;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}


    .pill-filtro.active .ord-badge {
        background: #fff;
        color: #dc3545;
    }


.ordine-table {
    border-collapse: separate;
    border-spacing: 0 12px;
}

    .ordine-table thead th {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: #8c8f99;
        border: none;
    }

.ordine-row {
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
    transition: background-color 0.15s ease;
}

    .ordine-row td {
        border: none;
        padding: 7px 7px;
        background-color: transparent !important;
    }

    /*ZEBRA*/
    /* Zebrastripe */
    .ordine-row:nth-child(odd) {
        background-color: #ffffff;
    }

    .ordine-row:nth-child(even) {
        background-color: #f8fbff;
    }

    /* Hover su entrambe */
    .ordine-row:nth-child(odd):hover {
        background-color: #eef6ff;
    }

    .ordine-row:nth-child(even):hover {
        background-color: #e3efff;
    }



/*FINE ZEBRA*/






.table > :not(caption) > * > * {
    padding: 7px 7px;
}

.prodotto-img img {
    width: 90px;
    border-radius: 10px;
}

.prodotto-info .marca {
    font-size: 0.813rem;
    color: #8c8f99;
}

.prodotto-info .codice {
    font-size: 0.75rem;
    color: #6c757d;
}

.prodotto-info .nome {
    font-weight: 600;
    color: #2b3087;
    font-size: 1rem;
}

.qty-badge {
    background: rgba(43,48,135,0.1);
    color: #2b3087;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: 600;
}
/* Sovrascrittura prezzo/totale nel contesto ordine (override del .prezzo globale) */
.ordine-dettaglio .prezzo {
    font-size: inherit;
    font-weight: 500;
    color: #2b3087;
}

.ordine-dettaglio .totale {
    font-weight: 700;
    font-size: 1rem;
    color: #2b3087;
}

.ordine-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8ebf5;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-note {
    font-size: 0.813rem;
    color: #8c8f99;
}

.footer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.125rem;
}

    .footer-total strong {
        font-size: 1.5rem;
        color: #2b3087;
    }

.footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

@media (max-width: 768px) {
    .ordini-table thead {
        display: none;
    }

    .ordini-table tbody tr {
        display: block;
        background: #fff;
        border-radius: 10px;
        margin-bottom: 15px;
        padding: 15px;
    }

    .ordini-table td {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        border: none;
    }
}
/* =============================================================
   MODALE INDIRIZZI
   ============================================================= */

.indirizzo-card {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

    .indirizzo-card:hover {
        border-color: rgb(43,46,135);
        background: #f5f6ff;
    }

    .indirizzo-card.selected {
        border-color: rgb(43,46,135);
        background: #f0f1ff;
    }

    .indirizzo-card .badge-check {
        width: 22px;
        height: 22px;
        border-radius: 50%;
        border: 2px solid #dee2e6;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: all 0.2s;
    }

    .indirizzo-card.selected .badge-check {
        background: rgb(43,46,135);
        border-color: rgb(43,46,135);
        color: white;
    }
/* =============================================================
   TOOLTIP UTENTE
   ============================================================= */


.tooltip-utente .tooltip-inner {
    max-width: 280px; /* larghezza massima */
    width: 280px; /* larghezza fissa */
    text-align: left; /* allineamento testo */
    padding: 10px 14px; /* un po' di respiro */
    font-size: 0.813rem;
    line-height: 1.6;
    background-color: #2b3087;
    color: white;
}
/* =============================================================
   STATO ORDINE
   ============================================================= */


.ordine-stato {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 130px;
}

.badge-stato {
    display: flex; /* non inline-flex */
    align-items: center;
    justify-content: center;
    width: 100%; /*   si allarga al contenitore */
    padding: 5px 14px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.stato-evaso {
    background-color: #eef6f1 !important;
    color: #2f6b4f !important;
    border: 1px solid #c9e2d5;
    box-shadow: none;
}

.stato-daevadere {
    background-color: #fff6e3;
    color: #9a6b12;
    border: 1px solid #f1d9a6;
    box-shadow: none;
}

.stato-status {
    background: rgba(43,48,135,0.08);
    color: #2b3087;
    border: 1px solid rgba(43,48,135,0.15);
}
/* =============================================================
   TOAST RICECA SU CARRELLo
   ============================================================= */

#toast-risultati-body .row {
    justify-content: center !important;
}

#toast-risultati-body [class*="col-"] {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 8px !important;
}

/*nasconde filter btn addtocart quando  faccio vedere nel carrelo le card degli articoli*/
#toast-risultati-body .btn-add-cart,
#toast-risultati-body .row.justify-content-around {
    display: none !important;
}

.codice .codice-value {
    color: #2b3087;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px dashed #2b3087;
    transition: all 0.2s;
}

    .codice .codice-value:hover {
        color: #fff;
        background: #2b3087;
        border-radius: 4px;
        padding: 1px 5px;
        border-bottom: none;
    }

.codice-value {
    cursor: pointer;
    transition: color 0.2s;
}

    .codice-value:hover {
        text-decoration: underline;
        opacity: 0.8;
    }

    .codice-value.copied {
        color: green;
    }

        .codice-value.copied::after {
            content: " ✓";
            font-size: 0.85em;
        }

.codice-value {
    cursor: pointer;
    position: relative;
}

    .codice-value:hover {
        opacity: 0.75;
    }

.tooltip-copiato {
    position: absolute;
    top: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    animation: fadeInOut 1.5s ease forwards;
}




/* =============================================================
   del su riga ordine
   ============================================================= */

.btn-delete {
    background-color: #fff0f0;
    color: #e53935;
    border: 1px solid #ffcdd2;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

    .btn-delete:hover {
        background-color: #e53935;
        color: #fff;
        border-color: #e53935;
    }





.ordine-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}




.totale-ordine {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2b3087;
    background: #f4f6fb;
}



.importo-residuo {
    font-size: 1.1rem;
    font-weight: 600;
    color: #c0392b; /* meno acceso */
}

.col-qta,
.col-sconti,
.col-totale {
    text-align: center;
}

.col-totale {
    font-weight: 900;
    color: #2b3087;
}

.numero-ordine {
    font-size: 1.3rem;
    font-weight: 700;
}

/*.btn-elimina-riga {
    background: #fff5f5;
    border: 1px solid #f1b0b0;
    color: #b03030;
}*/

.btn-elimina-riga {
    background: #fff;
    border: 1px solid #e0caca;
    color: #b84545;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

    .btn-elimina-riga:hover {
        background: #fff5f5;
        border-color: #d88;
        color: #992e2e;
    }

.btn-PDF {
    background: #fff;
    border: 1px solid #f1b0b0;
    color: #0d6efd;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

    .btn-PDF:hover {
        background: #f1b0b014;
        border-color: #d88;
        color: #992e2e;
    }


/*.btn-conferma-ordine {
    background: #2b3087;
    color: #fff;
    border: none;
    padding: 10px 22px;
    font-weight: 600;
    border-radius: 6px;
    transition: background 0.2s ease, transform 0.1s ease;
}

    .btn-conferma-ordine:hover {
        background: #373da5;
        transform: translateY(-1px);
    }*/
.btn-conferma {
    background: linear-gradient(135deg, #2b3087, #3a409f);
    color: #fff;
    border: none;
    padding: 12px 26px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(43,48,135,0.25);
    transition: all 0.2s ease;
}

    .btn-conferma:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(43,48,135,0.35);
    }

.btn-apri {
    background: #2b3087;
    color: #fff;
    border-radius: 8px;
    padding: 8px 18px;
}

    .btn-apri:hover {
        background: #3a409f;
    }



.btn-back {
    font-size: 0.9rem;
    color: #2b3087;
    text-decoration: none;
    font-weight: 500;
}


.page-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 4px;
}



.combo-spinner {
    display: inline-block;
    width: 10px;
    height: 10px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: combo-spin 0.6s linear infinite;
    vertical-align: middle;
    opacity: 0.7;
    margin-left: 4px;
}

@keyframes combo-spin {
    to {
        transform: rotate(360deg);
    }
}

 

.combo-loading {
    opacity: 0.75;
    cursor: wait !important;
}

/* Combo con selezione attiva che si sta aggiornando: pulsazione blu */
.btn-combo-active.combo-loading {
    opacity: 1;
    animation: combo-active-pulse 0.7s ease-in-out infinite alternate;
}

@keyframes combo-active-pulse {
    from {
        background: rgba(43, 46, 135, 0.10) !important;
        border-color: rgba(43, 46, 135, 0.5) !important;
    }
    to {
        background: rgba(43, 46, 135, 0.28) !important;
        border-color: #2b2e87 !important;
    }
}
























 

/* =============================================================
    riga ordine resposnive x mobile
   ============================================================= */



@media (max-width: 1600px) {



    .info-chip {
        width: 170px;
    }

        .info-chip.chip-spedizione {
            width: 260px;
        }
}

@media (max-width: 1400px) {


    .info-chip {
        width: 150px;
        height: 52px;
    }

        .info-chip.chip-spedizione {
            width: 210px;
        }

    /* Scheda prodotto */
    .product-page {
        max-width: 100%;
    }

    .product-image-box {
        padding: 10px;
    }

    .main-product-image {
        max-height: 180px;
    }

    .product-title {
        font-size: 1.125rem;
        margin-bottom: 4px !important;
    }

    .product-title .subtitle {
        font-size: 0.75rem;
    }

    .main-price {
        font-size: 1.063rem;
        margin-bottom: 8px !important;
    }

    .price-box {
        margin-top: 8px;
    }

    .purchase-box {
        margin-top: 8px !important;
        gap: 8px;
    }

    /* Purchase-box: qty e PDF stessa larghezza, carrello meno largo */
    .purchase-box .qta-input {
        width: 72px !important;
        max-width: 72px !important;
        flex: 0 0 72px !important;
    }

    .purchase-box .btn-add-cart {
        min-width: unset !important;
        flex: 0 1 auto !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .purchase-box .btn-scheda-pdf {
        width: 72px !important;
        flex: 0 0 72px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Spaziatura tra le righe delle card */
    #prodotti-container .row {
        --bs-gutter-x: 0.5rem;
        --bs-gutter-y: 0.5rem;
    }

    /* Override padding inline sulle colonne card */
    #prodotti-container [class*="col-"] {
        padding: 4px !important;
    }

    .product-breadcrumb {
        padding: 6px 0;
        font-size: 0.75rem;
    }

    .back-to-results {
        margin-bottom: 4px;
    }

    .row.mt-4 {
        margin-top: 8px !important;
    }
}

@media (max-width: 1024px) {


    .ordine-row td {
        border: none;
        padding: 2px;
    }

    .table > :not(caption) > * > * {
        padding: 0px;
    }
}


@media (max-width: 768px) {

    /* ── Tabella righe ordine ── */
    .ordine-table thead {
        display: none;
    }

    .ordine-table tbody td[data-label]:not([data-label=""]) {
        display: flex !important;
        align-items: baseline;
        gap: 6px;
        text-align: left !important;
        justify-content: flex-start !important;
        margin: 5px;
    }

        .ordine-table tbody td[data-label]:not([data-label=""])::before {
            content: attr(data-label) ":";
            flex-shrink: 0;
            font-size: 0.7rem;
            font-weight: 600;
            color: #aaa;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            min-width: 70px;
        }

    .ordine-table tbody tr {
        display: block;
        border: 1px solid #e8ebf5;
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 10px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    .ordine-table tbody td.prodotto-img {
        justify-content: center;
        border-bottom: 1px solid #e8ebf5;
        padding-bottom: 10px;
        margin-bottom: 5px;
    }

    .ordine-row td {
        border: none;
        padding: 0px;
    }

    .table > :not(caption) > * > * {
        padding: 0px;
    }

    .img-prodotto {
        width: 70px;
        height: 70px;
        object-fit: contain;
    }

    /* ── Chip info (spedizione, pagamento, ecc.) ── */
    .graphic-body {
        display: flex;
        flex-direction: column !important;
        gap: 10px;
    }

    .info-chip {
        width: 100% !important;
        min-width: unset !important;
    }

    .chip-totale {
        background: #f2f4fa;
        font-size: 1.05rem;
        width: 70% !important;
    }

        .chip-totale .totale-strong {
            font-size: 1.2rem;
            font-weight: 700;
        }

    .ordine-body.graphic-body {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

        .ordine-body.graphic-body > .info-chip {
            width: 100% !important;
            max-width: 100% !important;
            flex: none !important;
        }

    /* ── Footer ordine ── */
    .ordine-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px;
        margin: 10px;
    }

        .ordine-footer > .footer-note {
            margin-left: 0 !important;
        }

        .ordine-footer > .d-flex {
            flex-direction: column !important;
            align-items: stretch !important;
            width: 100%;
        }

    .footer-totale-box {
        min-width: unset !important;
        width: 100% !important;
        margin: 0 0 10px 0 !important;
        box-sizing: border-box;
    }

    .ordine-footer .ms-auto {
        margin-left: 0 !important;
        width: 100%;
        flex-direction: column !important;
    }

    .ordine-footer .d-flex.gap-2 {
        flex-direction: column !important;
        width: 100%;
    }

    /* ── Bottoni ── */
    #btnCancOrdine,
    #btnConfermaOrdine {
        width: 100% !important;
        justify-content: center;
        text-align: center;
    }

    .btn-outline-danger,
    .btn-conferma-ordine {
        width: 100% !important;
        justify-content: center;
        text-align: center;
    }

    .btn-delete-full {
        width: 100%;
        min-width: 110px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 6px 12px;
        background: transparent;
        border: 1px dashed #ffcdd2;
        border-radius: 8px;
        color: #ccc;
        font-size: 0.8rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
        box-sizing: border-box;
    }

        .btn-delete-full:hover {
            background: #fff0f0;
            border-color: #e53935;
            color: #e53935;
        }

    /* ── Ordine content row ── */
    .ordine-content-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ordine-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px dashed #e8ebf5;
    }

    /* ── Card e pagina ── */
    .ordine-card {
        padding: 22px 12px;
    }

    .ordini-page {
        padding: 10px 20px;
        width: 90%;
    }

    .chip-totale {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* Desktop: mostra tooltip, nascondi placeholder visivamente */
@media (min-width: 768px) {
    input::placeholder {
        color: transparent;
    }
    /* mostra il tooltip con la tua libreria */
}

/* Mobile: nascondi tooltip, mostra placeholder */
@media (max-width: 767px) {
    input::placeholder {
        color: #999; /* visibile */
    }
    /* disabilita il tooltip */

    /* Navbar: icone e logo più piccoli su mobile */
    .icon-btn {
        width: 36px !important;
        height: 36px !important;
        margin-left: 2px !important;
    }

    .icon-btn .fa-2x,
    .icon-btn i {
        font-size: 1.3rem !important;
    }

    .navbar-brand img {
        height: 28px !important;
        width: auto !important;
        max-width: none !important;
    }

    .user-chip {
        padding: 4px 8px;
        font-size: 0.75rem;
        gap: 6px;
    }

    .user-name {
        display: none !important;
    }

    .user-avatar {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.7rem;
    }

    /* Logo footer sempre più piccolo del logo navbar */
    .brand-logo img {
        height: 22px !important;
    }
}

/* Laptop 15" — card più compatte per mostrare più prodotti in verticale */
@media (max-width: 1400px) {
    /* Card prodotto più compatta */
    .image-wrapper {
        min-height: 50px;
        padding: 2px 0;
    }

    .product-image {
        max-height: 46px;
    }

    .product-card {
        margin: 2px;
    }

    .product-card .card-body {
        padding: 8px !important;
    }

    .descrizione {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .prezzo {
        font-size: 0.938rem;
    }

    .disponibilita {
        font-size: 0.75rem;
        margin-top: 2px;
    }

    .brand {
        font-size: 0.75rem;
    }

    .codice {
        font-size: 0.688rem;
    }

    .descr-articolo {
        min-height: 28px;
    }

    /* Filtri più compatti */
    #formFiltri .form-check {
        margin-bottom: 2px !important;
    }

    #formFiltri .form-check-input {
        font-size: 0.875rem !important;
        width: 14px;
        height: 14px;
    }

    #formFiltri .form-check-label {
        font-size: 0.75rem !important;
        line-height: 1.4;
    }

    #formFiltri span strong {
        font-size: 0.75rem !important;
    }

    #formFiltri .btn.dropdown-toggle {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        font-size: 0.75rem !important;
    }

    #formFiltri input[type="text"] {
        padding-top: 3px !important;
        padding-bottom: 3px !important;
        font-size: 0.75rem !important;
    }

    #formFiltri small {
        font-size: 0.625rem !important;
    }

    #formFiltri .mb-3 {
        margin-bottom: 6px !important;
    }

    #formFiltri .pb-3 {
        padding-bottom: 4px !important;
    }

    #formFiltri .mt-0, #formFiltri .pt-0 {
        margin-top: 4px !important;
    }

    html {
        font-size: 0.875rem;
    }
}

