/* ===================================================================
   ARA-AR.com — shared theme
   Dark near-black + orange accent, modeled on the KCI portal mockups
   and the Anovia AR app look.
   =================================================================== */

:root {
  --bg:        #050506;
  --bg-2:      #0c0d10;
  --panel:     #131418;
  --panel-2:   #1a1c22;
  --line:      #24262e;
  --line-soft: #191b21;

  --txt:       #f4f5f7;
  --txt-dim:   #a7abb4;
  --txt-mute:  #6d7178;

  --accent:      #f5691e;   /* KCI / Anovia orange */
  --accent-soft: #ff8845;
  --accent-deep: #d4530f;
  --accent-glow: rgba(245,105,30,.35);

  --green:  #35c775;
  --blue:   #2f8bff;
  --red:    #ff5a52;
  --gold:   #d8a838;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow: 0 18px 50px -20px rgba(0,0,0,.8);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
/* reserve the JS-rendered nav's height so the page below it never shifts/pops in */
header[data-nav] { min-height: 74px; display: block; }
/* page-transition fade — content regions only (not the nav or sidebar); pure in-place crossfade */
@keyframes araFadeIn { from { opacity: 0; } to { opacity: 1; } }
.ara-page { animation: araFadeIn .18s ease both; }
.ara-page.ara-out { animation: none; opacity: 0; transition: opacity .14s ease; }
@media (prefers-reduced-motion: reduce) { .ara-page, .ara-page.ara-out { animation: none; transition: none; } }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.heavy { font-weight: 900; letter-spacing: -.02em; }

/* section titles like "Top Selling" / "Total Sales" */
.section-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0 0 18px;
}
.section-title b { color: var(--accent); font-weight: 800; }

.accent { color: var(--accent); }
.dim { color: var(--txt-dim); }
.mute { color: var(--txt-mute); }

/* ---------- layout ---------- */
.wrap { max-width: 1400px; margin: 0 auto; padding: 0 34px; }
.stack > * + * { margin-top: 34px; }

/* ---------- top nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(5,5,6,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  display: flex; align-items: center; gap: 30px;
  height: 74px; max-width: 1500px; margin: 0 auto; padding: 0 34px;
}
.logo {
  font-weight: 900; font-size: 30px; letter-spacing: -.04em;
  color: #ff2f2f;
  font-style: italic;
  text-shadow: 0 0 22px rgba(255,47,47,.35);
}
.logo span { color: var(--txt); }
.logo-badge { display: flex; align-items: center; flex: none; }
.logo-badge img { width: 48px; height: 48px; display: block; }
.logo-mark { display: flex; align-items: center; flex: none; }
.logo-mark img { height: 30px; width: auto; display: block; }
.nav-links { display: flex; gap: 30px; margin-left: 18px; }
.nav-links a {
  color: var(--txt-dim); font-size: 15px; font-weight: 500;
  padding: 6px 2px; position: relative; transition: color .15s;
}
.nav-links a:hover { color: var(--txt); }
.nav-links a.active { color: var(--txt); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 3px;
  background: var(--accent); border-radius: 3px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 20px; }

.bell { position: relative; color: var(--txt-dim); font-size: 20px; }
.bell .badge {
  position: absolute; top: -7px; right: -9px; background: var(--accent);
  color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px;
  border-radius: 9px; display: grid; place-items: center; padding: 0 4px;
}
.avatar-chip {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--line); flex: none;
}
.avatar-chip img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: none; border-radius: 999px; padding: 13px 26px;
  font-size: 15px; font-weight: 700; color: #fff;
  background: var(--accent);
  transition: transform .12s ease, box-shadow .15s, background .15s;
  box-shadow: 0 10px 26px -10px var(--accent-glow);
}
.btn:hover { background: var(--accent-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: #33353d; box-shadow: none; color: var(--txt); }
.btn.ghost:hover { background: #40434c; }
.btn.outline { background: transparent; border: 1.5px solid var(--accent); color: var(--accent); box-shadow: none; }
.btn.outline:hover { background: rgba(245,105,30,.1); }
.btn.sq { border-radius: var(--radius-sm); }
.btn.block { width: 100%; }
.btn.lg { padding: 16px 34px; font-size: 16px; }
.btn.sm { padding: 8px 16px; font-size: 13px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(245,105,30,.14); color: var(--accent-soft);
}
.pill.gray { background: #23252c; color: var(--txt-dim); }
.pill.green { background: rgba(53,199,117,.14); color: var(--green); }

/* ---------- cards / panels ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px;
}
.panel.flush { padding: 0; overflow: hidden; }

/* ---------- product card ---------- */
.prod-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 16px; text-align: center;
  transition: transform .16s ease, border-color .16s, box-shadow .16s;
  display: flex; flex-direction: column;
}
.prod-card:hover { transform: translateY(-4px); border-color: #33353d; box-shadow: var(--shadow); }
.prod-thumb {
  aspect-ratio: 1/1; border-radius: 10px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, #1c1e24, #0b0c0e 72%);
  display: grid; place-items: center; margin-bottom: 12px; position: relative;
}
.prod-thumb img { width: 88%; height: 88%; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)); }
.prod-thumb .badge3d {
  position: absolute; top: 9px; right: 9px; background: var(--accent);
  color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 6px; z-index: 2;
}
/* round every wheel product thumbnail + give it a clean white frame so the
   white-background renders never look cut off against the dark tile */
img[src*="assets/wheels/"] { border-radius: 12px; border: 3px solid #fff; background: #fff; }
/* keep badges above the wheel image (the image's drop-shadow filter makes a
   stacking context that would otherwise paint over an un-z-indexed badge) */
.badge3d { z-index: 2; }
.prod-name { font-weight: 800; font-size: 16px; }
.prod-name b { color: var(--accent); }
.prod-sub { font-size: 12.5px; color: var(--txt-mute); margin-top: 2px; }
.prod-price { color: var(--accent); font-weight: 800; margin-top: 8px; font-size: 17px; }

/* horizontal scroller / carousel */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr);
  gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: #2a2c34; border-radius: 8px; }
.rail > * { scroll-snap-align: start; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ---------- stat card ---------- */
.stat-card {
  background: var(--panel); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px 20px 8px; overflow: hidden; position: relative;
}
.stat-card .label { font-size: 14px; color: var(--txt-dim); }
.stat-card .value { font-size: 30px; font-weight: 800; margin-top: 2px; }
.stat-card .spark { height: 60px; margin: 6px -20px 0; }
.stat-card .delta { font-size: 12.5px; font-weight: 700; padding: 8px 0 4px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

/* ---------- messages list ---------- */
.msg-tabs { display: flex; gap: 22px; align-items: center; border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; margin-bottom: 6px; }
.msg-tabs .t { color: var(--txt-mute); font-weight: 600; font-size: 15px; cursor: pointer; }
.msg-tabs .t.active { color: var(--txt); border-bottom: 2px solid var(--accent); padding-bottom: 12px; margin-bottom: -13px; }
.msg-tabs .right { margin-left: auto; display: flex; gap: 14px; font-size: 14px; }
.msg-tabs .right b { color: var(--txt); }
.msg-tabs .right a { color: var(--txt-mute); }

.msg-row { display: flex; gap: 16px; align-items: flex-start; padding: 16px 4px; border-bottom: 1px solid var(--line-soft); }
.msg-row:last-child { border-bottom: none; }
.msg-row .who { min-width: 190px; display: flex; gap: 12px; align-items: center; }
.msg-row .who .ava { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex: none; background: #22242b; }
.msg-row .who .name { font-weight: 700; font-size: 15px; }
.msg-row .who .cid { font-size: 12px; color: var(--txt-mute); }
.msg-row .body { color: var(--txt-dim); font-size: 14px; }
.msg-row.unread .body { color: var(--txt); }
.msg-row .env { margin-left: auto; color: var(--accent); font-size: 18px; align-self: center; }
.dot-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }

/* ---------- forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--txt-dim); margin-bottom: 7px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; background: #0b0c0f; border: 1px solid var(--line);
  color: var(--txt); border-radius: 10px; padding: 13px 15px; font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245,105,30,.14);
}
.field input::placeholder { color: #55585f; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line-soft); margin-top: 70px; padding: 46px 0 40px; color: var(--txt-mute); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 30px; }
.footer h4 { color: var(--txt); font-size: 14px; margin: 0 0 14px; letter-spacing: .04em; text-transform: uppercase; }
.footer a { display: block; color: var(--txt-mute); font-size: 14px; padding: 4px 0; }
.footer a:hover { color: var(--accent); }
.footer .cr { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line-soft); font-size: 13px; display: flex; justify-content: space-between; }

/* ---------- utilities ---------- */
.row { display: flex; align-items: center; gap: 14px; }
.between { justify-content: space-between; }
.wrap-tight { max-width: 1180px; }
hr.soft { border: none; border-top: 1px solid var(--line-soft); margin: 26px 0; }
.divider-v { width: 1px; align-self: stretch; background: var(--line); }
.tag-view { color: var(--green); }
.tag-sold { color: var(--blue); }

@media (max-width: 1050px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 22px; }
  /* mobile nav dropdown */
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0; z-index: 39;
    flex-direction: column; align-items: flex-start; gap: 2px; margin: 0;
    background: #0b0c0e; border-bottom: 1px solid var(--line);
    padding: 10px 20px; display: none;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links a { width: 100%; padding: 11px 2px; }
  .nav-toggle { display: block; }
  .nav-right { gap: 12px; }
}

/* =================================================================
   Responsive hardening — prevent right-edge overflow everywhere
   ================================================================= */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, canvas, video, iframe, model-viewer { max-width: 100%; }
h1, h2, h3, h4, p, span, a { overflow-wrap: break-word; }
.wrap { padding-left: clamp(16px, 4vw, 34px); padding-right: clamp(16px, 4vw, 34px); }
.nav-inner { padding-left: clamp(16px, 4vw, 34px); padding-right: clamp(16px, 4vw, 34px); gap: clamp(12px, 2vw, 30px); }
.nav-toggle { display: none; background: none; border: none; color: var(--txt); font-size: 24px; line-height: 1; padding: 6px 4px; cursor: pointer; }
/* fixed-width accent underlines must never exceed the viewport */
.d-underline, .big-underline, .p-underline { max-width: 82%; }
/* grid/flex children default to min-width:auto, which lets long headings and
   nowrap text push their track wider than the viewport (right-edge cutoff).
   Allow them to shrink so their content wraps instead. */
.hero-grid > *, .profile > *, .dash > *, .detail > *, .grid-main > *, .sim-grid > *,
.spec-split > *, .stats-row > *, .stack > *, .nav-inner > *,
.row, .row > *, .app-band > *, .hero-strip > * { min-width: 0; }

@media (max-width: 640px) {
  .msg-row { flex-wrap: wrap; }
  .msg-row .who { min-width: 0; width: 100%; }
  .msg-row .body { width: 100%; }
  .msg-row .env { display: none; }
  .msg-tabs { flex-wrap: wrap; gap: 14px; }
  .msg-tabs .right { margin-left: 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .grid-5, .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer .cr { flex-direction: column; gap: 8px; }
}
@media (max-width: 400px) {
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
