/* =========================================================
   OLA AND OAK — HEADER (barra superior, barra principal, mega-menú, drawer móvil)
   Reemplaza Elementor + ElementsKit. Medidas tomadas del sitio en vivo.
   Los estilos INTERNOS de cada panel están en mega.css (generado).
   ========================================================= */

/* ---------- barra superior ---------- */
.oa-topbar { background: #000; color: #fff; }
.oa-topbar__inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 80px; min-height: 35px; box-sizing: border-box;
}
.oa-topbar__list { display: flex; gap: 16px; margin: 0; padding: 0; list-style: none; }
.oa-topbar__list li { font: 400 12px/18px Inter, sans-serif; color: #fff; }

/* ---------- barra principal ---------- */
.oa-header { position: relative; z-index: 1001; background: #fff; border-bottom: 1px solid #e9e5df; }
.oa-header__bar {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 10px 80px 15px; box-sizing: border-box;
}
.oa-header__logo { display: block; justify-self: start; width: 112px; line-height: 0; }
.oa-header__logo img { display: block; width: 112px; height: auto; }

.oa-nav { justify-self: center; }
.oa-nav__list { display: flex; justify-content: center; margin: 0; padding: 0; list-style: none; }
.oa-nav__item { position: static; }
.oa-nav__link {
  appearance: none; -webkit-appearance: none; background: none !important; border: 0 !important; box-shadow: none;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  padding: 0 15px; height: 30px;
  font: 500 15px/22.5px Inter, ui-sans-serif, system-ui, sans-serif; color: #000 !important;
  border-radius: 0; text-transform: none; letter-spacing: normal;
}
.oa-nav__link:hover, .oa-nav__link:focus-visible, .oa-nav__item.is-open > .oa-nav__link { color: #000 !important; background: none !important; }
.oa-nav__link:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.oa-nav__chev { transition: transform .2s ease; flex: none; }
.oa-nav__item.is-open .oa-nav__chev { transform: rotate(180deg); }

a.oa-header__cta {
  justify-self: end; display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 20px; border-radius: 999px; background: #000 !important; color: #fff !important;
  border: 1px solid #000; text-decoration: none; text-transform: uppercase; white-space: nowrap;
  font: 700 15px/17px Inter, sans-serif; letter-spacing: 2px;
}
a.oa-header__cta:hover, a.oa-header__cta:focus-visible { background: #222 !important; color: #fff !important; }

.oa-header__burger {
  display: none; justify-self: end; appearance: none; background: none !important; border: 0 !important;
  padding: 4px; margin: 0; cursor: pointer; color: #111 !important; line-height: 0;
}

/* ---------- paneles del mega-menú ---------- */
.oa-panel {
  display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 1100;
  background: #fff; max-height: calc(100vh - 140px); overflow-y: auto;
  border-top: 1px solid #e9e5df; box-shadow: 0 24px 50px rgba(4, 30, 48, .15);
}
.oa-nav__item.is-open > .oa-panel { display: block; }
.admin-bar .oa-panel { max-height: calc(100vh - 172px); }

/* Header & Mega Menu Safeguards - Protect against page CSS leaks */
#oa-header, #oa-header *, .oa-panel, .oa-panel * {
  box-sizing: border-box;
}
.oa-panel section {
  padding: 0 !important;
  margin: 0 !important;
}
.oa-panel button {
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

/* Base tipográfica de los paneles. En el sitio en vivo los títulos heredaban una regla global de la
   página (Source Sans 3, tracking -0.035em); aquí se fija dentro del header para que no dependa
   del CSS de cada página. mega.css se carga después y sus reglas por id siguen ganando. */
.oa-panel h1, .oa-panel h2, .oa-panel h3 {
  font-family: "Source Sans 3", Arial, sans-serif; letter-spacing: -.035em; line-height: 1.02; margin-top: 0;
}
.oa-panel h3 { line-height: 1.15; }
#productsMega .mega-intro .btn {
  padding: 12px 18px; font: 700 13px/13px Inter, ui-sans-serif, system-ui, sans-serif; border-radius: 0;
}

/* ---------- drawer móvil ---------- */
.oa-dr { position: fixed; inset: 0; z-index: 100000; background: #fff; display: flex; flex-direction: column; }
.oa-dr[hidden] { display: none; }
.oa-dr__top { display: flex; align-items: center; justify-content: space-between; padding: 8px 20px; border-bottom: 1px solid #e9e5df; flex: none; }
.oa-dr__logo { display: block; width: 56px; line-height: 0; }
.oa-dr__logo img { width: 56px; height: auto; display: block; }
.oa-dr__close { appearance: none; background: none !important; border: 0 !important; padding: 6px; cursor: pointer; color: #111 !important; line-height: 0; }
.oa-dr__scroll { flex: 1; overflow-y: auto; padding: 8px 20px 40px; -webkit-overflow-scrolling: touch; }

.oa-dr__item { border-bottom: 1px solid #e9e5df; }
.oa-dr__item > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; font: 600 17px/1.3 Inter, sans-serif; color: #111;
}
.oa-dr__item > summary::-webkit-details-marker { display: none; }
.oa-dr__item > summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: #111; margin-left: 12px; }
.oa-dr__item[open] > summary::after { content: "\2212"; }
.oa-dr__item--sub { border-bottom: 0; }
.oa-dr__item--sub > summary { padding: 11px 0; font-size: 15px; font-weight: 700; }
.oa-dr__body { padding: 0 0 14px; }
.oa-dr__item--sub > .oa-dr__body { padding: 0 0 8px 14px; }
.oa-dr__h { margin: 14px 0 4px; font: 800 11px/1.3 Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #5f6e76; }
.oa-dr__link { display: block; padding: 8px 0; font: 400 15px/1.35 Inter, sans-serif; color: #1d2b34 !important; text-decoration: none; }
.oa-dr__link--plain { color: #5f6e76 !important; }
a.oa-dr__link:hover { color: #000 !important; }
a.oa-dr__cta {
  display: flex; align-items: center; justify-content: center; margin-top: 24px; padding: 14px 20px;
  border-radius: 999px; background: #000 !important; color: #fff !important; text-decoration: none;
  font: 700 14px/1 Inter, sans-serif; letter-spacing: 2px; text-transform: uppercase;
}

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .oa-topbar__inner { padding-left: 32px; padding-right: 32px; }
  .oa-header__bar { padding-left: 32px; padding-right: 32px; }
  .oa-nav__link { padding: 0 10px; font-size: 14px; }
  a.oa-header__cta { padding: 11px 16px; font-size: 13px; letter-spacing: 1.2px; }
}
@media (max-width: 1024px) {
  .oa-nav { display: none; }
  .oa-header__bar { grid-template-columns: auto 1fr auto; padding: 8px 32px; }
  .oa-header__logo, .oa-header__logo img { width: 64px; }
  a.oa-header__cta { justify-self: end; grid-column: 2; margin-right: 18px; }
  .oa-header__burger { display: inline-flex; grid-column: 3; }
}
@media (max-width: 767px) {
  .oa-topbar { display: none; }
  a.oa-header__cta { display: none; }
  .oa-header__bar { padding: 4px 20px; }
  .oa-header__logo, .oa-header__logo img { width: 46px; }
  .oa-header__burger { grid-column: 3; }
}
@media (min-width: 1025px) { .oa-dr { display: none !important; } }

/* About Mega Panel Display Safeguards */
#aboutMega .about-mega-panel {
  display: none !important;
}
#aboutMega .about-mega-panel.active {
  display: block !important;
}
