/* Layout compartido — header estilo todoexiste.com live */
:root {
  --te-header-h: 72px;
}

body.has-te-header {
  padding-top: var(--te-header-h);
}

.te-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--te-header-h);
  background: rgba(22, 22, 24, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 200;
}

.te-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.te-logo img {
  display: block;
  height: 40px;
  width: auto;
}

.te-nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.te-nav .nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  position: relative;
  padding: 8px 0;
  text-decoration: none;
}

.te-nav .nav-link:hover,
.te-nav .nav-link.active {
  color: #fff;
}

.te-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--te-cta, #0071e3);
  transition: width 0.2s;
}

.te-nav .nav-link:hover::after,
.te-nav .nav-link.active::after {
  width: 100%;
}

.te-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.te-search {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 980px;
  padding: 0.45rem 1rem;
  color: #fff;
  font-size: 0.8125rem;
  width: min(180px, 28vw);
}
.te-search::placeholder { color: rgba(255, 255, 255, 0.5); }

.te-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  font-size: 1.1rem;
  position: relative;
  text-decoration: none;
  transition: background 0.2s;
}
.te-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.te-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--te-cta, #0071e3);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #000;
}

.te-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 900px) {
  :root { --te-header-h: 60px; }
  .te-menu-toggle { display: block; }
  .te-nav {
    position: fixed;
    top: var(--te-header-h);
    left: 0;
    right: 0;
    background: rgba(22, 22, 24, 0.98);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 0.75rem 1rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s;
  }
  .te-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .te-nav ul {
    flex-direction: column;
    gap: 0.25rem;
  }
  .te-search { display: none; }
}
