:root {
  --bg: #ffffff;
  --card: #171a21;
  --text: #eaeaea;
  --muted: #b5b5b5;
  --primary: #ff6600;
}
/* BASE */
body {
  margin: 0;
  font-family: "Roboto", sans-serif;
  background: var(--bg);
  color: var(--text);
}
/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* NAVBAR GENERAL */
.navbar {
  width: 100%;
  background: #111827;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 25px;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* IZQUIERDA */
.nav-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* LOGO */
.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.logo-img {
  width: 45px;
  height: 45px;
  object-fit: contain;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
}

/* BOTON HAMBURGUESA */
.menu-toggle {
  background: #ff5a00;
  color: white;

  border: none;

  width: 45px;
  height: 45px;

  font-size: 24px;

  border-radius: 8px;

  cursor: pointer;

  transition: 0.3s;
}

.menu-toggle:hover {
  background: #e14d00;
}

/* LOGO */
.logo {
  font-size: 24px;
  font-weight: bold;
  color: #ff5a00;
  white-space: nowrap;
}

/* SEARCH */
.nav-search {
  flex: 1;

  display: flex;
  align-items: center;

  min-width: 250px;
}

.nav-search input {
  width: 100%;
  padding: 12px;

  border: 1px solid #ccc;
  border-right: none;

  border-radius: 8px 0 0 8px;

  outline: none;
}

.nav-search button {
  padding: 12px 20px;

  background: #ff5a00;
  color: white;

  border: none;

  border-radius: 0 8px 8px 0;

  cursor: pointer;
}

/* DERECHA */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* CUENTA */
.cuenta-btn {
  cursor: pointer;
  font-weight: 500;
}

/* CARRITO */
.carrito-icon {
  position: relative;

  font-size: 24px;

  cursor: pointer;
}

#contador-carrito {
  position: absolute;

  top: -8px;
  right: -10px;

  background: red;
  color: white;

  font-size: 11px;

  padding: 3px 7px;

  border-radius: 50%;
}

/* OVERLAY */
.overlay {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: rgba(0, 0, 0, 0.5);

  opacity: 0;
  visibility: hidden;

  transition: 0.3s;

  z-index: 999;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* SIDEBAR */
.sidebar-menu {
  position: fixed;

  top: 0;
  left: -320px;

  width: 320px;
  height: 100vh;

  background: #111827;
  color: #eaeaea;
  z-index: 1000;

  transition: 0.3s;

  overflow-y: auto;
}

.sidebar-menu.active {
  left: 0;
}

/* HEADER MENU */
.menu-header {
  padding: 20px;

  background: #ff5a00;
  color: white;

  font-weight: bold;
}

/* ITEMS MENU */
.sidebar-menu ul {
  list-style: none;
}

.sidebar-menu li {
  padding: 15px 20px;

  border-bottom: 1px solid #eee;

  cursor: pointer;
}

.sidebar-menu li:hover {
  background: #f7f7f7;
}

/* TABLET */
@media (max-width: 992px) {
  .navbar {
    gap: 15px;
  }

  .logo {
    font-size: 20px;
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-left,
  .nav-right {
    width: 100%;
    justify-content: space-between;
  }

  .nav-search {
    width: 100%;
    order: 3;
  }
}

/* CELULARES PEQUEÑOS */
@media (max-width: 480px) {
  .logo {
    font-size: 18px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .nav-search input,
  .nav-search button {
    padding: 10px;
  }
}

/******** CONTENEDOR USER ********/
.nav-user-dropdown {
  position: relative;
}

/******** BOTON ********/
.user-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #faf6f6;
}

/******** MENU ********/
.dropdown-menu {
  position: absolute;
  top: 45px;
  right: 0;
  background: #fff;
  min-width: 200px;
  max-width: 90vw;

  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  border-radius: 12px;

  overflow: hidden;
  display: none;
  z-index: 9999;
}

/******** LINKS ********/
.dropdown-menu a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  transition: 0.3s;
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: #f5f5f5;
}

/******** DESKTOP HOVER ********/
.nav-user-dropdown:hover .dropdown-menu {
  display: block;
}

@media (max-width: 768px) {
  .dropdown-menu {
    right: auto;
    left: 50%;
    transform: translateX(-50%);

    min-width: 180px;
    width: max-content;
    max-width: 95vw;
  }
}

.dropdown-menu.show {
  display: block;
}

/* SIDEBAR FIX GENERAL */
.sidebar-menu {
  background: #0f1115;
  color: #eaeaea;
}

/* TITULOS DE SECCIONES EN SIDEBAR */
.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* separa cada bloque */
.sidebar-menu ul + ul {
  margin-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 10px;
}

/* HEADER tipo "Comprar por" */
.sidebar-menu ul::before {
  content: attr(data-title);
  display: block;
  padding: 10px 20px;
  font-size: 12px;
  color: #ff6600;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ITEMS */
.sidebar-menu li {
  padding: 12px 20px;
  cursor: pointer;
  color: #eaeaea;
  transition: 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu li:hover {
  background: rgba(255,102,0,0.15);
  color: #ff6600;
}