/* Configuración de la barra intermedia principal */
.middle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribuye espacio entre izquierda, centro y derecha */
  padding: 15px 40px;
  background-color: #000; /* Fondo negro como la referencia */
  box-sizing: border-box;
  width: 100%;
}

/* 1. Logo a la Izquierda */
.middle-bar .logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto; /* Evita que el logo se deforme o estire */
}

.logo-circular {
  width: 80px;        /* Tamaño del logo circular */
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* 2. Buscador en el Centro */
.search-bar {
  position: relative;
  flex: 1;              /* Toma el espacio disponible central */
  max-width: 650px;     /* Ancho máximo del buscador */
  margin: 0 30px;       /* Separación con el logo y las acciones */
}

.search-bar input {
  width: 100%;
  padding: 12px 20px 12px 45px; /* Espacio para el icono de la lupa */
  border-radius: 25px;          /* Bordes totalmente redondeados */
  border: 1px solid #444;
  background-color: transparent;
  color: #fff;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.search-bar input::placeholder {
  color: #aaa;
}

.search-bar .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 16px;
}

/* 3. Acciones a la Derecha (Banderas y Botones Circulares) */
.right-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
}

/* Banderas */
.flags {
  display: flex;
  gap: 8px;
  font-size: 18px;
}

/* Iconos circulares (Usuario y Carrito) */
.user-icons {
  display: flex;
  gap: 12px;
}

.icon-circle {
  width: 42px;
  height: 42px;
  border: 1px solid #666;      /* Borde gris como en la imagen de referencia */
  border-radius: 50%;         /* Forma totalmente circular */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.3s ease;
}

.icon-circle:hover {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
} 

/* =========================================
   SIDEBAR DERECHO Y OVERLAY
   ========================================= */

/* Fondo oscuro translúcido */
/* =========================================
   SIDEBAR Y OVERLAY (MENÚ DESPLEGABLE)
   ========================================= */

/* Fondo oscuro translúcido */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Menú lateral flotante */
.sidebar-menu {
  position: fixed;
  top: 0;
  right: -300px; /* Oculto a la derecha fuera de pantalla */
  width: 300px;
  height: 100vh;
  background-color: #111111;
  color: #ffffff;
  z-index: 999;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* Clase que lo activa al hacer clic */
.sidebar-menu.active {
  right: 0 !important;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #222222;
  background-color: #000000;
}

.sidebar-header h2 {
  font-size: 20px;
  margin: 0;
  color: #fff;
}

.close-sidebar-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.sidebar-links {
  list-style: none;
  padding: 20px;
  margin: 0;
  overflow-y: auto;
}

.sidebar-links li {
  margin-bottom: 15px;
}

.sidebar-links a {
  color: #dddddd;
  text-decoration: none;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.sidebar-links a:hover {
  background-color: #e50914;
  color: #ffffff;
}

.sidebar-links hr {
  border: none;
  border-top: 1px solid #222222;
  margin: 15px 0;
} 

/* =========================================
   ESTILOS DE SEGURIDAD Y ADMINISTRADOR
   ========================================= */

/* Ocultar elementos */
.hidden {
  display: none !important;
}

/* 1. Botón Seguro Circular (Inferior Izquierda y Transparente) */
.btn-seguro-circular {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15); /* Muy transparente */
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.btn-seguro-circular:hover {
  background-color: rgba(255, 255, 255, 0.35);
  transform: scale(1.05);
}

.seguro-icon-img {
  width: 26px;
  height: 26px;
  opacity: 0.6; /* Transparencia para mayor discreción */
  object-fit: contain;
}

/* 2. Modal PIN estilo idéntico a la imagen */
.modal-pin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-pin-card {
  background-color: #121212;
  border-radius: 16px;
  padding: 20px;
  width: 320px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
  border: 1px solid #2a2a2a;
}

.input-pin-container {
  position: relative;
  width: 100%;
  margin-bottom: 20px;
}

.input-pin-container input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border-radius: 10px;
  border: none;
  background-color: #ffffff;
  color: #000000;
  font-size: 18px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  outline: none;
  box-sizing: border-box;
}

.toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #333;
  cursor: pointer;
  font-size: 16px;
}

.modal-pin-actions {
  display: flex;
  gap: 12px;
}

.btn-pin-acceder {
  flex: 1;
  padding: 12px;
  background-color: #1d5cb2; /* Azul exacto de la referencia */
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  cursor: pointer;
}

.btn-pin-cancelar {
  flex: 1;
  padding: 12px;
  background-color: #555555; /* Gris de la referencia */
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-family: 'Segoe Print', 'Comic Sans MS', cursive, sans-serif;
  cursor: pointer;
}

/* 3. Cuadro Switch (Parte superior izquierda, alejado) */
.switch-box-container {
  position: fixed;
  top: 20px;
  left: 20px;
  background-color: #111111;
  border: 1px solid #333333;
  padding: 10px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.switch-label {
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
}

.switch-toggle {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-switch {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #444;
  transition: .3s;
  border-radius: 24px;
}

.slider-switch:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider-switch {
  background-color: #e50914;
}

input:checked + .slider-switch:before {
  transform: translateX(22px);
}

/* 4. Estilo Botón Administrador dentro del Sidebar */
.btn-admin-sidebar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  text-decoration: none;
}

.admin-icon-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}