* {
  -webkit-tap-highlight-color: transparent;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0); /* por compatibilidad */
}

/* RESET */
body {
  margin: 0;
  background-color: rgb(16, 16, 16);
  font-family: 'Montserrat', sans-serif;
  color: white;
}

/* HEADER */
.box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  width: 100%;
  top: 0;
  z-index: 10;
  background-color: #000000;
  position: fixed;
  box-sizing: border-box;
}

.area-logo {
  flex: 0 0 auto;
}

.logo {
  width: 120px;
  height: auto;
}

.contenedor-central {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 60px;
  min-width: 500px;
}

.barra-busqueda {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 40px;
  border-radius: 45px;
  padding: 2px;
  background: linear-gradient(90deg,
    rgba(236, 105, 87, 1) 0%,
    rgba(227, 9, 20, 1) 13%,
    rgba(231, 63, 16, 1) 25%,
    rgba(235, 226, 16, 1) 40%,
    rgba(32, 147, 55, 1) 55%,
    rgba(10, 74, 126, 1) 69%,
    rgba(51, 44, 109, 1) 83%,
    rgba(74, 38, 122, 1) 100%);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.icon-lupa {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  z-index: 2;
  pointer-events: none;
}

.input-busqueda {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 45px;
  background-color: #000000;
  color: white;
  padding-left: 45px;
  font-size: 15px;
  outline: none;
  box-sizing: border-box;
}

.icono-carrito {
  position: relative;
  width: 25px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  z-index: 100;
}

.icono-carrito img {
  width: 100%;
  height: auto;
  filter: none;
  cursor: pointer;
}

.contador-carrito {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #FFF200;
  font-family: "Montserrat", "sans-serif";
  color: black;
  font-size: 12px;
  font-weight: bold;
  padding: 3px 6px;
  border-radius: 50%;
  z-index: 50;
  display: block;
}

/* DISEÑO CARRITO OVERLAY */

.carrito-vacio {
  text-align: center;
  margin-top: 40px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  color: #999;
}

.item-carrito {
  display: flex;
  align-items: center;
  background-color: #1a1a1a;
  border-radius: 10px;
  margin: 15px 0;
  padding: 10px;
  gap: 12px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.04);
}

.item-carrito img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.item-detalle {
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', sans-serif;
}

.item-detalle .titulo {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.item-detalle .detalle {
  font-size: 13px;
  color: #ccc;
  font-weight: 500;
}

.item-detalle .precio {
  font-size: 13px;
  color: #FFF200;
  font-weight: 600;
}

.boton-comprar {
  margin-top: auto;
  padding: 12px;
  width: 100%;
  font-size: 15px;
  font-family: 'Montserrat-SemiBold';
  color: black;
  background-color: #FFF200;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.boton-comprar:hover {
  background-color: #e6da00;
}

/* BARRA SEPARADORA */
.barra-separacion {
  position: fixed;
  width: 100%;
  height: 4px;
  top: 86px;
  left: 0;
  background: linear-gradient(90deg,
    rgba(236, 105, 87, 1) 0%,
    rgba(227, 9, 20, 1) 13%,
    rgba(231, 63, 16, 1) 25%,
    rgba(235, 226, 16, 1) 40%,
    rgba(32, 147, 55, 1) 55%,
    rgba(10, 74, 126, 1) 69%,
    rgba(51, 44, 109, 1) 83%,
    rgba(74, 38, 122, 1) 100%);
  z-index: 10;
}

/* FILTRO ACORDEÓN */
.filtro-acordeon {
 flex: 0 0 200px;
 width: fit-content;
}

@media screen and (min-width: 769px) {
  .filtro-acordeon {
    position: sticky;
    top: 140px; /* Ajusta si tu header + separación es más o menos alto */
    align-self: flex-start;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
  }
}


.boton-filtro {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #111;
  color: white;
  border: none;
  padding: 12px 20px;
  font-size: 15px;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  border-radius: 8px;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  width: 180px;
}

.boton-filtro img {
  width: 20px;
  height: 20px;
}

.contenido-filtro {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  background-color: #111;
  border-radius: 0 0 8px 8px;
  width: 140px;
  padding: 0 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  border-top: 1px solid #222;
}

.contenido-filtro.abierto {
  max-height: 550px;
  padding: 20px;
}

.filtro-bloque {
  margin-bottom: 15px;
}

.filtro-bloque h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #ccc;
}

.filtro-bloque label {
  font-size: 13px;
  color: #eee;
  display: block;
  margin-bottom: 4px;
  cursor: pointer;
}

.opciones-talla button {
  background-color: #222;
  color: white;
  border: 1px solid #444;
  padding: 4px 8px;
  margin: 2px;
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
}

.opciones-talla button:hover {
  background-color: #333;
}

.opciones-talla button.selected {
  background-color: #FFF200;
  color: black;
  border: 1px solid #FFF200;
  font-weight: bold;
}

.campo-precio {
  width: 65px;
  padding: 4px;
  margin: 2px;
  font-size: 12px;
  border: 1px solid #444;
  background-color: #222;
  color: white;
  border-radius: 4px;
}

.precio-valor {
  font-size: 12px;
  color: #ccc;
  margin-top: 4px;
}

input[type="range"] {
  width: 100%;
  accent-color: #e50914;
  margin-top: 4px;
}

.filtro-bloque input[type="checkbox"] {
  margin-right: 6px;
}


/* TARJETAS CATALOGO */

#contenedorProductos {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  max-width: 1000px;
  margin: 0 auto;
  gap: 20px;
}

.grid-productos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  flex: 1;
  gap: 20px;
  padding: 30px 20px;
  transition: none !important;
}


.tarjeta-producto {
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.2s;
}

.tarjeta-producto:hover {
  transform: scale(1.03);
}

.tarjeta-producto img {
  width: 100%;
  height: auto;
  display: block;
}

.tarjeta-producto .info {
  padding: 10px;
}

.tarjeta-producto .nombre {
  font-size: 14px;
  color: #fff;
  margin: 8px 0;
}

.tarjeta-producto .precio {
  font-size: 13px;
  color: #aaa;
}

.contenido-catalogo-flex {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-top: 140px;
  padding: 0 20px;
}

/* Filtro se queda fijo en la izquierda */
.filtro-acordeon {
  flex: 0 0 auto;
}

/* El grid se adapta al espacio disponible */
.grid-productos {
  flex: 1;
}

.enlace-producto {
  text-decoration: none;
  color: inherit;
}

.enlace-producto:visited {
  text-decoration: none;
  color: inherit;
}

.enlace-producto:hover,
.enlace-producto:focus {
  text-decoration: none;
  color: inherit;
}



/* FOOTER */
.footer {
  background-color: #000000;
  color: white;
  text-align: center;
  padding: 30px 0 10px;
}

.footer-contenido {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-logo img {
  height: 50px;
}

.footer-info {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.footer-item img {
  height: 20px;
  width: 20px;
}

.footer-copy {
  margin-top: 15px;
  font-size: 12px;
  color: #aaa;
}

.footer-copy a {
  color: #aaa;
  text-decoration: underline;
}

.mi-enlace {
  color: white;
}

/* PANEL DEL CARRITO */
.carrito-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background-color: #0D0D0D;
  color: white;
  z-index: 9998;
  transform: translateX(100%);
  transition: transform 0.4s ease-in-out;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.carrito-panel.abierto {
  transform: translateX(0);
}

.carrito-contenido {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: 20px;
  font-family: "Montserrat";
}

.carrito-lista {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #FFF200;
}

.carrito-lista::-webkit-scrollbar {
  width: 6px;
}

.carrito-lista::-webkit-scrollbar-track {
  background: #0D0D0D;
}

.carrito-lista::-webkit-scrollbar-thumb {
  background-color: #FFF200;
  border-radius: 3px;
}

.carrito-total, .carrito-comprar {
  flex-shrink: 0;
}

.box.carrito-item {
  position: relative;
  width: 336px;
  height: 98px;
  margin: 0 auto;
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}
.box .rectangle {
  width: 336px;
  height: 98px;
  border-radius: 20px;
  position: absolute;
  top: 8px;
  left: 4px;
  border: 1px solid #fff200;
  background: #181818;
  z-index: 1;
}
.box .traje {
  position: absolute;
  width: 80px;
  height: 75px;
  top: 18px;
  left: 16px;
  object-fit: cover;
  border-radius: 20px;
  z-index: 2;
  border: none;
  background: #222;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

.carrito-menos, .carrito-mas {
  position: absolute;
  width: 22px;
  height: 22px;
  top: 74px;
  background: #181818;
  color: #FFF200;
  border: 1px solid #FFF200;
  border-radius: 5px;
  font-size: 16px;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-weight: 600;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  padding: 0;
}
.carrito-menos:hover, .carrito-mas:hover {
  background: #FFF200;
  color: #181818;
}
.carrito-menos {
  left: 232px;
}
.carrito-mas {
  left: 266px;
}
.cantidad-num {
  position: absolute;
  top: 76px;
  left: 258px;
  width: 24px;
  text-align: center;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #FFF200;
  z-index: 6;
  background: transparent;
}
.box .text-wrapper {
  position: absolute;
  width: 219px;
  top: 20px;
  left: 112px;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 14px;
  letter-spacing: 0;
  line-height: 18px;
  z-index: 3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.box .div {
  position: absolute;
  width: 6px;
  top: 76px;
  left: 270px;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 18px;
  white-space: nowrap;
  z-index: 3;
}
.box .text-wrapper-2 {
  position: absolute;
  width: 68px;
  top: 60px;
  left: 112px;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #FFF200;
  font-size: 13px;
  letter-spacing: 0;
  line-height: 44px;
  white-space: nowrap;
  z-index: 3;
}
.box .text-wrapper-3 {
  position: absolute;
  width: 68px;
  top: 42px;
  left: 112px;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #dddddd;
  font-size: 11px;
  letter-spacing: 0;
  line-height: 44px;
  white-space: nowrap;
  z-index: 3;
}
.box .text-wrapper-4 {
  position: absolute;
  width: 6px;
  top: 76px;
  left: 294px;
  font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 18px;
  white-space: nowrap;
  z-index: 3;
}
.box .rectangle-2 {
  width: 80px;
  height: 21px;
  top: 74px;
  left: 232px;
  border-radius: 5px;
  position: absolute;
  border: 1px solid #fff200;
  z-index: 2;
}
.box .icon-basura {
  position: absolute;
  width: 18px;
  height: 18px;
  top: 76px;
  left: 210px;
  cursor: pointer;
  z-index: 10;
  filter: brightness(0) saturate(100%) invert(87%) sepia(100%) saturate(7480%) hue-rotate(1deg) brightness(104%) contrast(104%);
  transition: filter 0.2s;
}
.box .icon-basura:hover {
  filter: brightness(0) saturate(100%) invert(40%) sepia(100%) saturate(7480%) hue-rotate(1deg) brightness(104%) contrast(104%);
}

.carrito-menos {
  left: 232px;
  z-index: 9;
}
.carrito-mas {
  left: 290px;
  z-index: 9;
}
.cantidad-num {
  left: 262px;
  width: 28px;
  text-align: center;
  z-index: 9;
}
.box .text-wrapper-4 {
  left: 295px;
  top: 76px;
  z-index: 8;
}

.carrito-comprar {
  width: 100%;
  padding: 13px 0;
  background: #FFF200;
  color: #181818;
  font-family: 'Montserrat SemiBold', 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  margin-top: 10px;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.carrito-comprar:hover {
  background: #ffe600;
}

.carrito-contenido h2 {
  margin-top: 0;
  font-size: 20px;
  border-bottom: 1px solid #444;
  padding-bottom: 10px;
}

.carrito-contenido p {
  font-size: 14px;
  color: #ccc;
}

/* BOTÓN DE MENÚ MÓVIL */
#botonMenu {
  position: fixed;
  top: 108px;
  left: 10px;
  z-index: 1000;
  background-color: #0D0D0D;
  border-radius: 10px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

#botonMenu img {
  width: 24px;
  height: 24px;
}

#botonMenu .texto-menu {
  display: inline-block;
  color: white;
  font-size: 14px;
  margin-left: 8px;
  font-family: 'Montserrat', sans-serif;
}

/* ADAPTACIÓN MÓVIL */
@media screen and (max-width: 768px) {
  .box {
    flex-direction: column;
    align-items: center;
    padding: 15px;
    gap: 10px;
  }

  #contenedorProductos {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 0 10px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    gap: 20px;
    box-sizing: border-box;
  }

  .contenedor-central {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
    width: 100%;
    min-width: auto;
  }

  .barra-busqueda {
    flex-grow: 1;
    max-width: 100%;
  }

  .icono-carrito {
    width: 40px;
    height: 40px;
  }

  .icono-carrito img {
    width: 24px;
    height: 24px;
  }

  .carrito-panel {
    width: 100% !important;
    max-width: 360px;
    right: 0;
  }

  .box.carrito-item {
    width: 320px !important;
    margin: 0 auto 12px !important;
  }

  .box .rectangle {
    width: 310px !important;
    left: 0 !important;
  }

  .box .traje {
    top: 28px !important;
    border-radius: 8px !important;
    width: 60px !important;
    height: 58px !important;
    left: 18px !important;
  }

  .box .text-wrapper {
    width: 140px !important;
    left: 100px !important;
  }

  .box .text-wrapper-2,
  .box .text-wrapper-3 {
    left: 100px !important;
  }
  .box .text-wrapper-4 {
    display: none !important;
  }

  .box .icon-basura {
    left: 185px !important;
    top: 76px !important;
  }

  .box .rectangle-2 {
    width: 65px !important;
    left: 205px !important;
  }

  .carrito-menos {
    left: 205px !important;
    top: 74px !important;
  }

  .carrito-mas {
    left: 256px !important;
    top: 74px !important;
  }

  .cantidad-num {
    left: 232px !important;
    top: 76px !important;
    width: 20px !important;
    height: 20px !important;
    text-align: center !important;
    line-height: 20px !important;
    font-family: 'Montserrat-SemiBold', Helvetica, Arial, sans-serif;
    font-size: 14px !important;
    color: white !important;
    position: absolute !important;
    background: transparent !important;
    z-index: 999 !important;
  }

  .box .text-wrapper-4 {
    display: none !important;
  }

  .barra-separacion {
    top: 90px;
    margin-top: 42px;
  }

  .footer-contenido {
    padding: 20px;
  }

  .footer-info {
    flex-direction: column;
    gap: 10px;
  }

  /* Grid de productos en móvil: 2 columnas */
  .grid-productos {
    margin-top: 50px !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
    justify-items: center;
  }

  #botonFiltro {
    display: flex !important;
    position: fixed;
    top: 140px;
    left: 10px;
    right: auto;
    z-index: 1001;
  }

  .filtro-acordeon {
    position: fixed !important;
    top: 170px;
    left: 10px;
    width: calc(100% - 20px);
    max-height: 80vh;
    overflow-y: auto;
    display: flex !important;
    z-index: 1000;
  }

  .filtro-acordeon.mostrar {
    display: block;
  }

  /* Oscurece un poco el fondo cuando se abre el filtro */
  .fondo-oscuro {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
  }

  .fondo-oscuro.visible {
    display: block;
  }

  .contenido-catalogo-flex {
    flex-direction: column;
    gap: 0;
    padding: 0 10px;
  }

  .contenido-filtro.abierto {
    overflow-y: auto;
  }

}
