:root {
    /* Neutrals */
    --bg: #F6F4F1;
    --surface: #FFFFFF;
    --ink: #565656;
    --muted: #6F6F6A;
    --line: #E6E1D9;
    --footer-bg: #6F6F6A;
    --footer-ink: #E6E1D9;
    --footer-muted: #aea89d;

    /* Accent (design) */
    --accent: #7E8F7A;

    /* sage */
    --accent2: #C6A982;

    /* wood hint */
    /* Typography */
    --font-title: "Cabin", ui-sans-serif, system-ui, sans-serif;
    --font-body: "Amiko", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* NAV CONTAINER */
.sandwich-nav {
    position: fixed;
    bottom: 70px;
    left: 0;
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 70px);
    background: #fff;
    transform: translateY(110%);
    transition: transform .35s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.sandwich-nav.active {
    transform: translateY(0);
}

/* SCROLL */
.sandwich-scroll {
    flex: 0 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    background-color: #F6F4F1;
    padding-bottom: 10px;
    padding-top: 10px;
    border-radius: 10px;
    padding-right: 15px;
    padding-left: 15px;
}

/* LISTA */
.sandwich-list {
    margin: 0;
    padding: 0;
}

/* VOCI */
.sandwich-item {
    border-bottom: 1px solid #f0f0f0;
    list-style: none !important;
}

.sandwich-link {
    text-decoration: none;
    display: flex;
    padding: 10px 20px 7px;
    width: 100%;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    background-color: #ffffff;
    margin-top: 5px;
    margin-right: 5px;
    border-radius: 10px;
    font-size: 18px;
    font-family: 'Amiko', sans-serif;
    box-shadow: 2px 2px 4px 0px #d0d0d0;
    margin-bottom: 4px;
    align-content: center;
    text-align: left;
    align-items: center;
    justify-content: space-between;
}

.sandwich-link:hover {
    background: #f8f9fa;
    text-decoration: none;
}

/* SOTTOMENU (sfondo uniforme #F6F4F1) */
.sandwich-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
    background: #F6F4F1;
    padding: 0;
    margin: 0;
    border-radius: 10px;
}

.sandwich-submenu.active {
    max-height: 1000px;
    padding: 0px 0;
    margin: 0 0px 0px 0;
}

/* (se usi anche i link con classe .sandwich-sublink) */
.sandwich-sublink {
    display: block;
    padding: 12px 20px 12px 40px;
    text-decoration: none;
    color: #555;
}

/* BOTTOM BAR */
.sandwich-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 70px;
    width: 100%;
    background: #F6F4F1;
    border-top: 2px solid #6f6f6a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

/* TOGGLE */
.sandwich-toggle {
    background: #fff;
    border: 2px solid #565656;
    padding: 6px 10px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
}

.sandwich-bar {
    width: 24px;
    height: 3px;
    background: #565656;
    transition: all .3s ease;
}

.sandwich-toggle.active .sandwich-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sandwich-toggle.active .sandwich-bar:nth-child(2) {
    opacity: 0;
}

.sandwich-toggle.active .sandwich-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* OVERLAY */
.sandwich-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all .3s ease;
    z-index: 999;
}

.sandwich-overlay.active {
    opacity: 1;
    visibility: visible;
}

@media (min-width: 768px) {
    /* NAV: da destra (desktop/tablet) */
    .sandwich-nav {
        top: 0;
        right: 0;
        bottom: auto;
        left: auto;
        width: min(420px, 32vw);
        height: 100vh;
        max-height: none;
        transform: translateX(100%);
        transition: transform .35s ease;
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .sandwich-nav.active {
        transform: translateX(0);
    }

    /* DESKTOP: sfondo uniforme fino in fondo */
    .sandwich-scroll {
        flex: 1;
    }
}

/* SOLO pulsanti dentro i submenu */
.sandwich-submenu .sandwich-link {
    font-size: 16px;
    padding: 10px 21px 8px 20px;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    margin: 4px 6px 4px 10%;
    color: var(--ink) !important;
    background-color: #ffffff;
    width: 90%;
}

/* Hover SOLO submenu */
.sandwich-submenu .sandwich-link:hover {
    background: #ffffff;
}

#menu_livello3.sandwich-submenu a.sandwich-link {
    color: var(--muted) !important;
    background-color: #fdfdfd;
}

#menu_livello3.sandwich-submenu {
    padding-left: 12%;
}

/* Nasconde la scrollbar SOLO su mobile (scroll resta attivo) */
@media (max-width: 767px){
  .sandwich-scroll{
    -ms-overflow-style: none;  /* IE/Edge legacy */
    scrollbar-width: none;     /* Firefox */
  }
  .sandwich-scroll::-webkit-scrollbar{
    display: none;             /* Chrome/Safari/iOS */
  }
}
