:root {
  --cs-blue: #4f55ff;
  --cs-blue-dark: #2228bd;
  --cs-blue-soft: #eef0ff;
  --cs-bg: #f3f6fb;
  --cs-card: #ffffff;
  --cs-ink: #151d3f;
  --cs-muted: #7f899f;
  --cs-line: #e7ebf4;
  --cs-red: #ff343c;
  --cs-shadow: 0 10px 30px rgba(58, 74, 135, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--cs-ink);
  background: #f4f7fc;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.cs-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--cs-line);
  box-shadow: 0 4px 16px rgba(31, 43, 91, .03);
}
.cs-header-inner {
  width: min(1388px, calc(100% - 48px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 42px;
}
.cs-brand {
  flex: 0 0 246px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cs-logo-wrap {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.cs-logo-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.cs-brand-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.cs-brand-copy strong { font-size: 20px; line-height: 1.2; letter-spacing: .5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-brand-copy small { color: var(--cs-muted); font-size: 11px; letter-spacing: 2px; white-space: nowrap; }

.cs-search {
  height: 50px;
  display: flex;
  align-items: center;
  border: 1px solid #bdc7ff;
  border-radius: 20px;
  padding: 4px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(79, 85, 255, .09);
}
.cs-header-inner > .cs-search { flex: 1 1 550px; min-width: 260px; }
.cs-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0 18px; color: var(--cs-ink); font-size: 14px; }
.cs-search input::placeholder { color: #9ca6bb; }
.cs-search button {
  height: 40px;
  min-width: 91px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--cs-blue);
  cursor: pointer;
}
.cs-search button i { margin-right: 7px; }
.cs-search button:hover { background: #4248ed; }

.cs-top-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 28px; }
.cs-top-actions > a { position: relative; display: flex; align-items: center; gap: 9px; font-size: 13px; white-space: nowrap; }
.cs-top-actions > a > i { color: #0f1739; font-size: 21px; }
.cs-top-actions > a:hover { color: var(--cs-blue); }
.cs-top-actions b:empty { display: none; }
.cs-top-actions b { position: absolute; top: -10px; left: 15px; min-width: 17px; height: 17px; border-radius: 9px; padding: 0 4px; line-height: 17px; font-size: 10px; text-align: center; color: #fff; background: var(--cs-red); }
.cs-account { margin-left: 2px; }
.cs-avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--cs-blue); background: var(--cs-blue-soft); font-size: 22px; }
.cs-account > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.cs-account strong { font-size: 13px; font-weight: 600; }
.cs-account small { color: var(--cs-muted); font-size: 10px; }
.cs-search-mobile, .cs-mobile-bell, .cs-mobile-categories, .cs-mobile-nav { display: none; }

.cs-page-shell {
  width: min(1388px, calc(100% - 48px));
  margin: 15px auto 40px;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.cs-sidebar {
  position: sticky;
  top: 85px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--cs-shadow);
}
.cs-sidebar-title {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 0 23px;
  color: #fff;
  background: var(--cs-blue);
  font-size: 16px;
  font-weight: 700;
}
.cs-sidebar-title i { font-size: 17px; }
.cs-sidebar-scroll { max-height: calc(100vh - 126px); overflow-y: auto; padding: 7px 0 14px; scrollbar-width: thin; }
.cs-category-group { padding: 7px 12px 2px; }
.cs-parent-category {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 0;
  padding: 4px 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}
.cs-parent-category > i { flex: 0 0 20px; width: 20px; color: var(--cs-blue); font-size: 19px; text-align: center; }
.cs-parent-category strong,
.cs-category-name {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  writing-mode: horizontal-tb !important;
}
.cs-parent-category strong { font-size: 14px; font-weight: 700; }
.cs-toggle-chevron { flex: 0 0 16px; width: 16px; color: #425074; font-size: 12px; text-align: center; transition: transform .2s; }
.cs-subcategories { display: none; gap: 2px; padding: 2px 0 3px 28px; }
.cs-category-group.expanded > .cs-subcategories { display: grid; }
.cs-subcategory-group { min-width: 0; }
.cs-subcategories button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  padding: 4px 10px;
  background: transparent;
  color: #6f7a95;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.cs-subcategories button:hover, .cs-subcategories button.active { color: var(--cs-blue); background: var(--cs-blue-soft); font-weight: 600; }
.cs-child-category { gap: 6px; }
.cs-third-categories { display: none; padding: 2px 0 2px 13px; }
.cs-subcategory-group.expanded > .cs-third-categories { display: grid; gap: 2px; }
.cs-subcategories button.cs-third-category { gap: 6px; padding-left: 10px; font-size: 12px; color: #8a93a8; }
.cs-category-icon,
.cs-mobile-categories button img.cs-category-icon,
.cs-sidebar img.cs-category-icon {
  display: inline-block !important;
  width: 20px !important;
  min-width: 20px !important;
  max-width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;
  max-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  object-fit: cover !important;
  border: 0 !important;
  border-radius: 5px !important;
  flex: 0 0 20px !important;
  vertical-align: middle !important;
}
.cs-third-category img.cs-category-icon { width: 18px !important; min-width: 18px !important; max-width: 18px !important; height: 18px !important; min-height: 18px !important; max-height: 18px !important; flex-basis: 18px !important; }
.cs-subcategories button { display: flex; align-items: center; }
.cs-mobile-categories button { display: inline-flex; align-items: center; }

.cs-content { min-width: 0; display: flex; flex-direction: column; }
.cs-hero-row { order: 1; }
.cs-announcement { order: 2; }
.cs-feature-strip { order: 3; }
.cs-products { order: 4; }
.cs-footer { order: 5; }
.cs-hero-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(250px, 1.1fr); gap: 14px; }
.cs-hero, .cs-gift {
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--cs-shadow);
}
.cs-hero {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #e8ebff;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.cs-hero-copy { position: relative; z-index: 1; width: 56%; padding-left: 68px; display: flex; align-items: flex-start; flex-direction: column; }
.cs-hero-copy > strong { max-width: 580px; color: #1724b0; font-size: clamp(24px, 2.1vw, 38px); line-height: 1.23; letter-spacing: .5px; font-weight: 800; }
.cs-hero-copy > small { margin-top: 10px; color: #33439d; font-size: 15px; letter-spacing: 1px; }
.cs-hero-cta { margin-top: 22px; height: 40px; min-width: 120px; padding: 0 20px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; color: #fff; background: var(--cs-blue); font-size: 14px; }
.cs-hero:hover .cs-hero-cta { background: #3f45ea; }
.cs-gift {
  display: flex;
  align-items: flex-start;
  background: #eef0ff url('gift-box.png') center / cover no-repeat;
  padding: 23px 20px;
}
.cs-gift > span { display: flex; align-items: flex-start; flex-direction: column; position: relative; z-index: 1; }
.cs-gift strong { color: #1724a5; font-size: 24px; line-height: 1.2; }
.cs-gift small { color: #4b5794; font-size: 13px; margin-top: 8px; }
.cs-gift b { margin-top: 18px; padding: 10px 22px; border-radius: 18px; color: #fff; background: var(--cs-blue); font-size: 13px; font-weight: 500; }

.cs-feature-strip {
  min-height: 75px;
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--cs-shadow);
}
.cs-feature-strip > div { min-width: 0; padding: 0 22px; display: flex; align-items: center; gap: 17px; border-right: 1px solid var(--cs-line); }
.cs-feature-strip > div:last-child { border-right: 0; }
.cs-feature-strip > div > i { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--cs-blue); background: #f0f2ff; font-size: 25px; }
.cs-feature-strip span { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.cs-feature-strip strong { font-size: 14px; }
.cs-feature-strip small { color: var(--cs-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cs-announcement {
  width: 100%;
  height: 48px;
  margin: 14px 0;
  padding: 0 20px;
  border: 0;
  border-radius: 10px;
  display: grid;
  grid-template-columns: 23px auto 1fr auto;
  gap: 9px;
  align-items: center;
  background: #fff;
  box-shadow: var(--cs-shadow);
  text-align: left;
  cursor: pointer;
}
.cs-announcement > i, .cs-announcement strong { color: var(--cs-blue); }
.cs-announcement strong { font-size: 14px; }
.cs-announcement span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #59647e; font-size: 13px; }
.cs-announcement em { color: #73809a; font-style: normal; font-size: 12px; }

.cs-products { overflow: hidden; border-radius: 12px; }
.cs-toolbar {
  height: 55px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--cs-line);
}
.cs-sort { display: flex; align-items: center; gap: 8px; }
.cs-sort button { height: 34px; border: 0; border-radius: 7px; padding: 0 15px; background: transparent; color: #39435e; cursor: pointer; font-size: 13px; }
.cs-sort button.active { color: var(--cs-blue); background: var(--cs-blue-soft); font-weight: 700; }
.cs-sort button i { margin-left: 4px; font-size: 11px; }
.cs-toolbar-meta { display: flex; align-items: center; gap: 14px; color: var(--cs-muted); font-size: 12px; }
.cs-toolbar-meta button { width: 34px; height: 34px; border: 0; border-radius: 7px; color: var(--cs-blue); background: var(--cs-blue-soft); cursor: pointer; }

.cs-goods-grid { padding: 12px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; background: transparent; }
.cs-goods-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #edf0f6;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(52, 65, 113, .05);
  transition: transform .2s, box-shadow .2s;
}
.cs-goods-card:hover { transform: translateY(-3px); box-shadow: 0 14px 28px rgba(52, 65, 113, .10); }
.cs-product-link { display: block; }
.cs-product-image { position: relative; height: 188px; overflow: hidden; background: #f8f9fc; }
.cs-product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cs-sold-out { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(19, 26, 57, .52); font-weight: 700; font-size: 15px; }
.cs-product-body { padding: 14px 14px 13px; }
.cs-product-name { height: 42px; margin: 0; overflow: hidden; color: #1b2340; font-size: 15px; line-height: 21px; font-weight: 700; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cs-product-desc { height: 20px; margin: 2px 0 0; overflow: hidden; color: #8b94a8; font-size: 12px; line-height: 20px; white-space: nowrap; text-overflow: ellipsis; }
.cs-product-tags { height: 24px; display: flex; align-items: center; gap: 6px; overflow: hidden; }
.cs-product-tags span { flex: 0 0 auto; padding: 3px 7px; border-radius: 6px; color: var(--cs-blue); background: var(--cs-blue-soft); font-size: 10px; }
.cs-product-tags span.hot { color: var(--cs-red); background: #fff0f1; }
.cs-product-bottom { margin-top: 8px; display: flex; align-items: flex-end; justify-content: space-between; gap: 7px; }
.cs-product-price { color: var(--cs-red); font-weight: 800; font-size: 20px; line-height: 1; }
.cs-product-price small { font-size: 13px; }
.cs-product-meta { margin-top: 8px; color: #9aa3b5; font-size: 10px; display: flex; gap: 10px; }
.cs-product-actions { display: flex; align-items: center; gap: 8px; }
.cs-cart-button, .cs-buy-button { height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; }
.cs-cart-button { width: 32px; color: var(--cs-blue); border: 1px solid #d9ddff; background: #fff; }
.cs-buy-button { padding: 0 13px; color: #fff; background: var(--cs-blue); font-size: 11px; }
.cs-buy-button.disabled { background: #adb4c5; }

.cs-goods-grid.list-view { grid-template-columns: 1fr; }
.cs-goods-grid.list-view .cs-product-link { display: grid; grid-template-columns: 190px 1fr; }
.cs-goods-grid.list-view .cs-product-image { height: 150px; }
.cs-goods-grid.list-view .cs-product-name { height: auto; }

.cs-empty { grid-column: 1 / -1; min-height: 250px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--cs-muted); background: #fff; border-radius: 12px; }
.cs-empty i { color: #c6cbe1; font-size: 44px; }
.cs-load-state { display: flex; justify-content: center; padding: 20px 0 5px; }
.cs-load-state button { min-width: 118px; height: 38px; border: 1px solid #dce0f5; border-radius: 20px; color: var(--cs-blue); background: #fff; cursor: pointer; }
.cs-load-state button:disabled { color: #a0a8b9; cursor: default; }
.cs-footer { padding: 36px 12px 8px; color: #8d96aa; text-align: center; font-size: 12px; line-height: 1.8; }
.cs-footer p { margin: 0; }

.cs-modal { position: fixed; inset: 0; z-index: 300; display: none; place-items: center; padding: 20px; }
.cs-modal.open { display: grid; }
.cs-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(13, 18, 43, .55); }
.cs-modal > section { position: relative; z-index: 1; width: min(520px, 100%); max-height: min(680px, calc(100vh - 40px)); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.22); }
.cs-modal header { height: 60px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--cs-line); }
.cs-modal h2 { margin: 0; font-size: 18px; }
.cs-modal header button { width: 34px; height: 34px; border: 0; border-radius: 50%; color: #68738d; background: #f2f4f8; cursor: pointer; }
.cs-modal section > div { max-height: calc(100vh - 190px); padding: 22px; overflow-y: auto; color: #4d5872; font-size: 14px; line-height: 1.8; }
.cs-modal section > footer { padding: 0 20px 20px; }
.cs-modal section > footer button { width: 100%; height: 42px; border: 0; border-radius: 10px; color: #fff; background: var(--cs-blue); cursor: pointer; }

@media (max-width: 1180px) {
  .cs-header-inner { gap: 22px; }
  .cs-brand { flex-basis: 205px; }
  .cs-top-actions { gap: 17px; }
  .cs-top-actions > a:not(.cs-account) span { display: none; }
  .cs-goods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cs-hero-copy { padding-left: 42px; }
}

@media (max-width: 820px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); background: #f3f6fb; }
  .cs-header { position: relative; padding: 0 14px 12px; border: 0; background: #fff; }
  .cs-header-inner { width: 100%; height: 72px; gap: 10px; }
  .cs-brand { flex: 1; }
  .cs-logo-wrap { width: 42px; height: 42px; }
  .cs-brand-copy strong { font-size: 18px; }
  .cs-brand-copy small { font-size: 9px; letter-spacing: 1.5px; }
  .cs-header-inner > .cs-search, .cs-top-actions { display: none; }
  .cs-mobile-bell { position: relative; width: 42px; height: 42px; display: grid; place-items: center; color: var(--cs-ink); font-size: 20px; }
  .cs-mobile-bell::after { content: ''; position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; border: 2px solid #fff; background: var(--cs-red); }
  .cs-search-mobile { height: 44px; display: flex; border-radius: 16px; }
  .cs-search-mobile input { padding: 0 12px; font-size: 13px; }
  .cs-search-mobile button { min-width: 50px; height: 36px; border-radius: 14px; font-size: 18px; }
  .cs-search-mobile button i { margin: 0; }

  .cs-mobile-categories {
    position: sticky;
    top: 0;
    z-index: 80;
    height: 45px;
    padding: 0 14px;
    display: flex;
    align-items: stretch;
    gap: 22px;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid var(--cs-line);
    scrollbar-width: none;
  }
  .cs-mobile-categories::-webkit-scrollbar { display: none; }
  .cs-mobile-categories button { flex: 0 0 auto; position: relative; border: 0; padding: 0; color: #26304d; background: transparent; font-size: 13px; white-space: nowrap; }
  .cs-mobile-categories button.active { color: var(--cs-blue); font-weight: 700; }
  .cs-mobile-categories button.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--cs-blue); }

  .cs-page-shell { width: 100%; margin: 0; display: block; }
  .cs-sidebar { display: none; }
  .cs-content { width: 100%; }
  .cs-hero-row { order: 1; }
  .cs-feature-strip { order: 2; }
  .cs-announcement { order: 3; }
  .cs-products { order: 4; }
  .cs-footer { order: 5; }
  .cs-hero-row { display: block; padding: 10px 14px 0; }
  .cs-hero { height: 132px; border-radius: 9px; background-position: center; }
  .cs-gift { display: none; }
  .cs-hero-copy { width: 57%; padding-left: 25px; }
  .cs-hero-copy > strong { font-size: clamp(20px, 6.2vw, 28px); line-height: 1.32; }
  .cs-hero-copy > small { margin-top: 7px; font-size: 11px; letter-spacing: 0; white-space: nowrap; }
  .cs-hero-cta { width: 40px; min-width: 40px; height: 4px; margin-top: 13px; padding: 0; overflow: hidden; color: transparent; background: var(--cs-blue); }
  .cs-hero-cta i { display: none; }

  .cs-feature-strip { min-height: 78px; margin: 10px 0 0; border-radius: 0; box-shadow: none; }
  .cs-feature-strip > div { min-width: 0; height: 58px; padding: 0 4px; gap: 5px; flex-direction: column; justify-content: center; text-align: center; }
  .cs-feature-strip > div > i { flex-basis: 28px; width: 28px; height: 28px; background: transparent; font-size: 24px; }
  .cs-feature-strip span { display: block; }
  .cs-feature-strip strong { font-size: 12px; white-space: nowrap; }
  .cs-feature-strip small { display: none; }

  .cs-announcement { height: 42px; margin: 8px 10px; width: calc(100% - 20px); padding: 0 12px; grid-template-columns: 19px auto 1fr auto; gap: 6px; border-radius: 9px; }
  .cs-announcement strong { font-size: 12px; }
  .cs-announcement span { font-size: 11px; }
  .cs-announcement em { font-size: 10px; }

  .cs-products { border-radius: 0; }
  .cs-toolbar { height: 48px; padding: 0 8px 0 10px; }
  .cs-sort { flex: 1; justify-content: space-between; gap: 1px; }
  .cs-sort button { height: 32px; padding: 0 9px; font-size: 12px; }
  .cs-toolbar-meta span, .cs-toolbar-meta button { display: none; }
  .cs-goods-grid, .cs-goods-grid.list-view { padding: 8px 9px 0; display: grid; grid-template-columns: 1fr; gap: 7px; }
  .cs-goods-card { border-radius: 9px; box-shadow: none; }
  .cs-goods-card:hover { transform: none; box-shadow: none; }
  .cs-product-link, .cs-goods-grid.list-view .cs-product-link { min-height: 119px; display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: stretch; }
  .cs-product-image, .cs-goods-grid.list-view .cs-product-image { height: 100%; min-height: 119px; }
  .cs-product-body { min-width: 0; padding: 10px 10px 8px; display: flex; flex-direction: column; }
  .cs-product-name { height: 20px; font-size: 14px; line-height: 20px; -webkit-line-clamp: 1; white-space: nowrap; text-overflow: ellipsis; display: block; }
  .cs-product-desc { height: 18px; margin-top: 0; line-height: 18px; font-size: 11px; }
  .cs-product-tags { height: 23px; }
  .cs-product-tags span { padding: 2px 6px; font-size: 9px; }
  .cs-product-bottom { margin-top: auto; align-items: center; }
  .cs-product-price { font-size: 18px; }
  .cs-product-meta { margin-top: 4px; gap: 7px; font-size: 9px; }
  .cs-cart-button { width: 31px; height: 31px; }
  .cs-buy-button { height: 31px; padding: 0 15px; border-radius: 7px; font-size: 11px; }
  .cs-load-state { padding: 15px 0 4px; }
  .cs-footer { padding: 25px 12px 5px; }

  .cs-mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    height: calc(64px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    background: rgba(255,255,255,.98);
    border-top: 1px solid var(--cs-line);
    box-shadow: 0 -5px 18px rgba(30, 43, 88, .06);
  }
  .cs-mobile-nav a { flex: 1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; color: #8b95a9; font-size: 10px; }
  .cs-mobile-nav i { font-size: 21px; }
  .cs-mobile-nav a.active { color: var(--cs-blue); }
}

@media (max-width: 380px) {
  .cs-hero { height: 126px; }
  .cs-hero-copy { padding-left: 18px; }
  .cs-hero-copy > strong { font-size: 19px; }
  .cs-product-link, .cs-goods-grid.list-view .cs-product-link { grid-template-columns: 104px minmax(0, 1fr); }
  .cs-sort button { padding: 0 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Homepage carousel: reserve stable height and keep each content block separated. */
.cs-content { gap: 16px; }
.cs-content > .cs-hero-row, .cs-content > .cs-announcement, .cs-content > .cs-feature-strip, .cs-content > .cs-products { flex-shrink: 0; margin: 0; }
.cs-hero-row { display: block; width: 100%; padding: 0; }
.cs-hero.cs-carousel { display: block; width: 100%; height: auto; aspect-ratio: 3.5 / 1; min-height: 210px; max-height: 370px; padding: 0; }
.cs-carousel-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .55s ease, visibility .55s; }
.cs-carousel-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
.cs-carousel-slide > a { display: block; width: 100%; height: 100%; }
.cs-carousel-slide img { display: block; width: 100%; height: 100%; object-fit: cover; background: #edf0fa; }
.cs-feature-strip { padding: 14px 0; min-height: 86px; }
.cs-products { min-width: 0; }
@media (max-width: 767px) {
  .cs-content { gap: 12px; }
  .cs-content > .cs-hero-row { padding: 12px 12px 0; }
  .cs-hero.cs-carousel { min-height: 0; max-height: none; aspect-ratio: 3.5 / 1; border-radius: 10px; }
  .cs-feature-strip { padding: 10px 0; min-height: 78px; }
}
@media (prefers-reduced-motion: reduce) { .cs-carousel-slide { transition: none; } }

/* Category browser: top roots, left branches and independent product list. */
.cs-root-icon { display:none; }
.cs-category-view { height:100dvh; overflow:hidden; display:flex; flex-direction:column; padding-bottom:0; }
.cs-category-view .cs-mobile-categories { display:flex; flex-shrink:0; height:74px; gap:12px; padding:8px 16px; overflow-x:auto; background:#fff; border-bottom:1px solid var(--cs-line); }
.cs-category-view .cs-mobile-categories button { min-width:76px; display:flex; align-items:center; justify-content:center; gap:7px; border:0; padding:10px 12px; border-radius:12px; background:#f5f7ff; font-size:13px; }
.cs-category-view .cs-mobile-categories button.active { color:var(--cs-blue); background:var(--cs-blue-soft); font-weight:700; }
.cs-category-view .cs-mobile-categories button.active::after { display:none; }
.cs-category-view .cs-category-icon { width:26px; height:26px; border-radius:7px; }
.cs-category-view .cs-page-shell { flex:1; min-height:0; display:grid; grid-template-columns:190px minmax(0,1fr); gap:14px; margin:0 auto; padding:14px 0; overflow:hidden; }
.cs-category-view .cs-sidebar { display:block; position:relative; top:0; align-self:stretch; min-height:0; overflow-y:auto; background:#eef1fa; box-shadow:none; border-radius:14px; }
.cs-category-view .cs-sidebar-scroll { max-height:none; overflow:visible; }
.cs-category-view .cs-mobile-categories .cs-root-icon { display:none; }
.cs-category-view .cs-sidebar-title { display:none; }
.cs-category-view .cs-category-group { display:none; }
.cs-category-view .cs-category-group.cs-browser-parent { display:block; }
.cs-category-view .cs-category-group > .cs-subcategories { display:block; padding:0 6px 8px; }
.cs-category-view .cs-parent-category { min-height:42px; padding:12px; }
.cs-category-view .cs-parent-category > i,.cs-category-view .cs-parent-category > .cs-category-icon,.cs-category-view .cs-parent-category > .cs-toggle-chevron { display:none; }
.cs-category-view .cs-subcategories button { min-height:44px; padding:12px 10px; border-radius:10px; background:transparent; }
.cs-category-view .cs-subcategories button.active { background:#fff; color:var(--cs-blue); }
.cs-category-view .cs-category-name { white-space:normal; overflow:visible; line-height:1.5; }
.cs-category-view .cs-content { min-height:0; height:100%; align-self:stretch; overflow-y:auto; overscroll-behavior:contain; }
.cs-category-view .cs-content > .cs-hero-row,.cs-category-view .cs-feature-strip,.cs-category-view .cs-announcement,.cs-category-view .cs-footer { display:none; }
.cs-category-view .cs-goods-grid { display:grid; grid-template-columns:1fr; padding:8px 0; gap:10px; }
body.cs-category-view .cs-goods-grid .cs-product-link { display:grid; grid-template-columns:90px minmax(0,1fr); min-height:118px; }
.cs-category-view .cs-product-image { height:100%; min-height:118px; }
.cs-category-view .cs-product-name { white-space:normal; height:auto; display:-webkit-box; -webkit-line-clamp:2; font-size:14px; }
.cs-category-view .cs-product-desc,.cs-category-view .cs-product-tags,.cs-category-view .cs-product-meta { display:none; }
.cs-category-view .cs-product-body { min-width:0; padding:12px; display:flex; flex-direction:column; justify-content:space-between; }
.cs-category-view .cs-product-bottom { flex-wrap:wrap; gap:7px; }
.cs-category-view .cs-product-price { font-size:17px; }
.cs-category-view .cs-buy-button { height:30px; padding:0 10px; font-size:11px; }
.cs-category-view .cs-cart-button { width:28px; height:28px; }
.cs-category-view .cs-toolbar-meta { display:none; }
@media(max-width:820px){
  .cs-category-view { padding-bottom:calc(64px + env(safe-area-inset-bottom)); }
  .cs-category-view .cs-header { padding:14px 12px 10px; flex-shrink:0; }
  .cs-category-view .cs-header-inner { display:none; }
  .cs-category-view .cs-mobile-categories { position:relative; height:70px; gap:8px; padding:8px 10px; }
  .cs-category-view .cs-mobile-categories button { min-width:72px; padding:8px; flex-direction:column; gap:4px; font-size:12px; }
  .cs-category-view .cs-mobile-categories .cs-root-icon { display:grid; place-items:center; width:25px; height:25px; background:#e7e9ff; color:var(--cs-blue); border-radius:8px; font-size:16px; }
  .cs-category-view .cs-page-shell { width:100%; grid-template-columns:104px minmax(0,1fr); gap:8px; padding:8px 8px 0; }
  .cs-category-view .cs-sidebar { border-radius:12px; }
  .cs-category-view .cs-parent-category { padding:12px 8px; }
  .cs-category-view .cs-parent-category strong { white-space:normal; font-size:12px; }
  .cs-category-view .cs-subcategories button { padding:10px 7px; font-size:12px; }
  .cs-category-view .cs-third-categories { padding-left:5px; }
  .cs-category-view .cs-subcategories button.cs-third-category { padding:8px 6px; font-size:11px; }
  .cs-category-view .cs-toolbar { margin:0; padding:4px; min-height:36px; height:36px; }
  .cs-category-view .cs-sort button { padding:0 5px; font-size:11px; height:28px; }
  body.cs-category-view .cs-goods-grid .cs-product-link { grid-template-columns:60px minmax(0,1fr); min-height:112px; }
  .cs-category-view .cs-product-image { min-height:112px; }
  .cs-category-view .cs-product-body { padding:8px; }
  .cs-category-view .cs-product-name { font-size:12px; }
  .cs-category-view .cs-product-actions { gap:5px; }
  .cs-category-view .cs-product-bottom { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; width:100%; }
  .cs-category-view .cs-product-price { white-space:nowrap; }
  .cs-category-view .cs-sold-out { font-size:10px; line-height:15px; padding:4px; text-align:center; }
  .cs-category-view .cs-product-price { font-size:15px; }
  .cs-category-view .cs-goods-card:hover { transform:none; }
}
/* Wrapping sidebar and square product artwork. Hide sidebar icons only on mobile. */
@media(max-width:820px){
 .cs-sidebar-scroll img.cs-category-icon { display:none !important; }
 .cs-sidebar-scroll .cs-parent-category > i { display:none !important; }
}
.cs-sidebar-scroll .cs-category-name,.cs-sidebar-scroll .cs-parent-category strong { white-space:normal; overflow:visible; text-overflow:clip; overflow-wrap:anywhere; line-height:1.6; }
.cs-sidebar-scroll .cs-category-group { padding:6px; }
.cs-sidebar-scroll .cs-subcategories button { gap:8px; align-items:center; }
.cs-sidebar-scroll .cs-toggle-chevron { display:inline-flex; align-items:center; justify-content:center; flex:0 0 18px; width:18px; height:18px; margin-left:auto; border:0; border-radius:6px; background:#f0f2f8; color:#8993a8; transform:none; font-size:0; }
.cs-sidebar-scroll .cs-toggle-chevron::before { content:''; display:block; width:5px; height:5px; border-right:1.5px solid currentColor; border-bottom:1.5px solid currentColor; transform:translateY(-1px) rotate(45deg); transition:transform .18s ease; }
.cs-sidebar-scroll .expanded > button > .cs-toggle-chevron { color:var(--cs-blue); background:var(--cs-blue-soft); }
.cs-sidebar-scroll .expanded > button > .cs-toggle-chevron::before { transform:translateY(1px) rotate(225deg); }
body .cs-goods-grid .cs-product-image { aspect-ratio:1/1; height:auto !important; min-height:0 !important; width:100%; align-self:center; }
body .cs-goods-grid .cs-product-image img { width:100%; height:100%; object-fit:contain; }
@media(max-width:820px){
 .cs-home-category-grid { position:relative; height:auto; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-template-rows:repeat(2,minmax(59px,auto)); gap:22px 6px; padding:18px 10px; margin:8px 6px; border-radius:14px; border:0; overflow:visible; }
 .cs-home-category-grid button,.cs-home-category-grid > a { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; gap:7px; min-width:0; padding:0; color:#111; background:transparent; font-size:13px; line-height:18px; text-align:center; white-space:normal; overflow-wrap:anywhere; }
 .cs-home-category-grid button.active::after { display:none; }
 .cs-home-category-icon { width:34px; height:34px; flex:0 0 34px; display:grid; place-items:center; border-radius:10px; color:var(--cs-blue); background:var(--cs-blue-soft); font-size:23px; }
 .cs-home-category-icon img { display:block; width:34px; height:34px; object-fit:contain; border-radius:9px; }
 .cs-category-view .cs-page-shell { grid-template-columns:clamp(96px,28vw,132px) minmax(0,1fr); }
 .cs-category-view .cs-subcategories button { padding:12px 6px; }
}

@media(max-width:820px){
 .cs-content > .cs-feature-strip, .cs-content > .cs-hero-row { display:none; }
 .cs-home-category-grid > .cs-category-more { grid-column:5; grid-row:2; }
}
/* Leave room for the explicit home entry in desktop navigation. */
@media(min-width:821px){
 .cs-header-inner { gap:24px; }
 .cs-header-inner > .cs-search { min-width:180px; }
 .cs-brand { flex-basis:215px; }
 .cs-top-actions { gap:18px; }
 .cs-top-actions [aria-current="page"], .cs-top-actions [aria-current="page"] > i { color:var(--cs-blue); }
}
