/* Encabezado; solo la marca queda fija */
.top-in { min-height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; line-height: 1; }
.brand .wm { display: grid; gap: 1px; font-family: var(--display); }
.brand .wm b { font-weight: 800; font-size: 26px; line-height: 0.86; letter-spacing: 0; white-space: nowrap; }
.secs-bar { min-height: 44px; }
.secs { max-width: 1120px; margin: 0 auto; display: flex; overflow-x: auto; scrollbar-width: none; }
.secs::-webkit-scrollbar { display: none; }
.secs.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.secs.more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 36px), transparent); }
.secs.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }
.secs a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; background: linear-gradient(var(--ink), var(--ink)) center bottom / 0 3px no-repeat; }
@media (hover: hover) { .secs a:hover { color: var(--ink); } }
.secs a[aria-current="page"] { color: var(--ink); background-size: calc(100% - 24px) 3px; }
@media (max-width: 339px) { .brand .wm b { font-size: 21px; } }
@media (min-width: 760px) { .brand .wm b { font-size: 30px; } .secs a { padding: 0 18px; } .secs a[aria-current="page"] { background-size: calc(100% - 36px) 3px; } }

/* Línea "for Struktura Group" (también en el pie) y botón My Rewards */
.brand .logo { width: 40px; height: 40px; border-radius: 9px; flex: none; }
.brand .for { font-style: normal; font-family: var(--display); font-weight: 700; font-size: 10px; line-height: 1.05; letter-spacing: 0.03em; text-transform: none; color: var(--btn); width: min-content; opacity: 0; animation: forFlash 10s steps(1, end) infinite; }
@keyframes forFlash { 0%, 100% { opacity: 0; } 6%, 30% { opacity: 1; } 36% { opacity: 0; } }
.struk-line { display: flex; align-items: center; gap: 12px; color: var(--btn); font-size: 13px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.2; }
.struk-line img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.rw { width: auto; min-width: 48px; padding: 0 8px; border: 1.5px solid var(--btn); color: var(--btn); font-size: 12px; font-weight: 700; line-height: 1.05; letter-spacing: 0.02em; text-align: center; animation: rwGlow 2.6s ease-in-out infinite; }
@keyframes rwGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 201, 51, 0); } 50% { box-shadow: 0 0 0 5px rgba(255, 201, 51, 0.35); } }
@media (prefers-reduced-motion: reduce) { .rw, .is-aff .hero p.lead { animation-timing-function: steps(1, end); } }
@media (min-width: 760px) { .rw { padding: 0 12px; gap: 4px; font-size: 14px; } .brand .for { width: auto; white-space: nowrap; font-size: 13px; } }
@media (max-width: 420px) {
  .top-in { gap: 8px; padding-left: 12px; padding-right: 12px; }
  .tools-r { gap: 0; }
  .brand { gap: 6px; min-height: 44px; }
  .brand .wm b { font-size: 20px; }
  .brand .for { font-size: 9px; }
  .brand .logo { width: 26px; height: 26px; }
  .tools-r .cart-btn:not(.rw) { width: 44px; }
  .rw { padding: 0 5px; font-size: 11px; }
}
@media (max-width: 359px) { .brand .wm b { font-size: 16px; } .brand .for { font-size: 8px; } .brand .logo { width: 22px; height: 22px; } }
/* Con "Mis pedidos" visible hay menos espacio: primero se compacta, luego se quita el logo y al final la letra roja */
@media (max-width: 479px) {
  .top:has(#ordersBtn:not([hidden])) .brand { gap: 4px; }
  .top:has(#ordersBtn:not([hidden])) .brand .wm b { font-size: 18px; }
  .top:has(#ordersBtn:not([hidden])) .brand .logo { width: 22px; height: 22px; }
  .top:has(#ordersBtn:not([hidden])) .rw { padding: 0 3px; }
}
@media (max-width: 375px) { .top:has(#ordersBtn:not([hidden])) .brand .logo { display: none; } }
@media (max-width: 359px) { .top:has(#ordersBtn:not([hidden])) .brand .for { display: none; } }
@media (max-width: 339px) { .brand .wm b { font-size: 16px; } .brand .for { display: none; } .cart-btn:not(.rw) { width: 44px; } }

/* Menú Reembolsos (Reembolsos, Cómo comprar, Consultar mi pedido) */
.sub-menu { position: absolute; z-index: 30; display: grid; white-space: nowrap; padding: 6px; border-radius: 14px; background: var(--surface); box-shadow: var(--sh-2); animation: menuIn 160ms var(--ease-out); }
.sub-menu[hidden] { display: none; }
.sub-menu a, .sub-menu .off { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; text-align: left; text-decoration: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
@media (hover: hover) and (pointer: fine) { .sub-menu a:hover { background: var(--chip); } }
/* Sub-pestañas de la sección (Hombres / Mujeres / Niños) */
.secs-bar { position: relative; }
.sub-menu { top: 100%; min-width: 180px; transform-origin: top left; }
.sub-menu a[aria-current="true"] { background: var(--chip-on); color: var(--chip-on-ink); }
.sub-menu .off { color: var(--muted); opacity: 0.6; cursor: default; }
/* Menú de departamento: una fila por sección y sus públicos en pastillas */
#subMenu { min-width: 260px; max-width: calc(100vw - 16px); gap: 2px; }
.dm-row { display: grid; gap: 2px; padding-bottom: 4px; }
.dm-row + .dm-row { border-top: 1px solid var(--outline); padding-top: 4px; }
.dm-aud { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 6px; }
.sub-menu .dm-aud a, .sub-menu .dm-aud .off { width: auto; min-height: 34px; padding: 0 12px; border-radius: 17px; background: var(--chip); font-size: 14px; }
.secs a[data-dept]::after { content: ""; width: 7px; height: 7px; margin: -3px 0 0 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; rotate: 45deg; transition-property: rotate, margin; transition-duration: 160ms; transition-timing-function: var(--ease-out); }
.secs a[aria-expanded="true"] { color: var(--ink); }
.secs a[aria-expanded="true"]::after { rotate: 225deg; margin-top: 4px; }
/* En celular el botón Reembolsos ocupa sitio: la marca y ES / EN se compactan (no aplica en secciones de otras tiendas, donde no sale) */
@media (max-width: 480px) {
  body:not(.is-aff) .lang button { min-width: 36px; }
  body:not(.is-aff) .brand { gap: 4px; }
  body:not(.is-aff) .brand .wm b { font-size: 18px; }
  body:not(.is-aff) .brand .logo { width: 22px; height: 22px; }
  body:not(.is-aff) .tools-r .cart-btn:not(.rw) { width: 40px; }
}
@media (max-width: 375px) { body:not(.is-aff) .brand .for { display: none; } }
@media (max-width: 345px) { body:not(.is-aff) .brand .logo { display: none; } }
@media (max-width: 340px) { body:not(.is-aff) .top:has(#ordersBtn:not([hidden])) .brand .wm b { font-size: 15px; } body:not(.is-aff) .top:has(#ordersBtn:not([hidden])) .lang button { min-width: 32px; } }
@media (max-width: 959px) { body:not(.is-aff) .top:has(#ordersBtn:not([hidden])) .brand .for { display: none; } }   /* con Reembolsos y Mis pedidos a la vez */
@media (prefers-reduced-motion: reduce) { .sub-menu { animation: none; } .secs a[data-dept]::after { transition: none; } }
/* Buscador en el header, como Walmart / Amazon / Target: en computadora va en el centro; en celular y tablet, a todo lo ancho debajo del logo */
.top-in:has(.top-search) { flex-wrap: wrap; row-gap: 8px; }
.top-search { position: relative; order: 3; flex: 1 0 100%; }
.top-search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--muted); pointer-events: none; }
.top .search { height: 44px; padding: 0 16px 0 42px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--outline); }
.top .search:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.is-empty .top-search { display: none; }   /* sección sin productos: no hay nada que buscar */
html:has(.top-search) { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 132px); }   /* el header es más alto con el buscador: los saltos no quedan tapados */
@media (min-width: 1100px) {
  html:has(.top-search) { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 80px); }
  .top-in:has(.top-search) { flex-wrap: nowrap; }
  .top-search { order: 0; flex: 1 1 auto; max-width: 520px; }
}
/* Sub-pestañas de filtros en el menú (Liga / Estilo / Talla) */
.dm-filt { align-items: center; }
.dm-lab { flex: 0 0 100%; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
