:root {
  --xb-header-height: 124px;
  --xb-shell: min(1240px, calc(100% - 48px));
  --xb-border: #dce5e8;
  --xb-ink: #11252b;
  --xb-muted: #627278;
  --xb-accent: #c4471d;
}

.xb-header,
.xb-footer {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.xb-header {
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--xb-border);
  color: var(--xb-ink);
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 28px rgba(15,35,42,.055);
  backdrop-filter: blur(18px) saturate(145%);
}

.xb-header__top,
.xb-header__product,
.xb-footer__grid,
.xb-footer__bottom {
  width: var(--xb-shell);
  margin-inline: auto;
}

.xb-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 62px;
}

.xb-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.xb-brand img {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  filter: drop-shadow(0 8px 14px rgba(15,43,51,.15));
}

.xb-brand__copy { display: flex; flex-direction: column; min-width: 0; }
.xb-brand strong { font-size: 17px; font-weight: 950; line-height: 1; white-space: nowrap; }
.xb-brand small { margin-top: 5px; color: #a34a31; font-size: 10px; font-weight: 850; letter-spacing: .09em; line-height: 1; white-space: nowrap; }

.xb-header__actions { display: flex; align-items: center; gap: 8px; }
.xb-language,
.xb-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}
.xb-language { color: #344149; background: #f1f4f5; }
.xb-header__cta { color: #fff; background: var(--xb-accent); box-shadow: 0 8px 18px rgba(196,71,29,.22); }

.xb-product-bar { border-top: 1px solid #edf1f2; background: #f5f8f9; }
.xb-header__product {
  display: grid;
  grid-template-columns: minmax(260px,1fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 61px;
}

.xb-product-name {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 14px;
  font-weight: 920;
  white-space: nowrap;
}
.xb-product-name::before {
  flex: 0 0 auto;
  width: 5px;
  height: 24px;
  margin-right: 11px;
  border-radius: 5px;
  content: "";
  background: linear-gradient(180deg,#f58b52,#dc4f2b);
}

.xb-product-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px;
  border: 1px solid #e2e8ea;
  border-radius: 11px;
  background: #eef2f3;
}

.xb-product-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #627078;
  font-size: 12px;
  font-weight: 780;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}
.xb-product-nav a:hover,
.xb-product-nav a.is-active { color: #b74324; background: #fff; box-shadow: 0 5px 13px rgba(21,41,49,.08); }

.xb-footer { color: rgba(255,255,255,.64); background: #101b20; }
.xb-footer__grid {
  display: grid;
  grid-template-columns: minmax(280px,1.3fr) repeat(2,minmax(150px,.65fr)) minmax(220px,.9fr);
  gap: 48px;
  padding-block: 54px 48px;
}
.xb-footer__brand .xb-brand { color: #fff; }
.xb-footer__brand p { max-width: 430px; margin: 20px 0 0; color: rgba(255,255,255,.48); font-size: 13px; line-height: 1.8; }
.xb-footer__column { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; min-width: 0; font-size: 13px; }
.xb-footer__column strong { margin-bottom: 5px; color: #fff; }
.xb-footer__column a { color: rgba(255,255,255,.6); text-decoration: none; }
.xb-footer__column a:hover { color: #fff; }
.xb-footer__column span { line-height: 1.7; }
.xb-footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 62px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; }
.xb-footer__bottom a { color: inherit; text-decoration: none; }

@media (max-width: 1040px) {
  :root { --xb-header-height: 118px; --xb-shell: min(100% - 32px, 1240px); }
  .xb-header__product { position: relative; grid-template-columns: 220px minmax(0,1fr); gap: 14px; }
  .xb-header__product::after { position: absolute; top: 10px; right: 0; bottom: 10px; width: 32px; pointer-events: none; content: ""; background: linear-gradient(90deg,rgba(245,248,249,0),#f5f8f9 82%); }
  .xb-product-nav { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .xb-product-nav::-webkit-scrollbar { display: none; }
  .xb-footer__grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}

@media (max-width: 680px) {
  :root { --xb-header-height: 106px; --xb-shell: calc(100% - 24px); }
  html { scroll-padding-top: 112px; }
  .xb-header__top { min-height: 54px; }
  .xb-brand img { width: 32px; height: 32px; }
  .xb-brand strong { font-size: 15px; }
  .xb-brand small { font-size: 8px; }
  .xb-header__cta { display: none; }
  .xb-language { min-height: 32px; padding-inline: 10px; }
  .xb-header__product { display: block; width: 100%; min-height: 52px; }
  .xb-product-name { display: none; }
  .xb-product-nav { min-height: 52px; border: 0; border-radius: 0; background: transparent; padding-inline: 12px; }
  .xb-product-nav a { min-height: 34px; padding-inline: 10px; font-size: 11px; }
  .xb-footer__grid { grid-template-columns: 1fr; gap: 26px; padding-block: 42px 34px; }
  .xb-footer__bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .xb-product-nav a { transition: none; }
}

/* The Next.js detail wrapper supplies the global brand header. Keep the product
   section navigation inside the embedded page without rendering a duplicate row. */
.xb-embedded {
  --xb-header-height: 62px;
  scroll-padding-top: 70px;
}
.xb-embedded .xb-header__top { display: none; }
.xb-embedded .xb-header { top: 0; box-shadow: none; }
.xb-embedded .xb-product-bar { border-top: 0; }
@media (max-width: 680px) {
  .xb-embedded {
    --xb-header-height: 52px;
    scroll-padding-top: 60px;
  }
}