/* =============================================
   HAMBURGER MENU MOBILE — rogiamstore.com
   ============================================= */

/* Wrapper logo + pulsante hamburger */
.logo-ham-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Pulsante hamburger — nascosto di default, visibile solo su mobile (<768px) */
#rg-ham-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: 2px solid #667eea;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    flex-shrink: 0;
}

#rg-ham-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #667eea;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animazione X quando aperto */
#rg-ham-btn.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 4px);
}
#rg-ham-btn.open span:nth-child(2) {
    opacity: 0;
}
#rg-ham-btn.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -4px);
}

/* Overlay scuro dietro il pannello */
#rg-ham-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9998;
}
#rg-ham-overlay.open {
    display: block;
}

/* Pannello off-canvas */
#rg-ham-panel {
    position: fixed;
    top: 0;
    left: -100%;
    width: 82%;
    max-width: 320px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.3s cubic-bezier(.4, 0, .2, 1);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
}
#rg-ham-panel.open {
    left: 0;
}

/* Header interno del pannello */
.rg-ham-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 16px;
    background: #262c44;
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1;
}
.rg-ham-header strong {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Pulsante chiudi (X) */
#rg-ham-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.8;
}
#rg-ham-close:hover {
    opacity: 1;
}

/* Reset liste */
#rg-ham-panel > ul,
#rg-ham-panel .rg-ham-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Macro categorie */
.rg-ham-cat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #262c44;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-decoration: none !important;
}
.rg-ham-cat:hover {
    background: #1e2338;
    color: #fff !important;
}
.rg-ham-cat .rg-ham-arrow {
    font-size: 11px;
    transition: transform 0.3s ease;
    margin-left: 8px;
    flex-shrink: 0;
}
li.rg-open > .rg-ham-cat .rg-ham-arrow {
    transform: rotate(180deg);
}

/* Sottocategorie */
.rg-ham-sub {
    display: none;
    background: #F2F7FD;
}
li.rg-open > .rg-ham-sub {
    display: block;
}

.rg-ham-sub li a {
    display: block;
    padding: 11px 16px 11px 26px;
    color: #667eea !important;
    font-size: 13px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.12);
    text-decoration: none !important;
}
.rg-ham-sub li a:hover {
    background: #e2e9ff;
    text-decoration: none !important;
}

/* Blocca scroll body quando il menu è aperto */
body.rg-ham-open {
    overflow: hidden;
}

/* Search box header */
#search {
    background: #262c44;
    padding: 10px 10px 0 10px;
}

/* Voce CTA — Assistenza Clienti con telefono */
.rg-ham-cat-cta,
.rg-ham-cat-cta:hover {
    background: #325224 !important;
}

.rg-ham-cat-cta .fa-phone {
    margin-right: 8px;
    font-size: 13px;
}

/* Mostra hamburger solo su mobile; nasconde il menu desktop */
@media (max-width: 767px) {
    #rg-ham-btn {
        display: flex;
    }

    #menu {
        display: none !important;
    }
}
