
/* =========================================
   MEGA MENÚ PRODUCTOS
   ========================================= */

.menu-item-mega-productos,
.menu-productos-auto {
    position: relative;
}

.menu-item-mega-productos > .mega-productos,
.menu-productos-auto > .mega-productos {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 940px;
    background: #efefef;
    z-index: 99999;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* abrir al hacer hover en Productos */
.menu-item-mega-productos:hover > .mega-productos,
.menu-item-mega-productos:focus-within > .mega-productos,
.menu-productos-auto:hover > .mega-productos,
.menu-productos-auto:focus-within > .mega-productos {
    display: block;
}

.mega-productos__inner {
    display: grid;
    grid-template-columns: 52% 48%;
    min-height: 520px;
}

/* =========================
   COLUMNA IZQUIERDA
   ========================= */

.mega-productos__categorias {
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    
}

.mega-productos__categoria {
    margin: 0;
    padding: 0;
}

.mega-productos__categoria > a {
    gap:15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  color: #11345d;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

/* Flecha simple al final */
.mega-productos__categoria > a::after {
    content: "";
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    margin-left: 20px;

    background-image: url("./img/arrow-white-r.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;

    opacity: 0;
    transition: opacity 0.2s ease;
}

.mega-productos__categoria.is-active > a,
.mega-productos__categoria:hover > a,
.mega-productos__categoria:focus-within > a {
    background: #f97a1b;
    color: #ffffff;
}

.mega-productos__categoria.is-active > a::after,
.mega-productos__categoria:hover > a::after,
.mega-productos__categoria:focus-within > a::after {
    opacity: 1;
}

/* =========================
   COLUMNA DERECHA
   ========================= */

.mega-productos__paneles {
    position: relative;
    background: #efefef;
    padding: 30px 40px;
}

.mega-productos__panel {
    display: none;
}

.mega-productos__panel.is-active {
    display: block;
}

.mega-productos__subcategorias {
    margin: 0;
    padding: 0;
    list-style: none;
    text-transform: none;
    font-weight: normal
}

.mega-productos__subcategorias li {
    margin: 0 0 14px;
    padding: 0;
    line-height: 1em
}

.mega-productos__subcategorias a {
    display: inline-block;
    font-size: 16px;
    line-height: 1.35;
    color: #11345d;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.mega-productos__subcategorias a:hover,
.mega-productos__subcategorias a:focus {
    opacity: 0.75;
}

/* =========================
   SEGURIDAD VISUAL
   ========================= */

.site-header,
.main-header,
.header,
header {
    overflow: visible !important;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 991px) {

    .menu-item-mega-productos > .mega-productos,
    .menu-productos-auto > .mega-productos {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .mega-productos__inner {
        grid-template-columns: 1fr;
    }

    .mega-productos__categorias {
        border-right: 0;
        border-bottom: 1px solid #e3e3e3;
    }

    .mega-productos__categoria > a {
        min-height: 60px;
        padding: 0 20px;
        font-size: 16px;
    }

    .mega-productos__paneles {
        padding: 20px;
    }

    .mega-productos__subcategorias a {
        font-size: 16px;
    }
}
.
/* Icono categoría padre */
.mega-productos__categoria > a {
    gap: 12px;
}

/* Icono como máscara para poder cambiar color */
.mega-productos__icono {
    flex: 0 0 38px;
    width: 25px;
    height: 25px;
    display: inline-block;
    background-color: currentColor;

    -webkit-mask-image: var(--icono-url);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;

    mask-image: var(--icono-url);
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

/* Nombre de la categoría */
.mega-productos__nombre {
    flex: 1;
}

/* La flecha sigue al final */
.mega-productos__categoria > a::after {
    flex: 0 0 auto;
}

.mega-productos__subcategoria.current-menu-item > a,
.is-default-open > a{
    text-decoration: underline;
    font-weight: bold
}
