/* ==========================================================================
   HO Mega Menu - Frontend Styles
   Per-item hover dropdown panels (column-style below each button)
   Full overlay styles are in theme's header.scss
   ========================================================================== */

/* ---- The navbar and its nav container need position:relative/static
   so the panels (absolute children) anchor to #ho-navbar's bottom ---- */
#ho-navbar {
  position: relative;
}

/* The nav wrapper must NOT clip the panels */
#_desktop_top_menu {
  position: static;
  overflow: visible;
}

/* ---- Panels container: absolutely positioned, escapes to #ho-navbar ---- */
.ho-megamenu-panels {
  position: absolute;
  top: 100%;   /* bottom edge of #ho-navbar */
  left: 0;
  right: 0;
  z-index: 998;
  pointer-events: none;
}

.ho-megamenu-panels.active {
  pointer-events: auto;
}

/* ---- Individual panel: dropdown below its trigger ---- */
.ho-megamenu-panel {
  display: none;
  position: absolute;
  top: 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  background: #f0f0f0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  min-width: 220px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ho-megamenu-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ---- Dropdown caret arrow on nav items with submenus — hidden per design ---- */
.ho-mm-caret {
  display: none !important;
}

/* ---- Active nav item highlight ---- */
.ho-mm-nav-item.ho-mm-active > a {
  color: #232323 !important;
}

/* ---- Button style nav items (OFERTAS etc.) ---- */
.ho-navbar__nav .ho-mm-nav-button > a {
  background: #232323;
  color: #fff !important;
  padding: 0.4rem 1.4rem;
  margin-left: 0.4rem;
  line-height: 1;
}

.ho-navbar__nav .ho-mm-nav-button > a:hover {
  background: #000;
  color: #fff !important;
}

/* ---- Bubble text badge ---- */
.ho-mm-bubble {
  display: inline-block;
  background: #e53935;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15em 0.4em;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  vertical-align: top;
  margin-left: 0.25rem;
  line-height: 1.2;
}

/* ---- Panel internal layout ---- */
.ho-megamenu-panel .ho-megamenu__container {
  padding: 1.25rem 1.5rem;
}

.ho-megamenu-panel .ho-megamenu__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-items: flex-start;
}

.ho-megamenu-panel .ho-megamenu__column {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  border-left: none;
  border-right: none;
}

.ho-megamenu-panel .ho-megamenu__breaker {
  flex-basis: 100%;
  height: 0;
}

/* Column title — match NOVEDADES / NUESTROS BESTSELLERS boldness */
.ho-megamenu-panel .ho-megamenu__column-title {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #818181;
  margin: 0 0 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: none;
  white-space: nowrap;
}

/* Category / CMS list */
.ho-megamenu-panel .ho-megamenu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ho-megamenu-panel .ho-megamenu__list li {
  margin-bottom: 0.2rem;
}

.ho-megamenu-panel .ho-megamenu__list a {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  color: #818181;
  text-decoration: none;
  transition: color 0.15s ease;
  display: block;
  white-space: nowrap;
  line-height: 1.5;
  padding: 0.15rem 0;
}

.ho-megamenu-panel .ho-megamenu__list a:hover {
  color: #232323;
}

/* Subcategory sublist */
.ho-megamenu-panel .ho-megamenu__sublist {
  list-style: none;
  margin: 0;
  padding: 0 0 0 0.75rem;
}

.ho-megamenu-panel .ho-megamenu__sublist li {
  margin-bottom: 0.15rem;
}

.ho-megamenu-panel .ho-megamenu__sublist a {
  font-size: 0.75rem;
  letter-spacing: 0;
  color: #818181;
  white-space: nowrap;
  line-height: 1.4;
}

.ho-megamenu-panel .ho-megamenu__sublist a:hover {
  color: #232323;
}

/* Image block */
.ho-megamenu-panel .ho-megamenu__image-block {
  margin: 0.5rem 0;
}

.ho-megamenu-panel .ho-megamenu__image-block img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* ---- Hide panels on mobile (except when inside mobile menu - overridden in theme) ---- */
@media (max-width: 767px) {
  .ho-megamenu-panels {
    display: none !important;
  }
}

/* ---- Hide mobile-only elements on desktop (navbar) - only show in mobile menu ---- */
.ho-navbar__nav .ho-mm-mobile-toggle {
  display: none !important;
}

.ho-navbar__nav .ho-mobile-submenu.ho-mm-mobile-panel {
  display: none !important;
}
