/* WooCommerce Leibal Mobile Menu Styles - High Specificity */
:root {
  --wc-leibal-bg: #0a0a0a;
  --wc-leibal-fg: #ffffff;
  --wc-leibal-muted: #9a9a9a;
  --wc-leibal-line: rgba(255,255,255,.12);
  --wc-leibal-tap: rgba(255,255,255,.06);
  --wc-leibal-header-h: 56px;
  --wc-leibal-font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Reset all possible conflicts */
#wc-leibal-mobile-menu * {
  box-sizing: border-box !important;
}

/* Кнопка гамбургера - высокая специфичность */
body .wc-leibal-hamburger,
html body .wc-leibal-hamburger {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(255,255,255,0.95);
  cursor: pointer;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

body .wc-leibal-hamburger:hover,
html body .wc-leibal-hamburger:hover {
  background: #fff;
  transform: scale(1.05);
}

body .wc-leibal-hamburger span,
html body .wc-leibal-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #111;
  margin: 2px 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Анимация кнопки при открытии меню */
.wc-leibal-menu-open .wc-leibal-hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.wc-leibal-menu-open .wc-leibal-hamburger span:nth-child(2) {
  opacity: 0;
}

.wc-leibal-menu-open .wc-leibal-hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Оверлей */
.wc-leibal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1000;
}

.wc-leibal-overlay.wc-leibal-show {
  opacity: 1;
  pointer-events: auto;
}

/* Мобильное меню */
.wc-leibal-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: var(--wc-leibal-bg);
  color: var(--wc-leibal-fg);
  transform: translateX(-100%);
  transition: transform .28s ease;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  font-family: var(--wc-leibal-font);
  overflow: hidden;
}

.wc-leibal-mobile-menu.wc-leibal-open {
  transform: translateX(0);
}

/* Заголовок меню */
.wc-leibal-menu-header {
  display: grid;
  grid-template-columns: 56px 1fr 56px;
  align-items: center;
  height: var(--wc-leibal-header-h);
  border-bottom: 1px solid var(--wc-leibal-line);
  flex-shrink: 0;
}

.wc-leibal-close {
  width: 44px;
  height: 44px;
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
  font-size: 20px;
  transition: background 0.2s ease;
}

.wc-leibal-close:hover {
  background: var(--wc-leibal-tap);
}

.wc-leibal-brand {
  justify-self: center;
  letter-spacing: .35em;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
}

/* Содержимое меню */
.wc-leibal-menu-content {
  overflow-y: auto;
  padding: 16px 16px 28px;
  flex: 1;
}

/* Основной список */
.wc-leibal-top-level {
  list-style: none;
  margin: 0;
  padding: 0 0 8px 0;
}

.wc-leibal-top-level > li > a,
.wc-leibal-sub-label {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #fff;
  text-decoration: none;
  font-size: 28px;
  line-height: 1.4;
  padding: 8px 6px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.wc-leibal-top-level > li > a:hover,
.wc-leibal-sub-label:hover,
.wc-leibal-top-level > li > a:active,
.wc-leibal-sub-label:active {
  background: var(--wc-leibal-tap);
}

/* Стрелка назад */
.wc-leibal-back {
  font-size: 24px;
  transition: transform 0.2s ease;
}

.wc-leibal-sub-label[aria-expanded="true"] .wc-leibal-back {
  transform: rotate(180deg);
}

/* Разделитель */
.wc-leibal-divider {
  height: 1px;
  background: var(--wc-leibal-line);
  margin: 10px 0 16px;
  list-style: none;
}

/* Подменю */
.wc-leibal-sub-list {
  list-style: none;
  margin: 6px 0 0 0;
  padding: 0 0 0 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.wc-leibal-sub-list.wc-leibal-open {
  max-height: 500px;
}

.wc-leibal-sub-list a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 10px 4px;
  font-size: 18px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.wc-leibal-sub-list a:hover {
  background: var(--wc-leibal-tap);
}

/* Счетчик корзины */
.wc-leibal-cart-count {
  font-size: 0.8em;
  opacity: 0.8;
  font-weight: normal;
}

/* Футер меню */
.wc-leibal-footer-blocks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid var(--wc-leibal-line);
}

.wc-leibal-footer-blocks h3 {
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--wc-leibal-muted);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  font-weight: 600;
}

.wc-leibal-footer-blocks ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wc-leibal-footer-blocks li a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 8px 0;
  font-size: 15px;
  opacity: .9;
  transition: opacity 0.2s ease;
}

.wc-leibal-footer-blocks li a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 768px) {
  .wc-leibal-hamburger {
    top: 15px;
    left: 15px;
  }
  
  .wc-leibal-mobile-menu {
    max-width: 100%;
  }
  
  .wc-leibal-top-level > li > a,
  .wc-leibal-sub-label {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .wc-leibal-footer-blocks {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .wc-leibal-top-level > li > a,
  .wc-leibal-sub-label {
    font-size: 22px;
    padding: 12px 6px;
  }
}

/* Скрытие на больших экранах - только для мобильных */
@media (min-width: 768px) {
  .wc-leibal-hamburger {
    display: none !important;
  }
  
  .wc-leibal-mobile-menu {
    display: none !important;
  }
  
  .wc-leibal-overlay {
    display: none !important;
  }
}

/* Предотвращение скролла при открытом меню */
body.wc-leibal-menu-open {
  overflow: hidden;
}