body {
    background-color: #eeeeee;
    color: #333;
    margin: 0;
    font-family: sans-serif;
    overflow: hidden;
}

html, body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
}

img{
  width: 100%;
}
#c {
  width: 100%;
  height: 100vh;
  display: block;
}

#background{
  position: absolute;
  top:0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100vh;

}

.logo{
  max-width: 100px;
  width: 40%;
  z-index: 0;
  position: relative;
  display: block;
  text-decoration: none;
}

.tool{
  position: absolute;
    left: 3%;
    top: 50%;
    transform: translate(0, -50%);
    width: 400px;
  
}


#menu{
  position: absolute;
    top: 20%;
    right: 30px;
    max-height: 90vh;
    min-height: 395px;
    width: 90%;
    max-width: 240px;
    background-color: black;
    box-shadow: 14px 13px 0 white;
    padding: 20px;
    transform-style: preserve-3d;     /* permitir hijos en 3D */
  perspective: 800px;               /* cámara virtual */
  transition: transform 0.3s ease; 
   will-change: transform;
}

#menu > * {
  transform-style: preserve-3d;
}


#menu-title{
  color: White;
  font-size: 1.4rem;
  font-family: sans-serif;
  font-weight: bold;
  padding-bottom: 20px;
}
/* ===== Menú Colores en Retícula ===== */
#color-menu {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: 320px;
  background-color: block;
  gap: 5px;
  pad: 15px;

}

/* Swatch cuadrado */
.swatch {
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #222;
  user-select: none;
  transition: transform .1s, border-color .2s;
}
.swatch:hover {
  transform: scale(1.1);
  border-color: green;
}

/* Indicador de selección */
.swatch.selected {
  border-color: #000;
}



.isntrucctions{
  position: relative;
}

.intruction{
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  width: 100%;
  padding-bottom: 20px;
}
.intruction div{
  width: 60px;
}

.tool-menu{
  display: flex;
  width: 100%;
  gap:10px;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px ;
}

.button-tool{
  width: 50px;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.button-tool:hover {
  background-color: white;
}

.button-tool:hover img {
  filter: brightness(0);
}

.button-tool:active {
  background-color: white;
  transform: scale(0.9);
}

.button-tool:active img {
  filter: brightness(0);
}




.mobile{
    display: none;
  }
  .desktop{
    display: flex;
  }
/* Al mostrarse de nuevo */


.init-bt{
  border: 2px solid white;
  background: none;
  color: white;
  border-radius: 5px;
  padding: 5px 25px;
  font-weight: 900;
  text-transform: uppercase;
  width: 100%;
  margin-top: 15px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
  cursor: pointer;
}

.init-bt:hover {
  background-color: white;
  color: black;
}

.init-bt:active {
  background-color: white;
  color: black;
  transform: scale(0.98);
}

#size{
  position: absolute;
  bottom: 20px;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateX(-50%);

}
.sub-titulo{
  color: black;
  text-align: center;
}
.size-container{
  display: flex;
  gap: 15px;
}
.size-bt{
  width: 40px;
  background: none;
  border: none;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.size-bt:hover {
  background-color: white;
}

.size-bt:active {
  background-color: white;
  transform: scale(0.95);
}

.size-bt.selected {
  background-color: #4CAF50; /* Fondo cuando está seleccionado */
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  object-fit: contain;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #ccc;
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

.loader-text {
  font-size: 16px;
  color: #333;
  font-family: sans-serif;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


@media (max-width: 1024px) {
  .mobile{
    display: flex;
  }
  .desktop{
    display: none;
  }

  .tool{
    width: 140px;
    top: unset;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
  }

  .close{
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.1s ease;
  }

  .close:active {
    opacity: 0.7;
    transform: scale(0.9);
  }

  #burger {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 20;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

#burger:active {
  opacity: 0.7;
  transform: scale(0.95);
}

.burger-line {
  display: block;
  height: 4px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación al abrir/cerrar */
#burger.open .burger-line:nth-child(1) {
  transform: translateY(12px) rotate(45deg);
}
#burger.open .burger-line:nth-child(2) {
  opacity: 0;
}
#burger.open .burger-line:nth-child(3) {
  transform: translateY(-12px) rotate(-45deg);
}

/* Estado oculto del menú */
#menu.hidden {
  display: none !important;
}
}