:root {
  --ink: #14140F;
  --ink-soft: #4A4A42;
  --muted: #8A8A7E;
  --border: #DEDCD3;
  --card-bg: #FFFFFF;
  --danger: #B0203A;
  --success: #1E824C;
  --radius-card: 16px;
  --radius-input: 8px;
  --crimson: #B0203A;
  --text-muted: #8A8A7E;
  --bg: #F6F7F9;
  --font-display: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(20,20,15,0.08), rgba(20,20,15,0.18)),
    url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-color: #C9BBA2; /* fallback tone if hero-bg.jpg isn't present */
  background-repeat: no-repeat;
}

/* ---------- Top bar ---------- */
.topbar {
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar .brand {
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
  font-family: 'Lato', Helvetica, Arial, sans-serif;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.topbar-actions a, .topbar-actions button {
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  text-transform: uppercase;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--ink);
  border-radius: 3px;
  overflow: hidden;
}

.lang-toggle button {
  padding: 4px 10px;
  opacity: 0.55;
}

.lang-toggle button.active {
  background: var(--ink);
  color: #fff;
  opacity: 1;
}

/* ---------- Hero / background stage ---------- */
.hero-stage {
  position: relative;
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ---------- Card ---------- */
.wizard-card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 40px 48px 44px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 560px;
}

.card-header {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  margin-bottom: 6px;
}

.back-arrow {
  grid-column: 1;
  justify-self: start;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  color: var(--ink);
  padding: 4px;
  line-height: 1;
}

.card-header .card-title {
  grid-column: 2;
}

.card-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  text-align: center;
}

.card-subtitle {
  font-size: 13.5px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.55;
  margin: 18px 0 28px;
}

.card-subtitle a { color: var(--ink); font-weight: 600; }

/* ---------- Sections & fields ---------- */
.field-section-title {
  font-weight: 700;
  font-size: 14.5px;
  margin: 26px 0 10px;
}

.field-section-title:first-of-type { margin-top: 0; }

label.field-label {
  display: block;
  font-size: 12.5px;
  color: var(--ink);
  margin-bottom: 6px;
  margin-top: 16px;
  font-weight: 500;
}

label.field-label .req { color: var(--danger); }

select, input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"], textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
}

textarea { resize: vertical; min-height: 100px; }

.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

/* ---------- Buttons ---------- */
.btn-block {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 30px;
}

.btn-block:hover { background: #000; }
.btn-block:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-block.focus-ring { box-shadow: 0 0 0 3px rgba(20,20,15,0.15); }

.link-note {
  font-size: 12.5px;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

/* ---------- Retail notice banner (US redirect style) ---------- */
.retail-notice {
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 30px;
}

.retail-notice a { color: var(--ink); font-weight: 600; }

/* ---------- File upload ---------- */
.file-hint {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 6px 0 12px;
}

.file-hint a { color: var(--ink); font-weight: 600; }

.file-upload-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.file-add-btn {
  width: 64px;
  height: 64px;
  border: 1.5px dashed var(--border);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--muted);
  cursor: pointer;
  background: none;
}

.file-thumb {
  width: 64px;
  height: 64px;
  border-radius: 3px;
  object-fit: cover;
  border: 1px solid var(--border);
}

/* ---------- Review screen ---------- */
.review-box {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.review-box h4 {
  margin: 0 0 12px;
  font-size: 14.5px;
  font-weight: 700;
}

.review-kv { margin-bottom: 12px; }
.review-kv:last-child { margin-bottom: 0; }
.review-kv .rk-label { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.review-kv .rk-value { font-size: 14px; color: var(--ink); }

.review-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.review-thumbs img { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; border: 1px solid var(--border); }

/* ---------- Confirmation ---------- */
.confirmation {
  text-align: center;
  padding: 16px 4px 4px;
}

.confirmation .check-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--success); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 20px;
}

.confirmation h2 {
  font-family: var(--font-display);
  font-size: 21px;
  margin: 0 0 8px;
}

.rma-display {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 14px 0;
}

/* ---------- Track claim page ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: capitalize;
}

.badge.under_review { background: #FEF3C7; color: #92400E; }
.badge.approved { background: #E0F2FE; color: #075985; }
.badge.in_progress { background: #E0F2FE; color: #075985; }
.badge.resolved { background: #DCFCE7; color: #166534; }
.badge.rejected { background: #FEE2E2; color: #991B1B; }
.badge.canceled { background: #F1F5F9; color: #475569; }

.track-form { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }

.error-text { color: var(--danger); font-size: 13px; margin-top: 8px; }

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ---------- Fixed bottom bar (page scrolls behind this) ---------- */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 34px;
  background: var(--ink);
  z-index: 500;
}

@media (max-width: 640px) {
  .field-row-2 { grid-template-columns: 1fr; }
  .wizard-card { padding: 30px 24px; }
  .hero-stage { padding: 24px 12px; align-items: center; }
}

@media (min-width: 641px) {
  .wizard-card {
    width: 560px;
  }
}

@media (min-width: 641px) {
  .wizard-card {
    width: 560px;
  }
}
