/* ===========================================================
   VARIABLES GLOBALES
   =========================================================== */
:root {
  --nav-h: 80px; /* altura de la navbar (ajusta según tu diseño real) */
}

/* ===========================================================
   ESTILOS GLOBALES DEL BODY
   =========================================================== */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;  /* Sin margen para que la navbar quede pegada */
  padding: 0; /* Sin padding */
}

/* ===========================================================
   NAVBAR FIJA ARRIBA
   =========================================================== */
.navbar {
  position: fixed;            /* fija arriba */
  top: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 40px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1100; /* por encima del resto */
}

/* ===========================================================
   CONTENEDOR DE PRODUCTOS (CON MARGEN TOP PARA NAVBAR)
   =========================================================== */
.productos-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  margin-top: calc(var(--nav-h) + 20px); /* separa contenido para no tapar navbar fija */
}

/* ===========================================================
   TARJETA DE PRODUCTO
   =========================================================== */
.producto-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  width: 250px;
  padding: 15px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden; 
  transition: transform .25s ease, box-shadow .25s ease;
}
.producto-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,.15);
}

.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #14532D;
  color: white;
  padding: 5px 10px;
  border-radius: 3px;
  font-weight: bold;
  z-index: 1;
}

.producto-card h3 {
  margin: 10px 0 5px 0;
  font-size: 18px;
  color: #333;
}
.producto-card p {
  margin: 3px 0;
  font-size: 14px;
  color: #555;
}

.producto-card button {
  margin-top: 10px;
  background-color: #6B8E7D;
  color: white;
  border: none;
  padding: 10px;
  width: 200px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: bold;
}
.producto-card button:hover {
  background-color: #0b9838;
}

/* ===========================================================
   ÁREA DE IMAGEN CONSISTENTE EN TODAS LAS CARDS
   =========================================================== */
.producto-card > img,
.producto-card .frasco-rotativo {
  display: block;
  width: 100%;
  height: 220px;
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
}
.producto-card > img,
.producto-card .frasco-rotativo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .35s ease, filter .35s ease;
  display: block;
}
.producto-card:hover > img,
.producto-card:hover .frasco-rotativo img {
  transform: scale(1.18);
  filter: saturate(1.05) contrast(1.05);
  cursor: zoom-in;
}

/* ===========================================================
   BOTÓN PARA ABRIR EL SIDEBAR DE FILTROS
   =========================================================== */
.abrir-filtro {
  position: fixed;
  top: calc(var(--nav-h) + 10px);  /* justo debajo de la navbar */
  left: 10px;
  background-color: #129546;
  color: white;
  padding: 10px 15px;
  border: none;
  cursor: pointer;
  border-radius: 20px;
  z-index: 1200;
}

/* ===========================================================
   SIDEBAR DE FILTROS
   =========================================================== */
.sidebar {
  position: fixed;
  top: var(--nav-h);                /* debajo de la navbar */
  left: -300px;                     /* escondida inicialmente */
  width: 280px;
  height: calc(100vh - var(--nav-h)); /* ocupa toda la altura visible restante */
  background-color: white;
  box-shadow: 2px 0 5px rgba(0,0,0,0.1);
  padding: 20px;
  transition: left 0.3s ease;
  z-index: 1050;
  overflow-y: auto;
}
.sidebar.abierto {
  left: 0;
}

/* ===========================================================
   FILTROS INTERNOS (TÍTULOS, OPCIONES)
   =========================================================== */
.sidebar h2 {
  font-size: 22px;
  color:rgb(0, 196, 49);
  margin-bottom: 20px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 5px;
}

.filtro {
  margin-bottom: 10px;
}

.filtro-titulo {
  background: none;
  border: none;
  font-size: 16px;
  color:rgb(54, 138, 63);
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.filtro-opciones {
  display: none; /* se despliega con JS */
  padding-left: 10px;
  margin-top: -5px;
  padding-bottom: 10px;
}

.filtro-opciones label {
  display: block;
  margin: 4px 0;
  font-size: 14px;
  color: #333;
}

.flecha {
  color:rgb(0, 0, 0);
  font-size: 12px;
}

/* ===========================================================
   BOTÓN "LIMPIAR" DENTRO DE FILTROS
   =========================================================== */
#limpiar-filtros {
  margin-top: 20px;
  background-color:rgba(164, 243, 181, 0.74);
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px;
  width: 100%;
  border-radius: 6px;
  cursor: pointer;
  text-transform: uppercase;
}
#limpiar-filtros:hover {
  background-color:rgb(0, 196, 65);
}
