/* ==========================================================================
   OffSale — Header C v3 COMPACTO · Sprint 3 · sesión 003
   1 row header (logo + search + acciones) + 1 row nav sticky
   ========================================================================== */

/* Design tokens */
:root {
  --offsale-orange: #f5630a;
  --offsale-orange-dark: #d95405;
  --offsale-orange-soft: #fff4ec;
  --offsale-navy: #1a2740;
  --offsale-navy-soft: #2a3a5a;
  --offsale-ink: #0f172a;
  --offsale-ink-soft: #334155;
  --offsale-ink-mute: #64748b;
  --offsale-line: #e2e8f0;
  --offsale-line-strong: #cbd5e1;
  --offsale-bg: #f6f7f9;
  --wa-green: #25d366;
  --wa-green-dark: #128c7e;
}

.os-header,
.os-header * {
  box-sizing: border-box;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Skip link */
.os-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: var(--offsale-navy);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.os-skip-link:focus {
  left: 8px;
  top: 8px;
}

/* ==========================================================================
   OCULTAR HEADER + TOPBAR + NAV DEL THEME PADRE (Nasa Core)
   ========================================================================== */
#site-header,
.nasa-header-wrap,
.nasa-header,
.nasa-mobile-header,
.nasa-mobile-nav-wrap,
.nasa-topbar,
.nasa-header-top,
.nasa-header-main,
.nasa-header-bottom,
.nasa-primary-menu,
.nasa-primary-menu-wrap,
.nasa-header-cart,
.nasa-header-search,
.nasa-header-account,
.nasa-menu-mobile,
header.header,
header.site-header,
#header,
#masthead,
.site-branding-wrap,
.header-container.nasa-flex,
.nasa-first-header,
.nasa-second-header,
.nasa-third-header,
.nasa-topbar-wrap,
.top-bar,
.top-bar-wrap,
.header-search-wrap,
.header-cart-wrap,
.mobile-btn-nav,
.nav-menu-mobile,
#nasa-mobile-panel,
.nasa-mobile-toolbar,
.digi-header-wrap,
.digi-header,
.header-wrap,
[class*="nasa-header"]:not(.os-header):not(.os-header *),
[id*="nasa-header"]:not(.os-header):not(.os-header *) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.woocommerce,
body.nasa-menu-mobile-showing {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Barra fija móvil de Nasa (bottom bar) */
.nasa-bottom-toolbar,
.nasa-mobile-toolbar-fixed {
  display: none !important;
}

/* ==========================================================================
   HEADER TOP COMPACT — logo + search grande + acciones (patrón Amazon/ML)
   ========================================================================== */
.os-header {
  background: #fff;
  position: relative;
  z-index: 100;
  border-bottom: 1px solid var(--offsale-line);
}

.os-header .header-top {
  max-width: 1360px;
  margin: 0 auto;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.os-header .logo-wrap {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.os-header .logo-img {
  height: 60px;
  width: auto;
  display: block;
}

/* Buscador grande — estilo Amazon/ML */
.os-header .header-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 11px 16px;
  max-width: 560px;
  width: 100%;
  transition: all 0.15s ease;
  margin: 0 auto;
}
.os-header .header-search:focus-within {
  background: #fff;
  border-color: var(--offsale-orange);
  box-shadow: 0 0 0 3px rgba(245, 99, 10, 0.12);
}
.os-header .header-search input {
  background: transparent;
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  color: var(--offsale-ink);
}
.os-header .header-search svg {
  width: 18px;
  height: 18px;
  color: var(--offsale-ink-mute);
  flex-shrink: 0;
}

.os-header .header-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.os-header .header-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--offsale-navy);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.os-header .header-account:hover {
  background: #f1f5f9;
}
.os-header .header-account svg {
  width: 20px;
  height: 20px;
}
.os-header .header-account small {
  display: block;
  font-size: 10.5px;
  color: var(--offsale-ink-mute);
  font-weight: 500;
  line-height: 1.1;
}
.os-header .header-account strong {
  display: block;
  color: var(--offsale-navy);
  font-weight: 700;
  line-height: 1.1;
  font-size: 13px;
}

.os-header .os-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--offsale-navy);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
  text-decoration: none;
}
.os-header .os-icon-btn:hover {
  background: #f1f5f9;
}
.os-header .os-icon-btn svg {
  width: 22px;
  height: 22px;
}
.os-header .os-icon-btn .badge-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--offsale-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.os-header .burger-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  place-items: center;
  color: var(--offsale-navy);
  background: transparent;
  border: none;
  cursor: pointer;
}
.os-header .burger-btn svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   NAV STICKY — categorías + WhatsApp + IG
   ========================================================================== */
.os-header .os-navbar {
  background: #fff;
  border-top: 1px solid var(--offsale-line);
  border-bottom: 1px solid var(--offsale-line);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.os-header .os-navbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.os-header .os-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.os-header .os-nav-links::-webkit-scrollbar {
  display: none;
}
.os-header .os-nav-links a {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--offsale-ink-soft);
  font-weight: 500;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.os-header .os-nav-links a:hover {
  color: var(--offsale-orange);
}
.os-header .os-nav-links a.active {
  color: var(--offsale-orange);
  border-bottom-color: var(--offsale-orange);
  font-weight: 700;
}
.os-header .os-nav-links .hot {
  background: var(--offsale-orange);
  color: #fff !important;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.os-header .os-nav-links .new-dot {
  width: 6px;
  height: 6px;
  background: #16a34a;
  border-radius: 50%;
  animation: os-pulse 1.8s ease-in-out infinite;
}
@keyframes os-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.4);
    opacity: 0.6;
  }
}
@media (prefers-reduced-motion: reduce) {
  .os-header .os-nav-links .new-dot {
    animation: none;
  }
}

.os-header .nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.os-header .nav-wa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--wa-green);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.os-header .nav-wa:hover {
  background: var(--wa-green-dark);
}
.os-header .nav-wa svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.os-header .ig-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  color: #fff;
  font-weight: 600;
  transition: transform 0.15s ease;
  text-decoration: none;
}
.os-header .ig-badge:hover {
  transform: translateY(-1px);
}
.os-header .ig-badge svg {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .os-header .header-account span {
    display: none;
  }
  .os-header .header-account {
    padding: 8px;
  }
}
@media (max-width: 900px) {
  .os-header .header-top {
    grid-template-columns: auto 1fr auto;
    padding: 10px 16px;
    gap: 12px;
  }
  .os-header .logo-img {
    height: 48px;
  }
  .os-header .header-search {
    order: 4;
    grid-column: 1 / -1;
    max-width: 100%;
    margin-top: 4px;
  }
  .os-header .header-top {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
  }
}
@media (max-width: 768px) {
  .os-header .burger-btn {
    display: grid;
  }
  .os-header .header-actions-right {
    gap: 2px;
  }
  .os-header .os-icon-btn {
    width: 38px;
    height: 38px;
  }
  .os-header .os-icon-btn svg {
    width: 20px;
    height: 20px;
  }
  .os-header .os-navbar {
    padding: 0 12px;
  }
  .os-header .os-navbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .os-header .os-nav-links {
    order: 2;
    padding: 4px 0;
  }
  .os-header .os-nav-links a {
    padding: 12px 12px;
    font-size: 13px;
  }
  .os-header .nav-right {
    order: 1;
    justify-content: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--offsale-line);
  }
}
