/* ==========================================================================
   Oxton Education — Header público (topbar + header principal) · SaaS
   ========================================================================== */
:root{
  --ox-h-primary:#3335d8; --ox-h-primary-dark:#25278f; --ox-h-primary-soft:#eef0ff;
  --ox-h-dark:#101223; --ox-h-text:#1f2937; --ox-h-muted:#6b7280;
  --ox-h-border:#e5e7eb; --ox-h-bg:#f6f8fc; --ox-h-white:#fff;
}

.oxton-site-header{position:sticky;top:0;z-index:9000;background:#fff}
.oxton-site-header .oxton-container{width:100%;max-width:var(--ox-container,1200px);padding-left:24px;padding-right:24px;box-sizing:border-box;margin-left:auto;margin-right:auto}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ===== TOPBAR ===== */
.oxton-topbar{background:linear-gradient(90deg,#3335d8 0%,#25278f 100%);color:#fff;border-bottom:1px solid rgba(255,255,255,.12)}
.oxton-topbar-inner{min-height:54px;display:flex;align-items:center;justify-content:flex-start}
.oxton-topbar-nav{display:flex;align-items:center;gap:6px;width:100%;flex-wrap:nowrap}
.oxton-nav-link,.oxton-dropdown-toggle{
  min-height:42px;display:inline-flex;align-items:center;gap:6px;padding:0 15px;border-radius:8px;
  color:rgba(255,255,255,.92);text-decoration:none;text-transform:uppercase;letter-spacing:.07em;
  font-size:13px;font-weight:700;border:0;background:transparent;cursor:pointer;white-space:nowrap;font-family:inherit;
  transition:background .14s,color .14s;
}
.oxton-nav-link:hover,.oxton-dropdown-toggle:hover{background:rgba(255,255,255,.16);color:#fff;text-decoration:none}
.oxton-nav-link-active{background:rgba(255,255,255,.2);color:#fff}
.oxton-caret{opacity:.85;transition:transform .18s}
.oxton-has-dropdown.is-open .oxton-caret,.oxton-has-dropdown:hover .oxton-caret{transform:rotate(180deg)}

.oxton-has-dropdown{position:relative}
.oxton-dropdown-menu{
  position:absolute;top:calc(100% + 10px);left:0;width:280px;background:#fff;border:1px solid var(--ox-h-border);
  border-radius:18px;padding:10px;box-shadow:0 24px 60px rgba(16,18,35,.16);z-index:30;
  opacity:0;visibility:hidden;transform:translateY(6px);transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
}
.oxton-has-dropdown:hover .oxton-dropdown-menu,.oxton-has-dropdown.is-open .oxton-dropdown-menu{opacity:1;visibility:visible;transform:translateY(0)}
.oxton-dropdown-menu a{display:block;padding:10px 12px;border-radius:12px;color:var(--ox-h-text);text-decoration:none;font-size:14px;font-weight:700}
.oxton-dropdown-menu a:hover{background:var(--ox-h-primary-soft);color:var(--ox-h-primary)}

/* ===== HEADER PRINCIPAL ===== */
.oxton-main-header{background:#fff;border-bottom:1px solid var(--ox-h-border)}
.oxton-main-header-inner{min-height:88px;display:grid;grid-template-columns:auto minmax(240px,1fr) auto;gap:28px;align-items:center}
.oxton-header-logo{display:inline-flex;align-items:center;text-decoration:none}
.oxton-header-logo img{display:block;width:auto;max-width:220px;height:48px;object-fit:contain}

.oxton-header-search{
  width:min(100%,680px);justify-self:center;min-height:48px;border:1px solid #dfe3ee;background:#f8fafc;
  border-radius:999px;display:flex;align-items:center;gap:10px;padding:0 18px;box-sizing:border-box;
}
.oxton-header-search:focus-within{border-color:var(--ox-h-primary);background:#fff;box-shadow:0 0 0 4px rgba(51,53,216,.08)}
.oxton-search-icon{color:#94a3b8;flex:0 0 auto}
.oxton-header-search input{width:100%;min-width:0;border:0;outline:none;background:transparent;color:var(--ox-h-dark);font-size:15px;font-family:inherit}
.oxton-header-search input::placeholder{color:#94a3b8}

.oxton-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:12px}
.oxton-cart-button{position:relative;width:46px;height:46px;border-radius:14px;color:var(--ox-h-dark);text-decoration:none;display:inline-flex;align-items:center;justify-content:center;transition:background .14s,color .14s}
.oxton-cart-button:hover{background:var(--ox-h-primary-soft);color:var(--ox-h-primary)}
.oxton-cart-count{position:absolute;top:2px;right:1px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#dc2626;color:#fff;border:2px solid #fff;font-size:11px;font-weight:800;display:inline-flex;align-items:center;justify-content:center}

.oxton-panel-button{min-height:46px;padding:0 20px;border:1px solid #cfd7e6;border-radius:13px;background:#fff;color:var(--ox-h-dark);text-decoration:none;font-size:14.5px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;transition:all .14s}
.oxton-panel-button:hover{border-color:var(--ox-h-primary);color:var(--ox-h-primary);background:var(--ox-h-primary-soft)}
.oxton-panel-button--primary{background:var(--ox-h-primary);border-color:var(--ox-h-primary);color:#fff}
.oxton-panel-button--primary:hover{background:var(--ox-h-primary-dark);border-color:var(--ox-h-primary-dark);color:#fff}
.oxton-panel-button--ghost{border-color:transparent;background:transparent}

.oxton-mobile-toggle{display:none;width:46px;height:46px;border:1px solid #dfe3ee;border-radius:13px;background:#fff;align-items:center;justify-content:center;flex-direction:column;gap:5px;cursor:pointer}
.oxton-mobile-toggle span{width:20px;height:2px;border-radius:999px;background:var(--ox-h-dark);transition:transform .2s,opacity .2s}
.oxton-mobile-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.oxton-mobile-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
.oxton-mobile-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ===== MENU MOBILE ===== */
.oxton-mobile-menu{background:#fff;border-bottom:1px solid var(--ox-h-border);max-height:calc(100vh - 70px);overflow-y:auto}
.oxton-mobile-menu[hidden]{display:none !important}
.oxton-mobile-menu-inner{padding:18px 0 22px}
.oxton-mobile-search{margin-bottom:14px}
.oxton-mobile-search input{width:100%;min-height:46px;border:1px solid #dfe3ee;border-radius:14px;padding:0 16px;outline:none;font:inherit;box-sizing:border-box}
.oxton-mobile-search input:focus{border-color:var(--ox-h-primary);box-shadow:0 0 0 3px rgba(51,53,216,.1)}
.oxton-mobile-nav{display:grid;gap:4px}
.oxton-mobile-nav > a,.oxton-mobile-nav summary{display:flex;align-items:center;min-height:44px;padding:0 14px;border-radius:12px;color:var(--ox-h-text);text-decoration:none;font-weight:700;font-size:14.5px;cursor:pointer}
.oxton-mobile-nav > a:hover,.oxton-mobile-nav summary:hover{background:var(--ox-h-primary-soft);color:var(--ox-h-primary)}
.oxton-mobile-group summary{list-style:none;justify-content:space-between}
.oxton-mobile-group summary::-webkit-details-marker{display:none}
.oxton-mobile-group summary::after{content:"+";font-size:1.2rem;color:var(--ox-h-muted);font-weight:400}
.oxton-mobile-group[open] summary::after{content:"−"}
.oxton-mobile-group a{display:flex;align-items:center;min-height:40px;padding:0 14px 0 26px;border-radius:10px;color:var(--ox-h-muted);text-decoration:none;font-weight:600;font-size:13.5px}
.oxton-mobile-group a:hover{background:var(--ox-h-bg);color:var(--ox-h-primary)}
.oxton-mobile-cta{background:var(--ox-h-primary);color:#fff !important}
.oxton-mobile-cta:hover{background:var(--ox-h-primary-dark) !important;color:#fff !important}

/* ===== FOCO VISÍVEL ===== */
.oxton-nav-link:focus-visible,.oxton-dropdown-toggle:focus-visible,.oxton-panel-button:focus-visible,
.oxton-cart-button:focus-visible,.oxton-mobile-toggle:focus-visible,.oxton-header-search input:focus-visible,
.oxton-dropdown-menu a:focus-visible,.oxton-mobile-nav a:focus-visible{
  outline:3px solid rgba(51,53,216,.32);outline-offset:3px;border-radius:8px;
}

/* ===== RESPONSIVO ===== */
@media (max-width:1180px){
  .oxton-nav-link,.oxton-dropdown-toggle{padding:0 11px;font-size:12px;letter-spacing:.05em}
  .oxton-main-header-inner{gap:18px}
  .oxton-header-logo img{max-width:190px;height:44px}
}
@media (max-width:980px){
  .oxton-topbar{display:none}
  .oxton-main-header-inner{min-height:74px;grid-template-columns:auto 1fr auto;gap:12px}
  .oxton-header-search{display:none}
  .oxton-panel-button{display:none}
  .oxton-mobile-toggle{display:inline-flex}
  .oxton-header-logo{justify-self:start}
  .oxton-header-actions{justify-self:end}
  .oxton-header-logo img{max-width:170px;height:42px}
}
@media (max-width:560px){
  .oxton-site-header .oxton-container{width:min(100% - 28px,100%)}
  .oxton-main-header-inner{min-height:66px}
  .oxton-header-logo img{max-width:140px;height:36px}
  .oxton-cart-button,.oxton-mobile-toggle{width:42px;height:42px;border-radius:12px}
}
