
.navbar {
    background-color: #2c3e50;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* === LOGO === */
.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

.logo-initial {
    font-size: 3rem;
}

.logo-text {
    margin-left: 4px;
    font-size: 0.9rem;
}

.logo-brand {
    margin-left: 6px;
    color: #e74c3c;
    font-size: 2.5rem;
}

/* === BUSCADOR === */
.search-bar {
    display: flex;
    align-items: center;
    background-color: #415a70;
    border-radius: 40px;
    padding: 6px 10px;
    width: 250px;
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    padding: 6px;
}

.search-bar button {
    border: none;
    background-color: #ffeb3b;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
}

/* === LINKS === */
.nav-links {
    list-style: none;
    display: flex;
    gap: 18px;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-weight: 500;
}

.nav-links a:hover {
    color: #ffeb3b;
}

/* === ACCIONES === */
.nav-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    background-color: #415a70;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
}

.icon-btn:hover {
    background-color: #546b83;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
}
/* === HAMBURGUESA === */
.hamburger {
  display: none;
  width: 32px;
  height: 24px;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  position: absolute;
  height: 3px;
  width: 100%;
  background: white;
  left: 0;
  transition: all 0.3s ease;
}

/* Posiciones */
.hamburger span:nth-child(1) {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 10px;
}

.hamburger span:nth-child(3) {
  bottom: 0;
}

/* === ESTADO ACTIVO (X) === */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  top: 10px;
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  bottom: 10px;
}



/* === MOBILE === */
@media (max-width: 900px) {

  .search-bar {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 80px; /* altura navbar */
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
  }

  .nav-actions {
    flex-direction: column;
    gap: 10px;
  }
}



.carrito-btn {
  position: relative;
}

.carrito-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: #f44040;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}


@media (max-width: 900px) {
    .search-bar {
        display: none;
    }

    .navbar-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}