/* Imra Collection · tokens and shared components (boutique + admin) */
:root {
  --night: #0d1321;
  --night-2: #141c2d;
  --night-3: #1d2740;
  --ivory: #f8f4ee;
  --sand: #efe7db;
  --sand-2: #e6dccc;
  --card: #ffffff;
  --ink: #0d1321;
  --ink-2: #262c3b;
  --muted: #555b68;
  --line: #e3dacb;
  --line-dark: rgba(248, 244, 238, .14);
  --gold: #c6a462;
  --gold-2: #b08d4b;
  --gold-ink: #8a6a30;
  --on-night: #f8f4ee;
  --on-night-2: #b9bccb;
  --wa: #1fae55;
  --wa-2: #178a43;
  --ok: #2f7a4b;
  --danger: #a33a2b;

  /* aliases used by the admin */
  --paper: var(--ivory);
  --paper-2: var(--sand);
  --accent: var(--gold-ink);
  --accent-2: #6f5424;
  --accent-soft: #f3ead8;

  --shadow-1: 0 1px 2px rgba(13, 19, 33, .05), 0 8px 24px rgba(13, 19, 33, .06);
  --shadow-2: 0 24px 60px rgba(13, 19, 33, .22);
  --shadow-gold: 0 14px 34px rgba(176, 141, 75, .32);
  --radius-s: 6px;
  --radius-m: 14px;
  --radius-l: 24px;
  --font-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --container: 1320px;
  --gutter: clamp(18px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; overflow-wrap: break-word; min-width: 0; letter-spacing: -0.015em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; transition: none; }
::selection { background: var(--gold); color: var(--night); }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--gold); color: var(--night); }
.btn-primary:hover { background: #d3b475; box-shadow: var(--shadow-gold); }
.btn-dark { background: var(--night); color: var(--ivory); }
.btn-dark:hover { background: var(--night-3); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: transparent; border-color: rgba(248, 244, 238, .35); color: var(--ivory); }
.btn-light:hover { border-color: var(--ivory); background: rgba(248, 244, 238, .06); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 19px; height: 19px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.icon-btn[disabled] { opacity: .4; cursor: default; }
.icon-btn svg { width: 20px; height: 20px; }

/* Fields */
.field { display: grid; gap: 6px; align-content: start; }
.field label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 13px; color: var(--muted); }
.input, .textarea, .select {
  width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.textarea { min-height: 100px; resize: vertical; }
.input:hover, .textarea:hover, .select:hover { border-color: #cbbea8; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(198, 164, 98, .18); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(163, 58, 43, .1); }
.field .error { font-size: 13px; color: var(--danger); }
.field .error:empty { display: none; }

/* Quantity stepper */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); height: 44px; }
.stepper button { width: 42px; height: 42px; border: 0; background: none; border-radius: 999px; font-size: 19px; line-height: 1; display: grid; place-items: center; transition: background-color .15s var(--ease); }
.stepper button:hover { background: var(--sand); }
.stepper input { width: 46px; border: 0; background: none; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper input:focus { outline: none; }

/* Toast */
.toast-wrap { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; background: var(--night); color: var(--ivory); padding: 10px 20px 10px 10px; border-radius: 999px; font-size: 15px; box-shadow: var(--shadow-2); animation: toast-in .45s var(--ease-spring) both; }
.toast img { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; }
.toast b { color: var(--gold); font-weight: 500; }
.toast.out { animation: toast-out .3s var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
