body {
  font-family: Arial, sans-serif;
  padding: 20px;
  background: #f7f7f7;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.2em;
}

h2 {
  font-size: 1em;
}

.grid, .filters-container, .filters-reset, .selected-tags-badges-container{
  display: flex;
  gap: 10px;
  max-width: 1000px;
  margin: auto;
}

.cell img {
  width: 200px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.cell img:hover {
  transform: scale(1.05);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  position: relative;
  max-width: 800px;
}

.close {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-content img {
  max-width: 100%;
  max-height: 600px;
}

.cell {
    max-height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
}

/* ... (estilos anteriores) ... */

.selected-tags-badges-container {
    margin-top: 5px;
    margin-bottom: 20px;
    text-align: center;
    padding: 10px 0;
    background-color: #f8f8f8;
}

.tag-badge {
  display: inline-flex; /* Para alinear el texto y la 'x' */
  align-items: center;
  background-color: #738da9; /* Color azul del badge */
  color: white;
  padding: 5px 10px;
  margin: 4px;
  border-radius: 5px; /* Bordes redondeados */
  font-size: 0.9em;
  white-space: nowrap; /* Evita que el texto se rompa */
}

.tag-badge .close-badge {
  background-color: rgba(255, 255, 255, 0.3); /* Un poco transparente */
  color: white;
  border: none;
  border-radius: 50%; /* Redondo */
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px; /* Espacio entre texto y 'x' */
  cursor: pointer;
  font-size: 0.8em;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.tag-badge .close-badge:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

/* Estilos para ocultar celdas filtradas (ya deberían estar, solo para referencia) */
.cell.hidden {
    display: none;
}

#resetFilterButton {
  background-color: #b34e57; /* Rojo para reset */
  color: white;
  border: none;
  padding: 8px 15px;
  margin-top: 5px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

@media screen and (max-width: 768px) {
  .modal-content {
    max-width: 99%;
  }
  .grid {
    flex-direction: column;
  } 
  .category-div-content {
    display: flex;
    align-items: center;
    justify-content: start;
    flex-wrap: wrap;
  }
  .cell img {
    width: 100px;
  }
  .cell {
    max-height: 70px;
    overflow: hidden;
    border-radius: 8px;
    display: block;
    margin-right: 5px;
  }
}
