/* ==========================================================================
   HasAuto — Stylesheet
   Design: industrial garage-gauge palette — graphite base, amber oil accent,
   coolant-teal secondary accent. Display type: condensed industrial stencil
   pairing (Oswald) over a clean geometric body face (Manrope).
   ========================================================================== */

:root {
  --bg: #12151a;
  --surface: #191d24;
  --surface-2: #1f242c;
  --surface-line: #2b313b;
  --ink: #eef0f2;
  --muted: #9aa3af;
  --muted-2: #6b7480;
  --accent: #e0a13a;      /* oil-gold */
  --accent-ink: #12151a;
  --accent-soft: rgba(224, 161, 58, 0.14);
  --coolant: #38b7b0;     /* antifreeze teal */
  --coolant-soft: rgba(56, 183, 176, 0.14);
  --danger: #e2604f;
  --radius: 10px;
  --radius-sm: 6px;
  --gutter: clamp(20px, 4vw, 64px);
  --maxw: 1280px;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-lg: 0 24px 60px -20px rgba(0,0,0,0.55);
  --shadow-md: 0 12px 30px -14px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
  margin: 0 0 0.4em;
  line-height: 1.08;
}
p { margin: 0 0 1em; color: var(--muted); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 88px 0; border-top: 1px solid var(--surface-line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12px; color: var(--accent); margin-bottom: 12px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--accent); display: inline-block; }
.section-title { font-size: clamp(28px, 3.4vw, 42px); }
.section-sub { max-width: 560px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 14px; font-weight: 600; padding: 14px 26px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #eeb257; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--surface-line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(18, 21, 26, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-line);
}
.header-row { display: flex; align-items: center; gap: 28px; padding: 16px 0; position: relative; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; letter-spacing: 0.03em; text-decoration: none; color: var(--ink); margin-right: auto; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: conic-gradient(from 200deg, var(--accent), var(--coolant), var(--accent)); position: relative; flex: none; }
.logo-mark::after { content: ''; position: absolute; inset: 6px; background: var(--bg); border-radius: 4px; }
.logo b { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; letter-spacing: .01em; transition: color .15s ease; }
.main-nav a:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 16px; }
.account-chip { font-size: 13px; color: var(--muted); white-space: nowrap; }
.account-chip strong { color: var(--accent); }
.cart-trigger { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--surface-line); background: var(--surface); cursor: pointer; color: var(--ink); }
.cart-trigger:hover { border-color: var(--accent); }
.cart-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.cart-count.show { display: inline-flex; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: var(--radius-sm); border: 1px solid var(--surface-line); background: var(--surface); color: var(--ink); cursor: pointer; }

body.is-logged-in .b2b-badge { background: var(--coolant); color: #08201f; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 80px; border-top: none; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto -10%; height: 620px;
  background: radial-gradient(60% 60% at 20% 20%, var(--accent-soft), transparent 70%),
              radial-gradient(50% 50% at 85% 10%, var(--coolant-soft), transparent 70%);
  pointer-events: none;
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero-title { font-size: clamp(38px, 5.4vw, 68px); }
.hero-title .stroke { -webkit-text-stroke: 1px var(--accent); color: transparent; }
.hero-lede { font-size: 17px; max-width: 480px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; flex-wrap: wrap; }
.hero-stat b { display: block; font-family: var(--font-display); font-size: 28px; color: var(--accent); }
.hero-stat span { font-size: 12px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; }

.gauge-card { position: relative; background: var(--surface); border: 1px solid var(--surface-line); border-radius: 20px; padding: 32px; box-shadow: var(--shadow-lg); }
.gauge-card .gauge-label { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted-2); margin-bottom: 18px; }
.gauge-dial { width: 100%; height: auto; }
.gauge-row { display: flex; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--surface-line); font-size: 13px; color: var(--muted); }
.gauge-row b { color: var(--ink); font-family: var(--font-display); font-size: 15px; letter-spacing: .02em; }

/* ---------- Brand strip ---------- */
.brand-strip { padding: 56px 0; }
.brand-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.brand-card { border-radius: 16px; padding: 32px; border: 1px solid var(--surface-line); position: relative; overflow: hidden; }
.brand-card.windex { background: linear-gradient(160deg, #1c2632, var(--surface)); }
.brand-card.zeith { background: linear-gradient(160deg, #241c30, var(--surface)); }
.brand-card .tag { font-family: var(--font-display); font-size: 13px; letter-spacing: .16em; }
.brand-card.windex .tag { color: var(--coolant); }
.brand-card.zeith .tag { color: var(--accent); }
.brand-card h3 { margin-top: 10px; font-size: 24px; }
.brand-card p { margin-bottom: 18px; }
.brand-card a { font-size: 13px; font-weight: 700; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--surface-line); padding-bottom: 2px; }
.brand-card a:hover { border-color: var(--accent); }

/* ---------- Product grids ---------- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-cat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.product-card {
  background: var(--surface); border: 1px solid var(--surface-line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s ease, transform .15s ease;
}
.product-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.product-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.product-media img { width: 78%; height: 78%; object-fit: contain; }
.product-brand-tag {
  position: absolute; top: 10px; left: 10px; font-family: var(--font-display); font-size: 11px; letter-spacing: .1em;
  padding: 4px 8px; border-radius: 4px; background: var(--surface); border: 1px solid var(--surface-line); color: var(--muted);
}
.product-brand-tag.windex { color: var(--coolant); border-color: rgba(56,183,176,.35); }
.product-brand-tag.zeith { color: var(--accent); border-color: rgba(224,161,58,.35); }
.product-body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); }
.product-title { font-size: 14.5px; text-transform: none; letter-spacing: 0; font-family: var(--font-body); font-weight: 700; margin: 0; line-height: 1.3; min-height: 2.6em; }
.product-spec { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.product-price-row { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; gap: 8px; }
.price-public { display: none; }
.price-b2b { font-family: var(--font-display); font-size: 20px; color: var(--ink); }
.price-old { display: none; }
body.is-logged-in .price-public { display: block; font-size: 12px; color: var(--muted-2); text-decoration: line-through; }
body.is-logged-in .price-b2b { color: var(--coolant); }
.b2b-badge { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--surface-line); white-space: nowrap; }
.order-btn {
  margin-top: 12px; width: 100%; padding: 11px; border-radius: var(--radius-sm); border: 1px solid var(--surface-line);
  background: transparent; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .15s ease;
}
.order-btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

/* ---------- Filter bar ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-bottom: 32px; align-items: center; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-divider { width: 1px; height: 22px; background: var(--surface-line); }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--surface-line); background: var(--surface);
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s ease;
}
.chip:hover { color: var(--ink); border-color: var(--muted-2); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.empty-state { display: none; text-align: center; padding: 60px 20px; color: var(--muted); border: 1px dashed var(--surface-line); border-radius: var(--radius); }

/* ---------- Partner / B2B section ---------- */
.partner-section { background: var(--surface); }
.partner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.partner-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.partner-points li { display: flex; gap: 12px; font-size: 14.5px; color: var(--ink); }
.partner-points li::before { content: '—'; color: var(--accent); font-weight: 700; }
.form-card { background: var(--surface-2); border: 1px solid var(--surface-line); border-radius: var(--radius); padding: 28px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--surface-line);
  background: var(--surface); color: var(--ink); font-family: inherit; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { resize: vertical; min-height: 90px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Footer ---------- */
.site-footer { padding: 56px 0 32px; border-top: 1px solid var(--surface-line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-col h4 { font-size: 13px; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--surface-line); font-size: 13px; color: var(--muted-2); flex-wrap: wrap; gap: 8px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); z-index: 100;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; padding: 13px 22px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: all .25s ease; box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Modal (login / checkout) ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(8, 10, 13, 0.72); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal-card { background: var(--surface); border: 1px solid var(--surface-line); border-radius: 16px; width: 100%; max-width: 440px; padding: 32px; max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: translateY(10px); transition: transform .2s ease; }
.modal-backdrop.open .modal-card { transform: translateY(0); }
.modal-card.wide { max-width: 560px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.modal-head h3 { margin: 0; font-size: 22px; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px; }
.modal-close:hover { color: var(--ink); }
.modal-note { font-size: 13px; color: var(--muted-2); margin-top: -8px; margin-bottom: 18px; }

/* ---------- Cart drawer ---------- */
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(8,10,13,.6); z-index: 80;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.cart-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 100%);
  background: var(--surface); border-left: 1px solid var(--surface-line); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .25s ease;
}
.cart-backdrop.open .cart-drawer { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--surface-line); }
.cart-head h3 { margin: 0; font-size: 18px; }
.cart-body { flex: 1; overflow-y: auto; padding: 18px 24px; display: flex; flex-direction: column; gap: 16px; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 0; }
.cart-item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--surface-line); }
.cart-item img { width: 64px; height: 64px; object-fit: contain; background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px; }
.cart-item-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.cart-item-spec { font-size: 12px; color: var(--muted-2); margin: 2px 0 8px; }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; }
.cart-qty { display: flex; align-items: center; gap: 10px; }
.cart-qty-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--surface-line); background: var(--surface-2); color: var(--ink); cursor: pointer; font-size: 14px; }
.cart-qty-btn:hover { border-color: var(--accent); }
.cart-qty-val { font-size: 13px; font-weight: 700; min-width: 14px; text-align: center; }
.cart-item-price { font-family: var(--font-display); font-size: 15px; }
.cart-item-remove { background: none; border: none; color: var(--danger); font-size: 12px; cursor: pointer; padding: 0; margin-top: 4px; }
.cart-footer { display: none; padding: 20px 24px; border-top: 1px solid var(--surface-line); }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-family: var(--font-display); font-size: 16px; }
.cart-total-row span:last-child { color: var(--accent); font-size: 22px; }

/* ---------- Checkout list ---------- */
.checkout-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; max-height: 180px; overflow-y: auto; }
.checkout-list-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 10px; border-bottom: 1px solid var(--surface-line); }
.checkout-list-row .name { color: var(--muted); }
.checkout-list-row .val { font-weight: 700; white-space: nowrap; }
.checkout-total-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; margin-bottom: 10px; border-top: 1px solid var(--surface-line); font-family: var(--font-display); font-size: 16px; }
.checkout-total-row span:last-child { color: var(--accent); font-size: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4, .grid-cat { grid-template-columns: repeat(2, 1fr); }
  .brand-cards { grid-template-columns: 1fr; }
  .partner-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}
@media (max-width: 560px) {
  .grid-4, .grid-cat { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 60px 0; }
  .field-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
