/* =========================================================
   Centro Pokémon — Barra lateral de catálogo (estilo Pony)
   ========================================================= */
.cp-sb {
  --cp-accent: #e5181d;
  --cp-accent-dark: #a80f13;
  --cp-fg: #14110f;
  --cp-muted: rgba(20, 17, 15, .6);
  --cp-line: rgba(20, 17, 15, .1);
  --cp-soft: rgba(20, 17, 15, .045);
  --cp-accent-soft: rgba(229, 24, 29, .1);
  --cp-accent-mid: rgba(229, 24, 29, .22);
  --cp-ease: cubic-bezier(.2, .8, .2, 1);
  font-size: 15px;
  color: var(--cp-fg);
}
.cp-sb *, .cp-sb *::before, .cp-sb *::after { box-sizing: border-box; }

/* Panel */
.cp-sb__panel {
  background: #fff;
  border: 1px solid var(--cp-line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px -12px rgba(0, 0, 0, .14);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 1000px) {
  .cp-sb__panel { position: sticky; top: 24px; max-height: calc(100vh - 48px); }
}
.cp-sb__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; }
.cp-sb__title {
  margin: 0; display: flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .01em;
}
.cp-ico {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--cp-fg);
  background: linear-gradient(var(--cp-accent) 0 43%, var(--cp-fg) 43% 57%, #fff 57%);
  position: relative;
}
.cp-ico::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; transform: translate(-50%, -50%);
  border-radius: 50%; background: #fff; border: 2.5px solid var(--cp-fg);
}
.cp-sb__close, .cp-sb__open { display: none; }

.cp-sb__filter {
  margin: 0 18px 12px; display: flex; align-items: center; gap: 9px;
  padding: 0 14px; height: 44px; border-radius: 12px;
  background: var(--cp-soft); border: 1px solid transparent; color: var(--cp-muted);
  transition: border-color .2s, background .2s; cursor: text;
}
.cp-sb__filter:focus-within { border-color: var(--cp-accent); background: #fff; }
.cp-sb__filter input {
  border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important;
  width: 100%; height: auto !important; padding: 0 !important; font: inherit; font-size: 15px; color: var(--cp-fg);
}
.cp-sb__scroll {
  overflow-y: auto; overscroll-behavior: contain; padding: 0 12px 18px;
  scrollbar-width: thin; scrollbar-color: var(--cp-line) transparent;
}

.cp-allbtn {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 6px 12px; padding: 13px 16px; border-radius: 12px;
  background: var(--cp-fg); color: #fff !important; font-weight: 800; font-size: 15px;
  text-decoration: none; transition: background .2s, transform .2s var(--cp-ease);
}
.cp-allbtn:hover { background: var(--cp-accent); }
.cp-allbtn svg { transition: transform .2s var(--cp-ease); }
.cp-allbtn:hover svg { transform: translateX(3px); }

/* Filtros activos */
.cp-active { margin: 0 6px 10px; padding: 12px; border-radius: 12px; background: var(--cp-accent-soft); }
.cp-active__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.cp-clear { font-size: 13px; font-weight: 800; color: var(--cp-accent) !important; text-decoration: none; }

/* Grupos */
.cp-group { border-top: 1px solid var(--cp-line); padding-top: 4px; margin-top: 4px; }
.cp-group:first-of-type { border-top: 0; }
.cp-group__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  background: none !important; border: 0; cursor: pointer; color: var(--cp-muted) !important;
  padding: 12px 6px; font: inherit; font-size: 12px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .12em; box-shadow: none !important; min-height: 0;
}
.cp-group__toggle:hover { color: var(--cp-fg) !important; }
.cp-chev { transition: transform .25s var(--cp-ease); flex: none; }
[aria-expanded="false"] > .cp-chev { transform: rotate(-90deg); }

.cp-collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s var(--cp-ease); }
.cp-collapse > div { overflow: hidden; min-height: 0; }
.cp-collapse.is-open { grid-template-rows: 1fr; }

/* Listas */
.cp-list, .cp-sublist { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.cp-sublist { margin-left: 22px !important; padding-left: 8px !important; border-left: 1px dashed var(--cp-line); }
.cp-item { margin: 0; }
.cp-item__row { display: flex; align-items: center; gap: 2px; border-radius: 10px; position: relative; }
.cp-item__row:hover { background: var(--cp-soft); }
.cp-item__link {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 7px 6px; color: var(--cp-fg) !important; text-decoration: none; font-size: 15px; line-height: 1.3;
}
.cp-item--l2 .cp-item__link, .cp-item--l3 .cp-item__link { font-size: 14px; padding: 6px; color: var(--cp-muted) !important; }
.cp-item--l2 .cp-item__link:hover, .cp-item--l3 .cp-item__link:hover { color: var(--cp-fg) !important; }
.cp-item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-item__toggle {
  flex: none; width: 32px; height: 32px; display: grid; place-items: center; padding: 0 !important; min-height: 0;
  border: 0; background: none !important; border-radius: 8px; cursor: pointer; color: var(--cp-muted) !important; box-shadow: none !important;
}
.cp-item__toggle:hover { background: var(--cp-line) !important; color: var(--cp-fg) !important; }

.cp-item.is-active > .cp-item__row { background: var(--cp-accent-soft); }
.cp-item.is-active > .cp-item__row::before {
  content: ""; position: absolute; left: -10px; top: 20%; bottom: 20%; width: 3px; border-radius: 3px; background: var(--cp-accent);
}
.cp-item.is-active > .cp-item__row .cp-item__link { color: var(--cp-accent) !important; font-weight: 800; }
.cp-item.is-trail > .cp-item__row .cp-item__link { font-weight: 800; }

.cp-thumb {
  flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden;
  background: var(--cp-soft); display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--cp-line);
}
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-thumb--initial { font-weight: 900; font-size: 14px; color: var(--cp-accent); background: var(--cp-accent-soft); box-shadow: none; }
.cp-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cp-line); }
.cp-item.is-active .cp-dot { background: var(--cp-accent); }
.cp-count {
  flex: none; font-size: 11px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 99px;
  background: var(--cp-soft); color: var(--cp-muted); font-variant-numeric: tabular-nums;
}
.cp-count--soft { margin-left: 6px; text-transform: none; letter-spacing: 0; }
.cp-item.is-active > .cp-item__row .cp-count { background: var(--cp-accent); color: #fff; }

.cp-list--chips { display: flex !important; flex-wrap: wrap; gap: 6px; padding: 0 6px 6px !important; }
.cp-chip-item { margin: 0; }
.cp-chip {
  display: inline-block; padding: 7px 13px; border-radius: 99px; font-size: 13px; font-weight: 600; line-height: 1.2;
  border: 1px solid var(--cp-line); color: var(--cp-fg) !important; text-decoration: none; background: #fff;
  transition: border-color .2s, background .2s, color .2s;
}
.cp-chip:hover { border-color: var(--cp-accent); color: var(--cp-accent) !important; }
.cp-chip.is-active { background: var(--cp-accent); border-color: var(--cp-accent); color: #fff !important; }

.cp-item--extra { display: none; }
[data-expanded="true"] .cp-item--extra { display: block; }
.cp-filtering .cp-item--extra { display: block; }
.cp-filtering .cp-more { display: none !important; }
.cp-filtering .cp-collapse { grid-template-rows: 1fr; }
.cp-hide { display: none !important; }

.cp-more {
  display: inline-flex; align-items: center; gap: 4px; margin: 4px 6px 6px; padding: 0 !important; min-height: 0;
  background: none !important; border: 0; cursor: pointer; font: inherit; font-size: 13px; font-weight: 800;
  color: var(--cp-accent) !important; box-shadow: none !important;
}
.cp-more[hidden] { display: none; }
.cp-more[aria-expanded="true"] svg { transform: rotate(180deg); }
.cp-noresults { color: var(--cp-muted); font-size: 14px; padding: 8px 6px; margin: 0; }

/* Ocultar restos del sidebar viejo */
.sidebar-toggle-button, #block-57 { display: none !important; }

/* ---------- Cajón en celular / tablet ---------- */
@media (max-width: 999px) {
  .cp-sb__open {
    display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    min-height: 50px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
    background: var(--cp-fg); color: #fff; font: inherit; font-size: 15px; font-weight: 800;
    box-shadow: 0 4px 0 #000;
  }
  .cp-sb__open:active { transform: translateY(3px); box-shadow: 0 1px 0 #000; }
  .cp-sb__overlay {
    position: fixed; inset: 0; z-index: 9998; background: rgba(0, 0, 0, .45); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  .cp-sb__panel {
    position: fixed; z-index: 9999; top: 0; left: 0; bottom: 0; width: min(380px, 88vw); max-height: none;
    border: 0; border-radius: 0 20px 20px 0; transform: translateX(-102%); transition: transform .35s var(--cp-ease);
  }
  .cp-sb__scroll { flex: 1; }
  .cp-sb__close {
    display: grid; place-items: center; width: 38px; height: 38px; padding: 0 !important; border-radius: 50%;
    border: 0; background: var(--cp-soft) !important; color: var(--cp-fg) !important; cursor: pointer;
  }
  .cp-sb.is-open .cp-sb__overlay { opacity: 1; pointer-events: auto; }
  .cp-sb.is-open .cp-sb__panel { transform: none; }
  html.cp-lock, html.cp-lock body { overflow: hidden; }
}

/* ---------- Ajustes v2 ---------- */
#sidebar .ct-sidebar, #sidebar .ct-sidebar > *, #sidebar [data-sticky] { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
#sidebar .ct-widget { margin: 0 !important; }
.cp-item--l2 .cp-item__label, .cp-item--l3 .cp-item__label { white-space: normal; overflow: visible; line-height: 1.25; }
.cp-item__label { white-space: normal; line-height: 1.25; }
html body aside#sidebar[data-type] {
  background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important;
  --sidebar-background-color: transparent; --sidebar-inner-spacing: 0; --sidebar-inner-border: none; --sidebar-inner-shadow: none;
}
html body aside#sidebar[data-type] .ct-sidebar,
html body aside#sidebar[data-type] .ct-sidebar > div { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
