:root {
  --blue: #1740E8;
  --blue-deep: #0E2BB0;
  --blue-ink: #071A6E;
  --blue-wash: #EEF2FF;
  --blue-line: #C9D4FF;
  --red: #E3262E;
  --red-deep: #B9161D;
  --black: #000;
  --white: #fff;
  --ink: #0A0F1F;
  --muted: #525A70;
  --line: #E3E6EE;
  --soft: #F6F7FB;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Figtree", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--white); font-size: 16px; line-height: 1.5; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(28px, 3vw, 40px); }
h2 { font-size: 18px; }
h3 { font-size: 18px; }
p { margin: 0; }

.topbar { background: var(--black); color: rgba(255,255,255,.82); font-size: 14px; }
.topbar-row { display: flex; gap: 28px; min-height: 36px; align-items: center; }
.mast { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 18px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--black); flex: 0 0 auto; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.wordmark b { color: var(--red); font-weight: 700; }
.head-search { flex: 1; }
.head-search input, label input, label textarea, label select {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--white);
}
.head-search input:focus, label input:focus, label textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-wash);
}
label textarea { height: auto; border-radius: 14px; }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { text-decoration: none; font-weight: 600; }
.nav-links a:hover { color: var(--blue); }
.catbar-row { display: flex; gap: 4px; overflow-x: auto; padding: 4px 0 12px; scrollbar-width: none; }
.catbar-row::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; width: 92px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 700; text-align: center; padding: 6px 4px 4px; border-radius: 16px; }
.cat:hover { color: var(--ink); }
.cat[aria-current="page"] { color: var(--blue); }
.cat[aria-current="page"] .cat-logo { box-shadow: 0 0 0 3px var(--blue-wash), 0 0 0 4px var(--blue); }
.cat-logo { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--white); background: var(--blue); }
.cat-logo svg { width: 24px; height: 24px; }
.cat-logo-all { background: var(--black); }
.cat-logo-students { background: var(--blue); }
.cat-logo-general-use { background: var(--blue-deep); }
.cat-logo-china-models { background: var(--red); }
.cat-logo-image-and-video { background: linear-gradient(145deg, var(--red), var(--blue-ink)); }
.cat-logo-developers { background: var(--ink); }
.cat-logo-us-models { background: var(--blue-ink); }
.cat-logo-teams { background: var(--red-deep); }

.section { padding: 22px 0 56px; }
.note { color: var(--muted); margin-top: 8px; }
.shelf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.shelf h1 { font-size: 26px; }
.shelf p, .page-head p { color: var(--muted); margin-top: 4px; font-size: 15px; }
.count { color: var(--muted); font-size: 14px; white-space: nowrap; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.product { display: grid; gap: 10px; text-decoration: none; color: inherit; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 10px; }
.product[hidden] { display: none; }
.product:hover { border-color: var(--blue-line); box-shadow: 0 16px 32px -24px rgba(23, 64, 232, .7); }
.gift {
  aspect-ratio: 1.7 / 1;
  border-radius: 18px;
  padding: 18px 20px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 12%, rgba(227, 38, 46, .95), transparent 30%),
    linear-gradient(145deg, var(--blue), var(--blue-ink) 72%);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 40px -28px rgba(23, 64, 232, .8);
}
.gift strong { font-family: var(--display); font-size: clamp(20px, 2vw, 28px); font-weight: 600; margin-top: auto; }
.gift em { font-style: normal; opacity: .85; font-size: 14px; }
.gift-top, .gift-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.gift-foot { margin-top: 10px; }
.product-body { display: grid; gap: 6px; }
.product-cat { font-size: 12px; font-weight: 700; color: var(--red); letter-spacing: .06em; text-transform: uppercase; }
.product-body p { color: var(--muted); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--muted); }
.price { color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 16px; }

.crumb { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.crumb a { color: var(--blue); font-weight: 600; text-decoration: none; }
.product-layout, .checkout-grid { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: 32px; align-items: start; }
.checkout-grid { grid-template-columns: 1.15fr .85fr; }
.buybox > p, .panel > p { margin-top: 8px; }
.field-label { font-weight: 700; margin: 16px 0 8px; }
.denoms { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.denom { border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 10px 16px; font-weight: 700; cursor: pointer; }
.denom[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--white); }
label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; margin-top: 10px; }
.quote { background: var(--soft); border-radius: 16px; padding: 8px 16px; margin: 16px 0; }
.receipt { margin: 0; }
.receipt div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.receipt div:last-child { border-bottom: 0; }
.receipt dt { color: var(--muted); font-weight: 600; }
.receipt dd { margin: 0; font-family: var(--display); font-weight: 600; }
.receipt div:last-child dd { color: var(--blue); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-deep); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--blue-ink); }
.panel, .summary { border: 1px solid var(--line); border-radius: 22px; padding: 24px; background: var(--white); }
.summary { background: var(--soft); }
.fields { display: grid; gap: 4px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 12px 0; }
.check input { width: auto; }
.block-title { margin: 36px 0 12px; }
.table-wrap { border: 1px solid var(--line); border-radius: 22px; overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; }
th { background: var(--black); color: var(--white); border-top: 0; font-weight: 600; font-size: 14px; }
td.num, th.num { text-align: right; }
tbody tr:hover td { background: var(--blue-wash); }
.mid { display: block; font-family: var(--mono); color: var(--muted); font-size: 12px; margin-top: 2px; }
.narrow { max-width: 480px; }
.error { color: var(--red-deep); font-weight: 700; }
.site-foot { background: var(--ink); color: var(--white); padding: 40px 0; margin-top: 12px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.site-foot p { color: rgba(255,255,255,.75); margin-top: 10px; }
.site-foot a { color: var(--white); font-weight: 600; }
.site-foot .wordmark { color: var(--white); }
.keybox { font-family: var(--mono); background: var(--ink); color: var(--white); padding: 12px 14px; border-radius: 12px; word-break: break-all; }
.cards-row { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.admin-body { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; background: var(--soft); }
.admin-side { background: var(--ink); color: var(--white); padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.admin-side .wordmark { color: var(--white); }
.admin-side button, .admin-side a { background: transparent; color: var(--white); border: 0; text-align: left; padding: 10px 12px; border-radius: 12px; text-decoration: none; cursor: pointer; }
.admin-side button[aria-pressed="true"] { background: var(--blue); }
.admin-main { padding: 28px; }
.admin-main h1 { font-size: 28px; }
.stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.stat div, .stack { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.actions button, .small { border: 1.5px solid var(--line); background: var(--white); border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 700; }
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .product-layout, .checkout-grid, .foot-grid, .admin-body, .stat { grid-template-columns: 1fr; }
  .nav-row { flex-wrap: wrap; padding: 12px 0; height: auto; }
  .head-search { order: 3; flex-basis: 100%; }
}
@media (max-width: 700px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar-row span:not(:first-child) { display: none; }
}
