/* Scoped Cards Demo cleanup for latest and hot product sections only. */
html,
body {
  background: #FEFDFB !important;
  background-color: #FEFDFB !important;
  background-image: none !important;
}

.neige-home-shell {
  opacity: 1;
  background-color: #FEFDFB !important;
  background-image: none !important;
  transition: opacity 140ms ease;
}

body > main.page {
  opacity: 1;
  transition: opacity 140ms ease;
}

html.neige-home-media-pending .neige-home-shell,
html.neige-home-media-pending body > main.page {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .neige-home-shell,
  body > main.page {
    transition: none;
  }
}

.neige-showcase-section,
.showcase-section.hot-showcase {
  border: 1px solid rgba(234, 167, 103, 0.42) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(
      180deg,
      rgba(255, 253, 249, 0.98) 0%,
      rgba(255, 248, 240, 0.96) 100%
    ) !important;
  background-image:
    linear-gradient(
      180deg,
      rgba(255, 253, 249, 0.98) 0%,
      rgba(255, 248, 240, 0.96) 100%
    ) !important;
  background-size: auto !important;
  background-position: initial !important;
  background-repeat: no-repeat !important;
  box-shadow: 0 8px 24px rgba(76, 48, 20, 0.05) !important;
  isolation: auto !important;
  overflow: hidden !important;
}

.neige-showcase-section::before,
.neige-showcase-section::after,
.showcase-section.hot-showcase::before,
.showcase-section.hot-showcase::after,
.latest-showcase::before,
.latest-showcase::after,
.hot-showcase::before,
.hot-showcase::after {
  content: none !important;
  display: none !important;
  background: none !important;
  background-image: none !important;
}

.neige-showcase-section > *,
.showcase-section.hot-showcase > *,
.latest-showcase > *,
.hot-showcase > * {
  position: relative;
  z-index: auto !important;
}

.showcase-section.hot-showcase .hot-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px) !important;
  gap: 22px !important;
  align-items: start !important;
  overflow: visible !important;
}

.showcase-section.hot-showcase .hot-podium {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 20px !important;
  align-items: start !important;
}

.showcase-section.hot-showcase .hot-card,
.showcase-section.hot-showcase .hot-card:nth-child(1),
.showcase-section.hot-showcase .hot-card:nth-child(2),
.showcase-section.hot-showcase .hot-card:nth-child(3),
.showcase-section.hot-showcase .hot-podium .hot-card,
.showcase-section.hot-showcase .hot-podium .hot-card:nth-child(1),
.showcase-section.hot-showcase .hot-podium .hot-card:nth-child(2),
.showcase-section.hot-showcase .hot-podium .hot-card:nth-child(3) {
  align-self: start !important;
  display: grid !important;
  grid-template-rows: 180px minmax(86px, auto) !important;
  gap: 12px !important;
  top: auto !important;
  height: auto !important;
  min-height: 292px !important;
  margin-top: 0 !important;
  padding: 14px !important;
  overflow: hidden !important;
  transform: none !important;
  z-index: auto !important;
  border: 1px solid rgba(238, 188, 177, 0.62) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: 0 8px 20px rgba(134, 77, 39, 0.055) !important;
  text-align: center !important;
}

.showcase-section.hot-showcase .hot-card:hover,
.showcase-section.hot-showcase .hot-card:nth-child(1):hover,
.showcase-section.hot-showcase .hot-card:nth-child(2):hover,
.showcase-section.hot-showcase .hot-card:nth-child(3):hover,
.showcase-section.hot-showcase .hot-podium .hot-card:hover,
.showcase-section.hot-showcase .hot-podium .hot-card:nth-child(1):hover,
.showcase-section.hot-showcase .hot-podium .hot-card:nth-child(2):hover,
.showcase-section.hot-showcase .hot-podium .hot-card:nth-child(3):hover {
  transform: none !important;
  box-shadow: 0 14px 30px rgba(134, 77, 39, 0.10) !important;
}

.showcase-section.hot-showcase .hot-card > img {
  display: block !important;
  width: 100% !important;
  height: 180px !important;
  margin: 0 !important;
  padding: 6px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, rgba(255, 249, 243, 0.98), rgba(246, 250, 255, 0.96)) !important;
  object-fit: contain !important;
  box-sizing: border-box !important;
}

.showcase-section.hot-showcase .hot-card > span:not(.rank):not(.cart-dot) {
  display: grid !important;
  justify-items: center !important;
  align-content: start !important;
  gap: 5px !important;
  min-width: 0 !important;
}

.showcase-section.hot-showcase .hot-card .hot-badge,
.showcase-section.hot-showcase .hot-card .price,
.showcase-section.hot-showcase .hot-card .hot-note,
.showcase-section.hot-showcase .hot-card .cart-dot {
  display: none !important;
}

.showcase-section.hot-showcase .hot-card .neige-card-title {
  margin: 0 !important;
  color: #082a5d !important;
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 950 !important;
  text-align: center !important;
}

.showcase-section.hot-showcase .hot-card .neige-title-lines {
  display: grid !important;
  justify-items: center !important;
  gap: 3px !important;
}

.showcase-section.hot-showcase .hot-card .neige-title-zh {
  color: #082a5d !important;
  font-size: 15px !important;
  font-weight: 950 !important;
}

.showcase-section.hot-showcase .hot-card .neige-title-en {
  color: #697389 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  text-transform: uppercase !important;
}

.showcase-section.hot-showcase .hot-card::after,
.showcase-section.hot-showcase .hot-card:nth-child(2)::after,
.showcase-section.hot-showcase .hot-podium .hot-card::after {
  content: none !important;
  display: none !important;
}

.showcase-section.hot-showcase .hot-card .rank,
.showcase-section.hot-showcase .hot-card .rank-1,
.showcase-section.hot-showcase .hot-card .rank-2,
.showcase-section.hot-showcase .hot-card .rank-3,
.showcase-section.hot-showcase .hot-podium .hot-card .rank,
.showcase-section.hot-showcase .hot-podium .hot-card .rank-1,
.showcase-section.hot-showcase .hot-podium .hot-card .rank-2,
.showcase-section.hot-showcase .hot-podium .hot-card .rank-3 {
  top: 12px !important;
  left: 14px !important;
  display: grid !important;
  place-items: center !important;
  width: 48px !important;
  height: 48px !important;
  transform: none !important;
  border-radius: 15px !important;
  background: linear-gradient(135deg, #ffd544 0%, #ff8e00 100%) !important;
  background-image: linear-gradient(135deg, #ffd544 0%, #ff8e00 100%) !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  text-shadow: 0 1px 2px rgba(123, 55, 0, 0.25) !important;
  z-index: 2 !important;
}

.showcase-section.hot-showcase .mini-list {
  display: grid !important;
  gap: 12px !important;
  align-self: stretch !important;
}

.showcase-section.hot-showcase .mini-row {
  display: grid !important;
  grid-template-columns: 34px 58px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  min-height: 82px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(238, 188, 177, 0.55) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, 0.94) !important;
  box-shadow: 0 8px 18px rgba(134, 77, 39, 0.045) !important;
  text-decoration: none !important;
}

.showcase-section.hot-showcase .mini-row .num {
  display: grid !important;
  place-items: center !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px !important;
  background: #fff2ea !important;
  color: #ff5312 !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

.showcase-section.hot-showcase .mini-row img {
  width: 58px !important;
  height: 58px !important;
  border-radius: 10px !important;
  object-fit: contain !important;
  background: linear-gradient(135deg, rgba(255, 249, 243, 0.98), rgba(246, 250, 255, 0.96)) !important;
}

.showcase-section.hot-showcase .mini-row > span:last-child {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

.showcase-section.hot-showcase .mini-row .hot,
.showcase-section.hot-showcase .mini-row small {
  display: none !important;
}

.showcase-section.hot-showcase .mini-row .neige-card-title {
  color: #082a5d !important;
  font-size: 13px !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
}

.showcase-section.hot-showcase .mini-row .neige-title-en {
  color: #697389 !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

@media (max-width: 980px) {
  .showcase-section.hot-showcase .hot-layout {
    grid-template-columns: 1fr !important;
  }

  .showcase-section.hot-showcase .hot-podium {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

@media (max-width: 640px) {
  .neige-showcase-section,
  .showcase-section.hot-showcase {
    border-radius: 18px !important;
  }

  .showcase-section.hot-showcase .hot-podium {
    grid-template-columns: 1fr !important;
  }

  .showcase-section.hot-showcase .hot-card {
    grid-template-rows: 190px minmax(70px, auto) !important;
    min-height: 280px !important;
  }

  .showcase-section.hot-showcase .hot-card > img {
    height: 190px !important;
  }
}

/* ROBLOX category card: use the approved illustrated background only here. */
.cat-card[data-title="ROBLOX"] {
  border-color: rgba(255, 143, 44, 0.48) !important;
  background:
    linear-gradient(
      90deg,
      rgba(255, 251, 245, 0.58) 0%,
      rgba(255, 246, 232, 0.22) 42%,
      rgba(255, 246, 232, 0.08) 100%
    ),
    url("home/roblox-card-background-620x300.png") center / cover no-repeat !important;
  box-shadow: 0 10px 24px rgba(255, 123, 18, 0.10) !important;
}

.cat-card[data-title="ROBLOX"] .cat-art {
  display: none !important;
}

.cat-card[data-title="ROBLOX"] strong {
  color: #ff5312 !important;
}

.cat-card[data-title="ROBLOX"] span {
  color: #6b5b4c !important;
}

.cat-card[data-title="ROBLOX"] b {
  border-color: rgba(255, 112, 18, 0.22) !important;
  background: #ff5312 !important;
  color: #fff !important;
}

/* Steam replaces the retired custom-order card in the homepage category row. */
.cat-card[data-title="Steam"] {
  border-color: rgba(85, 137, 235, 0.42) !important;
  background:
    linear-gradient(
      90deg,
      rgba(248, 252, 255, 0.5) 0%,
      rgba(234, 244, 255, 0.15) 44%,
      rgba(234, 244, 255, 0.02) 100%
    ),
    url("home/cat-steam-v2.webp") center / cover no-repeat !important;
  box-shadow: 0 10px 24px rgba(39, 90, 181, 0.1) !important;
}

.cat-card[data-title="Steam"] .cat-art {
  display: none !important;
}

.cat-card[data-title="Steam"] strong {
  color: #0c3fae !important;
}

.cat-card[data-title="Steam"] span {
  color: #365179 !important;
}

/* Approved mobile homepage composition. Desktop rules above remain untouched. */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: clip !important;
  }

  body > main.page,
  body .page {
    width: calc(100% - 20px) !important;
    max-width: 520px !important;
    margin-inline: auto !important;
  }

  body .hero {
    min-height: 214px !important;
    margin-top: 10px !important;
    border-radius: 12px !important;
    background-position: 63% center !important;
    box-shadow: 0 8px 22px rgba(47, 67, 99, 0.08) !important;
  }

  body .hero::before {
    background: linear-gradient(90deg, rgba(255,255,255,.96) 0%, rgba(255,255,255,.88) 45%, rgba(255,255,255,.15) 72%) !important;
  }

  body .hero-inner {
    display: flex !important;
    min-height: 214px !important;
    align-items: center !important;
    padding: 20px 16px !important;
  }

  body .hero-inner > div:first-child {
    width: 76% !important;
  }

  body .hero h1 {
    max-width: 270px !important;
    font-size: clamp(23px, 7.2vw, 31px) !important;
    line-height: 1.18 !important;
  }

  body .hero-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 7px !important;
    margin-top: 18px !important;
  }

  body .hero-actions .btn {
    height: 38px !important;
    min-width: 0 !important;
    padding-inline: 11px !important;
    border-radius: 9px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    box-shadow: 0 8px 18px rgba(82, 59, 229, 0.14) !important;
  }

  body .section-head {
    margin: 18px 2px 9px !important;
    gap: 8px !important;
  }

  body .section-title {
    gap: 7px !important;
  }

  body .section-title i,
  body .section-title img,
  body .neige-section-icon {
    width: 24px !important;
    height: 24px !important;
    font-size: 21px !important;
    object-fit: contain !important;
  }

  body .section-title h2,
  body .neige-section-head h2 {
    font-size: 20px !important;
    line-height: 1.1 !important;
  }

  body .section-title p,
  body .section-pill,
  body .neige-section-head span {
    display: none !important;
  }

  body .see-all,
  body .neige-section-head > a {
    font-size: 11px !important;
  }

  body .category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body .cat-card {
    min-height: 94px !important;
    padding: 16px 12px !important;
    border-radius: 12px !important;
    background-position: center !important;
    box-shadow: 0 8px 18px rgba(58, 62, 98, 0.05) !important;
    transform: none !important;
  }

  body .cat-card strong {
    font-size: clamp(17px, 5.1vw, 22px) !important;
  }

  body .cat-card b,
  body .category-panel {
    display: none !important;
  }

  body .neige-showcase-section,
  body .showcase-section.hot-showcase {
    margin-top: 18px !important;
    padding: 12px 10px 14px !important;
    border-radius: 15px !important;
  }

  body .neige-section-head,
  body .showcase-section.hot-showcase .section-head {
    min-height: 30px !important;
    margin: 0 2px 10px !important;
  }

  body .neige-showcase-section .neige-product-grid {
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    gap: 8px !important;
    padding: 1px 1px 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    animation: none !important;
    scroll-snap-type: x mandatory !important;
    scrollbar-width: none !important;
    will-change: auto !important;
  }

  body .neige-showcase-section .neige-product-grid::-webkit-scrollbar {
    display: none !important;
  }

  body .neige-showcase-section .neige-product-card {
    display: flex !important;
    flex: 0 0 42% !important;
    width: auto !important;
    min-height: 168px !important;
    padding: 5px !important;
    border-radius: 10px !important;
    scroll-snap-align: start !important;
  }

  body .neige-showcase-section .neige-product-card[aria-hidden="true"] {
    display: none !important;
  }

  body .neige-showcase-section .neige-product-thumb {
    aspect-ratio: 1 / 1 !important;
    min-height: 0 !important;
    padding: 2px !important;
  }

  body .neige-showcase-section .neige-product-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  body .neige-showcase-section .neige-product-title {
    min-height: 30px !important;
    margin: 6px 2px 0 !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  body .neige-showcase-section .neige-product-bottom {
    justify-content: center !important;
    min-height: 19px !important;
  }

  body .neige-showcase-section .neige-product-price {
    max-width: 100% !important;
    color: #ff5312 !important;
    font-size: 10.5px !important;
    text-align: center !important;
  }

  body .neige-showcase-section .neige-cart-button {
    display: none !important;
  }

  body .showcase-section.hot-showcase .hot-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px !important;
  }

  body .showcase-section.hot-showcase .hot-podium {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body .showcase-section.hot-showcase .mini-list {
    display: none !important;
  }

  body .showcase-section.hot-showcase .hot-podium .hot-card,
  body .showcase-section.hot-showcase .hot-podium .hot-card:nth-child(1),
  body .showcase-section.hot-showcase .hot-podium .hot-card:nth-child(2),
  body .showcase-section.hot-showcase .hot-podium .hot-card:nth-child(3) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 88px minmax(38px, auto) !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 184px !important;
    min-height: 184px !important;
    margin: 0 !important;
    padding: 32px 6px 6px !important;
    gap: 5px !important;
    border-radius: 11px !important;
    transform: none !important;
    overflow: hidden !important;
    align-content: start !important;
    justify-content: stretch !important;
  }

  body .showcase-section.hot-showcase .hot-podium .hot-card:hover,
  body .showcase-section.hot-showcase .hot-podium .hot-card:nth-child(1):hover,
  body .showcase-section.hot-showcase .hot-podium .hot-card:nth-child(2):hover,
  body .showcase-section.hot-showcase .hot-podium .hot-card:nth-child(3):hover {
    transform: translateY(-2px) !important;
  }

  body .showcase-section.hot-showcase .hot-card > img {
    width: 100% !important;
    height: 88px !important;
    aspect-ratio: auto !important;
    padding: 2px !important;
    border-radius: 8px !important;
    object-fit: contain !important;
  }

  body .showcase-section.hot-showcase .hot-card > span:not(.rank):not(.cart-dot) {
    min-width: 0 !important;
    align-content: start !important;
    overflow: hidden !important;
  }

  body .showcase-section.hot-showcase .hot-podium .hot-card .rank,
  body .showcase-section.hot-showcase .hot-podium .hot-card .rank-1,
  body .showcase-section.hot-showcase .hot-podium .hot-card .rank-2,
  body .showcase-section.hot-showcase .hot-podium .hot-card .rank-3 {
    top: 5px !important;
    left: 8px !important;
    width: 24px !important;
    height: 24px !important;
    border-radius: 999px !important;
    background-image: none !important;
    background: linear-gradient(135deg, #ffbd37, #ff7b16) !important;
    color: #fff !important;
    font-size: 12px !important;
    transform: none !important;
  }

  body .showcase-section.hot-showcase .hot-card h3 {
    min-height: 27px !important;
    margin: 0 !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  body .showcase-section.hot-showcase .hot-card .price {
    color: #ff5312 !important;
    font-size: 10.5px !important;
  }

  body .neige-adventure-flow {
    margin-top: 18px !important;
    padding: 12px 8px 13px !important;
    border-radius: 14px !important;
  }

  body .neige-bottom-head {
    gap: 6px !important;
  }

  body .neige-bottom-head h2 {
    font-size: 19px !important;
  }

  body .neige-bottom-head span {
    font-size: 9px !important;
  }

  body .neige-adventure-flow .neige-map-steps {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 2px !important;
  }

  body .neige-adventure-flow .neige-map-step {
    min-width: 0 !important;
    padding: 2px !important;
    background: transparent !important;
  }

  body .neige-adventure-flow .neige-step-bubble {
    width: clamp(45px, 13vw, 58px) !important;
    height: clamp(45px, 13vw, 58px) !important;
  }

  body .neige-adventure-flow .neige-step-num {
    width: 20px !important;
    height: 20px !important;
    font-size: 10px !important;
  }

  body .neige-adventure-flow .neige-step-label {
    min-height: 25px !important;
    padding: 4px 3px !important;
    font-size: 8.5px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }

  body .neige-adventure-flow .neige-map-step p {
    display: none !important;
  }

  body .neige-adventure-flow .neige-map-route {
    top: 58px !important;
    height: 34px !important;
  }
}
