/* ============================================================
   MEGAMENU — BEM, fara dependinte Bootstrap
   Prefix: mm-
   Blocks: mm-navbar, mm-item, mm-panel,
           mm-cat-grid, mm-cat-item, mm-cat-sub,
           mm-products, mm-product,
           mm-dropdown
   ============================================================ */

/* ---- CSS Custom Properties (tema sekekamaccs: bleumarin-negru + mint + portocaliu) ---- */
.mm-navbar {
  --mm-bar-bg:            var(--color-primary, #1a1d1f);
  --mm-bar-color:         #fff;
  --mm-bar-hover-bg:      rgba(255, 255, 255, 0.12);
  --mm-cat-btn-bg:        #fff;
  --mm-cat-btn-hover-bg:  var(--color-bg-light, #f7f8fa);
  --mm-panel-bg:          #fff;
  --mm-panel-shadow: 1px 1px 1px gray;
  --mm-dropdown-sidebar: white;
  --mm-dropdown-border:   #eaeaea;
  --mm-text:              var(--color-primary, #1a1d1f);
  --mm-text-muted:        var(--color-primary-soft, #4a4d4f);
  --mm-link-hover:        var(--color-accent-orange, #ff7a29);
  --mm-sub-bg-hover:      var(--color-bg-light, #f7f8fa);
  --mm-transition:        0.18s ease;
  --mm-z-navbar:          5;
  --mm-z-dropdown:        1001;
  --mm-sidebar-width:     220px;
  --mm-navbar-height: 42px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.mm-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   mm-navbar — bara principala (background full-width)
   ============================================================ */
.mm-navbar {
  position: relative;
  width: 100%;
  z-index: var(--mm-z-navbar);
}

.mm-navbar .mm-navbar__panel .mm-item__name {
}

.mm-navbar.mm-navbar--sticky {
  z-index: 999999;
}

/* Wrapper position:relative pentru dropdown-uri absolute */
.mm-navbar__inner {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #f6f6f6;
  z-index: 1;
}

/* Fundalul barei sta pe un pseudo-element ca sa poata primi backdrop-filter: un element
   cu filtru devine containing block pentru descendentii position:fixed, iar drawer-ul de
   pe mobil (fixed, height:100%) s-ar raporta la bara in loc de viewport. Pseudo-elementul
   nu are descendenti, deci filtrul nu incurca pe nimeni. */
.mm-navbar__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #fff;
}

/* Blur doar in bara sticky, unde chiar aluneca continut pe sub ea */
.mm-navbar--sticky .mm-navbar__inner::before {
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---- Hamburger (mobil) ---- */
.mm-navbar__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.mm-navbar__hamburger-line {
  display: block;
  width: 22px;
  height: 4px;
  background: var(--color-accent-mint);
  border-radius: 2px;
  transition: transform var(--mm-transition), opacity var(--mm-transition);
}

.mm-navbar__hamburger--open .mm-navbar__hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mm-navbar__hamburger--open .mm-navbar__hamburger-line:nth-child(2) {
  opacity: 0;
}
.mm-navbar__hamburger--open .mm-navbar__hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Buton Categorii ---- */
.mm-navbar__cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--mm-cat-btn-bg);
  border: none;
  color: var(--color-primary, #1a1d1f);
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--mm-transition);
  box-sizing: border-box;
  height: 100%;
}

.mm-navbar__shadow {box-shadow: 0px -4px 22px 6px #e1e1e1;}

.mm-navbar__menu-btn-wrapper {padding-left: 10px;}

.mm-navbar__cat-btn-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mm-navbar__cat-btn-icon span {
  display: block;
  width: 18px;
  height: 3px;
  background: var(--color-accent-mint, #1a1d1f);
  border-radius: 1px;
}

/* ---- Panel (lista de items) ---- */
.mm-navbar__panel {
  display: flex;
  flex: 1;
  align-items: stretch;
  min-width: 0;
  z-index: calc(var(--mm-z-dropdown) + 1);
}

/* ---- Liste de items ---- */
.mm-navbar__items {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  line-height: 1;
}

.mm-navbar__items--right {
  margin-left: auto;
}

/* ============================================================
   mm-item — fiecare element din navbar
   ============================================================ */
.mm-item {
  position: relative;
  display: flex;
  align-items: stretch;
  height: var(--mm-navbar-height);
}

.mm-item__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  color: var(--mm-bar-color);
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  transition: background var(--mm-transition);
}

.mm-item__link:hover,
.mm-item--open > .mm-item__link {
  background: var(--mm-bar-hover-bg);
  color: var(--mm-bar-color);
  text-decoration: none;
}

.mm-item__icon {
  font-size: 14px;
  flex-shrink: 0;
}

.mm-item__icon--img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.mm-item__caret {
  font-size: 11px;
  transition: transform var(--mm-transition);
  margin-left: 2px;
}

.mm-item--open > .mm-item__link .mm-item__caret {
  transform: rotate(180deg);
}

/* ---- Panel dropdown al unui navbar item ---- */
.mm-item__panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: var(--mm-panel-bg);
  box-shadow: var(--mm-panel-shadow);
  z-index: var(--mm-z-dropdown);
}

.mm-item__panel--right {
  left: auto;
  right: 0;
}

.mm-item--open > .mm-item__panel {
  display: block;
}

/* ============================================================
   mm-panel — continut generic pentru panel
   Flex: [content flex:1] [bg-image 20%]
   ============================================================ */
.mm-panel {
  display: flex;
  align-items: stretch;
  background: white;
  min-height: 100%;
  position: relative;
}

.mm-panel__content {
  flex: 1;
  padding: 16px;
  min-width: 0;
  scrollbar-width: thin;
  scrollbar-color: #ccc transparent;
}

.mm-panel__content::-webkit-scrollbar {
  width: 4px;
}

.mm-panel__content::-webkit-scrollbar-track {
  background: transparent;
}

.mm-panel__content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

.mm-panel__content::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

.mm-panel__bg-image {
  width: 20%;
  flex-shrink: 0;
  overflow: hidden;
  text-align: right;
  position: absolute;
  right: 0px;
  bottom: 0px;
  max-height: 100%;
}

.mm-panel__bg-image img {
  width: auto;
  height: 100%;
  object-fit: cover;
  display: inline-block;
}

.mm-panel__bg-image a {
  display: block;
  height: 100%;
}

/* ============================================================
   mm-cat-grid — grila de subcategorii
   column = 1..6 mapate pe CSS grid
   ============================================================ */
.mm-cat-grid {
  display: grid;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px 8px;
  align-items: start;
}

.mm-cat-grid--cols-1 { grid-template-columns: 1fr; }
.mm-cat-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.mm-cat-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.mm-cat-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.mm-cat-grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

/* ============================================================
   mm-cat-item — un element din grila de categorii
   ============================================================ */
.mm-cat-item {
  min-width: 0;
}

.mm-cat-item__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: var(--mm-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 3px;
  transition: color var(--mm-transition), background var(--mm-transition);
}

.mm-cat-item__link:hover {
  color: var(--mm-link-hover);
  text-decoration: none;
}

.mm-cat-item__figure {
  flex-shrink: 0;
  margin: 0;
  line-height: 0;
}

.mm-cat-item__image {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 2px;
}

.mm-cat-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mm-cat-item__caret {
  font-size: 10px;
  color: var(--mm-text-muted);
  margin-left: auto;
  flex-shrink: 0;
}

/* ============================================================
   mm-cat-sub — sublista de nivel 3+
   ============================================================ */
.mm-cat-sub {
  list-style: none;
  margin: 2px 0 8px;
  padding: 0;
}

.mm-cat-sub__item {
}

.mm-cat-sub__item:last-child {
  border-bottom: none;
}

.mm-cat-sub__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px 4px 16px;
  font-size: 14px;
  color: var(--mm-text-muted);
  text-decoration: none;
  transition: color var(--mm-transition);
}

.mm-cat-sub__link:hover {
  color: var(--mm-link-hover);
  text-decoration: none;
}

.mm-cat-sub--l4 .mm-cat-sub__link,
.mm-cat-sub--l5 .mm-cat-sub__link {
  padding-left: 24px;
  font-size: 11px;
}

/* ============================================================
   mm-products — grila de produse
   ============================================================ */
.mm-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-product__link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--mm-text);
  padding: 8px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: border-color var(--mm-transition), background var(--mm-transition);
}

.mm-product__link:hover {
  border-color: var(--mm-dropdown-border);
  background: var(--mm-sub-bg-hover);
  text-decoration: none;
}

.mm-product__figure {
  margin: 0 0 8px;
  text-align: center;
  line-height: 0;
}

.mm-product__image {
  width: 100%;
  height: 90px;
  object-fit: contain;
}

.mm-product__details {
  flex: 1;
}

.mm-product__name {
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  height: calc(1.35em * 2);
  margin: 0 0 5px;
  color: var(--mm-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mm-product__pricing {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.mm-product__price {
  font-size: 12px;
  font-weight: 700;
  color: var(--mm-link-hover);
}

.mm-product__price--old {
  font-size: 11px;
  font-weight: 400;
  color: var(--mm-text-muted);
  text-decoration: line-through;
}

.mm-product__price--special {
  color: var(--mm-link-hover);
}

/* ============================================================
   mm-editor — continut HTML liber
   ============================================================ */
.mm-editor-content {
  padding: 8px;
  font-size: 13px;
  color: var(--mm-text);
  line-height: 1.5;
}

/* ============================================================
   mm-dropdown — panelul eMag-style
   Structura: [sidebar 220px | panels flex:1]
   ============================================================ */
.mm-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--mm-panel-bg);
  z-index: var(--mm-z-dropdown);
}

.mm-dropdown.mm-dropdown--homepage {
  box-shadow: none;
}

.mm-dropdown--full-width {
  width: 100%;
}

.mm-dropdown--open {
  display: block;
}

.mm-dropdown__inner {
  display: flex;
  align-items: stretch;
  min-height: 250px;
  /* max-height: 520px; */
}

/* ---- Sidebar ---- */
.mm-dropdown__sidebar {
  width: var(--mm-sidebar-width);
  flex-shrink: 0;
  background: var(--mm-dropdown-sidebar);
  border-right: 1px solid var(--mm-dropdown-border);
  border-bottom: 1px solid var(--mm-dropdown-border);
  overflow-y: auto;
}

.mm-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  line-height: 1.5;
}

.mm-dropdown__item {
  border-bottom: 1px dashed var(--mm-dropdown-border);
}

.mm-dropdown__item:last-child {
  border-bottom: none;
}

.mm-dropdown__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--mm-text);
  text-decoration: none;
  font-size: 14px;
  transition: background var(--mm-transition), color var(--mm-transition);
}

.mm-dropdown__link:hover,
.mm-dropdown__item--active > .mm-dropdown__link {
  background: var(--color-accent-orange, #ff7a29);
  color: white !important;
  -webkit-transition: all 250ms linear;
  -ms-transition: all 250ms linear;
  transition: all 250ms linear;
}

.mm-dropdown__icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
  color: var(--mm-text-muted);
}

.mm-dropdown__item--active > .mm-dropdown__link .mm-dropdown__icon {
  color: var(--mm-link-hover);
}

.mm-dropdown__caret {
  margin-left: auto;
  font-size: 11px;
  color: var(--mm-text-muted);
}

/* ---- Panels (dreapta) ---- */
.mm-dropdown__panels {
  flex: 1;
  min-width: 0;
  position: relative;
}

.mm-dropdown__panel {
  display: none;
  height: 100%;
  margin: 0px !important;
  padding: 0px;
  position: absolute;
  top: 0px;
  width: 100%;
}

.mm-dropdown__panel--active {
  display: block;
}

/* ---- Panelele din dropdown folosesc mm-panel ---- */
.mm-dropdown__panel .mm-panel__content {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Homepage — sidebar + panels mereu deschise, in flow
   ============================================================ */
.mm-navbar--homepage {
  background: transparent;
}

.mm-navbar-container {
}

.mm-navbar--homepage .mm-navbar__cat-btn {
}

.mm-dropdown--homepage .mm-dropdown__sidebar {
  background: #fff;
}

/* Dropdown in flux normal — impinge continutul de sub navbar, doar desktop */
@media (min-width: 768px) {
  .mm-navbar--homepage .mm-navbar__inner {
  flex-wrap: wrap;
  }

  .mm-navbar--homepage .mm-dropdown--homepage {
    display: block;
    position: static;
    flex-basis: 100%;
    width: 100%;
    top: auto;
    left: auto;
    order: 999;
  }
}

/* ============================================================
   mm-navbar--sticky — megamenu sticky (gestionat de global.js)
   ============================================================ */
.mm-navbar-spacer {
  display: block;
}

.mm-navbar--sticky {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030;
}

/* cand navbar-ul devine sticky, .info-header (telefon/email/linkuri) se ascunde (vezi global.js, evenimentul mm:sticky) */
.mm-sticky-active .info-header {
  display: none;
}

/* Extras sticky: ascunse implicit, vizibile cand navbar e sticky */
.mm-navbar__sticky-extras {
  display: none;
  z-index: calc(var(--mm-z-dropdown) + 1);
}

/* Lupa: doar decor deocamdata, vizibila exclusiv pe mobil cand bara e sticky */
.mm-navbar__search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: none;
  border: none;
  color: var(--color-accent-mint);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.mm-navbar--sticky .mm-navbar__inner {border-radius: 0px;padding-top: 2px;padding-bottom: 2px;}

.mm-navbar--sticky .mm-navbar__cat-btn {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.mm-navbar--sticky .mm-navbar__sticky-extras {
  display: flex;
  align-items: center;
  gap: 8px;
  /* trebuie sa poata sa se stranga, altfel search-ul de 480px impinge cosul/contul in afara ecranului */
  flex: 1 1 auto;
  min-width: 0;
  justify-content: space-between;
  padding-left: 20px;
}

/* logo si actiunile isi pastreaza dimensiunea; search-ul absoarbe spatiul ramas */
.mm-navbar--sticky #mm-sticky-logo,
.mm-navbar--sticky .mm-navbar__sticky-actions {
  flex: 0 0 auto;
}

.mm-navbar--sticky #mm-sticky-search {
  flex: 1 1 auto;
  min-width: 0;
}

/* Telefonul din top header, adus in bara sticky la dreapta search-ului.
   Selectorul e mai specific pentru ca theme.css coloreaza `.mm-navbar__sticky-extras a`. */
.mm-navbar__sticky-extras .mm-navbar__phone {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 8px;
  color: var(--color-accent-mint);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}

.mm-navbar__sticky-extras .mm-navbar__phone:hover,
.mm-navbar__sticky-extras .mm-navbar__phone:focus {
  color: var(--color-accent-orange);
  text-decoration: none;
}

.mm-navbar__sticky-extras .mm-navbar__phone .icon {
  color: inherit;
  line-height: 1;
}

@keyframes mm-phone-shake {
  0%, 80%, 100% { transform: rotate(0deg); }
  82% { transform: rotate(-15deg); }
  84% { transform: rotate(13deg); }
  86% { transform: rotate(-11deg); }
  88% { transform: rotate(9deg); }
  90% { transform: rotate(-7deg); }
  92% { transform: rotate(5deg); }
  94% { transform: rotate(-3deg); }
  96% { transform: rotate(1deg); }
}

.mm-navbar__phone--shake .icon {
  transform-origin: 50% 60%;
  animation: mm-phone-shake 5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .mm-navbar__phone--shake .icon {
    animation: none;
  }
}

.mm-navbar--sticky #mm-sticky-search > div,
.mm-navbar--sticky #mm-sticky-search .navbar-form.navbar-search {
  width: 100%;
  max-width: 480px;
  min-width: 0;
  margin: 0;
}

.mm-navbar--sticky #mm-sticky-logo img {
  height: calc(var(--mm-navbar-height) - 16px);
  width: auto;
  display: block;
  min-width: auto;
  margin: 0px;
}

.mm-navbar--sticky .mm-navbar__sticky-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-right: 10px;
}

/* Currency/language din search-ul clonat — ascunse in sticky */
.mm-navbar--sticky #mm-sticky-search .top-dropdowns {
  display: none;
}

.mm-navbar--sticky .mm-navbar__items--right {
  display: none !important;
}

.mm-navbar--sticky .mm-homepage-banner {
  display: none !important;
}

.mm-navbar--sticky .mm-dropdown__inner {
  min-height: auto !important;
}

/* Search bar in sticky: aliniere si dimensiuni reduse (portate din style.css) */
.mm-navbar--sticky #mm-sticky-search .navbar-form.navbar-search .btn-search {
  margin: 0;
}

.mm-navbar--sticky #mm-sticky-search .navbar-search #search .form-control {
  height: 32px !important;
}

/* Glass pill pe fundal inchis (bara sticky): tenta alba, nu neagra */
.mm-navbar--sticky #search {
  background: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 999px !important;
}

.mm-navbar--sticky #search:focus-within {
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}

.mm-navbar--sticky #search input[type="text"] {
    color: var(--color-primary);
}

.mm-navbar--sticky #search input[type="text"]::placeholder {
  color: var(--color-primary);
}

.mm-navbar--sticky #button-search-top {
  background: transparent !important;
}

.mm-navbar--sticky #search .fa-search,
.mm-navbar--sticky #search .fa-search:before {
  color: #fff;
}

/* Mobile: extras ocupa spatiu ramas, search si wishlist ascunse */
@media (max-width: 767px) {
  .mm-navbar--sticky .mm-navbar__sticky-extras {
    flex: 1;
    justify-content: space-between;
    padding-left: 5px !important;
    padding-right: 10px;
  }

  .mm-navbar.mm-navbar--sticky .mm-navbar-container {
    padding: 0px;
  }

  .mm-navbar--sticky #mm-sticky-search {
    display: none;
  }

  .mm-navbar--sticky .mm-navbar__phone-text {
    display: none;
  }

  .mm-navbar__sticky-extras .mm-navbar__phone .icon {
    font-size: 16px;
    color: var(--color-accent-orange);
  }

  .mm-navbar--sticky #mm-sticky-cart .favorites {
    display: none !important;
  }

  .mm-navbar--sticky #cart .total-price {
    display: none !important;
  }

  .mm-navbar__cat-btn-icon {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .mm-navbar--sticky .mm-navbar__panel {
    display: none;
  }

  /* blocul de cont din bara e doar pentru mobil */
  .mm-navbar__items--mobile-user {
    display: none;
  }
}

.mm-navbar--sticky #ajax_search_results {
  top: 32px !important;
}

.mm-navbar--sticky .user-name {
  display: none !important;
}

.mm-homepage-banner {
  /* position: absolute; */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
}

.mm-dropdown--homepage .mm-dropdown__panel--active {
  /* position: relative; */
  z-index: 1;
}

/* ============================================================
   Drawer overlay + elemente ascunse pe desktop
   ============================================================ */
.mm-item__toggle {
  display: none;
}

.mm-navbar__close {
  display: none;
}

/* ============================================================
   mm-drawer-sub — sub-lista inline in mm-item__panel
   Nivel 2 (bold) + nivel 3 (indentat)
   ============================================================ */
.mm-drawer-sub {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 220px;
}

.mm-drawer-sub__item {
  border-bottom: 1px solid var(--mm-dropdown-border);
}

.mm-drawer-sub__item:last-child {
  border-bottom: none;
}

.mm-drawer-sub__link {
  display: block;
  padding: 9px 16px;
  color: var(--mm-text);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--mm-transition), background var(--mm-transition);
}

.mm-drawer-sub__link:hover {
  color: var(--mm-link-hover);
  background: var(--mm-sub-bg-hover);
  text-decoration: none;
}

.mm-drawer-sub__link--l2 {
  font-weight: 600;
}

.mm-drawer-sub--l3 {
  padding: 0;
  min-width: auto;
}

.mm-drawer-sub__link--l3 {
  padding-left: 28px;
  font-size: 13px;
  font-weight: 400;
  color: var(--mm-text-muted);
}

/* ============================================================
   mm-flyout — meniu de tip lista (menu_type = list)
   Nivelul 2 sta in .mm-item__panel (navbar) sau langa item (dropdown),
   nivelul 3 se deschide lateral, in sensul meniului.
   ============================================================ */
.mm-flyout {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  min-width: 230px;
  background: var(--mm-panel-bg);
}

.mm-flyout__item {
  position: relative;
}

.mm-flyout__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--mm-text);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--mm-transition), background var(--mm-transition);
}

.mm-flyout__link:hover {
  color: var(--mm-link-hover);
  background: var(--mm-sub-bg-hover);
  text-decoration: none;
}

.mm-flyout__name {
  flex: 1;
  min-width: 0;
}

.mm-flyout__caret {
  font-size: 11px;
  color: var(--mm-text-muted);
  flex-shrink: 0;
}

/* Meniul din dreapta se deschide spre stanga, deci si sageata sta in stanga randului */
.mm-flyout--left .mm-flyout__link {
  flex-direction: row-reverse;
}

/* Sub-nivelele: ascunse pana la hover, deschise lateral */
.mm-flyout__item > .mm-flyout {
  display: none;
  position: absolute;
  top: -6px;
  /* box-shadow: var(--mm-panel-shadow); */
  z-index: 1;
  border: 1px solid #eaeaea;
}

.mm-flyout__item > .mm-flyout--right {
  left: 100%;
}

.mm-flyout__item > .mm-flyout--left {
  right: 100%;
}

.mm-flyout__item:hover > .mm-flyout {
  display: block;
}

/* Navbar: nivelul 2 e chiar continutul panelului, deci nu se pozitioneaza singur */
.mm-item__panel > .mm-flyout {
  min-width: 100%;
}

/* Dropdown-ul de categorii: nivelul 2 iese in dreapta itemului din sidebar */
.mm-dropdown__item {
  position: relative;
}

.mm-dropdown__item > .mm-flyout {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  min-height: 100%;
  /* box-shadow: var(--mm-panel-shadow); */
  border: 1px solid #eaeaea;
  z-index: 1;
}

.mm-dropdown__item:hover > .mm-flyout {
  display: block;
}

/* Sidebar-ul are overflow-y:auto in modul grid, ceea ce ar taia flyout-urile */
.mm-dropdown--list .mm-dropdown__sidebar {
  overflow: visible;
  position: relative;
  z-index: 2;
}

/* Fara zona de panouri nu mai are rost inaltimea minima a mega-panelului */
.mm-dropdown--list .mm-dropdown__inner {
  min-height: 0;
}

.mm-navbar .nav-user ul {
  top: 100%;
}

/* ============================================================
   MOBILE — max-width: 767px
   ============================================================ */
@media (max-width: 767px) {

  .mm-navbar__hamburger {
    display: flex;
    order: -1;
  }

  .mm-navbar__cat-btn {
    padding: 0 14px;
  }

  /* Drawer full-screen din stanga */
  .mm-navbar__panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-primary, #1a1d1f);
    z-index: 9999;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s 0.28s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .mm-navbar__panel--open {
    visibility: visible;
    transform: translateX(0);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
    padding-bottom: 50px;
  }

  .mm-navbar__items,
  .mm-navbar__items--right {
    flex-direction: column;
    width: 100%;
    margin-left: 0;
  }

  /* In drawer lista e pe coloana, deci align-items decide latimea itemilor:
     centrarea din bara i-ar strange la latimea textului. */
  .mm-navbar__panel .mm-navbar__items {
    align-items: stretch;
  }

  /* Close button (drawer) */
  .mm-navbar__close {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    width: 100%;
    text-align: left;
  }

  .mm-navbar__close:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .mm-navbar__close-icon {
    font-size: 24px;
    line-height: 1;
    font-weight: 300;
  }

  /* Items pe mobil — flex row cu wrap, panelul cade pe rand nou */
  /* Regula de baza fixeaza .mm-item la inaltimea barei. In drawer itemul trebuie sa
     creasca la deschiderea acordeonului, altfel panelul infasurat pe randul urmator iese
     din <li> si se deseneaza peste itemii de dedesubt in loc sa-i impinga in jos. */
  .mm-item {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    height: auto;
    min-height: var(--mm-navbar-height);
  }

  .mm-item__link {
    flex: 1;
    min-width: 0;
    padding: 13px 16px;
    justify-content: flex-start;
    color: #fff;
  }

  /* theme.css coloreaza `.mm-navbar__items a` in bleumarin, pentru bara alba de desktop;
     in drawer fundalul e inchis, deci itemii de prim nivel raman albi. Doar ei — linkurile
     din sub-panouri stau pe fundal alb. */
  .mm-navbar__panel .mm-navbar__items > .mm-item > .mm-item__link {
    color: #fff;
  }

  .mm-item__link:hover,
  .mm-item--open > .mm-item__link {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
  }

  .mm-item__caret {
    display: none;
  }

  /* Buton +/- expand */
  .mm-item__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    flex-shrink: 0;
    align-self: stretch;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
  }

  .mm-item__toggle:hover,
  .mm-item__toggle[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.1);
  }

  /* Panel pe mobil: static, accordion — ocupa rand intreg */
  .mm-item__panel,
  .mm-item__panel--right {
    position: static;
    display: none;
    box-shadow: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #fff;
    flex-basis: 100%;
    width: 100%;
  }

  .mm-item--open > .mm-item__panel,
  .mm-item--open > .mm-item__panel--right {
    display: block;
  }

  /* Meniu tip lista in drawer: nivelul 2 e panelul acordeonului (vezi toMobile din
     megamenu.js), iar nivelul 3 ramane desfasurat sub el, doar indentat. */
  .mm-flyout {
    position: static;
    min-width: 0;
    box-shadow: none;
  }

  .mm-flyout__item > .mm-flyout {
    position: static;
    display: block;
    box-shadow: none;
  }

  .mm-flyout__item {
    border-bottom: 1px solid var(--mm-dropdown-border);
  }

  .mm-flyout__item:last-child {
    border-bottom: none;
  }

  .mm-flyout--l3 {
    padding: 0;
  }

  .mm-flyout--l3 .mm-flyout__link {
    padding-left: 32px;
    font-size: 13px;
    color: var(--mm-text-muted);
  }

  .mm-flyout__caret {
    display: none;
  }

  /* Grid fortat 1 coloana pe mobil */
  .mm-cat-grid {
    grid-template-columns: 1fr !important;
  }

  .mm-products {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Cat e drawer-ul deschis, navbar-ul trebuie sa iasa deasupra .top-header (z-index 100),
     altfel logo-ul si search-ul se deseneaza peste drawer */
  .mm-navbar--drawer-open {
    z-index: 10000;
  }


  /* .header-logo are width:150px din tema, dar in bara sticky imaginea e de ~26px:
     lasam containerul pe latimea continutului, ca lupa sa stea chiar langa logo */
  .mm-navbar--sticky #mm-sticky-logo .header-logo {
    width: auto;
  }

  /* Lupa langa logo; margin-right auto o tine lipita de el, iar actiunile raman in dreapta */
  .mm-navbar--sticky .mm-navbar__search-toggle {
    display: flex;
    margin-right: auto;
    margin-top: -3px;
  }

  /* Contul din bara nu se mai comporta ca dropdown pe mobil: fara sageata si fara
     lista, tap-ul duce direct in linkul butonului. Prinde si clona din bara sticky. */
  .mm-navbar .nav-user .sekekamaccs-chevron-down {
    display: none;
  }

  .mm-navbar .nav-user ul.bordered {
    display: none !important;
  }

  /* Contul sta in bara, in dreapta; cel din drawer se ascunde ca sa nu fie duplicat */
  .mm-navbar__items--mobile-user {
    flex-direction: row;
    width: auto;
    margin-left: auto;
  }

  .mm-navbar__panel .mm-navbar__user-item {
    display: none;
  }

  /* Regulile de sticky ascund lista --right si eticheta contului ca sa faca loc
     extras-urilor din bara. Inauntrul drawer-ului insa sunt chiar continutul lui. */
  .mm-navbar--sticky .mm-navbar__panel .mm-navbar__items--right {
    display: flex !important;
  }

  .mm-navbar--sticky .mm-navbar__panel .user-name {
    display: inline-block !important;
  }

  /* Butonul alb "Toate Categoriile" si dropdown-ul de desktop nu exista pe mobil:
     continutul lor e mutat in drawer de megamenu.js */
  .mm-navbar__menu-btn-wrapper,
  .mm-dropdown {
    display: none !important;
  }

  /* Itemi eliminati de filtrul de mobil (vezi applyMobileFilter din megamenu.js) */
  .mm-item--mobile-hidden {
    display: none !important;
  }

  /* Itemii de tip editor pastreaza doar linkul, fara continutul panoului */
  .mm-item--no-panel-mobile > .mm-item__panel {
    display: none !important;
  }

  /* Panourile mutate sunt <section>, iar normalize.css le da margin-bottom prin
     section:last-of-type — selector mai specific decat clasa, deci urcam si noi */
  .mm-item > .mm-item__panel {
    margin: 0;
  }

  /* Panourile mutate din dropdown isi pierd layout-ul de mega-panel */
  .mm-item__panel .mm-panel {
    display: block;
    box-shadow: none;
    min-height: 0;
  }

  .mm-item__panel .mm-panel__content {
    padding: 0;
  }

  .mm-item__panel .mm-cat-grid {
    display: block;
  }

  /* Paritate cu vechiul drawer: doar nivelele 2 si 3 */
  .mm-cat-sub--l4,
  .mm-cat-sub--l5 {
    display: none;
  }

  .mm-panel__bg-image {
    display: none;
  }

  .mm-product__name {
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.mm-homepage-banner > .owl-carousel {
  width: 100%;
  padding: 0px;
}