/*--------------------------------------------------------------
# Sidebar de filtros del catálogo (functions/catalogo-filtros.php)
# Colores como variables: cada proyecto puede redefinirlas en su CSS propio.
# Por defecto toman los de css/tienda.css del tema (--mp-*) si existen.
--------------------------------------------------------------*/
.tw-catalogo {
  --tw-cf-accent: var(--mp-red, #c20c19);
  --tw-cf-ink: var(--mp-black, #131313);
  --tw-cf-muted: var(--mp-grey, #6b6b6b);
  --tw-cf-line: var(--mp-line, #e6e6e6);
  --tw-cf-soft: var(--mp-soft, #f6f6f5);
  --tw-cf-white: #ffffff;
  --tw-cf-sticky-top: 160px;
}

.tw-catalogo__sidebar {
  margin-bottom: 28px;
}
@media (min-width: 992px) {
  .tw-catalogo__sidebar .tw-cf {
    position: sticky;
    top: var(--tw-cf-sticky-top);
  }
}

.tw-cf__panel {
  background: var(--tw-cf-soft);
  border-top: 3px solid var(--tw-cf-accent);
}
.tw-cf__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  color: var(--tw-cf-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}
.tw-cf__title::-webkit-details-marker { display: none; }
.tw-cf__title::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.tw-cf__panel[open] > .tw-cf__title::after {
  transform: rotate(-135deg);
}
@media (min-width: 992px) {
  .tw-cf__title { cursor: default; pointer-events: none; }
  .tw-cf__title::after { display: none; }
}
.tw-cf__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--tw-cf-accent);
  color: var(--tw-cf-white);
  font-size: 11px;
  letter-spacing: 0;
}

.tw-cf__form {
  padding: 0 20px 18px;
  transition: opacity 0.2s ease;
}
.tw-cf.is-loading .tw-cf__form {
  opacity: 0.5;
  pointer-events: none;
}

.tw-cf__group {
  margin: 0;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--tw-cf-line);
}
.tw-cf__group-title {
  float: none;
  width: auto;
  margin: 0 0 8px;
  padding: 0;
  color: var(--tw-cf-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}
.tw-cf__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tw-cf__item {
  position: relative;
  margin: 0;
}
.tw-cf__check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.tw-cf__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  color: var(--tw-cf-ink);
  font-size: 15px;
  line-height: 1.3;
  cursor: pointer;
  transition: color 0.15s ease;
}
/* Check propio */
.tw-cf__label::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border: 1.5px solid #b9b9b9;
  border-radius: 2px;
  background: var(--tw-cf-white) no-repeat center / 12px 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tw-cf__label:hover {
  color: var(--tw-cf-accent);
}
.tw-cf__label:hover::before {
  border-color: var(--tw-cf-accent);
}
.tw-cf__check:checked + .tw-cf__label::before {
  border-color: var(--tw-cf-accent);
  background-color: var(--tw-cf-accent);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m3.5 8.5 3 3 6-7'/%3e%3c/svg%3e");
}
.tw-cf__check:checked + .tw-cf__label {
  font-weight: 600;
}
.tw-cf__check:focus-visible + .tw-cf__label::before {
  outline: 2px solid var(--tw-cf-accent);
  outline-offset: 2px;
}
.tw-cf__name {
  flex: 1 1 auto;
}
.tw-cf__count {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--tw-cf-white);
  color: var(--tw-cf-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}
.tw-cf__item.is-empty .tw-cf__label {
  color: #a5a5a5;
  cursor: not-allowed;
}
.tw-cf__item.is-empty .tw-cf__label::before {
  background-color: #f0f0f0;
  border-color: #d6d6d6;
}

.tw-cf__submit,
.tw-cf__clear {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tw-cf__submit {
  padding: 10px 18px;
  border: 0;
  background: var(--tw-cf-accent);
  color: var(--tw-cf-white);
}
.tw-cf__clear {
  color: var(--tw-cf-accent);
  text-decoration: none;
}
.tw-cf__clear::before {
  content: "\00d7";
  margin-right: 6px;
  font-size: 15px;
}
.tw-cf__clear:hover {
  text-decoration: underline;
}
