/* Pestor Mobiel Menu v2.3 */

/* Verberg Porto's side-nav panel en gerelateerde elementen volledig */
#side-nav-panel,
.side-nav-panel-close,
.panel-overlay { display: none !important; visibility: hidden !important; }

/* ── Overlay ─────────────────────────────────────────────── */
.pmm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2147483647;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
@media (max-width: 991px) {
    .pmm-overlay { display: block; }
    .pmm-overlay.is-open { opacity: 1; pointer-events: all; }
}

/* ── Menu paneel — inschuiven vanaf rechts ───────────────── */
.pmm-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
    visibility: hidden;
    overscroll-behavior: contain;
}

.pmm-menu[aria-hidden="false"] {
    transform: translateX(0);
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    .pmm-menu, .pmm-level, .pmm-overlay { transition: none !important; }
}

/* ── Header balk ─────────────────────────────────────────── */
.pmm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 56px;
    background: #219ebc;
    flex-shrink: 0;
}

.pmm-header-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

.pmm-close {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 36px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.15s;
    flex-shrink: 0;
    opacity: 1;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1em auto;
}
.pmm-close:hover { opacity: 0.5; }
.pmm-close * { display: none; }

/* ── Level container ─────────────────────────────────────── */
.pmm-levels {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Niveau 0 begint zichtbaar, sublevels komen van rechts */
.pmm-level {
    position: absolute;
    inset: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* Niveau 0 is altijd zichtbaar als startpunt */
#pmm-level-0 {
    transform: translateX(0);
}

.pmm-level.pmm-level--active {
    transform: translateX(0);
}

/* Vorig niveau schuift naar links weg */
.pmm-level--slide-out {
    transform: translateX(-30%) !important;
}

/* ── Sublevel header ─────────────────────────────────────── */
.pmm-sublevel-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 16px;
    height: 50px;
    border-bottom: 2px solid #ededed;
    background: #f0f9fb;
    position: sticky;
    top: 0;
    z-index: 2;
    flex-shrink: 0;
}

.pmm-back {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    color: #219ebc;
    font-size: 14px;
    font-weight: 700;
    padding: 0;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    justify-self: start;
}

.pmm-sublevel-title {
    font-size: 16px;
    font-weight: 700;
    color: #21293c;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-self: center;
}

/* ── Menu lijst ──────────────────────────────────────────── */
.pmm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pmm-li { border-bottom: 1px solid #ededed; }
.pmm-li:last-child { border-bottom: none; }

.pmm-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    height: 54px;
    background: none;
    border: none;
    text-align: left;
    text-decoration: none;
    color: #21293c;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.1s;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    gap: 12px;
}

.pmm-row:active { background: #f0f9fb; }

.pmm-row-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* FontAwesome icoontjes */
.pmm-row-label i {
    width: 20px;
    text-align: center;
    color: #219ebc;
    font-size: 16px;
    flex-shrink: 0;
}


/* Chevron rechts — Porto font icoon \e81c, gedraaid -90deg */
.pmm-chevron {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "porto";
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #777;
    width: 20px;
}
.pmm-chevron::before {
    content: "\e81c";
    display: inline-block;
    transform: rotate(-90deg);
}

/* Terug-pijl — Porto font icoon \e81c, gedraaid 90deg voor links */
.pmm-back-icon {
    display: inline-block;
    font-family: "porto";
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #219ebc;
}
.pmm-back-icon::before {
    content: "\e81c";
    display: inline-block;
    transform: rotate(90deg);
}

/* ── Badges ──────────────────────────────────────────────── */
.pmm-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}
.pmm-badge--new  { background: #fff8e1; color: #e65100; }
.pmm-badge--sale { background: #ffebee; color: #b71c1c; }
.pmm-badge--hot  { background: #e3f5fa; color: #0d7a96; }

/* ── Focus ────────────────────────────────────────────────── */
.pmm-row:focus-visible,
.pmm-back:focus-visible,
.pmm-close:focus-visible {
    outline: 2px solid #219ebc;
    outline-offset: 2px;
}

/* ── Body scroll ─────────────────────────────────────────── */
body.pmm-open { overflow: hidden; }

/* ── menu-link: blauwe tekst ─────────────────────────────── */
.pmm-li.menu-link .pmm-row {
    color: #219ebc;
}
.pmm-li.menu-link .pmm-row .pmm-row-label {
    color: #219ebc;
}

/* ── menu-sale en flash-sale: lichtblauwe achtergrond ───────
   Porto kan meerdere klassen combineren, bijv:
   "menu-mobile-only flash-sale" of "menu-sale menu-item-right"
   Daarom targeten we elk afzonderlijk ──────────────────────── */
.pmm-li.menu-sale .pmm-row,
.pmm-li.flash-sale .pmm-row {
    background: #e8f5f8;
}
.pmm-li.menu-sale .pmm-row:active,
.pmm-li.flash-sale .pmm-row:active {
    background: #d0ecf4;
}

/* pmm-toggle: zelfde zichtbaarheid als Porto's mobile-toggle */
.pmm-toggle {
    display: none;
}
@media (max-width: 991px) {
    .pmm-toggle { display: inline-block; }
    /* Verberg Porto's originele toggle voor het geval output buffer mislukt */
    a.mobile-toggle:not(.pmm-toggle) { display: none !important; }
}
