/* HaoYang Mall — approved front-page finishing pass, 2026-11-06c.
   Presentation-only. Works above installed 20261106b layer.
   No app state, database, payment, admin or bot logic is changed.
*/

/* Brand/search is compact on the home page only; keep the real search handler. */
.market-shell:has(> .home-page) .market-header {
  gap: 6px;
  padding: calc(7px + var(--safe-top, 0px)) calc(12px + var(--safe-right, 0px)) 8px calc(12px + var(--safe-left, 0px));
  min-height: 0;
}
.market-shell:has(> .home-page) .market-header .brand-block {
  box-sizing: border-box;
  flex: 1 1 100%;
  width: 100%;
  min-height: 49px;
  padding: 5px 0 4px 51px;
}
.market-shell:has(> .home-page) .market-header .brand-block::before {
  width: 42px;
  height: 42px;
  top: 3px;
}
.market-shell:has(> .home-page) .market-header .brand-block::after {
  top: 10px;
  right: 0;
  padding: 5px 8px;
  font-size: 10px;
}
.market-shell:has(> .home-page) .market-header .brand-block strong {
  margin-top: 1px;
  font-size: 16px;
}
.market-shell:has(> .home-page) .market-header .brand-block small { margin-top: 3px; font-size: 9px; }
.market-shell:has(> .home-page) .market-header .search-trigger {
  box-sizing: border-box;
  flex: 0 0 91%;
  width: 91%;
  max-width: 540px;
  min-height: 36px;
  height: 36px;
  margin: 0 auto;
  padding: 0 13px;
  gap: 10px;
  border-radius: 24px;
}
.market-shell:has(> .home-page) .market-header .search-trigger::after { font-size: 11px; }
.market-shell:has(> .home-page) .market-header .search-trigger svg { width: 19px; height: 19px; }

/* Preserve the ENTIRE supplied branded banner; no center cropping or overlaid copy. */
.home-page { padding-top: 8px; }
.home-page > .featured-panel {
  aspect-ratio: 933 / 433 !important;
  background-color: #140e1c !important;
  background-image: url('/assets/hm-banner-fallback.png') !important;
  background-position: center center !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  min-height: 0 !important;
  border-radius: 16px;
}
/* Merchant-configured banners may have another ratio: letterbox rather than crop. */
.home-page > .banner-carousel {
  aspect-ratio: 933 / 433 !important;
  background-color: #140e1c;
  background-size: 100% 100%, contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  min-height: 0;
  border-radius: 16px;
}
.home-page > .banner-carousel .banner-copy { max-width: 64%; }

/* Both configured announcements and the no-announcement fallback sit BELOW the hero. */
.home-page > .marquee-announcement,
.home-page > .hm-ui-notice {
  box-sizing: border-box;
  order: 1;
  width: 92%;
  max-width: 550px;
  min-height: 32px;
  margin: 9px auto 0;
  border-radius: 999px;
  align-items: center;
}
.home-page > .marquee-announcement .announcement-label,
.home-page > .hm-ui-notice .hm-ui-notice-label {
  min-height: 30px;
  padding: 0 9px;
  font-size: 9px;
  line-height: 1.1;
}
.home-page > .marquee-announcement .marquee-track {
  padding: 8px 11px;
  gap: 34px;
}
.home-page > .hm-ui-notice .hm-ui-notice-track {
  min-height: 30px;
  padding: 0 11px;
  gap: 28px;
}
.home-page > .marquee-announcement .marquee-track span,
.home-page > .hm-ui-notice .hm-ui-notice-track span { font-size: 10px; }

/* Real product grid: first pair should be easily visible, with all shopping actions intact. */
.home-page .section-block { padding-top: 10px; }
.home-page .section-title { margin-bottom: 8px; }
.home-page .section-title h2 { font-size: 18px; }
.home-page .section-title > button { min-height: 29px; }
.home-page .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.home-page .product-card { min-width: 0; min-height: 0; border-radius: 14px; }
.home-page .card-visual {
  aspect-ratio: auto !important;
  height: clamp(100px, 24vw, 156px) !important;
  min-height: 0;
  max-height: 156px;
}
.home-page .card-object { width: 57px; height: 57px; border-radius: 17px; }
.home-page .card-object span { font-size: 36px; }
.home-page .card-copy { padding: 7px 9px 8px; }
.home-page .card-copy .card-topline { min-height: 0; margin: 0 0 2px; }
.home-page .card-copy .card-topline small { font-size: 8px; }
.home-page .card-copy h3 {
  margin: 3px 0 4px;
  font-size: 12px;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  overflow: hidden;
}
.home-page .card-copy .card-sales { margin: 0 0 5px; font-size: 8px; }
.home-page .card-copy .card-purchase-row span { font-size: clamp(13px, 2vw, 17px); }
.home-page .card-copy .card-buy-button { min-height: 30px; min-width: 43px; padding: 5px 9px; font-size: 10px; }
.home-page .card-visual > .card-cart-button { width: 34px; height: 34px; min-height: 34px; }
.home-page .card-visual > .card-tag { top: 7px; left: 7px; padding: 3px 7px; }
.home-page { padding-bottom: calc(85px + var(--safe-bottom, 0px)); }

@media (max-width: 480px) {
  .market-shell:has(> .home-page) .market-header { gap: 5px; }
  .market-shell:has(> .home-page) .market-header .brand-block::after { top: 12px; font-size: 9px; }
  .market-shell:has(> .home-page) .market-header .search-trigger { width: 89%; flex-basis: 89%; height: 34px; min-height: 34px; }
  .home-page > .marquee-announcement, .home-page > .hm-ui-notice { width: 91%; min-height: 31px; }
  .home-page .card-visual { height: clamp(88px, 27vw, 122px) !important; max-height: 122px; }
  .home-page .card-object { width: 52px; height: 52px; }
  .home-page .card-object span { font-size: 34px; }
  .home-page .card-copy { padding: 7px 7px 8px; }
  .home-page .card-copy h3 { font-size: 11px; }
  .home-page .card-copy .card-purchase-row span { font-size: 13px; }
  .home-page .card-copy .card-buy-button { min-width: 42px; padding: 4px 6px; }
}
@media (max-width: 350px) {
  .market-shell:has(> .home-page) .market-header .brand-block::after { max-width: 43%; font-size: 8px; padding: 4px 5px; }
  .home-page .product-grid { gap: 7px; }
  .home-page .card-copy .card-purchase-row span { font-size: 12px; }
}
