/* =============================================================
   ZM BASKET — Design tokens & base reset
   Loaded site-wide (public, admin, client). Defines the colour
   system, typography, spacing and shared primitives.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Poppins:wght@500;600;700;800&display=swap');

:root {
  /* Brand colours */
  --color-primary: #0B5ED7;
  --color-primary-dark: #094db0;
  --color-primary-light: #e7f0fd;
  --color-dark: #0F172A;
  --color-accent: #F59E0B;
  --color-accent-dark: #d98806;
  --color-bg: #F8FAFC;
  --color-surface: #ffffff;

  /* Neutrals */
  --color-text: #0F172A;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-border-strong: #CBD5E1;

  /* Status */
  --color-success: #16A34A;
  --color-success-bg: #DCFCE7;
  --color-warning: #D97706;
  --color-warning-bg: #FEF3C7;
  --color-danger: #DC2626;
  --color-danger-bg: #FEE2E2;
  --color-info: #0B5ED7;
  --color-info-bg: #DBEAFE;

  /* Typography */
  --font-heading: 'Poppins', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Radii & shadow */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 12px rgba(15, 23, 42, .08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .12);

  /* Layout */
  --container: 1200px;
  --header-h: 72px;
  --transition: .2s ease;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  margin: 0 0 .5em;
  color: var(--color-dark);
}

a { color: var(--color-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* Buttons ---------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  padding: .7rem 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  line-height: 1.2;
}
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }
.btn-accent { background: var(--color-accent); color: #1f1300; }
.btn-accent:hover { background: var(--color-accent-dark); }
.btn-outline { background: transparent; border-color: var(--color-border-strong); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* Forms ------------------------------------------------------ */
.form-group { margin-bottom: 1.1rem; }
.form-label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--color-dark); }
.form-control {
  width: 100%;
  padding: .7rem .9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: #fff;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, .15);
}
.form-hint { font-size: .8rem; color: var(--color-muted); margin-top: .35rem; }

/* Alerts ----------------------------------------------------- */
.alert { padding: .8rem 1rem; border-radius: var(--radius); font-size: .92rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert-success { background: var(--color-success-bg); color: #14532d; border-color: #bbf7d0; }
.alert-danger  { background: var(--color-danger-bg);  color: #7f1d1d; border-color: #fecaca; }
.alert-warning { background: var(--color-warning-bg); color: #78350f; border-color: #fde68a; }
.alert-info    { background: var(--color-info-bg);    color: #1e3a8a; border-color: #bfdbfe; }

/* Badges ----------------------------------------------------- */
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-success { background: var(--color-success-bg); color: #14532d; }
.badge-warning { background: var(--color-warning-bg); color: #78350f; }
.badge-danger  { background: var(--color-danger-bg);  color: #7f1d1d; }
.badge-info    { background: var(--color-info-bg);    color: #1e3a8a; }
.badge-muted   { background: #F1F5F9; color: var(--color-muted); }

/* Utilities -------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}
.mb-1{margin-bottom:.5rem}.mb-2{margin-bottom:1rem}.mb-3{margin-bottom:1.5rem}

/* Accessibility: visible focus */
:focus-visible { outline: 3px solid rgba(11,94,215,.45); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* The floating WhatsApp button styles are emitted inline by
   includes/whatsapp_button.php so they always apply regardless of CSS
   caching/load order. (Intentionally not duplicated here.) */

/* ---------- Accessibility: visible focus rings + inline validation ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.form-control.is-invalid { border-color: var(--color-danger); box-shadow: 0 0 0 3px var(--color-danger-bg); }
.field-error { color: var(--color-danger); font-size: .8rem; margin-top: .25rem; }
