/* =============================================================================
   Auth pages, dashboard, cart styles
   Loaded on top of site.css.
   ============================================================================= */

.visually-hidden {
  position: absolute !important;
  clip: rect(0 0 0 0); width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
}

/* Buttons (used across auth, cart, dashboard) */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s;
  letter-spacing: 0.02em;
}
.btn--primary { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn--primary:hover { background: var(--c-accent-dk); border-color: var(--c-accent-dk); color: #fff; text-decoration: none; }
.btn--ghost { background: #fff; color: var(--c-primary); border-color: var(--c-primary); }
.btn--ghost:hover { background: var(--c-primary); color: #fff; text-decoration: none; }
.btn--block { display: block; width: 100%; }

/* =============================================================================
   AUTH PAGES (login, signup)
   ============================================================================= */
.auth-page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 60px 24px;
  display: flex;
  justify-content: center;
}
.auth-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-card--wide { max-width: 560px; }
.auth-headline {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 8px;
}
.auth-sub {
  color: var(--c-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.6;
}
.auth-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 20px;
}
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: 13px; font-weight: 600; color: var(--c-text); }
.auth-optional { color: var(--c-text-lighter); font-weight: 400; }
.auth-hint { font-size: 12px; color: var(--c-text-light); margin-top: 4px; }
.auth-field input {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--c-text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(0, 114, 188, 0.15);
}
.auth-submit {
  background: var(--c-accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}
.auth-submit:hover { background: var(--c-accent-dk); }
.auth-meta {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--c-border);
  font-size: 13px;
  color: var(--c-text-muted);
  text-align: center;
}
.auth-meta a { color: var(--c-primary); font-weight: 600; }

@media (max-width: 480px) {
  .auth-page { padding: 24px 16px; }
  .auth-card { padding: 28px 22px; }
  .auth-row { grid-template-columns: 1fr; }
}

/* =============================================================================
   DASHBOARD
   ============================================================================= */
.dashboard {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.dashboard-banner {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  font-size: 14px;
  font-weight: 600;
}
.dashboard-banner--welcome {
  background: linear-gradient(135deg, rgba(0, 114, 188, 0.12), rgba(255, 204, 0, 0.18));
  color: var(--c-navy);
  border: 1px solid rgba(0, 114, 188, 0.25);
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--c-border);
}
.dashboard-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-light);
  margin-bottom: 6px;
}
.dashboard-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0;
}
.dashboard-company { font-size: 14px; color: var(--c-text-muted); margin-top: 4px; }

.dashboard-tier {
  background: linear-gradient(135deg, var(--tier-color, #f0f5fa), #fff);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  text-align: right;
  min-width: 220px;
}
.dashboard-tier-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-navy);
  letter-spacing: 0.02em;
}
.dashboard-tier-meta { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.kpi-tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: block;
  text-decoration: none !important;
}
.kpi-tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--c-primary);
}
.kpi-tile--cart  { background: linear-gradient(135deg, rgba(255, 204, 0, 0.10), #fff); border-color: var(--c-yellow); }
.kpi-tile--cart .kpi-num { color: var(--c-accent); }
.kpi-tile--spend { background: linear-gradient(135deg, var(--c-bg-info), #fff); border-color: var(--c-primary); }
.kpi-num {
  font-size: 30px;
  font-weight: 700;
  color: var(--c-primary);
  line-height: 1;
  margin-bottom: 6px;
}
.kpi-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobile: HORIZONTAL LIST-ROW tiles, 2-col grid (per user direction).
   Number left, label right, single line, half the height of stacked tiles.
   Column-major flow so the LEFT column reads as the customer's INTENT
   journey (Pending Quotes → In Cart → Open Orders) and the RIGHT column
   reads as the FULFILLMENT journey (In Transit → Delivered → Spend). */
@media (max-width: 767px) {
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    gap: 8px;
    margin-bottom: 16px;
  }
  .kpi-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-align: left;
    border-radius: var(--radius);
  }
  .kpi-tile:hover { transform: none; }
  .kpi-num {
    font-size: 20px;
    margin-bottom: 0;
    flex-shrink: 0;
    min-width: 24px;
    text-align: center;
  }
  .kpi-tile--spend .kpi-num { font-size: 16px; min-width: 0; }
  .kpi-label {
    font-size: 10px;
    line-height: 1.1;
  }
}

/* =============================================================================
   MOBILE DASHBOARD — strip chrome, keep only badge + KPIs + recent activity
   Per user direction (2026-04-25): mobile dashboard feels like an app.
   Account meta accessible via hamburger menu, not on dashboard front page.
   ============================================================================= */
@media (max-width: 767px) {
  /* Hide redundant chrome — name + company already in header */
  .dashboard-eyebrow,
  .dashboard-name,
  .dashboard-company { display: none; }

  /* Compact dashboard header — only the tier badge stays, full width */
  .dashboard-head {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 16px;
  }
  .dashboard-tier {
    width: 100%;
    text-align: center;
    min-width: 0;
  }

  /* Compress section padding to mobile sizes */
  .dashboard {
    padding: 14px 12px 24px;
  }
  .dashboard-section {
    padding: 14px;
    margin-bottom: 12px;
  }

  /* Hide the Account meta card on mobile — accessible via hamburger Profile link */
  .dashboard-section:has(dl.dashboard-meta) { display: none; }
  /* Fallback for browsers without :has() — hide via class on the dl itself */
  .dashboard-meta { display: none; }
  .dashboard-section:nth-of-type(2):has(.dashboard-meta) { display: none; }
}

/* =============================================================================
   FOOTER — hidden on mobile entirely
   ============================================================================= */
@media (max-width: 767px) {
  .site-footer { display: none; }
}

/* =============================================================================
   MOBILE BOTTOM NAV — app-style fixed bar at bottom of viewport
   Hidden on desktop. Pushes body content up on mobile to avoid overlap.
   ============================================================================= */
.mobile-bottom-nav { display: none; }

@media (max-width: 767px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -2px 12px rgba(10, 22, 40, 0.08);
    z-index: 100;
    padding: 4px 0;
    padding-bottom: env(safe-area-inset-bottom, 4px);
  }
  .mbn-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    color: var(--c-text-light);
    font-size: 10px;
    font-weight: 600;
    text-decoration: none !important;
    position: relative;
    letter-spacing: 0.02em;
    transition: color 0.15s;
  }
  .mbn-item svg { width: 22px; height: 22px; stroke-width: 2; }
  .mbn-item:hover, .mbn-item:focus { color: var(--c-primary); }
  .mbn-item.is-active { color: var(--c-primary); }
  .mbn-item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    right: 30%;
    height: 3px;
    background: var(--c-primary);
    border-radius: 0 0 3px 3px;
  }
  .mbn-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 18px);
    background: var(--c-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
  }

  /* Push body up so bottom nav doesn't overlap content */
  body { padding-bottom: 64px; }
}

/* =============================================================================
   MOBILE — sticky Add-to-Cart on product detail page
   ============================================================================= */
@media (max-width: 767px) {
  /* Move Add-to-Cart form to a sticky bar above the bottom nav */
  .pd-info .pd-add-form {
    position: fixed;
    bottom: 64px;  /* sit above the bottom nav */
    left: 0; right: 0;
    background: #fff;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -4px 14px rgba(10, 22, 40, 0.08);
    padding: 10px 12px;
    z-index: 99;
    margin: 0;
  }
  .pd-info .pd-add-form .pd-qty input { padding: 12px; }
  .pd-info .pd-add-form .pd-add-btn { padding: 14px; font-size: 15px; }

  /* Add bottom padding to product detail to account for the sticky CTA */
  .product-detail { padding-bottom: 96px; }
}

/* =============================================================================
   MOBILE — sticky Checkout on cart page
   ============================================================================= */
@media (max-width: 767px) {
  .cart-summary {
    position: fixed;
    bottom: 64px;  /* above bottom nav */
    left: 0; right: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid var(--c-border);
    box-shadow: 0 -4px 14px rgba(10, 22, 40, 0.08);
    padding: 12px 16px;
    margin: 0;
    z-index: 99;
  }
  .cart-summary h2 { display: none; }  /* compact on mobile */
  .cart-summary-row { padding: 4px 0; font-size: 13px; }
  .cart-summary-row--muted { display: none; }  /* "calculated at checkout" hidden on sticky bar */
  .cart-summary-row--total { font-size: 16px; padding-top: 6px; margin-top: 6px; }
  .cart-summary .btn--primary { padding: 12px; font-size: 14px; margin-top: 8px; }
  .cart-summary .btn--ghost { display: none; }  /* "continue shopping" — already in bottom nav */
  .cart-page { padding-bottom: 200px; }
}

/* =============================================================================
   REWARDS PAGE
   ============================================================================= */
.reward-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.reward-card {
  background: var(--c-card);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.reward-card--profile { border-color: var(--c-yellow); background: linear-gradient(135deg, rgba(255,204,0,0.05), #fff); }
.reward-card--spend   { border-color: var(--c-primary); background: linear-gradient(135deg, rgba(0,114,188,0.05), #fff); }
.reward-card--claimed { opacity: 0.85; background: var(--c-bg-light); }
.reward-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.reward-name { font-size: 15px; font-weight: 700; color: var(--c-navy); }
.reward-axis-pill {
  background: var(--c-bg-info);
  color: var(--c-info-text);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.reward-status {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: #166534;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.reward-desc { font-size: 13px; color: var(--c-text-muted); margin-bottom: 8px; line-height: 1.5; }
.reward-merch { font-size: 12px; color: var(--c-text); padding: 8px 10px; background: var(--c-bg-light); border-radius: var(--radius-sm); margin-bottom: 10px; }
.reward-merch strong { color: var(--c-navy); }
.reward-meta { font-size: 11px; color: var(--c-text-light); margin-top: 4px; }
.reward-claim-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.reward-claim-form .auth-submit { padding: 8px 14px; font-size: 13px; }
.reward-claim-form select { padding: 8px 10px; border: 1px solid var(--c-border); border-radius: var(--radius-sm); font-family: inherit; font-size: 14px; }
.reward-rules { margin: 0; padding-left: 20px; font-size: 13px; color: var(--c-text-muted); line-height: 1.7; }
.reward-rules li { margin-bottom: 6px; }
.reward-rules strong { color: var(--c-text); }

/* =============================================================================
   CHECKOUT PAGE
   ============================================================================= */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
}
.checkout-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.checkout-summary {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 200px;
}
.checkout-summary h2 { font-size: 16px; font-weight: 700; color: var(--c-navy); margin-bottom: 14px; }
.checkout-items { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 240px; overflow-y: auto; }
.checkout-items li { font-size: 13px; padding-bottom: 8px; border-bottom: 1px solid var(--c-border-soft); }
.checkout-items li:last-child { border-bottom: 0; }
.checkout-item-pn { font-size: 11px; font-weight: 600; color: var(--c-text-light); letter-spacing: 0.04em; }
.checkout-item-title { color: var(--c-text); margin: 2px 0; line-height: 1.3; }
.checkout-item-price { font-weight: 700; color: var(--c-primary); text-align: right; margin-top: 2px; }
.checkout-totals { display: flex; flex-direction: column; gap: 6px; padding-top: 14px; border-top: 1px solid var(--c-border); margin-bottom: 14px; }
.checkout-totals > div { display: flex; justify-content: space-between; font-size: 13px; color: var(--c-text); }
.checkout-totals .muted { color: var(--c-text-light); font-size: 12px; }
.checkout-totals .total { font-size: 17px; font-weight: 700; color: var(--c-navy); padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--c-border-soft); }
.checkout-totals .total span:last-child { color: var(--c-primary); }
.checkout-fineprint { font-size: 11px; color: var(--c-text-light); margin-top: 10px; line-height: 1.5; }

.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-opt {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.payment-opt:has(input:checked) { border-color: var(--c-primary); background: rgba(0, 114, 188, 0.05); }
.payment-opt input[type="radio"] { margin-top: 3px; flex-shrink: 0; min-height: 0 !important; }
.payment-opt-name { font-weight: 700; color: var(--c-navy); font-size: 14px; }
.payment-opt-desc { font-size: 12px; color: var(--c-text-muted); margin-top: 2px; line-height: 1.4; }
.payment-opt-soon {
  display: inline-block;
  font-size: 10px;
  background: var(--c-bg-light);
  color: var(--c-text-light);
  padding: 1px 6px;
  border-radius: 99px;
  margin-left: 6px;
  letter-spacing: 0.04em;
}
.payment-opt--disabled { opacity: 0.55; cursor: not-allowed; }

@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-summary { position: static; }
}

@media (max-width: 767px) {
  .checkout-grid { gap: 12px; }
  .checkout-summary { padding: 14px; }
  .checkout-items { max-height: none; }
  .cart-page { /* checkout uses same wrapper */ padding-bottom: 80px; }
}

/* =============================================================================
   PRODUCT CARDS — desktop grid + condensed mobile list with inline actions
   Used on /c/{slug} category browse and /search results.
   ============================================================================= */
.search-page,
.category-page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 28px 24px 48px;
}
.search-head,
.category-head { margin-bottom: 20px; }
.search-head h1,
.category-head h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0 0 12px;
}
.search-form-inline {
  display: flex;
  gap: 8px;
  max-width: 560px;
}
.search-form-inline input[type="search"] {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.search-form-inline button { white-space: nowrap; }
.search-meta {
  margin-top: 10px;
  font-size: 13px;
  color: var(--c-text-muted);
}
.search-tips {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.search-tips h2 { font-size: 18px; margin: 0 0 12px; color: var(--c-navy); }
.search-tips ul { padding-left: 20px; margin-bottom: 14px; }
.search-tips li { margin-bottom: 6px; font-size: 14px; }
.catalog-empty {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
.catalog-empty h2 { font-size: 20px; margin: 0 0 8px; color: var(--c-navy); }
.catalog-empty p { color: var(--c-text-muted); margin-bottom: 18px; }
.catalog-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.product-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.product-card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none !important;
  color: var(--c-text);
}
.product-card-image {
  background: var(--c-bg-light);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.product-card-image--placeholder {
  font-weight: 700;
  font-size: 22px;
  color: var(--c-primary);
  letter-spacing: -0.02em;
}
.product-card-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.product-card-pn {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-text-light);
  letter-spacing: 0.04em;
}
.product-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-navy);
  line-height: 1.3;
  /* Clamp to 2 lines on desktop */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-desc {
  font-size: 12px;
  color: var(--c-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  gap: 8px;
}
.product-card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
}
.product-card-stock {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}
.product-card-stock--in   { background: #dcfce7; color: #166534; }
.product-card-stock--lead { background: #dbeafe; color: #1e40af; }

.product-card-actions {
  display: flex;
  gap: 6px;
  padding: 0 12px 12px;
}
.product-card-actions button {
  flex: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.15s;
  text-transform: uppercase;
}
.card-add {
  background: #fff;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.card-add:hover { background: var(--c-primary); color: #fff; }
.card-add--added { background: #166534; color: #fff !important; border-color: #166534; }
.card-buy {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}
.card-buy:hover { background: var(--c-accent-dk); border-color: var(--c-accent-dk); }

/* ===== MOBILE (condensed list view per user direction) ===== */
@media (max-width: 767px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  /* Horizontal layout: thumbnail left, body middle, actions right */
  .product-card {
    flex-direction: row;
    align-items: stretch;
    border-radius: var(--radius);
  }
  .product-card:hover { transform: none; }
  .product-card-link {
    flex-direction: row;
    flex: 1;
    min-width: 0;
  }
  .product-card-image {
    width: 88px;
    height: 88px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border-radius: 0;
  }
  .product-card-image img { padding: 6px; }
  .product-card-body {
    padding: 8px 10px;
    gap: 2px;
    min-width: 0;
  }
  .product-card-title {
    -webkit-line-clamp: 2;
    font-size: 13px;
  }
  .product-card-desc {
    -webkit-line-clamp: 1;
    font-size: 11px;
  }
  .product-card-foot {
    padding-top: 4px;
    gap: 6px;
  }
  .product-card-price { font-size: 14px; }
  .product-card-stock { font-size: 9px; padding: 1px 6px; }

  /* Actions stack vertically on the right */
  .product-card-actions {
    flex-direction: column;
    padding: 8px;
    border-left: 1px solid var(--c-border-soft);
    gap: 4px;
    width: 78px;
    flex-shrink: 0;
    justify-content: center;
  }
  .product-card-actions button {
    padding: 8px 4px;
    font-size: 10px;
    letter-spacing: 0;
  }
}

/* =============================================================================
   TOAST notifications (non-blocking, mobile-friendly)
   ============================================================================= */
.toast {
  position: fixed;
  bottom: 84px;     /* sits above the mobile bottom nav */
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--c-navy);
  color: #fff;
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(10, 22, 40, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 200;
  max-width: 90vw;
  text-align: center;
}
.toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast[data-kind="error"] { background: var(--c-accent); }
.toast[data-kind="success"] { background: #166534; }
@media (min-width: 768px) {
  .toast { bottom: 24px; }
}

/* =============================================================================
   PROFILE / ORDERS / QUOTES extras
   ============================================================================= */
.completion-bar {
  height: 8px;
  background: var(--c-bg-light);
  border-radius: 99px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.completion-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-primary), var(--c-yellow));
  transition: width 0.4s;
}
.dashboard-section-meta {
  font-size: 12px;
  color: var(--c-text-light);
  margin-top: 6px;
}

.address-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.address-item {
  background: var(--c-bg-light);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
}
.address-label { font-weight: 700; color: var(--c-navy); margin-bottom: 4px; }

.orders-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s;
}
.filter-pill:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-pill.is-active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* =============================================================================
   SEARCH AUTOCOMPLETE PANEL (live typeahead under search bar)
   ============================================================================= */
.search-ac-panel {
  position: absolute;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.12);
  max-height: 70vh;
  overflow-y: auto;
  z-index: 200;
}
.search-ac-item {
  display: flex;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border-soft);
  text-decoration: none !important;
  color: var(--c-text);
  align-items: center;
  transition: background 0.1s;
}
.search-ac-item:hover, .search-ac-item:focus { background: var(--c-bg-light); }
.search-ac-item:last-of-type { border-bottom: 0; }
.search-ac-image {
  width: 104px; height: 56px;   /* landscape box — RF assembly composites are ~2.3:1; square items just center */
  flex-shrink: 0;
  background: var(--c-bg-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.search-ac-image img { max-width: 100%; max-height: 100%; object-fit: contain; }
.search-ac-placeholder {
  font-weight: 700;
  color: var(--c-primary);
  font-size: 14px;
  letter-spacing: -0.02em;
}
.search-ac-body { flex: 1; min-width: 0; }
.search-ac-pn {
  font-size: 11px;
  color: var(--c-text-light);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.search-ac-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-navy);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-ac-alt {
  font-size: 11px;
  color: var(--c-yellow);
  background: var(--c-navy);
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  margin-top: 3px;
  font-weight: 600;
}
.search-ac-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 4px;
}
.search-ac-price { font-size: 14px; font-weight: 700; color: var(--c-primary); }
.search-ac-stock { font-size: 10px; padding: 2px 7px; border-radius: 99px; font-weight: 700; }
.search-ac-stock--in { background: #dcfce7; color: #166534; }
.search-ac-stock--lead { background: #dbeafe; color: #1e40af; }
.search-ac-empty {
  padding: 20px;
  text-align: center;
  color: var(--c-text-muted);
  font-size: 13px;
}
.search-ac-footer {
  display: block;
  padding: 10px 14px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--c-primary);
  background: var(--c-bg-light);
  border-top: 1px solid var(--c-border);
}
.search-ac-item--instant {
  background: linear-gradient(90deg, rgba(255,204,0,0.08), transparent);
}
.search-ac-item--instant .search-ac-placeholder {
  color: var(--c-accent);
  font-size: 24px;
}

/* =============================================================================
   MOBILE — tighter page padding across all surfaces (app feel)
   ============================================================================= */
@media (max-width: 767px) {
  .product-detail,
  .category-page,
  .search-page,
  .cart-page,
  .auth-page,
  .dashboard {
    padding-left: 12px;
    padding-right: 12px;
  }
  /* Bigger touch targets on form inputs */
  input[type="search"],
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  select {
    font-size: 16px !important;  /* prevents iOS auto-zoom on focus */
    min-height: 44px;
  }
}

.dashboard-section {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 22px;
}
.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.dashboard-section-head h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0;
}
.dashboard-link { font-size: 13px; color: var(--c-primary); font-weight: 600; }
.dashboard-empty {
  padding: 28px;
  text-align: center;
  color: var(--c-text-muted);
}
.dashboard-empty p { margin-bottom: 16px; }
.dashboard-cta {
  background: var(--c-accent);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
}
.dashboard-cta:hover { background: var(--c-accent-dk); color: #fff; text-decoration: none; }

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.orders-table th, .orders-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-border); }
.orders-table th { font-size: 11px; text-transform: uppercase; color: var(--c-text-light); letter-spacing: 0.06em; }
.orders-table td.num, .orders-table th.num { text-align: right; }
.orders-table tr:last-child td { border-bottom: 0; }
.orders-table .muted { color: var(--c-text-lighter); }

.status-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill--pending     { background: #fef3c7; color: #92400e; }
.status-pill--processing  { background: #dbeafe; color: #1e40af; }
.status-pill--shipped     { background: #c7e9d3; color: #14532d; }
.status-pill--delivered   { background: #dcfce7; color: #166534; }
.status-pill--canceled    { background: #fee2e2; color: #991b1b; }
.status-pill--on_hold     { background: #f3e8ff; color: #6b21a8; }

.dashboard-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  font-size: 14px;
}
.dashboard-meta dt { font-weight: 600; color: var(--c-text-muted); }
.dashboard-meta dd { color: var(--c-text); margin: 0; }

/* =============================================================================
   PRODUCT DETAIL — section card layout, mirrors PIM inventory page
   ============================================================================= */
.product-detail {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 24px 60px;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--c-text-light);
  margin-bottom: 16px;
}
.breadcrumbs a { color: var(--c-text-light); }
.breadcrumbs a:hover { color: var(--c-primary); }
.breadcrumbs .current { color: var(--c-text); font-weight: 600; }
.breadcrumbs span[aria-hidden] { margin: 0 8px; color: var(--c-text-lighter); }

.pd-section { margin-bottom: 18px; }
.pd-card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.pd-card-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--c-border);
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.pd-card-sub { font-size: 13px; color: var(--c-text-muted); margin-bottom: 12px; }
.pd-coming-soon { color: var(--c-text-lighter); font-style: italic; }
.pd-coming-soon-block {
  text-align: center;
  padding: 28px 16px;
  color: var(--c-text-muted);
}
.pd-coming-soon-hint { font-size: 12px; color: var(--c-text-light); margin-top: 8px; }

/* Header section — gallery + info side-by-side */
.pd-header {
  display: grid;
  grid-template-columns: minmax(280px, 480px) 1fr;
  gap: 32px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.pd-gallery { display: flex; flex-direction: column; gap: 12px; }
.pd-image-main {
  background: var(--c-bg-light);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
}
.pd-image-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.pd-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pd-thumb {
  width: 64px; height: 64px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  padding: 4px;
  transition: border-color 0.15s;
}
.pd-thumb:hover { border-color: var(--c-primary); }
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; }

.pd-info { display: flex; flex-direction: column; gap: 12px; }
.pd-pn-row { display: flex; align-items: center; gap: 10px; }
.pd-pn { font-size: 12px; color: var(--c-text-light); font-weight: 600; letter-spacing: 0.04em; }
.pd-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pd-tag--instant { background: var(--c-yellow); color: var(--c-navy); }
.pd-title { font-size: 22px; font-weight: 700; color: var(--c-navy); line-height: 1.3; margin: 0; }
.pd-short { font-size: 14px; color: var(--c-text-muted); line-height: 1.6; }

.pd-stock {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}
.pd-stock strong { font-weight: 700; }
.stock-badge--in   { background: #dcfce7; color: #166534; border-left: 3px solid #16a34a; }
.stock-badge--lead { background: #dbeafe; color: #1e40af; border-left: 3px solid #2563eb; }

.pd-pricing {
  background: var(--c-bg-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 4px 0;
}
.pd-price-row { display: flex; align-items: baseline; gap: 12px; }
.pd-price-label { font-size: 12px; color: var(--c-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.pd-price-value { font-size: 28px; font-weight: 700; color: var(--c-primary); }
.pd-price-note { display: block; font-size: 12px; color: var(--c-text-light); margin-top: 6px; }

.pd-add-form { display: flex; gap: 10px; margin: 8px 0; }
.pd-qty input {
  width: 70px;
  padding: 11px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: inherit;
  font-size: 14px;
}
.pd-add-btn { flex: 1; }

.pd-meta {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  font-size: 12px;
  color: var(--c-text-muted);
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--c-border);
}
.pd-meta li { padding: 2px 0; }
.pd-meta strong { color: var(--c-text); font-weight: 600; }

/* Inventory grid */
.pd-inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.pd-inventory-item {
  padding: 12px 14px;
  background: var(--c-bg-light);
  border-radius: var(--radius);
}
.pd-inventory-label { font-size: 11px; color: var(--c-text-light); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 4px; }
.pd-inventory-value { font-size: 16px; font-weight: 700; color: var(--c-text); }
.pd-inventory-value.stock-badge--in { color: #166534; }
.pd-inventory-value.stock-badge--lead { color: #1e40af; }

/* Spec table */
.pd-specs { width: 100%; border-collapse: collapse; font-size: 13px; }
.pd-specs th, .pd-specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--c-border); }
.pd-specs th { font-weight: 600; color: var(--c-text-muted); width: 40%; background: var(--c-bg-light); }
.pd-specs tr:last-child th, .pd-specs tr:last-child td { border-bottom: 0; }

.pd-long-desc { font-size: 14px; color: var(--c-text); line-height: 1.7; }

/* Tier pricing card */
.pd-tier-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pd-tier-table td { padding: 10px 12px; border-bottom: 1px solid var(--c-border); }
.pd-tier-table tr:first-child { font-weight: 700; }
.pd-tier-table tr:first-child td { color: var(--c-primary); font-size: 16px; }
.pd-tier-table tr:last-child td { border-bottom: 0; }
.pd-tier-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.pd-tier-strike { text-decoration: line-through; color: var(--c-text-light); font-weight: 400; }
.pd-tier-savings-val { color: #166534; font-weight: 700; }
.pd-tier-note { font-size: 12px; color: var(--c-text-light); margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-border); }

@media (max-width: 767px) {
  /* ============== PRODUCT DETAIL — condensed mobile (app feel) ============== */
  .product-detail { padding: 12px 12px 96px; }
  .breadcrumbs { display: none; }   /* breadcrumbs eat space; bottom nav handles back */

  /* Header section: image LEFT (compact 40% width), info RIGHT */
  .pd-header {
    grid-template-columns: 130px 1fr;
    padding: 12px;
    gap: 12px;
    border-radius: var(--radius);
  }
  .pd-image-main {
    aspect-ratio: 1 / 1;
    padding: 6px;
    background: var(--c-bg-light);
    border-radius: var(--radius-sm);
  }
  .pd-image-main img { padding: 4px; }
  .pd-thumbs {
    grid-column: 1 / -1;          /* span both columns below */
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .pd-thumb { width: 56px; height: 56px; flex-shrink: 0; }

  .pd-info { gap: 6px; }
  .pd-pn { font-size: 10px; }
  .pd-title { font-size: 15px; line-height: 1.3; }
  .pd-short {
    font-size: 12px;
    line-height: 1.4;
    /* clamp to 2 lines, "Read more" toggle could come later */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .pd-stock { font-size: 11px; padding: 5px 9px; margin-top: 2px; }
  .pd-pricing {
    background: transparent;
    padding: 0;
    margin: 4px 0 2px;
  }
  .pd-price-value { font-size: 20px; }
  .pd-price-label { font-size: 10px; }
  .pd-price-note { font-size: 10px; margin-top: 2px; }

  /* Hide the meta list on header — show in dedicated card below */
  .pd-info .pd-meta { display: none; }

  /* Sticky Add-to-Cart bar (already styled earlier — keep) */

  /* Section cards — tighter padding */
  .pd-card { padding: 14px; }
  .pd-card-head { font-size: 11px; padding-bottom: 8px; margin-bottom: 10px; }

  /* Inventory: 2x2 grid on phone, but compact tiles */
  .pd-inventory-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pd-inventory-item { padding: 8px 10px; }
  .pd-inventory-label { font-size: 10px; }
  .pd-inventory-value { font-size: 14px; }

  /* Spec table — compact rows */
  .pd-specs th, .pd-specs td { padding: 7px 10px; font-size: 12px; }
  .pd-specs th { width: 38%; }

  /* Long description — reasonable size */
  .pd-long-desc { font-size: 13px; line-height: 1.6; }

  /* Tier pricing card */
  .pd-tier-table td { padding: 8px 10px; font-size: 13px; }
  .pd-tier-table tr:first-child td { font-size: 14px; }

  /* Hide the in-flow Add-to-Cart form (sticky bar replaces it) — but on
     mobile we do want a final 'jump to cart' as the page already has
     the sticky bottom CTA. So actually the sticky bar IS the form. */
}

/* =============================================================================
   CART
   ============================================================================= */
.cart-page {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 32px 24px 60px;
}
.cart-headline {
  font-size: 28px;
  font-weight: 700;
  color: var(--c-navy);
  margin-bottom: 24px;
}
.cart-count-badge {
  display: inline-block;
  background: var(--c-bg-info);
  color: var(--c-primary);
  padding: 2px 12px;
  border-radius: 99px;
  font-size: 14px;
  vertical-align: middle;
  margin-left: 8px;
  font-weight: 700;
}

.cart-empty {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 60px 24px;
  text-align: center;
}
.cart-empty h2 { font-size: 22px; color: var(--c-navy); margin-bottom: 10px; }
.cart-empty p  { color: var(--c-text-muted); margin-bottom: 24px; }
.cart-empty-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.cart-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.cart-items {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 8px 0;
}
.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--c-border);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item-image img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
.cart-item-image--placeholder {
  width: 80px; height: 80px;
  background: var(--c-bg-light);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-text-lighter); font-size: 11px;
}
.cart-item-pn { font-size: 12px; color: var(--c-text-light); font-weight: 600; margin-bottom: 4px; }
.cart-item-tag {
  display: inline-block;
  background: var(--c-yellow);
  color: var(--c-navy);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cart-item-title { font-size: 14px; font-weight: 600; color: var(--c-navy); }
.cart-item-notes { font-size: 12px; color: var(--c-text-muted); margin-top: 4px; }
.cart-item-qty input {
  width: 64px;
  padding: 6px 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-family: inherit;
  font-size: 14px;
}
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--c-text); min-width: 80px; text-align: right; }
.cart-item-remove button {
  background: transparent;
  border: 0;
  color: var(--c-text-lighter);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.cart-item-remove button:hover { background: #fee2e2; color: var(--c-accent); }

.cart-summary {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 200px;
}
.cart-summary h2 { font-size: 16px; font-weight: 700; color: var(--c-navy); margin-bottom: 18px; }
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.cart-summary-row .num { font-weight: 600; }
.cart-summary-row--muted { color: var(--c-text-light); font-size: 13px; }
.cart-summary-row--total {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-navy);
  margin-top: 12px;
  padding-top: 14px;
  border-top: 2px solid var(--c-border);
}
.cart-summary-row--total .num { color: var(--c-primary); }
.cart-summary .btn { margin-top: 12px; }

@media (max-width: 767px) {
  /* Page-level density */
  .cart-page { padding: 12px 12px 180px; }
  .cart-headline { font-size: 22px; margin-bottom: 12px; }
  .cart-grid { grid-template-columns: 1fr; gap: 0; }
  .cart-items { border-radius: var(--radius); }

  /* Cart item — image spans both rows; row 1: title; row 2: qty + price + × */
  .cart-item {
    grid-template-columns: 56px 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 4px 8px;
    padding: 8px 10px;
    align-items: center;
  }
  .cart-item-image { grid-column: 1; grid-row: 1 / 3; align-self: center; }
  .cart-item-image img,
  .cart-item-image--placeholder { width: 56px; height: 56px; }
  .cart-item-image img { padding: 3px; }

  .cart-item-body {
    grid-column: 2 / 5;
    grid-row: 1;
    min-width: 0;
  }
  .cart-item-pn { font-size: 10px; margin-bottom: 1px; line-height: 1.2; }
  .cart-item-tag { font-size: 9px; padding: 1px 5px; margin-left: 4px; }
  .cart-item-title {
    font-size: 13px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .cart-item-notes { display: none; }

  .cart-item-qty { grid-column: 2; grid-row: 2; }
  /* Override the global "44px min-height" rule for the small qty input */
  .cart-item-qty input {
    width: 52px !important;
    min-height: 30px !important;
    padding: 3px 6px !important;
    font-size: 14px !important;
  }

  .cart-item-price {
    grid-column: 3;
    grid-row: 2;
    font-size: 14px;
    min-width: 0;
    text-align: right;
  }

  .cart-item-remove { grid-column: 4; grid-row: 2; }
  .cart-item-remove button {
    font-size: 20px;
    padding: 0 6px;
    line-height: 1;
  }

  /* Summary — compact sticky bar at bottom */
  .cart-summary {
    padding: 10px 14px;
  }
  .cart-summary-row {
    padding: 3px 0;
    font-size: 13px;
  }
  .cart-summary-row--total {
    margin-top: 4px;
    padding-top: 6px;
    font-size: 15px;
  }
  .cart-summary .btn--primary {
    padding: 11px;
    margin-top: 6px;
    font-size: 14px;
  }
}

/* =============================================================================
   Saved-address picker — checkout + addresses page
   ========================================================================== */
.addr-picker {
  margin-bottom: 18px;
}
.addr-picker-head {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4a5568;
  margin-bottom: 8px;
}
.addr-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.addr-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.addr-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.addr-card input[type="radio"] {
  margin: 2px 0 0;
  flex-shrink: 0;
}
.addr-card:has(input[type="radio"]:checked) {
  border-color: #0072BC;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.12);
}
.addr-card-body {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #334155;
}
.addr-card-label {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
  font-size: 13px;
}
.addr-card-line {
  font-size: 12px;
  color: #475569;
}
.addr-card--new {
  border-style: dashed;
  background: #fafbfc;
}
.addr-card--new .addr-card-label {
  color: #0072BC;
}

@media (max-width: 720px) {
  .addr-picker-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .addr-card {
    padding: 10px 12px;
  }
}

/* =============================================================================
   Address book page (/account/addresses)
   ========================================================================== */
.addr-list {
  display: grid;
  gap: 10px;
}
.addr-list-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  gap: 14px;
}
.addr-list-body { flex: 1; min-width: 0; font-size: 13px; color: #334155; line-height: 1.5; }
.addr-list-label { font-weight: 700; color: #1e293b; margin-bottom: 4px; }
.addr-list-actions { display: flex; gap: 8px; flex-shrink: 0; }
.addr-list-actions form { margin: 0; }
.addr-list-del {
  background: #fff;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.addr-list-del:hover { background: #fef2f2; }

@media (max-width: 720px) {
  .addr-list-row {
    flex-direction: column;
    gap: 10px;
  }
  .addr-list-actions { width: 100%; }
  .addr-list-del { flex: 1; }
}

/* =============================================================================
   CRM-aligned customer portal styling (added 2026-04-27)
   Owner direction: customer dashboard adopts the CRM contact-mirror look
   for a more professional internal feel. Reuses the same class system as
   crm.css so a future shared-stylesheet refactor is trivial.
   ============================================================================= */

/* Top banner — yellow strip with name/context, mirrors CRM .mirror-banner */
.mirror-banner {
  background: linear-gradient(180deg, #ffd000, #ffcc00);
  color: var(--c-navy);
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 2px solid #d4a900;
  flex-wrap: wrap;
}
.mirror-banner-left strong { font-weight: 700; }
.mirror-banner-actions { display: flex; gap: 8px; }
.banner-link {
  color: var(--c-navy);
  text-decoration: underline;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 3px;
}
.banner-link:hover { background: rgba(0,0,0,0.08); text-decoration: none; }

/* Two-column layout — left card + right rail (1fr + 380px) */
.mirror-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 980px) {
  .mirror-grid { grid-template-columns: 1fr; }
  .admin-panel { position: static; }
}

.customer-view {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

/* Customer info header — name + email/phone + company + tier card */
.contact-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--c-border);
  gap: 16px;
  flex-wrap: wrap;
}
.contact-name { font-size: 22px; font-weight: 700; color: var(--c-navy); margin-bottom: 4px; }
.contact-meta { font-size: 13px; color: var(--c-text-muted); margin-bottom: 2px; }
.contact-meta a { color: var(--c-text); }
.contact-meta a:hover { color: var(--c-primary); }
.contact-tier {
  background: linear-gradient(135deg, #C0C0C0, #fff);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  text-align: right;
  min-width: 200px;
}
.contact-tier-name { font-size: 16px; font-weight: 700; color: var(--c-navy); }
.contact-tier-meta { font-size: 11px; color: var(--c-text-light); margin-top: 2px; }
.contact-tier--gold     { background: linear-gradient(135deg, #FFD700, #fff); }
.contact-tier--silver   { background: linear-gradient(135deg, #C0C0C0, #fff); }
.contact-tier--bronze   { background: linear-gradient(135deg, #CD7F32, #fff); }
.contact-tier--platinum { background: linear-gradient(135deg, #E5E4E2, #fff); }
.contact-tier--bare     { background: #fafbfd; }

/* KPI tiles — matches CRM .kpi system */
.kpis {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: center;
}
.kpi-num { font-size: 24px; font-weight: 700; color: var(--c-primary); line-height: 1; margin-bottom: 4px; }
.kpi-label { font-size: 10px; font-weight: 700; color: var(--c-text-muted); letter-spacing: 0.04em; text-transform: uppercase; }
.kpi--clickable {
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  color: inherit;
  display: block;
}
.kpi--clickable:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
  border-color: var(--c-primary);
  text-decoration: none;
}
.kpi--cart-active {
  background: linear-gradient(135deg, #fff7ed, #fff);
  border-color: #ea580c;
}
.kpi--cart-active .kpi-num { color: #ea580c; }
.kpi--cart-active .kpi-label { color: #9a3412; }
.kpi--cart-active.kpi--clickable:hover {
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.18);
  border-color: #ea580c;
}
.kpi--spend {
  background: linear-gradient(135deg, var(--c-bg-info), #fff);
  border-color: var(--c-primary);
}
.kpi--spend .kpi-num { color: var(--c-accent); font-size: 20px; }
.kpi--spend.kpi--clickable:hover { box-shadow: 0 4px 12px rgba(0, 114, 188, 0.18); }

/* Sections inside the customer-view card */
.section { margin-bottom: 24px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-head h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.section-link { font-size: 12px; font-weight: 600; color: var(--c-primary); }

/* Status filter pills (drill-in from a KPI tile to a filtered table) */
.orders-filter { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.filter-pill:hover { border-color: var(--c-primary); color: var(--c-primary); }
.filter-pill.is-active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

/* Origin badge (web order vs converted-quote) */
.origin-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.origin-badge--quote { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.origin-badge--web   { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

/* Data tables (matches CRM .data) */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
table.data th, table.data td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--c-border); }
table.data th { font-size: 10px; text-transform: uppercase; color: var(--c-text-light); letter-spacing: 0.06em; font-weight: 700; background: var(--c-bg-light); }
table.data td.num, table.data th.num { text-align: right; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover { background: rgba(0, 114, 188, 0.03); }

/* Status pills (matches CRM) */
.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pill--pending    { background: #fef3c7; color: #92400e; }
.status-pill--processing { background: #dbeafe; color: #1e40af; }
.status-pill--shipped    { background: #c7e9d3; color: #14532d; }
.status-pill--delivered  { background: #dcfce7; color: #166534; }
.status-pill--canceled   { background: #fee2e2; color: #991b1b; }
.status-pill--on_hold    { background: #fde68a; color: #78350f; }

/* Right rail — customer-side equivalent of CRM's admin panel.
   Contains: customer info card + quick-link nav (Dashboard / Orders /
   Quotes / Profile / Addresses / Rewards / Logout). */
.admin-panel {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel-head h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
.panel-head-meta { font-size: 11px; color: var(--c-text-light); }

.account-summary { font-size: 13px; color: var(--c-text-muted); line-height: 1.55; }
.account-summary-name { font-size: 16px; font-weight: 700; color: var(--c-navy); margin-bottom: 4px; }
.account-summary-line { margin-bottom: 2px; }
.account-summary a { color: var(--c-text); }

.quick-actions { display: flex; flex-direction: column; gap: 6px; }
.qa-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--c-border);
  background: #fff;
  color: var(--c-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.qa-btn:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  background: rgba(0, 114, 188, 0.04);
  text-decoration: none;
}
.qa-btn.is-active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}
.qa-btn--accent { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.qa-btn--accent:hover { background: var(--c-accent-dk); border-color: var(--c-accent-dk); color: #fff; }
.qa-btn--ghost { background: transparent; color: var(--c-text-muted); }

/* LinkedIn connect/connected button — sits next to the user's name in
   the right-rail account-summary. Brand blue (#0A66C2). */
.qa-btn--linkedin {
  background: #0A66C2;
  color: #fff;
  border-color: #0A66C2;
  margin: 8px 0;
  font-size: 12px;
  padding: 8px 12px;
  justify-content: center;
}
.qa-btn--linkedin:hover {
  background: #094a8c;
  border-color: #094a8c;
  color: #fff;
  text-decoration: none;
}
.qa-btn--linkedin svg { flex-shrink: 0; }

/* Empty-state slot */
.section-empty {
  padding: 24px;
  background: var(--c-bg-light);
  border: 1px dashed var(--c-border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 13px;
  color: var(--c-text-muted);
}

/* =============================================================================
   PROFILE PAGE — compact, compartmentalized layout (owner direction 2026-04-27)
   Sections become tight cards in a 2-col grid where it makes sense; renames
   "Shipping addresses" -> "Addresses" since the same address book is used for
   both billing and shipping.
   ============================================================================= */

.profile-page { padding: 18px 20px; }

.profile-flash {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}
.profile-flash--ok  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.profile-flash--err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

/* Slim horizontal completion strip (replaces full section block) */
.profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--c-text-muted);
  flex-wrap: wrap;
}
.profile-strip-meta { white-space: nowrap; }
.profile-strip-meta strong { color: var(--c-navy); }
.profile-strip-bar { flex: 1; height: 8px; min-width: 120px; }

/* Two-col grid for paired sections (collapses on narrow viewports) */
.profile-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (max-width: 768px) {
  .profile-grid { grid-template-columns: 1fr; }
}

/* Compact card — used for each compartmentalized block */
.profile-card {
  background: var(--c-bg-light);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.profile-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--c-navy);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.profile-card-head .section-link { font-size: 11px; }

/* Tight form layout inside profile cards */
.profile-form { display: flex; flex-direction: column; gap: 8px; }
.profile-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: var(--c-text);
}
.profile-form label span {
  font-weight: 600;
  font-size: 11px;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.profile-form label span small {
  text-transform: none;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--c-text-lighter);
}
.profile-form input {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--c-text);
  background: #fff;
}
.profile-form input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 2px rgba(0, 114, 188, 0.15);
}
.profile-form input:disabled { background: #f7f9fc; color: var(--c-text-light); }
.profile-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.profile-form--inline {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}
@media (max-width: 600px) {
  .profile-form--inline { grid-template-columns: 1fr; }
}

.profile-btn {
  align-self: flex-start;
  background: var(--c-accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 7px 18px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s;
  letter-spacing: 0.02em;
}
.profile-btn:hover { background: var(--c-accent-dk); }

/* Compact dl for Account details */
.profile-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 14px;
  margin: 0;
  font-size: 12px;
}
.profile-meta dt {
  color: var(--c-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10px;
  padding-top: 2px;
}
.profile-meta dd { margin: 0; color: var(--c-text); }

/* Compact address list — one line per address */
.profile-addr-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--c-text);
}
.profile-addr-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--c-border);
}
.profile-addr-list li:last-child { border-bottom: 0; }

.profile-empty {
  margin: 0;
  font-size: 12px;
  color: var(--c-text-muted);
  font-style: italic;
}

/* Compact variant of the reward-list grid — single column inside a
   profile-card column so cards don't get too narrow. */
.reward-list--compact { grid-template-columns: 1fr !important; gap: 10px !important; }
.reward-list--compact .reward-card { padding: 10px 12px; }
.reward-list--compact .reward-name { font-size: 13px; }
.reward-list--compact .reward-desc { font-size: 12px; margin-bottom: 6px; }
.reward-list--compact .reward-merch { font-size: 11px; padding: 6px 8px; margin-bottom: 6px; }
.reward-list--compact .reward-meta { font-size: 10px; }

/* Compact rules list */
.reward-rules--compact { font-size: 12px; line-height: 1.6; }
.reward-rules--compact li { margin-bottom: 4px; }

/* Tighten the addr-list rows when nested in a profile-card */
.profile-card .addr-list { display: flex; flex-direction: column; gap: 8px; }
.profile-card .addr-list-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.profile-card .addr-list-body { line-height: 1.5; }
.profile-card .addr-list-label { font-weight: 700; color: var(--c-navy); margin-bottom: 2px; }
.profile-card .addr-list-del {
  background: transparent;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s;
}
.profile-card .addr-list-del:hover { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

