:root {
  /* ── SecuDepo brand palette ───────────────────────────────
     Mirrors the storefront design tokens (globals.css @theme):
       primary #cb7246 · primary-dark #ad613c · primary-light #f9eee9
       secondary #727376 · ink #15171c · soft #f6f5f2
       muted #9aa1ab · line #ececea · body #4b5563
     The legacy --as-blue-* / --as-navy-* names are kept so existing
     rules recolor automatically; only their values changed. */

  /* Primary (terracotta) — legacy "blue" slots */
  --as-blue-700: #ad613c;
  --as-blue-600: #cb7246;
  --as-blue-500: #d8895f;
  --as-blue-100: #f9eee9;

  --as-primary: #cb7246;
  --as-primary-dark: #ad613c;
  --as-primary-light: #f9eee9;

  /* Dark surfaces (hero card, footer) — legacy "navy" slots */
  --as-navy-950: #15171c;
  --as-navy-900: #727376;
  --as-navy-800: #5c5d60;
  --as-secondary: #727376;
  --as-ink: #15171c;

  /* Neutral tones */
  --as-silver-500: #9aa1ab;
  --as-silver-300: #d3d4d6;
  --as-silver-100: #f6f5f2;
  --as-white: #FFFFFF;
  --as-gray-50: #f6f5f2;
  --as-gray-100: #f6f5f2;
  --as-gray-200: #ececea;
  --as-gray-300: #dcdcd8;
  --as-gray-400: #9aa1ab;
  --as-gray-500: #9aa1ab;
  --as-gray-600: #4b5563;
  --as-gray-700: #4b5563;
  --as-gray-800: #2a2d34;
  --as-gray-900: #15171c;

  /* Functional alert colors */
  --as-success: #16a34a;
  --as-success-dark: #15803d;
  --as-whatsapp: #25D366;
  --as-whatsapp-dark: #128C7E;
  --as-warning: #f59e0b;
  --as-danger: #e53535;
  --as-star: #ffb400;
  --as-info: #0EA5E9;

  /* M-PESA / Safaricom brand colors (for the homepage payment card only) */
  --as-mpesa-green: #30B54A;
  --as-mpesa-green-dark: #1F7A31;
  --as-mpesa-red: #E4002B;

  /* Core surfaces */
  --as-page-bg: #FFFFFF;
  --as-card-bg: #FFFFFF;
  --as-soft: #f6f5f2;
  --as-dark-surface: #727376;

  /* Borders and shadows */
  --as-border-light: #ececea;
  --as-border-medium: #dcdcd8;
  --as-shadow-sm: 0 1px 2px rgba(21, 23, 28, 0.05);
  --as-shadow-md: 0 4px 6px -1px rgba(21, 23, 28, 0.08), 0 2px 4px -2px rgba(21, 23, 28, 0.06);
  --as-shadow-lg: 0 10px 15px -3px rgba(21, 23, 28, 0.10), 0 4px 6px -4px rgba(21, 23, 28, 0.08);

  /* Border radius tokens — card 20px / control 14px / pill, per storefront */
  --as-radius-xs: 10px;
  --as-radius-sm: 12px;
  --as-radius-md: 14px;
  --as-radius-lg: 20px;
  --as-radius-xl: 24px;
  --as-radius-pill: 999px;
  --as-radius-card: 20px;
  --as-radius-control: 14px;

  /* Typographic sizes */
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-base: 15px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
  --fs-3xl: 46px;
  --fs-4xl: 64px;

  /* Line heights */
  --lh-tight: 1.1;
  --lh-heading: 1.18;
  --lh-body: 1.6;

  /* Font configurations — Jost, matching the storefront */
  --as-font-primary: "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --as-font-heading: "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing system */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
}

/* Global Resetting */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  /* Nothing should ever push the page sideways on a phone. */
  overflow-x: hidden;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background-color: var(--as-page-bg);
  color: var(--as-gray-700);
  font-family: var(--as-font-primary);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* Media never overflows its column */
img,
svg,
video,
iframe,
embed,
object {
  max-width: 100%;
}

img,
video {
  height: auto;
}

/* Long words and URLs wrap rather than widen the layout */
h1, h2, h3, h4, h5, h6, p, li, dd, dt, figcaption, td, th, label {
  overflow-wrap: break-word;
}

/* Wide tables scroll inside themselves, never the page */
.as-table-scroll,
.woocommerce-Tabs-panel table,
.woocommerce table.shop_table_responsive,
.woocommerce-orders-table,
.woocommerce-MyAccount-content table {
  max-width: 100%;
}

pre,
code {
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--as-font-heading);
  color: var(--as-gray-900);
  line-height: var(--lh-heading);
  font-weight: 700;
  margin-top: 0;
  margin-bottom: var(--space-3);
}

a {
  color: var(--as-blue-600);
  text-decoration: none;
  transition: color 150ms ease;
}

a:hover {
  color: var(--as-blue-700);
}

/* Container Widths — 1300px matches the storefront `.container` */
.as-container {
  width: min(100% - 32px, 1300px);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .as-container {
    width: min(100% - 48px, 1300px);
  }
}

.as-container-wide {
  width: min(100% - 32px, 1480px);
  margin-inline: auto;
}

.as-container-narrow {
  width: min(100% - 32px, 980px);
  margin-inline: auto;
}

/* Grid Layout definitions */
.as-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-6);
}

.as-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.as-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

/* Utility focus state */
:focus-visible {
  outline: 3px solid rgba(203, 114, 70, 0.35);
  outline-offset: 3px;
}

/* Hide scrollbars on horizontal product tracks (storefront `scrollbar-none`) */
.as-scrollbar-none {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.as-scrollbar-none::-webkit-scrollbar {
  display: none;
}
