/* Hero section */

.buscar-container {
  width: 100%;
  max-width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  height: 80px;
  background: transparent;
  z-index: 3;
  margin-top: 10rem;
}

.buscar-container .searchbar {
  position: absolute;
  z-index: 2;
  background: rgba(255,255,255,0.92);
  border-radius: 2rem;                
  border: 1.5px solid #bbb;
  box-shadow: 0 4px 18px 0 rgba(35, 38, 78, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 2rem; 
  min-width: 600px;            
  max-width: 90vw;
  margin: 0 auto;
  transition: box-shadow 0.3s;
  left: 50%;
  transform: translateX(-50%);
}

.buscar-container input[type="search"] {
  border: none;
  outline: none;
  background: transparent;
  font-size: 1.1rem;
  padding: 0.3rem 0.8rem;               
  width: 420px;
  color: #222;
  border-radius: 0.4rem;               
  transition: background 0.2s;
}

.buscar-container input[type="search"]::placeholder {
  color: #888;
  opacity: 1;
  font-size: var(--texto-sm);
  margin-left: 1rem;
}

/* Productos destacados seccion*/
.productos-container {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 2.5rem;
  margin-top: 3rem;
  box-sizing: border-box;
  flex-wrap: wrap;
}

.productos-title {
  text-align: left;
  margin-left: 0;
  margin-bottom: 3rem;
}
.productos-container-main {
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
#cardsGrid.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 1.2rem;
}

.products-toolbar {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-left: 20px;
}

/* ASIDE FILTROS CATEGORIAS*/
#aside-filtros {
  color: #0f172a;
  background: #ffffff;
  border-radius: 16px;
  padding: 1.4rem 1.2rem 1.2rem 1.2rem;
  box-shadow: 0 10px 26px rgba(0,0,0,0.06);
  min-width: 200px;
  max-width: 270px;
  flex: 0 0 240px;
  height: fit-content;
  position: sticky;
  top: 55px;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
}

#aside-filtros ul, #aside-filtros li {
  margin: 0;
  color: #000000;
  padding: 0;
  line-height: 1.5;
  list-style: none;
}

#aside-filtros ul ul {
  padding-left: 1.1em;  
  margin-left: 0.7em;   
}

#aside-filtros ul ul ul {
  padding-left: 1.2em; 
  margin-left: 1em;
}

#aside-filtros li {
  /* Para que la línea de cada fila siga bien */
  display: block;
}
#aside-filtros a, #aside-filtros label {
  color: #0f172a;
  text-decoration: none;
  border-bottom: none;
}
#aside-filtros h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  letter-spacing: 0.02em;
}

/* Toolbar y chips */
.cats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px 0;
}
.btn-clear {
  appearance: none;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
}
.btn-clear:hover { background: #eef2f7; }
.cats-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 10px 0;
}
.cat-chip {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #0f172a;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.80rem;
  cursor: pointer;
}
.cat-chip:hover { background: #eef2f7; }

/* Asegura visibilidad de botones en las cards */
.product-card .btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
  height: auto !important;
  padding: 8px 12px !important;
}