/* HYPE Lego — site chrome: topbar, header, mega menu, mobile header, drawer, footer, bottom nav.
   Hand-written replacement for the extracted chrome.css. Layers follow components.css. */
@layer components {
  /* ---------- tokens local to chrome ---------- */
  :root { --hdr-h: 52px; --topbar-h: 42px; --nav-ink: #0b1d2e; --footer-bg: #0b1d2e; --footer-ink: #e9f3f8; --footer-ink-2: rgba(233,243,248,.72); --footer-line: rgba(255,255,255,.08); --footer-tile: #122b42; }
  @media (min-width: 1024px) { :root { --hdr-h: 64px; --topbar-h: 43px; } }

  /* ---------- header shell ---------- */
  .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 999; background: #fff; }
  .lego main { padding-top: calc(var(--topbar-h) + var(--hdr-h)); }

  /* ---------- topbar (marquee) ---------- */
  .topbar { height: var(--topbar-h); overflow: hidden; background: linear-gradient(90deg, #0b1d2e, #122b42); color: #fff; padding: 8px 0; white-space: nowrap; }
  .topbar__track { display: inline-flex; animation: topbar-scroll 25s linear infinite; }
  .topbar__item { display: inline-flex; align-items: center; gap: 8px; padding-right: 80px; font: 500 12px/1.6 var(--font-display); }
  .topbar__item b { color: var(--blue); font-weight: 700; }
  .topbar__item .icon { font-size: 16px; color: #56b6de; }
  @media (min-width: 768px) { .topbar__item { font-size: 14px; padding-right: 150px; } }
  @keyframes topbar-scroll { to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .topbar__track { animation: none; } }

  /* ---------- desktop row ---------- */
  .site-header__row { display: none; }
  @media (min-width: 1024px) {
    .site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--hdr-h); max-width: 1440px; padding-inline: clamp(24px, 5.6%, 80px); }
    .site-header__logo img { display: block; width: 105px; height: 41px; }
    .site-nav > ul { display: flex; align-items: center; gap: 15px; margin: 0; padding: 0; list-style: none; }
    .site-nav > ul > li { position: relative; }
    .site-nav > ul > li > a { display: flex; align-items: center; gap: 4px; padding: 8px 6px; color: var(--nav-ink); font: 400 15px/1.7 var(--font-display); text-decoration: none; box-shadow: inset 0 -2px 0 transparent; transition: box-shadow .15s; }
    .site-nav > ul > li > a:hover, .site-nav > ul > li.is-open > a { box-shadow: inset 0 -2px 0 var(--nav-ink); }
    .site-nav__caret { font-size: 14px; color: var(--blue-text); transition: rotate .2s; }
    .site-nav li.is-open .site-nav__caret { rotate: 180deg; }
    .site-nav__cta > a { margin-left: 4px; }
    .site-header__tools { display: flex; align-items: center; gap: 4px; }
    .lang-switch { display: flex; align-items: center; margin-right: 6px; }
    .lang-switch__item { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; opacity: .55; }
    .lang-switch__item.is-current, .lang-switch__item:hover { opacity: 1; }
    .lang-switch__item img { display: block; width: 16px; height: 11px; border-radius: 2px; }
    .header-icon, .hype-headerCart { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 10px; color: var(--ink); background: none; border: 0; cursor: pointer; }
    .header-icon .icon { font-size: 24px; stroke-width: 1.5; }
    .hype-headerCart { position: relative; gap: 2px; }
    .hype-headerCart .icon { font-size: 22px; stroke-width: 1.6; }
    .hype-headerCart-count { position: absolute; top: 1px; right: 0; min-width: 19px; height: 18px; padding: 0 4px; border-radius: 50%; background: #f15a24; color: #fff; font: 700 10px/18px var(--font-display); box-shadow: 0 0 0 2px #fff; display: flex; align-items: center; justify-content: center; }
    .hype-headerCart-count:has(.hype-cart-count:empty), .hype-headerCart-count.is-zero { display: none; }
  }

  /* ---------- mega menu (opened by site.js: li.is-open) ---------- */
  .mega { display: none; position: absolute; top: 100%; left: 50%; translate: -50% 0; width: min(800px, calc(100vw - 48px)); padding-top: 13px; z-index: 1020; }
  .site-nav li.is-open > .mega, .site-nav li:hover > .mega, .site-nav li:focus-within > .mega { display: block; }
  .site-nav > ul > li.menu-item-has-children::after { content: ""; position: fixed; inset: 0; background: rgba(11,29,46,.45); z-index: 1010; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s; }
  .site-nav > ul > li.menu-item-has-children:is(:hover, .is-open, :focus-within)::after { opacity: 1; visibility: visible; }
  .site-nav > ul > li.menu-item-has-children > a { position: relative; z-index: 1020; }
  .mega__panel { display: flex; gap: 20px; padding: 32px; background: #fff; border-radius: 12px; box-shadow: 0 8px 40px -5px rgba(0,0,0,.18); }
  .mega__cards { flex: 1 1 349px; display: flex; flex-direction: column; }
  .mega__card { display: flex; gap: 20px; align-items: flex-start; padding: 0 0 21px; color: var(--ink); text-decoration: none; }
  .mega__card > span { display: block; }
  .mega__card strong { display: block; font: 600 18px/1 var(--font-display); letter-spacing: -.1px; color: #111827; margin-bottom: 8px; }
  .mega__card small { display: block; font: 400 14px/1.8 var(--font-display); color: #6b7280; }
  .mega__card:hover strong { color: var(--blue-text); }
  .mega__icon { flex: none; font-size: 24px; color: #1f2937; stroke-width: 1.5; }
  .mega__aside { flex: 0 0 334px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-left: 32px; border-left: 1px solid var(--line-soft); }
  .mega__aside img { width: 334px; height: 334px; object-fit: contain; }

  /* ---------- mobile header ---------- */
  .hype-account-mobile-hdr { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: var(--hdr-h); padding: 0 16px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
  .hype-account-mobile-hdr__btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px; padding: 8px; border: 0; border-radius: 10px; background: none; color: var(--nav-ink); cursor: pointer; }
  .hype-account-mobile-hdr__btn svg { width: 22px; height: 22px; }
  .hype-account-mobile-hdr__brand { display: flex; align-items: center; justify-self: center; }
  .hype-account-mobile-hdr__logo { display: block; width: 72px; height: 28px; }
  .hype-account-mobile-hdr__langs { display: flex; justify-content: flex-end; gap: 6px; }
  .hype-lang { display: flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid rgba(0,0,0,.08); border-radius: 50px; background: #fff; color: #6a6a7a; font: 700 11px/1 var(--font-display); letter-spacing: .4px; text-decoration: none; }
  .hype-lang.is-current { border-color: var(--nav-ink); background: #f3f6fa; color: var(--nav-ink); }
  .hype-lang__flag img { display: block; width: 16px; height: 11px; border-radius: 2px; }
  .hype-lang__code { display: none; }
  @media (min-width: 1024px) { .hype-account-mobile-hdr { display: none; } }

  /* ---------- nav drawer (JS: .is-open on #hype-account-drawer) ---------- */
  .hype-drawer { position: fixed; inset: 0; z-index: 9999; pointer-events: none; }
  .hype-drawer__scrim { position: absolute; inset: 0; background: rgba(11,29,46,.45); opacity: 0; transition: opacity .25s; }
  .hype-drawer__panel { position: absolute; top: 0; left: 0; height: 100%; width: min(86vw, 340px); display: flex; flex-direction: column; background: #fff; box-shadow: 8px 0 32px rgba(0,0,0,.18); translate: -100% 0; transition: translate .28s; }
  .hype-drawer.is-open { pointer-events: auto; }
  .hype-drawer.is-open .hype-drawer__scrim { opacity: 1; }
  .hype-drawer.is-open .hype-drawer__panel { translate: 0 0; }
  .hype-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,.06); }
  .hype-drawer__logo { display: block; height: 32px; width: auto; }
  .hype-drawer__close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 8px; border: 0; border-radius: 10px; background: none; color: var(--nav-ink); cursor: pointer; }
  .hype-drawer__close svg { width: 22px; height: 22px; }
  .hype-drawer__nav { flex: 1 1 auto; overflow-y: auto; padding: 8px 0; }
  .hype-drawer__list, .hype-drawer__list ul { list-style: none; margin: 0; padding: 0; }
  .hype-drawer__list a { display: block; padding: 14px 20px; font: 600 15px/1.3 var(--font-display); color: var(--nav-ink); text-decoration: none; border-bottom: 1px solid rgba(0,0,0,.04); }
  .hype-drawer__list .current-menu-item > a { color: #a25e00; }
  .hype-drawer__list .sub-menu { max-height: 0; overflow: hidden; background: #f7f9fb; transition: max-height .25s; }
  .hype-drawer__list li.is-open > .sub-menu { max-height: 1000px; }
  .hype-drawer__list .sub-menu a { padding: 11px 20px 11px 36px; font-weight: 500; font-size: 14px; color: var(--nav-ink); }
  .hype-drawer__list li.menu-item-has-children > a { position: relative; }
  .hype-drawer__list li.menu-item-has-children > a::after { content: ""; position: absolute; right: 20px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #6a6a7a; border-bottom: 2px solid #6a6a7a; transform: translateY(-65%) rotate(45deg); }
  .hype-drawer__list li.menu-item-has-children.is-open > a::after { transform: translateY(-30%) rotate(225deg); }
  .hype-drawer__list li.menu-btn-orange { padding: 16px 20px; }
  .hype-drawer__list li.menu-btn-orange > a { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 20px; border: 0; border-radius: 50px; background: var(--orange); color: #fff; font: 700 14px/1 var(--font-display); letter-spacing: .3px; }
  .hype-drawer__foot { display: flex; flex-direction: column; gap: 10px; padding: 14px 20px; border-top: 1px solid rgba(0,0,0,.06); font: 600 14px/1 var(--font-display); }
  .hype-drawer__link { color: var(--nav-ink); text-decoration: none; }
  .hype-drawer__infocards { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .hype-drawer__infocard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--tint); }
  .hype-drawer__infocard-icon { flex: 0 0 36px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(59,181,232,.18); color: var(--blue-text); }
  .hype-drawer__infocard-icon svg { width: 18px; height: 18px; }
  .hype-drawer__infocard-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .hype-drawer__infocard-title { font: 700 11px/1.2 var(--font-display); letter-spacing: 1.5px; text-transform: uppercase; color: #6a6a7a; }
  .hype-drawer__infocard-desc { font: 600 14px/1.3 var(--font-display); color: #1a1a2e; }
  body.hype-drawer-open { overflow: hidden; }
  @media (min-width: 1024px) { .hype-drawer { display: none; } }

  /* ---------- footer ---------- */
  .site-footer { background: var(--footer-bg); color: var(--footer-ink); font: 400 15px/1.7 var(--font-display); padding: 46px 0 10px; border-top: 3px solid transparent; border-image: linear-gradient(90deg, var(--orange), var(--blue)) 1; }
  .site-footer a { color: inherit; text-decoration: none; }
  .site-footer a:hover { color: var(--blue); }
  .site-footer h4 { margin: 0 0 20px; font: 700 11px/1 var(--font-display); letter-spacing: 1.5px; text-transform: uppercase; color: var(--footer-ink); }
  .site-footer p { margin: 0 0 20px; font-size: 14px; }
  .footer-grid { display: flex; flex-direction: column; gap: 20px; }
  .footer-col { display: flex; flex-direction: column; }
  .footer-brand img { width: 120px; height: 47px; margin-bottom: 20px; }
  .social { display: flex; gap: 5px; }
  .social a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--footer-tile); border: 1px solid var(--footer-line); }
  .social svg { width: 16px; height: 16px; fill: currentColor; }
  .footer-links { list-style: none; margin: 0; padding: 0; }
  .footer-links li { line-height: 26px; }
  .footer-links a { display: block; padding-left: 5px; font-size: 15px; }
  .contact-box { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
  .contact-box__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--footer-tile); border: 1px solid var(--footer-line); }
  .contact-box__icon .icon { font-size: 18px; stroke-width: 1.6; }
  .contact-box small { display: block; margin-bottom: 2px; font: 600 11px/1.2 var(--font-display); letter-spacing: 1.4px; text-transform: uppercase; }
  .contact-box a, .contact-box__val { display: block; font-size: 14px; font-weight: 400; color: var(--footer-ink); }
  .footer-form { display: flex; flex-direction: column; gap: 20px; }
  .footer-form input[type=email] { width: 100%; height: 48px; padding: 13px 18px; border: 1px solid #fff; border-radius: 6px; background: #fff; color: var(--ink); font: 400 14px/1.4 var(--font-display); }
  .footer-form .hype-btn { align-self: flex-start; }
  .footer-note { font-size: 11px; line-height: 1.6; color: var(--footer-ink-2); }
  .footer-note a { font-size: 14px; color: var(--footer-ink); }
  .footer-legal { margin-top: 20px; padding: 24px 0 16px; border-top: 1px solid rgba(255,255,255,.25); text-align: center; }
  .footer-legal p { font-size: 12px; margin: 0 auto 20px; max-width: 720px; }
  .footer-legal p:first-of-type { font-size: 13px; max-width: none; }
  .footer-legal .footer-note { max-width: 1104px; margin-top: 8px; }
  .pay-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 0 20px; }
  .pay-icons svg { width: 30px; height: 19px; }
  @media (min-width: 768px) {
    .footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
  }
  @media (min-width: 1024px) {
    .site-footer { padding-top: 46px; }
    .site-footer .container { padding-inline: clamp(24px, 5.6%, 80px); max-width: 1440px; }
    .footer-grid { grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 20px; }
    .footer-brand { padding-right: 60px; }
    .footer-legal { padding: 24px 0; }
    .pay-icons svg { width: 38px; height: 24px; }
  }

  /* ---------- bottom nav (mobile) ---------- */
  .hype-bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: rgba(255,255,255,.82); backdrop-filter: blur(10px); box-shadow: 0 -2px 12px rgba(0,0,0,.04); padding-bottom: env(safe-area-inset-bottom); }
  .hype-bottom-nav__inner { display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; }
  .hype-bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #4a4a5a; font: 600 10px/1.1 var(--font-display); text-decoration: none; }
  .hype-bottom-nav__icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
  .hype-bottom-nav__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .hype-bottom-nav a.hype-bottom-nav__buy { color: #b7390c; font-weight: 700; }
  .hype-bottom-nav__buy .hype-bottom-nav__icon { width: 52px; height: 52px; margin-top: -22px; border-radius: 50%; background: #f15a24; color: #fff; box-shadow: 0 6px 16px rgba(241,90,36,.35), 0 0 0 4px #fff; }
  .hype-bottom-nav__cart-count { position: absolute; top: 6px; left: 50%; margin-left: 4px; height: 16px; padding: 0 4px; border-radius: 99px; background: #f15a24; color: #fff; font: 700 9px/16px var(--font-display); }
  .hype-bottom-nav__cart-count[hidden] { display: none; }
  .hype-cb-alt { display: none; }
  body.hype-ck-call-off .hype-cb-orig { display: none; }
  body.hype-ck-call-off .hype-cb-alt { display: inline; }
  .lego main { padding-bottom: 72px; }
  @media (min-width: 1024px) { .hype-bottom-nav { display: none; } .lego main { padding-bottom: 0; } }

  .u-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
