/* HEADER GENERAL */
header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000; /* Above content */
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
}

.logo {
  display: flex;
  align-items: center;
}

/* Ícono del logo más discreto */
.logo i {
  font-size: 1.3rem; /* antes 2rem */
  color: var(--primary);
  margin-right: 8px;
}

.logo h1 {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 0;
}

.logo .logo-highlight {
  color: var(--secondary);
}

/* ICONOS Y NAVEGACIÓN DESKTOP */
nav {
  display: flex;
  align-items: center;
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  position: relative;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  font-size: 1rem;
  transition: var(--transition);
}

nav ul li a:hover {
  color: var(--primary);
}

nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

nav ul li a:hover::after {
  width: 100%;
}

/* === ÍCONOS DEL HEADER MÁS CHICOS === */

/* Si usás .nav-icons a (versión vieja) */
.nav-icons {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 16px;
}
.nav-icons a {
  font-size: 1.1rem;  /* antes 1.5rem */
  color: var(--dark);
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;        /* antes 36px */
  height: 32px;       /* antes 36px */
}
.nav-icons a:hover { color: var(--primary); }

/* Si usás .actions .icon-btn (tu HTML actual) */
.actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.actions .icon-btn {
  width: 32px;        /* tamaño compacto */
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  box-shadow: none;
  line-height: 1;
}
.actions .icon-btn i { font-size: 1.1rem; }  /* icono más chico */

/* Toggle menú móvil oculto en desktop */
#mobile-toggle {
  display: none;
}

/* OVERLAY OCULTO POR DEFECTO */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  z-index: 500; /* Debajo de header */
}
#overlay.active { display: block; }

/* MENÚ MÓVIL */
@media (max-width: 768px) {
  .header-container {
    padding: 8px 10px;
    justify-content: flex-start;
    gap: 10px;
  }

  /* Toggle menu icon visible y por delante */
  #mobile-toggle {
    display: block;
    font-size: 1.4rem;  /* un poco más chico que 1.8rem */
    cursor: pointer;
    order: -1;          /* aparece al inicio */
    position: relative; /* para stacking */
    z-index: 1002;      /* por encima de overlay y nav */
  }

  /* Panel lateral */
  #nav {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: var(--white);
    flex-direction: column;
    padding-top: 60px;
    gap: 15px;
    transition: left 0.3s ease;
    box-shadow: var(--shadow);
    z-index: 1001; /* Debajo de toggle */
    overflow-y: auto;
  }
  #nav.active { left: 0; }

  #nav ul {
    flex-direction: column;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
  }
  #nav ul li { margin: 0; }
  #nav ul li a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    color: var(--dark);
    text-decoration: none;
  }

  /* Logo y texto más pequeño */
  .logo h1 { font-size: 1.3rem; }
}

/* Dropdown de perfil moderno (igual que tenías) */
.profile-wrapper { position: relative; display: inline-block; }
#profileDropdown.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 260px;
  background: var(--white) !important;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  z-index: 1000;
  overflow: hidden;
}
#profileDropdown.profile-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 16px;
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent var(--white) transparent;
}
#profileDropdown.profile-dropdown.show {
  display: block;
  animation: fadeInDown 0.2s ease-out forwards;
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-5px); }
  to   { opacity: 1; transform: translateY(0); }
}
#profileDropdown .dropdown-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
#profileDropdown .dropdown-content p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.4;
}
#profileDropdown .dropdown-content p strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
#profileDropdown .dropdown-content .btn-logout {
  display: inline-block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  text-align: center;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
#profileDropdown .dropdown-content .btn-logout:hover {
  background: var(--secondary);
  transform: translateY(-1px);
}

/* Modal de perfil en móviles pequeños */
@media (max-width: 600px) {
  #profileDropdown.profile-dropdown {
    position: fixed;
    top: 10%;
    left: 10%;
    width: 80%;
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  }
  #profileDropdown.profile-dropdown::before { display: none; }
  #profileDropdown .dropdown-content .btn-logout {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
  }
}

/* Overlay genérico */
#overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 100;
}
#overlay.active { display: block; }

/* Botón especial (sin cambios) */
.btn-tienda-global {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #207cca;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(32, 124, 202, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-tienda-global:hover {
  background-color: #1a6bb0;
  box-shadow: 0 6px 18px rgba(32, 124, 202, 0.3);
}
.btn-tienda-global:active {
  background-color: #17467e;
  box-shadow: 0 2px 8px rgba(32, 124, 202, 0.2);
}
.btn-tienda-global i {
  font-size: 1rem;
  transition: color 0.3s ease;
}
.btn-tienda-global:hover i { color: #e0f0ff; }