:root {
  --ink: #171915;
  --paper: #f7f7f1;
  --muted: #74766d;
  --line: #dedfd6;
  --green: #15b65a;
  --yellow: #f2e918;
  --orange: #ff9d4d;
  --card: #fffef8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.page-shell { width: min(100%, 760px); margin: 0 auto; padding: 26px 20px 34px; }
.hero { text-align: center; padding: 26px 0 33px; }
.brand-mark { display: grid; place-items: center; width: 56px; height: 56px; overflow: hidden; background: var(--ink); border-radius: 18px; margin: 0 auto 17px; box-shadow: 4px 4px 0 var(--yellow); }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { margin: 0; color: var(--muted); font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(30px, 7vw, 42px); letter-spacing: -.065em; line-height: 1; margin: 8px 0 11px; }
h2 { font-size: 23px; letter-spacing: -.045em; margin: 4px 0 0; }
.hero-copy { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.availability-chip { display: inline-flex; gap: 8px; align-items: center; padding: 7px 11px; color: #61645c; background: #ecece4; border-radius: 999px; font-family: "DM Mono", monospace; font-size: 10px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(21, 182, 90, .14); }

.quick-links, .inventory { border-top: 1px solid var(--line); padding-top: 22px; }
.section-heading, .inventory-topline { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading > span { font-size: 13px; color: var(--muted); }
.link-stack { display: grid; gap: 9px; }
.quick-link { min-height: 65px; display: flex; align-items: center; gap: 13px; padding: 11px 13px 11px 12px; color: var(--ink); text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 15px; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.quick-link:hover { transform: translateY(-2px); border-color: #a1a398; box-shadow: 0 7px 0 rgba(23,25,21,.08); }
.quick-link.is-placeholder { cursor: default; opacity: .72; }
.quick-link.is-placeholder:hover { transform: none; box-shadow: none; border-color: var(--line); }
.link-icon { display: grid; place-items: center; flex: 0 0 39px; height: 39px; border-radius: 11px; background: #ecece4; font-size: 17px; }
.link-copy { flex: 1; min-width: 0; }
.link-copy strong, .link-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-copy strong { font-size: 14px; letter-spacing: -.02em; }
.link-copy small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.arrow { font-size: 22px; font-weight: 400; line-height: 1; }

.inventory { margin-top: 30px; }
.refresh-button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; color: #4e514a; font-size: 12px; background: transparent; border: 1px solid var(--line); border-radius: 9px; }
.refresh-button:hover { background: #ecece4; }
.refresh-button svg { width: 15px; height: 15px; }
.refresh-button.loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stock-summary { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; margin-bottom: 14px; background: var(--ink); color: #fff; border-radius: 15px; }
.stat { padding: 13px 13px 12px; border-right: 1px solid #3b3d37; }
.stat:last-child { border: 0; }
.stat-number { display: block; font-size: 21px; letter-spacing: -.06em; font-weight: 800; line-height: 1.1; }
.stat-label { display: block; margin-top: 3px; color: #b9bab3; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .05em; }
.toolbar { display: flex; gap: 10px; margin-bottom: 13px; }
.search-box { display: flex; flex: 1; align-items: center; gap: 8px; padding: 0 11px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.search-box svg { width: 17px; height: 17px; color: var(--muted); }
.search-box input { width: 100%; height: 38px; min-width: 0; color: var(--ink); outline: 0; border: 0; background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #a1a398; }
.filter-group { display: flex; gap: 4px; padding: 3px; background: #e8e9e0; border-radius: 10px; }
.filter { padding: 0 9px; color: #696c64; background: transparent; border: 0; border-radius: 7px; font-size: 11px; font-weight: 600; }
.filter.active { color: var(--ink); background: #fff; box-shadow: 0 1px 2px rgba(23,25,21,.08); }
.legend { display: flex; flex-wrap: wrap; gap: 11px; margin: 0 0 15px; color: var(--muted); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; }
.dot.in-stock { background: var(--green); }
.dot.restocking { background: var(--yellow); border: 1px solid #c7bd02; }
.dot.incoming { background: var(--orange); }

.product-grid { display: grid; gap: 10px; }
.product-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; overflow: hidden; min-height: 162px; background: var(--card); border: 1px solid var(--line); border-radius: 15px; }
.product-visual { position: relative; display: grid; place-items: center; align-self: start; aspect-ratio: 1 / 1; overflow: hidden; background: var(--product-color, #cfd3c9); }
.product-visual::before { content: ""; position: absolute; width: 95px; height: 51px; background: rgba(255,255,255,.78); border: 2px solid rgba(23,25,21,.4); border-radius: 47% 35% 25% 21% / 63% 47% 31% 20%; transform: rotate(-13deg) translate(-2px, 4px); box-shadow: inset -16px -7px 0 rgba(23,25,21,.1); }
.product-visual::after { content: ""; position: absolute; width: 58px; height: 3px; background: rgba(23,25,21,.26); border-radius: 10px; transform: translate(-4px, -5px) rotate(-13deg); box-shadow: 0 7px 0 rgba(23,25,21,.26), 0 14px 0 rgba(23,25,21,.26); }
.product-visual.has-image::before, .product-visual.has-image::after { display: none; }
.product-image { position: absolute; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.product-initials { z-index: 1; position: absolute; bottom: 10px; left: 9px; color: rgba(23,25,21,.72); font-family: "DM Mono", monospace; font-size: 9px; font-weight: 500; letter-spacing: .04em; }
.product-visual.has-image .product-initials { z-index: 3; padding: 3px 5px; color: #fff; background: rgba(23,25,21,.58); border-radius: 4px; }
.color-swatch { z-index: 1; position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; background: var(--swatch, #000); border: 1px solid rgba(255,255,255,.7); border-radius: 50%; }
.product-visual.has-image .color-swatch { z-index: 3; }
.product-content { padding: 14px 14px 13px; min-width: 0; }
.product-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 7px; margin-bottom: 10px; }
.product-heading h3 { overflow: hidden; margin: 0; font-size: 14px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.product-note { flex: 0 0 auto; color: #8c6000; font-family: "DM Mono", monospace; font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.product-description { min-height: 13px; overflow: hidden; margin: -4px 0 8px; color: var(--muted); font-size: 9px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.size-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 3px; }
.size { display: grid; place-items: center; min-height: 44px; padding: 4px 1px; border-radius: 5px; text-align: center; }
.size strong { display: block; font-family: "DM Mono", monospace; font-size: 10px; font-weight: 500; }
.size small { display: block; margin-top: 2px; font-family: "DM Mono", monospace; font-size: 7px; letter-spacing: -.04em; }
.size.in-stock { color: #0e4525; background: #c7f4d8; }
.size.restocking { color: #5b5600; background: #fff9a4; }
.size.incoming { color: #734008; background: #ffd8b2; }
.product-links { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.product-link { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; color: #3f5f4c; background: #eef6ed; border: 1px solid #b7d7bc; border-radius: 999px; font-family: "DM Mono", monospace; font-size: 8px; font-weight: 500; letter-spacing: -.02em; text-decoration: none; transition: background .16s ease, transform .16s ease; }
.product-link:hover { background: #d6f0d8; transform: translateY(-1px); }
.product-link.taobao { color: #a34d18; background: #fff0e7; border-color: #ffd0b5; }
.product-link.yupoo { color: #365a8c; background: #edf4ff; border-color: #bfd5f3; }
.empty-state { margin: 26px 0 6px; color: var(--muted); text-align: center; font-size: 13px; }
.notice { display: flex; gap: 11px; margin-top: 23px; padding: 13px; background: #efeee5; border-radius: 13px; color: #5d6058; font-size: 11px; line-height: 1.55; }
.notice-icon { display: grid; place-items: center; flex: 0 0 20px; height: 20px; color: #fff; background: var(--ink); border-radius: 50%; font-family: "DM Mono", monospace; font-size: 12px; }
.notice p { margin: 0; }
.notice strong { color: var(--ink); }
footer { display: flex; justify-content: space-between; padding-top: 20px; color: #898b83; font-family: "DM Mono", monospace; font-size: 9px; letter-spacing: .03em; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }

@media (max-width: 500px) {
  .page-shell { padding: 18px 14px 27px; }
  .hero { padding-top: 20px; }
  .toolbar { display: block; }
  .search-box { margin-bottom: 8px; }
  .filter-group { display: inline-flex; }
  .product-card { grid-template-columns: 118px minmax(0, 1fr); }
  .product-content { padding: 12px 10px; }
  .size-grid { gap: 2px; }
  .size { min-height: 38px; }
  .size strong { font-size: 9px; }
  .size small { display: none; }
  .product-note { max-width: 65px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .product-link { min-height: 20px; padding: 0 6px; font-size: 7px; }
}
