/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-color: #111; /* color base */
}

/* ================= OVERLAY Y RUIDO ================= */
body::before {
  content: '';
  position: fixed;       /* fijo para que no se mueva */
  inset: 0;              /* cubre toda la pantalla */
  z-index: 0;
  pointer-events: none;  /* no bloquea clicks */

  /* Fondo con overlay oscuro y la imagen */
  background: 
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), /* overlay oscuro */
    url('assets/noise.png') no-repeat center / cover;    /* imagen centrada, solo una vez */
}

/* ================= HEADER ================= */
header {
  padding: 30px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 2000;

  /* Fondo con fade real al fondo */
  background: linear-gradient(
    to bottom,
    rgba(74, 74, 74, 0) 100%,    /* totalmente transparente arriba */
    rgba(17,17,17,0.3) 60%, /* empieza a aparecer el color */
    rgba(17,17,17,0.6) 20%, /* más visible en mitad */
    rgba(17,17,17,0.75) 0% /* totalmente opaco abajo */
  );

  backdrop-filter: blur(12px); /* vidrio esmerilado */
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);

  /* Transición suave si querés animar scroll */
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}


header h1 {
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  text-align: center;
  text-shadow: 0 0 25px rgba(255,255,255,0.45);
  position: relative;
  z-index: 1;
}

header .back {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: #aaa;
  transition: color 0.3s;
  position: absolute;
  left: 40px;
}

header .back:hover {
  color: #fff;
}

/* ================= SHOP ================= */
.shop {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 30px;
  position: relative;
  z-index: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 50px;
  row-gap: 40px;
  padding: 30px 0;
  justify-items: start;
}

/* ================= PRODUCT ================= */
.product {
  text-decoration: none;
  color: #fff;
  transition: transform 0.4s ease, opacity 0.4s ease;
  position: relative;

}

.product:hover {
  transform: translateY(-4px);
}

.product .image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product .image .shadow-wrap {
  width: 80%;
  height: 80%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;

  filter: drop-shadow(0 16px 28px rgba(82, 82, 82, 0.65));
}


.product .image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.35s ease, transform 0.4s ease;
}

.product .image img.second {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}


.product:hover .image img.second {
  opacity: 1;
  transform: scale(1.05);
}
.product:hover .image img.first {
  opacity: 0;
  transform: scale(1.05);
}

.product:hover .image img {
  transform: scale(1.05);
}
/* Overlay suave en hover */
.product .image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
}

.product:hover .image::after {
  background: rgba(255,255,255,0.08);
}

/* Texto con gradient */
.product h2,
.info h2 {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  margin-top: 5px;
  background: linear-gradient(90deg, #fff, #aaa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.product p {
  font-size: 0.7rem;
  color: #777;
}

/* ================= STOCK ================= */
.stock {
  margin-top: 4px;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.stock.in { color: #aaa; }
.stock.out { color: #555; }

/* ================= FOOTER ================= */
footer {
  position: relative; /* necesario para z-index */
  z-index: 1;         /* encima del overlay */
  margin-top: auto;
  padding: 60px 0;
  text-align: center;
  text-shadow: 0 0 25px rgba(255, 255, 255, 0.35);
}


/* ================= MENU ================= */
.menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
  position: absolute;
  left: 40px;
  z-index: 5000;
}

.menu-icon div {
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.menu {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100%;
  background: #111;
  padding: 60px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: left 0.3s ease;
  z-index: 6000;
}

.menu.active { left: 0; }

.menu ul { list-style: none; }

.menu ul li { margin-bottom: 20px; }

.menu ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.1em;
}

.menu .instagram a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}

.close-menu {
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  position: absolute;
  top: 20px;
  right: 20px;
}

.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 5500;
}

.menu-overlay.active { display: block; }

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
    column-gap: 30px;
    row-gap: 30px;
  }
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
    row-gap: 25px;
    padding: 20px;
  }
}

@media (max-width: 500px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* 2 productos por fila */
    column-gap: 30px;   /* espacio horizontal entre productos */
    row-gap: 15px;      /* espacio vertical entre filas */
    padding: 10px 0;
  }

  .product .image {
    aspect-ratio: 1 / 1; /* mantiene cuadrado */
    max-height: 150px;   /* más pequeño para que entren 2 filas en la pantalla */
  }

  .product h2 {
    font-size: 0.7rem;
  }

  .product p {
    font-size: 0.6rem;
  }
  footer {
    padding: 30px 0;      /* menos aire vertical */
    font-size: 0.6rem;    /* achica el texto */
    letter-spacing: 0.15em;
  }
  .product .image .shadow-wrap {
    filter: drop-shadow(0 6px 12px rgba(82, 82, 82, 0.45));
  } 
  .product img {
  filter: contrast(0.95) brightness(0.98);
}

}
@media (hover: none) and (pointer: coarse) {

  .product:hover {
    transform: none;
  }

  .product:hover .image::after {
    background: transparent;
  }

  .product:hover .image img.first,
  .product:hover .image img.second {
    opacity: 1;
    transform: none;
  }


  .product:active {
    transform: scale(0.97);
    opacity: 0.9;
  }
}
