/* MarinLife Mobile Menu - bottone SHOP + card verticale, solo mobile */
:root {
    --mwl-mm-blu: #007bff;
    --mwl-mm-ciano: #046bd2;
    --mwl-mm-text: #1e293b;
    --mwl-mm-text-muted: #334155;
    --mwl-mm-bg: #ffffff;
    --mwl-mm-border: #e2e8f0;
}

.mwl-mm-wrapper {
    display: none;
    position: relative;
    text-align: center;
}

/* --- Bottone blu SHOP --- */
.mwl-mm-wrapper .mwl-mm-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background-color: var(--mwl-mm-blu);
    color: #ffffff !important;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.4rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none !important;
    line-height: 1;
}

.mwl-mm-wrapper .mwl-mm-burger,
.mwl-mm-wrapper .mwl-mm-burger::before,
.mwl-mm-wrapper .mwl-mm-burger::after {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #ffffff;
    border-radius: 2px;
    position: relative;
}

.mwl-mm-wrapper .mwl-mm-burger::before,
.mwl-mm-wrapper .mwl-mm-burger::after {
    content: '';
    position: absolute;
    left: 0;
}

.mwl-mm-wrapper .mwl-mm-burger::before { top: -6px; }
.mwl-mm-wrapper .mwl-mm-burger::after  { top: 6px; }

/* --- Card che si apre sotto --- */
.mwl-mm-wrapper .mwl-mm-panel {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 420px);
    max-height: 70vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: var(--mwl-mm-bg);
    border: 1px solid var(--mwl-mm-border);
    border-radius: 0.9rem;
    padding: 0.5rem;
    box-shadow: 0 16px 32px -10px rgba(0, 0, 0, 0.28);
    z-index: 99999;
    text-align: left;
}

.mwl-mm-wrapper .mwl-mm-panel.open {
    display: block;
}

/* --- Voci della card --- */
.mwl-mm-wrapper .mwl-mm-entry,
.mwl-mm-wrapper a.mwl-mm-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: none;
    padding: 0.8rem 0.9rem;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--mwl-mm-text) !important;
    text-decoration: none !important;
    text-align: left;
    border-radius: 0.55rem;
    cursor: pointer;
}

.mwl-mm-wrapper .mwl-mm-entry:hover {
    background-color: #f0f5fa;
}

.mwl-mm-wrapper .mwl-mm-row.active > .mwl-mm-entry {
    background-color: var(--mwl-mm-ciano);
    color: #ffffff !important;
}

.mwl-mm-wrapper .mwl-mm-chevron {
    flex: 0 0 auto;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
    transition: transform 0.25s ease;
}

.mwl-mm-wrapper .mwl-mm-row.active .mwl-mm-chevron {
    transform: rotate(180deg);
}

/* --- Sotto-voci (accordion dentro la card) --- */
.mwl-mm-wrapper .mwl-mm-dropdown {
    display: none;
    padding: 0.2rem 0 0.4rem 0.6rem;
    border-left: 2px solid rgba(4, 107, 210, 0.25);
    margin: 0.15rem 0 0.35rem 0.9rem;
}

.mwl-mm-wrapper .mwl-mm-dropdown.open {
    display: block;
}

.mwl-mm-wrapper .mwl-mm-sub-link {
    display: block;
    padding: 0.6rem 0.8rem;
    color: var(--mwl-mm-text-muted) !important;
    text-decoration: none !important;
    font-size: 0.92rem;
    font-weight: 500;
    border-radius: 0.45rem;
}

.mwl-mm-wrapper .mwl-mm-sub-link:hover {
    background-color: #f0f5fa;
    color: var(--mwl-mm-ciano) !important;
}

.mwl-mm-wrapper .mwl-mm-sub-link.mwl-mm-active-sub {
    color: var(--mwl-mm-ciano) !important;
    background-color: rgba(4, 107, 210, 0.08);
}

/* Visibilita' per device (breakpoint Astra). Gestita da backend: Menu Mobile -> Dove visualizzare */
@media (max-width: 544px) {
    .mwl-mm-wrapper.mwl-mm-show-mobile { display: block; }
}

@media (min-width: 545px) and (max-width: 921px) {
    .mwl-mm-wrapper.mwl-mm-show-tablet { display: block; }
}

@media (min-width: 922px) {
    .mwl-mm-wrapper.mwl-mm-show-desktop { display: block; }
}

/* Allineamento al breakpoint reale di Astra: nella fascia in cui il JS passa
   in modalita' mobile ma le media query no (larghezza scrollbar), vale la
   classe sul body, non il viewport. */
body.ast-header-break-point .mwl-mm-wrapper.mwl-mm-show-tablet {
    display: block;
}

body:not(.ast-header-break-point) .mwl-mm-wrapper:not(.mwl-mm-show-desktop) {
    display: none;
}
