:root {
  --color-primario: #f15a24; /* Color naranja de acento */
  --color-oscuro: #1a1a1a;
}

/* 1. ELIMINAMOS EL PADDING DEL BODY PARA QUE EL BANNER TOQUE EL TECHO */
body {
  background-color: #f8fafc;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
}

/* --- BARRA DE NAVEGACIÓN FLOTANTE (ESTILO PÍLDORA) --- */
.navbar-flotante {
  position: absolute; /* Flota sobre la imagen en la cabecera */
  top: 20px; /* Separación del techo */
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1200px;
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  z-index: 1050;
  padding: 10px 24px !important;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  color: var(--color-oscuro);
}
.navbar-brand span {
  color: var(--color-primario);
}
.nav-icon-btn {
  font-size: 1.3rem;
  color: var(--color-oscuro);
  position: relative;
  transition: color 0.2s;
}
.nav-icon-btn:hover {
  color: var(--color-primario);
}

/* --- BANNER PRINCIPAL (HERO ESTÁTICO) --- */
.hero-banner {
  position: relative;
  width: 100%;
  height: 75vh; /* Ocupa el 75% de la pantalla */
  min-height: 500px;
  margin-top: 0 !important; /* Obliga a pegar arriba */
  margin-bottom: 3rem;
  overflow: hidden;
}

.carousel-bg-img {
  width: 100%;
  height: 100%;
  background-size: cover; /* Cambiar a 'contain' si no quieres que se recorte nada en ningún monitor */
  background-position: center; /* Mantiene el centro de la foto siempre visible */
  background-repeat: no-repeat;
  /* Se eliminaron 'transform' y 'transition' para quitar el efecto de zoom */
}

/* NUEVO: Ocultamos por defecto la imagen de celular en pantallas de escritorio */
.banner-movil {
  display: none;
}

/* NUEVO: Indicamos con la manita del cursor que el banner se puede presionar */
.banner-link {
  cursor: pointer;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* <-- Aquí quitamos el fondo oscuro */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #ffffff; /* Color del texto */
  text-align: center;
  z-index: 2;
  padding-top: 80px;

  /* NUEVO: Permite que los clics atraviesen el contenedor transparente hacia el banner */
  pointer-events: none;
}

/* NUEVO: Devolvemos la capacidad de hacer clic AL BOTÓN de administrador dentro del overlay */
.hero-overlay .admin-banner-control {
  pointer-events: auto;
}

.hero-overlay h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: 1rem;
}

/* --- TARJETAS DE PRODUCTOS --- */
.product-card {
  background: #ffffff !important; /* BLANCO PURO ABSOLUTO */
  border: none;
  border-radius: 12px;
  /* Sombra súper suave para que "flote" sobre el fondo gris claro de la tienda */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.img-container {
  height: 220px;
  background-color: #ffffff !important; /* FONDO BLANCO DETRÁS DE LA FOTO */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.btn-fav-card {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  color: #666;
  transition:
    color 0.2s,
    background 0.2s;
}
.btn-fav-card:hover {
  color: #dc3545;
  background: #ffffff;
}
.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.product-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-oscuro);
  margin-bottom: 0.5rem;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primario);
  margin-top: auto;
  margin-bottom: 1rem;
}
.btn-add-cart {
  background-color: var(--color-oscuro);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-add-cart:hover {
  background-color: var(--color-primario);
  color: #ffffff;
}

/* --- FOOTER SENCILLO --- */
footer {
  background-color: var(--color-oscuro);
  color: #aaaaaa;
  padding: 3rem 0 1.5rem 0;
  margin-top: 5rem;
}
footer h5 {
  color: #ffffff;
  font-weight: 600;
}
footer a {
  color: #aaaaaa;
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover {
  color: #ffffff;
}

/* --- REGLAS EXCLUSIVAS PARA CELULARES Y TABLETS PEQUEÑAS --- */
@media (max-width: 768px) {
  /* NUEVO: Intercambiamos la visibilidad: apagamos el de escritorio y encendemos el de celular */
  .banner-escritorio {
    display: none !important;
  }
  .banner-movil {
    display: block !important;
  }

  /* 1. Le damos una altura ideal y equilibrada para la pantalla vertical del celular */
  .hero-banner {
    height: 55vh !important;
    min-height: 380px !important;
    margin-bottom: 2rem;
  }

  /* 2. 'cover' obliga a la foto a rellenar todo el cuadro sin dejar ni un píxel blanco */
  .carousel-bg-img {
    background-size: cover !important;
    background-position: center center !important; /* Mantiene el foco en el centro de tu imagen */
  }

  /* 3. La barra de navegación flota perfectamente sobre la imagen sin cortarse */
  .navbar-flotante {
    top: 15px;
    width: 92%;
    padding: 8px 16px !important;
  }

  /* 4. Ajustamos el espacio interior por si en el futuro agregas texto sobre el banner */
  .hero-overlay {
    padding-top: 70px;
  }
}
