/* ====== TPC Header — Scope aislado ====== */
header.tpc-header {
  --tpc-h: 56px;
  --tpc-bg-start: #446ad1;
  --tpc-bg-end:   #3454b4;
  --tpc-fg: #ffffff;
  --tpc-ink: #1b2a57;
  --tpc-shadow: 0 6px 12px rgba(25,41,88,.18);

  position: fixed !important;
  inset: 0 0 auto 0 !important;
  height: var(--tpc-h) !important;
  z-index: 10000 !important; /* por encima del header existente */
  display: block !important;
  font-family: inherit !important;
}

header.tpc-header .tpc-header__bar{
  height: 100% !important;
  background: linear-gradient(135deg, var(--tpc-bg-start) 0%, var(--tpc-bg-end) 100%) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: .5rem .75rem !important;
  box-sizing: border-box !important;
}

.tpc-header__left{
  display: flex;
  align-items: center;
  gap: .5rem;
}

.tpc-header__logo{
  height: 40px;
  width: auto;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.tpc-header__brand{
  color: var(--tpc-fg);
  font-weight: 600;
  white-space: nowrap;
}

/* Menú desktop (clase solicitada: .header-menu) */
.header-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
}

header.tpc-header .header-menu__link{
  color: var(--tpc-fg) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}
header.tpc-header .header-menu__link:hover,
header.tpc-header .header-menu__link:focus{
  color: #ffffff !important;
  text-decoration: none !important;
  background-color: #ffa500 !important; /* naranja clarito */
  padding: 0.5rem 1rem !important;
  border-radius: 0.5rem !important;
}

/* Lado derecho */
.tpc-header__right{
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* WhatsApp (clase solicitada: .header-whatsapp) */
header.tpc-header .header-whatsapp{
  display: inline-flex !important;
  align-items: center !important;
  gap: .4rem !important;
  background: #25D366 !important;
  color: #0b2a14 !important;
  border-radius: 999px !important;
  padding: .35rem .6rem !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}
header.tpc-header .header-whatsapp:hover{
  color: #ffffff !important;
  text-decoration: none !important;
}
header.tpc-header .header-whatsapp__icon{ display: block !important; }
header.tpc-header .header-whatsapp__text{ letter-spacing: .2px !important; }

/* Auth */
header.tpc-header .tpc-header__auth{ display: flex !important; gap: .5rem !important; }
header.tpc-header .tpc-header__auth-btn{
  color: var(--tpc-fg) !important;
  display: inline-flex !important;
  padding: 0.5rem !important;
  border-radius: 0.5rem !important;
  transition: all 0.3s ease !important;
}
header.tpc-header .tpc-header__auth-btn:hover{
  color: #ffffff !important;
  background-color: #ffa500 !important; /* naranja clarito */
  text-decoration: none !important;
}

/* Hamburguesa (solo visible en móvil via media query) */
.tpc-header__hamb{
  display: none;
  background: transparent;
  border: 0;
  color: var(--tpc-fg);
  padding: .35rem;
  border-radius: .5rem;
  line-height: 0;
}
.tpc-header__hamb-line{
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tpc-fg);
  margin: 4px 0;
  border-radius: 2px;
}

/* Menú móvil contenedor */
.tpc-header__mobile{
  position: fixed;
  top: var(--tpc-h);
  left: 0;
  right: 0;
  background: #f7f9ff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: var(--tpc-shadow);
  z-index: 59; /* debajo del bar */
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

/* Contenido del menú móvil */
.tpc-header__mobile-nav{
  display: flex;
  flex-direction: column;
  padding: .5rem .75rem;
}
header.tpc-header .tpc-header__mobile-link{
  padding: .7rem 0 !important;
  color: var(--tpc-ink) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}
header.tpc-header .tpc-header__mobile-link:focus,
header.tpc-header .tpc-header__mobile-link:hover{
  color: #ffffff !important;
  text-decoration: none !important;
}
.tpc-header__mobile-wa{
  margin-top: .4rem;
  display: inline-flex;
  align-items: center;
  background: #25D366;
  color: #0b2a14;
  text-decoration: none;
  border-radius: .8rem;
  padding: .6rem .8rem;
  font-weight: 800;
}

/* Estado abierto (activado solo por JS dentro del header) */
.tpc-header.is-open .tpc-header__mobile{
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ====== MEDIA QUERIES (SOLO DEL HEADER) ====== */
@media (max-width: 1024px){
  .tpc-header__brand{ display: none; }
}

@media (max-width: 920px){
  .header-menu{ display: none !important; }
  .tpc-header__hamb{ display: inline-flex; }
  .tpc-header__wa{ display: none; } /* el botón grande va dentro del panel móvil */
}

/* Offset para que el contenido no quede oculto por el header fijo */
.tpc-main-offset { padding-top: 56px; }
