/* VAR Technical — Global Stylesheet
   Brand: Crimson primary, white/black neutrals
   Tone: Enterprise B2B IT reseller (CDW-class)
*/

:root {
  /* Brand */
  --vt-crimson: #B0142E;
  --vt-crimson-dark: #8A0E22;
  --vt-crimson-light: #E63E5C;
  --vt-crimson-50: #FBEEF1;

  /* Neutrals */
  --vt-ink: #111111;
  --vt-ink-2: #2A2A2A;
  --vt-ink-3: #4A4A4A;
  --vt-muted: #6B6B6B;
  --vt-line: #E5E5E5;
  --vt-line-2: #D4D4D4;
  --vt-bg: #FFFFFF;
  --vt-bg-soft: #F7F7F7;
  --vt-bg-warm: #FAF7F2;
  --vt-black: #0A0A0A;

  /* Semantic */
  --vt-success: #1B7A3E;
  --vt-warn: #B8860B;
  --vt-danger: #B0142E;
  --vt-info: #1E3A8A;

  /* Type */
  --vt-font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --vt-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Shadow */
  --vt-shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --vt-shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --vt-shadow-lg: 0 8px 24px rgba(0,0,0,0.10);

  /* Radius */
  --vt-r-sm: 4px;
  --vt-r-md: 6px;
  --vt-r-lg: 10px;

  /* Layout */
  --vt-container: 1280px;
  --vt-container-wide: 1440px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--vt-font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--vt-ink);
  background: var(--vt-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

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

button { font-family: inherit; cursor: pointer; }

/* ---------- Container ---------- */
.vt-container {
  max-width: var(--vt-container);
  margin: 0 auto;
  padding: 0 24px;
}
.vt-container-wide {
  max-width: var(--vt-container-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Logo ---------- */
.vt-logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: var(--vt-font-display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -0.02em;
  color: var(--vt-crimson);
  line-height: 1;
}
.vt-logo .vt-logo-mark {
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-right: 8px;
}
.vt-logo .vt-logo-tech {
  color: var(--vt-ink);
  font-weight: 400;
  margin-left: 6px;
  font-style: italic;
}
.vt-logo-sm { font-size: 20px; }
.vt-logo-sm .vt-logo-mark { width: 24px; height: 24px; }

/* white version */
.vt-logo-light { color: #fff; }
.vt-logo-light .vt-logo-tech { color: rgba(255,255,255,0.85); }

/* ---------- Top utility bar ---------- */
.vt-utility {
  background: var(--vt-black);
  color: #fff;
  font-size: 12px;
}
.vt-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 32px;
}
.vt-utility a { color: rgba(255,255,255,0.85); padding: 0 12px; border-right: 1px solid rgba(255,255,255,0.15); }
.vt-utility a:last-child { border-right: 0; }
.vt-utility a:hover { color: #fff; text-decoration: none; }
.vt-utility-left, .vt-utility-right { display: flex; align-items: center; }
.vt-utility-promo { font-weight: 600; padding-left: 0 !important; }
.vt-utility-promo strong { color: var(--vt-crimson-light); }

/* ---------- Header ---------- */
.vt-header {
  background: #fff;
  border-bottom: 1px solid var(--vt-line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.vt-header-main {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}
.vt-header-search {
  flex: 1;
  position: relative;
}
.vt-header-search input {
  width: 100%;
  height: 44px;
  padding: 0 48px 0 16px;
  border: 2px solid var(--vt-line-2);
  border-radius: var(--vt-r-md);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.vt-header-search input:focus {
  outline: none;
  border-color: var(--vt-crimson);
}
.vt-header-search button {
  position: absolute;
  right: 4px;
  top: 4px;
  height: 36px;
  width: 40px;
  background: var(--vt-crimson);
  border: none;
  border-radius: var(--vt-r-sm);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vt-header-search button:hover { background: var(--vt-crimson-dark); }

.vt-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.vt-header-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--vt-ink-2);
  border-radius: var(--vt-r-sm);
  position: relative;
}
.vt-header-action:hover { background: var(--vt-bg-soft); text-decoration: none; }
.vt-header-action svg { flex-shrink: 0; }
.vt-cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--vt-crimson);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Nav bar */
.vt-nav {
  border-top: 1px solid var(--vt-line);
}
.vt-nav-inner {
  display: flex;
  align-items: stretch;
}
.vt-nav-item {
  display: flex;
  align-items: center;
  padding: 0 18px;
  height: 44px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vt-ink);
  position: relative;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.vt-nav-item:hover {
  color: var(--vt-crimson);
  text-decoration: none;
  border-bottom-color: var(--vt-crimson);
}
.vt-nav-item.is-active {
  color: var(--vt-crimson);
  border-bottom-color: var(--vt-crimson);
}
.vt-nav-item.vt-nav-deals {
  background: var(--vt-crimson);
  color: #fff;
  margin-left: -1px;
  padding: 0 16px;
  font-weight: 700;
  border-bottom: 0;
}
.vt-nav-item.vt-nav-deals:hover {
  background: var(--vt-crimson-dark);
  color: #fff;
  border-bottom: 0;
}

.vt-nav-spacer { flex: 1; }
.vt-nav-secondary {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--vt-muted);
}
.vt-nav-secondary a {
  padding: 0 12px;
  height: 44px;
  display: flex;
  align-items: center;
}
.vt-nav-secondary a:hover { color: var(--vt-crimson); text-decoration: none; }

/* ---------- Mega-menu (CSS-only hover) ---------- */
.vt-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid var(--vt-line);
  border-bottom: 1px solid var(--vt-line);
  box-shadow: var(--vt-shadow-lg);
  display: none;
  z-index: 50;
}
.vt-nav-item:hover .vt-mega,
.vt-nav-item:focus-within .vt-mega { display: block; }

.vt-mega-inner {
  display: grid;
  grid-template-columns: 220px 1fr;
  max-width: var(--vt-container);
  margin: 0 auto;
  padding: 24px;
  gap: 24px;
}
.vt-mega-left {
  border-right: 1px solid var(--vt-line);
  padding-right: 16px;
}
.vt-mega-left a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--vt-ink-2);
  font-weight: 500;
  border-radius: 4px;
}
.vt-mega-left a:hover { background: var(--vt-bg-soft); color: var(--vt-crimson); text-decoration: none; }
.vt-mega-left a.is-active { background: var(--vt-crimson-50); color: var(--vt-crimson); }

.vt-mega-right h4 {
  font-family: var(--vt-font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vt-muted);
  margin: 0 0 12px 0;
  font-weight: 700;
}
.vt-mega-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 32px;
}
.vt-mega-group h5 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--vt-ink);
}
.vt-mega-group ul { list-style: none; padding: 0; margin: 0; }
.vt-mega-group li a {
  display: block;
  padding: 4px 0;
  font-size: 13px;
  color: var(--vt-ink-3);
}
.vt-mega-group li a:hover { color: var(--vt-crimson); text-decoration: underline; }

/* ---------- Buttons ---------- */
.vt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--vt-r-sm);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background 120ms, border-color 120ms;
  white-space: nowrap;
}
.vt-btn:hover { text-decoration: none; }
.vt-btn-primary {
  background: var(--vt-crimson);
  color: #fff;
  border-color: var(--vt-crimson);
}
.vt-btn-primary:hover { background: var(--vt-crimson-dark); border-color: var(--vt-crimson-dark); }
.vt-btn-dark {
  background: var(--vt-black);
  color: #fff;
  border-color: var(--vt-black);
}
.vt-btn-dark:hover { background: #2a2a2a; }
.vt-btn-outline {
  background: #fff;
  color: var(--vt-ink);
  border-color: var(--vt-ink);
}
.vt-btn-outline:hover { background: var(--vt-bg-soft); }
.vt-btn-ghost {
  background: transparent;
  color: var(--vt-ink);
}
.vt-btn-ghost:hover { background: var(--vt-bg-soft); }
.vt-btn-lg { padding: 14px 28px; font-size: 15px; }
.vt-btn-sm { padding: 6px 12px; font-size: 12px; }
.vt-btn-block { display: flex; width: 100%; }

/* ---------- Footer ---------- */
.vt-footer {
  background: var(--vt-black);
  color: rgba(255,255,255,0.85);
  padding: 56px 0 0;
  margin-top: 64px;
}
.vt-footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.vt-footer-brand p {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  margin: 16px 0 24px;
  max-width: 320px;
  line-height: 1.6;
}
.vt-footer-social {
  display: flex;
  gap: 12px;
}
.vt-footer-social a {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.vt-footer-social a:hover { border-color: var(--vt-crimson); color: var(--vt-crimson-light); text-decoration: none; }

.vt-footer-col h6 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
}
.vt-footer-col ul { list-style: none; padding: 0; margin: 0; }
.vt-footer-col li { margin-bottom: 8px; }
.vt-footer-col li a {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
}
.vt-footer-col li a:hover { color: #fff; text-decoration: underline; }

.vt-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 32px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
}
.vt-footer-bottom-links { display: flex; gap: 20px; }
.vt-footer-bottom-links a { color: rgba(255,255,255,0.7); }

.vt-footer-legal {
  background: #000;
  padding: 16px 0;
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

/* ---------- Cards (Product) ---------- */
.vt-product-card {
  background: #fff;
  border: 1px solid var(--vt-line);
  border-radius: var(--vt-r-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 120ms, border-color 120ms;
}
.vt-product-card:hover {
  border-color: var(--vt-line-2);
  box-shadow: var(--vt-shadow-md);
  text-decoration: none;
}
.vt-product-img {
  aspect-ratio: 1;
  background: #fff;
  border-radius: var(--vt-r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}
.vt-product-img img { max-width: 80%; max-height: 80%; object-fit: contain; }
.vt-product-brand {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vt-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.vt-product-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--vt-ink);
  margin: 0 0 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.vt-product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--vt-ink);
  margin-bottom: 4px;
  font-family: var(--vt-font-body);
}
.vt-product-price-label {
  font-size: 11px;
  color: var(--vt-muted);
  margin-bottom: 12px;
}
.vt-product-rating {
  font-size: 12px;
  color: var(--vt-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.vt-product-rating .stars { color: #F59E0B; letter-spacing: 1px; }
.vt-product-card .vt-btn { margin-top: auto; }

.vt-product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--vt-crimson);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 2px;
}
.vt-product-badge.is-new { background: var(--vt-info); }
.vt-product-badge.is-sample {
  background: rgba(0,0,0,0.7);
  letter-spacing: 0.1em;
}

/* ---------- Section helpers ---------- */
.vt-section { padding: 48px 0; }
.vt-section-tight { padding: 32px 0; }
.vt-section-loose { padding: 64px 0; }
.vt-section-dark { background: var(--vt-black); color: #fff; }
.vt-section-soft { background: var(--vt-bg-soft); }
.vt-section-warm { background: var(--vt-bg-warm); }
.vt-section-crimson { background: var(--vt-crimson); color: #fff; }

.vt-section-head {
  margin-bottom: 32px;
  text-align: center;
}
.vt-section-head h2 {
  font-family: var(--vt-font-display);
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.vt-section-head .eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--vt-crimson);
  margin-bottom: 8px;
  display: inline-block;
}
.vt-section-head p {
  color: var(--vt-ink-3);
  max-width: 640px;
  margin: 0 auto;
  font-size: 16px;
}

.vt-section-head-left { text-align: left; }
.vt-section-head-left p { margin-left: 0; }

/* ---------- Breadcrumbs ---------- */
.vt-breadcrumbs {
  font-size: 12px;
  color: var(--vt-muted);
  padding: 12px 0;
}
.vt-breadcrumbs a { color: var(--vt-muted); }
.vt-breadcrumbs a:hover { color: var(--vt-crimson); }
.vt-breadcrumbs .sep { margin: 0 6px; color: var(--vt-line-2); }
.vt-breadcrumbs .current { color: var(--vt-ink-2); }

/* ---------- Forms ---------- */
.vt-form-group { margin-bottom: 16px; }
.vt-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--vt-ink);
  margin-bottom: 6px;
}
.vt-form-group input,
.vt-form-group select,
.vt-form-group textarea {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--vt-line-2);
  border-radius: var(--vt-r-sm);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
.vt-form-group textarea { height: auto; padding: 12px 14px; }
.vt-form-group input:focus,
.vt-form-group select:focus,
.vt-form-group textarea:focus {
  outline: 2px solid var(--vt-crimson);
  outline-offset: -1px;
  border-color: var(--vt-crimson);
}
.vt-form-help { font-size: 12px; color: var(--vt-muted); margin-top: 4px; }
.vt-form-link { color: var(--vt-crimson); text-decoration: underline; font-size: 13px; font-weight: 600; }

/* ---------- Misc ---------- */
.vt-divider { height: 1px; background: var(--vt-line); border: 0; margin: 24px 0; }

.vt-stock-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--vt-success);
}
.vt-stock-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--vt-success);
}
.vt-stock-pill.is-low { color: var(--vt-warn); }
.vt-stock-pill.is-low::before { background: var(--vt-warn); }
.vt-stock-pill.is-out { color: var(--vt-muted); }
.vt-stock-pill.is-out::before { background: var(--vt-muted); }

.vt-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--vt-bg-soft);
  color: var(--vt-ink-2);
  border-radius: 2px;
}
.vt-tag.is-crimson { background: var(--vt-crimson-50); color: var(--vt-crimson); }

/* placeholder image fills (data-driven backgrounds) */
.vt-ph {
  background: linear-gradient(135deg, #F0F0F0, #E0E0E0);
  position: relative;
}
.vt-ph::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: rgba(0,0,0,0.35);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}

/* skip link for a11y / SEO */
.vt-skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.vt-skip:focus {
  left: 8px;
  top: 8px;
  background: var(--vt-ink);
  color: #fff;
  padding: 8px 12px;
  z-index: 9999;
}

/* Reusable product row grid (4-up on desktop) */
.vt-product-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ============================================================
   Pre-JS responsive fallback
   Most mobile rules live in chrome.js (so they win source order
   over per-page inline <style> blocks). These rules are the
   minimum that must be in place before chrome.js runs to avoid
   layout shift / horizontal scroll on first paint.
   ============================================================ */
@media (max-width: 960px) {
  .vt-container, .vt-container-wide { padding: 0 20px; }
  .vt-utility-right { display: none; }
  .vt-header-main { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
  .vt-header-search { order: 3; flex-basis: 100%; }
  .vt-header-action span { display: none; }
  .vt-nav-inner { display: none; }
  .vt-section { padding: 32px 0; }
  .vt-section-head h2 { font-size: 26px; line-height: 1.2; }
  .vt-footer { padding: 32px 0 0; margin-top: 40px; }
  .vt-footer-top { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .vt-footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .vt-mega { display: none !important; }
}
