/* ================================================================
   BIDULES.MG v3 — Tetik'E-com Design System
   Faithfully extracted from Stitch / DESIGN.md
   ================================================================ */

/* ── Google Fonts are loaded via HTML <head> ── */

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  /* Brand primary */
  --primary:                   #002512;
  --primary-container:         #043d21;
  --on-primary:                #ffffff;
  --on-primary-container:      #74a984;
  --primary-fixed:             #b8efc7;
  --primary-fixed-dim:         #9dd3ac;
  --on-primary-fixed:          #00210f;
  --on-primary-fixed-variant:  #1d5032;
  --inverse-primary:           #9dd3ac;
  --surface-tint:              #366848;

  /* Secondary */
  --secondary:                 #3f6900;
  --on-secondary:              #ffffff;
  --secondary-container:       #bef380;
  --on-secondary-container:    #447007;
  --secondary-fixed:           #bef380;
  --secondary-fixed-dim:       #a3d667;
  --on-secondary-fixed:        #0f2000;
  --on-secondary-fixed-variant:#2e4f00;

  /* Tertiary */
  --tertiary:                  #3c0f17;
  --on-tertiary:               #ffffff;
  --tertiary-container:        #57242b;
  --on-tertiary-container:     #d18990;
  --tertiary-fixed:            #ffdadc;
  --tertiary-fixed-dim:        #ffb2b9;
  --on-tertiary-fixed:         #380b13;
  --on-tertiary-fixed-variant: #6d363d;

  /* Surfaces */
  --background:                #fcf9f8;
  --on-background:             #1c1b1b;
  --surface:                   #fcf9f8;
  --surface-bright:            #fcf9f8;
  --surface-dim:               #dcd9d9;
  --surface-variant:           #e5e2e1;
  --on-surface:                #1c1b1b;
  --on-surface-variant:        #414942;
  --surface-container-lowest:  #ffffff;
  --surface-container-low:     #f6f3f2;
  --surface-container:         #f0edec;
  --surface-container-high:    #ebe7e7;
  --surface-container-highest: #e5e2e1;
  --inverse-surface:           #313030;
  --inverse-on-surface:        #f3f0ef;

  /* Brand extras */
  --brand-red:                 #C0171E;
  --error-red:                 #C0171E;
  --error:                     #ba1a1a;
  --on-error:                  #ffffff;
  --error-container:           #ffdad6;
  --on-error-container:        #93000a;
  --success-leaf:              #6C9B34;
  --background-off-white:      #F2F2F2;
  --surface-white:             #FFFFFF;
  --border-subtle:             #E5E5E5;
  --outline:                   #717971;
  --outline-variant:           #c0c9c0;

  /* Typography */
  --font-head:    'Plus Jakarta Sans', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing (matches Stitch tokens) */
  --container-max: 1280px;
  --gutter:        1.5rem;      /* px-gutter */
  --margin-mobile: 1rem;       /* px-margin-mobile */
  --stack-xs:      0.5rem;
  --stack-md:      1.5rem;
  --stack-lg:      3rem;
  --sidebar-w:     240px;

  /* Radius */
  --r-sm:   0.25rem;
  --r-md:   0.5rem;   /* inputs, buttons */
  --r-lg:   1rem;     /* cards */
  --r-full: 9999px;   /* pills */

  /* Elevation */
  --shadow-card:  0 2px 8px rgba(0,0,0,.05);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.08);
  --shadow-modal: 0 8px 24px rgba(0,0,0,.10);
}

/* ── Reset ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--on-surface);
  background: var(--background-off-white);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography scale ───────────────────────────────────────────── */
.text-headline-xl  { font-family: var(--font-head); font-size: 2.5rem; font-weight: 700; line-height: 3rem; letter-spacing: -0.02em; }
.text-headline-lg  { font-family: var(--font-head); font-size: 2rem;   font-weight: 700; line-height: 2.5rem; }
.text-headline-lg-mobile { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; line-height: 2.25rem; }
.text-headline-md  { font-family: var(--font-head); font-size: 1.5rem; font-weight: 600; line-height: 2rem; }
.text-headline-sm  { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; line-height: 1.75rem; }
.text-body-lg      { font-family: var(--font-body); font-size: 1.125rem; font-weight: 400; line-height: 1.75rem; }
.text-body-md      { font-family: var(--font-body); font-size: 1rem;    font-weight: 400; line-height: 1.5rem; }
.text-body-sm      { font-family: var(--font-body); font-size: 0.875rem; font-weight: 400; line-height: 1.25rem; }
.text-label-md     { font-family: var(--font-body); font-size: 0.875rem; font-weight: 600; line-height: 1rem; letter-spacing: 0.01em; }
.text-label-sm     { font-family: var(--font-body); font-size: 0.75rem;  font-weight: 500; line-height: 0.875rem; }

/* ── Utilities ──────────────────────────────────────────────────── */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); }
.container-mobile { padding-inline: var(--margin-mobile); }
.d-flex { display: flex; }
.d-grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; } .gap-8 { gap: 2rem; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none; }
.sr-only { position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Color utilities ─────────────────────────────────────────────── */
.text-primary           { color: var(--primary); }
.text-on-surface        { color: var(--on-surface); }
.text-on-surface-variant{ color: var(--on-surface-variant); }
.text-success           { color: var(--success-leaf); }
.text-error             { color: var(--error-red); }
.text-outline           { color: var(--outline); }
.bg-surface-white       { background: var(--surface-white); }
.bg-off-white           { background: var(--background-off-white); }
.bg-primary             { background: var(--primary); color: var(--on-primary); }
.bg-primary-container   { background: var(--primary-container); color: var(--on-primary); }
.bg-surface-container   { background: var(--surface-container); }
.bg-secondary-container { background: var(--secondary-container); color: var(--on-secondary-container); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  letter-spacing: 0.01em; border-radius: var(--r-md); border: none;
  padding: 0.625rem 1.25rem; cursor: pointer; transition: all 0.15s ease;
  white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--surface-tint); }
.btn-primary-container { background: var(--primary-container); color: var(--on-primary); }
.btn-primary-container:hover { filter: brightness(1.15); }
.btn-secondary { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover { background: var(--surface-container-low); }
.btn-ghost { background: transparent; color: var(--on-surface-variant); }
.btn-ghost:hover { background: var(--surface-container); }
.btn-danger { background: var(--error-red); color: white; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-success { background: var(--success-leaf); color: white; }
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.75rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn .material-symbols-outlined { font-size: 18px; }
.btn-sm .material-symbols-outlined { font-size: 15px; }

/* ── Form inputs ─────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.25rem; }
.form-label {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 500;
  color: var(--on-surface); letter-spacing: 0.01em;
}
.form-input, .form-select, .form-textarea {
  width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--r-md);
  padding: 0.5rem 1rem; font-family: var(--font-body); font-size: 0.875rem;
  color: var(--on-surface); background: var(--surface-white); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary-container); border-width: 2px;
  box-shadow: 0 0 0 2px rgba(4,61,33,0.08);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--outline); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-error { font-size: 0.75rem; color: var(--error-red); margin-top: 0.25rem; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .material-symbols-outlined { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--on-surface-variant); font-size: 20px; pointer-events: none; }
.input-icon-wrap .form-input { padding-left: 2.5rem; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: var(--surface-white); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 1.25rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1rem; margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}
.card-header h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 600; color: var(--primary); }

/* ── KPI stat cards ─────────────────────────────────────────────── */
.kpi-card {
  background: var(--surface-white); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  transition: box-shadow 0.2s;
}
.kpi-card:hover { box-shadow: var(--shadow-hover); }
.kpi-card__header { display: flex; justify-content: space-between; align-items: flex-start; }
.kpi-card__label { font-size: 0.75rem; font-weight: 500; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: 0.06em; }
.kpi-card__icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: var(--r-md); }
.kpi-card__value { font-family: var(--font-head); font-size: 1.75rem; font-weight: 700; color: var(--primary); line-height: 1.2; margin-top: 0.5rem; }
.kpi-card__trend { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; }
.kpi-card__trend.up   { color: var(--success-leaf); }
.kpi-card__trend.down { color: var(--error-red); }
.kpi-card__trend.flat { color: var(--on-surface-variant); }

/* ── Badges / Status chips ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.625rem; border-radius: var(--r-full);
  font-size: 0.75rem; font-weight: 600; line-height: 1;
}
.badge-green   { background: rgba(108,155,52,.12); color: var(--success-leaf); }
.badge-red     { background: rgba(192,23,30,.10);  color: var(--error-red); }
.badge-orange  { background: rgba(245,158,11,.12); color: #b45309; }
.badge-blue    { background: rgba(59,130,246,.10); color: #1d4ed8; }
.badge-grey    { background: var(--surface-container-highest); color: var(--on-surface-variant); }
.badge-primary { background: var(--secondary-container); color: var(--on-secondary-container); }
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ── Data tables ─────────────────────────────────────────────────── */
.data-table-wrap { background: var(--surface-white); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: var(--surface-container-lowest); border-bottom: 1px solid var(--border-subtle); }
.data-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--on-surface-variant); text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }
.data-table td { padding: 0.875rem 1rem; font-size: 0.875rem; color: var(--on-surface); border-bottom: 1px solid var(--border-subtle); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--surface-bright); cursor: pointer; }
.data-table .td-primary { font-weight: 600; color: var(--primary); }
.data-table .td-primary:hover { text-decoration: underline; }
.data-table .td-muted { color: var(--on-surface-variant); }

/* ── Filter chips (pill buttons) ─────────────────────────────────── */
.filter-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  padding: 0.375rem 1rem; border-radius: var(--r-full); font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--border-subtle); background: var(--surface-container);
  color: var(--on-surface); cursor: pointer; transition: all 0.15s;
}
.chip:hover { background: var(--surface-variant); }
.chip.active { background: var(--primary-container); color: var(--on-primary); border-color: transparent; }

/* ── Pagination ─────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 0.25rem; padding: 1rem; border-top: 1px solid var(--border-subtle); }
.page-btn { min-width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); font-size: 0.875rem; font-weight: 500; border: 1px solid var(--border-subtle); background: var(--surface-white); color: var(--on-surface); cursor: pointer; transition: all 0.15s; }
.page-btn:hover { background: var(--surface-container-low); }
.page-btn.active { background: var(--primary-container); color: var(--on-primary); border-color: var(--primary-container); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Alerts / Toasts ─────────────────────────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1.25rem; border-radius: var(--r-md); font-size: 0.875rem; margin-bottom: 1rem; }
.alert-success { background: rgba(108,155,52,.1); border: 1px solid rgba(108,155,52,.3); color: #3a5c1a; }
.alert-error   { background: rgba(192,23,30,.08); border: 1px solid rgba(192,23,30,.25); color: var(--error-red); }
.alert-warning { background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25); color: #92400e; }
.alert-info    { background: rgba(59,130,246,.08); border: 1px solid rgba(59,130,246,.2); color: #1e40af; }

/* ── Toast (floating auto-dismissing) ───────────────────────────────────────────────── */
#toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 2.5rem);
}
@media (max-width: 640px) {
  #toast-container {
    top: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
  }
}
.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.9rem 1.15rem 1rem 1.15rem;
  border-radius: 14px;
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: 0 10px 30px -4px rgba(0, 37, 18, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 4px solid var(--primary, #002512);
  overflow: hidden;
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}
.toast.toast-success { border-left-color: #15803d; }
.toast.toast-error   { border-left-color: #dc2626; }
.toast.toast-warning { border-left-color: #d97706; }
.toast.toast-info    { border-left-color: #0284c7; }

.toast-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast.toast-success .toast-icon-wrap { background: #dcfce7; color: #15803d; }
.toast.toast-error .toast-icon-wrap   { background: #fee2e2; color: #dc2626; }
.toast.toast-warning .toast-icon-wrap { background: #fef3c7; color: #d97706; }
.toast.toast-info .toast-icon-wrap    { background: #e0f2fe; color: #0284c7; }

.toast-content {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.toast-title {
  font-weight: 700;
  font-size: 0.875rem;
  color: #0f172a;
  margin-bottom: 0.15rem;
}
.toast-message {
  font-size: 0.825rem;
  color: #475569;
}

.toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem;
  margin-left: auto;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  line-height: 1;
}
.toast-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.25;
  transform-origin: left;
}

.toast.out {
  opacity: 0;
  transform: translateX(110%);
}
@media (max-width: 640px) {
  .toast.out {
    transform: translateY(-20px);
  }
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(110%); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 640px) {
  @keyframes toastSlideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* ── Modals ──────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface-white); border-radius: var(--r-lg); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-modal); }
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-family: var(--font-head); font-size: 1.125rem; font-weight: 600; color: var(--on-surface); }
.modal-close { background: none; border: none; color: var(--on-surface-variant); cursor: pointer; border-radius: var(--r-md); padding: 0.25rem; transition: background 0.15s; }
.modal-close:hover { background: var(--surface-container); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-subtle); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Product cards (storefront) ──────────────────────────────────── */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.product-card { background: var(--surface-white); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow 0.2s, transform 0.2s; position: relative; }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.product-card__img { aspect-ratio: 1; overflow: hidden; background: var(--surface-container-low); }
.product-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .product-card__img img { transform: scale(1.04); }
.product-card__body { padding: 1rem; }
.product-card__cat { font-size: 0.75rem; font-weight: 500; color: var(--on-surface-variant); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.06em; }
.product-card__name { font-family: var(--font-head); font-size: 0.9375rem; font-weight: 600; color: var(--on-surface); margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card__price { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.75rem; }
.product-card__price .current { font-family: var(--font-head); font-size: 1.125rem; font-weight: 700; color: var(--on-surface); }
.product-card__price .original { font-size: 0.875rem; color: var(--outline); text-decoration: line-through; }
.product-card__price .discount { font-size: 0.75rem; font-weight: 700; color: var(--error-red); }
.product-card__actions { display: flex; gap: 0.5rem; }
.product-card__add { flex: 1; background: var(--primary); color: var(--on-primary); border: none; border-radius: var(--r-md); padding: 0.5rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.4rem; transition: background 0.15s; }
.product-card__add:hover { background: var(--surface-tint); }
.product-card__add:disabled { opacity: 0.5; cursor: not-allowed; }
.product-card__wish { width: 38px; height: 38px; background: var(--surface-container-low); border: 1px solid var(--border-subtle); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--on-surface-variant); transition: all 0.15s; }
.product-card__wish:hover { background: var(--error-container); color: var(--error-red); border-color: var(--error-red); }
.product-card__badge { position: absolute; top: 0.75rem; left: 0.75rem; background: var(--error-red); color: white; font-size: 0.6875rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: var(--r-full); }

/* ── Ratings ──────────────────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; color: #F59E0B; font-size: 18px; }
.stars .empty { color: var(--surface-container-high); }

/* ── Admin sidebar ───────────────────────────────────────────────── */
.admin-sidebar {
  position: fixed; left: 0; top: 0; width: var(--sidebar-w); height: 100vh;
  background: var(--surface-white); border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; padding: 1.5rem 1rem; z-index: 50;
  overflow-y: auto;
}
.admin-sidebar__brand { margin-bottom: 2rem; padding: 0 0.5rem; }
.admin-sidebar__brand-name { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--primary); display: block; }
.admin-sidebar__brand-sub  { font-size: 0.75rem; color: var(--on-surface-variant); margin-top: 0.125rem; }
.admin-sidebar__user { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem; background: var(--surface-container-low); border-radius: var(--r-md); margin-bottom: 1.5rem; }
.admin-sidebar__user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-fixed); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.875rem; color: var(--on-primary-fixed-variant); flex-shrink: 0; overflow: hidden; }
.admin-sidebar__user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-sidebar__user-name { font-size: 0.875rem; font-weight: 600; color: var(--on-surface); line-height: 1.2; }
.admin-sidebar__user-role { font-size: 0.75rem; color: var(--on-surface-variant); }
.admin-nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.admin-nav-group-label { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--outline); padding: 0.75rem 0.75rem 0.25rem; }
.admin-nav-item {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 0.75rem;
  border-radius: var(--r-md); font-size: 0.875rem; font-weight: 500; color: var(--on-surface-variant);
  transition: background 0.15s, color 0.15s; text-decoration: none; position: relative;
}
.admin-nav-item:hover { background: var(--surface-container-highest); color: var(--on-surface); }
.admin-nav-item.active { background: var(--secondary-container); color: var(--on-secondary-container); font-weight: 700; }
.admin-nav-item .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
.admin-nav-item .nav-badge { margin-left: auto; background: var(--error-red); color: white; font-size: 0.625rem; font-weight: 800; min-width: 18px; height: 18px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.admin-sidebar__footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar__cta { background: var(--primary); color: var(--on-primary); border: none; border-radius: var(--r-md); padding: 0.625rem 1rem; font-size: 0.875rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; transition: background 0.15s; margin-bottom: 0.5rem; }
.admin-sidebar__cta:hover { background: var(--surface-tint); }

/* ── Admin topbar ────────────────────────────────────────────────── */
.admin-topbar {
  background: var(--surface-white); border-bottom: 1px solid var(--border-subtle);
  height: 4rem; position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
}
.admin-topbar__title { font-family: var(--font-head); font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.admin-topbar__search { position: relative; }
.admin-topbar__search input { background: var(--surface-container-low); border: 1px solid var(--border-subtle); border-radius: var(--r-md); padding: 0.5rem 1rem 0.5rem 2.5rem; font-size: 0.875rem; width: 280px; outline: none; transition: border-color 0.15s; }
.admin-topbar__search input:focus { border-color: var(--primary-container); }
.admin-topbar__search .material-symbols-outlined { position: absolute; left: 0.625rem; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--on-surface-variant); pointer-events: none; }
.admin-topbar__actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: none; border: none; color: var(--on-surface-variant); cursor: pointer; transition: background 0.15s; }
.icon-btn:hover { background: var(--surface-container-low); color: var(--primary); }
.icon-btn .material-symbols-outlined { font-size: 22px; }
.admin-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--primary-fixed); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem; color: var(--on-primary-fixed-variant); overflow: hidden; cursor: pointer; border: 2px solid var(--border-subtle); }
.admin-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ── Admin main area ─────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; background: var(--background-off-white); }
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; max-height: 100vh; overflow: hidden; }
.admin-content { flex: 1; overflow-y: auto; padding: var(--gutter); }
.admin-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.admin-page-header__title { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; color: var(--on-surface); }
.admin-page-header__sub { font-size: 0.875rem; color: var(--on-surface-variant); margin-top: 0.25rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

/* ── Public header (storefront) ──────────────────────────────────── */
.site-header {
  background: var(--surface); border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 40; height: 4rem;
}
.site-header__inner { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); height: 100%; display: flex; align-items: center; gap: 2rem; }
.site-logo { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--primary); white-space: nowrap; flex-shrink: 0; }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { font-size: 0.875rem; font-weight: 500; color: var(--on-surface-variant); transition: color 0.15s; padding-bottom: 0.125rem; }
.site-nav a:hover, .site-nav a.active { color: var(--primary); }
.site-nav a.active { border-bottom: 2px solid var(--primary); font-weight: 700; }
.header-search { flex: 1; max-width: 480px; position: relative; }
.header-search input { width: 100%; border: 1px solid var(--border-subtle); border-radius: var(--r-full); padding: 0.5rem 1rem 0.5rem 2.5rem; font-size: 0.875rem; background: var(--surface-white); outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(0,37,18,.1); }
.header-search .material-symbols-outlined { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--on-surface-variant); pointer-events: none; }
.header-actions { display: flex; align-items: center; gap: 0.25rem; margin-left: auto; }
.cart-btn { position: relative; }
.cart-badge { position: absolute; top: -4px; right: -4px; background: var(--brand-red); color: white; font-size: 0.625rem; font-weight: 800; min-width: 16px; height: 16px; border-radius: var(--r-full); display: flex; align-items: center; justify-content: center; border: 2px solid white; }

/* ── Mobile bottom nav ───────────────────────────────────────────── */
.mobile-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: var(--surface); border-top: 1px solid var(--border-subtle); box-shadow: 0 -4px 12px rgba(0,0,0,.06); z-index: 50; padding: 0.5rem 1rem; border-radius: 1rem 1rem 0 0; }
.mobile-nav__items { display: flex; justify-content: space-around; }
.mobile-nav__item { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; padding: 0.375rem 0.75rem; border-radius: var(--r-md); font-size: 0.6875rem; font-weight: 500; color: var(--on-surface-variant); text-decoration: none; transition: all 0.15s; }
.mobile-nav__item.active { background: var(--primary-container); color: var(--on-primary-container); }
.mobile-nav__item .material-symbols-outlined { font-size: 24px; }

/* ── Public footer ───────────────────────────────────────────────── */
.site-footer { background: var(--surface-container-highest); border-top: 1px solid var(--border-subtle); }
.footer-main { max-width: var(--container-max); margin-inline: auto; padding: 3rem var(--gutter); display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 3rem; }
.footer-brand__name { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.footer-brand__desc { font-size: 0.875rem; color: var(--on-surface-variant); line-height: 1.6; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.75rem; }
.footer-social-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-subtle); background: var(--surface-white); display: flex; align-items: center; justify-content: center; color: var(--on-surface-variant); font-size: 16px; transition: all 0.15s; }
.footer-social-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.footer-col__title { font-family: var(--font-head); font-size: 0.875rem; font-weight: 700; color: var(--on-surface); margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links a { font-size: 0.875rem; color: var(--on-surface-variant); transition: color 0.15s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border-subtle); padding: 1.25rem var(--gutter); max-width: var(--container-max); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; font-size: 0.875rem; color: var(--on-surface-variant); }

/* ── Cart drawer ─────────────────────────────────────────────────── */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80; display: none; }
.drawer-overlay.open { display: block; }
.cart-drawer { position: fixed; right: 0; top: 0; width: 420px; max-width: 100vw; height: 100vh; background: var(--surface-white); box-shadow: var(--shadow-modal); z-index: 90; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.3s ease; }
.cart-drawer.open { transform: translateX(0); }
.cart-drawer__header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; justify-content: space-between; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.cart-drawer__footer { padding: 1.25rem 1.5rem; border-top: 1px solid var(--border-subtle); }
.cart-item { display: flex; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--border-subtle); }
.cart-item__img { width: 64px; height: 64px; border-radius: var(--r-md); overflow: hidden; background: var(--surface-container-low); flex-shrink: 0; border: 1px solid var(--border-subtle); }
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__name { font-size: 0.875rem; font-weight: 600; color: var(--on-surface); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__price { font-family: var(--font-head); font-size: 0.875rem; font-weight: 700; color: var(--primary); }
.cart-item__qty { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.qty-btn { width: 28px; height: 28px; border-radius: var(--r-md); border: 1px solid var(--border-subtle); background: var(--surface-container-low); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; color: var(--on-surface); transition: all 0.15s; }
.qty-btn:hover { background: var(--surface-container); }
.qty-val { font-weight: 600; font-size: 0.875rem; min-width: 24px; text-align: center; }

/* ── Checkout steps ─────────────────────────────────────────────── */
.checkout-steps { display: flex; align-items: center; margin-bottom: 2rem; position: relative; }
.checkout-steps::before { content:''; position: absolute; left: 0; right: 0; top: 16px; height: 1px; background: var(--border-subtle); z-index: 0; }
.checkout-step { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.checkout-step__dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700; border: 2px solid var(--border-subtle); background: var(--surface-white); color: var(--on-surface-variant); }
.checkout-step.active .checkout-step__dot { background: var(--primary-container); color: var(--on-primary); border-color: var(--primary-container); }
.checkout-step.done .checkout-step__dot { background: var(--success-leaf); color: white; border-color: var(--success-leaf); }
.checkout-step__label { font-size: 0.75rem; font-weight: 600; color: var(--on-surface-variant); }
.checkout-step.active .checkout-step__label { color: var(--primary); }
.checkout-step.done .checkout-step__label { color: var(--success-leaf); }

/* ── Payment method selector ─────────────────────────────────────── */
.pay-method { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1.5px solid var(--border-subtle); border-radius: var(--r-md); cursor: pointer; transition: all 0.15s; background: var(--surface-white); margin-bottom: 0.75rem; }
.pay-method:hover { border-color: var(--outline); }
.pay-method.selected { border-color: var(--primary-container); background: rgba(4,61,33,.04); }
.pay-method__icon { width: 44px; height: 44px; border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex-shrink: 0; }
.pay-method__info { flex: 1; }
.pay-method__name { font-weight: 600; font-size: 0.875rem; color: var(--on-surface); }
.pay-method__sub  { font-size: 0.75rem; color: var(--on-surface-variant); margin-top: 0.125rem; }
.pay-ussd-box { background: var(--surface-container-low); border: 1px dashed var(--outline); border-radius: var(--r-md); padding: 1rem 1.25rem; margin-top: 0.75rem; text-align: center; display: none; }
.pay-ussd-box.show { display: block; }
.pay-ussd-code { font-family: monospace; font-size: 1.125rem; font-weight: 700; color: var(--primary); letter-spacing: 0.05em; margin: 0.5rem 0; }

/* ── Tracking steps ──────────────────────────────────────────────── */
.track-steps { display: flex; align-items: flex-start; gap: 0; }
.track-step { flex: 1; text-align: center; position: relative; }
.track-step::before { content:''; position: absolute; left: 50%; right: -50%; top: 15px; height: 2px; background: var(--border-subtle); z-index: 0; }
.track-step:last-child::before { display: none; }
.track-step.done::before { background: var(--success-leaf); }
.track-step__dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border-subtle); background: var(--surface-white); display: flex; align-items: center; justify-content: center; margin: 0 auto 0.5rem; position: relative; z-index: 1; color: var(--on-surface-variant); font-size: 16px; }
.track-step.done .track-step__dot { background: var(--success-leaf); border-color: var(--success-leaf); color: white; }
.track-step.active .track-step__dot { background: var(--primary-container); border-color: var(--primary-container); color: white; box-shadow: 0 0 0 4px rgba(4,61,33,.12); }
.track-step__label { font-size: 0.6875rem; font-weight: 600; color: var(--on-surface-variant); }
.track-step.done .track-step__label, .track-step.active .track-step__label { color: var(--primary); }

/* ── Vendor dashboard specific ────────────────────────────────────── */
.vendor-layout { display: flex; min-height: 100vh; }
.vendor-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* ── Trust indicators ────────────────────────────────────────────── */
.trust-bar { background: var(--surface-container-low); border-bottom: 1px solid var(--border-subtle); padding: 0.875rem 0; }
.trust-bar__inner { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--gutter); display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; text-align: center; }
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 0.375rem; }
.trust-item .material-symbols-outlined { font-size: 28px; color: var(--primary); }
.trust-item__title { font-size: 0.875rem; font-weight: 600; color: var(--on-surface); }
.trust-item__sub   { font-size: 0.75rem; color: var(--on-surface-variant); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .admin-sidebar, .vendor-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
  .admin-sidebar.open, .vendor-sidebar.open { transform: translateX(0); }
  .admin-main, .vendor-main { margin-left: 0; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-search { display: none; }
  .mobile-nav { display: block; }
  main { padding-bottom: 5rem; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.875rem; }
  .footer-main { grid-template-columns: 1fr; gap: 2rem; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .admin-topbar__search { display: none; }
  .admin-content { padding: 1rem; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .trust-bar__inner { grid-template-columns: 1fr; }
}

/* ── Print ───────────────────────────────────────────────────────── */
@media print {
  .admin-sidebar, .site-header, .mobile-nav, .site-footer, .admin-topbar { display: none !important; }
  .admin-main, .admin-content { margin: 0 !important; padding: 0 !important; }
}

/* ── BIDULES STITCH-ALIGNED PAGINATION COMPONENT ──────────────────── */
.bidule-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin: 2.5rem 0 1.5rem;
  width: 100%;
}
@media (min-width: 768px) {
  .bidule-pagination {
    flex-direction: row;
    justify-content: space-between;
  }
}
.pagination-info {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.88rem;
  color: #52665A;
  text-align: center;
}
.pagination-highlight {
  font-weight: 700;
  color: #0D1F17;
}
.pagination-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #ffffff;
  padding: 0.35rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid #E2EAE3;
  box-shadow: 0 2px 6px rgba(13, 31, 23, 0.04);
}
.pagination-nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 40px;
  padding: 0 0.9rem;
  border-radius: 9999px;
  font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  background: #F8FAFC;
  color: #0D1F17;
  border: 1px solid #E2E8F0;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.pagination-nav-btn:hover:not(.is-disabled) {
  background: #F0FDF4;
  color: #0E4327;
  border-color: #BBF7D0;
  transform: translateY(-1px);
}
.pagination-nav-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #F1F5F9;
  color: #94A3B8;
  border-color: #E2E8F0;
}
.pagination-nav-btn .material-symbols-outlined {
  font-size: 1.15rem;
}
.pagination-mobile-counter {
  display: none;
  font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.85rem;
  font-weight: 700;
  color: #0E4327;
  padding: 0 0.5rem;
}
.pagination-numbers-wrap {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.pagination-num {
  min-width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head, 'Plus Jakarta Sans', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  color: #0D1F17;
  background: transparent;
  border: 1px solid transparent;
  transition: all 0.2s;
}
.pagination-num:hover:not(.is-active) {
  background: #F0FDF4;
  color: #0E4327;
  border-color: #BBF7D0;
}
.pagination-num.is-active {
  background: linear-gradient(135deg, #072E1A 0%, #0E4327 100%);
  color: #ffffff;
  border-color: #0E4327;
  box-shadow: 0 4px 10px rgba(14, 67, 39, 0.3);
}
.pagination-ellipsis {
  color: #94A3B8;
  font-weight: 700;
  padding: 0 0.3rem;
  user-select: none;
}
@media (max-width: 640px) {
  .pagination-numbers-wrap {
    display: none;
  }
  .pagination-mobile-counter {
    display: inline-block;
  }
  .pagination-controls {
    width: 100%;
    justify-content: space-between;
  }
  .pagination-nav-btn {
    min-height: 44px;
    padding: 0 1rem;
  }
}

