/* Spectrum Display — Alienware-style site header (fixed height, no layout jump) */
:root {
  --site-header-h: calc(5.75rem + 10px);
  --site-tabbar-h: 0px;
  --logo-h: 2.85rem;
  --logo-text-inset: calc(var(--logo-h) * 76 / 205 - 20px);
  --site-gutter: 1rem;
}
@media (min-width: 640px) {
  :root { --site-gutter: 1.5rem; }
}
@media (min-width: 1024px) {
  :root { --site-gutter: 2rem; }
}
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--site-header-h);
  background: #020617;
  border-bottom: 1px solid #1e293b;
  color: #e2e8f0;
  box-sizing: border-box;
}
body:not(.designer-app) {
  padding-top: var(--site-header-h);
}
.site-header *,
.site-header *::before,
.site-header *::after { box-sizing: border-box; }
.site-header-inner {
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0 auto;
  padding: calc(0.5rem + 10px) var(--site-gutter) 0.35rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.1rem;
}
.site-wrap {
  width: 100%;
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}
.site-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.85rem;
}
.site-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  line-height: 0;
  margin-left: -20px;
}
.site-brand-logo {
  display: block;
  height: var(--logo-h);
  width: auto;
  mix-blend-mode: screen;
}
.site-utils {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}
.site-util {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 2rem;
  padding: 0 0.65rem;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border-radius: 0.25rem;
  appearance: none;
  -webkit-appearance: none;
}
.site-util:hover,
.site-util.is-open {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}
.site-util svg {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 1.75rem;
  padding-left: var(--logo-text-inset);
}
.site-nav a {
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.site-nav a:hover,
.site-nav a.is-active {
  color: #38bdf8;
}
.site-menu-btn {
  display: none;
}
.site-drop {
  position: relative;
}
.site-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  width: 20rem;
  padding: 1.1rem 1.15rem 1.15rem;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  z-index: 60;
  text-align: left;
}
.site-drop-panel::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}
.site-drop:hover .site-drop-panel,
.site-drop:focus-within .site-drop-panel,
.site-drop.is-open .site-drop-panel { display: block; }
.site-drop:hover > .site-util,
.site-drop:focus-within > .site-util {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}
.site-drop-panel h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
}
.site-drop-panel p {
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}
.site-drop-actions {
  display: flex;
  gap: 0.5rem;
}
.site-drop-actions a,
.site-drop-actions button {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}
.site-btn-primary {
  background: #0ea5e9;
  color: #fff;
  border: 0;
}
.site-btn-primary:hover { background: #38bdf8; }
.site-btn-ghost {
  background: transparent;
  color: #e2e8f0;
  border: 1px solid #475569;
}
.site-btn-ghost:hover { border-color: #38bdf8; color: #fff; }
.site-drop-list {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.site-drop-list a,
.site-drop-list button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-family: inherit;
  padding: 0.45rem 0.35rem;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0.25rem;
}
.site-drop-list a:hover,
.site-drop-list button:hover { background: rgba(14, 165, 233, 0.12); color: #fff; }
.site-lang-panel { width: 11.5rem; padding: 0.45rem; }
.site-lang-panel button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: #cbd5e1;
  font-size: 0.8125rem;
  font-family: inherit;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  border-radius: 0.25rem;
}
.site-lang-panel button:hover,
.site-lang-panel button.is-active {
  background: rgba(14, 165, 233, 0.15);
  color: #7dd3fc;
}
.site-logged { display: none; }
.site-header.is-logged-in .site-guest { display: none; }
.site-header.is-logged-in .site-logged { display: block; }
.site-util-user { display: none; }
.site-header.is-logged-in .site-util-guest { display: none; }
.site-header.is-logged-in .site-util-user {
  display: inline;
  max-width: 7.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-account-roles {
  margin: 0 0 0.95rem;
  padding: 0;
  list-style: none;
}
.site-account-roles li {
  position: relative;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
  padding: 0.28rem 0 0.28rem 1.15rem;
}
.site-account-roles li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: #0ea5e9;
}
.site-cart {
  position: relative;
}
.site-cart-count {
  position: absolute;
  top: -0.2rem;
  right: -0.15rem;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  background: #0ea5e9;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 767px) {
  :root {
    --site-header-h: 3.35rem;
    --site-tabbar-h: calc(6.5rem - 35px + env(safe-area-inset-bottom, 0px));
    --logo-h: 1.75rem;
  }
  body {
    padding-bottom: var(--site-tabbar-h);
  }
  .site-header-inner {
    padding: 0 var(--site-gutter);
    justify-content: center;
  }
  .site-nav { display: none !important; }
  .site-menu-btn { display: none !important; }
  .site-util-label { display: none !important; }
  #hdr-signin-drop { display: none; }
  .site-utils { gap: 0.3rem; }
  .site-util {
    height: 2rem;
    padding: 0 0.25rem;
  }
  .site-util svg {
    width: 1.22rem;
    height: 1.22rem;
  }
  .site-header-top {
    min-height: 2rem;
    align-items: center;
  }
  .site-brand {
    margin-top: 0;
    margin-left: -10px;
  }
  .site-drop-panel { width: min(20rem, calc(100vw - 1.5rem)); }
  .sticky-buy { bottom: var(--site-tabbar-h) !important; }
  body:has(.sticky-buy) {
    padding-bottom: calc(var(--site-tabbar-h) + 4.75rem);
  }
}

.site-tabbar {
  display: none;
}
@media (max-width: 767px) {
  .site-tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    box-sizing: border-box;
    height: var(--site-tabbar-h);
    padding: 0.7rem 0.2rem calc(2.15rem - 35px + env(safe-area-inset-bottom, 0px));
    background: rgba(2, 6, 23, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid #1e293b;
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.4);
  }
  .site-tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.22rem;
    min-height: 0;
    padding: 0.15rem 0.2rem 0;
    color: #64748b;
    text-decoration: none;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .site-tabbar a svg {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
  }
  .site-tabbar a.is-active {
    color: #64748b;
  }
  .site-tabbar a.is-active svg {
    color: #38bdf8;
    stroke-width: 2;
  }
  html[data-lang="ja"] .site-tabbar a,
  html[data-lang="ko"] .site-tabbar a,
  html[data-lang="zh"] .site-tabbar a {
    font-size: 0.625rem;
  }
}
