@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;700&family=Lilita+One&display=swap');

html,
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  overflow-x: hidden;
}

/* HEADER */
.menu-superior {
  width: 100%;
  top: 0;
  left: 0;
  background-color: #28ce93;
  padding-block: 15px;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* CONTENEDOR PRINCIPAL */
.menu-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* LOGO */
.menu-logo {
  width: 110px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

.menu-logo:hover {
  transform: scale(1.05);
}


.right-header nav ul {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  list-style: none;
  gap: 40px;
}

.right-header nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8vw;
  position: relative;
  padding-bottom: 5px;
  border-bottom: 2px solid transparent;
  transition: border-bottom 0.3s ease;
}

.right-header nav ul li:not(:last-child) a:hover {
  border-bottom: 0.3vh solid white;
}

.right-header nav ul li a.active {
  border-bottom: 0.3vh solid white;
}

/* ICONOS */
.icon-user {
  width: 25px;
  height: auto;
  object-fit: contain;
}

.icon-cart-menu {
  width: 50px;
  height: auto;
  object-fit: contain;
  margin-right: 6px;
}

.cart-link {
  position: relative;
  display: inline-block;
}

.cart-total {
  position: absolute;
  top: -7px;
  right: -5px;
  background: #fff;
  color: #333;
  border-radius: 54%;
  min-width: 12px;
  height: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  border: 2px solid #eee;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  z-index: 2;
  padding: 0 5px;
}

/* HAMBURGUESA */
.menu-hamburger {
  display: block;
  cursor: pointer;
}

.hamburger-icon {
  font-size: 30px;
  color: white;
}

/* Offcanvas carrito */
.offcanvas-carrito {
  position: fixed;
  top: 0;
  right: -350px;
  width: 320px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  transition: right 0.3s;
  display: flex;
  flex-direction: column;
}

.offcanvas-carrito.active {
  right: 0;
}

.offcanvas-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 10px 20px;
  border-bottom: 1px solid #eee;
}

.offcanvas-title {
  font-size: 1.2em;
  font-weight: bold;
}

.cerrar-offcanvas {
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: #888;
}

.offcanvas-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
}

.offcanvas-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.offcanvas-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1em;
}

.btn-ver-carrito {
  display: block;
  width: 100%;
  background: #1e88e5;
  color: #fff;
  text-align: center;
  padding: 10px 0;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 10px;
}

/* OVERLAY MENÚ MÓVIL */
.overlay-menu {
  position: fixed;
  inset: 0;
  background-color: #28ce93;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 50%;
  padding-bottom: 40px;
  z-index: 2000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.overlay-menu.active {
  display: flex;
}

/* CABECERA CIERRE */
.overlay-header {
  position: absolute;
  top: 20px;
  right: 25px;
}

.close-menu {
  font-size: 2rem;
  color: white;
  cursor: pointer;
}

/* ENLACES DEL OVERLAY */
.overlay-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  padding: 0;
  margin: 0;
  width: 100%;
}

.overlay-links li a {
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  text-decoration: none;
}

.overlay-links .icon-user,
.overlay-links .icon-cart-menu {
  display: block;
  margin: 0 auto;
}


/* ESCRITORIO */
@media (min-width: 968px) {
  .menu-hamburger {
    display: none;
  }

  .menu-links {
    display: flex;
    align-items: center;
  }

  /* HEADER */
  body.index-page .menu-superior {
    display: none;
  }
}
