/* Estilos base para Crakcio Store */

:root {
  --color-primario: #0f172a;
  --color-secundario: #1e293b;
  --color-acento: #3b82f6;
  --color-blanco: #ffffff;
  --color-texto: #f1f5f9;
  --fuente-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #0e0e0e;
  color: #e0e0e0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}
h1, h2, h3, h4 {
  color: #00bfff;
  font-family: 'Orbitron', sans-serif;
}
header {
  background-color: var(--color-secundario);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  color: var(--color-blanco);
}

nav a {
  color: var(--color-blanco);
  text-decoration: none;
  margin-left: 1rem;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--color-acento);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: white;
  font-size: 1.1rem;
}

.nav-links li a:hover {
  color: #00aaff;
}
.banner {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-bottom: 3px solid var(--color-acento);
}

main {
  padding: 2rem;
}

.producto {
  background-color: #1a1a1a;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 15px;
  margin: 15px;
  width: 240px;
  box-shadow: 0 0 10px #000;
  transition: transform 0.3s, box-shadow 0.3s;
}

.producto:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px #00bfff;
}
.producto-img {
  width: 150px;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}
button {
  background-color: transparent;
  border: 2px solid #00bfff;
  color: #00bfff;
  padding: 8px 12px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

button:hover {
  background-color: #00bfff;
  color: #0d0d0d;
  box-shadow: 0 0 10px #00bfff;
}
.producto h3 {
  margin: 0.5rem 0;
}

.boton-agregar {
  background-color: var(--color-acento);
  color: var(--color-blanco);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.boton-agregar:hover {
  background-color: #2563eb;
}

footer {
  background-color: var(--color-secundario);
  color: var(--color-texto);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
  position: relative;
}

footer a {
  color: var(--color-acento);
  margin: 0 0.5rem;
  text-decoration: none;
}

footer .redes {
  margin-top: 1rem;
}
.redes {
  display: flex;
  justify-content: center; /* Centra los íconos horizontalmente */
  align-items: center;
  gap: 15px;
  margin-top: 20px;
}

.carrito {
  position: fixed;
  right: 0;
  top: 80px;
  width: 300px;
  background: var(--color-secundario);
  border-left: 2px solid var(--color-acento);
  padding: 1rem;
  z-index: 999;
  height: calc(100% - 80px);
  overflow-y: auto;
  display: none;
}
#contador-carrito {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: red;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 50%;
  font-weight: bold;
}
.carrito-item {
  background-color: #1a1a1a;
  padding: 10px;
  margin: 10px 0;
  border-left: 3px solid #00bfff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.carrito-item img {
  width: 60px;
  border-radius: 5px;
}
.carrito.visible {
  display: block;
}
.carrito-icono {
  cursor: pointer;
  position: relative;
  font-size: 24px;
}
#boton-carrito {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #00aaff;
  color: white;
  padding: 10px 15px;
  border-radius: 50px;
  box-shadow: 0 0 10px #00aaff;
  cursor: pointer;
  z-index: 9999;
}

#boton-carrito:hover {
  background-color: #333;
}
#contadorCarrito {
  background-color: red;
  color: white;
  font-size: 0.8rem;
  padding: 2px 6px;
  border-radius: 50%;
  position: absolute;
  top: -8px;
  right: -8px;
}
.logo {
  font-size: 1.8rem;
  color: white;
}
.boton-cerrar {
  background: transparent;
  color: var(--color-texto);
  border: none;
  font-size: 1.2rem;
  float: right;
  cursor: pointer;
}

.alerta {
  position: fixed;
  top: 10px;
  right: 10px;
  background-color: var(--color-acento);
  padding: 0.75rem 1.25rem;
  color: white;
  border-radius: 5px;
  z-index: 9999;
  box-shadow: 0 0 10px rgba(0,0,0,0.4);
  animation: desaparecer 4s forwards;
}

@keyframes desaparecer {
  0% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 0; display: none; }
}

.btn-login, .btn-logout {
  background: var(--color-acento);
  color: var(--color-blanco);
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 5px;
  margin-left: 1rem;
}

.btn-login:hover, .btn-logout:hover {
  background-color: #2563eb;
}
.mensaje {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  z-index: 9999;
}

.mensaje.info {
  background-color: #1e90ff;
  color: #fff;
}
.redes a i {
  transition: transform 0.3s, box-shadow 0.3s;
}

.redes a:hover i {
  transform: scale(1.2);
  box-shadow: 0 0 10px #00bfff;
}
#banner {
  width: 100vw;
  max-width: 100%;
  overflow: hidden;
}

#banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
/* Estilo base del navbar */
.navbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 30px;
  background-color: #000;
  color: white;
  font-family: 'Orbitron', sans-serif;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}
/* COLUMNAS DEL NAV */
.navbar-left {
  flex: 1;
}
.navbar-center {
  flex: 2;
  display: flex;
  justify-content: center;
}

.navbar-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}
.menu {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.menu li {
  position: relative;
}

.menu a {
  color: #00bfff;
  text-decoration: none;
  padding: 8px 12px;
  transition: background-color 0.3s, color 0.3s;
}

.menu a:hover {
  background-color: #00bfff;
  color: #000;
  border-radius: 5px;
}

/* Estilo del submenú desplegable */
.submenu {
  display: none;
  position: absolute;
  background-color: #222;
  padding: 0.5rem;
  list-style: none;
  margin-top: 0.5rem;
}

.submenu li {
  width: 100%;
}

.submenu a {
  display: block;
  padding: 10px;
  color: #00bfff;
  background-color: #111;
}

.submenu a:hover {
  background-color: #00bfff;
  color: #000;
}

/* Mostrar el submenú al pasar el mouse */
.dropdown .submenu {
  display: none;
  position: absolute;
  background-color: #111;
  padding: 10px;
  list-style: none;
}
.dropdown:hover .submenu {
  display: block;
}
.auth-links {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.auth-links a, .auth-links button {
  color: white;
  text-decoration: none;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.auth-links a:hover, .auth-links button:hover {
  color: #00aaff;
}
.oculto {
  display: none !important;
}

#modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

#contenido-modal {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
}
#modal.activo {
  display: block;
}
/* Diseño responsivo para pantallas pequeñas */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-header h1 {
    font-size: 1.5rem;
  }

  .admin-main {
    padding: 0.5rem;
  }

  .admin-agregar,
  .admin-productos {
    padding: 1rem 0.8rem;
    margin-bottom: 1rem;
  }

  .admin-agregar input,
  .form-edicion input {
    font-size: 1rem;
  }

  .admin-agregar button,
  .form-edicion button,
  .admin-producto button,
  #cerrarSesionAdmin {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .admin-producto {
    padding: 0.8rem;
  }

  .admin-producto img {
    width: 100%;
    max-width: 250px;
    height: auto;
  }

  .form-edicion {
    padding-top: 0.5rem;
  }
}
#popup-carrito {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background-color: white;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  border-radius: 10px;
  transition: all 0.3s ease;
}
.fondo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* Oscuro y semi-transparente */
  z-index: 999; /* Debajo del popup pero encima de todo lo demás */
}

