/* Mall layout overlay 20261114 — scoped to .mall-page only.
   Presentation layer: does not replace Vue mall logic or API calls. */
.mall-page {
  container-type: inline-size;
  --rpx: calc(100cqw / 750);
  background: #F6F5F9 !important;
  color: #17131F;
  position: relative;
  isolation: isolate;
}
.mall-page::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: calc(920 * var(--rpx));
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(85% 55% at 92% -6%, rgba(132, 80, 255, 0.42) 0%, rgba(132, 80, 255, 0.12) 45%, rgba(132, 80, 255, 0) 72%),
    radial-gradient(70% 45% at -5% 8%, rgba(214, 182, 255, 0.45) 0%, rgba(214, 182, 255, 0) 70%),
    linear-gradient(180deg, #EEE8FB 0%, #F6F5F9 62%);
}
.mall-page > * { position: relative; z-index: 1; }
.mall-page > .product-share-backdrop,
.mall-page .product-share-backdrop {
  z-index: 120;
}

/* Header: light title row + glass search/cart, no purple bar */
.mall-page .mall-topbar {
  min-height: 0 !important;
  padding: 0 calc(32 * var(--rpx)) calc(28 * var(--rpx)) calc(36 * var(--rpx)) !important;
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "title cart"
    "search search";
  align-items: center;
  position: relative;
  flex: 0 0 auto;
  top: 0;
  z-index: 40;
}
.mall-page .mall-topbar h1 {
  grid-area: title;
  color: #17131F !important;
  font-size: calc(44 * var(--rpx)) !important;
  line-height: calc(56 * var(--rpx));
  font-weight: 700 !important;
  letter-spacing: calc(-0.8 * var(--rpx));
  margin: 0 !important;
  height: calc(80 * var(--rpx));
  display: flex;
  align-items: center;
}
.mall-page .mall-topbar__actions {
  display: contents !important;
}
.mall-page .mall-topbar__cart {
  grid-area: cart;
  width: calc(72 * var(--rpx)) !important;
  height: calc(72 * var(--rpx)) !important;
  border-radius: 50% !important;
  color: #2A2238 !important;
  background-color: rgba(255, 255, 255, 0.66) !important;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)) !important;
  border: 0 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 1px 0 #fff,
    0 0 0 1px rgba(40, 20, 80, 0.06),
    0 6px 20px rgba(40, 20, 90, 0.08) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.mall-page .mall-search {
  grid-area: search;
  z-index: auto !important;
  margin: calc(20 * var(--rpx)) 0 0 !important;
  min-height: calc(76 * var(--rpx)) !important;
  height: calc(76 * var(--rpx));
  padding: 0 calc(28 * var(--rpx)) !important;
  border-radius: calc(38 * var(--rpx)) !important;
  border: 0 !important;
  background-color: rgba(255, 255, 255, 0.66) !important;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.9),
    inset 0 1px 0 #fff,
    0 0 0 1px rgba(40, 20, 80, 0.06),
    0 6px 20px rgba(40, 20, 90, 0.08) !important;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: grid !important;
  grid-template-columns: calc(32 * var(--rpx)) minmax(0, 1fr) auto;
  gap: calc(14 * var(--rpx)) !important;
  align-items: center;
  position: static !important;
  color: #8E899A !important;
}
.mall-page .mall-search input {
  height: calc(76 * var(--rpx)) !important;
  font-size: calc(28 * var(--rpx)) !important;
  color: #17131F;
}
.mall-page .mall-search input::placeholder { color: #8E899A !important; }
.mall-page .mall-search button {
  background: rgba(23, 19, 31, 0.08) !important;
  width: calc(40 * var(--rpx)) !important;
  height: calc(40 * var(--rpx)) !important;
  margin-right: 0 !important;
}

/* Main: left category rail + right goods. Banner DOM stays, hidden in this layout. */
.mall-page .mall-main {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  flex: 1 1 auto;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 0 12px !important;
  background: transparent !important;
}
.mall-page .mall-banners { display: none !important; }

.mall-page .mall-categories {
  width: calc(168 * var(--rpx)) !important;
  flex: 0 0 calc(168 * var(--rpx)) !important;
  max-width: none !important;
  margin: 0 !important;
  padding: calc(4 * var(--rpx)) 0 0 !important;
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  align-items: stretch;
  gap: 0 !important;
  background: transparent !important;
  overflow: hidden auto !important;
  overscroll-behavior: contain;
  align-self: stretch;
  min-height: 0;
}
.mall-page .mall-categories button {
  width: calc(136 * var(--rpx)) !important;
  height: calc(132 * var(--rpx)) !important;
  min-height: 0 !important;
  margin: 0 0 calc(12 * var(--rpx)) calc(16 * var(--rpx)) !important;
  padding: 0 calc(8 * var(--rpx)) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: calc(28 * var(--rpx)) !important;
  background: transparent !important;
  color: #5E5869 !important;
  font-size: calc(28 * var(--rpx)) !important;
  line-height: calc(34 * var(--rpx)) !important;
  font-weight: 400 !important;
  box-shadow: none !important;
  text-align: center;
  position: relative;
}
.mall-page .mall-categories button::before {
  content: "";
  width: calc(60 * var(--rpx));
  height: calc(60 * var(--rpx));
  margin: 0 0 calc(8 * var(--rpx));
  flex: none;
  background: var(--cat-icon) center / contain no-repeat;
}
.mall-page .mall-categories button::after { display: none !important; content: none !important; }
.mall-page .mall-categories .mall-categories__item--active {
  background: #FFFFFF !important;
  color: #6D28D9 !important;
  font-weight: 600 !important;
  border-color: transparent !important;
  box-shadow: 0 1px 2px rgba(30, 20, 60, 0.05), 0 4px 14px rgba(30, 20, 60, 0.05) !important;
}

.mall-page .mall-goods {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 calc(28 * var(--rpx)) 16px calc(8 * var(--rpx)) !important;
}
.mall-page .mall-section-heading h2 {
  font-size: calc(32 * var(--rpx));
  color: #17131F;
}
.mall-page .mall-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: stretch;
  grid-template-columns: none !important;
  gap: 0 !important;
}

/* Cards: white tile, sales then price + plus, share kept as corner icon */
#main-content .mall-page .product-card,
.mall-page .product-card {
  width: calc(50% - 6px);
  margin-bottom: calc(28 * var(--rpx));
  background: #FFFFFF !important;
  border: 0 !important;
  border-radius: calc(32 * var(--rpx)) !important;
  box-shadow: 0 1px 2px rgba(30, 20, 60, 0.04), 0 8px 24px rgba(30, 20, 60, 0.04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: hidden;
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto auto;
  flex-direction: unset;
  min-width: 0;
}
#main-content .mall-page .product-card:hover,
.mall-page .product-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: 0 1px 2px rgba(30, 20, 60, 0.04), 0 8px 24px rgba(30, 20, 60, 0.04) !important;
}
.mall-page .product-card:active { transform: scale(0.985); opacity: 0.92; }
.mall-page .product-card__link { display: contents; }
.mall-page .product-card__visual {
  grid-column: 1 / -1;
  aspect-ratio: auto !important;
  height: 0;
  padding-top: 70.9%;
  background: #F3F2F6 !important;
  position: relative;
}
.mall-page .product-card__visual .media-image,
.mall-page .product-card__visual img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}
.mall-page .product-card__body {
  display: contents;
  padding: 0 !important;
}
.mall-page .product-card__body h3 {
  grid-column: 1 / -1;
  max-height: calc(72 * var(--rpx));
  min-height: 0 !important;
  margin: calc(18 * var(--rpx)) calc(20 * var(--rpx)) 0 !important;
  font-size: calc(26 * var(--rpx)) !important;
  line-height: calc(36 * var(--rpx)) !important;
  font-weight: 500 !important;
  color: #17131F !important;
  letter-spacing: 0;
}
.mall-page .product-card__actions {
  display: contents;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  font-size: inherit;
  color: inherit;
}
.mall-page .product-card__actions > span {
  grid-column: 1 / -1;
  height: calc(28 * var(--rpx));
  margin: calc(6 * var(--rpx)) calc(20 * var(--rpx)) 0;
  font-size: calc(22 * var(--rpx));
  line-height: calc(28 * var(--rpx));
  color: #A19CAB;
  white-space: nowrap;
}
.mall-page .product-card__pricing {
  grid-column: 1;
  grid-row: 4;
  min-width: 0;
  margin: 0 0 calc(20 * var(--rpx)) calc(20 * var(--rpx)) !important;
  padding-top: calc(16 * var(--rpx));
  display: flex;
  align-items: baseline;
  overflow: hidden;
  white-space: nowrap;
}
.mall-page .product-card__price {
  color: #17131F !important;
  font-family: inherit !important;
  font-size: calc(36 * var(--rpx)) !important;
  line-height: calc(40 * var(--rpx));
  font-weight: 600 !important;
  letter-spacing: calc(-0.8 * var(--rpx));
  display: flex;
  align-items: baseline;
  margin: 0 !important;
}
.mall-page .product-card__price--range {
  font-size: calc(28 * var(--rpx)) !important;
}
.mall-page .product-card__price small {
  font-size: calc(22 * var(--rpx)) !important;
  font-weight: 600 !important;
  margin-right: 1px !important;
}
.mall-page .product-card__price:not(.product-card__price--range)::after {
  content: "起";
  margin-left: 2px;
  font-size: calc(21 * var(--rpx));
  font-weight: 400;
  color: #A19CAB;
  letter-spacing: 0;
}
.mall-page .product-card__pricing del {
  margin-left: 4px;
  font-size: calc(20 * var(--rpx)) !important;
  color: #A19CAB !important;
  text-decoration: line-through;
  display: inline !important;
}
.mall-page .product-card__ctas {
  grid-column: 2;
  grid-row: 4;
  align-self: end;
  margin: 0 calc(16 * var(--rpx)) calc(16 * var(--rpx)) 0;
  display: flex;
  align-items: center;
  gap: calc(8 * var(--rpx));
}
/* Share stays clickable; icon-only in the image corner so the card matches the new layout */
.mall-page .product-card__share {
  position: absolute !important;
  top: calc(10 * var(--rpx));
  right: calc(10 * var(--rpx));
  z-index: 3;
  width: calc(48 * var(--rpx)) !important;
  height: calc(48 * var(--rpx)) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: rgba(255, 255, 255, 0.86) !important;
  color: #6D28D9 !important;
  box-shadow: 0 2px 8px rgba(30, 20, 60, 0.08);
  font-size: 0 !important;
  gap: 0 !important;
}
.mall-page .product-card__share span { display: none !important; }
.mall-page .product-card__buy {
  width: calc(48 * var(--rpx)) !important;
  height: calc(48 * var(--rpx)) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #6D28D9 url("/assets/mall-layout-20261114/icons/mall-ui3-plus.svg") center / calc(30 * var(--rpx)) no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}
.mall-page .mall-load-more,
.mall-page .mall-list-end {
  width: 100%;
  flex-basis: 100%;
}


/* Scroll lock: only the right-hand goods list moves.
   Outer document / app-shell must not scroll, otherwise sticky is broken
   by .app-shell { overflow: hidden } and the whole mall page rides up. */
html.mall-layout-lock,
html.mall-layout-lock body,
html.mall-layout-lock #app,
html.mall-layout-lock .site-canvas,
html.mall-layout-lock #main-content.app-shell {
  height: 100% !important;
  max-height: 100dvh !important;
  min-height: 0 !important;
  overflow: hidden !important;
}
html.mall-layout-lock body { min-height: 0 !important; }
html.mall-layout-lock #main-content.app-shell {
  display: flex !important;
  flex-direction: column !important;
}
.mall-page.page {
  display: flex !important;
  flex-direction: column !important;
}
html.mall-layout-lock .mall-page.page {
  flex: 1 1 auto;
  height: auto !important;
  max-height: 100%;
  min-height: 0 !important;
  overflow: hidden !important;
}
html.mall-layout-lock .bottom-nav {
  position: fixed !important;
}
