/* ── Drawer mobile (ispirato a site-header__panel di SecarePay) ── */

.sp-nav {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    width: calc(100vw - 1rem);
    max-width: 24rem;
    height: calc(100vh - 1rem);
    padding: 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: #fafaf9;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.10), 0 8px 10px -6px rgba(0,0,0,0.10);
    opacity: 0;
    pointer-events: none;
    transform: translateX(0.75rem);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 9999;
}

.sp-header-wrapper.is-open .sp-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* Header del drawer: logo + X */
.sp-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #D6D3D1;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem !important;
}
.sp-nav__logo-link {
    display: block;
    line-height: 0;
}
.sp-nav__logo {
    width: 220px !important;
    height: auto;
}
.sp-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    background: none;
    color: #296da4;
    cursor: pointer;
    padding: 0.25rem;
    flex-shrink: 0;
    margin-right: -1.5rem;
}
.sp-nav__close svg {
    width: 1.75rem;
    height: 1.75rem;
    stroke-width: 2.5px;
}
.sp-nav__close:hover {
    opacity: 0.7;
}

.sp-nav-chi-siamo {
    color: #707070;
    font-weight: 300;
    text-decoration: none;
    outline: none;
    font-size: 14px;
}

/* Link categorie */
.sp-nav__links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    text-decoration: none;
}
.sp-nav__link {
    color: #707070;
    font-size: 1.5rem;
    font-weight: 300;
    text-decoration: none;
    outline: none;
}
.sp-nav__link:hover {
    color: #296da4;
}
.sp-nav__link.active {
    color: #296da4;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 2px;
}

/* Secondo menu in fondo */
.sp-nav__second-nav {
    border-top: 1px solid #D6D3D1;
    border-bottom: 1px solid #D6D3D1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}
.sp-nav__second-nav a {
    font-size: 14px;
    font-weight: 300;
    color: #78716C;
    text-decoration: none;
}

.sp-nav__second-nav .current {
    font-size: 14px;
    color: #296da4;
    font-weight: 600;
    cursor: default;
}

/* ── Backdrop sfocato dietro il drawer ── */
.sp-header__backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out;
    z-index: 9998;
}
.sp-header-wrapper.is-open .sp-header__backdrop {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 1024px) {
    .sp-nav,
    .sp-header__backdrop {
        display: none !important;
    }
}
