/*  PALETA DE COLORES  */
:root {
  /* FONDOS */
  --fondo-principal: #fffaf5;
  --fondo-secundario: #f9f9f9;
  --fondo-dorado-suave: #FFF9C4;

  /* TEXTOS */
  --texto-principal: #333333;
  --texto-blanco: #FFFFFF;

  /* VERDES */
  --verde-principal: #4CAF50;
  --verde-secundario: #8BC34A;
  --verde-oscuro: #388E3C;

  /* CEREZA */
  --cereza: #D81B60;
  --cereza-oscuro: #C2185B;
  --sombra-cereza: rgba(216, 27, 96, 0.4);
  --sombra-cereza-intensa: rgba(216, 27, 96, 0.7);

  /* DORADO */
  --dorado: #FFD700;
  --sombra-dorado: rgba(255, 215, 0, 0.4);
  --sombra-dorado-intensa: rgba(255, 215, 0, 0.7);

  /* EFECTOS */
  --sombra-suave: 0 4px 12px rgba(0, 0, 0, 0.1);
  --borde-redondeado: 16px;
  --transicion: all 0.3s ease;
}

/*  ESTILOS GLOBALES  */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Fredoka', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}

/*  HEADER Y NAV  */
.encabezado-principal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: white;
  box-shadow: var(--sombra-suave);
  flex-wrap: wrap;
}

.logo-empresa {
  height: 50px;
  border-radius: 8px;
}

.nombre-empresa {
  font-size: 1.8rem;
  color: var(--verde-principal);
  margin-left: 1rem;
}

.nav-principal {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.nav-enlace {
  text-decoration: none;
  color: #555;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: var(--transicion);
}

.nav-enlace:hover,
.nav-enlace.activo {
  background: var(--verde-principal);
  color: white;
}

/*  BANNER  */
/* BANNER PRINCIPAL */
.banner-principal {
  background-image: url('assets/img/barnner_11.png');
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.banner-contenido {
  text-align: center;
}

/* TITULO DEL BANNER: TITILAR + DESTELLO DORADO */
.banner-titulo {
  font-size: 28px;
  font-weight: bold;
  color: var(--texto-principal);
  overflow: hidden;
  animation: titilar-titulo 2.5s ease-in-out 1, destello-titulo 4s ease-in-out 2.6s infinite;
}

@keyframes titilar-titulo {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* DESTELLO AMARILLO SOLO PARA EL TÍTULO */
.banner-titulo::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(120deg, transparent 0%, var(--dorado) 50%, transparent 100%);
  opacity: 0.8;
  transform: skewX(-20deg);
  pointer-events: none;
  animation: destello-movimiento 4s ease-in-out 2.6s infinite;
}

@keyframes destello-movimiento {
  0% {
    left: -120%;
  }

  60% {
    left: 140%;
  }

  100% {
    left: 140%;
  }
}

/* EFECTO DEL BOTÓN: TITILADO Y DESTELLO */
.btn-glow {
  background-color: var(--verde-principal);
  color: var(--texto-blanco);
  padding: 12px 24px;
  border: none;
  border-radius: var(--borde-redondeado);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--sombra-suave);
  text-decoration: none;
  animation: btn-titilar 1s infinite, btn-destello 1s 5s forwards;
  margin-top: 20px;
  /* Esto agrega un espacio para mover el botón hacia abajo */
}

@keyframes btn-titilar {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes btn-destello {
  0% {
    box-shadow: var(--sombra-suave);
    background-color: var(--verde-principal);
  }

  100% {
    box-shadow: 0 0 20px var(--dorado), 0 0 35px var(--dorado);
    background-color: var(--dorado);
  }
}

/* EFECTO PARA "BOLSA DE BIENVENIDA" */
.oferta-bienvenida h2 {
  font-size: 24px;
  color: var(--cereza);
  font-weight: bold;
  position: relative;
  animation: rebote-titulo 1s ease-in-out infinite, destello-cereza 3s ease-in-out infinite;
}

@keyframes rebote-titulo {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(-10px);
  }

  60% {
    transform: translateY(-5px);
  }
}

@keyframes destello-cereza {
  0% {
    text-shadow: 0 0 5px var(--cereza), 0 0 10px var(--cereza);
  }

  50% {
    text-shadow: 0 0 15px var(--cereza), 0 0 25px var(--cereza);
  }

  100% {
    text-shadow: 0 0 5px var(--cereza), 0 0 10px var(--cereza);
  }
}

.contenedor-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.tarjeta-producto {
  background: white;
  border-radius: var(--borde-redondeado);
  overflow: hidden;
  box-shadow: var(--sombra-suave);
  transition: var(--transicion);
}

.tarjeta-producto:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.img-producto {
  width: 100%;
  height: 220px;
  /* Más alto para ver mejor la oferta */
  object-fit: cover;
  display: block;
}

.contenido-producto {
  padding: 1rem;
}

.titulo-producto {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--verde-principal);
}

.descripcion-producto {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  min-height: 2.5rem;
}

.precio-producto {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--cereza);
  margin: 0.5rem 0;
}

.etiqueta-cantidad {
  display: block;
  margin: 0.8rem 0;
  font-weight: 600;
}

.input-cantidad {
  width: 60px;
  padding: 0.3rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-left: 0.5rem;
}

/*  OFERTAS ESPECIALES  */
.oferta-bienvenida {
  text-align: center;
  background: #fff8e1;
  padding: 1.5rem;
  border-radius: var(--borde-redondeado);
  margin-bottom: 2rem;
  box-shadow: var(--sombra-suave);
}

.oferta-envio {
  text-align: center;
  padding: 2rem;
  background: #f8f9fa;
  margin: 2rem auto;
  max-width: 800px;
  border-radius: var(--borde-redondeado);
}

/*  CESTA  */
.lista-cesta {
  list-style: none;
  margin-bottom: 1rem;
}

.item-cesta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #eee;
}

.img-cesta {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
}

.texto-item-cesta {
  flex: 1;
}

.btn-eliminar {
  background: #dc3545;
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.total-cesta {
  font-size: 1.2rem;
  font-weight: bold;
  margin: 1rem 0;
}

.texto-cesta-vacia {
  text-align: center;
  color: #888;
  font-style: italic;
}

/*  STOCK  */
.stock-alerta {
  color: var(--cereza);
  font-weight: bold;
}

.stock-medio {
  color: #e67e22;
  font-weight: 600;
}

.stock-alto {
  color: var(--verde-principal);
}

.stock-agotado {
  color: #6c757d;
  font-style: italic;
}

/*  PÁGINAS DE AUTENTICACIÓN (FONDOS)  */
.pagina-inicio-sesion,
.pagina-registro,
.pagina-recuperar {
  background: url('../img/fondo-login.jpg') center/cover fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
  position: relative;
}

.pagina-inicio-sesion::before,
.pagina-registro::before,
.pagina-recuperar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.contenedor-formulario {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.93);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 440px;
  width: 100%;
}

.contenedor-formulario h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--cereza);
}

/*  BOTONES Y ALERTAS  */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
}

.alert-danger {
  background: #f8d7da;
  color: #721c24;
}

.alert-success {
  background: #d4edda;
  color: #155724;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
}

.form-control {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin: 0.4rem 0;
}

.btn {
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-primary {
  background: var(--verde-principal);
  color: white;
}

.btn-primary:hover {
  background: var(--verde-oscuro);
}

.btn-cereza {
  background: var(--cereza);
  color: white;
}

.btn-cereza:hover {
  background: var(--cereza-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--sombra-cereza);
}

.btn-bienvenida {
  background: var(--dorado);
  color: var(--negro);
  font-weight: bold;
  border-radius: 20px;
  box-shadow: 0 0 15px var(--sombra-dorado);
}

/*  PÁGINA PRINCIPAL  */
.btn-glow {
  background: linear-gradient(90deg, var(--verde-principal), var(--verde-oscuro));
  color: white;
  font-weight: bold;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
  transition: all 0.4s ease;
  text-decoration: none;
  display: inline-block;
  margin-top: 1rem;
}

.btn-glow:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(76, 175, 80, 0.7);
}

/*  ZONA DE USUARIO  */
.pf-usuario-pagina {
  background-color: var(--fondo-principal);
}

.pf-usuario-menu {
  background: white;
  padding: 1rem 2rem;
  box-shadow: var(--sombra-suave);
}

.pf-usuario-logo {
  font-size: 1.6rem;
  color: var(--verde-principal);
}

.pf-usuario-menu ul {
  display: flex;
  list-style: none;
  gap: 1.2rem;
}

.pf-usuario-menu a {
  text-decoration: none;
  color: var(--texto-principal);
  font-weight: 600;
}

.pf-usuario-menu a:hover {
  color: var(--cereza);
}

.pf-usuario-contenido {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.pf-btn-entrega {
  background: var(--verde-principal);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--borde-redondeado);
  font-weight: bold;
  cursor: pointer;
}

.pf-btn-entrega:hover {
  background: var(--verde-oscuro);
}

.pf-alerta-entrega {
  border-left: 4px solid var(--verde-principal);
}

/*  PANEL ADMIN  */
.pagina-admin,
.pagina-moderador {
  background: var(--fondo-principal);
  padding: 2rem;
}

.container-admin,
.container-moderador {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: var(--borde-redondeado);
  box-shadow: var(--sombra-suave);
}

.container-admin h2,
.container-moderador h2 {
  color: var(--cereza);
  text-align: center;
  margin-bottom: 2rem;
}

.btn-admin {
  display: block;
  width: 100%;
  padding: 1rem;
  margin: 0.6rem 0;
  border-radius: var(--borde-redondeado);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: var(--transicion);
  box-shadow: var(--sombra-suave);
}

.btn-admin.verde {
  background: var(--verde-principal);
  color: white;
}

.btn-admin.cereza {
  background: var(--cereza);
  color: white;
}

.btn-admin.dorado {
  background: var(--dorado);
  color: var(--negro);
  font-weight: bold;
}

.btn-admin.gris {
  background: #6c757d;
  color: white;
}

.btn-admin.peligro {
  background: #dc3545;
  color: white;
}

.btn-admin.verde:hover {
  background: var(--verde-oscuro);
}

.btn-admin.cereza:hover {
  background: var(--cereza-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--sombra-cereza);
}

.btn-admin.dorado:hover {
  box-shadow: 0 0 25px var(--sombra-dorado);
  transform: scale(1.03);
}

/*  CARRITO  */
.zona-resumen-carrito {
  flex: 3;
}

.zona-cesta-carrito {
  flex: 1;
}

.tarjeta-producto-carrito {
  display: flex;
  align-items: center;
  background: white;
  padding: 1rem;
  border-radius: var(--borde-redondeado);
  box-shadow: var(--sombra-suave);
  margin-bottom: 1rem;
}

.img-producto-carrito {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 1rem;
}

.info-producto-carrito h3 {
  margin-bottom: 0.3rem;
  color: var(--verde-principal);
}

.precio-producto-carrito {
  font-weight: bold;
  color: var(--cereza);
}

.btn-eliminar-carrito {
  background: #f44336;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.resumen-cesta {
  background: white;
  padding: 1.5rem;
  border-radius: var(--borde-redondeado);
  box-shadow: var(--sombra-suave);
}

.detalle-resumen {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  font-weight: bold;
  margin: 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid #eee;
}

/*  FOOTER  */
.pie-pagina {
  text-align: center;
  padding: 2rem;
  background: white;
  margin-top: 3rem;
  border-top: 1px solid #eee;
}

.pie-pagina img {
  height: 80px;
  margin-top: 1rem;
}

/*  RESPONSIVE  */
@media (max-width: 900px) {
  .contenedor-principal {
    flex-direction: column;
  }

  .zona-cesta,
  .zona-cesta-carrito {
    position: static;
    margin-top: 2rem;
  }
}

/*  PANEL DE MODERADOR/ADMIN  */
.pagina-moderador,
.pagina-admin {
  background: var(--fondo-principal);
  padding: 2rem;
  min-height: 100vh;
}

.container-moderador,
.container-admin {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: var(--borde-redondeado);
  box-shadow: var(--sombra-suave);
  overflow: hidden;
}

.encabezado-panel {
  background: linear-gradient(to right, var(--cereza), var(--cereza-oscuro));
  color: white;
  padding: 1.5rem 2rem;
  text-align: center;
}

.encabezado-panel h2 {
  margin: 0;
  font-size: 1.8rem;
}

.encabezado-panel p {
  margin: 0.5rem 0 0;
  opacity: 0.9;
}

.resumen-actividad {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 2rem;
  background: var(--fondo-secundario);
  border-bottom: 1px solid #eee;
}

.tarjeta-resumen {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: var(--borde-redondeado);
  box-shadow: var(--sombra-suave);
}

.tarjeta-resumen h3 {
  color: var(--cereza);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.numero-grande {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--verde-principal);
  margin: 0;
}

.acciones-panel {
  padding: 2rem;
}

.btn-admin {
  display: block;
  width: 100%;
  padding: 1.2rem;
  margin: 0.8rem 0;
  border-radius: var(--borde-redondeado);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: var(--transicion);
  box-shadow: var(--sombra-suave);
  position: relative;
  overflow: hidden;
}

.btn-admin .subtitulo-btn {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  margin-top: 0.3rem;
  opacity: 0.9;
}

.btn-admin.verde {
  background: var(--verde-principal);
  color: white;
}

.btn-admin.cereza {
  background: var(--cereza);
  color: white;
}

.btn-admin.dorado {
  background: var(--dorado);
  color: var(--negro);
}

.btn-admin.peligro {
  background: #dc3545;
  color: white;
}

.btn-admin:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.footer-panel {
  text-align: center;
  padding: 1.5rem;
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid #eee;
}