/* BS – Archivo de tienda + panel de filtros */
.bs-shop { padding-bottom: 96px; }
.bs-shop__crumbs { margin: 8px 0 24px; font-size: 13px; color: var(--text-muted); }
.bs-shop__crumbs a { color: inherit; text-decoration: none; }
.bs-shop__crumbs a:hover { color: var(--text-ink); }

.bs-shop__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 28px; border-bottom: 1px solid var(--hairline);
}
.bs-shop__title {
  margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 7.5vw, 52px);
  line-height: 1; letter-spacing: -1.3px; color: var(--text-ink);
}
.bs-shop__count { margin: 14px 0 0; font-size: 15px; color: var(--text-body); }
.bs-shop__count strong { font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-ink); }
.bs-shop__tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.bs-shop__filters-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border: 0; border-radius: 100px;
  background: var(--text-ink); color: var(--surface-canvas); font-family: var(--font-sans); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: opacity .15s ease;
}
.bs-shop__filters-btn:hover { opacity: .88; }
.bs-shop__filters-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.bs-shop__filters-badge {
  min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 100px;
  background: var(--color-primary); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center;
}
.bs-shop .woocommerce-ordering { margin: 0; }
.bs-shop .woocommerce-ordering select {
  height: 44px; padding: 0 40px 0 18px; border: 1px solid var(--hairline); border-radius: 100px;
  background: var(--surface-canvas) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230a0c12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 16px center / 14px no-repeat;
  -webkit-appearance: none; appearance: none; font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--text-ink); cursor: pointer;
}
.bs-shop .term-description, .bs-shop .page-description { margin-top: 24px; color: var(--text-body); }
.bs-shop__grid { padding-top: 40px; }
.bs-shop .woocommerce-pagination { margin-top: 56px; }

/* Panel lateral */
body.bs-filters-open { overflow: hidden; }
/* Botones flotantes (WhatsApp, carrito lateral) fuera de la vista mientras el panel está abierto */
body.bs-filters-open .ht-ctc,
body.bs-filters-open .xoo-wsc-basket { visibility: hidden; }
/* Debajo de la barra de administración de WordPress (solo usuarios con sesión de admin) */
body.admin-bar .bs-filters { top: 32px; }
@media (max-width: 782px) { body.admin-bar .bs-filters { top: 46px; } }
.bs-filters__overlay {
  position: fixed; inset: 0; z-index: 1100; background: rgba(10, 12, 18, .4);
  opacity: 0; transition: opacity .25s ease;
}
.bs-filters {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1101; width: 380px; max-width: 90vw;
  display: flex; flex-direction: column; background: var(--surface-canvas);
  box-shadow: -12px 0 32px rgba(10, 12, 18, .12);
  transform: translateX(100%); transition: transform .3s ease;
}
.bs-filters[hidden], .bs-filters__overlay[hidden] { display: none; }
body.bs-filters-open .bs-filters { transform: none; }
body.bs-filters-open .bs-filters__overlay { opacity: 1; }
.bs-filters__head {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  height: 72px; padding: 0 28px; border-bottom: 1px solid var(--hairline);
}
.bs-filters__title { font-size: 18px; font-weight: 600; color: var(--text-ink); }
.bs-filters__close {
  width: 40px; height: 40px; border: 0; border-radius: 100px; padding: 0;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--text-ink); background: var(--surface-strong);
}
.bs-filters__body { flex: 1 1 auto; min-width: 0; overflow-y: auto; overflow-x: hidden; padding: 28px; box-sizing: border-box; overscroll-behavior: contain; }
.bs-filters__group { padding-bottom: 28px; border-bottom: 1px solid var(--hairline-soft); }
.bs-filters__group + .bs-filters__group { margin-top: 28px; }
.bs-filters__group:last-child { border-bottom: 0; padding-bottom: 0; }
.bs-filters__label { margin-bottom: 16px; font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); }
.bs-filters__list { display: flex; flex-direction: column; gap: 4px; }
.bs-filters__item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 14px; border-radius: 100px;
  font-size: 14px; color: var(--text-body); text-decoration: none; transition: background .15s ease, color .15s ease;
}
.bs-filters__item:hover { color: var(--text-ink); background: var(--surface-soft); }
.bs-filters__item.is-active { background: var(--surface-strong); color: var(--text-ink); font-weight: 600; }
.bs-filters__count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text-muted); font-weight: 400; }
.bs-filters__pills { display: flex; gap: 10px; flex-wrap: wrap; }
.bs-filters__pill {
  padding: 8px 14px; border-radius: 100px; border: 1px solid var(--hairline); font-size: 13px; color: var(--text-body);
  text-decoration: none; transition: border-color .15s ease;
}
.bs-filters__pill:hover { border-color: var(--text-ink); color: var(--text-ink); }
.bs-filters__pill.is-active { background: var(--text-ink); border-color: var(--text-ink); color: var(--surface-canvas); }
/* Filtros por atributo de variación: el color lleva un punto con su tono */
.bs-filters__pill--swatch { display: inline-flex; align-items: center; gap: 8px; }
.bs-filters__dot { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(10, 12, 18, .2); }
.bs-filters__check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-body); text-decoration: none; }
.bs-filters__check:hover { color: var(--text-ink); }
.bs-filters__box { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--hairline); box-sizing: border-box; position: relative; }
.bs-filters__check.is-active { color: var(--text-ink); font-weight: 600; }
.bs-filters__check.is-active .bs-filters__box { background: var(--text-ink); border-color: var(--text-ink); }
.bs-filters__check.is-active .bs-filters__box::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.bs-filters__foot { flex: 0 0 auto; display: flex; gap: 12px; padding: 20px 28px; border-top: 1px solid var(--hairline); }
.bs-filters__clear {
  flex: 0 0 auto; display: flex; align-items: center; height: 52px; padding: 0 20px; border-radius: 100px;
  border: 1px solid var(--hairline); font-size: 14px; font-weight: 600; color: var(--text-ink); text-decoration: none;
}
.bs-filters__clear:hover { border-color: var(--text-ink); }
.bs-filters__clear.is-disabled { color: var(--text-muted); pointer-events: none; }
.bs-filters__apply {
  flex: 1 1 auto; display: flex; align-items: center; justify-content: center; height: 52px; border: 0; border-radius: 100px;
  background: var(--color-primary); color: #fff; font-family: var(--font-sans); font-size: 14px; font-weight: 600; cursor: pointer;
}
.bs-filters__apply:hover { opacity: .9; }
.bs-filters a:focus-visible, .bs-filters button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }

@media (max-width: 600px) {
  .bs-shop__head { align-items: flex-start; flex-direction: column; gap: 20px; }
  .bs-shop__tools { width: 100%; }
  .bs-shop .woocommerce-ordering { flex: 1 1 auto; }
  .bs-shop .woocommerce-ordering select { width: 100%; }
  .bs-shop__grid { padding-top: 28px; }
  .bs-filters__head, .bs-filters__body, .bs-filters__foot { padding-left: 20px; padding-right: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .bs-filters, .bs-filters__overlay { transition: none; }
}