/* ======================================= */
/* VARIABLES */
/* ======================================= */
:root {
  --cat-bg: #000;
  --cat-text: #d5d5d5;
  --panel-border: #ddd;
  --left-bg: #f8f8f8;
  --left-hover: #e5e5e5;
  --sub-hover: #111;
  --title-border: #a01a26;

  --radius: 10px;
  --transition: 0.25s ease;
}

/* ======================================= */
/* CONTENEDOR PRINCIPAL */
/* ======================================= */
.categories-dropdown {
  width: 260px;
  position: relative;
  font-family: Arial, sans-serif;
}

/* ======================================= */
/* TRIGGER */
/* ======================================= */
.categories-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--cat-bg);
  padding: 12px 15px;
  border: 2px solid #000000d1;
  border-radius: 6px;
  cursor: pointer;
  color: var(--cat-text);
  width: 250px;
  height: 40px;
  font-size: 14px;
  transition: background var(--transition);
}

.categories-trigger:hover {
  background: #101010;
}

/* Título */
.titulo-cat {
  font-weight: bold;
  color: var(--cat-text);
}

/* Cantidad total de categorías */
.titulo-cat .cantidad-categorias {
  font-weight: 300;
  margin-left: 6px;
  color: var(--cat-text);
  font-size: 14px;
  opacity: 0.85;
}


/* ======================================= */
/* LISTA MEGA MENU */
/* ======================================= */
.categories-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 900px;
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  margin-top: 5px;
  z-index: 50;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--transition), transform var(--transition);
}

.categories-list.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* ======================================= */
/* MEGA MENU */
/* ======================================= */
.mega-menu-lateral {
  display: flex;
  height: 350px;
  overflow: hidden;
}

/* ========================= */
/* IZQUIERDA */
/* ========================= */
.mega-menu-left {
  width: 250px;
  background: var(--left-bg);
  border-right: 1px solid var(--panel-border);
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

/* Scroll más moderno */
.mega-menu-left::-webkit-scrollbar {
  width: 6px;
}
.mega-menu-left::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 6px;
}

.mega-menu-left li {
  padding: 6px 15px;
  cursor: pointer;
  font-weight: 400;
  color: #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}

.mega-menu-left li:hover,
.mega-menu-left li.active {
  background: var(--left-hover);
}

.mega-menu-left li wa-icon {
  font-size: 14px;
  opacity: 0.6;
}

/* ========================= */
/* DERECHA */
/* ========================= */
.mega-menu-right {
  flex-grow: 1;
  padding: 20px;
  position: relative;
  overflow-y: auto;
}

/* Paneles */
.mega-subcat-panel {
  display: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity var(--transition), transform var(--transition);
}

.mega-subcat-panel.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* Header del panel */
.mega-subcat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--title-border);
  padding-bottom: 5px;
}

.mega-subcat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

/* Ver más */
.ver-mas {
  font-size: 14px;
  text-decoration: underline !important;
  font-weight: 600;
  color: #0073aa;
  transition: color var(--transition);
}

.ver-mas:hover {
  text-decoration: none;
  color: #005177;
}

/* Subcategorías */
.mega-subcat-panel ul {
  list-style: none;
  padding-left: 0;
}

.mega-subcat-panel li {
  padding: 6px 0;
}

.mega-subcat-panel a {
  text-decoration: none;
  color: #555;
  font-size: 14px;
  transition: color var(--transition);
}

.mega-subcat-panel a:hover {
  color: var(--sub-hover);
}

/* ======================================= */
/* RESPONSIVE */
/* ======================================= */
@media (max-width: 850px) {
  .categories-list {
    width: 100vw;
  }
  .mega-menu-lateral {
    flex-direction: column;
    height: auto;
    max-height: 80vh;
  }
  .mega-menu-left {
    width: 100%;
    height: 200px;
  }
  .mega-menu-right {
    height: 250px;
  }
}

@media (max-width: 480px) {
  .categories-trigger {
    width: 100%;
  }
  .categories-dropdown {
    width: 100%;
  }
}

.mega-subcat-header h3 .cantidad-categoria {
    font-weight: 300; /* light */
    opacity: 0.8;
    margin-left: 6px;
    font-size: 14px;
}

