:root {
  --bg-main: #0b0b0e;
  --bg-card: #16161c;
  --bg-sidebar: #121218;
  --accent-purple: #7c4dff;
  --accent-purple-hover: #9e7aff;
  --text-main: #e1e1e6;
  --text-muted: #8b8b9e;
  --border-color: #2d2d3a;
  --stattrak-orange: #ff9800;
  --rarity-gradient: linear-gradient(
    180deg,
    rgba(124, 77, 255, 0.1) 0%,
    rgba(11, 11, 14, 0) 100%
  );
  --header-height: 58px;
}

.disposicion-tienda {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg-main);
  min-height: calc(100vh - var(--header-height));
  color: var(--text-main);
  font-family: "Segoe UI", Roboto, sans-serif;
  align-items: flex-start;
  box-sizing: border-box;
}

.filtros-lateral {
  width: 220px;
  min-width: 220px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  position: sticky;
  top: 14px;
  height: fit-content;
  max-height: calc(100vh - var(--header-height) - 28px);
  overflow-y: auto;
  flex-shrink: 0;
}

.contenido-principal {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  align-content: start;
}

.seccion-filtro {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.titulo-filtro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.titulo-filtro h3,
.seccion-filtro h3,
.seccion-filtro h4 {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  margin: 0 0 10px 0;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  background: #1c1c24 !important;
  border: 1px solid var(--border-color) !important;
  color: white !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font-size: 0.82rem !important;
  transition: all 0.2s ease;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: textfield;
  box-sizing: border-box;
}

input:focus {
  border-color: var(--accent-purple) !important;
  box-shadow: 0 0 0 2px rgba(124, 77, 255, 0.2);
}

.buscador {
  position: relative;
  display: flex;
  align-items: center;
}

.buscador i {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.buscador input {
  padding-left: 30px !important;
}

.barra-wear {
  position: relative;
  height: 22px;
  margin-bottom: 14px;
}

.rango-wear {
  height: 7px;
  width: 100%;
  border-radius: 4px;
  position: absolute;
  top: 8px;
  background: linear-gradient(
    90deg,
    #2ecc71 7%,
    #a3cb38 15%,
    #f1c40f 38%,
    #e67e22 45%,
    #e74c3c 100%
  );
}

.controles-wear {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.valor-wear {
  flex: 1;
}
.valor-wear label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.botones-wear {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.botones-wear button {
  background: #1c1c24;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5px 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
}

.botones-wear button:hover,
.botones-wear button.active {
  background: var(--accent-purple);
  color: white;
}

.controles-precio {
  display: flex;
  gap: 8px;
}

.campo-precio {
  flex: 1;
}

.campo-precio label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.campo-moneda {
  position: relative;
  display: flex;
  align-items: center;
}

.campo-moneda input {
  padding-right: 24px !important;
}

.campo-moneda .symbol {
  position: absolute;
  right: 10px;
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.envio-filtros {
  margin-top: 6px;
}

.btn-filtrar {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-purple), #5c35cc);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 9px 0;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.btn-filtrar:hover {
  box-shadow: 0 0 12px rgba(124, 77, 255, 0.5);
  transform: translateY(-1px);
}

.tarjeta-skin {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition:
    transform 0.2s,
    border-color 0.2s;
  overflow: hidden;
}

.tarjeta-skin:hover {
  transform: translateY(-3px);
  border-color: var(--accent-purple);
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.15);
}

.zona-imagen {
  padding: 8px;
  background: var(--rarity-gradient);
  flex: 1;
}

.foto-skin {
  padding: 6px;
  text-align: center;
}

.foto-skin img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.6));
}

.nombre-skin {
  font-size: 0.7rem;
  line-height: 1.3;
  margin-top: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.texto-naranja {
  color: var(--stattrak-orange);
  font-weight: 600;
}

.zona-info {
  background: rgba(0, 0, 0, 0.25);
  padding: 7px 9px;
  border-top: 1px solid var(--border-color);
}

.precio {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.barra-float {
  height: 3px;
  background: #2a2a35;
  border-radius: 2px;
  margin: 6px 0 3px;
  position: relative;
  overflow: hidden;
}

.barra-float::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #2ecc71, #f1c40f, #e74c3c);
}

.aguja-float {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: white;
  z-index: 2;
}

.paginador {
  display: flex;
  justify-content: center;
  padding: 20px 0 10px;
  width: 100%;
}

.capsula {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border-color);
}

.enlace-pagina {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 5px 12px;
  border-radius: 50px;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.enlace-pagina:hover {
  background: rgba(124, 77, 255, 0.12);
  color: var(--accent-purple);
}

.pagina-activa {
  color: white;
  font-size: 0.82rem;
  padding: 0 14px;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.pagina-activa strong {
  color: var(--accent-purple);
}

.vacio {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.casilla-personalizada {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
}

.casilla-personalizada input[type="checkbox"] {
  width: auto !important;
  cursor: pointer;
}

@media (max-width: 1400px) {
  .skins-grid {
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  }
}

@media (max-width: 900px) {
  .skins-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
  .filtros-lateral {
    width: 190px;
    min-width: 190px;
  }
}

@media (max-width: 768px) {
  .disposicion-tienda {
    flex-direction: column;
    padding: 10px;
    gap: 10px;
  }
  .filtros-lateral {
    width: 100%;
    min-width: 100%;
    position: static;
    height: auto;
    max-height: none;
    overflow-y: visible;
    margin-bottom: 5px;
  }
  .skins-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
  }
  .seccion-filtro {
    margin-bottom: 14px;
    padding-bottom: 10px;
  }
}

@media (max-width: 480px) {
  .skins-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .foto-skin img {
    height: 80px;
  }
  .nombre-skin {
    font-size: 0.65rem;
  }
  .price {
    font-size: 0.8rem;
  }
  .botones-wear {
    grid-template-columns: repeat(3, 1fr);
    row-gap: 6px;
  }
  .capsula {
    padding: 6px 12px;
  }
  .enlace-pagina,
  .pagina-activa {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
}
