/* ============================================================
   USA Clean Design System — CSS Tokens & Base Styles
   Source: Figma file 1LKk8R7l2y1QFk28MrmV8o
   ============================================================ */

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

/* --- Tokens --- */
:root {
  /* Brand */
  --color-brand:         #0021a6;
  --color-brand-dark:    #001580;
  --color-brand-text:    #00209f;
  --color-accent:        #efaa22;
  --color-accent-hover:  #d8951a;

  /* Neutrals */
  --color-bg:            #ffffff;
  --color-bg-subtle:     #f5f5f5;
  --color-bg-muted:      #ececec;
  --color-bg-dark:       #1b252d;
  --color-bg-brand:      #0021a6;

  /* Text */
  --color-text:          #131313;
  --color-text-secondary:#222222;
  --color-text-subtle:   #5d5d5d;
  --color-text-muted:    #757575;
  --color-text-inverted: #ffffff;
  --color-text-brand:    #0021a6;
  --color-text-accent:   #efaa22;

  /* Semantic */
  --color-success:       #00a900;
  --color-success-bg:    #e6f7e6;
  --color-warning:       #d97706;
  --color-warning-bg:    #fff7e6;
  --color-error:         #c70e1d;
  --color-error-bg:      #fef2f2;
  --color-low-stock:     #d97706;

  /* Borders */
  --color-border:        #d9d9d9;
  --color-border-subtle: #ececec;

  /* Icons */
  --color-icon:          #1e1e1e;
  --color-icon-brand:    #00209f;
  --color-icon-inverted: #ffffff;

  /* Typography */
  --font-family:         'Open Sans', system-ui, sans-serif;
  --font-weight-regular: 400;
  --font-weight-medium:  500;
  --font-weight-semibold:600;
  --font-weight-bold:    700;

  /* Font sizes */
  --text-2xs:   0.75rem;   /* 12px */
  --text-xs:    0.875rem;  /* 14px */
  --text-sm:    1rem;      /* 16px */
  --text-md:    1.125rem;  /* 18px */
  --text-lg:    1.25rem;   /* 20px */
  --text-xl:    1.5rem;    /* 24px */
  --text-2xl:   2rem;      /* 32px */
  --text-3xl:   2.5rem;    /* 40px */
  --text-4xl:   3rem;      /* 48px */

  /* Line heights */
  --leading-tight:  1.2;
  --leading-snug:   1.3;
  --leading-normal: 1.4;
  --leading-relaxed:1.5;

  /* Spacing */
  --space-1:  0.25rem;   /* 4px */
  --space-2:  0.5rem;    /* 8px */
  --space-3:  0.75rem;   /* 12px */
  --space-4:  1rem;      /* 16px */
  --space-5:  1.25rem;   /* 20px */
  --space-6:  1.5rem;    /* 24px */
  --space-8:  2rem;      /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */

  /* Border radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs:   0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm:   0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:   0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl:   0 16px 40px rgba(0,0,0,0.14);

  /* Layout */
  --container-max:  1440px;
  --container-pad:  5rem;   /* 80px side margins */
  --container-sm:   768px;
  --sidebar-width:  240px;
  --header-height:  64px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 320ms ease;

  /* Z-index */
  --z-dropdown:  200;
  --z-sticky:    300;
  --z-overlay:   400;
  --z-modal:     500;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-sm); }

.text-2xs   { font-size: var(--text-2xs); }
.text-xs    { font-size: var(--text-xs); }
.text-sm    { font-size: var(--text-sm); }
.text-md    { font-size: var(--text-md); }
.text-lg    { font-size: var(--text-lg); }
.text-xl    { font-size: var(--text-xl); }
.text-brand { color: var(--color-text-brand); }
.text-accent{ color: var(--color-accent); }
.text-subtle{ color: var(--color-text-subtle); }
.text-muted { color: var(--color-text-muted); }
.text-inverted { color: var(--color-text-inverted); }
.text-bold  { font-weight: var(--font-weight-bold); }
.text-semibold { font-weight: var(--font-weight-semibold); }
.text-medium   { font-weight: var(--font-weight-medium); }
.text-right { text-align: right; }
.text-center{ text-align: center; }

/* --- Utility --- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.grid { display: grid; }
.w-full { width: 100%; }
.relative { position: relative; }
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-full { border-radius: var(--radius-full); }
.border { border: 1px solid var(--color-border); }
.border-brand { border-color: var(--color-brand); }
.bg-brand { background: var(--color-brand); }
.bg-accent { background: var(--color-accent); }
.bg-subtle { background: var(--color-bg-subtle); }
.bg-dark { background: var(--color-bg-dark); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Announcement Bar --- */
.announcement-bar {
  background: #0D1A4D;
  color: rgba(255,255,255,0.85);
  font-size: var(--text-2xs);
  padding: var(--space-2) var(--container-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.announcement-bar__left { display: flex; align-items: center; gap: var(--space-4); }
.announcement-bar__sep { opacity: 0.3; }
.announcement-bar__phone { font-weight: var(--font-weight-semibold); color: var(--color-accent); }
.announcement-bar__right { display: flex; align-items: center; gap: var(--space-5); margin-left: auto; }
.announcement-bar__right a { opacity: 0.8; transition: opacity var(--transition-fast); font-size: var(--text-2xs); }
.announcement-bar__right a:hover { opacity: 1; }

/* --- Header --- */
.site-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-4) var(--container-pad);
  height: 72px;
}
.site-header__logo { flex-shrink: 0; display: flex; align-items: center; }
.site-header__logo-img { height: 52px; width: auto; display: block; }

.site-header__search {
  flex: 1;
  max-width: 640px;
  display: flex;
  align-items: stretch;
  height: 51px;
  background: #f4f5f7;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.site-header__search:focus-within {
  border-color: var(--color-brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,33,166,0.08);
}
.site-header__search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: transparent;
  height: 100%;
}
.site-header__search-input::placeholder { color: var(--color-text-muted); }
.site-header__search-btn {
  background: var(--color-accent);
  color: #131313;
  border: none;
  padding: 0 var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  white-space: nowrap;
  height: 100%;
}
.site-header__search-btn:hover { background: var(--color-accent-hover); }

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  flex-shrink: 0;
}
.site-header__user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: background var(--transition-fast);
  min-width: 200px;
  justify-content: space-between;
}
.site-header__user:hover { background: var(--color-bg-subtle); }
.site-header__avatar {
  width: 32px; height: 32px;
  background: var(--color-brand);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  color: #fff;
  flex-shrink: 0;
}
.site-header__user-info { line-height: 1.2; flex: 1; }
.site-header__user-name { font-weight: var(--font-weight-semibold); font-size: var(--text-xs); color: var(--color-text); }
.site-header__user-acct { font-size: var(--text-2xs); color: var(--color-text-muted); }
.site-header__chevron { flex-shrink: 0; opacity: 0.5; color: var(--color-text-muted); }

.site-header__icon-btn {
  position: relative;
  color: var(--color-text-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}
.site-header__icon-btn:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.badge {
  position: absolute;
  top: 0; right: 0;
  background: var(--color-accent);
  color: #131313;
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  width: 16px; height: 16px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  transform: translate(30%, -30%);
}
.site-header__cart {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-brand);
  border: none;
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.site-header__cart:hover { background: var(--color-brand-dark); }
.site-header__cart-badge {
  background: var(--color-accent);
  color: #131313;
  padding: 1px 6px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

/* --- Primary Nav --- */
.primary-nav {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.primary-nav__inner {
  display: flex;
  align-items: center;
  padding: 0 var(--container-pad);
  height: 44px;
  gap: var(--space-1);
}
.primary-nav__item {
  position: relative;
  color: var(--color-brand);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.primary-nav__item:hover, .primary-nav__item.active {
  color: var(--color-brand);
  background: var(--color-bg-subtle);
}
.primary-nav__item.active { font-weight: var(--font-weight-bold); }
.primary-nav__item--new::after {
  content: 'NEW';
  font-size: 9px;
  font-weight: 700;
  background: var(--color-accent);
  color: #131313;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}
.primary-nav__cta {
  margin-left: auto;
  color: var(--color-brand);
  font-size: var(--text-xs);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
}
.primary-nav__cta:hover { color: var(--color-brand-dark); }

/* --- Section Heading --- */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}
.section-header__label {
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-1);
}
.section-header__title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
}
.section-header__desc {
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
  margin-top: var(--space-1);
}
.section-header__link {
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-brand);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.section-header__link:hover { text-decoration: underline; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border: none;
  text-decoration: none;
  line-height: 1;
  letter-spacing: -0.01em;
}
.btn-sm { height: 36px; padding: 0 var(--space-4); font-size: var(--text-xs); }
.btn-xs { height: 28px; padding: 0 var(--space-3); font-size: var(--text-2xs); }
.btn-lg { height: 52px; padding: 0 var(--space-6); font-size: var(--text-md); }
.btn-xl { height: 60px; padding: 0 var(--space-8); font-size: var(--text-md); }
.btn-full { width: 100%; }

.btn-primary { background: var(--color-accent); color: #131313; }
.btn-primary:hover { background: var(--color-accent-hover); }

.btn-brand { background: var(--color-brand); color: #fff; }
.btn-brand:hover { background: var(--color-brand-dark); }

/* State: just-added confirmation flash (toggled via JS for ~1.4s after add-to-cart). */
.btn.is-added,
.btn.is-added:hover {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.btn-outline {
  background: transparent;
  color: var(--color-brand);
  border: 1.5px solid var(--color-brand);
}
.btn-outline:hover { background: rgba(0,33,166,0.06); }

.btn-outline-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.5);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--color-text-subtle);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover { background: var(--color-bg-subtle); border-color: #c0c0c0; }

.btn-text {
  background: none; border: none; padding: 0; height: auto;
  color: var(--color-brand);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-xs);
}
.btn-text:hover { text-decoration: underline; }

.btn-danger { background: var(--color-error); color: #fff; }
.btn-danger:hover { background: #a80c18; }

.btn-icon { padding: 0; width: 44px; }
.btn-icon.btn-sm { width: 36px; }
.btn-icon.btn-xs { width: 28px; }

/* --- Status Pills / Badges --- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.03em;
  line-height: 1.4;
}
.pill-success { background: var(--color-success-bg); color: var(--color-success); }
.pill-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.pill-error   { background: var(--color-error-bg); color: var(--color-error); }
.pill-brand   { background: rgba(0,33,166,0.08); color: var(--color-brand); }
.pill-neutral { background: var(--color-bg-muted); color: var(--color-text-subtle); }
.pill-accent  { background: rgba(239,170,34,0.15); color: #9a6800; }
.pill-dark    { background: var(--color-text); color: #fff; }

.stock-badge { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 3px; letter-spacing: 0.04em; flex-shrink: 0; }
.stock-in    { background: var(--color-success-bg); color: #15692a; }
.stock-low   { background: var(--color-warning-bg); color: #92400e; }
.stock-out   { background: var(--color-error-bg);   color: #991b1b; }
.stock-back  { background: #f3f4f6; color: #374151; }

/* --- Cards --- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-md); border-color: #c0c0c0; }
.card-flat { box-shadow: none; }
.card-flat:hover { box-shadow: var(--shadow-sm); }

/* --- Product Card --- */
.product-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: #c0c0c0; }

.product-card__badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  z-index: 2;
}
.product-card__badge-oem {
  background: var(--color-brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.product-card__badge-sub {
  background: var(--color-accent);
  color: #131313;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.product-card__badge-new {
  background: #111;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.product-card__wishlist {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 2;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-subtle);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.product-card__wishlist:hover { color: var(--color-error); background: #fff; }

.product-card__image {
  aspect-ratio: 1;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card__image img { width: 100%; height: 100%; object-fit: contain; padding: var(--space-4); }
.product-card__image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #ccc;
}

.product-card__body { padding: var(--space-4); flex: 1; display: flex; flex-direction: column; gap: var(--space-2); }
.product-card__sku { font-size: var(--text-2xs); color: var(--color-text-muted); }
.product-card__name { font-size: var(--text-xs); font-weight: var(--font-weight-semibold); color: var(--color-text); line-height: var(--leading-snug); }
.product-card__name:hover { color: var(--color-brand); }
.product-card__compat { font-size: var(--text-2xs); color: var(--color-text-subtle); }
.product-card__footer { margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--color-border-subtle); display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-2); flex-wrap: nowrap; }
.product-card__price { font-size: var(--text-md); font-weight: var(--font-weight-bold); color: var(--color-text); }
.product-card__price-auto { font-size: var(--text-xs); color: var(--color-text-subtle); }
.product-card__price-auto span { color: var(--color-brand); font-weight: var(--font-weight-semibold); }
.product-card__stock { font-size: var(--text-2xs); font-weight: 700; }
.product-card__action { display: flex; gap: var(--space-2); align-items: center; margin-top: var(--space-2); }

/* --- Machine Card --- */
.machine-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}
.machine-card:hover { box-shadow: var(--shadow-md); border-color: var(--color-brand); }
.machine-card__image {
  aspect-ratio: 4/3;
  background: var(--color-bg-dark);
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.machine-card__status-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
}
.machine-card__status-badge.sub { background: var(--color-brand); color: #fff; }
.machine-card__status-badge.attn { background: var(--color-accent); color: #131313; }
.machine-card__overflow {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 28px; height: 28px;
  background: rgba(0,0,0,0.5);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  cursor: pointer;
}
.machine-card__body { padding: var(--space-3) var(--space-4); flex: 1; }
.machine-card__brand { font-size: var(--text-2xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.machine-card__model { font-size: var(--text-sm); font-weight: var(--font-weight-bold); margin-top: 2px; }
.machine-card__meta { font-size: var(--text-2xs); color: var(--color-text-subtle); margin-top: var(--space-1); display: flex; align-items: center; gap: var(--space-2); }
.machine-card__due {
  margin-top: var(--space-3);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-2xs);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.machine-card__due.overdue { background: var(--color-error-bg); color: var(--color-error); }
.machine-card__due.ok { background: var(--color-success-bg); color: var(--color-success); }
.machine-card__footer { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border-subtle); display: flex; align-items: center; gap: var(--space-2); }

/* --- Image Placeholder --- */
.img-placeholder {
  background: var(--color-bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  border-radius: var(--radius-sm);
}
.img-placeholder svg { opacity: 0.4; }

/* --- Form elements --- */
.input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-bg);
  outline: none;
  transition: border-color var(--transition-fast);
}
.input:focus { border-color: var(--color-brand); box-shadow: 0 0 0 3px rgba(0,33,166,0.1); }
.input::placeholder { color: var(--color-text-muted); }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%235d5d5d' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.input-group { display: flex; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); border-right: none; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; flex-shrink: 0; }

/* --- Checkbox --- */
.checkbox { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.checkbox input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--color-brand); cursor: pointer; }
.checkbox__label { font-size: var(--text-xs); color: var(--color-text); }

/* --- Divider --- */
.divider { border: none; border-top: 1px solid var(--color-border); margin: var(--space-6) 0; }

/* --- Stats bar --- */
.stats-bar { display: flex; gap: 0; }
.stat-item {
  flex: 1;
  padding: var(--space-4) var(--space-6);
  border-right: 1px solid var(--color-border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-item__value { font-size: var(--text-xl); font-weight: var(--font-weight-bold); color: var(--color-text); }
.stat-item__label { font-size: var(--text-2xs); color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-top: var(--space-1); }

/* --- Alert / Notification Banner --- */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
}
.alert-warning { background: var(--color-warning-bg); color: var(--color-warning); border: 1px solid #fde68a; }
.alert-success { background: var(--color-success-bg); color: var(--color-success); border: 1px solid #86efac; }
.alert-brand   { background: rgba(0,33,166,0.06); color: var(--color-brand); border: 1px solid rgba(0,33,166,0.2); }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* --- Tabs --- */
.tabs { display: flex; border-bottom: 2px solid var(--color-border); gap: 0; }
.tab {
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-subtle);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  white-space: nowrap;
}
.tab:hover { color: var(--color-text); }
.tab.active { color: var(--color-brand); font-weight: var(--font-weight-semibold); border-bottom-color: var(--color-brand); }

/* --- Footer --- */
.site-footer {
  background: #0D1A4D;
  color: rgba(255,255,255,0.8);
  padding: var(--space-16) var(--container-pad) var(--space-8);
  margin-top: var(--space-16);
}
.site-footer__logo { height: 26px; display: block; margin-bottom: var(--space-3); }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.site-footer__brand p { font-size: var(--text-xs); opacity: 0.7; margin-top: var(--space-3); line-height: 1.6; max-width: 280px; }
.site-footer__email-row { display: flex; margin-top: var(--space-4); gap: 0; }
.site-footer__email-input {
  flex: 1; padding: var(--space-2) var(--space-3);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: #fff;
  font-size: var(--text-xs);
  outline: none;
}
.site-footer__email-input::placeholder { color: rgba(255,255,255,0.4); }
.site-footer__email-btn {
  background: var(--color-accent);
  border: none;
  color: #131313;
  padding: var(--space-2) var(--space-4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}
.site-footer__col-title { color: #fff; font-size: var(--text-xs); font-weight: var(--font-weight-bold); margin-bottom: var(--space-4); text-transform: uppercase; letter-spacing: 0.06em; }
.site-footer__links { display: flex; flex-direction: column; gap: var(--space-3); }
.site-footer__links a { font-size: var(--text-xs); opacity: 0.7; transition: opacity var(--transition-fast); }
.site-footer__links a:hover { opacity: 1; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-2xs);
  opacity: 0.5;
}
.site-footer__bottom-links { display: flex; gap: var(--space-4); }

/* --- Scrollable row --- */
.scroll-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding-bottom: var(--space-3);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-track { background: var(--color-bg-subtle); border-radius: 2px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 2px; }
.scroll-row > * { scroll-snap-align: start; flex-shrink: 0; }

/* --- Quantity Stepper --- */
.qty-stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-stepper__btn {
  width: 32px; height: 32px;
  background: var(--color-bg-subtle);
  color: var(--color-text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: var(--text-md);
  transition: background var(--transition-fast);
  border: none;
}
.qty-stepper__btn:hover { background: var(--color-bg-muted); }
.qty-stepper__input {
  width: 44px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  padding: 0;
  height: 32px;
  outline: none;
}

/* --- Dropdown --- */
.dropdown { position: relative; display: inline-block; }
.dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: var(--z-dropdown);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: all var(--transition-fast);
}
.dropdown:hover .dropdown__menu,
.dropdown.open .dropdown__menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown__item {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.dropdown__item:hover { background: var(--color-bg-subtle); }

/* --- Responsive --- */
@media (max-width: 1200px) {
  :root { --container-pad: 2rem; }
}
@media (max-width: 768px) {
  :root { --container-pad: 1rem; }
  .primary-nav__inner { overflow-x: auto; gap: 0; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: var(--text-2xl); }
}
