/* Antico Granaione: navigazione mobile a pannello, indipendente dal menu desktop. */
@media(max-width:767px){
  html.ag-drawer-open,body.ag-drawer-open{overflow:hidden!important;overscroll-behavior:none}
  .ag-mobile-overlay{position:fixed!important;inset:0!important;background:rgba(24,20,18,.55)!important;z-index:2147483000!important;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}
  .ag-mobile-drawer{position:fixed!important;top:0!important;bottom:0!important;left:0!important;width:min(86vw,350px)!important;max-width:100vw!important;z-index:2147483001!important;background:#fffaf5!important;color:#4c352b!important;box-shadow:8px 0 30px rgba(0,0,0,.18)!important;transform:translateX(-105%);visibility:hidden;transition:transform .23s ease,visibility .23s ease;display:flex!important;flex-direction:column!important;overflow:hidden!important;font-family:Montserrat,Arial,sans-serif!important}
  html.ag-drawer-open .ag-mobile-overlay{opacity:1;visibility:visible}
  html.ag-drawer-open .ag-mobile-drawer{transform:translateX(0);visibility:visible}
  .ag-mobile-drawer-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:20px 20px 14px;border-bottom:1px solid #e5d7cb;flex-shrink:0}
  .ag-mobile-drawer-title{font-size:17px;font-weight:700;letter-spacing:.015em}
  .ag-mobile-drawer-close{border:1px solid #d6c3b3;background:white;border-radius:8px;width:46px;height:46px;font-size:27px;line-height:1;cursor:pointer;color:#633c30;flex-shrink:0}
  .ag-mobile-drawer-content{padding:10px 16px 28px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .ag-mobile-drawer-menu{display:flex;flex-direction:column;gap:3px}
  .ag-mobile-drawer-menu>a{display:flex!important;align-items:center!important;min-height:54px!important;padding:13px 15px!important;border-radius:8px!important;text-decoration:none!important;color:#50382f!important;font-size:17px!important;font-weight:600!important;line-height:1.4!important;letter-spacing:0!important;text-transform:none!important;white-space:normal!important;box-sizing:border-box!important}
  .ag-mobile-drawer-menu>a.selected,.ag-mobile-drawer-menu>a[aria-current="page"]{background:#f1e2d7!important;color:#873e2d!important}
  .ag-mobile-drawer-languages{display:flex;gap:9px;flex-wrap:wrap;margin:22px 0 16px;padding-top:18px;border-top:1px solid #e5d7cb}
  .ag-mobile-drawer-languages>a{display:flex;align-items:center;justify-content:center;min-width:48px;min-height:46px;border:1px solid #d6c3b3;border-radius:7px;background:white;color:#704838;font-size:15px;font-weight:700;text-decoration:none}
  .ag-mobile-drawer-languages>a.is-active{background:#843e2b;color:white;border-color:#843e2b}
  .ag-mobile-drawer-contacts{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid #e5d7cb}
  .ag-mobile-drawer-contacts>a{display:flex;align-items:center;gap:9px;min-height:46px;color:#704838;text-decoration:none;font-size:15px;font-weight:600}
  .ag-mobile-drawer-contacts svg{width:21px;height:21px}
  .ag-header .ag-menu-toggle{min-width:48px!important;min-height:48px!important;cursor:pointer!important;touch-action:manipulation!important}
  /* Disattiva la vecchia tendina: il pannello mobile è l'unica navigazione aperta. */
  .ag-header .ag-nav,.ag-header .ag-nav.open,.ag-header .ag-nav.ag-nav-v94.open,.ag-header:has(.ag-menu-toggle[aria-expanded="true"]) .ag-nav{display:none!important}
}
@media(prefers-reduced-motion:reduce){.ag-mobile-drawer,.ag-mobile-overlay{transition:none!important}}

/* Hamburger con etichetta leggibile sui dispositivi mobili. */
@media(max-width:767px){
 .ag-header .ag-menu-toggle{display:inline-flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:0!important;min-width:58px!important;min-height:56px!important;padding:3px 7px!important;line-height:1!important}
 .ag-header .ag-menu-toggle-icon{display:block;font-size:26px;line-height:1.05}
 .ag-header .ag-menu-toggle-label{display:block;font-family:Montserrat,Arial,sans-serif;font-size:10px!important;font-weight:700!important;letter-spacing:.08em;line-height:1.4!important;white-space:nowrap}
}
@media(min-width:768px){.ag-menu-toggle-label{display:none!important}}

/* V3: intestazione compatta su smartphone, logo sempre completo. */
@media (max-width:767px) {
  html body .ag-header {height:auto!important;min-height:0!important;padding:0!important;}
  html body .ag-header .ag-header-inner {
    display:grid!important;grid-template-columns:minmax(0,1fr) 58px!important;
    grid-template-rows:auto!important;column-gap:5px!important;row-gap:0!important;
    align-items:center!important;min-height:0!important;height:auto!important;
    padding:5px 9px 5px 7px!important;margin:0 auto!important;
    box-sizing:border-box!important;
  }
  html body .ag-header .ag-header-topbar,
  html body .ag-header .ag-header-inner>.ag-header-topbar,
  html body .ag-header .ag-header-inner>.ag-language-switch,
  html body .ag-header .ag-header-inner>a.ag-lang-direct,
  html body .ag-header .ag-header-contacts {display:none!important;}
  html body .ag-header .ag-brand {
    grid-column:1!important;grid-row:1!important;justify-self:stretch!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    width:100%!important;max-width:none!important;min-width:0!important;
    margin:0!important;padding:0!important;gap:5px!important;overflow:visible!important;
    flex:initial!important;
  }
  html body .ag-header .ag-brand img {width:43px!important;height:49px!important;flex:0 0 43px!important;object-fit:contain!important;}
  html body .ag-header .ag-brand-text {display:flex!important;flex:1 1 auto!important;min-width:0!important;max-width:none!important;overflow:visible!important;align-items:center!important;}
  html body .ag-header .ag-brand-text strong {
    display:block!important;max-width:100%!important;overflow:visible!important;
    text-overflow:clip!important;white-space:nowrap!important;
    font-family:'Cinzel',Georgia,serif!important;text-transform:uppercase!important;
    font-size:clamp(13px,3.7vw,19px)!important;font-weight:800!important;
    font-synthesis:weight!important;letter-spacing:.005em!important;line-height:1.15!important;
  }
  html body .ag-header .ag-brand-text small {font-size:7px!important;font-weight:800!important;letter-spacing:.65px!important;white-space:nowrap!important;}
  html body .ag-header .ag-brand-text i {font-size:10px!important;line-height:1!important;}
  html body .ag-header .ag-menu-toggle {
    grid-column:2!important;grid-row:1!important;justify-self:end!important;
    margin:0!important;position:relative!important;top:auto!important;right:auto!important;
    width:58px!important;height:56px!important;min-width:58px!important;min-height:56px!important;
    flex:none!important;
  }
}
@media(max-width:365px){
 html body .ag-header .ag-brand img{width:37px!important;flex-basis:37px!important}
 html body .ag-header .ag-brand-text strong{font-size:12px!important;letter-spacing:0!important}
}
