/* ============================================================
   Kelowna Vapes — design tokens
   Base: near-black, warm white wordmark, ember/blue flame accent
   Display type: Oswald (condensed, signage feel)
   Body type: Work Sans (clean, geometric)
   ============================================================ */

:root {
  --bg: #0d0e11;
  --bg-elevated: #17191d;
  --bg-elevated-2: #1e2126;
  --line: #2a2d33;
  --text: #f5f4f0;
  --muted: #9a9da3;
  --ember: #ff6a2b;
  --ember-soft: #ff8a52;
  --blue: #2e7dd6;
  --blue-soft: #5b9be8;
  --amber: #ffb238;
  --teal: #2dd4bf;
  --ember-glow: rgba(255,106,43,.18);
  --blue-glow: rgba(46,125,214,.18);
  --danger: #e5484d;
  --radius: 3px;
  --max-w: 1120px;
  --font-display: 'Oswald', sans-serif;
  --font-body: 'Work Sans', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  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; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  line-height: 1.05;
}

p { max-width: 62ch; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Flame mark, reused across the site */
.flame {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(13, 14, 17, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.02em;
}

.wordmark .flame { width: 1.3em; height: 1.3em; }

.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.active { color: var(--text); }

.main-nav a { position: relative; }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: linear-gradient(90deg, var(--ember), var(--blue));
  border-radius: 2px;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text) !important;
}

.cart-link:hover { border-color: var(--ember); }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(480px 320px at 8% 0%, var(--ember-glow), transparent 70%),
    radial-gradient(420px 300px at 55% 30%, var(--blue-glow), transparent 70%);
}

.section-head h2, .section-head h1 {
  position: relative;
  padding-left: 16px;
}

.section-head h2::before, .section-head h1::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  bottom: .15em;
  width: 4px;
  background: linear-gradient(180deg, var(--ember), var(--blue));
  border-radius: 2px;
}

.hero-mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 10vw, 128px);
  line-height: 0.92;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.12em;
}

.hero-mark .flame {
  width: 0.72em;
  height: 0.72em;
}

.hero-tagline {
  color: var(--muted);
  font-size: 19px;
  margin-top: 20px;
  max-width: 46ch;
}

.hero-strip {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero-strip div { font-size: 14px; color: var(--muted); }
.hero-strip strong {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 13px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(90deg, var(--ember), var(--blue));
  color: #0d0e11;
}

.btn-outline {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover { border-color: var(--ember); }

.btn-block { width: 100%; text-align: center; }

/* ---------- Section shell ---------- */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--line); }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.section-head p { color: var(--muted); margin: 0; }

/* ---------- Category tiles ---------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.tile {
  background: var(--bg);
  padding: 28px 20px;
  text-decoration: none;
  color: var(--text);
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.15s ease;
  border-top: 3px solid var(--accent, var(--ember));
}

.tile:hover { background: var(--bg-elevated); }
.tile[data-cat="Disposables"] { --accent: var(--ember); }
.tile[data-cat="Devices"] { --accent: var(--blue); }
.tile[data-cat="E-Liquids"] { --accent: var(--amber); }
.tile[data-cat="Accessories"] { --accent: var(--teal); }
.tile span { color: var(--muted); font-size: 14px; }
.tile h3 { font-size: 18px; margin: 0; }

/* ---------- Product grid ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.filter-btn:hover { color: var(--text); }
.filter-btn.active {
  color: #0d0e11;
  background: linear-gradient(90deg, var(--ember), var(--blue));
  border-color: transparent;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.product-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent, var(--ember));
  border-radius: var(--radius);
  padding: 22px;
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card[data-cat="Disposables"] { --accent: var(--ember); }
.product-card[data-cat="Devices"] { --accent: var(--blue); }
.product-card[data-cat="E-Liquids"] { --accent: var(--amber); }
.product-card[data-cat="Accessories"] { --accent: var(--teal); }

.product-cat {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent, var(--muted));
}

.product-card h3 {
  font-size: 18px;
  margin: 0;
}

.product-desc {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  flex-grow: 1;
}

.product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.product-price {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ember-soft);
}

.add-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.add-btn:hover { border-color: var(--ember); }

/* ---------- Info / about ---------- */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.info-list dt {
  color: var(--muted);
  font-size: 13px;
  margin-top: 18px;
}

.info-list dt:first-child { margin-top: 0; }

.info-list dd {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
}

.map-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  height: 320px;
}

.map-wrap iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.4) invert(0.92) contrast(0.9); }

/* ---------- Contact form ---------- */
.form-grid { display: grid; gap: 18px; max-width: 480px; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

input, textarea, select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
}

input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

textarea { resize: vertical; min-height: 120px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--muted);
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-note {
  max-width: 60ch;
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
}

/* ---------- Age gate ---------- */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(9, 10, 12, 0.97);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.age-gate[hidden] { display: none; }

.age-card {
  max-width: 420px;
  text-align: center;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  padding: 44px 32px;
  border-radius: var(--radius);
}

.age-card .flame { width: 44px; height: 44px; margin-bottom: 18px; }

.age-card h2 { font-size: 22px; }
.age-card p { color: var(--muted); font-size: 14px; margin: 0 auto 26px; }

.age-actions { display: flex; gap: 12px; justify-content: center; }

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 92vw;
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--line);
  z-index: 90;
  transition: right 0.2s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open { right: 0; }

.cart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.cart-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
}

.cart-items { flex-grow: 1; overflow-y: auto; padding: 12px 22px; }

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cart-item-name { font-weight: 600; }
.cart-item-meta { color: var(--muted); font-size: 13px; }

.cart-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  padding: 0;
}

.cart-empty { color: var(--muted); padding: 30px 0; font-size: 14px; }

.cart-footer { padding: 20px 22px; border-top: 1px solid var(--line); }

.cart-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 16px;
}

.cart-total span:last-child { color: var(--ember); }

.age-card {
  border-top: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--ember), var(--blue)) 1;
}

.info-list dt {
  position: relative;
  padding-left: 12px;
}

.info-list dt::before {
  content: "";
  position: absolute;
  left: 0; top: .35em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ember);
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.scrim.open { opacity: 1; pointer-events: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .main-nav { position: fixed; inset: 76px 0 0 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 28px 24px; gap: 22px; display: none; }
  .main-nav.open { display: flex; }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--line);
    color: var(--text);
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
  }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

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