/* Menu proposal 02. Deliberately scoped to avoid changing page and flyer controls. */
body.tv-menu-open{overflow:hidden}
#menuCategorie{box-sizing:border-box;position:fixed;inset:100px auto auto 50%;transform:translateX(-50%);margin:0;width:min(1180px,calc(100% - 48px));max-width:none;max-height:calc(100dvh - 124px);padding:28px;border:1px solid #e2e9e3;border-radius:20px;background:#fff;color:#17251e;box-shadow:0 24px 72px #09291e26;overflow:auto;overscroll-behavior:contain;font-family:inherit;font-size:16px;line-height:1.4}
#menuCategorie.hidden,#menuCategorie [hidden]{display:none!important}
#menuCategorie::backdrop{background:#12261f66}
#menuCategorie *,#menuCategorie *::before,#menuCategorie *::after{box-sizing:border-box}
#menuCategorie button,#menuCategorie a{-webkit-tap-highlight-color:transparent}
#menuCategorie button{font:inherit;cursor:pointer}
#menuCategorie a{color:inherit;text-decoration:none}
#menuCategorie :focus-visible{outline:3px solid #328255;outline-offset:4px}
#menuCategorie .tv-menu-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
#menuCategorie h2{margin:0;font-size:26px;font-weight:700;line-height:1.25}
#menuCategorie .tv-menu-logo,#menuCategorie .tv-menu-mobile-heading{display:none}
#menuCategorie .tv-menu-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;border:0;border-radius:12px;background:#fff;color:#15261d}
#menuCategorie .tv-menu-close:hover{background:#eff6ed}
#menuCategorie .tv-menu-close svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#menuCategorie .tv-menu-tools{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}
#menuCategorie .tv-menu-city{display:flex;align-items:center;gap:10px;max-width:100%;min-height:44px;padding:6px 0;border:0;background:none;color:#17251e;font-weight:600;text-align:left}
#menuCategorie .tv-menu-city span:first-of-type{overflow-wrap:anywhere}
#menuCategorie img{display:block;flex-shrink:0}
#menuCategorie .tv-menu-quick{display:flex;gap:12px}
#menuCategorie .tv-menu-quick a{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;padding:10px 20px;border:1px solid #b9d1be;border-radius:12px;color:#075534;font-weight:600;background:#fff}
#menuCategorie .tv-menu-quick a:hover{background:#eff7ec}
#menuCategorie .tv-menu-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:24px}
#menuCategorie #categoriaList{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#menuCategorie .tv-menu-category-link{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:106px;padding:14px 9px;border:1px solid transparent;border-radius:14px;background:#f0f8eb;text-align:center;font-size:14px;line-height:1.25;font-weight:600;overflow-wrap:anywhere;transition:background .15s,border-color .15s}
#menuCategorie .tv-menu-category-link img{width:40px;height:40px}
#menuCategorie .tv-menu-category-link:hover{background:#e3f0d9;border-color:#9abd85}
#menuCategorie .tv-menu-all{background:#fff;border-color:#b9d1be}
#menuCategorie .tv-menu-secondary{display:flex;flex-direction:column;justify-content:center;gap:24px;padding-left:24px;border-left:1px solid #e0e7e1}
#menuCategorie .tv-menu-install-intro{text-align:center}
#menuCategorie .tv-menu-install-intro img{margin:0 auto 16px}
#menuCategorie .tv-menu-install-intro p{margin:0;font-size:20px;font-weight:700}
#menuCategorie .tv-menu-secondary:not(:has(.tv-menu-install:not([hidden]))) .tv-menu-install-intro{display:none}
#menuCategorie .tv-menu-install{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin:0;padding:12px 14px;border:0;border-radius:12px;background:#08613e;color:#fff;font-size:18px;font-weight:700;text-align:center}
#menuCategorie .tv-menu-install:hover{background:#064a30}
#menuCategorie .tv-menu-blog{display:flex;align-items:center;justify-content:space-between;min-height:44px;padding-top:20px;border-top:1px solid #e0e7e1;font-size:15px;color:#216342}
#menuCategorie .tv-menu-blog:hover{text-decoration:underline}
#tv-menu-status{margin:0 0 12px;color:#55645b}
#tv-menu-retry{min-height:44px;margin:0 0 12px;padding:10px 20px;border:1px solid #b9d1be;border-radius:10px;background:#f0f8eb;color:#075534}
@media(max-width:1000px) and (min-width:768px){#menuCategorie .tv-menu-layout{grid-template-columns:minmax(0,1fr) 195px;gap:16px}#menuCategorie .tv-menu-secondary{padding-left:16px}#menuCategorie .tv-menu-category-link{font-size:13px}}
@media(max-width:767px){
 #menuCategorie{inset:0;transform:none;width:100%;height:100%;height:100dvh;max-height:100%;max-height:100dvh;padding:18px 20px calc(18px + env(safe-area-inset-bottom));border:0;border-radius:0;box-shadow:none}
 #menuCategorie[open]{display:flex;flex-direction:column;overflow:hidden}
 #menuCategorie .tv-menu-top{margin-bottom:10px}
 #menuCategorie .tv-menu-logo{display:block;min-width:0}
 #menuCategorie .tv-menu-logo img{width:min(207px,100%);height:auto}
 #menuCategorie h2{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #menuCategorie .tv-menu-tools{display:block;margin-bottom:20px}
 #menuCategorie .tv-menu-city{margin-bottom:12px}
 #menuCategorie .tv-menu-quick{display:grid;grid-template-columns:1fr 1fr;gap:10px}
 #menuCategorie .tv-menu-quick a{padding:10px 8px;font-size:15px}
 #menuCategorie .tv-menu-top,#menuCategorie .tv-menu-tools{flex-shrink:0}
 #menuCategorie .tv-menu-layout{display:flex;flex-direction:column;flex:1;min-height:0;gap:0}
 #menuCategorie .tv-menu-main{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:4px;margin:-4px}
 #menuCategorie .tv-menu-mobile-heading{display:block;margin:0 0 12px;font-size:20px;font-weight:700}
 #menuCategorie #categoriaList{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 #menuCategorie .tv-menu-category-link{min-height:86px;padding:12px 8px;font-size:14px;gap:6px}
 #menuCategorie .tv-menu-category-link img{width:36px;height:36px}
 #menuCategorie .tv-menu-secondary{flex-shrink:0;gap:4px;padding:12px 0 0;margin-top:12px;border:0;border-top:1px solid #e0e7e1;background:#fff}
 #menuCategorie .tv-menu-install-intro{display:none}
 #menuCategorie .tv-menu-blog{justify-content:center;gap:12px;border:0;padding:8px;min-height:44px}
}
@media(prefers-reduced-motion:reduce){#menuCategorie .tv-menu-category-link{transition:none}}

/* Installation outside the menu, sharing the existing PWA lifecycle. */
.tv-header-install-actions{display:none}
.tv-header-install[hidden],.tv-install-banner[hidden],.tv-install-banner [hidden]{display:none!important}
.tv-header-install,.tv-install-banner-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 16px;border:0;border-radius:12px;background:#08613e;color:#fff;font:inherit;font-weight:700;line-height:1.2;cursor:pointer;white-space:nowrap}
.tv-header-install:hover,.tv-install-banner-action:hover{background:#064a30}
.tv-header-install:focus-visible,.tv-header-list-desktop:focus-visible,.tv-install-banner button:focus-visible{outline:3px solid #328255;outline-offset:3px}
.tv-install-banner{display:none}
@media(min-width:768px){
 .tv-header-inner{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px 20px}
 .tv-header-inner>div:first-of-type{grid-area:1/1;display:flex;align-items:center;gap:12px}
 .tv-header-inner>div:first-of-type>.tv-shopping-header-link{display:none}
 .tv-header-inner>.tv-header-install-actions{grid-area:1/2;display:flex;align-items:center;justify-content:flex-end;gap:12px}
 .tv-header-list-desktop{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;color:#075534;font-size:14px;font-weight:600;white-space:nowrap}
 .tv-header-inner>.tv-mobile-brand-row{grid-area:2/1;min-width:0;width:100%}
 .tv-header-inner>.tv-desktop-city-row{grid-area:2/2;min-width:0;width:max-content;justify-self:end;flex-wrap:nowrap;justify-content:flex-end}
 .tv-header-inner .tv-mobile-brand-search,.tv-header-inner .tv-mobile-brand-input{width:100%;max-width:none}
 .tv-header-inner .tv-mobile-brand-input{min-width:0}
 .tv-header-inner #comuni.tv-header-select{width:190px}
 .tv-header-inner .tv-desktop-geolocate{width:44px;min-width:44px;padding:0;justify-content:center}
 .tv-header-inner .tv-desktop-geolocate>span:last-child{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
}
@media(min-width:1200px){
 .tv-header-inner{max-width:1440px;grid-template-columns:auto minmax(170px,1fr) auto auto;gap:16px}
 .tv-header-inner>.tv-mobile-brand-row{grid-area:1/2}
 .tv-header-inner>.tv-desktop-city-row{grid-area:1/3}
 .tv-header-inner>.tv-header-install-actions{grid-area:1/4}
}
@media(min-width:768px) and (max-width:1199px){#menuCategorie{top:148px;max-height:calc(100dvh - 172px)}}
@media(max-width:767px){
 .tv-header-inner>.tv-header-install-actions{display:none!important}
 .tv-install-banner{position:fixed;z-index:950;left:0;right:0;bottom:0;display:flex;align-items:center;gap:10px;padding:12px max(12px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));background:#fff;border-top:1px solid #dde7df;box-shadow:0 -6px 24px #173f2310;color:#17251e;box-sizing:border-box}
 .tv-install-banner-icon{flex:0 0 44px;border-radius:11px;box-shadow:0 2px 10px #173f2310}
 .tv-install-banner-copy{display:flex;flex-direction:column;flex:1;min-width:0;font-size:13px;line-height:1.35}
 .tv-install-banner-copy strong{font-size:14px}
 .tv-install-banner-copy span{color:#5b685f}
 .tv-install-banner-action{flex-shrink:0;border-radius:999px;font-size:14px;padding:10px 16px}
 .tv-install-banner-close{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:10px;border:0;background:transparent;color:#69756d;cursor:pointer}
 .tv-install-banner-close svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
 body.tv-install-banner-visible{padding-bottom:var(--tv-install-banner-height,88px)}
 body.tv-menu-open .tv-install-banner,body.tv-mobile-overlay-open .tv-install-banner{display:none}
}
@media(max-width:359px){.tv-install-banner{gap:6px;padding-left:8px;padding-right:8px}.tv-install-banner-icon{width:36px;height:36px;flex-basis:36px}.tv-install-banner-copy strong{font-size:12px}.tv-install-banner-copy{font-size:12px}.tv-install-banner-action{padding:10px 12px}}

/* The city selector is a second native dialog above the still-open menu. */
dialog#mobileComuneOverlay{position:fixed;inset:0;margin:0;padding:18px 14px;width:100%;height:100%;height:100dvh;max-width:none;max-height:none;border:0;background:transparent;color:#17251e;align-items:center;justify-content:center;overflow:hidden}
dialog#mobileComuneOverlay::backdrop{background:transparent}
dialog#mobileComuneOverlay[hidden]{display:none!important}
dialog#mobileComuneOverlay .tv-mobile-overlay-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;background:rgba(15,23,42,.3)}
dialog#mobileComuneOverlay #mobileComunePanel{position:relative;box-sizing:border-box;width:min(100%,540px);max-height:calc(100dvh - 36px);margin:0;padding:24px;border:1px solid #cfe8c5;border-radius:20px;background:#fff;box-shadow:0 24px 70px #09291e33;overflow-y:auto;overscroll-behavior:contain}
dialog#mobileComuneOverlay .tv-mobile-comune-panel-head h2{margin:0 0 18px;font-size:22px;line-height:1.2;text-align:center}
@media(max-width:767px){dialog#mobileComuneOverlay{height:var(--tv-comune-viewport-height,100dvh);top:var(--tv-comune-viewport-top,0px);bottom:auto}dialog#mobileComuneOverlay #mobileComunePanel{max-height:calc(var(--tv-comune-viewport-height,100dvh) - 36px);padding:20px}}
