/*
 ============================================================
 CONFORTI — Mobile Header/Footer "PWA style"  v6
 ============================================================ 
*/
.product-cdni-mobile {
  display: none !important;
}
#mobile-topbar {
  display: none;
}
@media (max-width: 991.98px) {
  #header,
  .header-wrap-clone {
    display: none !important;
  }
	.section ,
	.content-wrap {
		padding-bottom: 0px !important;
	}			
	#copyrights {
		display:none;
	}		  
  #productlist .product-cdni,
  #productlist .product-cdni.grid-inner {
    display: none !important;
  }
  .product-cdni-mobile {
    display: block !important;
  }
  .content-wrap {
    padding: 10px 0 !important; 
  }  
}
@media (max-width: 991.98px) {
  #mobile-topbar {
    display: flex !important;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 48px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.10);
    z-index: 2200;               /* sopra al login dropdown del Canvas (2100) */
    align-items: center;
    justify-content: flex-end;   /* contatti + lingua + login a destra */
    gap: 14px;
    padding: 0 12px;
  }
  /* Wordmark piccolo opzionale a sinistra nella top bar */
  #mobile-topbar .mtb-logo {
    margin-right: auto;
    display: flex;
    align-items: center;
  }
  #mobile-topbar .mtb-logo img {
    height: 40px;
    width: auto;
    display: block;
    margin-top: 5px;
    margin-bottom: 5px;
  }
  /* ── Icone contatto (tel / mail / maps) — solo icona ───────── */
  #mobile-topbar .mtb-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none !important;
    flex-shrink: 0;
  }
  #mobile-topbar .mtb-icon-link .mtb-icon {
    width: 19px;
    height: 19px;
  }
  /* ── LINGUA — icona statica + dropdown vuoto ─────────────────
    Trigger: solo icona (globo), stesso stile di tel/mail/maps.*/
  #mobile-topbar .mtb-lang {
    position: relative;
  }
  #mobile-topbar .mtb-lang-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    min-width: 150px;
    z-index: 2250;
  }
  #mobile-topbar .mtb-lang.open .mtb-lang-menu {
    display: block;
  }
  /* ── LOGIN — icona statica nuda + dropdown vuoto ─────────────
    Trigger: icona persona, nessuno sfondo/cerchio, stesso stile di tel/mail/maps  */
  #mobile-topbar .mtb-login {
    position: relative;
  }
  #mobile-topbar .mtb-login-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
    min-width: 220px;
    max-width: 86vw;
    z-index: 2250;
  }
  #mobile-topbar .mtb-login.open .mtb-login-menu {
    display: block;
  }
  /* Spacer in testa alla pagina = altezza top bar */
  body {
    padding-top: 48px !important;
  }
}
/* BOTTOM BAR — fissa in basso, menu in scroll orizzontale */
#mobile-bottombar,
#mobile-bottombar-wrap {
  display: none;
}

@media (max-width: 991.98px) {
  #contentsection .section,
  .section {
      padding: 5px 0;
      margin: 5px 0;
  }  
  #mobile-bottombar-wrap {
    display: block !important;
  }
  #mobile-bottombar {
    display: flex !important;
    position: absolute;
    inset: 0;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,.12);
    align-items: stretch;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  #mobile-bottombar::-webkit-scrollbar {
    display: none;
  }
  #mobile-bottombar .mbb-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 16px;
    min-width: 76px;
    text-decoration: none !important;
    color: #555;
    white-space: nowrap;
  }
  /* Icone SVG inline (sostituiscono l'icon-font): eredita il
     colore corrente via stroke="currentColor" nel markup, quindi
     basta colorare il link .mbb-item per cambiare anche l'icona. */
  #mobile-bottombar .mbb-icon {
    width: 19px;
    height: 19px;
    color: #888;
    flex-shrink: 0;
  }
  #mobile-bottombar .mbb-item span {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .01em;
  }
  /* Voce attiva (pagina corrente) */
  #mobile-bottombar .mbb-item.active {
    color: #009FE3; 
  }
  #mobile-bottombar .mbb-item.active .mbb-icon {
    color: #009FE3;
  }
  /* Separatore visivo leggero tra le voci */
  #mobile-bottombar .mbb-item:not(:last-child) {
    border-right: 1px solid #f0f0f0;
  }
  /* ── Indicatori "c'è altro a sx/dx" ───────────────────────────
     Senza un segnale visivo la barra sembra finita: una sfumatura
     su ciascun bordo suggerisce che si può scorrere in quella
     direzione. Il wrapper #mobile-bottombar-wrap contiene barra +
     entrambi i fade (vedi markup), perché i fade devono restare
     fissi mentre la barra scrolla sotto di loro.                  */
  #mobile-bottombar-wrap {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,.12);
    z-index: 2100;
  }
  #mobile-bottombar-wrap #mobile-bottombar {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    height: 60px !important;
    box-shadow: none;
  }

  #mobile-bottombar-fade-right,
  #mobile-bottombar-fade-left {
    position: absolute;
    top: 0; bottom: 0;
    width: 34px;
    pointer-events: none;
    z-index: 2110;
    display: flex;
    align-items: center;
    transition: opacity .2s;
  }
  #mobile-bottombar-fade-right {
    right: 0;
    justify-content: flex-end;
    padding-right: 4px;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,.95) 65%);
  }
  #mobile-bottombar-fade-left {
    left: 0;
    justify-content: flex-start;
    padding-left: 4px;
    background: linear-gradient(to left, rgba(255,255,255,0), rgba(255,255,255,.95) 65%);
  }
  #mobile-bottombar-fade-right svg,
  #mobile-bottombar-fade-left svg {
    width: 18px;
    height: 18px;
    font-weight: bold;
    color: #b8b8b8;
  }
  #mobile-bottombar-fade-right svg {
    animation: mbb-hint-right 1.6s ease-in-out infinite;
  }
  #mobile-bottombar-fade-left svg {
    animation: mbb-hint-left 1.6s ease-in-out infinite;
  }

  /* Quando si è scrollato fino in fondo, la classe .is-end nasconde
     il fade destro; quando si è all'inizio, .is-start nasconde
     quello sinistro (aggiunte/rimosse via JS in base allo scroll). */
  #mobile-bottombar-wrap.is-end #mobile-bottombar-fade-right {
    opacity: 0;
  }
  #mobile-bottombar-wrap.is-start #mobile-bottombar-fade-left {
    opacity: 0;
  }

  @keyframes mbb-hint-right {
    0%, 100% { transform: translateX(0); opacity: .7; }
    50% { transform: translateX(3px); opacity: 1; }
  }
  @keyframes mbb-hint-left {
    0%, 100% { transform: translateX(0); opacity: .7; }
    50% { transform: translateX(-3px); opacity: 1; }
  }

  /* Spacer in fondo alla pagina = altezza bottom bar
     (in aggiunta, non sostituzione, dell'eventuale padding già presente) */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Il "Go to top" del tema: alziamolo sopra la bottom bar */
  #gotoTop {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  }
}
@media (min-width: 992px) {
  #mobile-topbar,
  #mobile-bottombar,
  #mobile-bottombar-wrap {
    display: none !important;
  }
}

/* ============================================================
   CARD PRODOTTO — scroll orizzontale stile carosello
   Solo nella pagina product.asp (#productlist), solo <992px.
   Non tocca il layout a righe del desktop.
   ============================================================ */
@media (max-width: 991.98px) {
  /* Il contenitore della lista diventa una riga scrollabile */
  #productlist {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 14px;
    padding: 4px 14px 6px !important;
    scrollbar-width: none;
  }
  #productlist::-webkit-scrollbar {
    display: none;
  }
  /* Ogni prodotto diventa una card a tutta-quasi larghezza */
  #productlist > .product {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    scroll-snap-align: start;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
    padding: 14px 14px 18px;
    margin: 0 !important; /* azzera margini bootstrap residui */
  }
  /* I divider verticali tra prodotti non hanno senso nel carosello */
  #productlist > .divider {
    display: none !important;
  }
  /* Dentro la card: struttura a colonna, immagine sopra, testo sotto */
  #productlist .grid-inner {
    display: flex !important;
    flex-direction: column !important;
  }
  #productlist .product-image {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  #productlist .product-image > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 180px;
    overflow: hidden;
  }
  #productlist .product-image img {
    max-height: 160px;
    max-width: 100%;
    width: auto;
    margin: 0 auto;
  }
  #productlist .product-desc {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-top: 10px !important;
  }
  /* Titolo: più compatto */
  #productlist .product-title h2,
  #productlist .product-title h3 {
    font-size: 17px;
    margin-bottom: 4px;
  }
  #productlist .product-title h3 {
    padding-left: 0px;
    padding-right: 0px;
    margin-left: 0px;
    margin-right: 0px;
    margin-bottom: 4px;
  }
  /* Sottotitolo: lo mostriamo (era d-none d-md-block), ma breve */
  #productlist .product-subtitle {
    display: block !important;
    font-size: 15px;
    line-height: 1.4;
    color: #666;
    margin-top: 6px !important;
    /* tronca a 3 righe per restare "ricco ma compatto" */
    display: -webkit-box !important;
    /* -webkit-line-clamp: 6; */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  /* Lista bullet: resta nascosta su mobile, troppo lunga per la card */
  #productlist .iconlist {
    display: none !important;
  }
  /* Badge "serie" (sale-flash): teniamo solo la versione mobile
     già prevista dal markup (d-block d-md-none) */
  #productlist .sale-flash.d-block.d-md-none {
    position: static !important;
    margin: 10px 0 0 !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center;
  }
  #productlist .grid-inner {
    position: relative !important;
  }

  #productlist .product-desc > a.button {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    position: absolute !important;
    top: -118px;
    right: 14px;
    left: auto;
    transform: none;
    float: none !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 6px 10px !important;
    border: none !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.85) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    z-index: 5;
  }
  /* Testo "Informazioni": stesso stile della label nella bottom bar */
  #productlist .product-desc > a.button span {
    font-size: 10.5px !important;
    font-weight: 600;
    letter-spacing: .01em;
    color: #333;
    line-height: 1;
  }
  /* Icona "scheda tecnica", disegnata via ::before (nessun markup
     nuovo). Più piccola di prima (20px) per via dello spazio preso
     dal testo sotto, stessa logica della bottom bar. */
  #productlist .product-desc > a.button::before {
    content: "";
    display: block;
    width: 20px;
    height: 20px;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: 20px 20px;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: 20px 20px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='1.5'/%3E%3Cpath d='M8.5 8h7'/%3E%3Cpath d='M8.5 12h7'/%3E%3Cpath d='M8.5 16h4'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='3.5' width='14' height='17' rx='1.5'/%3E%3Cpath d='M8.5 8h7'/%3E%3Cpath d='M8.5 12h7'/%3E%3Cpath d='M8.5 16h4'/%3E%3C/svg%3E");
    background-color: #333;
  }

  #productlist .grid-inner > .product-desc + .product-desc > a.button {
    position: static !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    padding: 8px 16px !important;
    border: 1px solid #ddd !important;
    border-radius: 18px !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 10px 0 0 !important;
  }
  #productlist .grid-inner > .product-desc + .product-desc > a.button span {
    font-size: 13px !important;
    font-weight: 600;
    color: #333;
  }
  #productlist .grid-inner > .product-desc + .product-desc > a.button::before {
    display: none;
  }
  /* card "Serie CD" contiene DUE product-desc in
     sequenza (CD standard + variante nichelata "CDNi"), con un
     secondo product-image VUOTO usato solo come spacer per il
     desktop. Su mobile: nascondiamo lo spacer vuoto e separiamo
     visivamente i due blocchi di testo con un piccolo divider. */
  #productlist .product-image:empty {
    display: none !important;
  }
  #productlist .product-desc + .product-desc {
    margin-top: 16px !important;
    padding-top: 14px !important;
    border-top: 1px dashed #e5e5e5;
  }
  /* ── Card "titolo pagina" — prima card del carosello ────────
     Contiene solo .page-header (h1 + sottotitolo): centrato,
     più semplice delle card prodotto (niente immagine/bottone). */
  #productlist > .product-pagehead {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
  #productlist > .product-pagehead .page-header {
    margin: 0 !important;
    padding: 0 !important;
  }
  #productlist > .product-pagehead .page-header span {
    padding-left: 0 !important;
    padding-right: 0 !important;
    font-size: 16px !important;
  }
 
  #productlist > .product-pagehead h1 {
    font-size: 22px;
    margin-bottom: 8px;
  }
  /* ── Card FAQ — ultima card del carosello ───────────────────
     l'altezza uniforme della riga del carosello. */
  #productlist > .product-faq {
    max-height: 70vh;
    overflow-y: auto;
  }
}

/* ── Card "titolo pagina" e "FAQ": reset su desktop ────────── */
@media (min-width: 992px) {
  #productlist > .product-pagehead,
  #productlist > .product-faq {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
}
/* ── Dots di navigazione sotto il carosello ──────────────────── */
#product-carousel-dots {
  display: none;
}
@media (max-width: 991.98px) {
  #product-carousel-dots {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 10px 0 4px;
    width: 100%;
  }
  #product-carousel-dots .pcd-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d8d8d8;
    transition: background .15s, transform .15s;
  }
  #product-carousel-dots .pcd-dot.active {
    background: #009FE3;  
    transform: scale(1.25);
  }
}

@media (min-width: 992px) {
  #product-carousel-dots {
    display: none !important;
  }
}
@media (max-width: 991.98px) {
  #wrapperx {
    display: flex !important;
    flex-direction: column;
    min-height: calc(100vh - 185px - env(safe-area-inset-bottom, 0px));
  }
  #footerx {
    margin-top: auto !important;
    max-height: 165px !important;
  }
}

#mtbLangMenu {
    display: none;
    position: fixed !important;
    top: 52px !important;
    right: 4px !important;
    left: auto !important;
    z-index: 99999 !important;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    padding: 10px 12px;
    gap: 12px;
    flex-direction: row;
    align-items: center;
}
#mtbLangMenu {
    flex-direction: column !important;
    width: fit-content !important;
}
#mtbLangMenu.is-open {
    display: flex !important;
}
#mtbLangMenu a {
    display: block;
    line-height: 0;
}
#mtbLangMenu a {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    padding: 2px 4px;
    line-height: 1 !important;
}
#mtbLangMenu a img {
    width: 24px !important;
    height: 16px !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
    border-radius: 2px !important;
    vertical-align: middle !important;
}
#mtbLangMenu a span {
  min-width: 50px !important;
}

@media (max-width: 991.98px) {
    #mtbLoginMenu {
        display: none;
        position: fixed !important;
        top: 52px !important;
        right: 8px !important;
        left: auto !important;
        z-index: 99999 !important;
        background: #d2d2d2;
        background: #d2d2d2 !important;
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0,0,0,.2);
        padding: 16px;
        width: 240px;
    }
    #mtbLoginMenu.is-open {
        display: block !important;
    }
    #mtbLoginMenu .form-group {
        margin-bottom: 10px;
    }
    #mtbLoginMenu input {
        background-color: #fff !important;
        color: #000 !important;
    }
    #mtbLoginMenu label a {
        color: #000;
        font-size: 13px;
    }
    #mtbLoginMenu .btn {
        font-size: 12px !important;
        padding: 6px 12px !important;
        height: auto !important;
    }    
    .mtb-prisma-link {
        display: flex !important;
        align-items: center;
        gap: 10px;
        padding: 10px 8px;
        color: #333;
        text-decoration: none;
        font-size: 14px;
        border-bottom: 1px solid #eee;
    }
    .mtb-prisma-link:last-child {
        border-bottom: none;
    }
    .mtb-prisma-link svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }
    .mtb-logout {
        color: #c00 !important;
    }
}
