/* =============================================================
   Culture Sneaks — Design System
   Shared by the storefront and the admin panel.
   Font: Archivo (loaded from Google Fonts in each page's <head>)
   ============================================================= */

/* ---------- Core palette ---------- */
:root {
  --ink: #000000;
  --paper: #ffffff;
  --graphite: #1c1c1c;
  --smoke: #8c8c8c;
  --ash: #e4e4e4;

  --font: "Archivo", "Helvetica Neue", system-ui, sans-serif;
  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0, 1);

  /* Type scale */
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 15px;
  --text-lg: 18px;
}

/* ---------- Themes (put the class on <body> or any section) ---------- */
.theme-dark {
  --bg: var(--ink);
  --fg: var(--paper);
  --surface: var(--graphite);
  --surface-hi: #2a2a2a;
  --line: rgba(255, 255, 255, 0.12);
  --muted: var(--smoke);
  --alert: #ff7a6b;
  color-scheme: dark;
  background: var(--bg);
  color: var(--fg);
}

.theme-light {
  --bg: var(--paper);
  --fg: var(--ink);
  --surface: #f5f5f5;
  --surface-hi: #ebebeb;
  --line: var(--ash);
  --muted: #6b6b6b;
  --alert: #b42318;
  color-scheme: light;
  background: var(--bg);
  color: var(--fg);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 700; }

p { margin: 0; }

/* Wide, heavy headline style — the brand voice */
.display {
  font-stretch: 125%;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

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

.hidden { display: none !important; }

.nowrap { white-space: nowrap; }

.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;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  font: inherit;
  font-weight: 600;
  font-stretch: 112%;
  font-size: var(--text-sm);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.15s var(--ease);
}

.btn:active { transform: scale(0.98); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover:not(:disabled) { background: var(--muted); }

.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--fg); }

.btn-text {
  background: none; border: 0; padding: 0; height: auto;
  color: var(--muted); font-weight: 500; font-stretch: 100%;
}
.btn-text:hover { color: var(--fg); }

.btn-block { width: 100%; }

.btn-danger { background: transparent; color: var(--alert); border-color: var(--alert); }
.btn-danger:hover:not(:disabled) { background: var(--alert); color: var(--bg); }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }

.field-label { font-size: var(--text-sm); font-weight: 500; }

.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.input::placeholder { color: var(--muted); }

.input:focus { outline: none; border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); }

textarea.input {
  height: auto;
  min-height: 120px;
  padding: 12px 14px;
  line-height: 1.5;
  resize: vertical;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238c8c8c' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select.input option { background: var(--bg); color: var(--fg); }

.hint { font-size: var(--text-xs); color: var(--muted); line-height: 1.5; }

.check { display: inline-flex; align-items: center; gap: 10px; font-size: var(--text-sm); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--fg); margin: 0; }

.form-message { font-size: var(--text-sm); min-height: 1.4em; }
.form-message.is-error { color: var(--alert); }

/* Visible keyboard focus everywhere */
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

/* ---------- The Box Label (signature element) ----------
   Mimics the side label on a sneaker box.
   <dl class="box-label"><dt>Style</dt><dd>DZ5485-612</dd>...</dl> */
.box-label {
  display: grid;
  grid-template-columns: auto 1fr;
  margin: 0;
  border: 1px solid var(--fg);
  font-size: var(--text-xs);
  line-height: 1.3;
}

.box-label dt,
.box-label dd {
  margin: 0;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

.box-label dt {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-right: 1px solid var(--line);
}

.box-label dd { font-weight: 600; }

.box-label dt:nth-last-of-type(1),
.box-label dd:nth-last-of-type(1) { border-bottom: 0; }

/* ---------- Status dots (monochrome: filled = yes, hollow = no) ---------- */
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--fg); flex-shrink: 0;
}
.dot.is-on { background: var(--fg); }
.dot.is-off { background: transparent; opacity: 0.5; }

/* ---------- Respect reduced-motion settings ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
