/**
 * Antyca — Panel de filtros premium (UX instalador / ecommerce).
 */

/* ─── Atajos categorías (grid) ─── */

body.antyca-shop-archive .antyca-category-shortcuts {
  margin: 0 0 1rem;
}

body.antyca-shop-archive .antyca-category-shortcuts__track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.antyca-shop-archive .antyca-category-shortcuts__chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--antyca-gray-200, #e2e8f0);
  background: #fff;
  color: var(--antyca-gray-700, #334155);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

body.antyca-shop-archive .antyca-category-shortcuts__chip.is-active,
body.antyca-shop-archive .antyca-category-shortcuts__chip:hover {
  border-color: var(--antyca-primary, #2563eb);
  color: var(--antyca-primary, #2563eb);
  background: rgba(37, 99, 235, 0.06);
}

/* ─── Toolbar móvil ─── */

body.antyca-shop-archive .antyca-filters-toolbar {
  display: none;
  margin: 0 0 0.75rem;
}

body.antyca-shop-archive .antyca-filters-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--antyca-gray-200, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  color: var(--antyca-gray-900, #0f172a);
  cursor: pointer;
  box-shadow: 0 4px 16px -8px rgba(15, 23, 42, 0.12);
}

/* ─── Tarjeta contenedora ─── */

body.antyca-shop-archive .antyca-filters-card {
  background: #fff;
  border: 1px solid var(--antyca-gray-200, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 8px 28px -12px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

body.antyca-shop-archive .antyca-filters-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.65rem;
}

body.antyca-shop-archive .antyca-filters-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--antyca-gray-900, #0f172a);
}

body.antyca-shop-archive .antyca-filters-card__close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 1.25rem;
  cursor: pointer;
}

body.antyca-shop-archive .antyca-filters-card__body {
  padding: 0 0.35rem 0.5rem;
}

body.antyca-shop-archive .antyca-filters-card__footer {
  display: none;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--antyca-gray-200, #e2e8f0);
  background: #f8fafc;
}

body.antyca-shop-archive .antyca-filters-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  flex: 1;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

body.antyca-shop-archive .antyca-filters-btn--primary {
  background: var(--antyca-primary, #2563eb);
  color: #fff;
}

body.antyca-shop-archive .antyca-filters-btn--ghost {
  background: #fff;
  border-color: var(--antyca-gray-200, #e2e8f0);
  color: var(--antyca-gray-700, #334155);
}

/* ─── Panel de filtros ─── */

body.antyca-shop-archive .antyca-filters-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body.antyca-shop-archive .antyca-fp-section {
  border-top: 1px solid #f1f5f9;
  padding: 0.15rem 0.65rem;
}

body.antyca-shop-archive .antyca-fp-section:first-child {
  border-top: none;
}

body.antyca-shop-archive .antyca-fp-section__title {
  margin: 0.65rem 0 0.5rem;
  padding: 0 0.15rem;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--antyca-gray-500, #64748b);
}

body.antyca-shop-archive .antyca-fp-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.7rem 0.15rem;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: var(--antyca-gray-900, #0f172a);
  text-align: left;
  cursor: pointer;
}

body.antyca-shop-archive .antyca-fp-section__chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

body.antyca-shop-archive .antyca-fp-section.is-open .antyca-fp-section__chevron {
  transform: rotate(-135deg);
}

body.antyca-shop-archive .antyca-fp-section:not(.is-open) .antyca-fp-section__body {
  display: none;
}

body.antyca-shop-archive .antyca-fp-section__body {
  padding: 0 0.15rem 0.75rem;
}

/* Búsqueda compacta en sidebar */

body.antyca-shop-archive .antyca-fp-search {
  display: flex;
  gap: 0.4rem;
}

body.antyca-shop-archive .antyca-fp-search__input {
  flex: 1;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--antyca-gray-200, #e2e8f0);
  border-radius: 8px;
  font-size: 13px;
  background: #f8fafc;
}

body.antyca-shop-archive .antyca-fp-search__input:focus {
  outline: none;
  border-color: var(--antyca-primary, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

body.antyca-shop-archive .antyca-fp-search__btn {
  min-height: 40px;
  padding: 0 0.85rem;
  border: none;
  border-radius: 8px;
  background: var(--antyca-primary, #2563eb);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

body.antyca-shop-archive .antyca-fp-inline-search {
  width: 100%;
  min-height: 36px;
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--antyca-gray-200, #e2e8f0);
  border-radius: 8px;
  font-size: 12px;
  background: #f8fafc;
}

/* Checklist — sin logos, sin chips gigantes */

body.antyca-shop-archive .antyca-fp-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

body.antyca-shop-archive .antyca-fp-checklist__item {
  margin: 0;
}

body.antyca-shop-archive .antyca-fp-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--antyca-gray-700, #334155);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

body.antyca-shop-archive .antyca-fp-check:hover,
body.antyca-shop-archive .antyca-fp-check:focus-visible {
  background: #f8fafc;
  color: var(--antyca-primary, #2563eb);
  outline: none;
}

body.antyca-shop-archive .antyca-fp-check.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--antyca-primary-dark, #1d4ed8);
  font-weight: 600;
}

body.antyca-shop-archive .antyca-fp-check__box {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  position: relative;
}

body.antyca-shop-archive .antyca-fp-check.is-active .antyca-fp-check__box {
  border-color: var(--antyca-primary, #2563eb);
  background: var(--antyca-primary, #2563eb);
}

body.antyca-shop-archive .antyca-fp-check.is-active .antyca-fp-check__box::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

body.antyca-shop-archive .antyca-fp-check__count {
  margin-left: auto;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

/* Ocultar logos de marca Woodmart */
body.antyca-shop-archive .antyca-filters-panel img,
body.antyca-shop-archive .antyca-filters-panel .wd-swatch,
body.antyca-shop-archive .antyca-filters-panel .wd-swatch-wrap img {
  display: none !important;
}

/* Grupos de atributos */

body.antyca-shop-archive .antyca-fp-attr-group {
  margin-bottom: 0.65rem;
}

body.antyca-shop-archive .antyca-fp-attr-group__title {
  margin: 0 0 0.35rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--antyca-gray-500, #64748b);
}

/* Precio — azul Antyca */

body.antyca-shop-archive .antyca-filter-price-widget .ui-slider {
  height: 5px !important;
  border: none !important;
  background: #e2e8f0 !important;
  border-radius: 999px;
  margin: 0.85rem 0.25rem 0.65rem !important;
}

body.antyca-shop-archive .antyca-filter-price-widget .ui-slider-range {
  background: linear-gradient(90deg, #3b82f6, #2563eb) !important;
}

body.antyca-shop-archive .antyca-filter-price-widget .ui-slider-handle {
  width: 16px !important;
  height: 16px !important;
  top: -6px !important;
  border: 2px solid #2563eb !important;
  background: #fff !important;
  border-radius: 50% !important;
}

body.antyca-shop-archive .antyca-filter-price-widget .price_label {
  font-size: 12px;
  font-weight: 600;
  color: var(--antyca-gray-700, #334155);
}

body.antyca-shop-archive .antyca-filter-price-widget .button {
  margin-top: 0.5rem;
  min-height: 36px;
  padding: 0.4rem 0.85rem !important;
  border-radius: 8px !important;
  background: var(--antyca-primary, #2563eb) !important;
  border-color: var(--antyca-primary, #2563eb) !important;
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

/* Filtros activos */

body.antyca-shop-archive .antyca-fp-active-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

body.antyca-shop-archive .antyca-fp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

body.antyca-shop-archive .antyca-fp-chip__remove {
  font-size: 12px;
  line-height: 1;
  opacity: 0.7;
}

body.antyca-shop-archive .antyca-fp-clear {
  padding: 0.5rem 0.8rem 0.85rem;
}

body.antyca-shop-archive .antyca-fp-clear__link {
  font-size: 12px;
  font-weight: 700;
  color: var(--antyca-gray-500, #64748b);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.antyca-shop-archive .antyca-fp-clear__link:hover {
  color: var(--antyca-primary, #2563eb);
}

/* Overlay drawer */

body.antyca-shop-archive .antyca-filters-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(2, 6, 23, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.antyca-shop-archive.antyca-filters-open .antyca-filters-overlay {
  opacity: 1;
  visibility: visible;
}

/* ─── Mobile drawer ─── */

@media (max-width: 1024px) {
  body.antyca-shop-archive .antyca-filters-toolbar {
    display: block;
  }

  body.antyca-shop-archive .wd-show-sidebar-btn {
    display: none !important;
  }

  body.antyca-shop-archive .wd-sidebar.sidebar-container {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 10030;
    width: min(92vw, 380px);
    max-width: 380px;
    margin: 0;
    padding: 0;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    pointer-events: none;
  }

  body.antyca-shop-archive .wd-sidebar.sidebar-container.antyca-filters-drawer-open,
  body.antyca-shop-archive.antyca-filters-open .wd-sidebar.sidebar-container {
    transform: translateX(0);
    pointer-events: auto;
  }

  body.antyca-shop-archive .wd-sidebar .widget-area {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.antyca-shop-archive .antyca-filters-card {
    min-height: 100%;
    border-radius: 0;
    border-left: none;
    display: flex;
    flex-direction: column;
  }

  body.antyca-shop-archive .antyca-filters-card__head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
  }

  body.antyca-shop-archive .antyca-filters-card__close {
    display: inline-flex;
  }

  body.antyca-shop-archive .antyca-filters-card__body {
    flex: 1;
    overflow: auto;
  }

  body.antyca-shop-archive .antyca-filters-card__footer {
    display: flex;
    position: sticky;
    bottom: 0;
    z-index: 2;
  }

  body.antyca-shop-archive.antyca-filters-open {
    overflow: hidden;
  }

  body.antyca-shop-archive .antyca-category-shortcuts__track {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
}

/* Desktop: secciones abiertas, sin drawer */

@media (min-width: 1025px) {
  body.antyca-shop-archive .antyca-fp-section .antyca-fp-section__body {
    display: block !important;
  }

  body.antyca-shop-archive .antyca-fp-section__toggle {
    cursor: default;
    pointer-events: none;
  }

  body.antyca-shop-archive .antyca-fp-section__chevron {
    display: none;
  }

  body.antyca-shop-archive .antyca-filters-card__footer {
    display: none !important;
  }
}
