/* Meditec Mega Menu */
.mmm-nav { --mmm-accent:#e5187a; --mmm-text:#4a4a4a; --mmm-hover:#e5187a; }
.mmm-nav, .mmm-nav * { box-sizing:border-box; }
.mmm-nav { display:flex; align-items:center; gap:8px; flex-wrap:wrap; position:relative; }
.mmm-nav-items { display:flex; flex-direction:row; align-items:center; flex-wrap:wrap; gap:8px; }
.mmm-nav--vertical .mmm-nav-items { flex-direction:column; align-items:stretch; }
.mmm-nav--vertical .mmm-item { width:100%; }
.mmm-nav--vertical .mmm-link { width:100%; justify-content:space-between; }

.mmm-item { position:relative; }
.mmm-link {
    display:inline-flex; align-items:center; gap:7px;
    padding:12px 16px; text-decoration:none; color:var(--mmm-text);
    font-size:16px; font-weight:700; line-height:1; white-space:nowrap;
    border-radius:40px; transition:color .18s ease, background .18s ease;
    background:transparent; border:none; cursor:pointer; font-family:inherit;
}
.mmm-link:hover, .mmm-item.is-active > .mmm-link { color:var(--mmm-hover); }
.mmm-link .mmm-caret { width:0; height:0; border-left:5px solid transparent; border-right:5px solid transparent; border-top:6px solid currentColor; transition:transform .2s ease; opacity:.85; }
.mmm-item.is-open > .mmm-link .mmm-caret { transform:rotate(180deg); }

/* Special (ONLINE-SHOP) pill */
.mmm-link--special {
    color:#fff; background:linear-gradient(90deg,#37b6e9 0%, #b03bbd 55%, #e5187a 100%);
    box-shadow:0 6px 18px rgba(176,59,189,.28);
}
.mmm-link--special:hover { color:#fff; filter:brightness(1.04); }

/* Panels */
.mmm-panel {
    position:absolute; top:calc(100% + 10px); left:0; z-index:9999;
    background:#fff; border-radius:14px; box-shadow:0 24px 60px rgba(0,0,0,.16);
    padding:26px 30px; min-width:260px; opacity:0; visibility:hidden;
    transform:translateY(8px); transition:opacity .18s ease, transform .18s ease, visibility .18s;
}
.mmm-item.is-open > .mmm-panel { opacity:1; visibility:visible; transform:translateY(0); }

/* Simple dropdown (WP menu list) */
.mmm-panel--menu { min-width:280px; }
.mmm-menu-list, .mmm-menu-list ul { list-style:none; margin:0; padding:0; }
.mmm-menu-list a { display:block; padding:11px 4px; color:#2b2b2b; text-decoration:none; font-size:17px; font-weight:600; border-bottom:1px solid #f0f0f0; transition:color .15s; }
.mmm-menu-list > li:last-child > a { border-bottom:none; }
.mmm-menu-list a:hover { color:var(--mmm-accent); }
.mmm-menu-list .sub-menu { padding-left:12px; }
.mmm-menu-list .sub-menu a { font-size:14px; font-weight:500; color:#666; border-bottom:none; padding:7px 4px; }

/* Mega panel: product categories (multi-column) */
.mmm-panel--cats { left:0; right:auto; }

/* Full viewport-width panel (edge to edge, centered on the viewport).
   Uses position:fixed so it anchors to the real viewport and is immune to
   transformed/overflow ancestors (common in Elementor/sticky headers), which
   otherwise push a vw-based panel off to one side. The vertical `top` is set
   by JS from the menu item's bottom edge. */
.mmm-panel--full {
    position:fixed;
    left:0; right:0;
    width:100vw; max-width:100vw;
    transform:translateY(8px);
}
.mmm-item.is-open > .mmm-panel--full { transform:translateY(0); }
.mmm-panel--full .mmm-cats-cols {
    max-width:var(--mmm-maxw, 1200px);
    margin-left:auto; margin-right:auto;
}
.mmm-cats-cols { display:grid; grid-template-columns:repeat(var(--mmm-cols,3), minmax(220px,1fr)); gap:10px 40px; }
.mmm-cat-group { break-inside:avoid; }
.mmm-cat-parent { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 0; border-bottom:1px solid #eee; }
.mmm-cat-parent > a, .mmm-cat-parent > span { color:#1f1f1f; text-decoration:none; font-size:16px; font-weight:600; display:flex; align-items:center; gap:8px; }
.mmm-cat-parent > a:hover { color:var(--mmm-accent); }
.mmm-cat-parent .mmm-chev { color:#c9c9c9; font-size:12px; }
.mmm-cat-count { color:#b7b7b7; font-size:13px; font-weight:400; }

/* Accordion mode — sub-level (children) expand to reveal grandchildren */
.mmm-cat-childhead { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.mmm-cat-childhead > a { flex:1 1 auto; }
.mmm-acc-toggle { background:none; border:none; cursor:pointer; color:#b0b0b0; padding:4px; display:inline-flex; align-items:center; border-radius:5px; transition:color .15s, background .15s; flex:0 0 auto; }
.mmm-acc-toggle:hover { color:var(--mmm-accent); background:rgba(0,0,0,.04); }
.mmm-acc-toggle svg { transition:transform .2s ease; }
.mmm-cat-child.mmm-sub-open > .mmm-cat-childhead .mmm-acc-toggle svg { transform:rotate(180deg); }
.mmm-cat-children { list-style:none; margin:4px 0 14px; padding:0; }
.mmm-cat-children li { margin:0; }
.mmm-cat-children a { display:flex; align-items:center; justify-content:flex-start; gap:8px; padding:7px 0 7px 14px; color:#7a7a7a; text-decoration:none; font-size:14px; border-bottom:1px solid #f5f5f5; transition:color .15s; }
.mmm-cat-children a:hover { color:var(--mmm-accent); }
.mmm-cat-children a::before { content:'›'; position:relative; left:-6px; color:#cfcfcf; }

/* 3rd level (sub-sub-categories) */
.mmm-cat-grandchildren { list-style:none; margin:2px 0 6px; padding:0 0 0 18px; }
.mmm-cat-grandchildren a { display:flex; align-items:center; justify-content:flex-start; gap:6px; padding:5px 0; color:#9a9a9a; text-decoration:none; font-size:13px; border-bottom:none; }
.mmm-cat-grandchildren a::before { content:'–'; position:relative; left:-4px; color:#d8d8d8; }
.mmm-cat-grandchildren a:hover { color:var(--mmm-accent); }

/* Mobile */
.mmm-burger { display:none; background:none; border:none; cursor:pointer; padding:10px; }
.mmm-burger span { display:block; width:24px; height:2px; background:currentColor; margin:5px 0; transition:.2s; }

/* ============ MOBILE (≤1024px) — app-style drill-down drawer ============ */
@media (max-width:1024px){
    /* Hamburger — always visible, solid color so it never disappears */
    .mmm-burger {
        display:flex !important; flex-direction:column; justify-content:center; gap:5px;
        width:46px; height:46px; padding:11px; background:none; border:none;
        cursor:pointer; position:relative; z-index:5;
    }
    .mmm-burger span {
        display:block; height:2.5px; width:100%; border-radius:3px; margin:0;
        background:var(--mmm-text,#1f2d3a); transition:transform .3s ease, opacity .2s ease;
    }
    .mmm-nav.is-mobile-open .mmm-burger span:nth-child(1){ transform:translateY(7.5px) rotate(45deg); }
    .mmm-nav.is-mobile-open .mmm-burger span:nth-child(2){ opacity:0; }
    .mmm-nav.is-mobile-open .mmm-burger span:nth-child(3){ transform:translateY(-7.5px) rotate(-45deg); }

    /* Hide the desktop nav items on mobile; the JS drawer replaces them */
    .mmm-nav-items { display:none !important; }
    .mmm-nav { flex-direction:row; align-items:center; }
}

/* Drill-down drawer (built by JS) — present at all sizes but only shown when open */
.mmm-mdrawer {
    position:fixed; inset:0; z-index:100000; visibility:hidden;
    background:rgba(0,0,0,.45); opacity:0; transition:opacity .3s ease, visibility .3s ease;
}
.mmm-mdrawer.is-open { visibility:visible; opacity:1; }

.mmm-mdrawer .mmm-mstack {
    position:absolute; top:0; right:0; height:100%;
    width:88%; max-width:400px; display:flex;
    transition:transform .32s cubic-bezier(.4,0,.2,1);
    transform:translateX(100%);
}
.mmm-mdrawer.is-open .mmm-mstack { transform:translateX(0); }

/* Each slide panel sits side by side; stack shifts left as you drill in */
.mmm-mpanel {
    flex:0 0 100%; width:100%; height:100%; background:#fff;
    display:flex; flex-direction:column; box-shadow:-8px 0 40px rgba(0,0,0,.18);
}
.mmm-mpanel-head {
    display:flex; align-items:center; gap:8px; padding:16px 18px;
    border-bottom:1px solid #eef1f4; min-height:60px; flex:0 0 auto;
    background:#f7f9fb;
}
.mmm-mpanel-title { font-weight:700; font-size:17px; color:#1f2d3a; }
.mmm-mback, .mmm-mclose {
    background:none; border:none; cursor:pointer; color:#2b8dc0;
    display:inline-flex; align-items:center; gap:4px; font-size:15px; font-weight:600; padding:6px 4px;
}
/* margin-left:auto pins it right whether the head is [title][×] on the root
   or [back][title][×] on a drilled panel. */
.mmm-mclose { margin-left:auto; font-size:28px; line-height:1; color:#8a97a2; flex:0 0 auto; }
.mmm-mpanel-title { flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mmm-mpanel-body { flex:1 1 auto; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* Rows */
.mmm-mrow {
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 18px; min-height:56px; border-bottom:1px solid #f2f4f6;
    color:var(--mmm-text,#28323b); text-decoration:none; cursor:pointer;
    position:relative;
}
.mmm-mrow:hover, .mmm-mrow:active { background:#f5f9fc; }
.mmm-mrow-label { flex:1 1 auto; }
.mmm-mrow-chev { color:#9aa7b2; display:inline-flex; flex:0 0 auto; }
/* Direct-link tap zone when a parent also has its own URL (left ~72% of the row) */
.mmm-mrow-go { position:absolute; inset:0 44px 0 0; z-index:1; }
/* When the parent has its own URL the row splits: the label area follows the
   link, the chevron drills in. The chevron must sit above the overlay anchor
   and get a real tap target, or it is unreachable. */
.mmm-mrow--haslink .mmm-mrow-chev {
    position:relative; z-index:2; width:44px; height:44px; margin-right:-10px;
    align-items:center; justify-content:center; border-left:1px solid #f2f4f6;
}
.mmm-mrow--haslink .mmm-mrow-chev:active { background:#eef4f8; border-radius:8px; }
/* The special row keeps the exact geometry of every other row — same full
   width, same padding, label left, chevron right. Only the background and text
   colour differ, so it reads as part of the list rather than a floating pill. */
.mmm-mrow--special {
    background:var(--mmm-accent,#e6007e); color:#fff; font-weight:700; border-bottom:none;
}
.mmm-mrow--special .mmm-mrow-label { flex:1 1 auto; }
.mmm-mrow--special .mmm-mrow-chev  { color:inherit; }

body.mmm-nav-lock { overflow:hidden; }

@media (max-width:480px){
    .mmm-mdrawer .mmm-mstack { width:100%; max-width:none; }
}
