/* ════════════════════════════════════════════════════════════
   SANITARA ONLINE — menu.css
   Navigatie, mega-menu, overlay
   Depinde de: header.css (include DUPĂ header.css)
   NOTA: .nav, .nav-*, .mega-overlay, .mp-* sunt deja
         definite în header.css — acest fișier nu le repeta.
═══════════════════════════════════════════════════════════════ */

/* ── MEGA MENU PANEL ───────────────────────────────────────── */
/* megaPanel: position:fixed in header.php, left:0;right:0    */
/* Wrapper interior limitat la 1440px inline in header.php    */

/* Coloana stanga L1 */
.mp-l1{display:flex;align-items:center;gap:12px;padding:10px 14px;cursor:pointer;
  font-size:13px;font-weight:500;color:#2c3e50;border-left:3px solid transparent;
  border-bottom:1px solid #f0f2f5;transition:all .12s;text-decoration:none}
.mp-l1:hover,.mp-l1.active{background:#fff;color:#1565c0;border-left-color:#1565c0}
.mp-thumb{width:50px;height:50px;flex-shrink:0;border-radius:10px;background:#f0f4f8;
  display:flex;align-items:center;justify-content:center;
  font-size:22px;overflow:hidden;flex-shrink:0}
.mp-thumb img{width:100%;height:100%;object-fit:cover;border-radius:10px}

/* Sub-categorii în mega panel */
.mega-sub{width:calc(50% - 4px);display:flex;align-items:center;gap:10px;
  padding:8px 10px;border-radius:8px;transition:background .15s;text-decoration:none;color:var(--text)}
.mega-sub:hover{background:#f0f7ff;color:var(--blue)}
.mega-sub-img{width:36px;height:36px;border-radius:7px;background:#f0f0f0;
  display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0;overflow:hidden}
.mega-sub-img img{width:100%;height:100%;object-fit:cover}
.mega-sub-name{font-size:12px;font-weight:600;line-height:1.3}
.mega-sub-cnt{font-size:10px;color:var(--muted)}

/* Banner promos în mega */
.mega-promo{width:100%;background:linear-gradient(120deg,#0a1628,#1565c0);
  border-radius:8px;padding:12px 16px;display:flex;align-items:center;
  justify-content:space-between;color:#fff;text-decoration:none;margin-top:4px;transition:opacity .2s}
.mega-promo:hover{opacity:.9}
.mega-promo-text{font-size:13px;font-weight:700}
.mega-promo-text span{color:#ffd740}
.mega-promo-cta{font-size:11px;font-weight:700;background:rgba(255,255,255,.15);
  padding:4px 12px;border-radius:5px}

/* Mobile nav drawer */
.mobile-nav{display:none;position:fixed;inset:0;z-index:10000;pointer-events:none}
.mobile-nav.open{pointer-events:all}
.mobile-nav-overlay{position:absolute;inset:0;background:rgba(0,0,0,.5);opacity:0;transition:opacity .3s}
.mobile-nav.open .mobile-nav-overlay{opacity:1}
.mobile-nav-drawer{position:absolute;top:0;left:0;bottom:0;width:300px;max-width:85vw;
  background:#fff;transform:translateX(-100%);transition:transform .3s ease;
  display:flex;flex-direction:column;overflow:hidden}
.mobile-nav.open .mobile-nav-drawer{transform:translateX(0)}
.mobile-nav-header{display:flex;align-items:center;justify-content:space-between;
  padding:14px 16px;border-bottom:1px solid var(--border);background:#f7f8fa}
.mobile-nav-title{font-size:15px;font-weight:800;color:var(--text)}
.mobile-nav-close{width:32px;height:32px;border:none;background:none;font-size:20px;
  cursor:pointer;border-radius:6px;display:flex;align-items:center;justify-content:center;
  color:var(--muted);transition:background .15s}
.mobile-nav-close:hover{background:var(--bg)}
.mobile-nav-body{flex:1;overflow-y:auto}
.mobile-nav-item{display:flex;align-items:center;justify-content:space-between;
  padding:13px 16px;border-bottom:1px solid var(--bg);font-size:14px;font-weight:500;
  color:var(--text);text-decoration:none;transition:background .15s}
.mobile-nav-item:hover{background:var(--bg);color:var(--blue)}
.mobile-nav-item .ico{font-size:18px;margin-right:10px}
.mobile-nav-item .arr{color:var(--muted);font-size:14px}
.mobile-nav-section{padding:10px 16px 4px;font-size:10px;font-weight:800;
  color:var(--muted);text-transform:uppercase;letter-spacing:.8px}

/* Buton hamburger mobil */
.menu-toggle{display:none;width:36px;height:36px;border:1px solid var(--border);
  border-radius:7px;background:#fff;cursor:pointer;align-items:center;
  justify-content:center;font-size:18px;flex-shrink:0;transition:background .15s}
.menu-toggle:hover{background:var(--bg)}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE — menu
═══════════════════════════════════════════════════════════════ */
@media(max-width:900px){
  .mega-cats{width:180px}
}

@media(max-width:600px){
  .menu-toggle{display:flex}
  .nav-links{display:none}
  .nav-right{display:none}
  .mobile-nav{display:block}
  /* megaPanel ascuns pe mobil via JS */
}

@media(max-width:360px){
  .mobile-nav-drawer{width:280px}
  .mobile-nav-item{padding:11px 14px;font-size:13px}
}


/* ════════════════════════════════════════════════════════════
   MOBILE CATALOG DRAWER — drill-down 3 niveluri
   Vizibil doar la max-width:600px
═══════════════════════════════════════════════════════════════ */
.mob-cat-wrap{
  display:none;position:fixed;inset:0;z-index:10100;
  pointer-events:none
}
.mob-cat-wrap.open{pointer-events:all}
.mob-cat-overlay{
  position:absolute;inset:0;background:rgba(0,0,0,.45);
  opacity:0;transition:opacity .25s
}
.mob-cat-wrap.open .mob-cat-overlay{opacity:1}

/* Drawer full-screen */
.mob-cat-drawer{
  position:absolute;inset:0;background:#fff;
  display:flex;flex-direction:column;
  transform:translateX(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)
}
.mob-cat-wrap.open .mob-cat-drawer{transform:translateX(0)}

/* ── Topbar ── */
.mob-cat-topbar{
  display:flex;align-items:center;gap:4px;
  padding:0 8px;height:52px;flex-shrink:0;
  background:#fff;border-bottom:1px solid #e8eaed
}
.mob-cat-back{
  width:38px;height:38px;border:none;background:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  border-radius:8px;color:#1a2744;flex-shrink:0
}
.mob-cat-back:active{background:#f0f0f0}
.mob-cat-topbar-title{
  flex:1;font-size:16px;font-weight:800;color:#1a2744;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  padding:0 4px
}
.mob-cat-close-x{
  width:38px;height:38px;border:none;background:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  border-radius:8px;color:#757575;flex-shrink:0
}
.mob-cat-close-x:active{background:#f0f0f0}

/* ── Scroll area ── */
.mob-cat-scroll{
  flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;
  background:#fff
}

/* ── Nivel generic ── */
.mob-level{display:flex;flex-direction:column}

/* ── Row comun L1 / L2 / L3 ── */
.mob-row{
  display:flex;align-items:center;gap:12px;
  padding:10px 14px;border:none;background:#fff;cursor:pointer;
  border-bottom:1px solid #f0f1f3;text-decoration:none;
  text-align:left;width:100%;transition:background .1s;
  font-family:inherit
}
.mob-row:active{background:#f5f6fa}
.mob-row-thumb{
  width:46px;height:46px;flex-shrink:0;border-radius:8px;
  background:#f0f4f8;overflow:hidden;
  display:flex;align-items:center;justify-content:center
}
.mob-row-thumb img{width:100%;height:100%;object-fit:cover}
.mob-row-icon{font-size:22px;line-height:1}
.mob-row-label{
  flex:1;font-size:14px;font-weight:500;color:#1a2744;line-height:1.35
}
.mob-row-arr{color:#b0b8c1;flex-shrink:0}
/* Row "Toate din" — fără thumb */
.mob-row-all .mob-row-thumb{display:none}

/* ── Butoane rapide sub L1 ── */
.mob-quick-btns{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
  padding:18px 14px 10px
}
.mob-qbtn{
  display:flex;align-items:center;justify-content:center;
  padding:13px 8px;border-radius:10px;font-size:14px;
  font-weight:700;text-decoration:none;text-align:center;
  font-family:inherit
}
.mob-qbtn-solid{background:#1a2744;color:#fff}
.mob-qbtn-solid:active{background:#0d1b35}
.mob-qbtn-outline-red{
  background:transparent;color:#c62828;
  border:2px solid #c62828
}
.mob-qbtn-outline-red:active{background:#fdecea}

/* ── Bottom nav bar ── */
.mob-bottom-nav{
  display:flex;align-items:stretch;
  border-top:1px solid #e8eaed;background:#fff;flex-shrink:0;
  padding-bottom:env(safe-area-inset-bottom,0)
}
.mob-bn-item{
  flex:1;display:flex;flex-direction:column;align-items:center;
  justify-content:center;gap:3px;padding:8px 2px;
  text-decoration:none;color:#757575;font-size:10px;font-weight:500;
  border:none;background:none;cursor:pointer;font-family:inherit
}
.mob-bn-active{color:#1565c0}

@media(max-width:900px){
  .mob-cat-wrap{display:block}
}

/* ════════════════════════════════════════════════════════════
   MEGA PANEL — structura completa (desktop)
════════════════════════════════════════════════════════════ */
/* Wrapper panel */
#megaPanel{
  display:none;position:fixed;left:0;right:0;z-index:9999;
  background:#fff;border-top:3px solid #1565c0;
  border-bottom:1px solid #e0e0e0;
  box-shadow:0 16px 60px rgba(0,0,0,.22);
  max-height:82vh;overflow:hidden
}
/* Inner 1440 wrapper */
.mega-inner{
  max-width:1440px;margin:0 auto;padding:0 20px;
  display:flex;max-height:82vh;overflow:hidden
}
/* Coloana stânga categorii L1 */
.mega-left{
  width:270px;flex-shrink:0;background:#f8f9fb;
  border-right:1px solid #e8eaed;overflow-y:auto;max-height:82vh
}
/* Areta L1: numele categoriei */
.mp-l1-name{flex:1;line-height:1.3}
/* Areta L1: sageata dreapta */
.mp-l1-arr{font-size:13px;color:#b0b8c1}
/* Zona continut dreapta */
.mega-content{
  flex:1;overflow-y:auto;max-height:82vh;padding:22px 28px 28px
}
/* Titlu categorie activa în mega */
.mega-cat-head{
  display:flex;align-items:center;gap:10px;font-size:24px;font-weight:800;
  color:#1a2744;margin-bottom:20px;padding-bottom:14px;border-bottom:2px solid #e8edf2
}
.mega-cat-head a{color:inherit;text-decoration:none}
.mega-cat-head a:hover{color:#1565c0}

/* Grid L2 — modul LIST */
.mega-l2-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:0 20px}
.mega-l2-col{margin-bottom:20px}
/* Imagine L2 link */
.mega-l2-img-link{
  display:block;width:80px;height:80px;flex-shrink:0;background:#f0f4f8;border-radius:8px;
  overflow:hidden;margin-bottom:7px;border:1px solid #e8ecf0;text-decoration:none
}
.mega-l2-img-link img,.mega-l2-img{width:80px;height:80px;object-fit:contain;padding:4px}
.mega-l2-img-ph{
  width:80px;height:80px;display:flex;align-items:center;
  justify-content:center;font-size:32px
}
/* Titlu L2 */
.mega-l2-title{
  display:block;font-size:15px;font-weight:500;color:#1c1e21;;
  margin-bottom:6px;text-decoration:none;line-height: 22px
}
.mega-l2-title:hover{color:#1565c0}
/* Link L3 */
.mega-l3-link{
  display:block;font-size:14px;color:#637491;
  padding:4px 0;text-decoration:none
}
.mega-l3-link:hover{color:#1565c0}
/* "Arată toate" L3 */
.mega-l3-more{
  font-size:14px;color:#1565c0;font-weight:600;
  margin-top:4px;display:inline-block;text-decoration:none
}
.mega-l3-more:hover{text-decoration:underline}

/* Grid L2 — modul GRID */
.mega-l2-grid-g{display:grid;grid-template-columns:repeat(5,1fr);gap:14px 10px}
.mega-l2-card{
  display:flex;flex-direction:column;align-items:center;
  text-align:center;text-decoration:none;padding:10px 6px;border-radius:10px;
  transition:background .15s
}
.mega-l2-card:hover{background:#f0f7ff}
.mega-l2-card-img{
  width:80px;height:80px;object-fit:contain;background:#f5f7fa;
  border-radius:8px;padding:5px;margin-bottom:8px;flex-shrink:0
}
.mega-l2-card-ph{
  width:80px;height:80px;background:#f0f4f8;border-radius:8px;
  margin-bottom:8px;display:flex;align-items:center;justify-content:center;font-size:32px;flex-shrink:0
}
.mega-l2-card-name{font-size:12px;font-weight:600;color:#2c3e50}
/* Mesaj fara subcategorii */
.mega-empty{color:#9e9e9e;font-size:14px;padding:30px 0;text-align:center}
/* Buton "Toate produsele" */
.mega-all-btn{
  display:inline-flex;align-items:center;gap:7px;margin-top:20px;
  padding:10px 22px;background:#1565c0;color:#fff;border-radius:8px;
  font-size:13px;font-weight:700;text-decoration:none;transition:background .2s
}
.mega-all-btn:hover{background:#0d47a1}
