/**
 * Unified mobile hamburger + drawer (catalog reference) — all v2 pages.
 */

@media (max-width: 1100px) {
  body.megagen-v2 .main-nav {
    display: none !important;
  }

  body.megagen-v2 .patient-nav-item,
  body.megagen-v2 .dentist-nav-item {
    display: none !important;
  }

  body.megagen-v2 .mega-panel {
    display: none !important;
  }

  body.megagen-v2 .mega-overlay {
    display: none !important;
  }
}

/* ===== Burger ===== */
body.megagen-v2 .burger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: var(--bg);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  padding: 0 12px;
}

body.megagen-v2 .burger-btn span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

body.megagen-v2 .burger-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.megagen-v2 .burger-btn.active span:nth-child(2) {
  opacity: 0;
}

body.megagen-v2 .burger-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1100px) {
  body.megagen-v2 .burger-btn {
    display: flex;
  }
}

/* Dark chrome pages (homepage hero, patients, product) — light burger on dark header */
body.v2-chrome-dark .burger-btn.burger-btn--light,
body.v2-hero-chrome-page .burger-btn.burger-btn--light {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

body.v2-chrome-dark .burger-btn.burger-btn--light span,
body.v2-hero-chrome-page .burger-btn.burger-btn--light span {
  background: #fff;
}

/* ===== Drawer shell ===== */
body.megagen-v2 .mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 26, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
}

body.megagen-v2 .mobile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.megagen-v2 .mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 88%;
  max-width: 380px;
  background: #fff;
  z-index: 1201;
  transform: translateX(100%);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 40px rgba(10, 14, 26, 0.15);
}

body.megagen-v2 .mobile-drawer.active {
  transform: translateX(0);
}

body.megagen-v2 .mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

body.megagen-v2 .mobile-drawer-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

body.megagen-v2 .mobile-drawer-close {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

body.megagen-v2 .mobile-nav {
  flex: 1;
  overflow-y: auto;
}

body.megagen-v2 .m-acc {
  border-bottom: 1px solid var(--line);
}

body.megagen-v2 .m-acc-head {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
}

body.megagen-v2 .m-acc-chev {
  transition: transform 0.25s;
  color: var(--muted);
}

body.megagen-v2 .m-acc.open .m-acc-chev {
  transform: rotate(180deg);
}

body.megagen-v2 .m-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

body.megagen-v2 .m-acc.open .m-acc-body {
  max-height: 500px;
}

body.megagen-v2 .mobile-drawer .m-acc.open .m-acc-body:has(.m-sys-grid) {
  max-height: 1400px;
}

body.megagen-v2 .m-acc-body a {
  display: block;
  padding: 10px 0 10px 14px;
  font-size: 14px;
  color: var(--ink-2);
  text-decoration: none;
  cursor: pointer;
}

body.megagen-v2 .m-acc-body a:last-child {
  padding-bottom: 16px;
}

body.megagen-v2 .m-acc-body a:hover {
  color: var(--brand);
}

body.megagen-v2 .m-link {
  display: block;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

body.megagen-v2 .mobile-drawer-foot {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

body.megagen-v2 .mobile-drawer-phone {
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
}

/* Catalog grid + cards inside drawer */
body.megagen-v2 .mobile-drawer .m-sys-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 16px 8px;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.2s;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-item:hover {
  border-color: var(--brand);
  background: #fff;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-img {
  width: 100%;
  height: 70px;
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-img img {
  max-width: 80%;
  max-height: 60px;
  object-fit: contain;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-img-placeholder {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-info {
  width: 100%;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-name .badge-new {
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

body.megagen-v2 .mobile-drawer .m-sys-grid .sys-desc {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.3;
}

/* Promo blocks inside drawer */
body.megagen-v2 .mobile-drawer .mega-promo {
  margin: 8px 16px 4px;
  padding: 14px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit {
  background: linear-gradient(135deg, #eef3ff 0%, #dce7ff 100%);
  border: 1px solid rgba(22, 86, 224, 0.15);
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-kit-img {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  width: 100%;
  height: 96px;
  margin: 0 0 10px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.95;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-badge {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-h {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 6px;
  max-width: none;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  max-width: none;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-kit-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-price {
  display: flex;
  align-items: baseline;
  gap: 0;
  margin: 0;
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .price-now {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand);
}

body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-arrow {
  display: flex;
  position: static;
  width: 32px;
  height: 32px;
  background: rgba(22, 86, 224, 0.12);
  color: var(--brand);
}

body.megagen-v2 .mobile-drawer a.mega-promo {
  display: block;
  text-decoration: none;
  color: inherit;
}

body.megagen-v2 .mobile-drawer .mega-promo.promo-dark,
body.megagen-v2 .mobile-drawer .mega-promo.promo-stats {
  background: linear-gradient(135deg, #0a0e1a 0%, #1a2138 100%);
  color: #fff;
}

body.megagen-v2 .mobile-drawer .mega-promo.promo-webinar {
  background: linear-gradient(135deg, #2e73ff 0%, #1656e0 100%);
  color: #fff;
}

body.megagen-v2 .mobile-drawer .mega-promo.promo-patient {
  background: linear-gradient(135deg, #5b8def 0%, #1656e0 100%);
  color: #fff;
}

body.megagen-v2 .mobile-drawer .mega-promo:not(.mega-promo-kit) .promo-h {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 6px;
  color: inherit;
}

body.megagen-v2 .mobile-drawer .mega-promo:not(.mega-promo-kit) .promo-p {
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 8px;
  opacity: 0.85;
  max-width: none;
  color: inherit;
}

body.megagen-v2 .mobile-drawer .mega-promo:not(.mega-promo-kit) .promo-badge {
  font-size: 10px;
  margin-bottom: 6px;
}

body.megagen-v2 .mobile-drawer .mega-promo:not(.mega-promo-kit) .promo-cta {
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

body.megagen-v2 .mobile-drawer .mega-promo:not(.mega-promo-kit) .promo-arrow {
  top: 14px;
  right: 14px;
  width: 28px;
  height: 28px;
}

body.megagen-v2 .mobile-drawer .mega-promo .stats-grid-mini {
  gap: 12px;
}

body.megagen-v2 .mobile-drawer .mega-promo .sm-num {
  font-size: 22px;
}

body.megagen-v2 .mobile-drawer .mega-promo .sm-lbl {
  font-size: 10px;
}

body.megagen-v2 .mobile-drawer .m-promo-banner {
  margin: 8px 16px 4px;
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a2138 100%);
  color: #fff;
  display: block;
  text-decoration: none;
}

body.megagen-v2 .mobile-drawer .m-promo-banner .m-promo-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

body.megagen-v2 .mobile-drawer .m-promo-banner .m-promo-h {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
}

body.megagen-v2 .mobile-drawer .m-promo-banner .m-promo-p {
  font-size: 11px;
  opacity: 0.75;
  line-height: 1.35;
  margin: 0;
}

body.megagen-v2 .mobile-drawer .m-promo-banner.brand {
  background: linear-gradient(135deg, var(--brand) 0%, #0e40aa 100%);
}

@media (max-width: 480px) {
  body.megagen-v2 .mobile-drawer {
    width: 100%;
    max-width: none;
  }

  body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-h,
  body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-p {
    max-width: 100%;
    padding-right: 0;
  }

  body.megagen-v2 .mobile-drawer .mega-promo-kit .promo-kit-img {
    display: none;
  }
}
