/* =============================================================
   LTP Mobile Nav v1.2
   Attivo SOLO sotto 768px
   ============================================================= */

@media (max-width: 768px) {

  /* Nasconde il menu originale Sharp su mobile e la linea residua */
  .main-navigation,
  .row.site-nav {
    display: none !important;
  }

  /* Nasconde immagine header decorativa e barra masthead */
  .site-masthead,
  header > img,
  header > img[src*="mag_header"] {
    display: none !important;
  }

  /* Comprime l'area logo */
  .row.logo-banner {
    margin: 0 !important;
    padding: 6px 0 !important;
  }

  .sitelogo {
    padding: 0 !important;
    text-align: left;
  }

  /* Logo mobile — sostituito via JS (più affidabile di content: url) */
  .sitelogo img {
    max-height: 50px !important;
    width: auto !important;
    display: block;
  }

  /* Elimina spazio colonna banner pubblicitario */
  .headerbanner {
    display: none !important;
  }

  /* -----------------------------------------------------------
     TOPBAR — Home | Esplora | ☰ Menu | Shop
     ----------------------------------------------------------- */
  .ldp-topbar {
    position: sticky;
    top: 0;
    z-index: 9000;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.10);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    display: flex;
    align-items: stretch;
    height: 48px;
  }

  .ldp-topbar a,
  .ldp-topbar button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    border-right: 1px solid rgba(0,0,0,.06);
    color: #444;
    font-size: 10px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    transition: background .12s;
    font-family: inherit;
  }

  .ldp-topbar a:last-child,
  .ldp-topbar button:last-child {
    border-right: none;
  }

  .ldp-topbar a:active,
  .ldp-topbar button:active {
    background: rgba(0,0,0,.04);
  }

  .ldp-topbar a.ldp-bar--shop {
    color: #b85c00;
  }

  .ldp-topbar button.ldp-bar--active {
    background: #1a1a1a;
    color: #fff;
  }

  .ldp-ico {
    font-size: 18px;
    line-height: 1;
  }

  /* -----------------------------------------------------------
     DRAWER ESPLORA — pannello da sinistra (Primary Navigation)
     Identico al drawer Menu ma si apre da sinistra
     ----------------------------------------------------------- */
  .ldp-chips-wrap {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: #fff;
    z-index: 9900;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }

  .ldp-chips-wrap.ldp-open {
    transform: translateX(0);
  }

  /* Intestazione drawer Esplora */
  .ldp-esplora-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
    flex-shrink: 0;
  }

  .ldp-esplora-head span {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
  }

  .ldp-esplora-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }

  /* Contenuto drawer Esplora */
  .ldp-esplora-nav {
    padding: 8px 0;
    flex: 1;
    overflow-y: auto;
  }

  /* Sezione per ogni voce padre nel drawer Esplora */
  .ldp-section {
    border-bottom: 1px solid rgba(0,0,0,.06);
  }

  .ldp-section:last-child {
    border-bottom: none;
  }

  /* Link padre — grassetto, cliccabile */
  .ldp-section-title {
    display: block;
    padding: 12px 16px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    background: #fff;
  }

  .ldp-section-title:active {
    background: #f0f0f0;
    text-decoration: none;
  }

  /* Link figli — indentati */
  .ldp-section-children {
    padding: 0 0 6px 0;
    background: #fafafa;
  }

  .ldp-section-children a {
    display: block;
    padding: 9px 16px 9px 28px;
    color: #555;
    font-size: 13px;
    text-decoration: none;
    border-top: 1px solid rgba(0,0,0,.04);
  }

  .ldp-section-children a:active {
    background: #efefef;
    text-decoration: none;
  }

  /* -----------------------------------------------------------
     DRAWER — menu Primo Header (Masthead Navigation)
     ----------------------------------------------------------- */
  .ldp-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 9800;
  }

  .ldp-overlay.ldp-open { display: block; }

  .ldp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    max-width: 300px;
    background: #fff;
    z-index: 9900;
    transform: translateX(100%);
    transition: transform .25s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }

  .ldp-drawer.ldp-open {
    transform: translateX(0);
  }

  .ldp-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(0,0,0,.08);
  }

  .ldp-drawer-head span {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
  }

  .ldp-drawer-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
  }

  .ldp-drawer-nav {
    padding: 8px 0;
    flex: 1;
  }

  .ldp-drawer-nav a {
    display: block;
    padding: 12px 16px;
    color: #1a1a1a;
    font-size: 15px;
    text-decoration: none;
    border-bottom: 1px solid rgba(0,0,0,.05);
  }

  .ldp-drawer-nav a:active {
    background: rgba(0,0,0,.04);
  }

  .ldp-drawer-sub a {
    padding-left: 28px !important;
    font-size: 13px !important;
    color: #555 !important;
  }

  /* Riduce spazio eccessivo nell'area titolo pagina */
  .entry-header,
  .page-header,
  .post-thumbnail,
  .featured-image,
  .entry-thumbnail {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Riduce padding attorno al titolo della pagina */
  .entry-title,
  .page-title,
  h1.entry-title {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
    padding-top: 0 !important;
  }

  /* Comprime il box grigio del titolo che appare nelle pagine */
  .entry-header.no-featured-image,
  .post-thumbnail-none {
    min-height: 0 !important;
    padding: 8px 0 !important;
  }

  /* Spazio generale contenuto pagina */
  .entry-content,
  .post-content {
    margin-top: 8px !important;
  }


}
/* Fine media query mobile */

/* ------------------------------------------------------------
   RICERCA nel pannello Esplora — 27/08/2026
   Su mobile la barra masthead, dove il form sta su desktop, e'
   nascosta: senza questo blocco da telefono non c'e' modo di
   cercare, e il telefono e' la gran parte del traffico.
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .ldp-esplora-cerca {
    display: flex; gap: 6px; padding: 12px 16px; margin: 0;
    border-bottom: 1px solid #eee; background: #fafafa;
  }
  .ldp-esplora-cerca input[type="search"] {
    flex: 1; min-width: 0; height: 38px; padding: 0 12px;
    border: 1px solid #ddd; border-radius: 4px;
    background: #fff; color: #333;
    font-size: 16px; /* sotto i 16px iOS zooma da solo sul focus */
    -webkit-appearance: none; appearance: none;
  }
  .ldp-esplora-cerca input[type="search"]:focus {
    border-color: #c8922a;
    outline: 2px solid rgba(200, 146, 42, .25); outline-offset: 1px;
  }
  .ldp-esplora-cerca button {
    flex: none; height: 38px; padding: 0 16px; border: 0;
    border-radius: 4px; background: #4cba39; color: #fff;
    font-size: 15px; cursor: pointer;
  }
  .ldp-esplora-cerca button:active { background: #3f9a30; }
}
