/* ============================================================
   RONCA STYLE — Mobile Menu Moderno
   Navarrosistemi_MobileMenu v1.0.0
   ============================================================ */

/* === Variabili === */
:root {
    --rs-drawer-width: 320px;
    --rs-drawer-bg: #ffffff;
    --rs-header-bg: #1a1a1a;
    --rs-header-height: 60px;
    --rs-panel-header-bg: #f5f5f5;
    --rs-panel-header-height: 52px;
    --rs-text-primary: #1a1a1a;
    --rs-text-secondary: #555555;
    --rs-text-accent: #1a1a1a;
    --rs-link-hover: #000000;
    --rs-border: #ebebeb;
    --rs-item-height: 52px;
    --rs-font: 'Helvetica Neue', Arial, sans-serif;
    --rs-transition: 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    --rs-overlay-bg: rgba(0, 0, 0, 0.55);
    --rs-accent-line: #1a1a1a;
    --rs-all-color: #888888;
    --rs-brand-size: 13px;
    --rs-z-overlay: 9998;
    --rs-z-drawer: 9999;
}

/* === Blocca scroll body quando menu aperto === */
body.rs-no-scroll {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

/* === Overlay scuro === */
.rs-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--rs-overlay-bg);
    z-index: var(--rs-z-overlay);
    opacity: 0;
    transition: opacity var(--rs-transition);
    -webkit-tap-highlight-color: transparent;
}
.rs-overlay--visible {
    display: block;
    opacity: 1;
}

/* === Drawer container === */
.rs-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--rs-drawer-width);
    max-width: 88vw;
    height: 100%;
    height: 100dvh;
    background: var(--rs-drawer-bg);
    z-index: var(--rs-z-drawer);
    transform: translateX(-100%);
    transition: transform var(--rs-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    font-family: var(--rs-font);
}
.rs-drawer--open {
    transform: translateX(0);
}

/* Nascondi il drawer su desktop */
@media (min-width: 1024px) {
    .rs-drawer,
    .rs-overlay {
        display: none !important;
    }
}

/* === Header drawer === */
.rs-drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    height: var(--rs-header-height);
    background: var(--rs-header-bg);
    flex-shrink: 0;
    z-index: 10;
}
.rs-drawer__logo img {
    height: 28px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* Bottone chiudi × */
.rs-drawer__close {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 0;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.rs-drawer__close span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: absolute;
}
.rs-drawer__close span:first-child {
    transform: rotate(45deg);
}
.rs-drawer__close span:last-child {
    transform: rotate(-45deg);
}

/* === Pannelli === */
.rs-panel {
    position: absolute;
    inset: var(--rs-header-height) 0 0 0;
    background: var(--rs-drawer-bg);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--rs-transition);
    visibility: hidden;
    will-change: transform;
    -webkit-overflow-scrolling: touch;
}

/* Pannello root: parte da sinistra (non ha header interno) */
.rs-panel[data-level="0"] {
    transform: translateX(-100%);
}

/* Pannello attivo */
.rs-panel--active {
    transform: translateX(0) !important;
    visibility: visible;
}

/* Exit verso sinistra (quando si apre un figlio) */
.rs-panel--exit {
    transform: translateX(-30%) !important;
    visibility: visible;
    pointer-events: none;
}

/* Exit verso destra (quando si torna indietro) */
.rs-panel--exit-back {
    transform: translateX(100%) !important;
    visibility: visible;
    pointer-events: none;
}

/* Header interno pannello (breadcrumb + titolo) */
.rs-panel__header {
    display: flex;
    align-items: center;
    height: var(--rs-panel-header-height);
    background: var(--rs-panel-header-bg);
    border-bottom: 1px solid var(--rs-border);
    flex-shrink: 0;
    gap: 8px;
    padding-right: 16px;
}

/* Bottone back */
.rs-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 16px;
    background: none;
    border: none;
    border-right: 1px solid var(--rs-border);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--rs-text-secondary);
    letter-spacing: 0.02em;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    min-width: 80px;
}
.rs-back-btn:active {
    background: var(--rs-border);
}

/* Titolo pannello */
.rs-panel__title-link {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--rs-text-primary);
    text-decoration: none;
    text-transform: uppercase;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.rs-panel__title-link:hover {
    text-decoration: underline;
}

/* Body pannello (area scrollabile) */
.rs-panel__body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* === Lista menu === */
.rs-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rs-menu-list__item {
    border-bottom: 1px solid var(--rs-border);
}

/* Link e bottoni della lista */
.rs-menu-list__link,
.rs-menu-list__trigger {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: var(--rs-item-height);
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rs-text-primary);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
    gap: 8px;
    box-sizing: border-box;
    transition: background 0.15s ease, color 0.15s ease;
}
.rs-menu-list__link:active,
.rs-menu-list__trigger:active {
    background: #f0f0f0;
}

/* Chevron a destra */
.rs-chevron {
    margin-left: auto;
    font-size: 11px;
    color: #aaaaaa;
    flex-shrink: 0;
}

/* HOME con icona */
.rs-menu-list__link--home {
    gap: 10px;
    color: var(--rs-text-primary);
}
.rs-menu-list__link--home .fa {
    font-size: 15px;
    color: var(--rs-text-secondary);
}

/* Link categoria (con underline accent) */
.rs-menu-list__link--category {
    font-size: 13px;
    font-weight: 700;
}

/* Link sottocategorie: peso normale, maiuscolo */
.rs-menu-list--sub .rs-menu-list__link {
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--rs-text-secondary);
    padding-left: 24px;
}
.rs-menu-list--sub .rs-menu-list__link:active {
    background: #f5f5f5;
    color: var(--rs-text-primary);
}

/* "Vedi tutto" link speciale */
.rs-menu-list__link--all {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: var(--rs-all-color) !important;
    letter-spacing: 0.05em !important;
    border-bottom: none;
    text-decoration: none;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}
.rs-menu-list__link--all::after {
    content: ' →';
    font-size: 12px;
}

/* Brand: più piccoli, colonna densa */
.rs-menu-list--brands .rs-menu-list__link {
    font-size: 12px;
    min-height: 44px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Outlet: cards con immagine */
.rs-menu-list--outlet {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.rs-menu-list__item--outlet {
    border-bottom: none;
}
.rs-menu-list__link--outlet-cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0;
    min-height: auto;
    text-align: center;
}
.rs-outlet-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
}
.rs-menu-list__link--outlet-cat span {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--rs-text-primary);
}

/* === Footer pannello root === */
.rs-panel__footer {
    display: flex;
    border-top: 1px solid var(--rs-border);
    flex-shrink: 0;
    background: #fafafa;
}
.rs-footer-link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 52px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--rs-text-secondary);
    text-decoration: none;
    border-right: 1px solid var(--rs-border);
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}
.rs-footer-link:last-child {
    border-right: none;
}
.rs-footer-link:active {
    background: var(--rs-border);
}
.rs-footer-link .fa {
    font-size: 16px;
}

/* === Pannello root: struttura speciale === */
#rs-panel-root {
    justify-content: space-between;
}
#rs-panel-root .rs-panel__body {
    flex: 1;
}
#rs-panel-root .rs-menu-list {
    padding-top: 8px;
}
#rs-panel-root .rs-menu-list__item {
    border-bottom: none;
}
#rs-panel-root .rs-menu-list__link,
#rs-panel-root .rs-menu-list__trigger {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    min-height: 56px;
    border-bottom: 1px solid var(--rs-border);
}
#rs-panel-root .rs-menu-list__item:last-child .rs-menu-list__link {
    border-bottom: none;
}
