/* ============================================================
   RAAJJE LOVE DESIGN SYSTEM  (rl.css)
   One stylesheet for the shop, customer account and admin portal.
   - Brand colour lives in brand.css (--rl-primary). Everything else derives from it.
   - Light + dark themes: <html data-theme="light|dark"> (set by theme.js).
   - Style: modern retail. Sharp corners, big tight grotesk type, black + orange,
     hairline lines, white "paper" cards on soft grey.
   Docs + live examples: design-system.html
   ============================================================ */

@font-face {
  font-family: "Avas Akuru";
  src: url("../fonts/Mv_GroupX_Avas_Akuru.otf") format("opentype");
  font-display: swap;
}

/* ---------- 1. Tokens: light (default) ---------- */
:root {
  --rl-primary: #FF6A00; /* fallback; real value in brand.css */
  --rl-primary-hover: color-mix(in oklab, var(--rl-primary) 86%, #000);
  --rl-primary-soft: color-mix(in oklab, var(--rl-primary) 12%, var(--rl-surface));
  --rl-primary-ink: color-mix(in oklab, var(--rl-primary) 78%, #000);
  --rl-on-primary: #FFFFFF;

  --rl-bg: #ECECE9;
  --rl-bg-top: #F7F7F5;
  --rl-surface: #FFFFFF;
  --rl-surface-2: #F4F4F1;
  --rl-ink: #0A0A0A;
  --rl-ink-2: #3B3B39;
  --rl-muted: #6F6F6B;
  --rl-line: rgba(10, 10, 10, .10);
  --rl-line-strong: rgba(10, 10, 10, .24);
  --rl-hairline: rgba(255, 255, 255, .95);   /* decorative orbit lines */
  --rl-inverse: #0A0A0A;                      /* "black" button */
  --rl-on-inverse: #FFFFFF;

  --rl-success: #1E8E4E;
  --rl-warning: #C27C00;
  --rl-danger: #D1311F;
  --rl-info: #2459D6;

  --rl-font: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --rl-font-dv: "Avas Akuru", "MV Faseyha", sans-serif;

  --rl-radius: 0px;        /* sharp corners are part of the brand */
  --rl-radius-pill: 999px; /* only for dots, avatars, switches */

  --rl-shadow-pop: 0 18px 40px -18px rgba(0, 0, 0, .28);
  --rl-ease: cubic-bezier(.2, .7, .2, 1);

  --rl-header-h: 76px;
  --rl-sidebar-w: 256px;
  color-scheme: light;
}

/* ---------- 2. Tokens: dark ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rl-primary-soft: color-mix(in oklab, var(--rl-primary) 18%, var(--rl-surface));
    --rl-primary-ink: color-mix(in oklab, var(--rl-primary) 72%, #fff);
    --rl-bg: #0B0B0C; --rl-bg-top: #111113;
    --rl-surface: #151517; --rl-surface-2: #1D1D20;
    --rl-ink: #F3F3F1; --rl-ink-2: #C9C9C5; --rl-muted: #8E8E92;
    --rl-line: rgba(255, 255, 255, .08); --rl-line-strong: rgba(255, 255, 255, .20);
    --rl-hairline: rgba(255, 255, 255, .07);
    --rl-inverse: #F3F3F1; --rl-on-inverse: #0B0B0C;
    --rl-success: #3CC27A; --rl-warning: #F0B13A; --rl-danger: #FF6B5B; --rl-info: #6E9BFF;
    --rl-shadow-pop: 0 18px 40px -18px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --rl-primary-soft: color-mix(in oklab, var(--rl-primary) 18%, var(--rl-surface));
  --rl-primary-ink: color-mix(in oklab, var(--rl-primary) 72%, #fff);
  --rl-bg: #0B0B0C; --rl-bg-top: #111113;
  --rl-surface: #151517; --rl-surface-2: #1D1D20;
  --rl-ink: #F3F3F1; --rl-ink-2: #C9C9C5; --rl-muted: #8E8E92;
  --rl-line: rgba(255, 255, 255, .08); --rl-line-strong: rgba(255, 255, 255, .20);
  --rl-hairline: rgba(255, 255, 255, .07);
  --rl-inverse: #F3F3F1; --rl-on-inverse: #0B0B0C;
  --rl-success: #3CC27A; --rl-warning: #F0B13A; --rl-danger: #FF6B5B; --rl-info: #6E9BFF;
  --rl-shadow-pop: 0 18px 40px -18px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--rl-font);
  font-size: 1rem; line-height: 1.55;
  color: var(--rl-ink);
  background: var(--rl-bg);
  background-image: linear-gradient(180deg, var(--rl-bg-top) 0%, var(--rl-bg) 70%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--rl-primary); color: var(--rl-on-primary); }
:focus-visible { outline: 2px solid var(--rl-primary); outline-offset: 2px; }

/* ---------- 4. Typography ---------- */
.rl-display { font-size: clamp(2.75rem, 7.2vw, 5.75rem); line-height: .98; font-weight: 500; letter-spacing: -.045em; }
.rl-h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.04; font-weight: 500; letter-spacing: -.035em; }
.rl-h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.rl-h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 600; letter-spacing: -.015em; }
.rl-lead { font-size: 1.125rem; color: var(--rl-ink-2); max-width: 52ch; }
.rl-body { font-size: 1rem; }
.rl-small { font-size: .875rem; }
.rl-label {
  font-size: .72rem; line-height: 1.2; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rl-muted);
}
.rl-muted { color: var(--rl-muted); }
.rl-num { font-variant-numeric: tabular-nums; }
/* Product names everywhere: at most 2 lines, then "…" (add title="full name" so it shows on hover). */
.rl-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.rl-dv { font-family: var(--rl-font-dv); direction: rtl; }
.rl-accent { color: var(--rl-primary); }

/* ---------- 5. Layout ---------- */
.rl-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.rl-stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.rl-row { display: flex; align-items: center; gap: var(--gap, 12px); flex-wrap: wrap; }
.rl-grid { display: grid; gap: var(--gap, 24px); grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); }
.rl-divider { height: 1px; background: var(--rl-line); border: 0; }
.rl-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) {
  .rl-container { padding: 0 16px; }
  .rl-grid { grid-template-columns: 1fr; }
}

/* ---------- 6. Logo ---------- */
.rl-logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.125rem; letter-spacing: -.02em; }
.rl-logo__mark { width: 32px; height: 32px; flex: none; }
.rl-logo__mark rect { fill: var(--rl-primary); }

/* ---------- 7. Buttons ---------- */
.rl-btn {
  --h: 48px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 28px; border: 1px solid transparent; border-radius: var(--rl-radius);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  background: var(--rl-inverse); color: var(--rl-on-inverse);
  cursor: pointer; transition: background .18s var(--rl-ease), color .18s, border-color .18s, transform .18s;
}
.rl-btn:hover { background: var(--rl-primary); color: var(--rl-on-primary); }
.rl-btn:active { transform: translateY(1px); }
.rl-btn:disabled, .rl-btn[aria-disabled="true"] { background: var(--rl-surface-2); color: var(--rl-muted); cursor: not-allowed; border-color: var(--rl-line); }
.rl-btn svg { width: 16px; height: 16px; }
.rl-btn--primary { background: var(--rl-primary); color: var(--rl-on-primary); }
.rl-btn--primary:hover { background: var(--rl-primary-hover); }
.rl-btn--outline { background: transparent; color: var(--rl-ink); border-color: var(--rl-line-strong); }
.rl-btn--outline:hover { background: transparent; color: var(--rl-ink); border-color: var(--rl-ink); }
.rl-btn--ghost { background: transparent; color: var(--rl-ink); }
.rl-btn--ghost:hover { background: var(--rl-surface-2); color: var(--rl-ink); }
.rl-btn--danger { background: var(--rl-danger); color: #fff; }
.rl-btn--danger:hover { background: color-mix(in oklab, var(--rl-danger) 85%, #000); }
.rl-btn--sm { --h: 36px; padding: 0 16px; font-size: .72rem; }
.rl-btn--lg { --h: 56px; padding: 0 36px; }
.rl-btn--block { width: 100%; }

/* Signature CTA: black button with the orange arrow tile hanging off its corner */
.rl-btn--arrow { margin: 0 44px 44px 0; }
.rl-btn__tile {
  position: absolute; right: -45px; bottom: -45px; width: 44px; height: 44px;
  display: grid; place-items: center; background: var(--rl-primary); color: var(--rl-on-primary);
  transition: transform .25s var(--rl-ease);
}
.rl-btn__tile svg { width: 18px; height: 18px; transition: transform .25s var(--rl-ease); }
.rl-btn--arrow:hover { background: var(--rl-inverse); color: var(--rl-on-inverse); }
.rl-btn--arrow:hover .rl-btn__tile svg { transform: rotate(-45deg); }

.rl-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.rl-link:hover { color: var(--rl-primary); }
.rl-link svg { width: 14px; height: 14px; }

.rl-icon-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  background: transparent; color: var(--rl-ink); border: 1px solid var(--rl-line-strong);
  border-radius: var(--rl-radius); cursor: pointer; transition: border-color .15s, color .15s, background .15s;
}
.rl-icon-btn:hover { border-color: var(--rl-ink); }
.rl-icon-btn svg { width: 18px; height: 18px; }
.rl-icon-btn--filled { background: var(--rl-surface); border-color: var(--rl-line); }

/* Theme switch (uses .rl-icon-btn) */
.rl-theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .rl-theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .rl-theme-toggle .i-moon { display: none; }

/* ---------- 8. Forms ---------- */
.rl-field { display: flex; flex-direction: column; gap: 8px; }
.rl-field__label { font-size: .875rem; font-weight: 500; color: var(--rl-ink); }
.rl-field__help { font-size: .8rem; color: var(--rl-muted); }
.rl-field__error { font-size: .8rem; color: var(--rl-danger); }
.rl-input, .rl-select, .rl-textarea {
  width: 100%; height: 48px; padding: 0 16px;
  background: var(--rl-surface); color: var(--rl-ink);
  border: 1px solid var(--rl-line-strong); border-radius: var(--rl-radius);
  outline: 0; transition: border-color .15s, box-shadow .15s;
}
.rl-textarea { height: auto; min-height: 112px; padding: 12px 16px; resize: vertical; }
.rl-select { appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 20px center, right 15px center; background-size: 5px 5px; background-repeat: no-repeat; }
.rl-input::placeholder, .rl-textarea::placeholder { color: var(--rl-muted); }
.rl-input:hover, .rl-select:hover, .rl-textarea:hover { border-color: var(--rl-ink-2); }
.rl-input:focus, .rl-select:focus, .rl-textarea:focus { border-color: var(--rl-primary); box-shadow: 0 0 0 3px var(--rl-primary-soft); }
.rl-field--error .rl-input, .rl-field--error .rl-select, .rl-field--error .rl-textarea { border-color: var(--rl-danger); }
.rl-input-group { display: flex; }
.rl-input-group .rl-input { flex: 1; min-width: 0; }
.rl-input-group .rl-btn { flex: none; }
.rl-input-icon { position: relative; }
.rl-input-icon > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--rl-muted); pointer-events: none; }
.rl-input-icon > .rl-input { padding-left: 44px; }

/* Password show/hide (added automatically to every password input by theme.js) */
.rl-password { position: relative; display: block; width: 100%; }
.rl-password .rl-input { padding-right: 52px; }
.rl-password__toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  background: none; border: 0; color: var(--rl-muted); cursor: pointer;
}
.rl-password__toggle:hover, .rl-password__toggle[aria-pressed="true"] { color: var(--rl-ink); }
.rl-password__toggle svg { width: 20px; height: 20px; }

.rl-check { display: inline-flex; align-items: center; gap: 10px; font-size: .925rem; cursor: pointer; }
/* Custom square tick box in the brand colour */
.rl-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none;
  width: 20px; height: 20px; display: grid; place-items: center; cursor: pointer;
  background: var(--rl-surface); border: 1.5px solid var(--rl-line-strong);
  transition: background .15s, border-color .15s, transform .15s var(--rl-ease);
}
.rl-check input[type="checkbox"]::after {
  content: ""; width: 10px; height: 5px; margin-top: -3px;
  border-left: 2px solid var(--rl-on-primary); border-bottom: 2px solid var(--rl-on-primary);
  transform: rotate(-45deg) scale(0); transition: transform .18s var(--rl-ease);
}
.rl-check:hover input[type="checkbox"] { border-color: var(--rl-ink); }
.rl-check input[type="checkbox"]:checked { background: var(--rl-primary); border-color: var(--rl-primary); }
.rl-check input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
.rl-check input[type="checkbox"]:active { transform: scale(.9); }
.rl-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--rl-primary); outline-offset: 2px; }

.rl-switch { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; cursor: pointer; user-select: none; }
.rl-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rl-switch__track { width: 40px; height: 22px; border-radius: var(--rl-radius-pill); background: var(--rl-line-strong); position: relative; transition: background .2s; flex: none; }
.rl-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--rl-ease); }
.rl-switch input:checked + .rl-switch__track { background: var(--rl-primary); }
.rl-switch input:checked + .rl-switch__track::after { transform: translateX(18px); }
.rl-switch input:focus-visible + .rl-switch__track { outline: 2px solid var(--rl-primary); outline-offset: 2px; }

.rl-segment { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--rl-line-strong); }
.rl-segment label { position: relative; padding: 9px 14px; text-align: center; font-size: .85rem; cursor: pointer; color: var(--rl-muted); transition: background .15s, color .15s; }
.rl-segment label:hover:not(:has(input:checked)) { background: var(--rl-surface-2); color: var(--rl-ink); }
.rl-segment label + label { border-left: 1px solid var(--rl-line-strong); }
.rl-segment input { position: absolute; opacity: 0; pointer-events: none; }
.rl-segment label:has(input:checked) { background: var(--rl-inverse); color: var(--rl-on-inverse); }
.rl-segment label:has(input:focus-visible) { outline: 2px solid var(--rl-primary); outline-offset: -2px; }

/* ---------- 9. Badges, chips, avatar ---------- */
.rl-badge {
  --c: var(--rl-muted);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
  color: var(--rl-ink); background: color-mix(in oklab, var(--c) 13%, var(--rl-surface));
}
.rl-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.rl-badge--plain::before { display: none; }
.rl-badge--primary { --c: var(--rl-primary); }
.rl-badge--success { --c: var(--rl-success); }
.rl-badge--warning { --c: var(--rl-warning); }
.rl-badge--danger { --c: var(--rl-danger); }
.rl-badge--info { --c: var(--rl-info); }
.rl-badge--solid { background: var(--rl-primary); color: var(--rl-on-primary); }
.rl-badge--solid::before { background: currentColor; }
.rl-badge--dark { background: var(--rl-inverse); color: var(--rl-on-inverse); }
.rl-badge--dark::before { display: none; }

.rl-chip {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px;
  border: 1px solid var(--rl-line-strong); background: transparent; color: var(--rl-ink);
  font-size: .82rem; cursor: pointer;
}
.rl-chip:hover { border-color: var(--rl-ink); }
.rl-chip span { opacity: .55; font-size: 1rem; line-height: 1; }

.rl-avatar {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center;
  background: var(--rl-primary); color: var(--rl-on-primary);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
}
.rl-avatar--lg { width: 72px; height: 72px; font-size: 1.5rem; }

/* ---------- 10. Cards & stats ---------- */
.rl-card { background: var(--rl-surface); padding: 24px; border: 1px solid transparent; }
:root[data-theme="dark"] .rl-card { border-color: var(--rl-line); }
.rl-card--outline { background: transparent; border-color: var(--rl-line-strong); }
.rl-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

.rl-stat { background: var(--rl-surface); padding: 22px 24px; display: flex; flex-direction: column; justify-content: space-between; min-height: 156px; border: 1px solid transparent; }
:root[data-theme="dark"] .rl-stat { border-color: var(--rl-line); }
.rl-stat__value { font-size: clamp(2rem, 3.2vw, 2.75rem); font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.rl-stat__label { font-size: .9rem; color: var(--rl-ink-2); line-height: 1.3; }
.rl-stat__delta { font-size: .78rem; font-weight: 600; color: var(--rl-success); }
.rl-stat__delta.is-down { color: var(--rl-danger); }
.rl-stat--accent { background: var(--rl-primary); color: var(--rl-on-primary); }
.rl-stat--accent .rl-stat__label { color: inherit; opacity: .9; }

/* ---------- 11. Tabs ---------- */
.rl-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--rl-line); overflow-x: auto; }
.rl-tab { position: relative; padding: 12px 0; background: none; border: 0; cursor: pointer; font-size: .925rem; font-weight: 500; color: var(--rl-muted); white-space: nowrap; }
.rl-tab:hover { color: var(--rl-ink); }
.rl-tab[aria-selected="true"] { color: var(--rl-ink); }
.rl-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--rl-primary); }

/* ---------- 12. Table ---------- */
.rl-table-wrap { background: var(--rl-surface); overflow-x: auto; border: 1px solid transparent; }
:root[data-theme="dark"] .rl-table-wrap { border-color: var(--rl-line); }
.rl-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rl-table th { text-align: left; padding: 12px 16px; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rl-muted); border-bottom: 1px solid var(--rl-line); white-space: nowrap; }
.rl-table td { padding: 14px 16px; border-bottom: 1px solid var(--rl-line); vertical-align: middle; }
.rl-table tr:last-child td { border-bottom: 0; }
.rl-table tbody tr:hover td { background: var(--rl-surface-2); }
.rl-table .is-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 13. Alerts & toast ---------- */
.rl-alert { --c: var(--rl-primary); display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: color-mix(in oklab, var(--c) 10%, var(--rl-surface)); border-left: 3px solid var(--c); font-size: .9rem; }
.rl-alert--success { --c: var(--rl-success); }
.rl-alert--warning { --c: var(--rl-warning); }
.rl-alert--danger { --c: var(--rl-danger); }
.rl-alert--info { --c: var(--rl-info); }
.rl-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 14px 18px; background: var(--rl-inverse); color: var(--rl-on-inverse);
  font-size: .9rem; box-shadow: var(--rl-shadow-pop); transition: opacity .25s, transform .25s var(--rl-ease);
}
.rl-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 14. Decorative orbits (thin circle lines) ---------- */
.rl-orbits { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.rl-orbits span { position: absolute; border: 1px solid var(--rl-hairline); border-radius: 50%; }

/* ---------- 15. Site header & footer ---------- */
.rl-header { height: var(--rl-header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; z-index: 5; }
.rl-nav { display: flex; align-items: center; gap: 36px; }
.rl-nav a { font-size: .95rem; font-weight: 500; position: relative; padding: 4px 0; }
.rl-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px; background: var(--rl-primary); transition: right .25s var(--rl-ease); }
.rl-nav a:hover::after, .rl-nav a[aria-current="page"]::after { right: 0; }
.rl-header__actions { display: flex; align-items: center; gap: 10px; }
.rl-lang { font-family: var(--rl-font-dv); font-size: 1rem; color: var(--rl-ink-2); padding: 0 6px; }

.rl-footer { border-top: 1px solid var(--rl-line); padding: 28px 0 36px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: .875rem; color: var(--rl-muted); }
.rl-social { display: flex; gap: 8px; }
.rl-social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--rl-line-strong); color: var(--rl-ink); transition: background .15s, color .15s, border-color .15s; }
.rl-social a:hover { background: var(--rl-primary); border-color: var(--rl-primary); color: var(--rl-on-primary); }
.rl-social svg { width: 18px; height: 18px; }

@media (max-width: 760px) {
  .rl-nav { display: none; }
  .rl-lang { display: none; }
}

/* ---------- 15b. Dropdown menu (header "Shop" menu) ---------- */
.rl-menu { position: relative; }
.rl-menu__btn {
  height: 40px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  background: transparent; color: var(--rl-ink); border: 1px solid var(--rl-line-strong);
  font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s;
}
.rl-menu__btn:hover, .rl-menu__btn[aria-expanded="true"] { border-color: var(--rl-ink); }
.rl-menu__btn svg { width: 18px; height: 18px; }
.rl-menu__btn .rl-menu__chev { width: 14px; height: 14px; transition: transform .2s var(--rl-ease); }
.rl-menu__btn[aria-expanded="true"] .rl-menu__chev { transform: rotate(180deg); }
.rl-menu__panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 70; width: 320px; max-width: calc(100vw - 32px);
  background: var(--rl-surface); border: 1px solid var(--rl-line); box-shadow: var(--rl-shadow-pop); padding: 18px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s var(--rl-ease), transform .18s var(--rl-ease), visibility 0s linear .18s;
}
.rl-menu.is-open .rl-menu__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.rl-menu__panel .rl-label { display: block; margin-bottom: 8px; }
.rl-menu__list { display: flex; flex-direction: column; margin: 0 -10px; }
.rl-menu__item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; font-size: .925rem; color: var(--rl-ink);
  transition: background .15s;
}
.rl-menu__item:hover, .rl-menu__item:focus-visible { background: var(--rl-surface-2); outline: none; }
.rl-menu__icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; background: var(--rl-surface-2); transition: background .15s, color .15s; }
.rl-menu__icon svg { width: 18px; height: 18px; }
.rl-menu__item:hover .rl-menu__icon { background: var(--rl-primary-soft); color: var(--rl-primary); }
.rl-menu__count {
  margin-left: auto; min-width: 26px; padding: 2px 8px; text-align: center; border-radius: var(--rl-radius-pill);
  font-size: .72rem; font-weight: 600; color: var(--rl-muted); background: var(--rl-surface-2); transition: background .15s, color .15s;
}
.rl-menu__item:hover .rl-menu__count { background: var(--rl-primary); color: var(--rl-on-primary); }
.rl-menu__divider { height: 1px; background: var(--rl-line); margin: 14px 0; }
.rl-menu__types { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--rl-line-strong); }
.rl-menu__types a { padding: 9px 6px; text-align: center; font-size: .85rem; color: var(--rl-muted); transition: background .15s, color .15s; }
.rl-menu__types a + a { border-left: 1px solid var(--rl-line-strong); }
.rl-menu__types a:hover { background: var(--rl-inverse); color: var(--rl-on-inverse); }
.rl-menu__all { margin-top: 14px; }
@media (max-width: 560px) { .rl-menu__btn span { display: none; } .rl-menu__btn { padding: 0 10px; } }

/* ---------- 15c. Modal & confirm dialog (centered, dark overlay) ---------- */
.rl-modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.rl-modal.is-open { visibility: visible; }
.rl-modal__backdrop { position: absolute; inset: 0; background: rgba(6, 6, 8, .62); backdrop-filter: blur(3px); opacity: 0; transition: opacity .2s var(--rl-ease); }
.rl-modal.is-open .rl-modal__backdrop { opacity: 1; }
.rl-modal__dialog {
  position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
  background: var(--rl-surface); color: var(--rl-ink); border: 1px solid var(--rl-line); box-shadow: 0 30px 80px -30px rgba(0,0,0,.6);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
  opacity: 0; transform: translateY(12px) scale(.97); transition: opacity .2s var(--rl-ease), transform .22s var(--rl-ease);
}
.rl-modal--wide .rl-modal__dialog { max-width: 560px; }
.rl-modal.is-open .rl-modal__dialog { opacity: 1; transform: none; }
.rl-modal__icon { width: 52px; height: 52px; display: grid; place-items: center; background: var(--rl-primary-soft); color: var(--rl-primary); }
.rl-modal__icon svg { width: 26px; height: 26px; }
.rl-modal--danger .rl-modal__icon { background: color-mix(in oklab, var(--rl-danger) 14%, var(--rl-surface)); color: var(--rl-danger); }
.rl-modal__title { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.rl-modal__text { color: var(--rl-ink-2); font-size: .95rem; }
.rl-modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }
.rl-modal__close { position: absolute; top: 14px; right: 14px; }
@media (max-width: 480px) { .rl-modal__actions .rl-btn { flex: 1; } }
body.rl-modal-open { overflow: hidden; }

/* ---------- 15d. Sad face (empty states) — subtle float, blink and tear ---------- */
/* Sad face (empty / no results): ink outline, brand eyebrows. One 4s "sigh" loop:
   brows lift and pinch, eyes glance down and blink, the mouth droops, the head tilts. */
.rl-sad { width: 88px; height: 88px; color: var(--rl-ink); display: block; overflow: visible; }
.rl-sad__brow { stroke: var(--rl-primary); }
.rl-sad__head { transform-origin: 32px 32px; animation: rl-sad-head 4s var(--rl-ease, ease) infinite; }
.rl-sad__brow--l { transform-origin: 26px 20px; animation: rl-sad-brow-l 4s ease-in-out infinite; }
.rl-sad__brow--r { transform-origin: 38px 20px; animation: rl-sad-brow-r 4s ease-in-out infinite; }
.rl-sad__eyes { transform-origin: 32px 29.5px; animation: rl-sad-eyes 4s ease-in-out infinite; }
.rl-sad__mouth { transform-origin: 32px 42px; animation: rl-sad-mouth 4s ease-in-out infinite; }
@keyframes rl-sad-head { 0%, 100% { transform: none; } 30% { transform: translateY(1.5px) rotate(-5deg); } 55% { transform: translateY(1.5px) rotate(-5deg); } 75% { transform: rotate(2deg); } }
@keyframes rl-sad-brow-l { 0%, 100% { transform: none; } 30%, 55% { transform: translateY(-2.5px) rotate(12deg); } }
@keyframes rl-sad-brow-r { 0%, 100% { transform: none; } 30%, 55% { transform: translateY(-2.5px) rotate(-12deg); } }
@keyframes rl-sad-eyes { 0%, 100% { transform: none; } 30%, 52% { transform: translateY(1.8px); } 58% { transform: translateY(1.8px) scaleY(.12); } 62% { transform: translateY(1px); } }
@keyframes rl-sad-mouth { 0%, 100% { transform: none; } 30%, 55% { transform: translateY(1px) scaleX(.86) scaleY(1.25); } }
@media (prefers-reduced-motion: reduce) { .rl-sad__head, .rl-sad__brow--l, .rl-sad__brow--r, .rl-sad__eyes, .rl-sad__mouth { animation: none; } }

/* ---------- 16. Admin / app shell ---------- */
.rl-app { display: grid; grid-template-columns: var(--rl-sidebar-w) 1fr; min-height: 100vh; background: var(--rl-bg); }
.rl-sidebar { background: var(--rl-surface); border-right: 1px solid var(--rl-line); display: flex; flex-direction: column; padding: 20px 14px; gap: 24px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.rl-sidebar .rl-logo { padding: 4px 10px; }
.rl-sidenav { display: flex; flex-direction: column; gap: 2px; }
.rl-sidenav__group { padding: 14px 10px 6px; }
.rl-sidenav a, .rl-sidenav__btn {
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 6px 10px 6px 6px;
  font: inherit; font-size: .925rem; font-weight: 500; text-align: left; color: var(--rl-ink-2);
  background: transparent; border: 0; cursor: pointer;
  transition: background .2s var(--rl-ease), color .2s;
}
/* Icon tile */
.rl-sidenav__icon {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  background: var(--rl-surface-2); color: var(--rl-ink);
  transition: background .2s var(--rl-ease), color .2s, transform .25s var(--rl-ease);
}
.rl-sidenav__icon svg { width: 22px; height: 22px; stroke-width: 1.6; transition: transform .25s var(--rl-ease); }
/* Hover: tile turns orange-soft, icon lifts */
.rl-sidenav a:hover, .rl-sidenav__btn:hover { color: var(--rl-ink); background: color-mix(in oklab, var(--rl-surface-2) 60%, transparent); }
.rl-sidenav a:hover .rl-sidenav__icon, .rl-sidenav__btn:hover .rl-sidenav__icon { background: var(--rl-primary-soft); color: var(--rl-primary); transform: translateX(2px); }
.rl-sidenav a:hover .rl-sidenav__icon svg, .rl-sidenav__btn:hover .rl-sidenav__icon svg { transform: scale(1.08); }
.rl-sidenav a:active .rl-sidenav__icon { transform: scale(.94); }
/* Current page: solid orange tile + bar */
.rl-sidenav a[aria-current="page"] { color: var(--rl-ink); font-weight: 600; background: var(--rl-primary-soft); }
.rl-sidenav a[aria-current="page"]::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--rl-primary); }
.rl-sidenav a[aria-current="page"] .rl-sidenav__icon { background: var(--rl-primary); color: var(--rl-on-primary); box-shadow: 0 8px 18px -10px var(--rl-primary); }
.rl-sidenav a:focus-visible, .rl-sidenav__btn:focus-visible { outline: 2px solid var(--rl-primary); outline-offset: -2px; }
.rl-sidenav__btn--danger:hover { color: var(--rl-danger); }
.rl-sidenav__btn--danger:hover .rl-sidenav__icon { background: color-mix(in oklab, var(--rl-danger) 14%, var(--rl-surface)); color: var(--rl-danger); }
.rl-sidenav .rl-count { margin-left: auto; font-size: .72rem; font-weight: 600; color: var(--rl-muted); }
.rl-main { min-width: 0; display: flex; flex-direction: column; }
.rl-topbar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: var(--rl-surface); border-bottom: 1px solid var(--rl-line); position: sticky; top: 0; z-index: 10; }
.rl-topbar__search { flex: 1; max-width: 420px; }
.rl-topbar__search .rl-input { height: 40px; background: var(--rl-surface-2); border-color: transparent; }
.rl-topbar__end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.rl-page { padding: 32px 28px 48px; display: flex; flex-direction: column; gap: 24px; }
.rl-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 960px) {
  .rl-app { grid-template-columns: 1fr; }
  .rl-sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-105%); transition: transform .28s var(--rl-ease); box-shadow: var(--rl-shadow-pop); }
  .rl-sidebar.is-open { transform: none; }
  .rl-topbar, .rl-page { padding-left: 16px; padding-right: 16px; }
}

/* ---------- 16b. Product card (server-rendered) + fly-to-cart bubble ---------- */
.pcard { background: var(--rl-surface); display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .2s, transform .25s var(--rl-ease), box-shadow .25s; }
:root[data-theme="dark"] .pcard { border-color: var(--rl-line); }
.pcard:hover { border-color: var(--rl-ink); transform: translateY(-3px); box-shadow: 0 18px 36px -26px rgba(0,0,0,.45); }
.pcard__img { position: relative; aspect-ratio: 1; background: var(--rl-surface-2); display: grid; place-items: center; overflow: hidden; color: var(--rl-ink); }
.pcard__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--rl-ease); }
.pcard:hover .pcard__img img { transform: scale(1.05); }
.pcard__img > svg { width: 38%; height: 38%; stroke-width: .9; }
.pcard.is-out .pcard__img { opacity: .55; }
.pcard__tags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.pcard__body { position: relative; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pcard__cat { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--rl-muted); }
.pcard__name { font-size: .98rem; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; padding-right: 48px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 8px; }
.pcard__price strong { font-size: 1.12rem; font-weight: 600; letter-spacing: -.02em; }
.pcard__price s { font-size: .8rem; color: var(--rl-muted); }
.pcard__add { position: absolute; right: 14px; bottom: 14px; width: 42px; height: 42px; display: grid; place-items: center; border: 0; background: var(--rl-ink); color: var(--rl-surface); cursor: pointer; transition: background .15s, transform .15s; }
.pcard__add svg { width: 20px; height: 20px; }
.pcard__add:hover { background: var(--rl-primary); color: var(--rl-on-primary); transform: scale(1.06); }
.pcard__add:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.pcard__add.is-added { background: var(--rl-success); color: #fff; }
.fly-ghost { position: fixed; z-index: 200; left: 0; top: 0; width: 64px; height: 64px; border-radius: 50%; pointer-events: none; background: var(--rl-primary); color: var(--rl-on-primary); display: grid; place-items: center; overflow: hidden; box-shadow: 0 12px 28px -10px var(--rl-primary); will-change: transform, opacity; }
.fly-ghost img { width: 100%; height: 100%; object-fit: cover; }
.fly-ghost svg { width: 30px; height: 30px; stroke: currentColor; stroke-width: 1.5; }
@media (max-width: 640px) { .pcard__body { padding: 12px; } .pcard__name { font-size: .88rem; padding-right: 0; } .pcard__add { position: static; width: 100%; height: 38px; margin-top: 10px; } }

/* ---------- 16c. Shop footer (columns) ---------- */
.rl-sitefoot { margin-top: 24px; border-top: 1px solid var(--rl-line); padding: 48px 0 0; }
.rl-sitefoot__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.rl-sitefoot__brand p { color: var(--rl-muted); font-size: .9rem; margin: 14px 0 18px; max-width: 34ch; }
.rl-sitefoot h4 { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rl-muted); margin-bottom: 14px; }
.rl-sitefoot ul { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
.rl-sitefoot ul a { color: var(--rl-ink); text-decoration: none; font-size: .92rem; transition: color .15s, padding .15s; }
.rl-sitefoot ul a:hover { color: var(--rl-primary); padding-left: 4px; }
.rl-sitefoot__bottom { margin-top: 40px; border-top: 1px solid var(--rl-line); padding: 20px 0 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; color: var(--rl-muted); }
@media (max-width: 800px) { .rl-sitefoot__grid { grid-template-columns: 1fr 1fr; } .rl-sitefoot__brand { grid-column: 1 / -1; } }

/* ---------- 17. Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
