/* ═══════════════════════════════════════════════════════════════════════
   RENTORZO DESIGN SYSTEM
   The authoritative token + component layer. Loaded LAST on the storefront
   and FIRST on admin (see the note on admin below).

   Why this file exists
   ────────────────────
   Colour, type and spacing were previously decided in ~139 individual Blade
   templates: 212 distinct hex values across 1,447 occurrences, including five
   different "brand" reds. Every token below replaces a family of those
   literals, so the brand is retuned here and nowhere else.

   Load order contract
   ───────────────────
   STOREFRONT: last in <head> (after rz-orange-theme.css), so it wins.
   ADMIN:      before admin's own <style> block, so admin's bespoke components
               still win on conflict while inheriting the tokens and the
               accessibility baseline.

   The `!important` in this file is deliberate and load-bearing: it exists only
   where a rule has to beat Bootstrap (1,279 !important) or the legacy sweep
   sheets. It is not used on anything those sheets don't already claim.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ─────────────────────────────────────────────────────────
   Every value the UI is allowed to use. Anything not expressible here is a
   gap in the system, not a licence to inline a hex code. */
:root {
  /* Brand ramp. 600 is the existing brand red and is kept exactly, so the
     logo, and the 355 theme rules already painting from --rz-brand, do not
     shift. The rest of the ramp is derived around it. */
  --rz-r-50:  #FEF3F2;
  --rz-r-100: #FEE4E2;
  --rz-r-200: #FECDCA;
  --rz-r-300: #FDA29B;
  --rz-r-400: #F97066;
  --rz-r-500: #EF4438;
  --rz-r-600: #E5271A;
  --rz-r-700: #C01D12;
  --rz-r-800: #9E1B12;
  --rz-r-900: #7F1D15;

  /* Neutral ramp (slate). Replaces the ad-hoc mix of #6B7280, #888, #2A2A2A,
     #F5F3EF, #E9ECEF and #EDEBE6 that was in use. */
  --rz-n-0:   #FFFFFF;
  --rz-n-25:  #FCFCFD;
  --rz-n-50:  #F8FAFC;
  --rz-n-100: #F1F5F9;
  --rz-n-200: #E2E8F0;
  --rz-n-300: #CBD5E1;
  --rz-n-400: #94A3B8;
  --rz-n-500: #64748B;
  --rz-n-600: #475569;
  --rz-n-700: #334155;
  --rz-n-800: #1E293B;
  --rz-n-900: #0F172A;
  --rz-n-950: #060B18;

  /* Semantic. Each pairs a foreground that clears 4.5:1 on its own tint. */
  --rz-success:    #047857;  --rz-success-bg: #ECFDF5; --rz-success-bd: #A7F3D0;
  --rz-warning:    #B45309;  --rz-warning-bg: #FFFBEB; --rz-warning-bd: #FDE68A;
  --rz-danger:     #DC2626;  --rz-danger-bg:  #FEF2F2; --rz-danger-bd:  #FECACA;
  --rz-info:       #0369A1;  --rz-info-bg:    #F0F9FF; --rz-info-bd:    #BAE6FD;

  /* Aliases the existing 355 theme rules and the admin shell already consume.
     Redefining them here re-skins both surfaces from one place. */
  --rz-brand:       var(--rz-r-600);
  --rz-brand-2:     var(--rz-r-700);
  --rz-brand-light: var(--rz-r-50);
  --rz-brand-glow:  rgba(229,39,26,.18);
  --rz-ink:         var(--rz-n-900);
  --rz-dark:        var(--rz-n-950);
  --rz-dark-2:      var(--rz-n-900);
  --rz-muted:       var(--rz-n-500);
  --rz-line:        var(--rz-n-200);
  --rz-surface:     var(--rz-n-50);
  --rz-white:       var(--rz-n-0);
  --brand: var(--rz-brand); --dark: var(--rz-dark); --ink: var(--rz-ink);
  --muted: var(--rz-muted); --line: var(--rz-line);
  --surface: var(--rz-surface); --white: var(--rz-white);

  /* Type. Two families only, down from four across the two surfaces. */
  --rz-font-display: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rz-font-text:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --rz-font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Fluid scale — the clamps remove the per-breakpoint font-size overrides
     that were scattered through the responsive sheets. */
  --rz-fs-xs:   0.75rem;
  --rz-fs-sm:   0.8125rem;
  --rz-fs-base: 0.9375rem;
  --rz-fs-md:   1rem;
  --rz-fs-lg:   1.125rem;
  --rz-fs-xl:   1.25rem;
  --rz-fs-2xl:  clamp(1.375rem, 1.20rem + 0.80vw, 1.75rem);
  --rz-fs-3xl:  clamp(1.75rem,  1.40rem + 1.60vw, 2.50rem);
  --rz-fs-4xl:  clamp(2.25rem,  1.60rem + 2.80vw, 3.50rem);

  --rz-lh-tight: 1.15;
  --rz-lh-snug:  1.35;
  --rz-lh-base:  1.6;
  --rz-tracking-tight: -0.02em;
  --rz-tracking-wide:   0.08em;

  /* Space — 4px base. */
  --rz-sp-1: 4px;   --rz-sp-2: 8px;   --rz-sp-3: 12px;  --rz-sp-4: 16px;
  --rz-sp-5: 20px;  --rz-sp-6: 24px;  --rz-sp-8: 32px;  --rz-sp-10: 40px;
  --rz-sp-12: 48px; --rz-sp-16: 64px; --rz-sp-20: 80px; --rz-sp-24: 96px;

  /* Radius. */
  --rz-rd-xs: 6px;  --rz-rd-sm: 8px;  --rz-rd-md: 12px; --rz-rd-lg: 16px;
  --rz-rd-xl: 20px; --rz-rd-2xl: 28px; --rz-rd-pill: 999px;
  --rz-radius: var(--rz-rd-lg);
  --rz-radius-lg: var(--rz-rd-2xl);
  --rz-radius-xl: 32px;

  /* Elevation. Two-part shadows read as light, not as a grey halo — the old
     single 40px/60px blurs made every card look like it was floating. */
  --rz-sh-xs: 0 1px 2px rgba(15,23,42,.06);
  --rz-sh-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --rz-sh-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --rz-sh-lg: 0 12px 28px rgba(15,23,42,.10), 0 4px 10px rgba(15,23,42,.05);
  --rz-sh-xl: 0 24px 48px rgba(15,23,42,.14), 0 8px 16px rgba(15,23,42,.06);
  --rz-sh-brand: 0 6px 18px rgba(229,39,26,.26);
  --rz-shadow: var(--rz-sh-md);
  --rz-shadow-lg: var(--rz-sh-lg);

  /* Motion. */
  --rz-dur-1: 120ms; --rz-dur-2: 180ms; --rz-dur-3: 240ms; --rz-dur-4: 360ms;
  --rz-ease:     cubic-bezier(.4, 0, .2, 1);
  --rz-ease-out: cubic-bezier(.16, 1, .3, 1);
  --rz-transition: var(--rz-dur-2) var(--rz-ease);

  --rz-container: 1280px;

  /* Focus ring.

     Deliberately NOT the brand colour. The brand is red and so is the error
     state, so a red ring on an autofocused field reads as "this input is
     wrong" before the user has typed anything — which is exactly how the admin
     sign-in looked. Focus is a functional signal, not a branding surface, so it
     gets its own unambiguous colour. This blue clears 3:1 against both the
     white and near-black surfaces the app uses. */
  --rz-focus: #2563EB;
}

/* ── 2. ACCESSIBILITY BASELINE ─────────────────────────────────────────
   The stack shipped 13 `outline:none` rules and essentially no focus styling,
   so keyboard navigation was invisible. These rules restore it globally. */

/* Never remove the indicator; replace it with a visible, branded one.
   :focus-visible keeps it off mouse clicks, which is why it was removed. */
:focus-visible,
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--rz-focus) !important;
  outline-offset: 2px !important;
  border-radius: var(--rz-rd-xs);
}
/* Dark surfaces need a light ring to stay visible. */
.topbar :focus-visible, .sidebar :focus-visible,
.rz-hdr-top :focus-visible, footer :focus-visible, .rz-ftr :focus-visible {
  outline-color: var(--rz-n-0) !important;
}

/* Screen-reader-only text. There was no such utility, so icon-only controls
   (cart, search, close) had no accessible name available to give them. */
.sr-only, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.sr-only-focusable:focus, .sr-only-focusable:focus-visible {
  position: static !important; width: auto; height: auto;
  margin: 0; overflow: visible; clip: auto; white-space: normal;
}

/* Skip link — first tab stop, lets keyboard users bypass the nav. */
.rz-skip-link {
  position: absolute; top: -100px; left: var(--rz-sp-4); z-index: 10000;
  background: var(--rz-brand); color: #fff;
  padding: var(--rz-sp-3) var(--rz-sp-5);
  border-radius: 0 0 var(--rz-rd-md) var(--rz-rd-md);
  font: 600 var(--rz-fs-base)/1 var(--rz-font-text);
  transition: top var(--rz-dur-2) var(--rz-ease);
}
.rz-skip-link:focus { top: 0; color: #fff; }

/* Honour the OS "reduce motion" setting. The stack loads animate.css (70KB)
   plus pulse/float keyframes and had no such guard at all. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto !important; }
}

/* ── 3. TYPOGRAPHY ─────────────────────────────────────────────────────
   One rhythm, replacing the per-page font-size/weight overrides. */
body {
  font-family: var(--rz-font-text);
  font-size: var(--rz-fs-base);
  line-height: var(--rz-lh-base);
  color: var(--rz-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--rz-font-display);
  letter-spacing: var(--rz-tracking-tight);
  line-height: var(--rz-lh-tight);
  color: var(--rz-ink);
  text-wrap: balance;
}
h1 { font-size: var(--rz-fs-4xl); font-weight: 800; }
h2 { font-size: var(--rz-fs-3xl); font-weight: 800; }
h3 { font-size: var(--rz-fs-2xl); font-weight: 700; }
h4 { font-size: var(--rz-fs-xl);  font-weight: 700; }
h5 { font-size: var(--rz-fs-lg);  font-weight: 700; }
h6 { font-size: var(--rz-fs-md);  font-weight: 700; }
p  { text-wrap: pretty; }

.rz-text-muted  { color: var(--rz-muted) !important; }
.rz-text-brand  { color: var(--rz-brand) !important; }
.rz-eyebrow, .eyebrow {
  font-size: var(--rz-fs-xs); font-weight: 800;
  letter-spacing: var(--rz-tracking-wide); text-transform: uppercase;
  color: var(--rz-brand);
}
/* Prices and any figure read in a column: tabular digits stop the numbers
   from jittering as values change. */
.rz-num, .rz-price, .rz-cart-price, .stat-value, .rz-stat-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ── 4. BUTTONS ────────────────────────────────────────────────────────
   A real hierarchy: exactly one primary per view, everything else recedes.
   Previously the same view could show an orange CTA, a black CTA and a red
   accent with no ranking between them. */
.rz-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--rz-sp-2);
  padding: 12px var(--rz-sp-6);
  min-height: 44px;                 /* WCAG 2.5.8 target size */
  border-radius: var(--rz-rd-md);
  font-family: var(--rz-font-text);
  font-size: var(--rz-fs-base); font-weight: 650;
  letter-spacing: 0;
  border: 1px solid transparent;
  white-space: nowrap; cursor: pointer;
  transition: background-color var(--rz-dur-2) var(--rz-ease),
              border-color var(--rz-dur-2) var(--rz-ease),
              color var(--rz-dur-2) var(--rz-ease),
              box-shadow var(--rz-dur-2) var(--rz-ease),
              transform var(--rz-dur-2) var(--rz-ease);
}
/* Lift on hover, settle on press — the press state was missing entirely. */
.rz-btn:hover  { transform: translateY(-1px); }
.rz-btn:active { transform: translateY(0); transition-duration: var(--rz-dur-1); }
.rz-btn:disabled, .rz-btn.is-disabled, .rz-btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important;
}

.rz-btn-primary {
  background: var(--rz-brand); color: #fff !important;
  box-shadow: var(--rz-sh-brand);
}
.rz-btn-primary:hover { background: var(--rz-brand-2); box-shadow: 0 8px 22px rgba(229,39,26,.34); }

.rz-btn-secondary {
  background: var(--rz-n-900); color: #fff !important; box-shadow: var(--rz-sh-sm);
}
.rz-btn-secondary:hover { background: var(--rz-n-800); }
.rz-btn-dark { background: var(--rz-n-950); color: #fff !important; }
.rz-btn-dark:hover { background: var(--rz-n-900); }

.rz-btn-outline {
  background: transparent; border-color: var(--rz-n-300); color: var(--rz-n-800) !important;
}
.rz-btn-outline:hover {
  border-color: var(--rz-brand); color: var(--rz-brand) !important; background: var(--rz-r-50);
}
.rz-btn-ghost {
  background: var(--rz-r-50); color: var(--rz-brand) !important;
}
.rz-btn-ghost:hover { background: var(--rz-r-100); }
.rz-btn-quiet {
  background: transparent; color: var(--rz-n-600) !important;
}
.rz-btn-quiet:hover { background: var(--rz-n-100); color: var(--rz-n-900) !important; }
.rz-btn-danger { background: var(--rz-danger); color: #fff !important; }
.rz-btn-danger:hover { background: #B91C1C; }

.rz-btn-sm  { min-height: 36px; padding: 8px var(--rz-sp-4); font-size: var(--rz-fs-sm); border-radius: var(--rz-rd-sm); }
.rz-btn-lg  { min-height: 52px; padding: 15px var(--rz-sp-8); font-size: var(--rz-fs-md); border-radius: var(--rz-rd-lg); }
.rz-btn-block { width: 100%; }
.rz-btn-icon { padding: 0; width: 44px; min-height: 44px; border-radius: var(--rz-rd-md); }
.rz-btn-icon.rz-btn-sm { width: 36px; min-height: 36px; }

/* Busy state for anything that submits. Needs [data-loading] on the button. */
.rz-btn[data-loading="true"] { color: transparent !important; pointer-events: none; position: relative; }
.rz-btn[data-loading="true"]::after {
  content: ""; position: absolute; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: rz-spin .6s linear infinite;
}
.rz-btn-outline[data-loading="true"]::after,
.rz-btn-ghost[data-loading="true"]::after { border-color: var(--rz-r-200); border-top-color: var(--rz-brand); }
@keyframes rz-spin { to { transform: rotate(360deg); } }

/* Legacy class names mapped onto the system so old markup inherits the
   redesign without being touched. */
.btn-style, .btn.btn-style, .btn-style2, .tp-card-btn, .rz-ftr-cta-btn {
  background: var(--rz-brand) !important; color: #fff !important;
  border-radius: var(--rz-rd-md) !important; border: 1px solid transparent !important;
  padding: 12px var(--rz-sp-6) !important; min-height: 44px;
  display: inline-flex !important; align-items: center; justify-content: center; gap: var(--rz-sp-2);
  font-weight: 650 !important; font-size: var(--rz-fs-base) !important;
  box-shadow: var(--rz-sh-brand) !important;
  transition: background-color var(--rz-dur-2) var(--rz-ease), transform var(--rz-dur-2) var(--rz-ease) !important;
}
.btn-style:hover, .btn.btn-style:hover, .btn-style2:hover,
.tp-card-btn:hover, .rz-ftr-cta-btn:hover {
  background: var(--rz-brand-2) !important; transform: translateY(-1px) !important;
}

/* ── 5. FORMS ──────────────────────────────────────────────────────────
   The theme styled `table` once and `.pagination` never; forms were left to
   Bootstrap defaults plus per-page overrides. This is the missing layer. */
.rz-field { margin-bottom: var(--rz-sp-5); }
.rz-label, .rz-field > label {
  display: block; margin-bottom: var(--rz-sp-2);
  font-size: var(--rz-fs-sm); font-weight: 650; color: var(--rz-n-700);
}
.rz-label .rz-req, .rz-required { color: var(--rz-danger); margin-left: 2px; }

.rz-input, .rz-select, .rz-textarea,
.rz-field input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.rz-field select, .rz-field textarea {
  display: block; width: 100%;
  padding: 11px var(--rz-sp-4);
  min-height: 44px;
  font-family: var(--rz-font-text);
  font-size: var(--rz-fs-md);       /* 16px: stops iOS zooming the page on focus */
  line-height: 1.5;
  color: var(--rz-ink);
  background: var(--rz-n-0);
  border: 1px solid var(--rz-n-300);
  border-radius: var(--rz-rd-md);
  transition: border-color var(--rz-dur-2) var(--rz-ease),
              box-shadow var(--rz-dur-2) var(--rz-ease),
              background-color var(--rz-dur-2) var(--rz-ease);
  appearance: none;
}
.rz-input::placeholder, .rz-textarea::placeholder,
.rz-field input::placeholder, .rz-field textarea::placeholder { color: var(--rz-n-400); }

.rz-input:hover, .rz-select:hover, .rz-textarea:hover { border-color: var(--rz-n-400); }
/* Focus darkens the border and lets the global blue :focus-visible ring do the
   signalling. It deliberately does not turn the border red — red is reserved
   for .is-invalid below, and using it for both made a focused field
   indistinguishable from a rejected one. */
.rz-input:focus, .rz-select:focus, .rz-textarea:focus,
.rz-field input:focus, .rz-field select:focus, .rz-field textarea:focus {
  border-color: var(--rz-n-500);
}
.rz-textarea { min-height: 120px; resize: vertical; }

/* Native select needs its own chevron once `appearance` is cleared. */
.rz-select, .rz-field select, select.form-select, select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--rz-sp-4) center;
  padding-right: var(--rz-sp-10);
}

/* Validation. Colour is never the only signal — the message carries the
   meaning, so this still works for colour-blind users. */
.rz-input.is-invalid, .rz-select.is-invalid, .rz-textarea.is-invalid,
.rz-field input.is-invalid, .is-invalid, .rz-field input[aria-invalid="true"] {
  border-color: var(--rz-danger) !important;
}
.rz-input.is-invalid:focus, .is-invalid:focus { box-shadow: 0 0 0 3px var(--rz-danger-bd) !important; }
.rz-help  { margin-top: 6px; font-size: var(--rz-fs-sm); color: var(--rz-muted); }
.rz-error, .invalid-feedback, .rz-field .text-danger {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; font-size: var(--rz-fs-sm); font-weight: 550; color: var(--rz-danger);
}
.rz-error::before, .invalid-feedback::before {
  content: "!"; flex: 0 0 auto;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--rz-danger); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 14px; text-align: center;
}

/* Checkbox / radio — 20px hit area with a 44px label row. */
.rz-check { display: flex; align-items: flex-start; gap: var(--rz-sp-3); cursor: pointer; padding: var(--rz-sp-2) 0; }
.rz-check input[type="checkbox"], .rz-check input[type="radio"] {
  flex: 0 0 auto; width: 20px; height: 20px; margin: 0;
  accent-color: var(--rz-brand); cursor: pointer;
}
.rz-check span { font-size: var(--rz-fs-base); color: var(--rz-n-700); line-height: 1.45; }

/* ── 6. TABLES ─────────────────────────────────────────────────────────
   Admin is mostly tables and the theme had no table styling at all. */
.rz-table-wrap {
  background: var(--rz-n-0);
  border: 1px solid var(--rz-n-200);
  border-radius: var(--rz-rd-lg);
  overflow: hidden;
  box-shadow: var(--rz-sh-sm);
}
/* A table must be able to scroll inside its card rather than forcing the
   whole page sideways — this was the main cause of mobile overflow. */
.rz-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rz-table { width: 100%; border-collapse: collapse; font-size: var(--rz-fs-base); }
.rz-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--rz-n-50);
  padding: var(--rz-sp-3) var(--rz-sp-4);
  text-align: left; white-space: nowrap;
  font-size: var(--rz-fs-xs); font-weight: 700;
  letter-spacing: var(--rz-tracking-wide); text-transform: uppercase;
  color: var(--rz-n-500);
  border-bottom: 1px solid var(--rz-n-200);
}
.rz-table tbody td {
  padding: var(--rz-sp-4);
  border-bottom: 1px solid var(--rz-n-100);
  color: var(--rz-n-700); vertical-align: middle;
}
.rz-table tbody tr:last-child td { border-bottom: 0; }
.rz-table tbody tr { transition: background-color var(--rz-dur-1) var(--rz-ease); }
.rz-table tbody tr:hover { background: var(--rz-n-50); }
.rz-table .rz-td-strong { font-weight: 650; color: var(--rz-n-900); }
.rz-table .rz-td-num { text-align: right; font-variant-numeric: tabular-nums; }
.rz-table-actions { display: flex; gap: var(--rz-sp-2); justify-content: flex-end; }

/* ── 7. CARDS ──────────────────────────────────────────────────────────── */
.rz-card {
  background: var(--rz-n-0);
  border: 1px solid var(--rz-n-200);
  border-radius: var(--rz-rd-lg);
  box-shadow: var(--rz-sh-sm);
  transition: box-shadow var(--rz-dur-3) var(--rz-ease),
              transform var(--rz-dur-3) var(--rz-ease),
              border-color var(--rz-dur-3) var(--rz-ease);
}
.rz-card-hover:hover, a.rz-card:hover {
  box-shadow: var(--rz-sh-lg); transform: translateY(-2px); border-color: var(--rz-n-300);
}
.rz-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--rz-sp-4);
  padding: var(--rz-sp-5) var(--rz-sp-6);
  border-bottom: 1px solid var(--rz-n-100);
}
.rz-card-title { font-size: var(--rz-fs-lg); font-weight: 700; margin: 0; }
.rz-card-body { padding: var(--rz-sp-6); }

/* ── 8. BADGES ─────────────────────────────────────────────────────────
   Status is carried by a word, not only a colour. */
.rz-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--rz-rd-pill);
  font-size: var(--rz-fs-xs); font-weight: 700; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.rz-badge-neutral { background: var(--rz-n-100); color: var(--rz-n-700); border-color: var(--rz-n-200); }
.rz-badge-brand   { background: var(--rz-r-50);  color: var(--rz-r-700); border-color: var(--rz-r-200); }
.rz-badge-success { background: var(--rz-success-bg); color: var(--rz-success); border-color: var(--rz-success-bd); }
.rz-badge-warning { background: var(--rz-warning-bg); color: var(--rz-warning); border-color: var(--rz-warning-bd); }
.rz-badge-danger  { background: var(--rz-danger-bg);  color: var(--rz-danger);  border-color: var(--rz-danger-bd); }
.rz-badge-info    { background: var(--rz-info-bg);    color: var(--rz-info);    border-color: var(--rz-info-bd); }
.rz-badge-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: 0 0 auto;
}

/* ── 9. ALERTS ─────────────────────────────────────────────────────────── */
.rz-alert {
  display: flex; align-items: flex-start; gap: var(--rz-sp-3);
  padding: var(--rz-sp-4) var(--rz-sp-5);
  border: 1px solid; border-left-width: 3px;
  border-radius: var(--rz-rd-md);
  font-size: var(--rz-fs-base);
  margin-bottom: var(--rz-sp-4);
}
.rz-alert-title { font-weight: 700; margin-bottom: 2px; }
.rz-alert-success { background: var(--rz-success-bg); border-color: var(--rz-success-bd); border-left-color: var(--rz-success); color: #065F46; }
.rz-alert-warning { background: var(--rz-warning-bg); border-color: var(--rz-warning-bd); border-left-color: var(--rz-warning); color: #92400E; }
.rz-alert-danger  { background: var(--rz-danger-bg);  border-color: var(--rz-danger-bd);  border-left-color: var(--rz-danger);  color: #991B1B; }
.rz-alert-info    { background: var(--rz-info-bg);    border-color: var(--rz-info-bd);    border-left-color: var(--rz-info);    color: #075985; }

/* ── 10. PAGINATION ───────────────────────────────────────────────────
   Laravel's paginator renders Bootstrap markup, so target that too. */
.rz-pagination, .pagination {
  display: flex; flex-wrap: wrap; gap: var(--rz-sp-2);
  align-items: center; justify-content: center;
  padding: var(--rz-sp-6) 0; margin: 0; list-style: none;
}
.rz-pagination .page-link, .pagination .page-link,
.rz-pagination a, .rz-pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 var(--rz-sp-3);
  border: 1px solid var(--rz-n-200) !important;
  border-radius: var(--rz-rd-sm) !important;
  background: var(--rz-n-0) !important;
  color: var(--rz-n-700) !important;
  font-size: var(--rz-fs-base); font-weight: 600;
  transition: all var(--rz-dur-2) var(--rz-ease);
}
.pagination .page-link:hover {
  border-color: var(--rz-brand) !important; color: var(--rz-brand) !important;
  background: var(--rz-r-50) !important;
}
.pagination .page-item.active .page-link {
  background: var(--rz-brand) !important; border-color: var(--rz-brand) !important;
  color: #fff !important; box-shadow: var(--rz-sh-brand);
}
.pagination .page-item.disabled .page-link { opacity: .45; pointer-events: none; }

/* ── 11. EMPTY STATES & SKELETONS ─────────────────────────────────────
   An empty table previously rendered as a blank card with no explanation. */
.rz-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--rz-sp-3); padding: var(--rz-sp-16) var(--rz-sp-6); text-align: center;
}
.rz-empty-icon {
  width: 56px; height: 56px; border-radius: var(--rz-rd-lg);
  display: grid; place-items: center;
  background: var(--rz-n-100); color: var(--rz-n-400); font-size: 24px;
}
.rz-empty-title { font-size: var(--rz-fs-lg); font-weight: 700; color: var(--rz-n-800); margin: 0; }
.rz-empty-text  { font-size: var(--rz-fs-base); color: var(--rz-muted); max-width: 42ch; margin: 0; }

.rz-skeleton {
  background: linear-gradient(90deg, var(--rz-n-100) 25%, var(--rz-n-200) 37%, var(--rz-n-100) 63%);
  background-size: 400% 100%;
  animation: rz-shimmer 1.4s ease infinite;
  border-radius: var(--rz-rd-sm);
}
@keyframes rz-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ── 12. LAYOUT HELPERS ───────────────────────────────────────────────── */
.rz-container { width: min(var(--rz-container), calc(100% - 2 * var(--rz-sp-5))); margin-inline: auto; }
.rz-section    { padding: var(--rz-sp-20) 0; }
.rz-section-sm { padding: var(--rz-sp-12) 0; }
.rz-stack-2 > * + * { margin-top: var(--rz-sp-2); }
.rz-stack-4 > * + * { margin-top: var(--rz-sp-4); }
.rz-stack-6 > * + * { margin-top: var(--rz-sp-6); }

/* Section headers — the badge was rendering as an empty pill wherever a page
   supplied no label, so it is hidden when it has no text. */
.rz-section-header { text-align: center; margin-bottom: var(--rz-sp-12); }
.rz-section-badge {
  display: inline-block; padding: 5px var(--rz-sp-4);
  border-radius: var(--rz-rd-pill);
  background: var(--rz-r-50); color: var(--rz-brand);
  font-size: var(--rz-fs-xs); font-weight: 800;
  letter-spacing: var(--rz-tracking-wide); text-transform: uppercase;
  margin-bottom: var(--rz-sp-3);
}
.rz-section-badge:empty { display: none !important; }
.rz-section-title { font-size: var(--rz-fs-3xl); font-weight: 800; margin-bottom: var(--rz-sp-3); }
.rz-section-title span { color: var(--rz-brand); }
.rz-section-sub { color: var(--rz-muted); max-width: 62ch; margin-inline: auto; font-size: var(--rz-fs-md); }

@media (max-width: 768px) {
  .rz-section    { padding: var(--rz-sp-12) 0; }
  .rz-section-sm { padding: var(--rz-sp-8) 0; }
  .rz-section-header { margin-bottom: var(--rz-sp-8); }
}

/* ── 13. PRODUCT CARD ─────────────────────────────────────────────────
   `.tp-card-btn` is declared in eleven different stylesheets. The rule that
   was winning painted it navy (`.rz-trending .tp-card-btn`, 0-2-0 with
   !important), which is why a red-branded catalogue showed rows of dark pills.

   These selectors match that 0-2-0 specificity and load later, so they win
   without escalating to a third !important. */
.tp-card .tp-card-btn,
.rz-trending .tp-card .tp-card-btn,
.collection-slider .tp-card .tp-card-btn {
  background: transparent !important;
  color: var(--rz-n-700) !important;
  border: 1px solid var(--rz-n-300) !important;
  border-radius: var(--rz-rd-sm) !important;
  padding: 8px 16px !important;
  min-height: 38px;
  font-size: var(--rz-fs-sm) !important;
  font-weight: 650 !important;
  box-shadow: none !important;
  transition: background-color var(--rz-dur-2) var(--rz-ease),
              border-color var(--rz-dur-2) var(--rz-ease),
              color var(--rz-dur-2) var(--rz-ease) !important;
}
/* A catalogue shows this button once per card. Seventeen filled brand pills
   would out-shout the product names and prices, which are the information the
   page exists to convey — so it stays quiet until the card is hovered. */
.tp-card:hover .tp-card-btn,
.tp-card .tp-card-btn:hover,
.tp-card .tp-card-btn:focus-visible {
  background: var(--rz-brand) !important;
  border-color: var(--rz-brand) !important;
  color: #fff !important;
  transform: none !important;
}

/* Equal-height cards. The body is the flex child that grows and the footer is
   pushed to the bottom, so price and CTA line up across a row no matter how
   many lines the product name takes. */
.ap-grid .tp-card, .rz-trending .tp-card, .collection-slider .tp-card {
  display: flex !important; flex-direction: column !important; height: 100% !important;
}
.tp-card .tp-card-body {
  display: flex !important; flex-direction: column !important; flex: 1 1 auto !important;
  gap: 6px;
}
.tp-card .tp-card-footer {
  margin-top: auto !important;
  display: flex !important; align-items: flex-end !important;
  justify-content: space-between !important; gap: var(--rz-sp-3);
  padding-top: var(--rz-sp-4);
}
/* Two lines reserved for the name, so a one-line title does not shorten its
   card relative to its neighbours. */
.tp-card .tp-card-name {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.4em);
  font-family: var(--rz-font-display);
  font-size: var(--rz-fs-md); font-weight: 700; line-height: 1.4;
  color: var(--rz-ink);
}
.tp-card .tp-card-name:hover { color: var(--rz-brand); }
.tp-card .tp-card-cat {
  font-size: var(--rz-fs-xs); font-weight: 700;
  letter-spacing: var(--rz-tracking-wide); text-transform: uppercase;
  color: var(--rz-brand);
}
.tp-card .tp-card-price > span {
  display: block; font-size: var(--rz-fs-xs); color: var(--rz-muted);
  letter-spacing: .02em; margin-bottom: 2px;
}
.tp-card .price-val {
  font-family: var(--rz-font-display);
  font-size: var(--rz-fs-xl); font-weight: 800; color: var(--rz-ink);
  font-variant-numeric: tabular-nums; line-height: 1.2;
  white-space: nowrap;              /* "₹ 2,560" must never break across lines */
}

/* Two cards per row on a phone leaves roughly 165px of card. Side by side, the
   price and the button were squeezing each other: "FROM · 2 CITIES" broke over
   three lines, "₹ 2,560" over two, and the button overlapped the price. Below
   this width the footer stacks instead. */
@media (max-width: 640px) {
  .tp-card .tp-card-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--rz-sp-2);
  }
  .tp-card .tp-card-price > span { white-space: nowrap; }
  .tp-card .tp-card-btn {
    width: 100%; justify-content: center !important;
  }
  .tp-card .tp-card-name { font-size: var(--rz-fs-base); }
}

/* ── 14. CATEGORY CARD ────────────────────────────────────────────────
   These were a 72px circle with the category photo `object-fit: cover`-ed
   inside it, on a pink tint. Cropping a picture of a laptop to a small circle
   throws away the part that identifies it, so every tile reduced to the same
   indistinct grey blob and the cards read as empty.

   The image now gets a square tile and `contain`, so the whole product is
   visible, and the card carries enough weight to look deliberate. */
.rz-category-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  gap: var(--rz-sp-4) !important;
}
.rz-cat-card {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--rz-sp-3);
  background: var(--rz-n-0) !important;
  border: 1px solid var(--rz-n-200) !important;
  border-radius: var(--rz-rd-lg) !important;
  padding: var(--rz-sp-4) var(--rz-sp-3) !important;
  height: 100%;
  transition: border-color var(--rz-dur-3) var(--rz-ease),
              box-shadow var(--rz-dur-3) var(--rz-ease),
              transform var(--rz-dur-3) var(--rz-ease) !important;
}
.rz-cat-card:hover {
  border-color: var(--rz-r-200) !important;
  background: var(--rz-n-0) !important;   /* not the pink wash, which flattened the photo */
  box-shadow: var(--rz-sh-md) !important;
  transform: translateY(-2px) !important;
}
.rz-cat-img-wrap {
  width: 100% !important; height: auto !important;
  aspect-ratio: 5 / 4;
  border-radius: var(--rz-rd-md) !important;
  background: var(--rz-n-50) !important;
  padding: var(--rz-sp-3);
  margin: 0 !important;
  display: grid !important; place-items: center;
  overflow: hidden;
}
.rz-cat-img-wrap img {
  width: 100% !important; height: 100% !important;
  object-fit: contain !important;    /* was `cover`, which cropped the product away */
  mix-blend-mode: multiply;          /* hides the white box around cut-out PNGs */
}
.rz-cat-name {
  font-family: var(--rz-font-display);
  font-size: var(--rz-fs-base) !important; font-weight: 700 !important;
  color: var(--rz-ink); margin: 0 !important; text-align: center;
  transition: color var(--rz-dur-2) var(--rz-ease);
}

/* ── 15. SCROLLBAR & SELECTION ────────────────────────────────────────
   The old rule painted the scrollbar thumb solid brand red, which read as a
   permanent alert down the side of every page. */
::selection { background: var(--rz-r-100); color: var(--rz-r-900); }
* { scrollbar-width: thin; scrollbar-color: var(--rz-n-300) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rz-n-300) !important;
  border-radius: var(--rz-rd-pill);
  border: 2px solid transparent; background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--rz-n-400) !important; }
