/* ============================================
   PrintLab POC - e-shop styling
   ============================================ */
* { box-sizing: border-box; }

:root {
  --bg: #0f1115;
  --bg-2: #14171f;
  --bg-3: #161a23;
  --border: #232733;
  --text: #d8dde6;
  --text-muted: #8892a6;
  --text-dim: #5a6478;
  --accent: #2b5cff;
  --accent-2: #4471ff;
  --good: #6ada87;
  --warn: #f5c265;
  --bad: #ff6b6b;
  --code-bg: #0f1115;
}

body {
  margin: 0;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
}

a { color: var(--text-muted); }
a:hover { color: var(--text); }

code {
  background: var(--code-bg);
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.95em;
}

.muted { color: var(--text-dim); }

/* ============================================
   Site header (top nav)
   ============================================ */
.site-header {
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.brand h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.5px;
}
.brand .tag {
  font-size: 10px;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
}
.brand .tagline {
  margin: 2px 0 0;
  color: var(--text-dim);
  font-size: 11px;
}
.topnav { display: flex; gap: 18px; font-size: 12px; }
.topnav a { text-decoration: none; }

/* ============================================
   Hero
   ============================================ */
.hero {
  background: linear-gradient(135deg, #1a1f2e 0%, #14171f 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-text { max-width: 560px; }
.hero-text .eyebrow {
  color: var(--accent-2);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
}
.hero-text h2 {
  font-size: 32px;
  line-height: 1.15;
  margin: 12px 0 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.hero-text h2 em {
  color: var(--text-muted);
  font-style: italic;
  font-weight: 400;
}
.hero-text p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-2); color: #fff; }
.hero-visual {
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #0f1115;
}
.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================
   Main layout
   ============================================ */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
}

h2 {
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin: 28px 0 14px;
}
h2:first-child { margin-top: 0; }
h2 .optional {
  color: var(--text-dim);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}
h3 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 0 10px;
}

/* ============================================
   Upload zone
   ============================================ */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-3);
  transition: all 0.2s;
}
.upload-zone:hover {
  border-color: var(--accent);
  background: #1a1f2e;
}
.upload-zone.drag {
  border-color: var(--accent-2);
  background: #1f2638;
}
.upload-icon {
  font-size: 28px;
  color: var(--accent-2);
  margin-bottom: 8px;
}
.upload-title {
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}
.upload-sub {
  font-size: 11px;
  color: var(--text-dim);
}
.upload-status {
  margin-top: 8px;
  font-size: 12px;
  color: var(--good);
  min-height: 18px;
}
.artwork-list-wrap { margin-top: 16px; }
.artwork-item {
  background: var(--bg-3);
  border-left: 2px solid var(--good);
  padding: 8px 12px;
  margin-bottom: 6px;
  font-size: 12px;
  border-radius: 0 4px 4px 0;
}

/* ============================================
   Category filter
   ============================================ */
.cat-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cat-pill {
  background: var(--bg-3);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.15s;
}
.cat-pill:hover { color: var(--text); border-color: var(--text-muted); }
.cat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================
   Product grid + cards
   ============================================ */
#product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.product {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.product:hover { border-color: var(--text-dim); }

.product-thumb {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--code-bg);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-cat {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 4px;
}
.product h3 {
  color: var(--text);
  text-transform: none;
  letter-spacing: normal;
  font-size: 15px;
  margin: 0 0 4px;
  font-weight: 600;
}
.product-short {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 10px;
  min-height: 28px;
}
.price {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  padding: 4px 0;
  border-top: 1px dashed var(--border);
}
.opts label {
  display: block;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3px;
}
.opts select, .opts input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 5px 7px;
  font-family: inherit;
  font-size: 12px;
  margin-bottom: 6px;
  border-radius: 3px;
}

button {
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  border-radius: 4px;
  font-weight: 600;
}
button:hover { background: var(--accent-2); }
.btn-add { margin-top: auto; width: 100%; }

/* ============================================
   Cart
   ============================================ */
#cart {
  background: var(--bg-3);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 6px;
}
.cart-line {
  border-bottom: 1px dashed var(--border);
  padding: 10px 0;
  position: relative;
}
.cart-line:last-child { border-bottom: 0; }
.cart-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.aw-ok { color: var(--good); font-weight: 600; margin-left: 8px; }
.aw-miss { color: var(--warn); font-weight: 600; margin-left: 8px; }
.btn-remove {
  background: transparent;
  color: var(--bad);
  border: 1px solid #4a2a2a;
  padding: 2px 8px;
  font-size: 11px;
  position: absolute;
  right: 0;
  top: 10px;
  font-weight: 400;
}
#cart-total { margin-top: 12px; font-size: 14px; }
.cart-actions { margin-top: 14px; display: flex; gap: 8px; }

/* ============================================
   Right-side status panel
   ============================================ */
#panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 18px;
  border-radius: 6px;
  position: sticky;
  top: 80px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.status {
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 12px;
}
.status.pending { background: #1f2333; color: var(--text-muted); }
.status.ok { background: #1a2e1f; color: var(--good); border: 1px solid #2a5e3a; }
.status.fail { background: #2e1a1a; color: var(--bad); border: 1px solid #5e2a2a; }

#tool-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 11px;
  max-height: 280px;
  overflow-y: auto;
}
#tool-list li {
  padding: 5px 0;
  border-bottom: 1px dotted var(--border);
}
#tool-list li.muted { color: var(--text-dim); }
#tool-list code {
  color: var(--good);
  background: transparent;
  font-weight: 600;
}

.hint { font-size: 11px; color: var(--text-dim); margin: 0 0 8px; }

#log {
  max-height: 360px;
  overflow-y: auto;
  font-size: 10px;
}
.log-entry {
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
}
.log-head { color: var(--text-muted); }
.log-time { color: var(--text-dim); margin-right: 6px; }
.log-head code { color: var(--good); background: transparent; }
.log-body {
  background: var(--code-bg);
  padding: 6px;
  margin: 4px 0 0;
  overflow-x: auto;
  font-size: 9px;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ============================================
   Footer
   ============================================ */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  margin-top: 32px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  font-size: 12px;
  color: var(--text-muted);
}
.footer-inner a { color: var(--good); }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1000px) {
  main { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  #panel { position: static; max-height: none; }
}
