/* ====== Sidebar de filtros ====== */

/* Estilo general */
.filtros-sidebar {
  background: #f7f8fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
}

/* Header */
.filtros-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Items */
.filtro-item {
  margin-bottom: 1rem;
}

.filtro-item strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.filtro-item input[type="text"],
.select-anio {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

/* Botón buscar */
.btn-filtros {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: #004080;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn-filtros:hover {
  background: #0056b3;
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
  .catalogo-layout {
    flex-direction: column;
  }

  /* Sidebar oculto por defecto */
  .filtros-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #1e1e2f;
    color: #fff;
    z-index: 2000;
    transition: left 0.3s ease;
    padding: 1rem;
    overflow-y: auto;
  }
  .filtros-sidebar.active {
    left: 0;
  }

  /* Botón toggle visible solo en mobile */
  .btn-toggle-filtros {
    display: block;
    margin: 10px;
    padding: 10px;
    background: #004080;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    border: none;
    cursor: pointer;
  }

  /* Overlay */
  .overlay-filtros {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1500;
  }
  .overlay-filtros.active {
    display: block;
  }

  /* Compactar filtros */
  .filtro-item {
    margin-bottom: 0.8rem;
  }
  .filtro-item label {
    display: inline-block;
    width: 48%;
    font-size: 0.9rem;
  }
  .select-anio {
    font-size: 0.9rem;
  }
}

/* ====== Desktop ====== */
@media (min-width: 769px) {
  .btn-toggle-filtros,
  .overlay-filtros {
    display: none !important; /* ocultar en desktop */
  }

  .filtros-sidebar {
    position: relative;
    left: 0;
    width: 250px;
    background: #1e211f; /* mismo color que mobile */
    color: #fff;         /* texto blanco como mobile */
    border-radius: 8px;
    padding: 1rem;
  }
}
