/* ============================================================
   ORAH BEN GLOBAL STORE — Design System
   Premium electronics showroom + technician's workshop.
   Restrained palette, deliberate hierarchy, no AI-template look.
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  --charcoal: #111111;
  --off-white: #f4f1ea;
  --gray: #77736c;
  --gold: #b8872d;
  --gold-light: #d7b35a;
  --dark-surface: #181818;
  --border: #ddd7ca;
  --success: #3f7d52;
  --success-bg: #eaf3ec;
  --error: #b23b3b;
  --error-bg: #f6e9e9;
  --warning: #a9791f;
  --warning-bg: #f6efdd;
  --info: #33566e;

  --surface: #ffffff;
  --surface-muted: #faf8f3;
  --text: #1b1b1b;
  --text-muted: #6c6860;
  --text-inverse: #f4f1ea;

  --radius-btn: 10px;
  --radius-card: 14px;
  --radius-sm: 8px;

  --shadow-sm: 0 1px 2px rgba(17, 17, 17, 0.06);
  --shadow-md: 0 4px 14px rgba(17, 17, 17, 0.08);
  --shadow-lg: 0 12px 40px rgba(17, 17, 17, 0.12);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --container: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--off-white);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { color: var(--text); }
.muted { color: var(--text-muted); }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---- Layout helpers ---- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-5); }
.container-wide { max-width: 1440px; }
.section { padding: var(--space-8) 0; }
.section-sm { padding: var(--space-7) 0; }
.grid { display: grid; gap: var(--space-5); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.hidden { display: none !important; }

.section-head { margin-bottom: var(--space-6); }
.section-head h2 { margin-top: var(--space-1); }
.section-head p { color: var(--text-muted); max-width: 60ch; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 11px 20px;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .05s ease;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: #a5761f; }
.btn-dark { background: var(--charcoal); color: var(--off-white); }
.btn-dark:hover { background: #000; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--charcoal); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-muted); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #9c3232; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 12px; font-size: 0.85rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---- Forms ---- */
.field { margin-bottom: var(--space-4); }
.field label { display: block; font-weight: 500; font-size: 0.88rem; margin-bottom: 6px; color: var(--text); }
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 135, 45, 0.15);
}
.textarea { min-height: 96px; resize: vertical; }
.field-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.field-error { font-size: 0.8rem; color: var(--error); margin-top: 4px; }
.input.is-invalid, .select.is-invalid { border-color: var(--error); }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: var(--space-5); }
.card-head { padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-head h3 { font-size: 1.05rem; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; line-height: 1.4;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-muted { background: #efece4; color: var(--text-muted); }
.badge-gold { background: #f7efd9; color: var(--gold); }

/* ---- Alerts ---- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; margin-bottom: var(--space-4); font-size: 0.9rem; }
.alert-success { background: var(--success-bg); border-color: #cfe3d4; color: #2c5d3c; }
.alert-error { background: var(--error-bg); border-color: #e6cccc; color: #8f2f2f; }
.alert-warning { background: var(--warning-bg); border-color: #ecdcb4; color: #7d5a17; }
.alert-info { background: #e9f0f4; border-color: #cddce5; color: #2c4a5c; }

/* ---- Tables ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.data th, table.data td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-muted); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface-muted); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Empty / loading states ---- */
.empty-state { text-align: center; padding: var(--space-8) var(--space-5); color: var(--text-muted); }
.empty-state .icon { font-size: 2rem; margin-bottom: var(--space-3); opacity: .5; }
.empty-state h3 { color: var(--text); margin-bottom: var(--space-2); }
.skeleton { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---- Utility ---- */
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.divider { height: 1px; background: var(--border); border: none; margin: var(--space-5) 0; }
.stack > * + * { margin-top: var(--space-4); }

/* ---- Focus visibility (accessibility) ---- */
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
