/* ──────────────────────────────────────────────────────────────────────────────
   MembersOnlyShopSupplies.com — Design System
   Brand: Industrial Black · Brand Red · Hazard Yellow
   "The Only Factory Direct Warehouse Serving Auto Body Shops and Technicians"
   ────────────────────────────────────────────────────────────────────────────── */

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

/* ── CSS Custom Properties ───────────────────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:        #F8F8F8;
  --surface:   #FFFFFF;
  --surface-2: #F2F2F2;

  /* Text */
  --text:      #111111;
  --muted:     #555555;
  --border:    #CCCCCC;

  /* Brand Black (header, footer, badges) */
  --brand-black:       #111111;
  --brand-black-hover: #222222;

  /* Brand Red (primary actions, links) */
  --primary:       #CC1F1F;
  --primary-hover: #A81A1A;

  /* Hazard Yellow (savings, member pricing, CTAs) */
  --accent:        #F5C518;
  --accent-hover:  #D4AC10;
  --accent-text:   #111111; /* text on yellow backgrounds */

  /* Status */
  --success: #15803D;
  --warning: #D97706;
  --danger:  #DC2626;
  --info:    #0369A1;

  /* Radius — slightly sharper for industrial feel */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Layout */
  --container: 1280px;
  --transition: 150ms ease;
}

/* ── Reset ───────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

/* ── Typography ──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.125rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p { color: var(--muted); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.8125rem; }
.text-muted  { color: var(--muted); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-white  { color: #fff; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }
.font-black  { font-weight: 900; }
.sku         { font-size: 0.8125rem; font-weight: 700; color: var(--muted); letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.uppercase   { text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Container & Layout ──────────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ── Responsive 2-column grid — stacks on mobile ─────────────────────────────── */
.grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .grid-2col { grid-template-columns: 1fr; } }

.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1  { gap: 4px; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.gap-6  { gap: 24px; }
.gap-8  { gap: 32px; }

.grid   { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Spacing */
.mt-2 { margin-top: 8px; }   .mt-4 { margin-top: 16px; }   .mt-6 { margin-top: 24px; }   .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.p-4  { padding: 16px; }  .p-6  { padding: 24px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-12{ padding-top: 48px; padding-bottom: 48px; }
.py-16{ padding-top: 64px; padding-bottom: 64px; }
.py-20{ padding-top: 80px; padding-bottom: 80px; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.875rem;
}
.btn-sm { padding: 7px 14px; font-size: 0.8125rem; }
.btn-lg { padding: 14px 28px; font-size: 0.9375rem; }

/* Primary = Brand Red */
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }

/* Accent = Hazard Yellow */
.btn-accent { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }

/* Black */
.btn-dark { background: var(--brand-black); color: #fff; border-color: var(--brand-black); }
.btn-dark:hover { background: #333; border-color: #333; color: #fff; }

/* Secondary = white/outlined */
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--surface-2); border-color: #aaa; color: var(--text); }

/* Ghost */
.btn-ghost { background: transparent; color: var(--primary); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.9; }

/* Force white text on red-background buttons (anchors inherit color: var(--primary) otherwise) */
a.btn-primary, a.btn-primary:hover, a.btn-primary:focus,
a.btn-danger, a.btn-danger:hover, a.btn-danger:focus { color: #fff; }
a.btn-dark, a.btn-dark:hover, a.btn-dark:focus { color: #fff; }

/* Utility: red background sections — ensures all nested text is white */
.bg-primary { background: var(--primary); color: #fff; }
.bg-primary a:not(.btn) { color: #fff; text-decoration: underline; }
.bg-primary p, .bg-primary li, .bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary span { color: inherit; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  overflow-wrap: break-word;
  word-break: break-word;
  min-width: 0;
}
.card-body   { padding: 24px; overflow-wrap: break-word; word-break: break-word; }
.card-header { padding: 14px 24px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .9375rem; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); }

/* ── Badges ──────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-primary { background: #FEE2E2; color: var(--primary); }
.badge-accent  { background: var(--accent); color: var(--accent-text); }
.badge-success { background: #F0FDF4; color: var(--success); }
.badge-warning { background: #FFFBEB; color: var(--warning); }
.badge-danger  { background: #FEF2F2; color: var(--danger); }
.badge-dark    { background: var(--brand-black); color: #fff; }
.badge-muted   { background: var(--surface-2); color: var(--muted); }
.badge-savings { background: var(--accent); color: var(--accent-text); border: 1px solid var(--accent-hover); }
.badge-member  { background: var(--primary); color: #fff; }

/* ── Form Inputs ─────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-label { font-size: 0.875rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .04em; }
.form-label .required { color: var(--primary); margin-left: 2px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
/* Shorthand .input alias used in admin view forms */
.input {
  display: block;
  width: 100%;
  padding: 9px 13px;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204,31,31,.1);
}
select.input { appearance: auto; }
textarea.input { resize: vertical; min-height: 80px; }

.form-textarea { resize: vertical; min-height: 100px; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(204, 31, 31, 0.12);
}
.form-input.error, .form-select.error, .form-textarea.error { border-color: var(--danger); }
.form-help  { font-size: 0.8125rem; color: var(--muted); }
.form-error { font-size: 0.8125rem; color: var(--danger); font-weight: 600; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; cursor: pointer; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute; inset: 0;
  background: #9CA3AF;
  border: 2px solid #6B7280;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--primary-hover); }
.toggle input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle:focus-within .toggle-slider { outline: 2px solid var(--primary); outline-offset: 2px; }
.toggle-wrap { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.toggle-label { font-size: .9375rem; font-weight: 600; color: var(--text); }

/* ── Flash / Alerts ──────────────────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  border-left: 4px solid;
}
.alert-success { background: #F0FDF4; color: var(--success); border-color: var(--success); }
.alert-error   { background: #FEF2F2; color: var(--danger);  border-color: var(--danger); }
.alert-warning { background: #FFFBEB; color: var(--warning); border-color: var(--warning); }
.alert-info    { background: #EFF6FF; color: var(--info);    border-color: var(--info); }
.alert-dismiss {
  margin-left: auto; background: none; border: none;
  color: inherit; opacity: .5; cursor: pointer; padding: 0; font-size: 1.2rem; line-height: 1;
}
.alert-dismiss:hover { opacity: 1; }

/* ── HEADER — White with dark text ──────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 2px 0 var(--primary);
}

/* Desktop grid: logo | center content | kas apple */
.header-grid {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 24px;
}

/* Logo — spans both rows */
.site-header .site-logo {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  padding: 6px 0;
}

/* Mobile hamburger — hidden on desktop, positioned by mobile media query */
.site-header .mobile-menu-btn { display: none; }

/* Nav — center column, row 1 on desktop */
.site-header .site-nav {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

/* Row 2: shop + search — center column, row 2 */
.header-row2 {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0 8px;
  border-top: 1px solid #e0e0e0;
}
.header-row2__shop {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 2px;
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary);
  background: none;
  border: none;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--transition);
}
.header-row2__shop:hover { color: #111; }
.header-row2__shop.active { color: #111; }
.header-row2__shop svg { stroke: currentColor; }
.header-row2 .header-search--big { flex: 1; max-width: calc(100% - 200px); }
.header-row2 .header-search--big input { padding: 8px 16px 8px 40px; font-size: .9rem; }

/* Kas Apple branding — spans both rows, stacked vertically */
.kas-apple-header {
  grid-column: 3;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 2px;
  padding: 6px 0;
}
.kas-apple-header img { height: 68px; width: auto; }
.kas-apple-header span {
  font-size: .6rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  line-height: 1;
}

/* Hide mobile-only Shop link on desktop (it's in row 2) */
.site-nav .mobile-only-shop { display: none; }

/* Logo image */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--brand-black);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.site-logo span { color: var(--primary); }
.site-logo img {
  height: 76px;
  width: auto;
  object-fit: contain;
}
/* Fallback text logo if image missing */
.site-logo-text {
  font-size: 1rem;
  font-weight: 900;
  color: var(--brand-black);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-transform: uppercase;
}
.site-logo-text .only { color: var(--accent); }
.site-logo-text .sub  { display: block; font-size: .6rem; font-weight: 600; color: var(--primary); letter-spacing: .1em; margin-top: 1px; }

/* Top bar above nav (tagline strip) */
.header-tagline {
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 0;
}

/* Nav */
.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 7px 13px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.site-nav a:hover {
  color: var(--primary);
  background: rgba(0,0,0,.04);
}
.site-nav a.active {
  color: #fff;
  background: var(--primary);
}

/* Search */
/* Mobile nav search — hidden on desktop, shown only inside the open mobile menu */
.mobile-nav-search { display: none; }
.header-search { flex: 1; max-width: 380px; position: relative; }
.header-search input {
  width: 100%;
  padding: 8px 14px 8px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition), background var(--transition);
}
.header-search input::placeholder { color: var(--muted); }
.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.header-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* Header actions — sits in grid column 2, row 1, pushed right */
.header-actions {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}
.header-icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.header-icon-btn:hover { background: rgba(0,0,0,.05); color: var(--primary); }
.header-icon-btn--active { color: var(--primary); }
.user-online-dot {
  position: absolute; bottom: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #16a34a; border: 2px solid #fff;
  box-sizing: content-box;
}
.header-icon-btn .badge-count {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--primary); color: #fff;
  font-size: .6875rem; font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex; align-items: center; justify-content: center;
}

.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); padding: 8px; }

@media (max-width: 900px) {
  /* Switch from grid to simple flexbox on mobile */
  .header-grid {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 56px;
    flex-wrap: nowrap;
  }
  .site-nav { display: none; }
  .header-row2 { display: none; }
  .kas-apple-header { display: none !important; }
  .site-header .mobile-menu-btn { display: flex; order: 4; }
  .site-header .site-logo { order: 1; flex: 1; padding: 0; }
  .site-logo img { height: 48px; }
  /* Actions visible on mobile — icons + Join Free */
  .header-actions {
    display: flex; order: 3; margin-left: auto;
    grid-column: unset; grid-row: unset; justify-self: unset;
  }
  .header-actions .btn-secondary { display: none; }
  .site-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff;
    border-top: 2px solid var(--primary);
    padding: 12px 16px; gap: 4px;
    box-shadow: var(--shadow-md);
    z-index: 99;
  }
  .site-nav.open a { width: 100%; }
  .site-nav.open .mobile-only-shop { display: block !important; }
  .site-nav.open .mobile-nav-search { display: block; width: 100%; }
}

@media (max-width: 600px) {
  .site-logo img { height: 40px; }
  .header-actions .btn-primary { display: none; }
}

/* ── HERO — Bright Split Layout ──────────────────────────────────────────────── */
.hero {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}
/* When hero has a background image: dark overlay + white text */
.hero.hero-has-image {
  background-size: cover;
  background-position: center;
  border-bottom: none;
}
.hero.hero-has-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, var(--hero-overlay-opacity, 0.55));
  z-index: 1;
}
.hero.hero-has-image .container { position: relative; z-index: 2; }
.hero.hero-has-image h1 { color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero.hero-has-image .hero-sub { color: rgba(255,255,255,.9); text-shadow: 0 1px 4px rgba(0,0,0,.3); }
.hero.hero-has-image .hero-eyebrow { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }
.hero.hero-has-image .hero-trust { border-top-color: rgba(255,255,255,.2); }
.hero.hero-has-image .hero-trust-item { color: rgba(255,255,255,.9); }
.hero.hero-has-image .hero-trust-item svg { color: var(--accent, #F5C518); }

.hero-split {
  display: grid;
  grid-template-columns: 1fr 400px;
  min-height: 460px;
  align-items: stretch;
}

.hero-content {
  padding: 72px 48px 72px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Red accent side panel */
.hero-panel {
  background: var(--primary);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  position: relative;
  overflow: hidden;
}
.hero-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,.08) 0px,
    rgba(0,0,0,.08) 10px,
    transparent 10px,
    transparent 20px
  );
}

.hero-panel-title {
  font-size: 1.125rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .04em;
  position: relative;
  z-index: 1;
}

.hero-price-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  z-index: 1;
}
.hero-price-card .hpc-label {
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 14px;
}
.hero-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 6px;
}
.hero-price-row.member-row {
  background: #FFF0F0;
  border: 1.5px solid #FFBCBC;
}
.hero-price-row.retail-row {
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.hero-price-row.savings-row {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
}
.hpr-label { font-size: .8rem; font-weight: 700; }
.hpr-label.red { color: var(--primary); }
.hpr-label.muted { color: var(--muted); }
.hpr-label.yellow { color: #92600A; }
.hpr-price { font-size: 1.25rem; font-weight: 900; }
.hpr-price.red { color: var(--primary); }
.hpr-price.muted { color: var(--muted); font-size: 1rem; text-decoration: line-through; }
.hpr-price.yellow { color: #92600A; }
.hero-panel-cta { position: relative; z-index: 1; }
.hero-panel-cta a {
  display: block; text-align: center;
  background: var(--accent); color: var(--accent-text);
  font-weight: 800; font-size: .875rem; text-transform: uppercase; letter-spacing: .05em;
  padding: 12px 20px; border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.hero-panel-cta a:hover { background: var(--accent-hover); transform: translateY(-1px); }
.hero-panel-note { font-size: .75rem; color: rgba(255,255,255,.7); text-align: center; position: relative; z-index: 1; }

/* Content side */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: #FFF0F0;
  color: var(--primary);
  border: 1.5px solid #FFBCBC;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 20px;
  width: fit-content;
}

.hero h1 {
  color: var(--text);
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
  max-width: 560px;
  margin-bottom: 16px;
}
.hero h1 .highlight { color: var(--primary); }

.hero-sub {
  color: var(--muted);
  font-size: clamp(.9375rem, 1.5vw, 1.0625rem);
  max-width: 480px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

/* Trust bar below actions */
.hero-trust {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.hero-trust-item {
  display: flex; align-items: center; gap: 7px;
  font-size: 0.875rem; color: var(--muted); font-weight: 600;
}
.hero-trust-item svg { color: var(--primary); flex-shrink: 0; }

@media (max-width: 1024px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-panel  { display: none; }
  .hero-content { padding: 48px 0; }
}
@media (max-width: 640px) {
  .hero-actions .btn { flex: 1; justify-content: center; min-width: 140px; }
  .hero-trust { gap: 12px; }
}

/* ── Hazard stripe divider ───────────────────────────────────────────────────── */
.hazard-stripe {
  height: 8px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0px,
    var(--accent) 10px,
    var(--brand-black) 10px,
    var(--brand-black) 20px
  );
}

/* ── Section headers ─────────────────────────────────────────────────────────── */
.section-header { margin-bottom: 40px; }
.section-header h2 { margin-bottom: 10px; }
.section-header p  { font-size: 1.0625rem; max-width: 600px; }
.section-header.center { text-align: center; }
.section-header.center p { margin: 0 auto; }

/* Section label (uppercase red) */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  margin-bottom: 8px;
  border-left: 3px solid var(--primary);
  padding-left: 10px;
}

/* ── Product card ────────────────────────────────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #bbb;
}

.product-card-image {
  aspect-ratio: 1;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}
.product-card-image img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
}
.product-card-image .card-badges {
  position: absolute;
  top: 10px; left: 10px;
  display: flex; flex-direction: column; gap: 4px;
}

.product-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.product-card-brand { font-size: 0.7rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.product-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text); line-height: 1.3; }
.product-card-sku   { font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.product-card-desc  { font-size: 0.8125rem; color: var(--muted); line-height: 1.4; }

.product-card-pricing {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--surface-2);
}

.price-member-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.price-label    { font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.price-member   { font-size: 1.125rem; font-weight: 900; color: var(--primary); }
.price-regular  { font-size: 0.8125rem; color: var(--muted); text-decoration: line-through; }
.price-savings  { font-size: 0.75rem; font-weight: 800; background: var(--accent); color: var(--accent-text); padding: 1px 7px; border-radius: var(--radius-pill); }

.product-card-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  background: var(--surface-2);
}
.product-card-footer .btn { flex: 1; justify-content: center; font-size: .8125rem; padding: 8px 12px; }

/* Stock badges */
.stock-in  { color: var(--success); font-size: .8125rem; font-weight: 700; }
.stock-out { color: var(--danger);  font-size: .8125rem; font-weight: 700; }
.stock-low { color: var(--warning); font-size: .8125rem; font-weight: 700; }

/* ── Category card — bright with red left accent ─────────────────────────────── */
.category-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  align-items: center;
  min-height: 90px;
  padding: 20px 20px 20px 18px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.category-card:hover {
  border-color: var(--primary);
  border-left-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.category-card .cat-name {
  font-size: .9375rem;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .03em;
  line-height: 1.2;
}
.category-card .cat-count {
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
}
.category-card .cat-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  opacity: 0.15;
}

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th {
  background: var(--brand-black);
  color: rgba(255,255,255,.8);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
}
td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #FAFAFA; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8125rem; color: var(--muted);
  margin-bottom: 16px; flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* ── Pricing compare block ───────────────────────────────────────────────────── */
.pricing-compare { display: flex; flex-direction: column; gap: 6px; }
.pricing-member-row { display: flex; align-items: baseline; gap: 8px; }
.savings-tag {
  display: inline-flex; align-items: center;
  padding: 2px 10px;
  background: var(--accent); color: var(--accent-text);
  border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .04em;
}

/* ── Membership banner ───────────────────────────────────────────────────────── */
.membership-banner {
  background: var(--brand-black);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.membership-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
  background: repeating-linear-gradient(-45deg, var(--accent) 0, var(--accent) 6px, var(--brand-black) 6px, var(--brand-black) 12px);
}
.membership-banner .banner-content { flex: 1; padding-left: 8px; }
.membership-banner .banner-title { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 4px; }
.membership-banner .banner-desc  { font-size: 0.875rem; color: rgba(255,255,255,.7); }

/* ── Filters sidebar ─────────────────────────────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; align-items: start; padding-top: 40px; padding-bottom: 60px; }

@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; padding-top: 24px; padding-bottom: 24px; gap: 16px; }

  /* Slide-in sidebar filter panel */
  .shop-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 280px; z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto; background: #fff;
    border-right: 1px solid var(--border);
    border-radius: 0;
    max-height: none;
  }
  .shop-sidebar.open { transform: translateX(0); }

  /* Filter toggle button — shown only on mobile */
  .shop-filter-toggle {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 16px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); font-size: .875rem; font-weight: 700;
    cursor: pointer; margin-top: 4px; margin-bottom: 12px;
  }
}
.shop-sidebar-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:199; }
.shop-sidebar-backdrop.active { display:block; }
@media (min-width: 901px) {
  .shop-filter-toggle { display: none; }
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: sticky;
  top: 84px;
}
.filter-panel-header {
  background: var(--brand-black);
  color: #fff;
  padding: 12px 16px;
  font-size: .875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex; justify-content: space-between; align-items: center;
}
.filter-section { padding: 16px; border-bottom: 1px solid var(--border); }
.filter-section:last-child { border-bottom: none; }
.filter-section-title { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin-bottom: 10px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .875rem; color: var(--text); cursor: pointer; }
.filter-option input { accent-color: var(--primary); width: 15px; height: 15px; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--brand-black);
  color: rgba(255,255,255,.75);
  padding: 48px 0 0;
  border-top: 4px solid var(--primary);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; gap: 0; margin-bottom: 16px; }
  .site-footer { padding: 24px 0 0; }
  .footer-brand { margin-bottom: 8px; }
  .footer-brand p { font-size: .8125rem; }
  .footer-bottom { font-size: .75rem; padding: 12px 0; }

  /* Accordion footer columns on mobile */
  .footer-col--accordion { border-bottom: 1px solid rgba(255,255,255,.1); }
  .footer-col--accordion h4.footer-col__toggle {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; padding: 14px 0; margin: 0; border-bottom: none;
    font-size: .9rem; color: #fff; font-weight: 700;
    text-transform: none; letter-spacing: 0;
  }
  .footer-col__plus { font-size: 1.25rem; font-weight: 400; color: rgba(255,255,255,.6); transition: transform .2s; }
  .footer-col--accordion.open .footer-col__plus { transform: rotate(45deg); }
  .footer-col--accordion .footer-col__links { display: none; padding-bottom: 12px; }
  .footer-col--accordion.open .footer-col__links { display: block; }
}
@media (min-width: 769px) {
  /* Always show footer links on desktop */
  .footer-col--accordion .footer-col__links { display: block !important; }
  .footer-col--accordion h4.footer-col__toggle { cursor: default; }
  .footer-col__plus { display: none; }
}

.footer-brand .footer-logo { display: block; margin-bottom: 14px; }
.footer-brand .footer-logo img { height: 44px; width: auto; }
.footer-brand .footer-logo-text { font-size: 1.1rem; font-weight: 900; color: #fff; text-transform: uppercase; letter-spacing: -.01em; }
.footer-brand .footer-logo-text span { color: var(--accent); }
.footer-brand p { font-size: .875rem; line-height: 1.6; color: rgba(255,255,255,.6); }

.footer-col h4 {
  color: var(--accent);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-col a { display: block; color: rgba(255,255,255,.65); font-size: .875rem; padding: 3px 0; transition: color var(--transition); }
/* Footer contact row */
.footer-contact-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.footer-contact-row > span { white-space: nowrap; }
@media (max-width: 480px) {
  .footer-contact-row { flex-direction: column; align-items: flex-start; text-align: left; }
  .footer-contact-row > span { white-space: normal; }
}
/* On desktop: always show links, hide accordion plus icon */
.footer-col__plus { display: none; }
.footer-col__links { display: block; }
@media (max-width: 480px) { .footer-col__plus { display: inline; } }
.footer-col a:hover { color: var(--accent); }

.hazard-footer-stripe {
  height: 8px;
  background: repeating-linear-gradient(-45deg, var(--accent) 0, var(--accent) 10px, var(--brand-black) 10px, var(--brand-black) 20px);
  margin-bottom: 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 10px; font-size: .8125rem; color: rgba(255,255,255,.4);
}

/* ── Admin sidebar ───────────────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 256px;
  background: var(--brand-black);
  color: rgba(255,255,255,.85);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
  border-right: 3px solid var(--primary);
}
.admin-sidebar-logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.admin-sidebar-logo img { height: 40px; width: auto; margin-bottom: 4px; }
.admin-sidebar-logo a { font-size: 1rem; font-weight: 900; color: #fff; text-decoration: none; text-transform: uppercase; letter-spacing: -.01em; }
.admin-sidebar-logo a span { color: var(--accent); }
.admin-sidebar-logo .sub { font-size: .65rem; font-weight: 700; color: rgba(255,255,255,.35); letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }

.admin-nav { padding: 10px 10px; flex: 1; }
.admin-nav-section-label { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); padding: 14px 10px 5px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  font-size: .875rem; font-weight: 600; color: rgba(255,255,255,.65);
  border-radius: 6px; transition: background var(--transition), color var(--transition);
  margin-bottom: 2px; text-decoration: none;
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.admin-nav a.active { color: var(--accent); font-weight: 700; }
.admin-nav a svg { flex-shrink: 0; opacity: .7; }
.admin-nav a.active svg, .admin-nav a:hover svg { opacity: 1; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 16px;
  position: sticky; top: 0; z-index: 50;
}
.admin-topbar h1 { font-size: 1rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.admin-topbar .topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.admin-topbar .topbar-user  { font-size: .875rem; color: var(--muted); }
.admin-content { padding: 24px; flex: 1; }

.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; }
.stat-card .stat-label { font-size: .75rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 900; color: var(--text); line-height: 1; }
.stat-card .stat-change { font-size: .8125rem; color: var(--muted); margin-top: 6px; }
.stat-card.stat-primary { border-left: 4px solid var(--primary); }
.stat-card.stat-accent  { border-left: 4px solid var(--accent); }

.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.admin-page-header h1 { font-size: 1.375rem; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }

/* Settings tabs */
.settings-tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 28px; flex-wrap: wrap; }
.settings-tab {
  padding: 10px 16px; font-size: .8125rem; font-weight: 700;
  color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px;
  text-decoration: none; transition: color var(--transition);
  text-transform: uppercase; letter-spacing: .04em; white-space: nowrap;
}
.settings-tab:hover { color: var(--primary); }
.settings-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.settings-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px; }
.settings-section-header { padding: 14px 24px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.settings-section-header h3 { font-size: .9375rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.settings-section-header p  { font-size: .8125rem; color: var(--muted); margin-top: 4px; }
.settings-row { padding: 16px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.settings-row:last-child { border-bottom: none; }
.settings-row-info { flex: 1; }
.settings-row-info .label { font-size: .9375rem; font-weight: 600; color: var(--text); }
.settings-row-info .desc  { font-size: .8125rem; color: var(--muted); margin-top: 3px; }
.settings-row-control { flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; min-width: 80px; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 24px 0; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 6px; font-size: .875rem; font-weight: 700;
  color: var(--muted); border: 2px solid var(--border);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--surface-2); color: var(--primary); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty-state svg { margin: 0 auto 16px; opacity: .3; }
.empty-state h3 { font-size: 1.125rem; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: .9375rem; margin-bottom: 24px; }

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.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; }
.divider  { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full   { width: 100%; }

/* ── Mobile compact sections ────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-content { padding: 32px 0; }
  .hero h1 { font-size: 1.5rem; }
  .py-16 { padding-top: 32px; padding-bottom: 32px; }
}
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .py-16 { padding-top: 24px; padding-bottom: 24px; }
}

/* ── Sticky bottom navigation bar (mobile app-like) ────────────────────────── */
.mobile-bottom-nav { display: none; }
@media (max-width: 900px) {
  /* ── Safe-area: push header below notch/Dynamic Island ── */
  .site-header {
    padding-top: env(safe-area-inset-top, 0);
  }
  .mobile-bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0));
    background: #fff; border-top: 1px solid var(--border);
    box-shadow: 0 -2px 8px rgba(0,0,0,.06); z-index: 100;
    justify-content: space-around; align-items: flex-start;
    padding: 4px 8px env(safe-area-inset-bottom, 0);
  }
  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    font-size: .625rem; font-weight: 700; color: var(--muted);
    text-decoration: none; padding: 4px 0; transition: color var(--transition);
    flex: 1;
    -webkit-tap-highlight-color: transparent;
    outline: none;
  }
  .mobile-bottom-nav a.active,
  .mobile-bottom-nav button.active { color: var(--primary); }
  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav button:hover { color: var(--primary); }
  .mobile-bottom-nav svg { width: 22px; height: 22px; }
  /* Add padding to main content and footer so bottom nav doesn't overlap */
  main, .site-footer { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0)); }
}

/* ── Shop sidebar close button (mobile) ─────────────────────────────────────── */
.shop-sidebar-close {
  display: none;
  padding: 12px 16px;
  background: var(--brand-black); color: #fff;
  font-size: .875rem; font-weight: 700;
  border: none; width: 100%; text-align: left; cursor: pointer;
  text-transform: uppercase; letter-spacing: .04em;
}
@media (max-width: 900px) {
  .shop-sidebar-close { display: flex; align-items: center; justify-content: space-between; }
}

/* ── Print ───────────────────────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .admin-sidebar, .no-print { display: none !important; }
  body { font-size: 12px; }
}

/* ════════════════════════════════════════════════════════════════════════════
   PHASE 2 — CATALOG / SHOP STYLES
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Shop layout (sidebar + main) ────────────────────────────────────────────── */
@media (min-width: 901px) {
  .shop-sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}
.sidebar-section { padding: 16px; border-bottom: 1px solid var(--border); }
.sidebar-section:last-child { border-bottom: none; }
.sidebar-title {
  font-size: .7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted); margin-bottom: 10px;
}
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { margin: 0; }
.sidebar-link {
  display: block; padding: 5px 8px; border-radius: 4px;
  font-size: .875rem; color: var(--text); text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.sidebar-link:hover { background: var(--surface-2); color: var(--primary); }
.sidebar-link.active { background: var(--primary); color: #fff; font-weight: 700; }
.sidebar-link--sub { padding-left: 20px; font-size: .8125rem; }
.sidebar-sublist { list-style: none; padding: 0; margin: 2px 0 0 0; }

.shop-main { min-width: 0; }
.shop-header-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; flex-wrap: wrap; gap: 12px;
}
.shop-page-title { font-size: 1.5rem; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
.shop-count { font-size: .875rem; color: var(--muted); margin-top: 2px; }
.shop-sort select { font-size: .875rem; }

/* ── Product grid ────────────────────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1100px) { .product-grid--4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .product-grid--4 { grid-template-columns: repeat(2, 1fr); } .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .product-grid, .product-grid--4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card__body { padding: 10px; }
  .product-card__name { font-size: .8125rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-card__price { font-size: .9375rem; }
  .product-card__desc { display: none; }
  .product-card-footer .btn { font-size: .75rem; padding: 6px 8px; }
}
body { overflow-x: hidden; }

/* ── Product card (new component) ───────────────────────────────────────────── */
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.product-card:hover { box-shadow: var(--shadow-md); border-color: #bbb; transform: translateY(-2px); }

.product-card__image-wrap {
  display: block; position: relative;
  aspect-ratio: 1 / 1; overflow: hidden;
  background: var(--surface-2);
}
.product-card__image {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s ease;
}
.product-card:hover .product-card__image { transform: scale(1.04); }

.product-card__badge {
  position: absolute; top: 8px; left: 8px;
  font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  padding: 3px 8px; border-radius: var(--radius-pill);
}
.product-card__badge--featured { background: var(--accent); color: var(--accent-text); }
.product-card__badge--oos      { background: var(--danger); color: #fff; }
.product-card__badge--low      { background: var(--warning); color: #fff; }

.product-card__body { padding: 14px; display: flex; flex-direction: column; flex: 1; }
.product-card__brand { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.product-card__name { font-size: .9375rem; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.product-card__name a { color: var(--text); text-decoration: none; }
.product-card__name a:hover { color: var(--primary); }
.product-card__desc { font-size: .8125rem; color: var(--muted); line-height: 1.5; margin-bottom: 10px; flex: 1; }

.product-card__pricing { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--surface-2); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.product-card__price { font-size: 1.125rem; font-weight: 900; color: var(--text); }
.product-card__price--member { color: var(--primary); }
.product-card__compare { font-size: .8125rem; color: var(--muted); text-decoration: line-through; }
.product-card__save { font-size: .7rem; font-weight: 800; background: var(--accent); color: var(--accent-text); padding: 2px 7px; border-radius: var(--radius-pill); text-transform: uppercase; }
.product-card__member-tease { font-size: .75rem; color: var(--muted); margin-top: 5px; }
.product-card__member-tease a { color: var(--primary); font-weight: 700; }
.product-card__unit { font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* ── Product detail page ─────────────────────────────────────────────────────── */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  align-items: start;
}
@media (max-width: 768px) { .product-detail-grid { grid-template-columns: 1fr; } }

.product-gallery__main { margin-bottom: 12px; }
.product-gallery__main-img {
  width: 100%; aspect-ratio: 1/1; object-fit: cover;
  border-radius: var(--radius-md); border: 1px solid var(--border);
}
.product-gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumb {
  width: 72px; height: 72px; padding: 0; border: 2px solid var(--border);
  border-radius: 6px; overflow: hidden; cursor: pointer; background: none;
  transition: border-color var(--transition);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }

/* ── Product gallery slider arrows (detail page) ────────────────────────────── */
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.45); color: #fff; border: none; cursor: pointer;
  width: 36px; height: 36px; border-radius: 50%; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; transition: background .15s;
}
.gallery-arrow:hover { background: rgba(0,0,0,.7); }
.gallery-arrow--prev { left: 8px; }
.gallery-arrow--next { right: 8px; }
.product-gallery__main { position: relative; }

/* ── Product card multi-image slider ────────────────────────────────────────── */
.pc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.4); color: #fff; border: none; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%; font-size: 1.1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; z-index: 3;
  opacity: 0; transition: opacity .15s;
}
.product-card__image-wrap:hover .pc-arrow { opacity: 1; }
.pc-arrow--prev { left: 6px; }
.pc-arrow--next { right: 6px; }
.pc-dots {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 4px; z-index: 3;
}
.pc-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.5); cursor: pointer; transition: background .15s;
}
.pc-dot.active { background: #fff; }

.product-brand { font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.product-brand a { color: var(--muted); }
.product-brand a:hover { color: var(--primary); }
.product-name { font-size: 1.75rem; font-weight: 900; line-height: 1.2; margin-bottom: 8px; }
.product-sku { font-size: .8125rem; color: var(--muted); margin-bottom: 16px; }

.product-price-block { margin-bottom: 16px; }
.product-price { font-size: 2rem; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.product-price--member { color: var(--primary); }
.member-badge {
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  background: var(--primary); color: #fff; padding: 3px 8px; border-radius: var(--radius-pill);
}
.product-compare { font-size: .9375rem; color: var(--muted); margin-top: 4px; }
.product-savings { font-size: .875rem; font-weight: 800; color: var(--success); margin-top: 6px; }
.product-member-tease {
  background: var(--brand-black); color: #fff; border-radius: 6px;
  padding: 10px 14px; font-size: .875rem; margin-top: 8px;
}
.product-member-tease strong { color: var(--accent); }
.product-member-tease a { color: var(--accent); font-weight: 700; }

.product-stock { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.stock-badge { font-size: .8125rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); }
.stock-badge--in  { background: #D1FAE5; color: var(--success); }
.stock-badge--out { background: #FEE2E2; color: var(--danger); }
.stock-unit { font-size: .8125rem; color: var(--muted); }

.product-short-desc { font-size: 1rem; line-height: 1.6; color: var(--text); margin-bottom: 20px; }

.atc-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qty-input { display: flex; align-items: center; border: 2px solid var(--border); border-radius: 6px; overflow: hidden; }
.qty-btn { background: var(--surface-2); border: none; width: 36px; height: 44px; font-size: 1.125rem; font-weight: 700; cursor: pointer; color: var(--text); transition: background var(--transition); }
.qty-btn:hover { background: var(--border); }
.qty-input .input { border: none; border-radius: 0; width: 56px; text-align: center; font-weight: 700; font-size: 1rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }

.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { display: inline-block; padding: 3px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: .75rem; color: var(--muted); text-decoration: none; transition: border-color var(--transition), color var(--transition); }
.tag:hover { border-color: var(--primary); color: var(--primary); }

.product-tabs { border-top: 2px solid var(--border); padding-top: 1.5rem; }
.tab-header { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { padding: 10px 20px; background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: .875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; cursor: pointer; color: var(--muted); transition: color var(--transition); }
.tab-btn.active, .tab-btn:hover { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.product-description.prose { font-size: 1rem; line-height: 1.7; color: var(--text); white-space: pre-wrap; }

.related-products .section-title { font-size: 1.25rem; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 1rem; }

/* ── Search page ─────────────────────────────────────────────────────────────── */
.search-form-large { display: flex; gap: 8px; }
.search-form-large .input { flex: 1; font-size: 1rem; padding: .75rem 1rem; }

/* ── Admin page sub-header ───────────────────────────────────────────────────── */
.admin-page-title { font-size: 1.375rem; font-weight: 900; text-transform: uppercase; letter-spacing: .02em; }
.admin-page-sub { font-size: .8125rem; color: var(--muted); margin-top: 2px; }
.table-actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.admin-table th { background: var(--brand-black); color: rgba(255,255,255,.8); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px; text-align: left; white-space: nowrap; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface-2); }
.btn-sm { padding: .3rem .75rem; font-size: .8rem; }
.form-group { margin-bottom: 1rem; }
.muted { color: var(--muted); }

/* ── Cart icon badge ─────────────────────────────────────────────────────────── */
.cart-icon-btn { position: relative; }
.cart-badge { position: absolute; top: 2px; right: 2px; background: var(--primary); color: #fff; font-size: .65rem; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px; display: flex; align-items: center; justify-content: center; padding: 0 4px; pointer-events: none; box-shadow: 0 0 0 2px #fff; }

/* ── Checkout layout ─────────────────────────────────────────────────────────── */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
@media(max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-main { min-width: 0; }
.checkout-sidebar { position: sticky; top: 1.5rem; }

/* ── Checkout step indicator ─────────────────────────────────────────────────── */
.checkout-steps { display: flex; align-items: center; margin-bottom: 1.75rem; }
.checkout-step { display: flex; align-items: center; gap: 8px; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); white-space: nowrap; }
.checkout-step.active { color: var(--primary); }
.checkout-step.done { color: var(--success); }
.step-num { width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 900; flex-shrink: 0; }
.checkout-step.done .step-num { background: var(--success); border-color: var(--success); color: #fff; }
.checkout-step.active .step-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.checkout-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 10px; }
.checkout-step-line.done { background: var(--success); }
@media(max-width: 480px) { .checkout-step { font-size: .6875rem; gap: 5px; letter-spacing: 0; } .checkout-step-line { margin: 0 4px; } }

/* ── Checkout section titles ─────────────────────────────────────────────────── */
.checkout-section-title { font-size: 1.0625rem; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 1.25rem; }
.checkout-section-sub { font-size: .8125rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1.25rem 0 .75rem; }

/* ── Form row helpers ────────────────────────────────────────────────────────── */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1.25fr; gap: 12px; }
@media(max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } .form-row-3 { grid-template-columns: 1fr; } }
.req { color: var(--primary); }

/* ── Fulfillment method options ──────────────────────────────────────────────── */
.fulfillment-options { display: flex; gap: 10px; flex-wrap: wrap; }
.fulfillment-option { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 180px; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.fulfillment-option input[type="radio"] { margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.fulfillment-option strong { display: block; font-size: .9375rem; font-weight: 700; }
.fulfillment-option p { font-size: .8125rem; color: var(--muted); margin: 2px 0 0; }
.fulfillment-option.active, .fulfillment-option:has(input:checked) { border-color: var(--primary); background: #FFF5F5; }

/* ── Payment method option cards ─────────────────────────────────────────────── */
.payment-option-label { display: flex; align-items: flex-start; gap: 12px; border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; cursor: pointer; transition: border-color .15s, background .15s; }
.payment-option-label input[type="radio"] { margin-top: 4px; accent-color: var(--primary); flex-shrink: 0; }
.payment-option-body strong { display: block; font-size: .9375rem; font-weight: 700; }
.payment-option-body p { font-size: .8125rem; color: var(--muted); margin: 3px 0 0; }
.payment-option-label:has(input:checked) { border-color: var(--primary); background: #FFF5F5; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────────── */
.breadcrumb { font-size: .8125rem; color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; }
.breadcrumb span { color: var(--text); font-weight: 600; }

/* ── Badge color variants ────────────────────────────────────────────────────── */
.badge-success  { background: #DCFCE7; color: #15803D; }
.badge-warning  { background: #FEF9C3; color: #A16207; }
.badge-danger   { background: #FEE2E2; color: #DC2626; }
.badge-info     { background: #DBEAFE; color: #1D4ED8; }
.badge-primary  { background: #FFF0F0; color: var(--primary); }
.badge-muted    { background: var(--surface-2); color: var(--muted); }

/* ── Account page cards ──────────────────────────────────────────────────────── */
.card:hover { box-shadow: var(--shadow-md); }

/* ── Form helpers ────────────────────────────────────────────────────────────── */
.form-hint { font-size: .8125rem; color: var(--muted); margin: 4px 0 0; }
.form-group { margin-bottom: 1.125rem; }
.form-label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 5px; }
.req { color: var(--primary); }

/* ── Alert boxes ─────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; border: 1px solid transparent; }
.alert-success { background: #DCFCE7; color: #15803D; border-color: #BBF7D0; }
.alert-danger  { background: #FEE2E2; color: #DC2626; border-color: #FECACA; }
.alert-warning { background: #FEF9C3; color: #A16207; border-color: #FEF08A; }
.alert-info    { background: #DBEAFE; color: #1D4ED8; border-color: #BFDBFE; }

/* ── Badge pill variant ──────────────────────────────────────────────────────── */
.badge-pill { border-radius: 999px; display: inline-block; padding: 4px 14px; font-size: .8125rem; font-weight: 600; }

/* ════════════════════════════════════════════════════════════════════════════
   MOBILE SEARCH OVERLAY
   ════════════════════════════════════════════════════════════════════════════ */

.mobile-search-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: #fff; z-index: 10000;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
}

.mobile-search-overlay__header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 2px solid var(--border);
  background: var(--surface);
}

.mobile-search-overlay__form {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.mobile-search-overlay__form input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 1.0625rem; color: var(--text);
}

.mobile-search-overlay__close {
  background: none; border: none; font-size: 2rem; line-height: 1;
  color: var(--muted); padding: 4px 8px; cursor: pointer;
}
.mobile-search-overlay__close:hover { color: var(--text); }

.mobile-search-overlay__results {
  flex: 1; overflow-y: auto; padding: 16px;
}

.mobile-search-overlay__results .search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: var(--radius-sm);
  cursor: pointer; text-decoration: none; color: var(--text);
  transition: background var(--transition);
}
.mobile-search-overlay__results .search-result-item:hover {
  background: var(--surface-2);
}
.mobile-search-overlay__results .search-result-item img {
  width: 48px; height: 48px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.mobile-search-overlay__results .search-result-item .result-info {
  flex: 1;
}
.mobile-search-overlay__results .search-result-item .result-name {
  font-weight: 600; font-size: .9375rem;
}
.mobile-search-overlay__results .search-result-item .result-price {
  font-size: .875rem; color: var(--primary); font-weight: 700;
}

/* ════════════════════════════════════════════════════════════════════════════
   ADVISORY COUNCIL SLIDER
   ════════════════════════════════════════════════════════════════════════════ */

.council-slider {
  overflow: hidden; width: 100%;
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.council-slider__track {
  display: flex; gap: 32px; width: max-content;
  animation: council-scroll 60s linear infinite;
}
.council-slider:hover .council-slider__track {
  animation-play-state: paused;
}

.council-slider__item {
  flex-shrink: 0; display: flex; flex-direction: column;
  align-items: center; gap: 8px; width: 120px;
}
.council-slider__item img {
  width: 80px; height: 80px; object-fit: contain;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: #fff; padding: 6px;
}
.council-slider__placeholder {
  width: 80px; height: 80px; border-radius: var(--radius-sm);
  background: var(--brand-black); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900;
}
.council-slider__name {
  font-size: .75rem; font-weight: 600; color: var(--muted);
  text-align: center; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 120px;
}

@keyframes council-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ════════════════════════════════════════════════════════════════════════════
   SECTION LABEL
   ════════════════════════════════════════════════════════════════════════════ */

.section-label {
  display: inline-block;
  font-size: .6875rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--primary);
}

/* ════════════════════════════════════════════════════════════════════════════
   QUEUE PAGE — mobile first
   ════════════════════════════════════════════════════════════════════════════ */

/* No additional styles needed — queue page uses existing card/btn classes */

/* ════════════════════════════════════════════════════════════════════════════
   PREDICTIVE SEARCH DROPDOWN
   ════════════════════════════════════════════════════════════════════════════ */

.predictive-search-wrap { position: relative; }

.predictive-search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  z-index: 1000; background: #fff;
  border: 1px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  max-height: 420px; overflow-y: auto;
  display: none;
}
.predictive-search-dropdown.active { display: block; }

.predictive-search-dropdown__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; cursor: pointer;
  text-decoration: none; color: var(--text);
  border-bottom: 1px solid var(--surface-2);
  transition: background var(--transition);
}
.predictive-search-dropdown__item:last-child { border-bottom: none; }
.predictive-search-dropdown__item:hover,
.predictive-search-dropdown__item--active {
  background: var(--surface-2);
}
.predictive-search-dropdown__item img {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--border);
  flex-shrink: 0;
}
.predictive-search-dropdown__info { flex: 1; min-width: 0; }
.predictive-search-dropdown__name {
  font-weight: 600; font-size: .9rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.predictive-search-dropdown__sku {
  font-size: .75rem; color: var(--muted); letter-spacing: .03em;
}
.predictive-search-dropdown__price {
  font-weight: 700; font-size: .875rem; color: var(--primary);
  white-space: nowrap; flex-shrink: 0;
}

.predictive-search-dropdown__footer {
  padding: 10px 14px; text-align: center;
  font-size: .8125rem; font-weight: 600;
  color: var(--primary); border-top: 1px solid var(--border);
  cursor: pointer;
}
.predictive-search-dropdown__footer:hover { background: var(--surface-2); }

.predictive-search-dropdown__empty {
  padding: 20px 14px; text-align: center;
  color: var(--muted); font-size: .875rem;
}

/* On mobile, make dropdown full width and raise z-index */
@media (max-width: 900px) {
  .predictive-search-dropdown { max-height: 320px; }
  .site-nav .predictive-search-dropdown {
    position: fixed; left: 0; right: 0; top: auto;
    border-radius: 0; max-height: 50vh;
  }
}

/* ── Admin Order Create ────────────────────────────────────────────────────── */
.admin-order-create .card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #ccc);
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.autocomplete-dropdown.autocomplete-loading::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  margin: 12px auto;
  border: 2px solid var(--border, #ccc);
  border-top-color: var(--primary, #CC1F1F);
  border-radius: 50%;
  animation: ac-spin .6s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

.autocomplete-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border, #eee);
  font-size: .875rem;
  transition: background .15s;
}

.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.active,
.autocomplete-item--active { background: var(--surface-2, #f2f2f2); }
.autocomplete-item--empty { cursor: default; color: var(--muted); font-style: italic; }

.admin-order-create .line-item-row td { vertical-align: middle; padding: 6px 8px; }
.admin-order-create .line-item-row .input { margin: 0; }
.admin-order-create .table-overflow-visible { overflow: visible !important; }
.admin-order-create .line-item-row td { position: relative; }

/* Order source badges */
.badge-source-online  { background: #DBEAFE; color: #1D4ED8; font-size: .7rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.badge-source-phone   { background: #D1FAE5; color: #047857; font-size: .7rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.badge-source-walk_in { background: #FFEDD5; color: #C2410C; font-size: .7rem; padding: 2px 8px; border-radius: 4px; font-weight: 600; }

@media (max-width: 768px) {
  .admin-order-create [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── In-App (Capacitor) overrides ──────────────────────────────────────────── */

/* ── Global width safety for Capacitor WebView ──────────────────────────────── */
body.in-capacitor { width: 100vw; max-width: 100%; overflow-x: hidden; }
body.in-capacitor .container { max-width: 100%; }

/* Hide website footer on ALL mobile — bottom nav replaces it */
@media (max-width: 900px) { .site-footer { display: none !important; } }

/* (Also kept for explicitness inside Capacitor) */
body.in-capacitor .site-footer { display: none !important; }

/* ── PCI DSS Compliance Site Seal ───────────────────────────────────────── */
.pci-siteseal {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.pci-siteseal img {
  max-width: 110px;
  height: auto;
  display: block;
  transition: transform .2s ease;
}
.pci-siteseal img:hover { transform: scale(1.04); }

/* Mobile drawer variant — centered, a bit smaller */
.pci-siteseal--mobile {
  display: flex;
  justify-content: center;
  padding: 14px 0 8px;
  margin-top: 4px;
}
.pci-siteseal--mobile img {
  max-width: 110px;
}

/* Footer bottom row — seal left, phone/address right (stacks on mobile) */
@media (max-width: 640px) {
  .footer-contact-row { justify-content: center !important; text-align: center; }
  .footer-contact-info { justify-content: center !important; }
}

/* Hamburger nav → left side drawer in-app (not full-width dropdown) */
body.in-capacitor .site-nav.open {
  position: fixed !important;
  top: 0 !important; bottom: 0 !important;
  left: 0 !important; right: auto !important;
  width: min(85vw, 320px) !important;
  height: 100dvh !important;
  background: #fff !important;
  flex-direction: column !important;
  padding: calc(env(safe-area-inset-top, 0) + 64px) 0 80px !important;
  box-shadow: 4px 0 24px rgba(0,0,0,.18) !important;
  border-top: none !important;
  border-right: 1px solid var(--border) !important;
  overflow-y: auto !important;
  z-index: 9999 !important;
  transform: translateX(-110%);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
}
body.in-capacitor .site-nav.open.drawer-visible {
  transform: translateX(0) !important;
}
body.in-capacitor .site-nav.open a {
  padding: 14px 24px !important;
  font-size: .95rem !important;
  border-bottom: 1px solid var(--border) !important;
  width: 100% !important;
}
/* Overlay behind side drawer */
body.in-capacitor #nav-drawer-overlay {
  display: block;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
  backdrop-filter: blur(1px);
}
/* Remove bottom padding that was reserved for footer */
body.in-capacitor main { padding-bottom: 72px; }

/* When on-screen keyboard is open, hide the bottom nav so it doesn't float
   above the keyboard. Triggered from JS via visualViewport resize. */
body.kb-open .mobile-bottom-nav { display: none !important; }
body.kb-open.in-capacitor main { padding-bottom: 16px; }

/* "More" tab — hidden on web, visible only in Capacitor */
.app-more-tab {
  display: none;
  background: none; border: none; cursor: pointer;
  font-family: inherit;
}
.app-more-tab svg { width: 22px; height: 22px; }
body.in-capacitor .app-more-tab { display: flex; }
body.in-capacitor .app-more-tab:hover,
body.in-capacitor .app-more-tab.active { color: var(--primary); }

/* More drawer overlay */
#app-more-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 9990;
  backdrop-filter: blur(2px);
}
#app-more-overlay.open { display: block; }

/* More drawer — slides up from bottom */
#app-more-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9991;
  background: #fff; border-radius: 20px 20px 0 0;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  max-height: 82vh; overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  -webkit-overflow-scrolling: touch;
}
#app-more-drawer.open { transform: translateY(0); }

.app-more-handle {
  width: 36px; height: 4px; background: #ddd; border-radius: 2px;
  margin: 12px auto 4px;
}

.app-more-section { padding: 8px 0 4px; border-bottom: 1px solid var(--border); }
.app-more-section:last-of-type { border-bottom: none; }

.app-more-section-title {
  font-size: .7rem; font-weight: 800; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em;
  padding: 8px 20px 4px;
}

#app-more-drawer a {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; font-size: .9rem; font-weight: 500;
  color: var(--text); text-decoration: none;
  transition: background .1s;
}
#app-more-drawer a:active { background: var(--surface-2); }
#app-more-drawer a svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted); }

.app-more-contact {
  padding: 12px 20px 8px; display: flex; flex-direction: column; gap: 10px;
}
.app-more-contact a,
.app-more-contact span {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; color: var(--muted); text-decoration: none;
}
.app-more-contact svg { width: 16px; height: 16px; flex-shrink: 0; }

.app-more-footer {
  text-align: center; font-size: .75rem; color: var(--muted);
  padding: 12px 20px 20px;
}

/* ── Accounting KPI Grid ───────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px)  { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .kpi-grid { grid-template-columns: 1fr; } }

.kpi-card { border-left: 4px solid var(--primary); transition: box-shadow .15s; }
.kpi-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }

/* ── Statement Table (P&L formatting) ──────────────────────────────────────── */
.statement-table td { padding: 10px 16px; }
.statement-table tr:hover td { background: var(--surface-2); }

/* ── Adjustment type badges ────────────────────────────────────────────────── */
.badge-info { background: #EFF6FF; color: #2563EB; }
