/* HaoYang Mall | final purple-and-gold storefront skin + compact top search.
   PRESENTATION ONLY. Existing Vue rendering, catalog, checkout, payments, bot and API remain unchanged.
   Designed to load last after hm-storefront.css / hm-home-final.css. */
:root { --acid:#f1ca86; --bg:#100b17; --panel:#1b1425; --panel-2:#23192f; --line:#4b395b; --muted:#ab9db7; }
html,body { background:#100b17; }
body { background:radial-gradient(ellipse at 55% 0,#2f1a3d,#100b17 55%,#0b0910 100%); }
.market-shell { color:#f9f4fb; background:linear-gradient(180deg,#160e22 0%,#110d18 35%,#100b17 100%); }
.market-header { border-bottom:1px solid #4d315c; background:linear-gradient(115deg,rgba(29,17,43,.96),rgba(13,10,22,.98)); }
.brand-block strong { color:#fffaf8; }
.brand-block small { color:#bfaec9; }
.market-header .search-trigger { border-radius:12px; border-color:#7b498e; background:linear-gradient(140deg,#251734,#15101f); color:#f3c978; }
.market-header .search-trigger:hover { border-color:#b582ce; }
.search-drawer { border-color:#826096; border-radius:14px; background:#24172de9; box-shadow:0 10px 28px #0704117a; }
.search-drawer input { color:#faf4fb; font-size:14px; }
.search-drawer input::placeholder {color:#b7a8c5;}

/* Home header: single row, authentic, clickable official-bot link + REAL existing search handler. */
.market-shell:has(> .home-page) > .market-header {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto 38px !important;
  align-items:center !important;
  column-gap:8px !important;
  row-gap:0 !important;
  flex-wrap:nowrap !important;
  min-height:0 !important;
  padding:calc(10px + var(--safe-top,0px)) calc(12px + var(--safe-right,0px)) 10px calc(12px + var(--safe-left,0px)) !important;
}
.market-shell:has(> .home-page) .market-header .brand-block {
  grid-column:1; grid-row:1;
  box-sizing:border-box;
  width:auto !important; max-width:100% !important; min-width:0 !important;
  min-height:42px !important; height:auto !important;
  padding:3px 0 3px 45px !important; margin:0 !important;
  flex:none !important;
  justify-content:center;
}
.market-shell:has(> .home-page) .market-header .brand-block::before {
  top:1px !important;left:0 !important;width:39px !important;height:39px !important;
  border-radius:12px !important;
  background:#21142c url('/assets/hm-brand-avatar.jpg') center / cover no-repeat !important;
  border:1px solid #9c64bc !important;box-shadow:0 0 10px #ab4bdd25;
}
/* The previous CSS-only TG label was not clickable; replace it with an accessible link. */
.market-shell:has(> .home-page) .market-header .brand-block::after {content:none !important; display:none !important;}
.market-shell:has(> .home-page) .market-header .brand-block > span {display:none !important;}
.market-shell:has(> .home-page) .market-header .brand-block strong {
  display:block; width:100%; max-width:100% !important;
  font-size:clamp(12px,3.9vw,16px) !important; font-weight:790;
  margin:0 !important; letter-spacing:0; line-height:1.25;
  overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
.market-shell:has(> .home-page) .market-header .brand-block small {
  display:block; margin:3px 0 0 !important; font-size:clamp(8px,2.35vw,10px) !important;
  line-height:1.2; overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
.hm-official-link {display:none;}
.market-shell:has(> .home-page) .market-header .hm-official-link {
  grid-column:2;grid-row:1; display:inline-flex; align-items:center;justify-content:center;
  height:33px; min-width:0; padding:0 9px; border:1px solid #b68a52;
  border-radius:999px; background:linear-gradient(110deg,#261728,#1a1427);
  color:#f3d398;text-decoration:none;white-space:nowrap;
  font-size:clamp(9px,2.4vw,11px); font-weight:740;
  box-shadow:0 0 14px #e0ad4420;
}
.market-shell:has(> .home-page) .market-header .hm-official-link:focus-visible,
.market-shell:has(> .home-page) .market-header .search-trigger:focus-visible {outline:2px solid #edd19b;outline-offset:3px;}
.market-shell:has(> .home-page) .market-header .search-trigger {
  grid-column:3;grid-row:1;display:grid !important;place-items:center !important;
  box-sizing:border-box;width:38px !important; height:38px !important;
  min-height:38px !important; min-width:38px !important; max-width:38px !important;
  padding:0 !important;margin:0 !important;
  flex:none !important;order:0 !important;gap:0 !important;
  border-radius:12px !important;background:linear-gradient(145deg,#261735,#130d1e) !important;
  border:1px solid #824c9f !important; color:#efc575 !important;
}
.market-shell:has(> .home-page) .market-header .search-trigger::after {content:none !important;display:none !important;}
.market-shell:has(> .home-page) .market-header .search-trigger svg {width:21px !important;height:21px !important;}
@media(max-width:365px) {
  .market-shell:has(> .home-page) > .market-header {grid-template-columns:minmax(0,1fr) auto 36px !important;column-gap:5px !important;padding-left:9px !important;padding-right:9px !important;}
  .market-shell:has(> .home-page) .market-header .brand-block {padding-left:39px !important;}
  .market-shell:has(> .home-page) .market-header .brand-block::before {width:34px !important;height:34px !important;top:3px !important;}
  .market-shell:has(> .home-page) .market-header .hm-official-link {height:30px;padding:0 6px;font-size:9px;}
  .market-shell:has(> .home-page) .market-header .search-trigger {width:36px !important;height:36px !important;min-height:36px !important;min-width:36px !important;max-width:36px !important;}
}

/* Five page shared appearance; NO element insertion into shopping flow. */
.page { color:#f9f2fa; }
.page-heading { margin-bottom:14px; }
.page-heading > span {color:#eac783;letter-spacing:1px;}
.page-heading h1 {letter-spacing:-.6px;color:#fff9fd;}
.page-heading p {color:#ab9ab9;}
.category-scroller, .order-filter-tabs {scrollbar-width:none;}
.category-scroller button, .order-filter-tabs button {background:#1a1622;border:1px solid #3c3346;color:#baaabd;}
.category-scroller button.active, .order-filter-tabs button.active {background:#edc784 !important;color:#231828 !important;border-color:#edc784 !important;}
.product-grid {gap:10px !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
.product-card {
  min-width:0; border:1px solid #61456e !important;
  background:linear-gradient(158deg,#271934,#191222 72%) !important;
  border-radius:16px !important;box-shadow:0 3px 16px #08030c35 !important;overflow:hidden;
}
.product-card .card-visual {
  position:relative;aspect-ratio:1.14 / 1;
  border-radius:0 !important;
  background:radial-gradient(ellipse at 55% 85%,#634373,#2d1c3d 45%,#1d172c 100%) !important;
}
.product-card .card-product-image {object-fit:cover; width:100%; height:100%;}
.product-card .card-object {border:1px solid #88659c;border-radius:18px;background:linear-gradient(135deg,#4b315e,#271c34);box-shadow:0 9px 24px #0004;}
.product-card .card-object span {color:#f0c784;}
.product-card .card-tag {border:1px solid #bb965b;border-radius:999px;color:#f5d696;background:#231529e9;}
.product-card .card-cart-button {background:linear-gradient(135deg,#f6dca5,#ddb377) !important;color:#261929 !important;border-color:#f1d397 !important;}
.product-card .card-copy {background:linear-gradient(160deg,rgba(34,22,43,.96),rgba(25,17,34,.98));}
.product-card .card-topline small {color:#d8b77d !important;}
.product-card .card-favorite-action {color:#e8cb95;}
.product-card .card-copy h3 {color:#fff8fb;font-weight:740;}
.product-card .card-copy p {color:#aa9baf;}
.product-card .card-sales {color:#a596ac;}
.product-card .card-purchase-row > span {color:#f2cd86 !important;font-weight:800;}
.product-card .card-buy-button, .primary-action {background:#edc783 !important;color:#211522 !important;border-color:#e8c47d !important;font-weight:800;}
.product-card .card-buy-button:disabled,.primary-action:disabled {opacity:.55;}
.home-page {padding-top:8px !important;}
.home-page > .home-welcome,.home-page > .home-categories {display:none !important;}
.home-page > .banner-carousel,.home-page > .featured-panel {
  border:1px solid #715286 !important;border-radius:17px !important;overflow:hidden;
  margin-bottom:0 !important;box-shadow:0 6px 20px #0003;
}
.home-page > .banner-carousel {background-position:center center !important;}
.home-page > .marquee-announcement,.home-page > .hm-ui-notice {
  display:flex !important; box-sizing:border-box;
  width:100% !important;max-width:none !important;
  margin:11px 0 0 !important;min-height:34px !important;
  border:1px solid #96764e !important;border-radius:999px !important;
  background:linear-gradient(110deg,#201625,#130f1c) !important;
}
.home-page > .section-block {order:2;padding-top:12px !important;}
.home-page .section-title {margin-bottom:9px !important;}
.home-page .section-title h2 {font-size:19px !important;}
.home-page .product-grid .card-visual {height:clamp(110px,28vw,152px) !important;aspect-ratio:auto !important;max-height:152px;}
.home-page .product-grid .card-copy {padding:8px 9px 10px !important;}
.home-page .product-grid .card-copy h3 {font-size:12px !important;min-height:0 !important;margin:3px 0 4px !important;}
.home-page .product-grid .card-copy .card-sales {margin-bottom:5px !important;}
.home-page .product-grid .card-purchase-row > span {font-size:15px !important;}
.home-page .product-grid .card-buy-button {min-width:48px !important;min-height:30px !important;font-size:10px !important;}
.home-page .product-grid > .product-card:nth-child(n+5) {display:none;}

/* Market filters + grid */
.market-page .category-scroller {padding-bottom:7px;margin-bottom:8px;}
.market-page .product-grid .card-visual {height:auto !important;aspect-ratio:1.08/1 !important;}
.market-page .product-grid .card-copy {padding:9px 10px 11px;}
.market-page .product-grid .card-buy-button {border-radius:10px;}
/* Cart, orders and profile: consistent quiet panels, gold hierarchy. */
.cart-page .empty-panel,.cart-page .cart-line,.cart-page .order-summary,
.simple-page .order-card,.profile-page .profile-card,.profile-page .balance-card,
.profile-page .account-actions > button,.profile-page .order-status-grid > button {
  border:1px solid #493755 !important;border-radius:16px !important;
  background:linear-gradient(150deg,#221827,#17131d) !important;
  box-shadow:none !important;
}
.cart-page .empty-panel {padding:32px 19px !important;min-height:260px !important;}
.cart-page .empty-panel > span {color:#f1c983;}
.cart-page .cart-art {border-radius:12px;}
.cart-page .cart-copy strong,.cart-page .summary-total strong {color:#edc885 !important;}
.simple-page .order-card {padding:15px !important;margin-bottom:12px;}
.simple-page .order-card-head {border-bottom:1px solid #3a2c44;}
.simple-page .order-amount b {color:#f6dfb7;}
.simple-page .order-status-row > span {border-color:#47374d;background:#16151c;}
.profile-page .profile-card {display:flex;align-items:center;gap:15px;padding:16px !important;}
.profile-page .profile-card .avatar {border-radius:14px !important;border:1px solid #d8b277 !important;background:linear-gradient(140deg,#f2d58e,#d5ac63) !important;color:#1d1425;box-shadow:0 2px 12px #d9ab3d30;}
.profile-page .profile-card h2 {color:#fef9fe;}
.profile-page .profile-card p {color:#c6b3ce;}
.profile-page .balance-card {background:radial-gradient(circle at 95% 0%,#4c352f,#1a151c 42%) !important;border-color:#766039 !important;}
.profile-page .balance-card strong {color:#fff7e8;}
.profile-page .balance-card button {border:1px solid #b38a58;background:#271c27;color:#f7d9a0;border-radius:11px;}
.profile-page .account-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.profile-page .account-actions > button {min-width:0;padding:16px !important;}
.profile-page .account-actions > button > span {color:#f0d196;}
.bottom-nav {background:linear-gradient(180deg,#25192eF5,#1c1424FA) !important;border-top:1px solid #654577 !important;backdrop-filter:blur(16px);}
.bottom-nav button {color:#b7a6c4 !important;}
.bottom-nav button.active {color:#f4cd83 !important;}
.bottom-nav button.active svg {filter:drop-shadow(0 0 5px #ecc17b52);}
@media(max-width:400px) {
  .home-page .product-grid {gap:8px !important;}
  .home-page .product-grid .card-visual {height:clamp(105px,30vw,137px) !important;}
  .home-page .product-grid .card-copy {padding:8px !important;}
  .home-page .product-grid .card-copy h3 {font-size:11px !important;}
  .market-page .product-grid .card-copy {padding:8px;}
}
@media(prefers-reduced-motion:reduce) {
 .home-page .marquee-track,.home-page .hm-ui-notice-track {animation:none !important;}
}
