/* Hero de la home: imagen a ras de los bordes, sin espaciado de Elementor. */
#index .elementor-3170101 .elementor-element-625b198,
#index .elementor-3170101 .elementor-element-625b198 > .elementor-container,
#index .elementor-3170101 .elementor-element-625b198 .elementor-row,
#index .elementor-3170101 .elementor-element-625b198 .elementor-column-wrap,
#index .elementor-3170101 .elementor-element-625b198 .elementor-widget-wrap,
#index .elementor-3170101 .elementor-element-625b198 .elementor-widget-container,
#index .elementor-3170101 .elementor-element-625b198 .swiper-slide-inner {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
}
#index .elementor-3170101 .elementor-element-625b198 .elementor-container,
#index .elementor-3170101 .elementor-element-625b198 .elementor-row,
#index .elementor-3170101 .elementor-element-625b198 .elementor-column,
#index .elementor-3170101 .elementor-element-625b198 .elementor-widget-wrap,
#index .elementor-3170101 .elementor-element-625b198 .elementor-widget-image-carousel {
  width: 100%;
}
#index .elementor-3170101 .elementor-element-625b198 .rg-home-hero-link,
#index .elementor-3170101 .elementor-element-625b198 .swiper-slide-image {
  display: block;
  width: 100%;
}
#index .elementor-3170101 .elementor-element-625b198 .swiper-slide-image {
  height: auto;
}

/* Barra de servicio del prototipo, encima del header en todas las páginas. */
#header > .rg-topbar {
  width: 100%;
  min-height: 31px;
  background: #df0024;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
}
#header .rg-topbar__inner {
  max-width: 1320px;
  min-height: 31px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
#header .rg-topbar__services,
#header .rg-topbar__links {
  display: flex;
  align-items: center;
  min-width: 0;
}
#header .rg-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  border-right: 1px solid rgba(255, 255, 255, .55);
  white-space: nowrap;
}
#header .rg-topbar__item:first-child { padding-left: 0; }
#header .rg-topbar__item:last-child { border-right: 0; }
#header .rg-topbar__item .fa { font-size: 16px; }
#header .rg-topbar__links a {
  padding: 0 12px;
  border-right: 1px solid rgba(255, 255, 255, .55);
  white-space: nowrap;
}
#header .rg-topbar__links a:last-child { padding-right: 0; border-right: 0; }
#header .rg-topbar a,
#header .rg-topbar a:visited { color: #fff; text-decoration: none; }
#header .rg-topbar a:hover,
#header .rg-topbar a:focus-visible { color: #fff; text-decoration: underline; }
@media (max-width: 1100px) {
  #header .rg-topbar__payments { display: none; }
  #header .rg-topbar__item { padding: 0 11px; }
  #header .rg-topbar__links a { padding: 0 8px; }
}
@media (max-width: 767.98px) {
  #header .rg-topbar__inner { justify-content: center; padding: 0 10px; }
  #header .rg-topbar__links { display: none; }
  #header .rg-topbar__item { padding: 0 10px; }
}
@media (max-width: 420px) {
  #header .rg-topbar__shipping { display: none; }
  #header .rg-topbar__whatsapp { padding-right: 0; border-right: 0; }
}

/* Menú de escritorio Regaladito. Capa aislada sobre iqitmegamenu. */
@media (min-width: 992px) {
  #cbp-hrmenu { position: relative; }
  #cbp-hrmenu > ul { display: flex !important; align-items: stretch; justify-content: space-between; gap: 4px; position: relative; margin: 0; padding: 0; }
  #cbp-hrmenu > ul > li { position: static !important; float: none !important; flex: 0 1 auto; min-width: 0; }
  #cbp-hrmenu > ul > li > a {
    display: flex !important; align-items: center; justify-content: center; min-height: 44px;
    padding: 8px 10px !important; background: #fff !important; color: #1e293b !important;
    font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
  }
  #cbp-hrmenu > ul > li > a:hover, #cbp-hrmenu > ul > li > a:focus-visible,
  #cbp-hrmenu > ul > li.cbp-hropen > a {
    color: #d93d42 !important; background: #fafafa !important;
  }
  #cbp-hrmenu .cbp-tab-title { display: inline-flex; align-items: center; gap: 6px; }
  #cbp-hrmenu .cbp-tab-title::before {
    content: ''; display: inline-block; flex: 0 0 26px; width: 26px; height: 26px;
    background-position: center; background-repeat: no-repeat; background-size: 160% 160%;
  }
  #cbp-hrmenu .cbp-mainlink-icon, #cbp-hrmenu .cbp-mainlink-iicon,
  #cbp-hrmenu .cbp-submenu-aindicator { display: none !important; }
  #cbp-hrmenu .rg-menu-all .cbp-tab-title::before { background-image: url('../img/regaladito-menu/menu.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-32 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/escolar.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-33 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/oficina-regaladito.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-30 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/bazar.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-31 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/Jugeteria.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-34 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/hogar.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-37 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/tech.png'); }
  #cbp-hrmenu #cbp-hrmenu-tab-38 .cbp-tab-title::before { background-image: url('../img/regaladito-menu/marcas.png'); }
  #cbp-hrmenu .rg-menu-offers .cbp-tab-title::before {
    background-image: url('../img/regaladito-menu/descuentos.png');
    filter: invert(29%) sepia(74%) saturate(2263%) hue-rotate(329deg) brightness(95%);
  }
  #cbp-hrmenu .rg-menu-offers > a, #cbp-hrmenu .rg-menu-offers > a .cbp-tab-title { color: #d93d42 !important; }
  #cbp-hrmenu > ul > li > .cbp-hrsub, #cbp-hrmenu .rg-menu-all .cbp-hrsub {
    position: absolute !important; top: 100% !important; left: 0 !important; right: 0 !important;
    width: 100% !important; max-width: 100% !important; margin: 0 !important; transform: none !important;
    border: 1px solid #e5e7eb; border-top: 1px solid #e5e7eb; background: #fff !important;
    box-shadow: 0 10px 22px rgba(0, 0, 0, .12); max-height: min(70vh, 640px);
    overflow-y: auto; z-index: 1000 !important;
  }
  #cbp-hrmenu .cbp-hrsub-inner { background: #fff !important; }
  #cbp-hrmenu .cbp-hrsub a, #cbp-hrmenu .cbp-hrsub .cbp-column-title { color: #243044 !important; }
  #cbp-hrmenu .cbp-hrsub a:hover, #cbp-hrmenu .cbp-hrsub a:focus-visible { color: #d93d42 !important; text-decoration: underline; }
  #cbp-hrmenu .cbp-hrsub .cbp-column-title { font-weight: 700 !important; border-bottom: 1px solid #e5e7eb; padding-bottom: 8px !important; }
  #cbp-hrmenu .rg-menu-all > .cbp-hrsub { display: none; visibility: hidden; opacity: 0; z-index: 90 !important; }
  #cbp-hrmenu .rg-menu-all.cbp-hropen > .cbp-hrsub,
  #cbp-hrmenu .rg-menu-all:focus-within > .cbp-hrsub { display: block !important; visibility: visible !important; opacity: 1 !important; }
  #cbp-hrmenu > ul:has(> li:not(.rg-menu-all):hover) .rg-menu-all > .cbp-hrsub { display: none !important; visibility: hidden !important; opacity: 0 !important; }
  #cbp-hrmenu .rg-menu-all-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 24px 28px; }
  #cbp-hrmenu .rg-menu-all-grid a {
    display: block; padding: 12px 14px; border: 1px solid #e5e7eb; border-radius: 6px;
    background: #fafafa; font-size: 14px; font-weight: 600; text-decoration: none;
  }
}

/* Creative Elements deja rojo el contenedor real del menú (5ad14e4b). */
header .elementor-1170101 .elementor-element-5ad14e4b > .elementor-column-wrap,
header .elementor-1170101 .elementor-element-5ad14e4b > .elementor-column-wrap > .elementor-widget-wrap,
#iqitmegamenu-wrapper,
#iqitmegamenu-horizontal,
#cbp-hrmenu > ul {
  background: #fff !important;
}
@media (min-width: 992px) {
  #cbp-hrmenu .cbp-hrsub,
  #cbp-hrmenu .cbp-hrsub-inner,
  #cbp-hrmenu .iqitmegamenu-submenu-container,
  #cbp-hrmenu .menu_row,
  #cbp-hrmenu .cbp-menu-column,
  #cbp-hrmenu .cbp-menu-column-inner,
  #cbp-hrmenu .cbp-category-link-w,
  #cbp-hrmenu ul.cbp-hrsub-level2,
  #cbp-hrmenu ul.cbp-hrsub-level3 {
    background-color: #fff !important;
  }
}
@media (max-width: 991.98px) {
  #iqitmegamenu-mobile,
  #iqitmegamenu-mobile .mobile-menu__header-wrapper,
  #iqitmegamenu-mobile .mobile-menu__content,
  #iqitmegamenu-mobile .mobile-menu__scroller,
  #iqitmegamenu-mobile .mobile-menu__submenu,
  #iqitmegamenu-mobile .mobile-menu__footer,
  #mobile-header .col-mobile-menu-dropdown.show {
    background: #fff !important;
    color: #1e293b !important;
  }
  #iqitmegamenu-mobile .mobile-menu__tab { border-bottom: 1px solid #e5e7eb !important; }
  #iqitmegamenu-mobile .mobile-menu__link,
  #iqitmegamenu-mobile .mobile-menu__arrow,
  #iqitmegamenu-mobile .mobile-menu__back-btn,
  #iqitmegamenu-mobile .mobile-menu__close,
  #mobile-header .col-mobile-menu-dropdown.show .m-nav-btn { color: #1e293b !important; }
  #iqitmegamenu-mobile .mobile-menu__link:hover,
  #iqitmegamenu-mobile .mobile-menu__link:focus-visible { color: #d93d42 !important; }
}

/* Separador y tipografía del menú como en la maqueta. */
@media (min-width: 992px) {
  header .elementor-1170101 .elementor-element-5080a160 {
    border-top: 1px solid #e5e7eb;
  }
  #cbp-hrmenu > ul > li > a .cbp-tab-title {
    font-size: 13px !important;
    font-weight: 600 !important;
  }
  #cbp-hrmenu :is(#cbp-hrmenu-tab-32, #cbp-hrmenu-tab-33, #cbp-hrmenu-tab-30, #cbp-hrmenu-tab-31, #cbp-hrmenu-tab-34, #cbp-hrmenu-tab-37) .cbp-hrsub :is(a, .cbp-column-title) {
    text-transform: lowercase !important;
  }
  #cbp-hrmenu :is(#cbp-hrmenu-tab-32, #cbp-hrmenu-tab-33, #cbp-hrmenu-tab-30, #cbp-hrmenu-tab-31, #cbp-hrmenu-tab-34, #cbp-hrmenu-tab-37) .cbp-hrsub :is(a, .cbp-column-title)::first-letter {
    text-transform: uppercase !important;
  }
}

/* No mostrar un hover heredado cuando el menú se desplaza bajo el cursor. */
@media (min-width: 992px) {
  /* Si IQIT deja dos pestañas abiertas, conservar solo el panel del elemento bajo el cursor. */
  #cbp-hrmenu:has(> ul > li:hover) > ul > li:not(:hover) > .cbp-hrsub {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  #cbp-hrmenu.rg-scroll-hover-lock > ul > li.cbp-hrmenu-tab > .cbp-hrsub {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* Escolar: conservar estos títulos y ocultar únicamente sus listas hijas. */
@media (min-width: 992px) {
  #cbp-hrmenu-tab-32 .cbp-categories-row > [class*="col-"] > .cbp-category-link-w > a.cbp-category-title:is(
    [href*="/322-"], [href*="/370-"], [href*="/339-"],
    [href*="/500-"], [href*="/314-"], [href*="/356-"]
  ) + ul.cbp-category-tree {
    display: none !important;
  }
}

/* Jerarquía visual de Escolar: títulos de origen ocultos solo tras reubicar sus enlaces. */
@media (min-width: 992px) {
  #cbp-hrmenu-tab-32 .cbp-categories-row.rg-escolar-organized > .rg-escolar-source-hidden {
    display: none !important;
  }
}
