/* ==========================
   HEADER (header_geo.php)
   ========================== */

/* === HEADER === */
header {
  display: flex;
  flex-direction: column;
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Nivel superior: logo + redes sociales */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5%;
  background: #000;
}

/* LOGO */
.header-top .logo-link img {
  width: clamp(100px, 12vw, 160px);
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}
.header-top .logo-link img:hover {
  transform: scale(1.06);
}

/* Redes */
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-left: 15px;
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}
.social-icons a:hover {
  transform: scale(1.4);
  color: #f3b334;
}

/* Nivel inferior: banner nav + iconos */
.banner-nav {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 5%;
  background: #000;
}

/* Links nav */
.banner-nav nav {
  display: flex;
  justify-content: center;
  flex: 1;
  gap: 25px;
}

.banner-nav nav a {
  text-decoration: none;
  color: #fff;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.banner-nav nav a:hover {
  color: #2b2b2b;
}

/* Iconos header */
.banner-nav .icons {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.banner-nav .icons a,
.banner-nav .icons i {
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}

.banner-nav .icons a:hover,
.banner-nav .icons i:hover {
  transform: scale(1.1);
  color: #000;
}

/* ==========================
   HAMBURGER (RESPONSIVE)
   ========================== */

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  height: 3px;
  width: 25px;
  background: #fff;
  margin: 4px 0;
  border-radius: 2px;
}

#nav.active {
  display: flex;
  flex-direction: column;
}

/* ==========================
   BUSCADOR (HEADER)
   ========================== */

.banner-nav .icons .search-container{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ícono siempre clickeable */
.banner-nav .icons .search-container #search-toggle{
  position: relative;
  z-index: 3;
  cursor: pointer;
}

/* Input colapsado */
.banner-nav .icons .search-container input{
  position: relative;
  z-index: 2;
  width: 0;
  opacity: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
  background: #fff;
  color: #000;
  outline: none;
  transition: width .28s ease, opacity .18s ease, padding .18s ease, border-color .18s ease;
  border-radius: 999px; /* redondeado aunque esté cerrado */
}

.banner-nav .icons .search-container input::placeholder{ color:#666; }

/* Input abierto (mejorado) */
.banner-nav .icons .search-container.active input{
  width: 240px;
  opacity: 1;
  padding: 9px 12px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 999px;
  pointer-events: auto;
  box-shadow: 0 10px 26px rgba(0,0,0,.15);
}

/* Dropdown resultados (mejorado) */
.banner-nav .icons .search-results{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(560px, 88vw);
  background: #fff;
  color: #111;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(0,0,0,.25);
  padding: 10px;
  display: none;
  z-index: 3000;
  max-height: 360px;
  overflow: auto;
}

/* Scroll discreto (opcional) */
.banner-nav .icons .search-results::-webkit-scrollbar{ width: 10px; }
.banner-nav .icons .search-results::-webkit-scrollbar-thumb{
  background: rgba(0,0,0,.18);
  border-radius: 10px;
  border: 3px solid #fff;
}

.banner-nav .icons .search-results.open{ display:block; }

/* Items tipo tarjeta */
.banner-nav .icons .search-results .search-item{
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  padding: 12px 12px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.06);
  background: #fff;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.banner-nav .icons .search-results .search-item + .search-item{
  margin-top: 8px;
}

.banner-nav .icons .search-results .search-item:hover{
  background: #f7f7f7;
  border-color: rgba(243,179,52,.35);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
  transform: translateY(-1px);
}

/* Título: SIEMPRE visible */
.banner-nav .icons .search-results .search-title{
  color: #111 !important;
  font-weight: 800;
  font-size: .98rem;
  line-height: 1.15;
  letter-spacing: .1px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SKU: gris */
.banner-nav .icons .search-results .search-sku{
  color: #6f6f6f;
  font-size: .84rem;
  line-height: 1.2;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Sin resultados */
.banner-nav .icons .search-results .search-empty{
  padding: 12px 12px;
  color: #666;
  font-size: .92rem;
}

/* ==========================
   LOGIN DROPDOWN
   ========================== */

.login-dropdown { position: relative; }
.login-dropdown.active{ display: flex; }

.login-menu {
  display: none;
  position: absolute;
  top: 40px;
  right: 0;
  background: #fff;
  color: #333;
  border-radius: 12px;
  padding: 12px 18px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
}

.login-dropdown.active .login-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.login-menu a {
  display: block;
  text-decoration: none;
  color: #000 !important;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.18s ease, transform 0.12s ease;
}

.login-menu a:hover {
  color: #f3b334 !important;
  transform: scale(1.03);
}

/* ==========================
   RESPONSIVE NAV (solo header)
   ========================== */

@media (max-width: 768px) {
  .banner-nav nav {
    display: none;
    flex-direction: column;
    gap: 15px;
    background: #222;
    padding: 15px;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
  }
  #nav.active { display: flex; }
  .hamburger { display: flex; }
}



/* ==========================
   CARRITO: badge contador
   ========================== */
   .banner-nav .icons .cart-link{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  
  .banner-nav .icons .cart-badge{
    position: absolute;
    top: -7px;
    right: -9px;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f3b334;
    color: #000;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0,0,0,.25);
    border: 1px solid rgba(0,0,0,.10);
  }