/* Beidou storefront. Load after premium2.css. Agent sites set html[data-theme]. */
:where(html:not([data-theme])) body.shop-body {
  --bg: #f4f8f6;
  --bg-sunken: #e9f2ee;
  --paper: #fcfefc;
  --paper-raised: #fff;
  --paper-soft: #eef6f2;
  --deep: var(--bg-sunken);
  --deep-soft: var(--paper-soft);
  --deep-raised: var(--paper);
  --line: #cfded7;
  --line-soft: #dce9e2;
  --line-strong: #aebfb7;
  --ink: #1c3b36;
  --ink-soft: #36554d;
  --muted: #506b61;
  --muted-soft: #576e64;
  --brand: #176454;
  --brand-hi: #23755f;
  --brand-deep: #164c40;
  --brand-wash: #e7f3ec;
  --brand-line: #abcbbd;
  --on-brand: #f9fffc;
  --forest: #235e50;
  --green: #2a6854;
  --green-wash: #e8f3ed;
  --blue: var(--brand);
  --blue-hover: var(--brand-deep);
  --blue-wash: var(--brand-wash);
  --blue-line: var(--brand-line);
  --jade-gold: #a6793d;
  --gold: var(--jade-gold);
  --gold-hi: #ac844e;
  --gold-soft: #c4a173;
  --gold-ink: #795624;
  --gold-deep: #795624;
  --gold-line: #dfd0b1;
  --gold-wash: #f7f0e4;
  --gold-wash-strong: #f0e6d2;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 15px;
  --r-xl: 20px;
  --shadow-sm: 0 1px 2px rgb(28 59 54 / 5%);
  --shadow-md: 0 12px 26px -20px rgb(28 59 54 / 32%);
  --shadow-lg: 0 22px 42px -24px rgb(28 59 54 / 36%);
  color-scheme: only light;
  /* The old mobile palette sets the body surface with !important. */
  background-color: var(--bg) !important;
}

:where(html:not([data-theme])) .shop-body::before {
  background: radial-gradient(ellipse 780px 580px at 88% 0, #d9ece3 0, transparent 72%);
}

:where(html:not([data-theme])) .shop-body ::selection { background: #c7e6d9; }

:where(html:not([data-theme])) .shop-body .shop-header {
  background: rgb(252 254 252 / 94%);
  box-shadow: 0 5px 22px -20px rgb(28 59 54 / 38%);
}

/* Retain the existing 北 seal and update its earlier important surface rules. */
:where(html:not([data-theme])) body.shop-body .shop-logo .logo-glyph {
  background: linear-gradient(145deg, #f9fdf9, #dfede5) !important;
  box-shadow: inset 0 0 0 1px #aecbbd, inset 0 1px 0 #fff, var(--shadow-sm) !important;
}

:where(html:not([data-theme])) .shop-body .logo-glyph::after {
  border-color: rgb(166 121 61 / 44%);
  border-radius: 5px;
}

:where(html:not([data-theme])) .shop-body .shop-logo > span:last-child small {
  color: var(--gold-ink);
}

:where(html:not([data-theme])) body.shop-body .shop-header :is(.round-button, .cart-button, .login-link):hover {
  background-color: var(--brand-wash) !important;
  color: var(--brand-deep) !important;
}

/* Hero artwork is decorative. Keep it outside agent storefront branding. */
html[data-theme] .shop-body .home-hero-copy > .jade-orbit { display: none; }

:where(html:not([data-theme])) .shop-body #home { max-width: 1200px; }

:where(html:not([data-theme])) .shop-body #home .home-hero {
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 2vw, 26px);
  padding: 0;
  margin: 0 0 clamp(24px, 3vw, 42px);
  border: 0;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  grid-template-rows: repeat(4, auto);
  align-content: start;
  align-items: center;
  min-width: 0;
  padding: clamp(24px, 3.2vw, 44px);
  border: 1px solid #c8dfd3;
  border-radius: var(--r-xl);
  background:
    radial-gradient(ellipse at 94% 27%, rgb(197 222 204 / 58%), transparent 59%),
    linear-gradient(125deg, #fcfefb 12%, #eef7ef 69%, #e7f3ec);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgb(255 255 255 / 80%);
}

:where(html:not([data-theme])) .shop-body #home .home-hero-copy > :is(.kicker, h1, .home-hero-lead, .home-hero-note) {
  grid-column: 1;
  position: relative;
  z-index: 1;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-copy .kicker {
  margin: 0 0 13px;
  color: var(--gold-ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .26em;
}

:where(html:not([data-theme])) .shop-body .kicker::before { background: var(--jade-gold); }

:where(html:not([data-theme])) .shop-body #home #home-brand-name {
  color: var(--ink);
  font-size: clamp(36px, 4.7vw, 65px);
  line-height: 1.08;
  letter-spacing: .035em;
  overflow-wrap: anywhere;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-lead {
  margin-top: 15px;
  color: var(--brand-deep);
  font-size: clamp(15px, 1.7vw, 20px);
  letter-spacing: .035em;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-note {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-copy > .jade-orbit {
  grid-column: 2;
  grid-row: 1 / 5;
  align-self: center;
  justify-self: end;
  width: min(100%, 360px);
  margin: 0;
  pointer-events: none;
}

:where(html:not([data-theme])) .shop-body .jade-orbit img {
  width: 100%;
  height: auto;
}

:where(html:not([data-theme])) .shop-body #home :is(.home-quick-actions, .home-hero-metrics) {
  grid-column: 1 / -1;
}

:where(html:not([data-theme])) .shop-body #home .home-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

:where(html:not([data-theme])) .shop-body #home .home-quick-action {
  flex: 0 1 auto;
  min-height: 44px;
  padding: 0 clamp(12px, 1.6vw, 20px);
  border-radius: var(--r-sm);
  font-size: 13px;
  letter-spacing: .035em;
}

:where(html:not([data-theme])) .shop-body #home .home-quick-action svg {
  box-sizing: border-box;
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

:where(html:not([data-theme])) .shop-body #home .home-quick-action.is-primary::after { content: none; }

/* Use the same important priority as the inherited copper CTA gradient. */
:where(html:not([data-theme])) body.shop-body .home-quick-actions .home-quick-action.is-primary,
:where(html:not([data-theme])) .shop-body :is(#buy-now, .dark-button) {
  background: var(--brand) !important;
  box-shadow: 0 8px 16px -10px rgb(20 76 64 / 55%);
}

:where(html:not([data-theme])) body.shop-body .home-quick-actions .home-quick-action.is-primary:hover:not(:disabled),
:where(html:not([data-theme])) .shop-body :is(#buy-now, .dark-button):hover:not(:disabled) {
  background: var(--brand-deep) !important;
  box-shadow: 0 9px 18px -10px rgb(20 76 64 / 64%);
}

:where(html:not([data-theme])) .shop-body #home #home-contact-actions[hidden] { display: none !important; }
:where(html:not([data-theme])) .shop-body #home #home-contact-actions .contact-list { border-color: var(--line) !important; }

:where(html:not([data-theme])) .shop-body #home #home-contact-actions .contact-list > :is(a, div) {
  flex-direction: row;
  letter-spacing: 0;
}

:where(html:not([data-theme])) .shop-body #home #home-contact-actions .contact-list .brand-logo {
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  filter: saturate(.7);
}

:where(html:not([data-theme])) .shop-body #home .home-hero-metrics {
  margin-top: 16px;
  padding-top: 15px;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-metrics b {
  color: var(--brand-deep);
  font-size: 14px;
}

:where(html:not([data-theme])) .shop-body #home .home-hero-metrics small { font-size: 11px; }

/* The notice is rebuilt at runtime with these same classes. */
:where(html:not([data-theme])) .shop-body #home .home-hero > .store-notice {
  --notice-gutter: clamp(16px, 2vw, 24px);
  padding: 0;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
}

:where(html:not([data-theme])) .shop-body #home .store-notice::before {
  inset: 0 0 auto;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--jade-gold), var(--gold-line) 46%, var(--brand-line));
}

:where(html:not([data-theme])) .shop-body #home .notice-heading {
  justify-content: flex-start;
  gap: 10px;
  padding: 16px var(--notice-gutter) 14px;
  background: var(--paper-soft);
}

:where(html:not([data-theme])) .shop-body #home .notice-heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--brand);
}

:where(html:not([data-theme])) .shop-body #home .notice-heading-icon :is(svg, i) { width: 14px; height: 14px; }
:where(html:not([data-theme])) .shop-body #home .notice-heading h2 { font-size: 17px; }

:where(html:not([data-theme])) .shop-body #home .notice-status {
  padding: 3px 8px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-deep);
  letter-spacing: .02em;
}

:where(html:not([data-theme])) .shop-body #home .notice-status::before { content: none; }
:where(html:not([data-theme])) .shop-body #home .notice-status :is(svg, i) { width: 12px; height: 12px; }

:where(html:not([data-theme])) .shop-body #home .notice-content {
  padding: 15px var(--notice-gutter) 0;
  overflow-wrap: anywhere;
}

:where(html:not([data-theme])) .shop-body #home .notice-content .announcement-highlight {
  color: var(--ink-soft);
  font-size: 13px;
}

:where(html:not([data-theme])) .shop-body #home .notice-content a {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

:where(html:not([data-theme])) .shop-body #home .home-order-demo {
  margin: 14px var(--notice-gutter) 15px;
}

:where(html:not([data-theme])) .shop-body #home .demo-order-product { color: var(--ink-soft); }

/* Catalogue and forms retain their existing layout and state hooks. */
:where(html:not([data-theme])) .shop-body #home .marketplace-layout { padding-top: clamp(18px, 2.9vw, 34px); }

:where(html:not([data-theme])) .shop-body #home .home-products-heading .kicker {
  display: block;
  color: var(--gold-ink);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .22em;
}

:where(html:not([data-theme])) .shop-body #home .home-products-heading h2 {
  gap: 8px 12px;
  font-size: clamp(24px, 2.9vw, 33px);
  letter-spacing: .045em;
}

:where(html:not([data-theme])) .shop-body .product-total {
  padding: 4px 9px;
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background: var(--brand-wash);
  color: var(--brand-deep);
}

:where(html:not([data-theme])) .shop-body .product-total b {
  color: var(--brand-deep);
  font-size: 12px;
}

:where(html:not([data-theme])) .shop-body #home .home-search {
  min-width: 0;
  padding: 0;
  box-shadow: var(--shadow-sm);
}

:where(html:not([data-theme])) .shop-body #home .home-search input { padding: 0 12px 0 35px; }

:where(html:not([data-theme])) .shop-body #home .home-search:focus-within {
  border-color: var(--brand);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

:where(html:not([data-theme])) .shop-body .category-sidebar-head {
  background: var(--paper-soft);
  color: var(--ink);
}

:where(html:not([data-theme])) .shop-body .category-side-item.active > svg { color: var(--brand); }

:where(html:not([data-theme])) .shop-body .catalog-filter .category-side-item {
  grid-template-columns: minmax(0, 1fr) auto;
}

:where(html:not([data-theme])) .shop-body :is(#hot-products, #category-page-products) .store-product-card {
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

:where(html:not([data-theme])) .shop-body :is(#hot-products, #category-page-products) .store-product-card:hover {
  box-shadow: var(--shadow-md);
}

:where(html:not([data-theme])) .shop-body .store-product-card .product-visual .cover-fallback {
  background: radial-gradient(ellipse at 65% 28%, #fafffc, var(--brand-wash));
}

:where(html:not([data-theme])) .shop-body .store-product-card .product-visual .cover-fallback b {
  color: var(--brand-deep);
}

:where(html:not([data-theme])) .shop-body .product-visual > .delivery-badge {
  border: 1px solid var(--brand-line);
  border-radius: 999px;
  background-color: #f2faf5 !important;
  color: var(--brand-deep);
  box-shadow: var(--shadow-sm);
}

:where(html:not([data-theme])) .shop-body .delivery-badge::before { background: var(--brand); }
:where(html:not([data-theme])) .shop-body .delivery-badge.review::before { background: var(--jade-gold); }
:where(html:not([data-theme])) .shop-body .delivery-badge.online::before { background: var(--green); }

:where(html:not([data-theme])) .shop-body .store-product-card .store-product-category { color: var(--muted); }
:where(html:not([data-theme])) .shop-body .store-product-card .store-product-footer strong { color: var(--brand-deep); }

:where(html:not([data-theme])) .shop-body .store-product-card .product-buy-button:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--on-brand);
}

:where(html:not([data-theme])) .shop-body :is(.mode-choice, .pay-option, .subcategory-tab).active {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-deep);
}

:where(html:not([data-theme])) .shop-body .wallet-card-main {
  background: var(--brand-wash);
  color: var(--ink);
}

:where(html:not([data-theme])) .shop-body .wallet-card-main :is(h2, strong) { color: var(--brand-deep); }
:where(html:not([data-theme])) .shop-body .text-button { color: var(--brand); }
:where(html:not([data-theme])) .shop-body .text-button:hover { color: var(--brand-deep); }

:where(html:not([data-theme])) .shop-body .toast {
  border-color: var(--brand-line);
  background: var(--brand-deep);
  color: var(--on-brand);
}

:where(html:not([data-theme])) .shop-body .cs-head {
  border-color: var(--line);
  background: var(--brand-wash);
  color: var(--brand-deep);
}

:where(html:not([data-theme])) .shop-body .cs-head-copy small { color: var(--muted); }
:where(html:not([data-theme])) .shop-body .cs-head .cs-close { color: var(--brand-deep); }

:where(html:not([data-theme])) .shop-body .cs-live-row.user {
  background: var(--brand-wash);
  color: var(--brand-deep);
}

:where(html:not([data-theme])) .shop-body .shop-footer {
  background-color: var(--paper-soft) !important;
  border-top-color: var(--line);
}

:where(html:not([data-theme])) .shop-body .shop-footer > p { color: var(--muted); }

@media (max-width: 920px) {
  :where(html:not([data-theme])) .shop-body #home .home-hero { grid-template-columns: minmax(0, 1fr); }
  :where(html:not([data-theme])) .shop-body #home .home-hero-copy { grid-template-columns: minmax(0, 1fr) minmax(0, .62fr); }
}

@media (max-width: 720px) {
  :where(html:not([data-theme])) .shop-body #home .home-hero-copy {
    grid-template-columns: minmax(0, 1fr) minmax(0, .43fr);
    padding: 21px clamp(16px, 4.5vw, 26px) 17px;
  }

  :where(html:not([data-theme])) .shop-body #home #home-brand-name {
    font-size: clamp(31px, 8.2vw, 50px);
    letter-spacing: .018em;
  }

  :where(html:not([data-theme])) .shop-body #home .home-hero-copy .kicker { margin-bottom: 9px; }
  :where(html:not([data-theme])) .shop-body #home .home-hero-lead { margin-top: 10px; }
  :where(html:not([data-theme])) .shop-body #home .home-hero-note { margin-top: 6px; }
  :where(html:not([data-theme])) .shop-body #home .home-quick-actions { margin-top: 17px; }

  :where(html:not([data-theme])) .shop-body #home .home-quick-action {
    flex: 1 1 calc(50% - 4px);
    justify-content: center;
    min-height: 44px;
    font-size: 12.5px;
  }

  :where(html:not([data-theme])) .shop-body #home .home-quick-action.is-primary { flex-basis: 100%; }
  :where(html:not([data-theme])) .shop-body #home .home-hero-metrics { margin-top: 12px; padding-top: 0; }
  :where(html:not([data-theme])) .shop-body #home .home-hero-metrics b { font-size: 13px; }
  :where(html:not([data-theme])) .shop-body #home .home-product-tools select { flex-basis: 110px; }

  :where(html:not([data-theme])) body.shop-body #home #home-product-sort {
    width: 110px !important;
    min-width: 0;
  }

  /* The storefront toggle uses .mobile-open. Remove the inherited collapsed height on open. */
  :where(html:not([data-theme])) .shop-body .category-sidebar.mobile-open > .category-side-list {
    max-height: none;
    margin-top: 0;
    padding: 7px 8px;
    border-top: 1px solid var(--line-soft);
  }

  :where(html:not([data-theme])) .shop-body .catalog-filter.mobile-open .category-side-list { max-height: none; }
}
