/* ===== Carnes Oliva — Filtros a medida ===== */

.carnes-header {
  position: relative;
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: #3b2222;
  display: flex;
}
.carnes-header-overlay {
  background: rgba(35, 18, 18, 0.45);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carnes-header h1 {
  color: var(--light);
  font-size: 48px;
  text-transform: uppercase;
  margin: 0;
  text-align: center;
}

.carnes-filtro-grupo h2 {
  color: var(--accent) !important;
  font-size: 22px;
  margin: 0 0 14px;
}

.carnes-filtro-activo #sidebar .inner {
  background-color: #e0e0d1;
  padding: 1em;
}
.carnes-filtro-grupo ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
}
.carnes-filtro-grupo li {
  list-style: none;
  margin: 0;
}
.carnes-filtro-grupo label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.carnes-filtro-grupo input[type='checkbox'],
.carnes-filtro-grupo input[type='radio'] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.carnes-pill-label {
  display: inline-block;
  background: #f1f1e4b5;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--purple);
  transition: all 0.18s;
  user-select: none;
  line-height: 1.1;
}
.carnes-filtro-grupo label:hover .carnes-pill-label {
  border-color: var(--pink-light);
  background: var(--pink-light);
}
.carnes-filtro-grupo input[type='checkbox']:checked + .carnes-pill-label,
.carnes-filtro-grupo input[type='radio']:checked + .carnes-pill-label {
  background: var(--accent);
  color: #fff;
}
.carnes-filtro-grupo input[type='checkbox']:focus-visible + .carnes-pill-label,
.carnes-filtro-grupo input[type='radio']:focus-visible + .carnes-pill-label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carnes-loading,
.carnes-sin-resultados,
.carnes-cargando {
  text-align: center;
  padding: 30px 0;
  color: #777;
  width: 100%;
  list-style: none;
}

.carnes-loading,
.carnes-cargando {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.carnes-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #e0e0d1;
  border-top-color: #8a2d2d;
  border-radius: 50%;
  animation: carnes-girar 0.7s linear infinite;
}

@keyframes carnes-girar {
  to {
    transform: rotate(360deg);
  }
}

.carnes-filtros-cerrar {
  display: none;
}
.carnes-filtros-aplicar {
  display: none;
}

/* Selección única: la opción marcada no reacciona al hover (no se puede "desmarcar") */
.carnes-filtro-grupo input[type='radio']:checked + .carnes-pill-label {
  cursor: default;
}

/* Categorías sin productos para la marca elegida */
.carnes-filtro-grupo li.carnes-sin-stock label {
  cursor: not-allowed;
}
.carnes-filtro-grupo li.carnes-sin-stock .carnes-pill-label {
  opacity: 0.4;
  /* text-decoration: line-through; */
}
.carnes-filtro-grupo li.carnes-sin-stock label:hover .carnes-pill-label {
  background: #f1f1e4b5;
}

/* Botón "Ver más" */
.carnes-ver-mas-wrap {
  display: flex;
  justify-content: center;
  margin: 30px 0 50px;
}
.carnes-ver-mas {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: var(--accent, #8a2d2d);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: opacity 0.18s;
}
.carnes-ver-mas:hover {
  opacity: 0.85;
}
.carnes-ver-mas[disabled] {
  cursor: wait;
  opacity: 0.7;
}
.carnes-ver-mas .carnes-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
}
.carnes-ver-mas-num {
  opacity: 0.75;
  font-weight: 400;
}

.carnes-paginacion {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 40px 0;
}
.carnes-pagina-link {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #ddd;
  color: #333;
  text-decoration: none;
}
.carnes-pagina-link.carnes-pagina-actual {
  background: #8a2d2d;
  border-color: #8a2d2d;
  color: #fff;
}

@media only screen and (max-width: 999px) {
  #sidebar.carnes-abierto {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    z-index: 20000;
    background-color: #f1f1e4;
    padding: 100px 20px 60px;
    box-sizing: border-box;
  }

  .carnes-filtros-cerrar {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 28px;
    line-height: 1;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
  }

  .carnes-filtros-aplicar {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    background: #8a2d2d;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
  }

  body.carnes-filtro-abierto {
    overflow: hidden;
  }
}

@media (max-width: 560px) {
  .carnes-header h1 {
    font-size: 30px;
  }
  .carnes-header {
    min-height: 220px;
  }
}
