/* ============================================================
   vercel-editorial/chrome.css — Topbar + Footer overlay only
   Loaded AFTER default/common.css. Selectors are scoped to
   #topbar / #webFooter / #footerFriend / #backToTopBtn
   to avoid polluting fallback pages' content area.
   ============================================================ */

/* Geist + Geist Mono (self-hosted, no external network dependency) */
@import url('fonts.css');

/* ---------- Tokens (also re-declared in common.css) ---------- */
:root {
  --color-bg:           #ffffff;
  --color-bg-tint:      #fafafa;
  --color-fg:           #171717;
  --color-fg-2:         #4d4d4d;
  --color-fg-3:         #666666;
  --color-fg-mute:      #808080;
  --color-divider:      #ebebeb;

  --color-link:         #0072f5;
  --color-focus:        hsla(212, 100%, 48%, 1);
  --color-badge-bg:     #ebf5ff;
  --color-badge-fg:     #0068d6;

  --shadow-border:        0 0 0 1px rgba(0, 0, 0, 0.08);
  --shadow-border-light:  0 0 0 1px rgb(235, 235, 235);
  --shadow-elev-2:        0 2px 2px rgba(0, 0, 0, 0.04);
  --shadow-elev-3:        0 8px 8px -8px rgba(0, 0, 0, 0.04);
  --shadow-card:
    0 0 0 1px rgba(0, 0, 0, 0.08),
    0 2px 2px rgba(0, 0, 0, 0.04),
    0 8px 8px -8px rgba(0, 0, 0, 0.04),
    inset 0 0 0 1px #fafafa;

  --radius-6:    6px;
  --radius-8:    8px;
  --radius-100:  100px;
  --radius-pill: 9999px;

  --sp-1:  4px;  --sp-2:  8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 32px;  --sp-6: 40px;  --sp-7: 64px; --sp-8: 80px;

  --font-sans: 'Geist', Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, Monaco;

  --fw-read:   400;
  --fw-ui:     500;
  --fw-strong: 600;
}

/* =============================================================
   TOPBAR
   ============================================================= */
#topbar {
  background: var(--color-bg);
  font-family: var(--font-sans);
  font-feature-settings: "liga" 1;
  border-bottom: 0;
  box-shadow: var(--shadow-border);
  position: relative;
  z-index: 100;
}
#topbar a { text-decoration: none; }

/* utility row (login, language, cart) */
#topbar #headbar-1 {
  background: var(--color-bg);
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-fg-2);
  padding: 8px 0;
  border-bottom: 0;
  box-shadow: 0 1px 0 0 var(--color-divider);
}
#topbar #headbar-1 .container1180 { overflow: visible; }
#topbar #headbar-1 ul { list-style: none; padding: 0; margin: 0; }
#topbar #headbar-1 li { display: inline-block; vertical-align: middle; }
#topbar #headbar-1 a {
  color: var(--color-fg-2);
  font-weight: var(--fw-ui);
  padding: 0 6px;
  border-radius: var(--radius-6);
  transition: color 120ms ease, background 120ms ease;
}
#topbar #headbar-1 a:hover { color: var(--color-fg); background: var(--color-bg-tint); }
/* keep default's text-based "|" divider; just tone it down */
#topbar #headbar-1 .divider {
  color: var(--color-divider);
  background: transparent !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 4px !important;
  font-size: 12px;
  line-height: inherit;
  user-select: none;
  vertical-align: baseline;
}

/* logo row */
#topbar #headbar-2 {
  background: var(--color-bg);
  padding: 20px 0;
  border-bottom: 0;
}
#topbar #headbar-2 .logo img {
  max-height: 44px;
  width: auto;
  display: block;
}

/* main nav — preserve default's geometry (height:45px / float layout / 292px quanbufenlei),
   only override colors, font, and decorations. Do NOT change inline-block/float. */
#topbar #tnavbarMain {
  background: var(--color-bg);
  border: 0;
  box-shadow: var(--shadow-border);
  padding: 0;
  /* keep default: position: relative; height: 45px; */
}
#topbar #tnavbarMain .container1180 { position: relative; }

/* hide default's color bars (blue/red split that bleeds behind nav) */
#topbar #tnavbarMain .color-bar { display: none !important; }

/* "全部商品分类" block — keep 292x45 geometry, change blue → vercel-editorial black */
#topbar #tnavbarMain .quanbufenlei {
  background: var(--color-fg) !important;
  color: var(--color-bg) !important;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: var(--fw-ui);
  letter-spacing: -0.2px;
  /* preserve default: position:relative; float:left; width:292px; height:45px;
     line-height:45px; text-align:center */
}

/* hamburger icon: replace default's bg-image with three-line CSS */
#topbar #tnavbarMain .quanbufenlei .icon {
  background:
    linear-gradient(var(--color-bg), var(--color-bg)) center top    / 14px 1.5px no-repeat,
    linear-gradient(var(--color-bg), var(--color-bg)) center center / 14px 1.5px no-repeat,
    linear-gradient(var(--color-bg), var(--color-bg)) center bottom / 14px 1.5px no-repeat
    !important;
  width: 14px !important;
  height: 12px !important;
}

/* nav tabs — keep default float layout */
#topbar #tnavbarMain li.navTab {
  /* preserve default: display:block; float:left; line-height:15px;
     padding: 0 17px 0; margin-top:15px; font-size:13px */
  font-family: var(--font-sans);
}
#topbar #tnavbarMain li.navTab a {
  color: var(--color-fg) !important;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: var(--fw-ui);
  letter-spacing: 0;
  transition: color 120ms ease;
}
#topbar #tnavbarMain li.navTab a:hover { color: var(--color-fg-2) !important; }
#topbar #tnavbarMain li.navTab.active a {
  color: var(--color-fg) !important;
  font-weight: var(--fw-strong);
  letter-spacing: -0.2px;
}

/* hide vertical pipe dividers between nav tabs (replaced by shadow-border on bar) */
#topbar #tnavbarMain li.divider { display: none !important; }

/* navigator dropdown — keep default's absolute positioning + display:none/hover toggle,
   only restyle background/shadow */
#topbar #tnavbarMain #indexNavigator {
  background: var(--color-bg) !important;
  background-image: none !important;
  box-shadow: var(--shadow-card) !important;
  border: 0 !important;
  border-radius: var(--radius-8) !important;
  padding: 8px 0 !important;
  height: auto !important;
  /* default common.css forces height:407px for its background image (web/index_p12.png);
     vercel-editorial uses a plain white surface so height must follow content.
     margin-top intentionally NOT set: any gap between .quanbufenlei (h:45px) and this
     absolutely-positioned dropdown (top:45px) lets the mouse exit the parent's hover
     region while crossing, which fires mouseleave -> common.js slideUp(). */
  /* preserve default: position:absolute; top:45px; left:0; width:292px; display:none */
}
#topbar #tnavbarMain #indexNavigator .item {
  border: 0 !important;
  border-top: 1px solid var(--color-divider) !important;
  padding: 10px 16px !important;
  margin: 0 !important;
}
#topbar #tnavbarMain #indexNavigator .item:first-child { border-top: 0 !important; }
#topbar #tnavbarMain #indexNavigator .item a {
  border: 0 !important;
  padding: 0 !important;
  color: var(--color-fg) !important;
}
#topbar #tnavbarMain #indexNavigator .item a .title {
  color: var(--color-fg) !important;
  font-weight: var(--fw-ui);
  font-family: var(--font-sans);
  /* reserve right space so the absolutely-positioned .arrow (right:10px, ~10px wide)
     never paints over float:left .title text on hover */
  padding-right: 24px !important;
}
#topbar #tnavbarMain #indexNavigator .item:hover {
  background: var(--color-bg-tint) !important;
}
#topbar #tnavbarMain #indexNavigator .item:hover .title {
  color: var(--color-fg) !important;
}

/* third-party login icons inline */
#topbar #headbar-1 i[style*="background:url"] {
  width: 16px !important;
  height: 16px !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  margin-right: 4px;
  vertical-align: middle !important;
}

/* legacy buttons used in topbar (.btn1/.btn2/.btn3/.trans) */
#topbar .trans { transition: color 120ms ease, background 120ms ease; }

/* =============================================================
   FOOTER (Friends / Keywords / Main / Copyright)
   ============================================================= */
#footerFriend {
  background: var(--color-bg-tint);
  font-family: var(--font-sans);
  border-top: 0;
  box-shadow: var(--shadow-border);
  padding: 32px 0 24px;
  margin-top: 64px;
}
#footerFriend h2 {
  font-size: 16px;
  font-weight: var(--fw-strong);
  letter-spacing: -0.32px;
  color: var(--color-fg);
  text-align: center;
  margin: 0 0 16px;
}
#footerFriend .decor-bar {
  width: 32px;
  height: 2px;
  background: var(--color-fg);
  margin: 0 auto 24px;
}
#footerFriend .wrapper {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}
#footerFriend .wrapper > div { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; align-items: center; }
#footerFriend a {
  display: inline-block;
  padding: 8px;
  border-radius: var(--radius-8);
  box-shadow: var(--shadow-border-light);
  background: var(--color-bg);
  transition: box-shadow 120ms ease, transform 120ms ease;
}
#footerFriend a:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}
#footerFriend img { display: block; max-height: 36px; opacity: 0.7; }
#footerFriend a:hover img { opacity: 1; }

#yejiaoguanjianciCon {
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--color-fg-3);
  line-height: 1.7;
  width: auto !important;
  max-width: 1180px;
  margin: 32px auto !important;
  padding: 0 16px;
}

#webFooter {
  background: var(--color-bg);
  font-family: var(--font-sans);
  border-top: 0;
  box-shadow: var(--shadow-border);
  padding: 64px 0 32px;
  color: var(--color-fg-2);
}
#webFooter .navCon {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
#webFooter .navCon ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
}
#webFooter .navCon ul > li { margin: 0; }
#webFooter .navCon .title {
  font-size: 14px;
  font-weight: var(--fw-strong);
  color: var(--color-fg);
  letter-spacing: -0.2px;
  margin: 0 0 12px;
  text-transform: uppercase;
}
#webFooter .navCon p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-fg-2);
  margin: 0 0 8px;
}
#webFooter .navCon a {
  color: var(--color-fg-2);
  text-decoration: none;
  transition: color 120ms ease;
}
#webFooter .navCon a:hover { color: var(--color-fg); }

#webFooter .kefurexian { /* customer service column */ }
#webFooter .kefurexian .logo img { max-height: 32px; margin-bottom: 8px; }
#webFooter .kefurexian .title { margin-top: 8px; }

#webFooter .container1180[style*="border-top"] {
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: var(--shadow-border);
  margin: 32px auto 16px !important;
  height: 0;
}

#webFooter #webCopyright {
  text-align: center;
  font-size: 12px;
  color: var(--color-fg-3);
  margin: 0;
  line-height: 1.8;
}
#webFooter #webCopyright a { color: var(--color-fg-3); }
#webFooter #webCopyright a:hover { color: var(--color-fg); }

/* back-to-top button */
#backToTopBtn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  z-index: 50;
  transition: transform 120ms ease;
}
#backToTopBtn:hover { transform: translateY(-2px); }
#backToTopBtn::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--color-fg);
  border-left: 2px solid var(--color-fg);
  transform: translateY(2px) rotate(45deg);
}

/* keyboard focus */
#topbar a:focus-visible,
#webFooter a:focus-visible,
#footerFriend a:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

/* =============================================================
   ACCESSIBILITY — Reduced motion preference
   When the user has system-level "Reduce motion" turned on, neutralise
   all transitions, animations, and hover lift transforms across both
   chrome and content areas of the vercel-editorial theme.
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Disable hover-lift transforms specifically used in vercel-editorial theme */
  #topbar a:hover,
  #footerFriend a:hover,
  #backToTopBtn:hover,
  .section-t1 a.block:hover,
  .fp-card:hover,
  .fp-more:hover {
    transform: none !important;
  }
  .fp-card:hover .fp-thumb img { transform: none !important; }
}
