:root {
  --bg: #f3efe6;
  --surface: #fffdf8;
  --surface-2: #ebe4d6;
  --ink: #0b1220;
  --muted: #5a6170;
  --subtle: #8a909c;
  --accent: #c8102e;
  --accent-hover: #a50d25;
  --accent-fg: #fffdf8;
  --navy: #0b1f3a;
  --navy-fg: #f4f0e8;
  --navy-2: #16325a;
  --line: #d8d1c3;
  --danger: #8f2d2d;
  --radius: 16px;
  --shadow: 0 0 0 1px rgba(11, 31, 58, 0.06), 0 2px 8px 0 rgba(11, 31, 58, 0.04);
  --font: "Figtree", system-ui, sans-serif;
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, [type="submit"], [type="button"] { cursor: pointer; font-family: inherit; }
.stripe { height: 4px; background: linear-gradient(90deg, var(--navy) 0 42%, var(--accent) 42% 70%, var(--navy-fg) 70% 100%); }
.topbar { background: var(--navy); color: #fff; position: relative; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; }
.form-switch { position: relative; min-width: 0; }
.form-switch summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  min-height: 56px; padding: 0; user-select: none;
}
.form-switch summary::-webkit-details-marker, .form-switch summary::marker { display: none; content: ''; }
.form-switch summary img {
  height: 36px; width: 36px; object-fit: contain; background: #fff; border-radius: 9px; padding: 2px; flex: 0 0 auto;
}
.form-switch summary strong { font-size: 15px; font-weight: 600; white-space: nowrap; }
.swap-ico {
  width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.form-menu {
  position: absolute; left: 0; top: calc(100% + 4px); min-width: min(92vw, 320px);
  background: #fff; color: var(--ink); border-radius: 12px;
  box-shadow: 0 18px 40px rgba(11,18,32,.28); overflow: hidden; z-index: 60;
}
.form-menu a {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  color: inherit; text-decoration: none; border-top: 1px solid var(--line);
}
.form-menu a:first-child { border-top: 0; }
.form-menu a:hover { background: var(--surface-2); text-decoration: none; }
.form-menu a.on { background: #f8ecec; }
.form-menu img { height: 42px; width: 42px; object-fit: contain; background: #fff; border-radius: 8px; flex: 0 0 auto; }
.form-menu span { display: flex; flex-direction: column; min-width: 0; }
.form-menu strong { font-size: 15px; }
.form-menu small { color: var(--muted); font-size: 13px; }
.form-menu .now { margin-left: auto; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 600; }
.top-ico { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
.ico-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; border-radius: 10px; position: relative; text-decoration: none;
}
.ico-btn:hover { background: rgba(255,255,255,.12); text-decoration: none; color: #fff; }
.ico-btn b {
  position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--accent); color: #fff; border-radius: 999px; font-size: 10px; line-height: 16px; text-align: center;
}
tr.is-paid td { background: #e7f3e8; }
.paid-form { margin: 0; }
.paid-toggle { display: flex; align-items: center; gap: 8px; height: auto; cursor: pointer; }
.paid-toggle input { width: 20px; height: 20px; accent-color: #2f7d32; }
.paid-toggle span { font-size: 13px; font-weight: 600; }
.pic.logo-fallback { background: #fff; }
.pic.logo-fallback img.main-photo { object-fit: contain; padding: 28px; cursor: default; }
.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.top { background: var(--navy); color: var(--navy-fg); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; min-width: 0; }
.brand img { height: 48px; width: auto; max-width: 120px; object-fit: contain; background: transparent; border-radius: 8px; }
.brand small { display: block; font-family: var(--display); letter-spacing: 0.22em; font-size: 11px; color: rgba(255,255,255,.7); }
.brand strong { display: block; font-family: var(--display); font-size: 22px; letter-spacing: 0.04em; font-weight: 400; line-height: 1; }
nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { color: rgba(255,255,255,.85); padding: 0 12px; height: 44px; display: inline-flex; align-items: center; border-radius: 8px; text-decoration: none; }
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.nav-link b { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; margin-left: 6px; font-size: 12px; }
.switch {
  height: 36px; padding: 0 12px; display: inline-flex; align-items: center;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  color: #fff; font-size: 13px; text-decoration: none;
}
.switch:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.main { padding: 32px 0 80px; }
.foot { padding: 24px 0 40px; color: var(--subtle); font-size: 13px; }
.hero { display: grid; background: var(--navy); color: var(--navy-fg); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow); }
@media (min-width: 900px) { .hero { grid-template-columns: 1.05fr 0.95fr; } }
.hero-copy { padding: 32px 28px; }
.hero-copy p.kicker { text-transform: uppercase; letter-spacing: 0.22em; font-size: 12px; color: rgba(255,255,255,.7); margin: 0; }
.hero h1 { font-family: var(--display); font-size: clamp(42px, 7vw, 64px); line-height: 0.95; letter-spacing: 0.02em; margin: 12px 0 0; font-weight: 400; }
.hero h1 span { color: var(--accent); display: block; }
.hero .lead { max-width: 28rem; color: rgba(255,255,255,.8); }
.hero-media { position: relative; min-height: 220px; }
.hero-media img.cover { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; min-height: 220px; }
.hero-media img.badge { position: absolute; right: 16px; bottom: 16px; width: 110px; background: #fff; border-radius: 12px; padding: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 8px; border: 0; font-size: 14px; font-weight: 500; text-decoration: none; }
.btn:hover { text-decoration: none; }
.btn-accent { background: var(--accent); color: var(--accent-fg); }
.btn-accent:hover { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.2); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-navy { background: var(--navy); color: var(--navy-fg); }
.btn-sec { background: var(--surface-2); color: var(--ink); }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin: 40px 0 16px; }
h2, h1.page { font-family: var(--display); font-weight: 400; letter-spacing: 0.04em; line-height: 1; }
h1.page { font-size: 40px; margin: 8px 0 8px; }
h2 { font-size: 30px; margin: 0; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid.products { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .grid.products { grid-template-columns: 1fr 1fr 1fr; } }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { position: relative; aspect-ratio: 4/3; background: var(--surface-2); overflow: hidden; }
.card .pic img.main-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; z-index: 1;
}
.thumbs { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5; display: flex; gap: 6px; overflow-x: auto; }
.thumb { width: 44px; height: 44px; padding: 0; border: 2px solid #fff; border-radius: 6px; overflow: hidden; background: #fff; flex: 0 0 auto; }
.thumb img { width: 44px; height: 44px; object-fit: cover; display: block; }
.card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-family: var(--display); font-size: 24px; margin: 0; letter-spacing: 0.04em; font-weight: 400; }
.price { font-variant-numeric: tabular-nums; font-weight: 600; }
.badge { position: absolute; left: 12px; top: 12px; background: var(--navy); color: var(--navy-fg); font-size: 12px; padding: 4px 10px; border-radius: 999px; z-index: 4; }
.badge.closed { background: var(--danger); }
.badge.cat { left: auto; right: 12px; top: 12px; background: var(--accent); }
.org-line { margin: 0; font-size: 14px; color: var(--muted); }
.org-line a { color: inherit; }
.org-line.compact { font-size: 13px; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--subtle); margin: 0 0 2px; }
.form { display: grid; gap: 10px; }
label { font-size: 13px; font-weight: 500; }
input, select, textarea {
  width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 8px;
  padding: 0 12px; background: #fff; color: var(--ink); font: inherit;
}
textarea { height: auto; min-height: 90px; padding: 10px 12px; }
.row2 { display: grid; gap: 10px; }
@media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }
.flash { padding: 12px 14px; border-radius: 12px; }
.flash.ok { background: #e4eee4; }
.flash.err { background: #f8d4da; color: var(--danger); }
.narrow { max-width: 40rem; }
.line-item { padding: 16px; }
.line-item + .line-item { border-top: 1px solid var(--line); }
.desk { background: var(--navy); color: var(--navy-fg); border-radius: var(--radius); padding: 20px; display: flex; justify-content: space-between; gap: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
td { padding: 12px 16px; border-bottom: 1px solid rgba(216,209,195,.7); vertical-align: top; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.tabs a { height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border-radius: 8px; background: var(--surface-2); color: var(--ink); text-decoration: none; }
.tabs a.on { background: var(--navy); color: var(--navy-fg); }
.tabs.cats a { background: transparent; border: 1px solid var(--line); }
.check { display: flex; align-items: center; gap: 8px; height: 44px; }
.check input { width: auto; height: auto; }
.product-block { background: var(--surface); padding: 16px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; align-items: center; }
.back { display: inline-flex; height: 44px; align-items: center; color: var(--muted); }
.filter-bar { margin: 20px 0; max-width: 40rem; }
.status-form select { width: auto; min-width: 11rem; height: 44px; }
#lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(11,18,32,.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
#lightbox[hidden] { display: none !important; }
#lightbox img { max-width: min(96vw, 1100px); max-height: 90vh; object-fit: contain; }
.lb-close { position: absolute; top: 12px; right: 16px; width: 44px; height: 44px; border: 0; background: transparent; color: #fff; font-size: 32px; }
.keep-thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.keep-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; width: 76px; }
.keep-thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; }
.keep-thumb input { width: auto; height: auto; }
@media (max-width: 640px) { .hide-sm { display: none !important; } }

body.theme-official {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #e4e8ee;
  --ink: #0a1628;
  --navy: #0a1628;
  --accent: #b1112d;
  --accent-hover: #8e0d24;
  --line: #cfd5de;
  --radius: 8px;
}
body.theme-nation .brand img { background: #fff; padding: 3px; }
