.main{
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  width: 100%;
}


.icon{
  width: 24px;
  height: 24px;
}


:root{
  --navbar-height: 64px;
  --accent: #0d6efd;
  --soft-border: rgba(0,0,0,0.12);
  --overlay: rgba(0,0,0,0.45);
}

*{box-sizing: border-box}

/*Navbar*/

.navbar{
  position: fixed;
  left: 0;
  right: 0;
  top: 10px;
  height: var(--navbar-height);
  margin: 0px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  pointer-events: none;
}

.navbar-inner{
  pointer-events: auto;
  width: 95%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  transition: background-color .25s ease, box-shadow .25s ease, transform .15s ease;
  background: transparent;
  backdrop-filter: blur(6px) saturate(1.05);
}

.navbar-inner.scrolled{
  background: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.nav-left,
.nav-center,
.nav-right{
  display: flex;
  align-items: center;
  gap: 10px;
}

.titulo a h1{
  margin: 0;
  font-family: "Chewy", system-ui;
  color: #00aff0;
  font-weight: 400;
  font-size: normal;
  letter-spacing: 2px;
}
.titulo a{
  text-decoration: none;
  color: inherit;
}
.navbar .titulo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}


button{
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:focus{outline: 2px solid #17b2c4 ; outline-offset: 2px;}

.desplegable button{
  display:flex;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--soft-border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.carrito button,
.perfil button{
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--soft-border);
  border-radius: 10px;
  padding: 6px 8px;
}
.perfil button a{
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 6px;
}
.perfil button a p{
  margin: 0px;
  font-family: "Chewy", system-ui;
  color: #00aff0;
  letter-spacing: 1px;
}

.buscar{
  padding: 6px 8px;
}

.icon{ width: 24px; height: 24px; display:block; }

.busqueda{
  display:flex;
  align-items:center;
  gap:8px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow .15s ease, transform .12s ease;
}

.busqueda input[type="text"]{
  width: 170px;
  max-width: 30vw;
  background-color: transparent;
  border: none;
  height: 38px;
  padding: 8px 14px;
  font-size: 14px;
}

.busqueda input[type="text"]::placeholder{
  color: rgba(0,0,0,0.4);
  background-color: transparent;
  border: none;
}

.busqueda input[type="text"]:focus{
  outline: none;
  border: none;
  background-color: transparent;
  border-color: #00aff0;
}

@media (max-width: 740px){
  .busqueda input[type="text"]{ width: 140px; }
  .titulo h1{ font-size: 18px; }
  .navbar{ top: 8px; }
}

/*Overlay*/

.overlay{
  position: fixed;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
  z-index: 1000;
}

.overlay.show{
  opacity: 1;
  visibility: visible;
}

/*Menu Lateral*/

.side-menu{
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 320px;
  max-width: 85%;
  transform: translateX(-110%);
  background: linear-gradient(180deg,#ffffff,#f8f9fb);
  box-shadow: 8px 0 30px rgba(0,0,0,0.12);
  z-index: 1000;
  transition: transform .28s cubic-bezier(.2,.9,.2,1);
  padding: 20px;
  display:flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.side-menu.show{
  transform: translateX(0);
}

.side-menu .close-row{
  display:flex;
  justify-content: space-between;
  align-items: center;
}

.side-menu h2{ margin: 6px 0 0 0; font-size: 18px; }

.menu-list{ margin: 8px 0 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px;}
.menu-list a{
  display:block;
  padding:10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #111;
  background: rgba(0,0,0,0.03);
}

.menu-list a:hover{ background: rgba(13,110,253,0.06); color: var(--accent); }

.close-x{
  font-size: 20px;
  width: 36px;
  height: 36px;
  display:inline-grid;
  place-items:center;
  border-radius: 8px;
}
.close-x:hover{ background: rgba(0,0,0,0.06); }

/*Whatsapp*/
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 20px;
  right: 20px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  box-shadow: 2px 2px 3px #999;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

/* Por defecto mostramos solo la versión de escritorio */
.navbar-mobile { display: none; }
.navbar-desktop { display: flex; }

/* En móvil (max-width 740px) invertimos */
@media (max-width: 740px) {
  .navbar{
    margin-top: 10px;
  }
  .navbar-desktop { display: none; }
  .navbar-mobile { display: flex; flex-direction: column; gap: 8px; }
  .mobile-row { display: flex; justify-content: space-between; align-items: center; }
}
