/*
 * Brand polish layer
 * ------------------
 * The storefront direction is quiet premium daily living. This layer tones down
 * playful support elements so they remain useful without becoming the brand.
 */

html body {
  --brand-ink: #111827;
  --brand-muted: #667085;
  --brand-line: rgba(17, 24, 39, 0.1);
  --brand-surface: rgba(255, 255, 255, 0.84);
  --brand-accent: #0f172a;
}

html body .brand strong,
html body .site-title,
html body .catalog-head h2,
html body .detail-info h1 {
  letter-spacing: 0 !important;
}

html body .dev-button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--brand-ink);
  border: 1px solid var(--brand-line);
  background: var(--brand-surface);
  text-decoration: none;
}

/* The floating assistant keeps its original pink treatment and corner position. */

/*
 * Storefront filter bar
 * ---------------------
 * Keep filters in the page flow. The old fixed bar and absolute dropdowns
 * covered the hero image; this version behaves like a calm merchandising
 * toolbar and expands inside its own band.
 */

html body .catalog-tools,
html body .catalog-tools:hover,
html body .catalog-tools:focus-within,
html body .catalog-tools.is-docked,
html body.filter-tools-docked .catalog-tools,
html body.filter-tools-docked .catalog-tools:hover,
html body.filter-tools-docked .catalog-tools:focus-within,
html body.filter-tools-docked .catalog-tools.is-docked,
html body.filter-tools-compressed .catalog-tools,
html body.filter-tools-compressed .catalog-tools.is-docked {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  z-index: 40 !important;
  display: grid !important;
  gap: 14px !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 18px clamp(24px, 5vw, 76px) 16px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.06) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 0 !important;
  background: rgba(248, 252, 255, 0.98) !important;
  box-shadow: none !important;
  transform: none !important;
}

html body .filter-panel-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: min(1180px, 100%) !important;
  margin: 0 auto !important;
}

html body .filter-panel-head strong {
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

html body .filter-panel-head button,
html body [data-close-filters] {
  display: inline-flex !important;
  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 999px !important;
  color: #475569 !important;
  background: rgba(255, 255, 255, 0.78) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

html body [data-close-filters]::before,
html body[data-language="en"] [data-close-filters]::before {
  content: "Close" !important;
}

html body[data-language="zh"] [data-close-filters]::before {
  content: "收起" !important;
}

html body [data-close-filters] {
  font-size: 0 !important;
}

html body .catalog-tools .filters,
html body .catalog-tools.is-docked .filters,
html body.filter-tools-docked .catalog-tools .filters,
html body.filter-tools-compressed .catalog-tools .filters {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(160px, 1fr)) minmax(96px, auto) !important;
  align-items: start !important;
  gap: 10px !important;
  width: min(1180px, 100%) !important;
  margin: 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body .catalog-tools .filter-reset-button {
  grid-column: 4 !important;
  grid-row: 1 !important;
}

html body .catalog-tools .filter-menu {
  min-width: 0 !important;
  width: 100% !important;
}

html body .catalog-tools .filter-menu summary,
html body .catalog-tools .filter-reset-button,
html body .catalog-tools.is-docked .filter-menu summary,
html body .catalog-tools.is-docked .filter-reset-button,
html body.filter-tools-docked .catalog-tools .filter-menu summary,
html body.filter-tools-docked .catalog-tools .filter-reset-button,
html body.filter-tools-compressed .catalog-tools .filter-menu summary,
html body.filter-tools-compressed .catalog-tools .filter-reset-button {
  width: 100% !important;
  min-height: 44px !important;
  height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 8px !important;
  color: #111827 !important;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

html body .catalog-tools .filter-menu summary::after {
  border-top-color: #475569 !important;
  border-top-width: 6px !important;
  border-right-width: 6px !important;
  border-left-width: 6px !important;
}

html body .catalog-tools .filter-menu[open] {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: grid !important;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
}

html body .catalog-tools .filter-menu[open] summary {
  border-color: rgba(15, 23, 42, 0.26) !important;
  background: #111827 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html body .catalog-tools .filter-menu[open] summary::after {
  border-top-color: currentColor !important;
}

html body .catalog-tools .filter-menu > fieldset,
html body .catalog-tools .filter-menu > .field,
html body .catalog-tools .filter-menu[open] > fieldset,
html body .catalog-tools .filter-menu[open] > .field {
  position: static !important;
  top: auto !important;
  left: auto !important;
  z-index: auto !important;
  min-width: 0 !important;
  width: 100% !important;
  padding: 16px !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: none !important;
}

html body .catalog-tools .filter-menu:not([open]) > fieldset,
html body .catalog-tools .filter-menu:not([open]) > .field {
  display: none !important;
}

html body .catalog-tools .filter-menu > fieldset {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: 10px 14px !important;
}

html body .catalog-tools .filter-menu > fieldset legend {
  grid-column: 1 / -1 !important;
  margin: 0 0 2px !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

html body .catalog-tools .filter-menu > fieldset label,
html body .catalog-tools .filter-menu > .field {
  min-height: 38px !important;
  height: auto !important;
}

html body .catalog-tools .filter-menu > .price-filter div {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}

html body .catalog-tools .sort-field select,
html body .catalog-tools .price-filter input {
  min-height: 42px !important;
  height: 42px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  background: #ffffff !important;
}

html body.filters-panel-open.view-home .home-view,
html body.filters-panel-open.view-products .products-view {
  padding-top: 0 !important;
}

html body .shop-view-stage {
  position: relative !important;
}

@media (max-width: 760px) {
  html body .site-header {
    grid-template-columns: minmax(92px, 128px) minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding-inline: 10px !important;
    overflow: visible !important;
  }

  html body .brand {
    min-width: 0 !important;
    grid-template-columns: auto minmax(0, 1fr) 24px !important;
    gap: 5px !important;
  }

  html body .brand-mark {
    width: 58px !important;
    min-width: 58px !important;
  }

  html body .brand strong {
    font-size: 12px !important;
  }

  html body .brand small {
    font-size: 8px !important;
  }

  html body .brand-menu-cue {
    width: 24px !important;
    height: 24px !important;
  }

  html body .nav-search {
    min-width: 0 !important;
    width: 100% !important;
  }

  html body .nav-search input {
    min-width: 0 !important;
    padding-left: 12px !important;
    padding-right: 68px !important;
    font-size: 12px !important;
  }

  html body .nav-search-submit,
  html body .nav-filter-toggle {
    width: 32px !important;
    min-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
  }

  html body .header-actions {
    min-width: 0 !important;
    gap: 6px !important;
  }

  html body .language-current,
  html body .language-chevron,
  html body .cart-button span:not(:first-child),
  html body .account-button {
    display: none !important;
  }

  html body .cart-button,
  html body .language-button {
    min-width: 34px !important;
    width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  html body .catalog-tools,
  html body .catalog-tools:hover,
  html body .catalog-tools:focus-within,
  html body .catalog-tools.is-docked,
  html body.filter-tools-docked .catalog-tools,
  html body.filter-tools-compressed .catalog-tools {
    padding: 14px 14px 12px !important;
  }

  html body .catalog-tools .filters,
  html body .catalog-tools.is-docked .filters,
  html body.filter-tools-docked .catalog-tools .filters,
  html body.filter-tools-compressed .catalog-tools .filters {
    grid-template-columns: 1fr 1fr !important;
  }

  html body .catalog-tools .filter-reset-button {
    grid-column: 1 / -1 !important;
  }

  html body .catalog-tools .filter-menu[open] {
    grid-template-columns: 1fr !important;
  }

  html body .catalog-tools .filter-menu > .price-filter div {
    grid-template-columns: 1fr !important;
  }
}

/*
 * Light luxury filter trim
 * ------------------------
 * Keep the homepage image as the lead. Filters become a low, quiet tool rail
 * with one compact popover at a time instead of a bulky form block.
 */

html body .catalog-tools,
html body .catalog-tools:hover,
html body .catalog-tools:focus-within,
html body .catalog-tools.is-docked,
html body.filter-tools-docked .catalog-tools,
html body.filter-tools-docked .catalog-tools:hover,
html body.filter-tools-docked .catalog-tools:focus-within,
html body.filter-tools-docked .catalog-tools.is-docked,
html body.filter-tools-compressed .catalog-tools,
html body.filter-tools-compressed .catalog-tools.is-docked {
  gap: 8px !important;
  padding: 10px clamp(22px, 5vw, 72px) 10px !important;
  background: rgba(250, 249, 246, 0.96) !important;
  border-top: 1px solid rgba(17, 24, 39, 0.055) !important;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08) !important;
}

html body .catalog-tools:has(.filter-menu[open]) {
  padding-bottom: 10px !important;
}

html body .catalog-tools:has(.filter-menu[open] > .price-filter) {
  padding-bottom: 10px !important;
}

html body .filter-panel-head {
  min-height: 26px !important;
}

html body .filter-panel-head strong {
  color: rgba(17, 24, 39, 0.78) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

html body .filter-panel-head button,
html body [data-close-filters] {
  height: 28px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-color: rgba(17, 24, 39, 0.12) !important;
  background: rgba(255, 255, 255, 0.68) !important;
  color: rgba(17, 24, 39, 0.66) !important;
  font-size: 12px !important;
}

html body .catalog-tools .filters,
html body .catalog-tools.is-docked .filters,
html body.filter-tools-docked .catalog-tools .filters,
html body.filter-tools-compressed .catalog-tools .filters {
  position: relative !important;
  grid-template-columns: repeat(3, minmax(132px, 190px)) 76px !important;
  justify-content: start !important;
  align-items: center !important;
  gap: 8px !important;
}

html body .catalog-tools .filter-reset-button {
  grid-column: 4 !important;
  grid-row: 1 !important;
}

html body .catalog-tools .filter-menu {
  position: relative !important;
  width: 100% !important;
}

html body .catalog-tools .filter-menu summary,
html body .catalog-tools .filter-reset-button,
html body .catalog-tools.is-docked .filter-menu summary,
html body .catalog-tools.is-docked .filter-reset-button,
html body.filter-tools-docked .catalog-tools .filter-menu summary,
html body.filter-tools-docked .catalog-tools .filter-reset-button,
html body.filter-tools-compressed .catalog-tools .filter-menu summary,
html body.filter-tools-compressed .catalog-tools .filter-reset-button {
  min-height: 34px !important;
  height: 34px !important;
  padding: 0 13px !important;
  border-radius: 6px !important;
  border-color: rgba(17, 24, 39, 0.13) !important;
  background: rgba(255, 255, 255, 0.78) !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}

html body .catalog-tools .filter-menu[open] {
  grid-column: auto !important;
  grid-row: auto !important;
  display: block !important;
}

html body .catalog-tools .filter-menu[open] summary {
  border-color: rgba(17, 24, 39, 0.34) !important;
  background: #111827 !important;
  color: #ffffff !important;
}

html body .catalog-tools .filter-menu > fieldset,
html body .catalog-tools .filter-menu > .field,
html body .catalog-tools .filter-menu[open] > fieldset,
html body .catalog-tools .filter-menu[open] > .field {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  left: 0 !important;
  z-index: 8 !important;
  width: min(360px, calc(100vw - 48px)) !important;
  min-width: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid rgba(17, 24, 39, 0.1) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.13) !important;
}

html body .catalog-tools .filter-menu[open] > fieldset,
html body .catalog-tools .filter-menu[open] > .field {
  display: grid !important;
}

html body .catalog-tools .filter-menu:not([open]) > fieldset,
html body .catalog-tools .filter-menu:not([open]) > .field {
  display: none !important;
}

html body .catalog-tools .filter-menu > fieldset {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 12px !important;
  max-height: 124px !important;
  overflow: auto !important;
}

html body .catalog-tools .filter-menu > fieldset legend {
  display: none !important;
}

html body .catalog-tools .filter-menu > fieldset label,
html body .catalog-tools .filter-menu > .field {
  min-height: 30px !important;
  font-size: 12px !important;
}

html body .catalog-tools .sort-field > span {
  display: none !important;
}

html body .catalog-tools .sort-field {
  width: min(280px, calc(100vw - 48px)) !important;
}

html body .catalog-tools .filter-menu > .price-filter {
  width: min(430px, calc(100vw - 48px)) !important;
  max-height: none !important;
  overflow: visible !important;
}

html body .catalog-tools .filter-menu > .price-filter div {
  width: 100% !important;
  grid-template-columns: repeat(2, minmax(128px, 1fr)) !important;
  gap: 10px !important;
}

html body .catalog-tools .sort-field select,
html body .catalog-tools .price-filter input {
  min-height: 34px !important;
  height: 34px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
}

@media (max-width: 760px) {
  html body .catalog-tools,
  html body .catalog-tools:hover,
  html body .catalog-tools:focus-within,
  html body .catalog-tools.is-docked,
  html body.filter-tools-docked .catalog-tools,
  html body.filter-tools-compressed .catalog-tools {
    padding: 10px 12px !important;
  }

  html body .catalog-tools:has(.filter-menu[open]) {
    padding-bottom: 10px !important;
  }

  html body .catalog-tools:has(.filter-menu[open] > .price-filter) {
    padding-bottom: 10px !important;
  }

  html body .catalog-tools .filters,
  html body .catalog-tools.is-docked .filters,
  html body.filter-tools-docked .catalog-tools .filters,
  html body.filter-tools-compressed .catalog-tools .filters {
    grid-template-columns: 1fr 1fr 68px !important;
    gap: 7px !important;
  }

  html body .catalog-tools .filter-reset-button {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  html body .catalog-tools .filter-menu {
    position: static !important;
  }

  html body .catalog-tools .filter-menu > fieldset,
  html body .catalog-tools .filter-menu > .field,
  html body .catalog-tools .filter-menu[open] > fieldset,
  html body .catalog-tools .filter-menu[open] > .field {
    top: 42px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
  }

  html body .catalog-tools .filter-menu > .price-filter,
  html body .catalog-tools .filter-menu[open] > .price-filter {
    min-height: 84px !important;
    height: auto !important;
    overflow: visible !important;
  }

  html body .catalog-tools .filter-menu > .price-filter div {
    grid-template-columns: 1fr 1fr !important;
  }
}

/*
 * Floating assistant placement
 * ----------------------------
 * The assistant is a persistent support affordance: fixed at bottom-left by
 * default, then draggable only after the user double-clicks to unlock it.
 */

html body.auth-locked .floating-pet-shell,
html body .floating-pet-shell.is-auth-hidden {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  filter: none !important;
}

html body .floating-pet-shell.is-fixed .floating-pet-button {
  cursor: pointer !important;
}

html body .floating-pet-shell.is-fixed {
  top: auto !important;
  right: auto !important;
  bottom: max(22px, env(safe-area-inset-bottom)) !important;
  left: max(18px, env(safe-area-inset-left)) !important;
  transform: none !important;
}

/*
 * Overlay filter panel
 * --------------------
 * Opening filters should not reflow the hero. The rail and its popovers float
 * above the first visual section, so the image can sit still underneath.
 */

html body .shop-view-stage > .catalog-tools,
html body .shop-view-stage > .catalog-tools:hover,
html body .shop-view-stage > .catalog-tools:focus-within,
html body .shop-view-stage > .catalog-tools.is-docked,
html body.filter-tools-docked .shop-view-stage > .catalog-tools,
html body.filter-tools-compressed .shop-view-stage > .catalog-tools {
  position: fixed !important;
  top: 68px !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 890 !important;
  background: linear-gradient(180deg, rgba(250, 249, 246, 0.96), rgba(250, 249, 246, 0.86)) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
}

@media (max-width: 760px) {
  html body .shop-view-stage > .catalog-tools,
  html body .shop-view-stage > .catalog-tools:hover,
  html body .shop-view-stage > .catalog-tools:focus-within,
  html body .shop-view-stage > .catalog-tools.is-docked,
html body.filter-tools-docked .shop-view-stage > .catalog-tools,
html body.filter-tools-compressed .shop-view-stage > .catalog-tools {
    top: 113px !important;
  }
}
