* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 16px;
}
html {
  scroll-behavior: smooth;
}

header {
  color: #ffffff;
  font-size: 1rem;
  font-family: "Silkscreen", sans-serif;
  text-align: center;
  background-color: #000000;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  height: 8.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
nav {
  padding: 0 1rem;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}
#logo-kaineos {
  height: 7rem;
  width: 7rem;
  background-image: url("../Images/Icons/Kaineos.webp");
  background-repeat: no-repeat;
  background-size: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-x, 0px) var(--shadow-y, 0px)
    var(--shadow-diffusion, 0px) rgb(206, 195, 195);
}
nav h1 {
  font-size: 3rem;
  margin: 0;
  letter-spacing: 0.01rem;
  transition: text-shadow 0.3s ease;
}
nav h1:hover {
  text-shadow: 0px 0px 3px rgb(255, 255, 255);
}

main {
  padding-top: 1rem;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}
section {
  width: 75%;
  padding: 2rem 1rem;
  margin-bottom: 2rem;
  /* Quitamos overflow: hidden para permitir que la caja de zoom se vea fuera de la sección */
}
#back-link-container {
  padding-top: 10.5rem;
  padding-left: 2rem;
  display: flex;
  justify-content: left;
  align-items: center;
}
#back-link {
  padding: 1rem;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  width: 10rem;
  font-size: 1.2rem;
  font-weight: 700;
  background-color: black;
  border-radius: 0.1rem;
  color: #ccc;
  transition: color 0.5s ease, background-color 0.5s ease;
}
#back-link:hover {
  background-color: #ccc;
  color: black;
}
#product-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  border-radius: 0.2rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}
#product-box-images {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  /* 1. Creamos un contexto de posicionamiento para la caja de zoom */
  position: relative;
  border-radius: 0.2rem;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
  padding: 0.5rem;
}
#product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
  align-items: center;
  height: 27rem;
  overflow-y: scroll;
}
.image-inactive {
  height: 3.5rem;
  width: 3.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.image-inactive:hover {
  opacity: 1;
}

#product-box-image-selected {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative; /* Necesario para posicionar la lupa dentro */
}
#product-image-selected {
  height: 27rem;
  width: 27rem;
  display: block;
  /* Añadimos una transición suave para el efecto de zoom */
  /* Ya no necesitamos la transición de transform */
}

/* Pista visual que sigue al cursor sobre la imagen */
.zoom-cursor-hint {
  position: absolute;
  width: 100px;
  height: 100px;
  background-color: rgba(255, 255, 255, 0.3);
  border: 1px solid #fff;
  display: none;
  pointer-events: none; /* Para que sea "invisible" para el mouse y que lo que el cursor haga sea sobre el elemento que esta debajo */
}

/* Caja lateral que muestra la imagen con zoom */
.zoom-display-box {
  position: absolute;
  top: 50%; /* 1. La posicionamos a la mitad de la altura del contenedor */
  left: 100%; /* Se posiciona a la derecha del contenedor de imágenes */
  margin-left: 1rem;
  width: 21.875rem;
  height: 21.875rem;
  border: 1px solid #ccc;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  background-repeat: no-repeat;
  display: none;
  pointer-events: none; /* Para que sea "invisible" para el mouse y que lo que el cursor haga sea sobre el elemento que esta debajo */
  z-index: 10; /* Para que esté por encima de otros elementos */
  transform: translateY(
    -50%
  ); /* 2. La subimos la mitad de su propia altura para centrarla */
}

#product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 75%;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
  padding: 1rem;
}
#product-name {
  font-size: 1.5rem;
}
#product-table {
  border-collapse: separate;
  border-spacing: 0.2rem;
  background-color: #ccc;
  padding: 0.5rem;
  border-radius: 0.1rem;
}
#product-table th,
#product-table td {
  text-align: center;
  width: 2rem;
  height: 1.5rem;
  padding: 0.2rem;
  border: 1px solid black;
}
#product-price {
}
#product-offer {
  font-size: 1.05rem;
  padding: 0.2rem;
  background-color: #f08f3e;
  border-radius: 0.1rem;
  transition: transform 0.5s ease;
}
#product-offer:hover {
  transform: scale(1.1);
}

/*Footer*/
footer {
  background-color: lightpink;
  padding: 2rem 1rem;
}
.footer-content {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid black;
}
.footer-right {
  text-align: right;
  border: 1px solid black;
}
.footer-logo {
  height: 4rem;
  border-radius: 0.3rem;
}
.footer-brand h4 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.social-media {
  margin-bottom: 0.5rem;
  border: 1px solid black;
  display: flex;
  gap: 1rem;
  justify-content: space-around;
}
.social-media img {
  height: 2.5rem;
  border-radius: 20%;
  transition: transform 0.3s ease;
}
.social-media img:hover {
  transform: scale(1.1);
}
.copyright {
  font-size: 0.9rem;
  color: black;
}
#whatsapp-icon-floating {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  width: 4.7rem;
  height: 4.7rem;
  transition: transform 0.3s ease;
}
#whatsapp-icon-floating img {
  height: 100%;
  width: auto;
}
#whatsapp-icon-floating:hover {
  transform: scale(1.3);
}
#th-rojo {
  background-color: red;
}
#th-naranja {
  background-color: orange;
}
#th-amarillo {
  background-color: yellow;
}
#th-verde {
  background-color: green;
}
#th-azul {
  background-color: blue;
}
#th-negro {
  background-color: black;
}
