/* ============================================================
   RC Custom CSS Override
   Loaded via head.tpl AFTER all compiled theme CSS
   Edit via FTP: /themes/warehouse/assets/css/rc-custom.css
   Changes are INSTANT - no cache clearing needed
   ============================================================ */

/* ===========================================================
   STEP 1: NEUTRALIZE broken IqitThemeEditor mobile menu patches
   These override the 4 broken patches (v1, v2, fix, fix-v2)
   that accumulated in the 250K textarea
   =========================================================== */

@media (max-width: 991px) {

  /* --- RESET: kill pseudo-elements from v1 + v2 --- */
  #iqitmegamenu-mobile::before,
  #iqitmegamenu-mobile::after,
  #_mobile_iqitmegamenu-mobile::before,
  #_mobile_iqitmegamenu-mobile::after,
  .mobile-menu::before,
  .mobile-menu::after {
    content: none !important;
    display: none !important;
  }

  /* --- RESET: kill body overlay from v1 --- */
  body.mobile-menu-open::after,
  body.m-nav-open::after {
    content: none !important;
    display: none !important;
  }

  /* --- RESET: overflow hidden to contain content --- */
  .mobile-menu {
    overflow: hidden !important;
  }

  /* --- FIX: Nuclear specificity override.
       Theme adds .show to #_mobile_iqitmegamenu-mobile on click.
       Compiled CSS has translateX(-100%) !important at (1,0,0).
       We use html body prefix for (2,1,0) to guarantee we win. --- */
  html body #_mobile_iqitmegamenu-mobile.show,
  html body .show #iqitmegamenu-mobile,
  html body .show .mobile-menu,
  html body .dropdown-menu.show #iqitmegamenu-mobile,
  html body .dropdown-menu.show .mobile-menu {
    transform: none !important;
    left: 0 !important;
    visibility: visible !important;
    position: fixed !important;
    top: 0 !important;
    width: 88vw !important;
    max-width: 380px !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 10000 !important;
  }

  /* ===========================================================
     STEP 2: CLEAN mobile menu premium redesign
     Dark refined, glassmorphism cards, SVG icons
     =========================================================== */

  /* --- Menu container --- */
  .mobile-menu {
    background: linear-gradient(170deg, #080e18 0%, #0d1a2d 35%, #132744 70%, #0f1f38 100%) !important;
    width: 88vw !important;
    max-width: 380px !important;
    box-shadow: 10px 0 50px rgba(0,0,0,0.7) !important;
    border-right: 1px solid rgba(29,78,216,0.12) !important;
  }

  /* --- Header / close area --- */
  .mobile-menu__header-wrapper,
  .mobile-menu__header {
    background: rgba(29,78,216,0.06) !important;
    border-bottom: 1px solid rgba(29,78,216,0.15) !important;
    padding: 20px !important;
  }

  /* --- Close button glassmorphism --- */
  .mobile-menu__close,
  button.mobile-menu__close {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(29,78,216,0.15) !important;
    border: 1.5px solid rgba(29,78,216,0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: 20px !important;
    opacity: 1 !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 2px 12px rgba(29,78,216,0.15) !important;
  }

  .mobile-menu__close:hover,
  button.mobile-menu__close:hover {
    background: rgba(29,78,216,0.4) !important;
    border-color: #3b82f6 !important;
    transform: rotate(90deg) scale(1.05) !important;
  }

  /* --- Scroller --- */
  .mobile-menu__scroller {
    padding: 12px 12px 8px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .mobile-menu__scroller::-webkit-scrollbar { width: 3px !important; }
  .mobile-menu__scroller::-webkit-scrollbar-track { background: transparent !important; }
  .mobile-menu__scroller::-webkit-scrollbar-thumb { background: rgba(29,78,216,0.25) !important; border-radius: 10px !important; }

  /* --- Menu items as glassmorphism cards --- */
  .mobile-menu__tab {
    margin-bottom: 6px !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    background: rgba(255,255,255,0.03) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    animation: mmCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both !important;
  }

  .mobile-menu__tab:nth-child(1) { animation-delay: 0.06s !important; }
  .mobile-menu__tab:nth-child(2) { animation-delay: 0.12s !important; }
  .mobile-menu__tab:nth-child(3) { animation-delay: 0.18s !important; }
  .mobile-menu__tab:nth-child(4) { animation-delay: 0.24s !important; }
  .mobile-menu__tab:nth-child(5) { animation-delay: 0.30s !important; }

  @keyframes mmCardIn {
    from { opacity: 0; transform: translateX(-20px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
  }

  .mobile-menu__tab:hover,
  .mobile-menu__tab:focus-within {
    border-color: rgba(29,78,216,0.25) !important;
    background: rgba(29,78,216,0.06) !important;
    box-shadow: 0 4px 20px rgba(29,78,216,0.08) !important;
  }

  /* --- Main links --- */
  .mobile-menu__link,
  .mobile-menu__tab > a,
  .mobile-menu__tab > .mobile-menu__link {
    color: rgba(255,255,255,0.92) !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    padding: 16px 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    min-height: 54px !important;
  }

  .mobile-menu__link:hover,
  .mobile-menu__tab > a:hover {
    color: #fff !important;
    padding-left: 22px !important;
  }

  /* --- SVG icon badges per menu item --- */
  .mobile-menu__tab:nth-child(1) > a::before,
  .mobile-menu__tab:nth-child(1) > .mobile-menu__link::before { content: '' !important; display: inline-block !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; background: rgba(29,78,216,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z'/%3E%3Cpolyline points='9 22 9 12 15 12 15 22'/%3E%3C/svg%3E") no-repeat center/16px !important; border: 1px solid rgba(29,78,216,0.2) !important; flex-shrink: 0 !important; }

  .mobile-menu__tab:nth-child(2) > a::before,
  .mobile-menu__tab:nth-child(2) > .mobile-menu__link::before { content: '' !important; display: inline-block !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; background: rgba(29,78,216,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E") no-repeat center/16px !important; border: 1px solid rgba(29,78,216,0.2) !important; flex-shrink: 0 !important; }

  .mobile-menu__tab:nth-child(3) > a::before,
  .mobile-menu__tab:nth-child(3) > .mobile-menu__link::before { content: '' !important; display: inline-block !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; background: rgba(29,78,216,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'/%3E%3C/svg%3E") no-repeat center/16px !important; border: 1px solid rgba(29,78,216,0.2) !important; flex-shrink: 0 !important; }

  .mobile-menu__tab:nth-child(4) > a::before,
  .mobile-menu__tab:nth-child(4) > .mobile-menu__link::before { content: '' !important; display: inline-block !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; background: rgba(29,78,216,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E") no-repeat center/16px !important; border: 1px solid rgba(29,78,216,0.2) !important; flex-shrink: 0 !important; }

  .mobile-menu__tab:nth-child(5) > a::before,
  .mobile-menu__tab:nth-child(5) > .mobile-menu__link::before { content: '' !important; display: inline-block !important; width: 32px !important; height: 32px !important; border-radius: 8px !important; background: rgba(29,78,216,0.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") no-repeat center/16px !important; border: 1px solid rgba(29,78,216,0.2) !important; flex-shrink: 0 !important; }

  /* --- Arrow indicator --- */
  .mobile-menu__arrow,
  .js-mobile-menu__link--has-submenu {
    color: rgba(255,255,255,0.3) !important;
    font-size: 11px !important;
    transition: all 0.3s ease !important;
    margin-left: auto !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    background: rgba(255,255,255,0.04) !important;
  }

  .mobile-menu__tab:hover .mobile-menu__arrow {
    color: #3b82f6 !important;
    background: rgba(29,78,216,0.1) !important;
  }

  /* --- Submenu panel --- */
  .mobile-menu__submenu,
  .mobile-menu__submenu--panel {
    background: rgba(0,0,0,0.2) !important;
    border-top: 1px solid rgba(29,78,216,0.1) !important;
    padding: 8px !important;
  }

  /* --- Back button --- */
  .mobile-menu__back-btn {
    color: rgba(255,255,255,0.5) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 10px 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border-bottom: 1px solid rgba(255,255,255,0.04) !important;
  }

  /* --- Submenu title --- */
  .mobile-menu__title {
    color: #3b82f6 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    padding: 14px 16px 6px !important;
  }

  /* --- Submenu links --- */
  .mobile-menu__links-list { padding: 4px !important; list-style: none !important; margin: 0 !important; }
  .mobile-menu__links-list-li { margin: 3px 0 !important; padding: 0 !important; }

  .mobile-menu__links-list-li a {
    color: rgba(255,255,255,0.85) !important;
    font-size: 14.5px !important;
    padding: 13px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    text-decoration: none !important;
    border-radius: 10px !important;
    border: 1px solid rgba(255,255,255,0.04) !important;
    background: rgba(255,255,255,0.02) !important;
    transition: all 0.25s ease !important;
  }

  .mobile-menu__links-list-li a:hover {
    color: #fff !important;
    background: rgba(29,78,216,0.1) !important;
    border-color: rgba(29,78,216,0.2) !important;
    transform: translateX(3px) !important;
  }

  /* --- Servicios submenu icons --- */
  .mobile-menu__tab[data-dropdown="1"] .mobile-menu__links-list-li a::before { content: '' !important; display: inline-block !important; width: 28px !important; height: 28px !important; border-radius: 7px !important; background: rgba(29,78,216,0.1) !important; border: 1px solid rgba(29,78,216,0.15) !important; flex-shrink: 0 !important; background-repeat: no-repeat !important; background-position: center !important; background-size: 14px !important; }

  .mobile-menu__tab[data-dropdown="1"] .mobile-menu__links-list-li:nth-child(1) a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Cpath d='M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z'/%3E%3C/svg%3E") !important; }
  .mobile-menu__tab[data-dropdown="1"] .mobile-menu__links-list-li:nth-child(2) a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Crect x='2' y='7' width='20' height='14' rx='2'/%3E%3Cpath d='M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16'/%3E%3C/svg%3E") !important; }
  .mobile-menu__tab[data-dropdown="1"] .mobile-menu__links-list-li:nth-child(3) a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E") !important; }
  .mobile-menu__tab[data-dropdown="1"] .mobile-menu__links-list-li:nth-child(4) a::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233b82f6' stroke-width='2'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cline x1='9' y1='1' x2='9' y2='4'/%3E%3Cline x1='15' y1='1' x2='15' y2='4'/%3E%3Cline x1='9' y1='20' x2='9' y2='23'/%3E%3Cline x1='15' y1='20' x2='15' y2='23'/%3E%3Cline x1='20' y1='9' x2='23' y2='9'/%3E%3Cline x1='20' y1='14' x2='23' y2='14'/%3E%3Cline x1='1' y1='9' x2='4' y2='9'/%3E%3Cline x1='1' y1='14' x2='4' y2='14'/%3E%3C/svg%3E") !important; }

  /* --- Footer premium --- */
  .mobile-menu__footer {
    border-top: 1px solid rgba(29,78,216,0.12) !important;
    background: linear-gradient(180deg, rgba(29,78,216,0.04) 0%, rgba(0,0,0,0.15) 100%) !important;
    padding: 20px !important;
  }

  .mobile-menu__footer a,
  .mobile-menu__footer span {
    color: rgba(255,255,255,0.6) !important;
    font-size: 13px !important;
  }

  /* Iniciar sesion pill */
  .mobile-menu__footer a[href*="mi-cuenta"],
  .mobile-menu__footer a[href*="my-account"],
  .mobile-menu__footer a[href*="autenticacion"],
  .mobile-menu__footer a[href*="iniciar-sesion"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 22px !important;
    border-radius: 24px !important;
    background: linear-gradient(135deg, #1D4ED8 0%, #2563eb 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: 0 4px 16px rgba(29,78,216,0.3) !important;
    margin-top: 12px !important;
    text-decoration: none !important;
    width: 100% !important;
  }
}
