* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #013D93;
  margin: 0;
  padding: 1rem;
}

h1 {
  text-align: center;
  color: #333;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0;
}

.tallador {
  background: white;
  color: inherit;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  position: relative;
  padding: 0.5rem;
  text-align: center;
 
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tallador img {
  width: 100%;
  height: auto;
  border-radius: 6px;
}
/* 1) Solo la imagen en gris (no todo el contenedor) */
.tallador.agotada {
  pointer-events: auto;  /* ✅ permite clics */
  opacity: 1;
  filter: none;
}

.tallador.agotada img {
  filter: grayscale(100%) brightness(.95);
  opacity: .55;
}



/* 3) Sello/estampa roja de AGOTADA (se ve roja porque no filtramos el contenedor) */
.tallador.agotada::after {
  content: "AGOTADA";
  position: absolute;
  top: 10px;
  left: -8px;
  transform: rotate(-12deg);
  background: #f11a21;
  color: #fff;
  padding: 6px 14px;
  font-weight: bold;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  letter-spacing: 1px;
  z-index: 30;
}


.numero {
  font-weight: bold;
  margin-top: 0.5rem;
  font-size: 1.6rem;
  color: #222;
  text-align: center;
}

.estrella {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 84px;
  height: 84px;
  background-image: url('/img/rare.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  font-weight: bold;
}

.estrella span:first-child {
  color: black;
  font-size: 1.5rem;
  line-height: 1;
}

.estrella span:last-child {
  color: black;
  font-size: 0.6rem;
  line-height: 1;
  margin-top: 2px;
}

.best-value {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #007f3e;
  color: white;
  padding: 6px 10px;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 16px;
  line-height: 1.2;
}

.best-value .linea-secundaria {
  font-size: 11px;
  font-weight: normal;
}


@keyframes brillo {
  0%   { box-shadow: 0 0 6px rgba(255, 215, 0, 0.8); }
  50%  { box-shadow: 0 0 16px rgba(255, 215, 0, 1); }
  100% { box-shadow: 0 0 6px rgba(255, 215, 0, 0.8); }
}

a {
  color: inherit;
  text-decoration: none;
}

#buscador {
  width: 100%;
  padding: 12px;
  font-size: 1.1rem;
  margin-bottom: 1px;
  border: 2px solid #ccc;
  border-radius: 8px;
}

.detalles {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #333;
  border-top: 1px solid #ccc;
  padding-top: 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.detalles div {
  padding: 0 0.5rem;
}

.detalles p {
  margin: 0.3rem 0;
  font-size: 1.85rem;
  height: 40px;
}

.whatsapp-footer {
  width: 100%;
  margin-top: 0.6rem;
}

.boton-wsp {
  display: block;
  width: 100%;
  background-color: #25d366;
  color: white;
  padding: 12px;
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
}

.boton-wsp:hover {
  background-color: #1ebe5b;
}

.boton-cartas {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 10px;
  border-radius: 6px;
  background-color: #eef5ff;
  transition: background 0.2s ease;
}

.boton-cartas:hover {
  background-color: #d9e9ff;
}

.lado-izquierdo {
  text-decoration: none;
  color: inherit;
  flex: 1;
}

.lado-derecho {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 3.3rem;
  font-weight: bold;
  padding: 0.5rem;
}

.lado-izquierdo.boton-cartas {
  display: block;
  background-color: #eef5ff;
  padding: 0.6rem;
  border-radius: 6px;
  text-align: center;
  transition: background 0.2s ease;
}

.lado-izquierdo.boton-cartas:hover {
  background-color: #d9e9ff;
}

.contenido-cartas strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
  color: #003366;
}
.best-container {
  background: linear-gradient(135deg, 
  #ffd700, #ff69b4, #1e90ff, #32cd32, #ffa500, #ffd700);

  background-size: 300% 300%;
  animation: rainbow-glow 6s ease infinite;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

@keyframes rainbow-glow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}
.fila-botones button {
  background-color: #0a5cc0;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 1rem;
  transition: background 0.2s ease;
  cursor: pointer;
}

.fila-botones button:hover {
  background-color: #0d4e7a;
}

.fila-botones button.activo {
  background-color: #012675;
  color: white;
}


.boton-login {
  font-size: 0.9em;
  padding: 6px 12px;
  background: #323c5e;
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-left: 10px;
}

.boton-login:hover {
  background: #1e294a;
}

@media (max-width: 600px) {
  .grid {
    flex-wrap: wrap;
    justify-content: space-around;
  }

  .tallador {
    flex: 0 0 calc(50% - 0.5rem);
    max-width: calc(50% - 0.5rem);
    padding: 0.3rem;
    justify-content: space-between;
    height: auto;
  }

  .disclaimer {
    font-size: 0.65rem !important;
  }

  #buscador {
    padding: 24px;
    font-size: 0.9rem;
  }

  .detalles {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.5rem;
  }

  .contenido-cartas p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.1 !important;
    font-size: 0.75rem !important;
  }

  .contenido-cartas strong {
    font-size: 1rem !important;
    margin-bottom: 0.2rem !important;
  }

  .lado-izquierdo.boton-cartas {
    padding: 0.3rem !important;
  }

  .detalles p {
    font-size: 0.8rem;
    height: auto !important;
  }

  .boton-wsp {
    font-size: 0.8rem;
  }

  .filtros button {
    font-size: 1.2rem;
    padding: 16px 24px;
  }

  .tallador .rainbow-fondo {
    position: absolute !important;
    top: 25% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 10 !important;
    background: linear-gradient(90deg, red, orange, yellow, green, cyan, blue, violet) !important;
    background-size: 300% 300% !important;
    animation: fondo-rainbow 4s ease infinite !important;
    color: white !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    text-align: center;
    font-weight: bold;
  }
}




.filtros {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.fila-botones {
  display: flex;
  gap: 10px;
  width: 100%;
}

.fila-botones button {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px;
  font-size: 0.9rem;
  white-space: nowrap;
}

.filtros label {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 0.6rem;
}

.hidden {
  display: none;
}
.precio {
  font-size: 1.6rem;
  font-weight: bold;
  color: #007f3e;
  margin-top: 0.4rem;
}
.banner-intro {
  margin-bottom: 10px; 
}


.disclaimer {
  background-color: #fff8dc;
  border-left: 6px solid #f39c12;
  padding: 10px 15px;
  margin: 20px 0;
  font-size: 0.95rem;
  color: #333;
  border-radius: 6px;
  line-height: 1.5;
}


.item-tallador {
  border: 8px solid #a1c4ff; /* azul muy claro */
  border-radius: 10px;
}

.item-suelta {
  border: 8px solid #a5f5b1; /* verde muy claro */
  border-radius: 10px;
}

.item-buscada {
  border: 8px solid #ffcc80;
  border-radius: 10px;
}

.filtro-login {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0 1rem;
  gap: 1rem;
}

.centro-checkbox {
  flex: 1;
  text-align: center;
}

.login-derecha {
  flex: 0 0 auto;
}

.boton-login {
  background: #0f578a;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
}

.barra-filtros {
  background: #012676;
  z-index: 999;
}

/* Versión móvil */
@media (max-width: 800px) {
  .barra-filtros {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
   /* border-top: 2px solid #ccc; Style borde que no sabe si le gusta*/
    padding: 0.5rem 1rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  }

  body {
    padding-bottom: 180px; /* deja espacio para el filtro fijo */
  }
}

/* Versión escritorio */
@media (min-width: 801px) {
  .barra-filtros {
    position: static;
    padding-bottom: 0;
  }
}
.buscador-container {
  width: 100%;
  margin: 1rem 0;
}

@media (max-width: 800px) {
  .buscador-container {
    position: fixed;
    bottom: 91px; /* justo encima del menú inferior */
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    background: none;
    box-shadow: none;
	margin: 0 !important;
  }

.buscador-container input {
  width: 100%;
  font-size: 0.7rem;
  line-height: 1.2;
  height: 26px;
  padding: 1px 4px;
  border: none;
  border-radius: 0;
  background: white;
  outline: none;
}


  body {
    padding-bottom: 180px;
  }
}

.reverse-holo {
  border: 8px solid;
  border-image: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet) 1;
  animation: rainbow-border 5s linear infinite;
}

@keyframes rainbow-border {
  0%   { border-image-source: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet); }
  50%  { border-image-source: linear-gradient(45deg, violet, indigo, blue, green, yellow, orange, red); }
  100% { border-image-source: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet); }
}

.rh-oculta {
  display: none;
}
.boton-sueltas-toggle {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #ccc;
  width: fit-content;
  margin: 0 auto;
}

.boton-sueltas-toggle button {
  padding: 10px 15px;
  font-size: 1rem;
  font-family: Arial, sans-serif;
  border: none;
  cursor: pointer;
  width: 100px;
  color: white;
  transition: background 0.3s ease;
}

#btn-sueltas-normales {
  background-color: #4caf50; /* verde como carta suelta normal */
}

#btn-sueltas-rh {
  background: linear-gradient(to right, #ffcc00, #8e44ad); /* rainbow estilo RH */
}

/* Activo */
.boton-sueltas-toggle button.activo {
  box-shadow: inset 0 0 0 3px white;
  font-weight: bold;
}

.item-bulk {
  border: 8px solid #a0522d; /* café */
  border-radius: 10px;
}

/* Móvil: Botones con iniciales o emojis */
@media (max-width: 849px) {
  .fila-botones button {
    font-size: 0.75rem;
    padding: 1.5px 1.5px;
    text-align: center;
  }

  .fila-botones button:nth-child(1)::after,
  .fila-botones button:nth-child(2)::after,
  .fila-botones button:nth-child(3)::after,
  .fila-botones button:nth-child(4)::after,
  .fila-botones button:nth-child(5)::after,
  .fila-botones button:nth-child(6)::after {
    content: none;
  }

  .fila-botones button img {
    display: block;
    width: 46px;
    height: 46px;
    margin: 0 auto 0px;
  }

  .fila-botones button span {
    display: none;
  }
}

/* Escritorio: Botones con texto completo */
@media (min-width: 850px) {
  .fila-botones button img {
    display: none;
  }

  .fila-botones button span {
    display: inline;
  }
}

.tallador {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.tallador.visible {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

#btn-ver-mas {
  display: block;
  margin: 2rem auto;
  padding: 16px 24px;
  font-size: 1.2rem;
  font-weight: bold;
  background-color: #d1e5ff; /* color solicitado */
  color: #003366;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: background 0.3s ease;
}

#btn-ver-mas:hover {
  background-color: #bad6ff;
}

@media (max-width: 800px) {
  #btn-ver-mas {
    width: 100%;
    font-size: 1rem;
    padding: 14px;
  }
}



.item-suelta,
.item-buscada {
  width: calc(50% - 10px); /* 2 por fila */
}




.stock-verde {
  color: green;
  font-weight: bold;
}

.stock-amarillo {
  color: #e6b800; /* amarillo mostaza */
  font-weight: bold;
}


.filtros-categorias {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 0;
  font-family: sans-serif;
  font-size: 0.9rem;
}

.grupo-filtro {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filtros-lista {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filtros-lista button {
  border: 1px solid #0061C2;
  padding: 4px 10px;
  border-radius: 5px;
  background-color: #013278;
  cursor: pointer;
  transition: all 0.2s;
  color: white;
}

.filtros-lista button.activo {
  background-color: #FACC1F;
  color: #012676;
  border-color: #004c99;
}

@media (max-width: 849px) {
  .grupo-filtro {
    margin-bottom: 0.5rem;
	
  }

  .filtros-categorias {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
	background: #012676;
  }

  .grupo-filtro button.filtro-toggle {
    width: 100%;
    text-align: left;
    font-weight: bold;
    padding: 8px;
    border: 1px solid #ccc;
    background: #f0f0f0;
  }

  .filtros-lista {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    background: #012676;
    /*border: 1px solid #ccc; Esto no nos gusta ni a Style ni a mi*/
    padding: 6px;
  }

  .grupo-filtro.abierto .filtros-lista {
    display: flex;
  }
}
@media (max-width: 849px) {
  .buscador-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: 013d93;
    padding: 8px;
    
  }
}
@media (max-width: 849px) {
  .filtros-categorias {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding: 8px;
  }

  .grupo-filtro {
    flex: 1;
  }

  .grupo-filtro button.filtro-toggle {
    width: 100%;
    padding: 10px 6px;
    font-size: 0.9rem;
    background: #013278;
    border: 1px solid #0061c2;
    border-radius: 6px;
	color: white;
  }
}


@media (max-width: 849px) {
  .filtros-categorias.fila-movil {
    display: flex;
    gap: 6px;
    padding: 8px;
    flex-direction: row;
  }

  .grupo-filtro {
    flex: 1;
  }

  .grupo-filtro .filtro-toggle {
    width: 100%;
    font-size: 0.9rem;
    padding: 10px 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
  }

  .grupo-filtro strong {
    display: none;
  }
}



.grupo-filtro .filtro-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
@media (max-width: 849px) {
  .grupo-filtro {
    flex: 1 1 0;
  }

  .grupo-filtro.abierto .filtros-lista {
    width: 100%;
  }
}
.filtros-lista button {
  flex: 1 1 auto;
}
@media (max-width: 849px) {
  .grupo-filtro.abierto {
    position: absolute;
    top: -180px; /* ajusta según altura */
    left: 0;
    width: 100%;
    z-index: 999;
    background: #012676;
    padding: 8px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  }

  .grupo-filtro.abierto .filtros-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .filtros-categorias {
    position: relative;
  }
}
.filtro-toggle.activo {
  background-color: #FACC1F;
  font-weight: bold;
  color: black;
}
@media (max-width: 849px) {
  .grupo-filtro .filtro-toggle.activo {
    background-color: #FACC1F;
    font-weight: bold;
    border-color: #0061c2;
	color: black;
  }
}
.cerrar-icono {
  display: none;
  position: absolute;
  right: 10px;
  font-size: 1.1rem;
  color: #666;
}

@media (max-width: 849px) {
  .grupo-filtro.abierto .cerrar-icono {
    display: inline;
  }

  .grupo-filtro .filtro-toggle {
    position: relative;
    text-align: center;
    padding-right: 28px; /* deja espacio para la X */
  }
}
.borde-standard-set {
  border: 5px solid black;
}

.borde-standard-set-foil {
  border: 5px solid red;
}

.borde-parallel-set {
  border: 5px solid blue;
}

.borde-premium-parallel-set-poke-ball {
  border: 5px solid orange;
}

.borde-premium-parallel-set-master-ball {
  border: 5px solid purple;
}

.borde-poke-ball {
  border: 5px solid yellow;
}

.borde-master-ball {
  border: 5px solid green;
}

.borde-promo {
  border: 5px solid saddlebrown; /* café */
}

.borde-cosmos-holo {
  border: 5px solid hotpink;
}

/* Fallback para tipos no definidos */
[class^="borde-"] {
  border: 5px solid #ccc;
}


.resumen-estadisticas {
  margin: 1rem auto 0.5rem;
  text-align: center;
  font-weight: bold;
  font-size: 0.85rem;
  color: #333;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.resumen-estadisticas span {
  display: inline-block;
  margin: 0.2rem 0.4rem;
}
.borde-normal {
  border: 5px solid #6ea4f2; /* Azul */
  border-radius: 10px;
}

.borde-reverseholofoil {
  border: 6px solid transparent;
  border-radius: 10px;
  border-image: linear-gradient(
    135deg,
    #ffffff,
    #494b4c,
    #ffffff,
    #494b4c,
    #ffffff
  ) 1;
  box-shadow:
    inset 0 0 6px rgba(255, 255, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.3);
}



.borde-holofoil {
  border: 5px solid transparent;
  border-radius: 5px;
  border-image: linear-gradient(
    45deg,
    #04deff,
    #fc00ff,
    #04deff,
    #fc00ff,
    #04deff
  ) 1;
  animation: holofoil-gradient 8s linear infinite;
}

@keyframes holofoil-gradient {
  0% {
    border-image-source: linear-gradient(
      45deg,
      #04deff,
      #fc00ff,
      #04deff,
      #fc00ff,
      #04deff
    );
  }
  50% {
    border-image-source: linear-gradient(
      225deg,
      #fc00ff,
      #04deff,
      #fc00ff,
      #04deff,
      #fc00ff
    );
  }
  100% {
    border-image-source: linear-gradient(
      45deg,
      #04deff,
      #fc00ff,
      #04deff,
      #fc00ff,
      #04deff
    );
  }
}

#btn-se-busca {
  background-color: #f8f8f8;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#btn-se-busca.activo {
  background-color: #ffcc80; /* naranja claro */
  border-color: #ffa726;
  font-weight: bold;
}

@media (max-width: 849px) {
  .filtro-login {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem 0 1rem;
    gap: 0.5rem;
    padding: 0 0.5rem;
  }

  .centro-checkbox {
    flex: 1;
    text-align: left;
  }

  #btn-se-busca {
    flex: 1;
    text-align: center;
    font-weight: bold;
  }

  .login-derecha {
    flex: 1;
    text-align: right;
  }
}
.spinner {
  border: 4px solid #ddd;
  border-top: 4px solid #4caf50;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  animation: girar 1s linear infinite;
  margin: 0 auto;
}

@keyframes girar {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
#btn-actualizadas.activo {
  background-color: #0066cc;
  color: white;
  font-weight: bold;
  border-color: #004c99;
}
.deck-imagenes {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 0.3rem;
}

.deck-icon {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 0 3px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.modal-carta {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.modal-contenido {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.modal-contenido img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.cerrar-modal {
  position: absolute;
  top: -10px;
  right: -10px;
  background: white;
  color: black;
  border-radius: 50%;
  font-size: 20px;
  padding: 4px 10px;
  cursor: pointer;
  font-weight: bold;
}
.tallador img {
  width: 100%;
  height: auto;
  max-width: 200px;
  border-radius: 6px;
}
.deck-imagenes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 0.3rem;
  max-width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
/* Quita el borde original (holofoil, reverse, etc.) */
.tallador.agotada {
  border: 5px solid black !important;
  border-image: none !important;
  box-shadow: none !important; /* quita brillos internos si los hubiera */
}
/* =========================================================
   CAMBIOS DE FILTROS - NUEVO SIDEBAR DESLIZANTE
   ========================================================= */

/* === Ajuste para el nuevo sidebar de filtros === */
@media (min-width: 901px) {
  .grid {
    margin-left: 270px; /* deja espacio lateral para el sidebar fijo */
  }
}

/* === Estilo general del sidebar === */
#btn-open-filtros {
  background: #0c569d;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.2s ease;
}
#btn-open-filtros:hover {
  background: #0a4b89;
}

#sidebar-filtros {
  background: #0b1d33;
  color: #fff;
  font-family: system-ui, sans-serif;
  padding-bottom: 2rem;
}

#sidebar-filtros h3 {
  margin: 8px 0;
  font-size: 1.1rem;
  font-weight: bold;
  color: #facc1f;
}

#sidebar-filtros .bloque-filtro {
  margin-bottom: 10px;
}

/* === Botones: una opción por línea === */
#sidebar-filtros .contenido-filtro button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 3px 0;
  padding: 7px 10px;
  border-radius: 6px;
  background: #1f2937;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 0.9rem;
}

#sidebar-filtros .contenido-filtro button:hover {
  background: #0c569d;
}

#sidebar-filtros .contenido-filtro button.activo {
  background: #FACC1F;
  color: #000;
  font-weight: bold;
}

/* === Encabezados por bloque (Mega Evolution, Scarlet & Violet, etc.) === */
#sidebar-filtros .bloque-era h4 {
  font-size: 0.9rem;
  color: #ffcb05;
  margin: 8px 0 4px;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

/* === Separadores y secciones futuras === */
#sidebar-filtros hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 10px 0;
}

#sidebar-filtros .titulo-filtro.disabled {
  background: #222b45;
  opacity: 0.5;
  cursor: not-allowed;
}

/* === Utilidades y login dentro del panel === */
#sidebar-filtros .utilidades label {
  font-size: 0.9rem;
  color: #fff;
  display: block;
  padding: 6px 4px;
}

#sidebar-filtros .boton-login {
  display: block;
  background: #0c569d;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  margin-top: 10px;
  transition: background 0.2s ease;
}

#sidebar-filtros .boton-login:hover {
  background: #0a4b89;
}

/* === Responsive === */
@media (max-width: 900px) {
  #btn-open-filtros {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
  }

  #sidebar-filtros {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  #sidebar-filtros.visible {
    transform: translateX(0);
  }

  body.sidebar-abierto {
    overflow: hidden;
  }
}
/* === Ocultar secciones futuras (Accesorios, Paquetes, Sellados) === */
#sidebar-filtros .bloque-filtro.futuro {
  display: none !important;
}
/* === Corrige solapamiento del sidebar con el contenido === */
@media (min-width: 901px) {
  #sidebar-filtros {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: #0b1d33;
    z-index: 1000; /* sidebar arriba del fondo */
    overflow-y: auto;
  }

  /* Mueve el contenido principal a la derecha del sidebar */
  main, 
  .banner-intro,
  .buscador-container,
  .grid,
  #contador-cartas,
  #banner-medio,
  #btn-ver-mas {
    margin-left: 270px; /* espacio suficiente para el sidebar */
  }

  /* Evita que el buscador o banners queden pegados al borde */
  .banner-intro,
  .buscador-container {
    padding-right: 16px;
  }
}
/* === Corrige alineación del banner inferior con sidebar === */
@media (min-width: 901px) {
  #banner-medio {
    margin-left: 270px !important;  /* mismo desplazamiento que las cartas */
    width: calc(100% - 270px);
    box-sizing: border-box;
  }
}
/* === Centrar correctamente el botón "Ver 20 más" con sidebar === */
@media (min-width: 901px) {
  #btn-ver-mas {
    display: block;
    margin-left: 270px !important;      /* igual que el resto */
    width: calc(100% - 270px);
    text-align: center;                 /* centra el botón dentro del nuevo espacio */
    box-sizing: border-box;
  }
}
/* === Barra de filtros activos (chips) === */
.filtros-activos {
  margin-left: 270px;        /* alineado con el contenido principal */
  padding: 6px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
  background: transparent;
  box-sizing: border-box;
}
.filtros-activos .chip {
  background: #0c569d;
  color: #fff;
  border-radius: 16px;
  padding: 4px 10px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}
.filtros-activos .chip button {
  background: none;
  border: none;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}
@media (max-width: 900px) {
  .filtros-activos {
    margin-left: 0;
    padding: 8px 6px;
  }
}
/* === Ocultar botón de Filtros cuando el panel está abierto === */
@media (max-width: 900px) {
  body.menu-filtros-abierto #btn-filtros {
    display: none !important;
  }
}

.utilidades button {
  width: 100%;
  background: #1f2937;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 6px;
}
.utilidades button:hover {
  background: #0c569d;
}
.utilidades button.activo {
  background: #0066cc;
  font-weight: bold;
}
/* === Ocultar Decks completamente === */
#grupo-deck,
button[onclick*="toggleGrupo('deck')"] {
  display: none !important;
}


/* === 3 cartas por fila solo en escritorio === */
@media (min-width: 901px) {
  .item-suelta,
  .item-buscada {
    width: calc(25% - 10px); /* 3 por fila, respetando el gap existente */
  }
}
/* === Corrige el buscador sticky en escritorio (3 columnas) === */
@media (min-width: 901px) {
  .buscador-container {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #013D93; /* mismo color del fondo */
    margin: 0;           /* elimina márgenes que empujaban contenido */
    padding: 8px 16px;   /* espacio interno parejo */
    box-sizing: border-box;
  }

  .buscador-container input {
    max-width: 480px;
    margin: 0 auto;
    display: block;
  }
}

/* === Corrige comportamiento móvil (mantén sticky pero más simple) === */
@media (max-width: 900px) {
  .buscador-container {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #013D93;
    padding: 6px;
    margin: 0;
  }
}

/* === Botón de filtros flotante abajo a la izquierda (solo móvil) === */
@media (max-width: 900px) {
  #btn-open-filtros {
    position: fixed;
    bottom: 16px;
    left: 16px;
    top: auto;
    z-index: 950; /* debajo del buscador (900) pero sobre el contenido */
    background: #0c569d;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s ease;
  }

  #btn-open-filtros:hover {
    background: #0a4b89;
  }
}
/* === Botón de filtros flotante perfecto (solo móvil) === */
@media (max-width: 900px) {
  #btn-open-filtros {
    position: fixed !important;
    bottom: 16px !important;
    left: 16px !important;
    top: auto !important;
    z-index: 950 !important;

    display: flex !important;
    justify-content: center;
    align-items: center;

    width: 58px !important;
    height: 58px !important;
    border-radius: 50% !important;
    border: none !important;

    background: #0c569d !important;
    color: #fff !important;
    font-size: 1.6rem !important;
    line-height: 1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    cursor: pointer;
  }

  #btn-open-filtros span {
    display: block;
    transform: translateY(1px); /* centra ópticamente el emoji/texto */
  }

  #btn-open-filtros:hover {
    background: #0a4b89 !important;
  }
}

/* === Bloque fijo con buscador y chips juntos === */
.busqueda-fija {
  position: sticky;
  top: 0;
  z-index: 900; /* debajo del sidebar */
  background: #013D93; /* mismo fondo */
  padding: 8px 10px 6px;
  box-sizing: border-box;
}

/* Buscador centrado dentro del bloque */
.busqueda-fija .buscador-container {
  margin: 0;
  padding: 0;
}

.busqueda-fija #buscador {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  display: block;
}

/* Chips debajo del buscador */
.busqueda-fija .filtros-activos {
  margin-left: 0;
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

/* Móvil */
@media (max-width: 900px) {
  .busqueda-fija {
    top: 0;
    padding: 6px 8px;
  }

  .busqueda-fija .filtros-activos {
    justify-content: flex-start;
    gap: 4px;
  }
}
/* === Botón "Quiero esta carta" fijo abajo solo en escritorio === */
@media (min-width: 901px) {
  .tallador {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* empuja el botón al fondo */
    position: relative;
  }

  .tallador .btn-carrito {
    margin-top: auto;
    background: #0c569d;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    width: 90%;
    max-width: 200px;
    margin-bottom: 8px;
    transition: background 0.2s ease;
  }

  .tallador .btn-carrito:hover {
    background: #0a4b89;
  }
}
/* 🔹 Ocultar la X del sidebar en escritorio */
@media (min-width: 901px) {
  .cerrar-sidebar {
    display: none;
  }
}
/* === Ajustes visuales para 4 por fila en escritorio === */
@media (min-width: 901px) {
  /* Reduce un poco el texto general dentro de la carta */
  .tallador {
    font-size: 0.85rem;
  }

  /* Precio más compacto */
  .detalles p {
    font-size: 1.2rem;
    height: auto;
    line-height: 1.2;
  }

  /* Número o expansión más ajustados */
  .numero {
    font-size: 1.2rem;
  }

  /* Botón "Agregar a mi lista" más pequeño */
  .boton-wsp {
    font-size: 1rem;
    padding: 8px 0;
  }

  /* Espaciado general más compacto */
  .detalles {
    gap: 6px;
  }

  .contenido-cartas strong {
    font-size: 1rem;
  }
}
#modal-carta {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#modal-carta img {
  max-width: 90vw;   /* ancho máximo 90% de la ventana */
  max-height: 90vh;  /* alto máximo 90% de la ventana */
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
/* === Botón gris cuando la carta está agotada === */
.boton-wsp.agotada {
  background-color: #aaa !important;
  color: #eee !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.boton-wsp.agotada:hover {
  background-color: #aaa !important;
}
/* === Acordeones principales === */
.acordeon-titulo {
  cursor: pointer;
  padding: 10px;
  background: #143a67;
  color: #fff;
  border-radius: 6px;
  font-weight: bold;
  margin-top: 6px;
}
.acordeon-contenido {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  margin-bottom: 6px;
  background: none; /* evita fondo blanco */
}
.acordeon.activo .acordeon-contenido {
  max-height: 800px;
}

/* === Eras dentro de expansiones === */
.era-titulo {
  cursor: pointer;
  padding: 6px 8px;
  background: rgba(255,255,255,0.08);
  color: #ffcb05;
  font-size: 0.9em;
  border-radius: 4px;
  margin-top: 4px;
}
.era-contenido {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding-left: 8px;
}

.era.activa .era-contenido {
  max-height: none; /* ← antes era 500px */
  overflow: visible; /* ← permite mostrar todo el contenido */
}

/* === Botones de expansiones dentro de las eras === */
.era-contenido button {
  display: block;              /* cada expansión ocupa su línea */
  width: 100%;
  text-align: left;
  margin: 2px 0;
  padding: 5px 10px;
  background: #1f2937;         /* mismo tono oscuro del sidebar */
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}
.era-contenido button:hover {
  background: #0c569d;         /* azul al pasar el mouse */
}
.era-contenido button.activo {
  background: #0c569d;         /* azul cuando está activo */
}
/* Botones de Tipo/Rareza/Decks dentro del acordeón */
.acordeon-contenido > button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 2px 0;
  padding: 5px 10px;
  background: #1f2937;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
}
.acordeon-contenido > button:hover { background: #0c569d; }
.acordeon-contenido > button.activo { background: #0c569d; }

.overlay-ver-carta {
  position: absolute;
  inset: 0;
  background: transparent;
  cursor: pointer;
}
/* === Buscador y selector de orden en la misma línea === */
.buscador-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.buscador-container input {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  border: 2px solid #ccc;
  border-radius: 8px;
}

.buscador-container select {
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 2px solid #ccc;
  border-radius: 8px;
  background: white;
  color: #013278;
  cursor: pointer;
  transition: all 0.2s ease;
}

.buscador-container select:hover {
  border-color: #013278;
}

/* Móvil: el select se va debajo del input */
@media (max-width: 600px) {
  .buscador-container {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
}
/* === REGLA FINAL DE BUSCADOR ===
   (Tiene prioridad sobre versiones anteriores) */
.buscador-container {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 8px 12px !important;
  background: #013D93 !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 900 !important;
}

.buscador-container input {
  flex: 1 !important;
  padding: 10px !important;
  font-size: 1rem !important;
  border: 2px solid #ccc !important;
  border-radius: 8px !important;
  max-width: 480px !important;
}

.buscador-container select {
  padding: 10px 12px !important;
  font-size: 0.95rem !important;
  border: 2px solid #ccc !important;
  border-radius: 8px !important;
  background: white !important;
  color: #013278 !important;
  cursor: pointer !important;
  transition: border-color 0.2s ease !important;
}

.buscador-container select:hover {
  border-color: #013278 !important;
}

@media (max-width: 600px) {
  .buscador-container {
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px !important;
  }

  .buscador-container input,
  .buscador-container select {
    flex: 1 1 0 !important;
    font-size: 0.9rem !important;
    padding: 8px !important;
  }

  .buscador-container select {
    max-width: 120px !important;
  }
}
/* === Ajuste final: selector alineado con buscador en móvil === */
@media (max-width: 600px) {
  .buscador-container {
    flex-direction: row !important;
    align-items: stretch !important; /* iguala alturas */
    gap: 6px !important;
    padding: 6px !important;
  }

  .buscador-container input {
    flex: 1 1 auto !important;
    height: auto !important; /* mantiene su altura natural */
  }

  .buscador-container select {
    flex: 0 0 38% !important; /* ancho razonable */
    height: auto !important;
    padding: 0 10px !important;
    font-size: 0.9rem !important;
    line-height: normal !important;
    border: 2px solid #ccc !important;
    border-radius: 8px !important;
    background: white !important;
    color: #013278 !important;
  }
}

.imagen-carta {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}

.banda-jumbo {
  position: absolute;
  left: -40%;
  bottom: 30%;
  width: 180%;
  background: rgba(255, 215, 0, 0.85); /* Dorado semitransparente */
  color: #000;
  text-align: center;
  font-weight: 900;
  font-size: 1.2rem;
  transform: rotate(-45deg);
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
  letter-spacing: 2px;
  padding: 4px 0;
  pointer-events: none;
  z-index: 5;
}
.chip-clear {
  background: #fff;
  color: #b71c1c;
  font-weight: bold;
  border: 2px solid #b71c1c;
}

.chip-clear button {
  color: #b71c1c;
  font-weight: bold;
}

