/* ===================== BARRA 1 ===================== */
.top-fixed-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 40px;                /* Altura exacta */
  background: black;
  color: #fff;
  z-index: 1001;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.top-fixed-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;  /* 🔹 Izquierda ↔ Derecha */
  align-items: center;
}

.left-text p {
  margin: 0;
  padding: 0;
  color: var(--text-color-white);
  font-size: 0.7rem;
}

.right-text {
  display: flex;
  align-items: center;
  gap: 10px;
}

.right-text a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
}

.right-text a:hover {
  opacity: 0.85;
}

.separator {
  color: rgba(255,255,255,0.6);
  margin: 0 5px;
}

.top-fixed-bar a:hover {
  opacity: 0.85;            /* efecto hover sutil */
}

#selectSucursal {
  display: inline-block;
  width: auto;
  min-width: 100px;
  height: 20px;
  font-size: 0.7rem;
  padding: 2px 6px;
}

/* === BLOQUE IZQUIERDO: ICONOS + TEXTO === */
.left-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 15px;
  height: 32px;
}

/* === ICONOS DE REDES (Estilo Tolsen) === */
.social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 0;
  row-gap: 0;
  padding: 0 10px;
  box-sizing: border-box;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  line-height: 22.4px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.social-icons a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 16px;
  transition: opacity 0.3s ease;
  border: none;
  background: none;
  padding: 0;
}

.social-icons a:hover i.bi-facebook { color: #1877f2; }
.social-icons a:hover i.bi-instagram { color: #E1306C; }
.social-icons a:hover i.bi-youtube { color: #FF0000; }
.social-icons a:hover i.bi-pinterest { color: #E60023; }
.social-icons a:hover i.bi-linkedin { color: #0A66C2; }
.social-icons a:hover i.bi-whatsapp { color: #25D366; }
.social-icons a:hover i.bi-twitter { color: rgb(255, 255, 255); }

/* === TEXTO DE ALERTA A LA DERECHA DE LOS ICONOS === */
.left-content p {
  margin: 0;
  padding-left: 10px;
  font-family: "Roboto", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  line-height: 22.4px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.textoBarra1 {
  color: #ffcc00;
  background: #000;
  font-weight: bold;
  text-shadow: 0 0 8px #ffcc00, 0 0 12px #ffcc00;
  animation: glow 1.5s ease-in-out infinite alternate;
}

@keyframes glow {
  from { text-shadow: 0 0 5px #ffcc00; }
  to { text-shadow: 0 0 20px #ffcc00, 0 0 30px #ffaa00; }
}


/* ===================== BARRA 2 ===================== */
.main-header {
  position: fixed;
  /*top: 40px;                   /* Pegada justo debajo de la barra 1 */
  left: 0;
  width: 100%;
  /*height: 80px;                /* Altura exacta */
  background: white;
  display: flex;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  top: var(--topbar-h);
  height: var(--header-h);
}

.main-header .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
/* === LOGO === */
.logo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* === ICONO DE SESIÓN === */
.session-icon {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  cursor: pointer;
  color: var(--dark-color);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.session-icon i {
  font-size: 1.2rem;
  color: var(--dark-color);
  transition: color 0.3s ease;
}

.session-icon:hover,
.session-icon:hover i {
  color: var(--primary-color);
}

/* ===================== BARRA 3 ===================== */
.sub-bar {
  position: fixed;
  left: 0;
  width: 100%;
  background: var(--dark-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
  margin: 0;
  padding: 0;
  transition: transform 0.3s ease;

  /* ✅ NUEVO: evita desbordes verticales si algún texto intenta bajar */
  overflow: hidden;
  height: var(--subbar-h);
  top: calc(var(--topbar-h) + var(--header-h));
}

.sub-bar-content {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0; /* 🔹 sin espacios arriba ni abajo */

  /* ✅ NUEVO: asegura ancho completo para que el scroll funcione bien */
  width: 100%;
}

.sub-bar nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;

  /* ✅ NUEVO: scroll horizontal cuando no entra */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  /* ✅ NUEVO: ocultar scrollbar (opcional) */
  scrollbar-width: none; /* Firefox */
}
.sub-bar nav::-webkit-scrollbar {
  display: none; /* Chrome/Edge/Safari */
}

.sub-bar nav ul {
  list-style: none;
  display: flex;
  /*align-items: center;*/
  align-items: stretch; /* antes center */

  /* ⛔️ ANTES: space-between + max-width 600px rompía los textos
     ✅ AHORA: una sola fila que mide lo necesario y scrollea */
  justify-content: flex-start;
  width: max-content;
  max-width: none;

  margin: 0;
  padding: 0 12px;

  /* ✅ NUEVO: evita salto de línea */
  flex-wrap: nowrap;

  /* ✅ NUEVO: separación controlada (si querés, ajustá este valor) */
  gap: 12px;
}

.sub-bar nav ul li {
  margin: 0;
  text-align: center;

  /* ✅ NUEVO: cada item no se achica */
  flex: 0 0 auto;
  /* ✅ todos igual de anchos */
  width: 120px;
}

.sub-bar nav ul li a {
  color: var(--white-color);
  text-decoration: none;
  font-weight: 450;
  transition: color 0.3s ease;

  height: var(--subbar-h);
  
  /* ✅ ancho y padding uniforme */
  width: 100%;
  padding: 6px 8px;   /* antes 8px 12px */

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  font-size: 0.70rem;
  line-height: 1.15;

  /* ojo: si querés 2 líneas sin “...” */
  overflow: hidden;      /* corta el excedente */
  text-overflow: unset;  /* evita ellipsis */
  text-align: center;
}

.sub-bar nav ul li a i{
  font-size: 1.1rem;   /* antes 1rem */
  margin-top: 1px;
}

.sub-bar nav ul li a:hover {
  color: var(--primary-color);
}

/* 3) Texto del item: permitir 2 líneas reales */
/*.sub-bar .nivel-text{
  display: block;
  white-space: normal;
  word-break: break-word;
  max-width: 130px;
  text-overflow: unset;
}*/

.sub-bar .nivel-text{
  display: -webkit-box;
  -webkit-line-clamp: 2;       /* ✅ 2 líneas para todos */
  -webkit-box-orient: vertical;
  overflow: hidden;

  text-align: center;
  line-height: 1.05;

  max-width: 100%;
  word-break: break-word;
}


/* 4) Icono arriba */
.sub-bar .nivel-icon{
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block;
}

/* Menú Móvil - Estilo Mejorado */
.mobile-menu {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  color: var(--white-color);
  background: none;
  border: none;
  padding: 4px 10px;
  gap: 6px; /* espacio entre ícono y texto */
  text-decoration: none;

  /* ✅ NUEVO: tampoco se parte */
  white-space: nowrap;
}

/* Solo los ítems fijados con imagen */
.item-fijado-con-img{
  white-space: normal;
}

/* El <a> ya es flex column, pero aseguramos centrado consistente */
.sub-bar nav ul li a.item-fijado-con-img{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* centra el bloque completo */
  gap: 6px;
}

/* ✅ Área del icono con alto fijo */
.sub-bar .nivel-icon-wrap{
  height: 36px;            /* reserva fija */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Icono */
.sub-bar .nivel-icon{
  width: 35px;
  height: 35px;
  object-fit: contain;
  display: block;
}

/* ✅ Área del texto con alto fijo (2 líneas) */
.sub-bar .nivel-text-wrap{
  height: calc(2 * 1.05em); /* 2 líneas * line-height */
  display: flex;
  align-items: center;      /* centra verticalmente el texto dentro del wrap */
  justify-content: center;
  width: 100%;
}

/* Texto (2 líneas) */
.sub-bar .nivel-text{
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
  line-height: 1.05;
  width: 100%;
  word-break: break-word;
}


/* ===================== HAMBURGER DE CATEGORIA AL LADO DEL LOGO ===================== */
/* Botón al lado del logo */
.menu-lateral-categorias {
  display: inline-block;
  margin-right: 10px;
}

.btn-lateral:hover {
  background-color: var(--primary-color);
  color: var(--black-color);
  opacity: 0.9; /* opcional: leve feedback visual */
}

.btn-lateral {
  background: var(--white-color);
  color: rgb(0, 0, 0);
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

/* ==============================
   PANEL LATERAL DE CATEGORÍAS
   ============================== */
.panel-categorias {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: flex-start;
  align-items: stretch;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.panel-categorias.active {
  opacity: 1;
  visibility: visible;
}

.panel-categorias-content {
  background-color: var(--white-color);
  width: 100%;
  max-width: 400px;
  height: 100vh;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  box-shadow: 5px 0 30px rgba(0, 0, 0, 0.1);
  position: absolute;
}

.panel-categorias.active .panel-categorias-content {
  transform: translateX(0);
}

/* HEADER */
.panel-categorias-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  background: var(--white-color);
  z-index: 10;
}
/*.panel-categorias-login*/
.btn-panel-login {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--dark-color);
  background-color: var(--primary-color);
  padding: 8px 14px;
  border-radius: 8px;
}

.btn-panel-login:hover {
  background-color: var(--secondary-color);
  color: var(--light-color);
  opacity: 0.9; /* opcional: leve feedback visual */
}

.cerrar-panel-btn {
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-color);
  align-items: flex-end;
  justify-content: end;
}

.cerrar-panel-btn:hover {
  color: var(--primary-color);
}

/* BOTÓN VOLVER */
.panel-categorias-back {
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  background: var(--white-color);
  position: sticky;
  top: 65px;
  z-index: 9;
}

.btn-volver {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  gap: 5px;
}

.btn-volver:hover {
	color: var(--secondary-color);
}

.panel-categorias-back.d-none {
  display: none;
}

/* LISTA DE NIVELES */
.panel-categorias-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.panel-categorias-lista li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  font-weight: 500;
  color: var(--dark-color);
  transition: all 0.3s ease;
}

.panel-categorias-lista li:hover {
  background-color: var(--light-color);
  color: var(--secondary-color);
}

.panel-categorias-lista li i {
  color: var(--gray-color);
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.panel-categorias-lista li:hover i {
  color: var(--secondary-color);
  transform: translateX(4px);
}
/* ==========================
   MEGA MENÚ HORIZONTAL
   ========================== */
.mega-categorias-horizontal {
  position: fixed;
  /*top: 160px;*/ /* debajo de las barras */
  top: calc(var(--topbar-h) + var(--header-h) + var(--subbar-h));
  left: 0;
  width: 100%;
  background: var(--white-color);
  border-top: 2px solid var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 4000;
   /* 🔹 Scroll vertical suave */
  max-height: 480px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable; /* evita movimiento del contenido */
}

.mega-categorias-horizontal.active {
  display: block;
  animation: fadeInDown 0.25s ease;
}

/* 🔹 Scrollbar moderno y minimalista */
.mega-categorias-horizontal::-webkit-scrollbar {
  width: 10px;
}

.mega-categorias-horizontal::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 5px;
  border: 2px solid var(--white-color);
}

.mega-categorias-horizontal::-webkit-scrollbar-thumb:hover {
  background-color: var(--secondary-color);
}

.mega-categorias-horizontal::-webkit-scrollbar-track {
  background-color: #f4f4f4;
  border-radius: 5px;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CONTENEDOR PRINCIPAL */
.mega-categorias-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 30px 40px;
  padding: 25px 40px;
  overflow: visible;
}

/* CADA SUBSECCIÓN */
.mega-categorias-col {
  width: 220px;
  min-height: 100px;
  white-space: normal;
  vertical-align: top;
}

/* TÍTULO DE LA SUBSECCIÓN */
.mega-categorias-col h4 {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 1rem;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
  padding-bottom: 6px;
}

/* LISTA DE GRUPOS (nivel 2) */
.mega-categorias-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  column-fill: auto;             /* 🔹 llena por columna */
  column-width: 180px;           /* 🔹 ancho mínimo por columna */
  column-gap: 25px;
  max-height: 400px;
}

.mega-categorias-col ul li {
  padding: 4px 0;
  font-size: 0.93rem;
  color: var(--dark-color);
  cursor: pointer;
  transition: color 0.2s ease;
  break-inside: avoid;           /* 🔹 evita cortar ítems */
  word-wrap: break-word;         /* 🔹 ajusta texto largo */
  white-space: normal;           /* 🔹 permite varias líneas */
  line-height: 1.3;
  border-bottom: none;
}

.mega-categorias-col ul li a {
  text-decoration: none;
  color: var(--dark-color);
}

.mega-categorias-col ul li a:hover {
  color: var(--primary-color);
}

.mega-categorias-col,.mega-grupo-item:hover {
  color: var(--primary-color);
}

.mega-categorias-col, .mega-grupo-item  {
  text-decoration: none;
  color: var(--dark-color);
}

/* ==========================
   MENÚ PANEL LOGIN
   ========================== */
.panel-cuenta {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 6000;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.panel-cuenta.active { right: 0; }

.cerrar-panel-cuenta {
  background: none;
  border: none;
  font-size: 26px;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
}

.panel-cuenta-header h2 {
  font-size: 1.3rem;
  margin-top: 40px;
  font-weight: 600;
}

.panel-cuenta-menu {
  list-style: none;
  padding: 20px 0;
  flex-grow: 1;
}

.panel-cuenta-menu a:hover {
  color: var(--primary-color);
}

.panel-cuenta-menu li {
  margin: 10px 0;
}

.panel-cuenta-menu a {
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: #222;
  text-decoration: none;
}

.panel-cuenta-menu i {
  margin-right: 8px;
  font-size: 1.2rem;
}

.btn-panel-cuenta{
	background: var(--primary-color);
	border: none;
}

.btn-panel-cuenta:hover{
	background: var(--secondary-color);
}
/* ==========================
   LOGIN - REGISTRO
   ========================== */
/* Contenedor principal */
.session-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #000;
}

/* Bloque que contiene icono y textos */
.session-block {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icono persona */
.session-icon-img {
  font-size: 34px; /* 🔹 más grande */
  color: #000;
}

/* Contenedor de textos */
.session-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  max-width: 120px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Texto superior */
.session-text .main-text {
  font-weight: 600;
  color: #000;
  text-decoration: none;
  font-size: 0.7rem;
}

.session-text .main-text:hover {
  text-decoration: underline;
  color:var(--primary-color);
}

/* Texto inferior */
.session-text .sub-text {
  font-size: 0.7rem;
  color: #777;
  text-decoration: none;
}

.session-text .sub-text:hover {
  text-decoration: underline;
  color:var(--primary-color);
}

/* Versión logueada */
.session-text.logged .main-text {
  font-weight: 500;
  color: #000;
}