/* Umbrellomax Mall – homepage styles (desktop and mobile shops) */
:root {
  --red: #c80000;
  --red-600: #a80000;
  --red-50: #fff1f1;
  --maroon: #6e0b14;
  --ink: #1b1b1f;
  --ink-2: #4a4a55;
  --muted: #7b7b88;
  --line: #ececf1;
  --bg: #f6f6f9;
  --card: #ffffff;
  --gold: #f5a524;
  --green: #12805c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 20, 40, .06), 0 4px 16px rgba(20, 20, 40, .06);
  --shadow-lg: 0 10px 40px rgba(20, 20, 40, .18);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --hdr-h: 72px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--muted); font-size: 13px; }
.center { text-align: center; margin-top: 24px; }
.only-m { display: none !important; }


/* utility bar */
.util { background: var(--maroon); color: #ffdede; font-size: 13px; }
.util-in { display: flex; justify-content: space-between; align-items: center; height: 36px; }
.util-msg { display: inline-flex; gap: 6px; align-items: center; }
.util-msg .i { width: 16px; height: 16px; }
.util-links { display: flex; gap: 22px; }
.util-links a:hover { color: #fff; text-decoration: underline; }

/* header */
.hdr { position: sticky; top: 0; z-index: 40; background: var(--card); box-shadow: 0 1px 0 var(--line); transition: box-shadow .2s; }
.hdr.scrolled { box-shadow: 0 6px 24px rgba(20,20,40,.08); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: var(--hdr-h); transition: height .2s; }
.hdr.scrolled .hdr-in { height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.logo img { width: 78px; height: 60px; object-fit: contain; }
.mall-tag { font-size: 10px; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; color: #fff; background: var(--red); padding: 3px 4px 3px 7px; border-radius: 5px; align-self: flex-end; margin-bottom: 10px; margin-left: -6px; }
.logo span { font-size: 22px; letter-spacing: -.02em; color: var(--maroon); line-height: 1; position: relative; }
.logo b { color: var(--red); font-weight: 800; }
.logo span small { position: absolute; right: 0; top: 100%; font-size: 10px; font-weight: 700; letter-spacing: .32em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.logo.light span { color: #fff; } .logo.light small { color: #c9c9d6; }

.search { flex: 1; display: flex; position: relative; height: 46px; border: 2px solid var(--red); border-radius: 999px; background: #fff; }
.search select { border: 0; background: var(--red-50); padding: 0 14px 0 18px; border-radius: 999px 0 0 999px; color: var(--ink-2); font-size: 14px; max-width: 160px; outline: none; }
.search input { flex: 1; border: 0; outline: none; padding: 0 14px; font-size: 15px; min-width: 0; background: transparent; }
.search #searchGo { width: 58px; margin: 3px; border-radius: 999px; background: var(--red); color: #fff; display: grid; place-items: center; transition: background .15s; }
.search #searchGo:hover { background: var(--red-600); }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); background: #fff; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); overflow: hidden; z-index: 60; }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 8px 14px; font-size: 14px; }
.suggest a:hover, .suggest a.on { background: var(--red-50); }
.suggest img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; background: var(--bg); }
.suggest .s-meta { margin-left: auto; color: var(--red); font-weight: 700; white-space: nowrap; }
.suggest .s-h { padding: 8px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.suggest mark { background: none; color: var(--red); font-weight: 700; }

.hdr-actions { display: flex; gap: 6px; align-items: center; }
.act { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; transition: background .15s; }
.act:hover { background: var(--bg); }
.act span small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }
.badge { position: absolute; top: 2px; left: 26px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; display: grid; place-items: center; transform: scale(0); transition: transform .2s cubic-bezier(.3,1.6,.6,1); }
.badge.has { transform: scale(1); }
.badge.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.45); } }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--bg); }

/* category bar + mega menu */
.catbar { border-top: 1px solid var(--line); position: relative; }
.catbar-in { display: flex; align-items: center; gap: 8px; height: 46px; }
.allcats { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; background: var(--ink); color: #fff; padding: 0 16px; height: 34px; border-radius: 999px; flex: none; }
.allcats .i { width: 18px; height: 18px; }
.catlinks { display: flex; gap: 2px; overflow: hidden; }
.catlinks a { font-size: 14px; padding: 6px 12px; border-radius: 999px; white-space: nowrap; color: var(--ink-2); }
.catlinks a:hover { background: var(--red-50); color: var(--red); }
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: 0 20px 40px rgba(20,20,40,.14); border-top: 1px solid var(--line); animation: drop .18s ease-out; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.mega-in { display: grid; grid-template-columns: 260px 1fr; min-height: 320px; padding-top: 16px; padding-bottom: 20px; gap: 24px; }
.mega-list a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.mega-list a .i { color: var(--red); }
.mega-list a small { margin-left: auto; color: var(--muted); }
.mega-list a.on, .mega-list a:hover { background: var(--red-50); }
.mega-panel h4 { margin: 4px 0 12px; font-size: 18px; }
.mega-panel .mp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.mega-panel .mp-stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; }
.pill:hover { background: var(--red-50); color: var(--red); }
.mini { display: block; }
.mini img { aspect-ratio: 3/4; width: 100%; object-fit: cover; border-radius: 10px; background: var(--bg); }
.mini span { display: block; font-size: 12px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini b { font-size: 13px; color: var(--red); }

/* hero */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 20px; margin-top: 20px; }
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 21/9; background: #222; box-shadow: var(--shadow); }
.slides { display: flex; height: 100%; transition: transform .6s cubic-bezier(.6,0,.2,1); }
.slide { flex: 0 0 100%; position: relative; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slide-copy { position: absolute; left: 40px; bottom: 44px; z-index: 2; color: #fff; max-width: 420px; }
.slide-copy small { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--red); padding: 4px 10px; border-radius: 999px; }
.slide-copy h2 { font-size: 38px; line-height: 1.05; margin: 12px 0 14px; letter-spacing: -.02em; }
.slide-copy .btn { background: #fff; color: var(--ink); }
.car-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.9); display: grid; place-items: center; opacity: 0; transition: opacity .2s; z-index: 3; }
.carousel:hover .car-nav { opacity: 1; }
.car-nav.prev { left: 14px; } .car-nav.next { right: 14px; }
.dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,.55); transition: width .3s, background .3s; }
.dots button.on { width: 26px; background: #fff; }
.hero-side { display: grid; grid-template-rows: 1fr auto; gap: 16px; }
.welcome { background: #fff; border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); text-align: center; display: flex; flex-direction: column; justify-content: center; }
.avatar { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--red-50); color: var(--red); display: grid; place-items: center; }
.welcome h3 { margin: 0 0 4px; font-size: 18px; }
.welcome p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.btn-row { display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 14px; transition: transform .1s, background .15s, box-shadow .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-600); box-shadow: 0 6px 16px rgba(200,0,0,.28); }
.btn.ghost { background: #fff; border: 1.5px solid var(--line); }
.btn.ghost:hover { border-color: var(--red); color: var(--red); }
.btn-row .btn { flex: 1; }
.sell-card { display: block; border-radius: var(--radius); padding: 20px; color: #fff; background: radial-gradient(circle at 90% 10%, #ff4d4d 0, transparent 45%), linear-gradient(135deg, var(--maroon), var(--red)); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.sell-card b { font-size: 19px; display: block; }
.sell-card span { display: block; font-size: 13px; opacity: .9; margin: 6px 0 14px; }
.sell-card em { font-style: normal; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.sell-card em .i { width: 16px; height: 16px; transition: transform .2s; }
.sell-card:hover em .i { transform: translateX(4px); }

/* trust */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 20px; background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.trust div { background: #fff; padding: 16px 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.trust .i { grid-row: span 2; width: 30px; height: 30px; color: var(--red); }
.trust b { font-size: 14px; } .trust span { font-size: 12px; color: var(--muted); }

/* sections */
.sec { margin-top: 40px; }
.sec-h { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.sec-h h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.sec-h .sub { margin: 0; color: var(--muted); font-size: 14px; }
.sec-h .more { margin-left: auto; color: var(--red); font-weight: 700; font-size: 14px; }
.flame { color: var(--red); animation: pulse 1.6s infinite; display: inline-block; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.8); } }
.rail-ctl { margin-left: auto; display: flex; gap: 8px; }
.rail-ctl button { width: 36px; height: 36px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; }
.rail-ctl button:hover { color: var(--red); }

/* departments */
.depts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.dept { position: relative; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); aspect-ratio: 1/1; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; color: #fff; isolation: isolate; transition: transform .25s, box-shadow .25s; }
.dept img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s; }
.dept::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.72)); }
.dept .i { width: 30px; height: 30px; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); padding: 6px; border-radius: 10px; margin-bottom: auto; }
.dept b { font-size: 15px; line-height: 1.2; }
.dept small { font-size: 12px; opacity: .85; }
.dept:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dept.all { background: linear-gradient(135deg, var(--maroon), var(--red)); }
.dept:hover img { transform: scale(1.07); }

/* rails + cards */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 5 * 16px) / 6); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 14px; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; position: relative; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .ph { position: relative; aspect-ratio: 3/4; background: linear-gradient(110deg, #f0f0f4 30%, #f8f8fb 45%, #f0f0f4 60%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; overflow: hidden; }
.card .ph.loaded { animation: none; background: #f4f4f7; }
@keyframes shimmer { to { background-position: -150% 0; } }
.card .ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s, transform .5s; }
.card .ph.loaded img { opacity: 1; }
.card:hover .ph img { transform: scale(1.05); }
.card .tags { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; z-index: 2; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.tag.hot { background: var(--red); color: #fff; }
.tag.low { background: var(--gold); color: #3a2500; }
.tag.out { background: #3a3a44; color: #fff; }
.rank { position: absolute; left: 0; bottom: 0; z-index: 2; font-size: 42px; font-weight: 900; line-height: .8; color: #fff; padding: 0 0 8px 10px; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.card .fav { position: absolute; right: 10px; top: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; transition: transform .15s, color .15s; }
.card .fav:hover { transform: scale(1.1); color: var(--red); }
.card .fav.on { color: var(--red); } .card .fav.on .i { fill: var(--red); }
.card .fav .i { width: 18px; height: 18px; }
.card .quick { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; gap: 6px; opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.card:hover .quick, .card:focus-within .quick { opacity: 1; transform: none; }
.quick button { flex: 1; height: 36px; border-radius: 999px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.quick .qv-btn { background: rgba(255,255,255,.95); }
.quick .add-btn { background: var(--red); color: #fff; }
.quick .i { width: 16px; height: 16px; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name { font-size: 14px; line-height: 1.3; height: 2.6em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.price { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.price small { font-size: 12px; font-weight: 700; margin-right: 1px; }
.price s { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; }
.meta .v { width: 14px; height: 14px; color: var(--green); stroke-width: 2.4; }
.meta .store { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.meta .store:hover { color: var(--red); }
.sold { margin-left: auto; white-space: nowrap; }
.bar { height: 4px; border-radius: 2px; background: var(--red-50); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--red), #ff6a3d); border-radius: 2px; }

/* stores */
.store-filter { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.store-filter button { padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 13px; box-shadow: var(--shadow); }
.store-filter button.on { background: var(--ink); color: #fff; }
.stores { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.store { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; animation: rise .35s both; }
.store:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.store .shelf { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 3px; height: 150px; background: var(--bg); overflow: hidden; }
.store .shelf img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.store .shelf img:first-child { grid-row: span 2; }
.store .sbody { padding: 0 16px 16px; position: relative; }
.store .mono { width: 52px; height: 52px; border-radius: 14px; margin-top: -26px; border: 3px solid #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #fff; box-shadow: var(--shadow); position: relative; }
.store h3 { margin: 8px 0 2px; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.store h3 .i { width: 16px; height: 16px; color: var(--green); stroke-width: 2.4; }
.store p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.store .btn { height: 36px; width: 100%; }

/* showcases */
.show { display: grid; grid-template-columns: 280px 1fr; gap: 16px; margin-top: 40px; }
.show-banner { border-radius: var(--radius); padding: 24px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; isolation: isolate; min-height: 300px; }
.show-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: saturate(1.1); }
.show-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; }
.show-banner h3 { font-size: 26px; margin: 8px 0; letter-spacing: -.02em; }
.show-banner .i { width: 34px; height: 34px; }
.show-banner p { margin: 0; opacity: .9; font-size: 14px; }
.show-banner .btn { background: #fff; color: var(--ink); align-self: flex-start; }
.show .rail { grid-auto-columns: calc((100% - 3 * 16px) / 4); }

/* just for you */
.sticky-h { position: sticky; top: 104px; z-index: 20; background: var(--bg); padding: 10px 0; margin-bottom: 6px; }
.tools { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.seg { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 760px; }
.seg::-webkit-scrollbar { display: none; }
.seg button { padding: 7px 14px; border-radius: 999px; background: #fff; font-size: 13px; white-space: nowrap; box-shadow: var(--shadow); transition: background .15s, color .15s; }
.seg button.on { background: var(--red); color: #fff; }
.tools select { height: 34px; border-radius: 999px; border: 1px solid var(--line); padding: 0 12px; background: #fff; font-size: 13px; }

/* drawers, modal, toast */
.scrim { position: fixed; inset: 0; background: rgba(15,15,25,.45); z-index: 80; animation: fade .2s; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; bottom: 0; width: min(420px, 92vw); background: #fff; z-index: 90; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: slideR .25s ease-out; }
.drawer.right { right: 0; } .drawer.left { left: 0; animation-name: slideL; }
@keyframes slideR { from { transform: translateX(100%); } }
@keyframes slideL { from { transform: translateX(-100%); } }
.drawer > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer h3 { margin: 0; font-size: 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer > footer { padding: 16px 20px; border-top: 1px solid var(--line); }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); animation: rise .25s both; }
.line img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.line .ln { font-size: 14px; line-height: 1.3; }
.line .lp { font-weight: 800; font-size: 14px; margin-top: 4px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 6px; }
.qty button { width: 28px; height: 26px; font-size: 16px; }
.qty span { min-width: 22px; text-align: center; font-size: 13px; }
.line .rm { color: var(--muted); }
.line .rm:hover { color: var(--red); }
.total { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 12px; }
.total b { font-size: 20px; }
.drawer footer .btn { width: 100%; height: 48px; }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }
.empty .i { width: 48px; height: 48px; color: #d0d0da; }
.cat-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.cat-row .i { color: var(--red); }
.cat-row small { margin-left: auto; color: var(--muted); }

.modal { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 20px; }
.qv-card { width: min(920px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 20px; display: grid; grid-template-columns: 1fr 1fr; box-shadow: var(--shadow-lg); animation: pop .22s cubic-bezier(.3,1.3,.6,1); position: relative; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.qv-img { background: var(--bg); position: relative; min-height: 420px; }
.qv-img img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.qv-info { padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.qv-info h2 { margin: 0; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; }
.qv-info .price { font-size: 30px; color: var(--red); }
.qv-store { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg); border-radius: 12px; font-size: 14px; }
.qv-store .mono { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; }
.qv-store small { display: block; color: var(--muted); }
.qv-info .btn { height: 50px; }
.qv-close { position: absolute; right: 12px; top: 12px; z-index: 2; background: #fff; box-shadow: var(--shadow); border-radius: 50%; }
.stock { font-size: 13px; font-weight: 700; }
.stock.ok { color: var(--green); } .stock.low { color: #b56b00; } .stock.out { color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 120px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); transition: transform .3s cubic-bezier(.3,1.4,.6,1); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); }
.toast .i { color: #6ee7b7; width: 18px; height: 18px; }
.totop { position: fixed; right: 22px; bottom: 26px; width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); z-index: 30; opacity: 0; transform: translateY(20px); transition: opacity .2s, transform .2s; pointer-events: none; }
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.fly { position: fixed; z-index: 120; width: 60px; height: 60px; border-radius: 12px; object-fit: cover; pointer-events: none; transition: transform .7s cubic-bezier(.5,-0.3,.7,.4), opacity .7s; box-shadow: var(--shadow-lg); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s, transform .5s; }
.reveal.in { opacity: 1; transform: none; }

/* footer */
.ftr { background: #17171c; color: #b9b9c6; margin-top: 64px; padding: 48px 0 24px; font-size: 14px; }
.ftr-in { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.ftr h4 { color: #fff; margin: 0 0 12px; font-size: 14px; }
.ftr a { display: block; padding: 4px 0; } .ftr a:hover { color: #fff; }
.ftr .copy { margin-top: 32px; padding-top: 16px; border-top: 1px solid #2a2a33; font-size: 12px; }

/* tablet */
@media (max-width: 1100px) {
  .hdr-in { gap: 14px; }
  .act span { display: none; }
  .search select { display: none; }
  .util-msg { display: none; } .util-in { justify-content: flex-end; }
  .grid { grid-template-columns: repeat(4, 1fr); }
  .rail { grid-auto-columns: calc((100% - 3 * 16px) / 4); }
  .depts { grid-template-columns: repeat(4, 1fr); }
  .stores { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: 1fr; } .hero-side { display: none; }
  .show { grid-template-columns: 1fr; } .show-banner { min-height: 180px; }
}

/* phone: app-like */
@media (max-width: 767px) {
  :root { --hdr-h: 58px; }
  .only-d { display: none !important; }
  .only-m { display: flex !important; }
  .wrap { padding: 0 14px; }
  body { padding-bottom: 68px; }
  .util { display: none; }
  .hdr-in { gap: 8px; flex-wrap: wrap; height: auto; padding-top: 8px; padding-bottom: 10px; }
  .hdr.scrolled .hdr-in { height: auto; }
  .logo img { width: 34px; height: 34px; } .logo span { font-size: 19px; } .logo small { display: none; }
  .hdr-actions { margin-left: auto; }
  .act { padding: 8px; }
  .badge { left: 22px; }
  .search { order: 5; flex-basis: 100%; height: 42px; border-width: 1.5px; }
  .hdr.scrolled .search { margin-top: -2px; }
  .search select { display: none; }
  .search #searchGo { width: 46px; }
  .chips { gap: 8px; overflow-x: auto; padding: 10px 14px; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--line); }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--bg); font-size: 13px; white-space: nowrap; }
  .chips a .i { width: 16px; height: 16px; color: var(--red); }
  .hero { margin-top: 12px; }
  .carousel { aspect-ratio: 16/9; border-radius: 14px; }
  .slide-copy { left: 16px; bottom: 30px; } .slide-copy h2 { font-size: 22px; margin: 8px 0 0; } .slide-copy .btn { display: none; }
  .trust { grid-template-columns: repeat(2, 1fr); margin-top: 12px; }
  .trust div { padding: 12px; } .trust .i { width: 24px; height: 24px; } .trust span { display: none; } .trust b { font-size: 12px; }
  .sec { margin-top: 28px; }
  .sec-h h2 { font-size: 19px; }
  .depts { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .dept { aspect-ratio: auto; background: none; box-shadow: none; padding: 0; color: var(--ink); align-items: center; text-align: center; }
  .dept img, .dept::before { display: none; }
  .dept .i { width: 56px; height: 56px; padding: 14px; border-radius: 18px; background: var(--red-50); color: var(--red); backdrop-filter: none; margin: 0 0 6px; }
  .dept { justify-content: flex-start; }
  .dept b { font-size: 11px; font-weight: 600; line-height: 1.25; min-height: 2.5em; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
  .dept.all { background: none; }
  .dept.all .i { background: linear-gradient(135deg, var(--maroon), var(--red)); color: #fff; }
  .dept small { display: none; }
  .rail, .show .rail { grid-auto-columns: 42%; gap: 10px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { border-radius: 12px; }
  .card:hover { transform: none; }
  .card .quick { opacity: 1; transform: none; left: auto; right: 8px; bottom: 8px; }
  .quick .qv-btn { display: none; }
  .quick .add-btn { width: 38px; height: 38px; flex: none; padding: 0; border-radius: 50%; }
  .quick .add-btn span { display: none; }
  .card .body { padding: 10px; }
  .card .name { font-size: 13px; }
  .price { font-size: 16px; }
  .rank { font-size: 32px; }
  .stores { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 12px; padding-bottom: 8px; }
  .stores::-webkit-scrollbar { display: none; }
  .store { scroll-snap-align: start; }
  .store-filter { scrollbar-width: none; } .store-filter::-webkit-scrollbar { display: none; }
  .store-filter button { flex: none; white-space: nowrap; }
  #moreStores { display: none; }
  .stores-sec .sec-h { display: block; } .store-filter { margin: 10px 0 0; flex-wrap: nowrap; overflow-x: auto; }
  .store .shelf { height: 120px; }
  .show { margin-top: 28px; }
  .show-banner { min-height: 120px; padding: 16px; flex-direction: row; align-items: center; gap: 12px; }
  .show-banner h3 { font-size: 18px; margin: 0; } .show-banner p { display: none; } .show-banner .btn { height: 34px; padding: 0 14px; margin-left: auto; align-self: center; }
  .sticky-h { top: 104px; display: block; }
  .tools { margin: 10px 0 0; } .seg { max-width: none; flex: 1; }
  .qv-card { grid-template-columns: 1fr; border-radius: 20px 20px 0 0; align-self: end; max-height: 92vh; animation-name: sheet; }
  .modal { padding: 0; place-items: end stretch; }
  @keyframes sheet { from { transform: translateY(100%); } }
  .qv-img { min-height: 300px; }
  .qv-info { padding: 18px; } .qv-info h2 { font-size: 19px; } .qv-info .price { font-size: 24px; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--line); height: 62px; justify-content: space-around; align-items: stretch; padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a, .tabbar button { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; color: var(--muted); }
  .tabbar .on { color: var(--red); font-weight: 700; }
  .tabbar .badge { top: 6px; left: calc(50% + 4px); }
  .totop { bottom: 80px; right: 14px; width: 40px; height: 40px; }
  .toast { bottom: 80px; }
  .ftr-in { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* sign in / join dialog (desktop homepage; the forms post back to the server) */
.auth { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px; position: relative; animation: pop .22s cubic-bezier(.3,1.3,.6,1); }
.auth-card .qv-close { right: 12px; top: 12px; }
.auth-tabs { display: flex; gap: 4px; background: var(--bg); border-radius: 999px; padding: 4px; margin: 4px 0 20px; }
.auth-tabs button { flex: 1; height: 38px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); }
.auth-tabs button.on { background: #fff; color: var(--red); box-shadow: var(--shadow); }
.auth h3 { margin: 0 0 4px; font-size: 22px; }
.auth p.muted { margin: 0 0 16px; }
.auth input[type=text], .auth input[type=password], .auth input[type=email] { display: block; width: 100%; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 15px; margin-bottom: 10px; outline: none; transition: border-color .15s; }
.auth input:focus { border-color: var(--red); }
.auth .btn { width: 100%; height: 48px; margin-top: 6px; border: 0; cursor: pointer; }
.auth .links { display: flex; justify-content: space-between; font-size: 13px; margin: 2px 0 6px; }
.auth .links a { color: var(--red); }
.auth .err { color: var(--red); font-size: 13px; font-weight: 700; min-height: 18px; display: block; margin-bottom: 6px; }
.auth .hide, .auth [data-pane][hidden] { display: none !important; }
.hello { font-size: 13px; color: var(--muted); }
.loading .ph { min-height: 160px; }
.skeleton { border-radius: var(--radius); background: linear-gradient(110deg, #ececf1 30%, #f6f6f9 45%, #ececf1 60%) 0 0 / 300% 100%; animation: shimmer 1.4s infinite linear; }
.feed-error { text-align: center; padding: 40px 20px; color: var(--muted); }
@media (max-width: 767px) { .auth { place-items: end stretch; padding: 0; } .auth-card { border-radius: 20px 20px 0 0; animation-name: sheet; } }

/* production additions */
.por { font-size: 14px; color: var(--muted); font-weight: 700; }
.s-mono { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; flex: none; }
.s-count { color: var(--muted) !important; font-weight: 400 !important; }
.pill-red { background: var(--red); color: #fff; }
.mp-stores .muted { align-self: center; }
.show-banner::before { background: linear-gradient(160deg, var(--tint, rgba(110,11,20,.85)), rgba(0,0,0,.25)); }
.v-tick { width: 14px; height: 14px; color: var(--green); stroke-width: 2.4; vertical-align: -2px; }
.fav.fav-wide { position: static; width: auto; height: 50px; border-radius: 999px; background: #fff; }
.qv-more { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.line-btn { height: 30px; margin-top: 6px; font-size: 12px; }
.quick a.add-btn { flex: 1; height: 36px; border-radius: 999px; font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--red); color: #fff; }
.qv-info .btn-row .btn { height: 50px; }
@media (max-width: 767px) {
  .quick a.add-btn { width: 38px; height: 38px; flex: none; padding: 0; border-radius: 50%; }
  .quick a.add-btn span { display: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
