/* ============================================
   bike&rider.co.uk — Price Comparison Engine
   Clean professional light theme
   Brand accent: #3ab54a (B&R green)
   ============================================ */

:root {
  --bg-primary:    #ffffff;
  --bg-secondary:  #f4f5f7;
  --bg-card:       #ffffff;
  --bg-card-hover: #fafafa;
  --bg-sidebar:    #f9f9f7;

  --text-primary:   #111218;
  --text-secondary: #4b5563;
  --text-muted:     #9ca3af;

  --accent:         #3ab54a;
  --accent-hover:   #2ea340;
  --accent-dim:     rgba(58,181,74,0.10);
  --accent-border:  rgba(58,181,74,0.35);

  --green:          #3ab54a;
  --green-dim:      rgba(58,181,74,0.10);
  --amber:          #d97706;
  --amber-dim:      rgba(217,119,6,0.10);
  --red:            #dc2626;
  --red-dim:        rgba(220,38,38,0.10);
  --blue:           #2563eb;

  --border:         #e5e7eb;
  --border-hover:   #d1d5db;

  --radius-sm: 5px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-xs:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card:  0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px rgba(0,0,0,0.04);
  --shadow-modal: 0 20px 60px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);

  --font-display: 'Bebas Neue', sans-serif;
  --font-mono:    'DM Mono', monospace;
  --font-body:    'Barlow', sans-serif;

  --header-h: 64px;
  --trust-h:  38px;
  --sidebar-w: 252px;
  --transition: 0.14s ease;
}

/* Dark theme toggle */
body.dark {
  --bg-primary:    #0d0d0d;
  --bg-secondary:  #141414;
  --bg-card:       #1a1a1a;
  --bg-card-hover: #202020;
  --bg-sidebar:    #111111;
  --text-primary:   #f0ede8;
  --text-secondary: #9a9590;
  --text-muted:     #555550;
  --border:         rgba(255,255,255,0.07);
  --border-hover:   rgba(255,255,255,0.13);
  --shadow-xs:   0 1px 3px rgba(0,0,0,0.4);
  --shadow-card: 0 2px 16px rgba(0,0,0,0.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-secondary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: background var(--transition);
}

.header-inner {
  max-width: 1480px; margin: 0 auto;
  height: 100%; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
}

.logo-link { text-decoration: none; flex-shrink: 0; }
.logo { display: flex; align-items: center; }
.site-logo-img { height: 46px; width: auto; display: block; }
@media (max-width: 600px) { .site-logo-img { height: 34px; } }
.logo-badge { flex-shrink: 0; }
.logo-text {
  font-family: 'Arial Black', Impact, sans-serif;
  font-style: italic;
  font-weight: 900;
  font-size: 21px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 0;
}
.logo-bike  { color: var(--text-primary); }
.logo-amp   { color: var(--text-muted); font-size: 17px; margin: 0 1px; }
.logo-rider { color: var(--accent); }
.logo-tld   { color: var(--text-muted); font-size: 12px; font-weight: 700; }

.header-nav { display: flex; gap: 0; flex: 1; }
.nav-link {
  padding: 6px 13px; font-size: 13px; font-weight: 500;
  color: var(--text-secondary); border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-secondary); }
.nav-link.active { color: var(--accent); font-weight: 600; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px; margin-left: 4px;
}

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.live-indicator {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--green); font-family: var(--font-mono);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px rgba(58,181,74,0.2);
  animation: blink 2.5s infinite;
}
.live-dot.stale { background: var(--amber); box-shadow: 0 0 0 2px rgba(217,119,6,0.2); }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.4} }
.last-updated { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

.btn-ghost {
  padding: 6px 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; background: var(--bg-primary);
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--bg-secondary); }
.icon-btn { padding: 6px 10px; }

/* ===== TRUST BAR ===== */
.trust-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  height: var(--trust-h);
  display: flex; align-items: center;
  font-size: 12px; color: var(--text-muted);
  overflow: hidden;
}
.trust-inner {
  max-width: 1480px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 24px;
  white-space: nowrap;
}
.trust-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-secondary);
}
.trust-item svg { color: var(--accent); flex-shrink: 0; }
.trust-sep { color: var(--border-hover); }

/* ===== HERO ===== */
.hero {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px 36px;
}
.hero-inner {
  max-width: 1480px; margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
}
.hero-content { flex: 1; max-width: 680px; }
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05; letter-spacing: 0.02em;
  color: var(--text-primary); margin-bottom: 10px;
}
.hero-title .accent { color: var(--accent); }
.hero-sub {
  font-size: 14px; color: var(--text-secondary);
  margin-bottom: 22px; font-weight: 400; line-height: 1.6;
}
.hero-sub strong { color: var(--text-primary); font-weight: 600; }
.hero-logo-large { flex-shrink: 0; opacity: 0.12; }
@media (max-width: 700px) { .hero-logo-large { display: none; } }

/* SEARCH */
.search-bar { position: relative; max-width: 580px; margin-bottom: 24px; }
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none;
}
.search-input {
  width: 100%; height: 48px;
  background: var(--bg-primary); border: 1.5px solid var(--border);
  border-radius: var(--radius-md); color: var(--text-primary);
  font-size: 14px; padding: 0 42px 0 44px; outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-xs);
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 12px; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all var(--transition);
}
.search-clear:hover { background: var(--bg-secondary); color: var(--text-primary); }
.search-suggestions {
  position: absolute; top: calc(100% + 5px); left: 0; right: 0;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden; z-index: 50; display: none;
  box-shadow: var(--shadow-card);
}
.search-suggestions.open { display: block; }
.suggestion-item {
  padding: 10px 14px; font-size: 13px; color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: background var(--transition); border-bottom: 1px solid var(--border);
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
.sug-cat { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); margin-left: auto; text-transform: uppercase; }
.sug-price { font-family: var(--font-mono); font-size: 12px; color: var(--green); }

/* STATS */
.stats-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.stat-item { display: flex; flex-direction: column; gap: 1px; }
.stat-num { font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--text-primary); }
.stat-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
.stat-divider { width: 1px; height: 28px; background: var(--border); }

/* ===== CATEGORY BAR ===== */
.category-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 90;
}
.category-inner {
  max-width: 1480px; margin: 0 auto; padding: 0 24px;
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
}
.category-inner::-webkit-scrollbar { display: none; }
.cat-tab {
  padding: 12px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: all var(--transition); border-radius: 0; background: none;
}
.cat-tab:hover { color: var(--text-primary); }
.cat-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ===== LAYOUT ===== */
.app-main { max-width: 1480px; margin: 0 auto; padding: 0 24px 80px; }
.app-layout { display: grid; grid-template-columns: var(--sidebar-w) 1fr; gap: 20px; padding-top: 20px; }

/* ===== SIDEBAR ===== */
.sidebar {
  display: flex; flex-direction: column; gap: 0;
  align-self: start; position: sticky;
  top: calc(var(--header-h) + 50px);
  max-height: calc(100vh - var(--header-h) - 70px);
  overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}
.sidebar-section {
  padding: 14px 15px;
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 9px;
}
.sidebar-section:last-child { border-bottom: none; }
.sidebar-heading {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-secondary);
}

.select-control {
  width: 100%; padding: 8px 10px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary); font-size: 13px;
  outline: none; cursor: pointer; transition: border-color var(--transition);
}
.select-control:focus { border-color: var(--accent); }

/* RANGE */
.range-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.dual-range-wrap { position: relative; height: 24px; display: flex; align-items: center; }
.range-track { position: absolute; left: 0; right: 0; height: 3px; background: var(--border); border-radius: 2px; pointer-events: none; }
.range-fill { position: absolute; height: 100%; background: var(--accent); border-radius: 2px; }
.range-slider {
  position: absolute; width: 100%;
  -webkit-appearance: none; appearance: none;
  height: 3px; background: transparent; pointer-events: none; outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg-primary);
  pointer-events: all; cursor: pointer; box-shadow: var(--shadow-xs);
  transition: transform var(--transition), box-shadow var(--transition);
}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.15); box-shadow: 0 0 0 4px var(--accent-dim); }
.range-inputs { display: flex; align-items: center; gap: 6px; }
.price-input {
  flex: 1; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 12px; font-family: var(--font-mono); padding: 5px 7px; outline: none; width: 0;
}
.price-input:focus { border-color: var(--accent); }
.range-sep { color: var(--text-muted); font-size: 11px; }

/* CHECKBOXES */
.check-label {
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  color: var(--text-secondary); cursor: pointer; transition: color var(--transition); line-height: 1.3;
}
.check-label:hover { color: var(--text-primary); }
.check-label input[type="checkbox"] { display: none; }
.checkmark {
  width: 15px; height: 15px; border: 1.5px solid var(--border-hover);
  border-radius: 3px; flex-shrink: 0; position: relative; transition: all var(--transition);
  background: var(--bg-primary);
}
.check-label input:checked + .checkmark { background: var(--accent); border-color: var(--accent); }
.check-label input:checked + .checkmark::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 8px; border: 2px solid #fff;
  border-top: none; border-left: none; transform: rotate(45deg);
}

/* FILTER SEARCH */
.filter-search-wrap { margin-bottom: 2px; }
.filter-search-input {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-size: 12px; padding: 6px 8px; outline: none;
}
.filter-search-input:focus { border-color: var(--accent); }
.filter-list { display: flex; flex-direction: column; gap: 7px; max-height: 180px; overflow-y: auto; scrollbar-width: thin; }

/* ALERT BOX */
.alert-box {
  background: var(--accent-dim);
  border-top: 1px solid var(--accent-border) !important;
}
.alert-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }
.text-input {
  width: 100%; padding: 7px 10px; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-primary); font-size: 13px; outline: none;
  transition: border-color var(--transition);
}
.text-input::placeholder { color: var(--text-muted); }
.text-input:focus { border-color: var(--accent); }
.alert-row { display: flex; align-items: center; gap: 6px; }
.alert-pound { font-family: var(--font-mono); color: var(--text-secondary); font-size: 14px; flex-shrink: 0; }
.price-alert-input { flex: 1; }
.btn-primary {
  padding: 9px 18px; background: var(--accent); color: #fff;
  font-size: 13px; font-weight: 600; border-radius: var(--radius-sm);
  transition: background var(--transition), box-shadow var(--transition);
  border: none; cursor: pointer; font-family: var(--font-body);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(58,181,74,0.3); }
.btn-primary:active { transform: scale(0.98); }
.full-width { width: 100%; }
.alert-success { font-size: 12px; color: var(--green); text-align: center; padding: 4px 0; line-height: 1.4; }
.reset-btn {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  border: none !important; border-top: 1px solid var(--border) !important;
  padding: 11px; font-size: 12px; color: var(--text-muted);
}
.reset-btn:hover { color: var(--red); background: var(--red-dim); }

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.results-count { font-size: 13px; color: var(--text-secondary); white-space: nowrap; font-weight: 500; }
.active-filters { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; background: var(--accent-dim);
  border: 1px solid var(--accent-border); border-radius: 999px;
  font-size: 11px; color: var(--accent);
}
.filter-tag button { color: var(--accent); font-size: 10px; opacity: 0.7; }
.filter-tag button:hover { opacity: 1; }
.toolbar-right { display: flex; align-items: center; gap: 6px; }
.view-btn {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted);
  transition: all var(--transition); background: var(--bg-primary);
}
.view-btn:hover, .view-btn.active { border-color: var(--accent); color: var(--accent); }
.btn-compare {
  padding: 6px 12px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.btn-compare:hover { background: var(--accent-hover); }
.btn-refresh { font-size: 12px; padding: 6px 11px; }

/* ALERT STRIP */
.alert-strip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 13px; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: var(--radius-md);
  font-size: 13px; color: var(--amber); margin-bottom: 14px;
}
.strip-link { color: var(--amber); font-weight: 600; text-decoration: underline; margin-left: 4px; }
.strip-close { margin-left: auto; color: var(--text-muted); font-size: 11px; }
.strip-close:hover { color: var(--text-primary); }

/* LOADING */
.loading-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 80px 20px; gap: 16px;
}
.loading-state p { color: var(--text-muted); font-size: 13px; }
.spinner {
  width: 30px; height: 30px; border: 2px solid var(--border);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== PRODUCT GRID ===== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.product-grid.list-view { grid-template-columns: 1fr; }

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer; position: relative;
  animation: fadeUp 0.24s ease both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
.product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  transform: translateY(-2px);
  border-color: var(--border-hover);
}
.product-card.best-price { border-color: var(--accent-border); }
.product-card.best-price:hover { border-color: var(--accent); }

.card-image {
  height: 200px; position: relative; overflow: hidden;
  background: #f8f8f8;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--border);
}
.card-image img {
  width: 100%; height: 100%; object-fit: contain;
  padding: 16px; transition: transform 0.3s ease;
}
.product-card:hover .card-image img { transform: scale(1.04); }
.card-image-fallback { font-size: 52px; opacity: 0.12; user-select: none; }

.card-badges { position: absolute; top: 9px; left: 9px; display: flex; gap: 4px; flex-wrap: wrap; z-index: 2; }
.badge {
  padding: 2px 7px; border-radius: 999px; font-size: 10px;
  font-weight: 700; letter-spacing: 0.03em;
}
.badge-green  { background: var(--green-dim);  color: #16a34a; border: 1px solid rgba(22,163,74,0.25); }
.badge-amber  { background: var(--amber-dim);  color: var(--amber); border: 1px solid rgba(217,119,6,0.25); }
.badge-red    { background: var(--red-dim);    color: var(--red);   border: 1px solid rgba(220,38,38,0.25); }
.badge-accent { background: var(--accent-dim); color: var(--accent); border: 1px solid var(--accent-border); }
.badge-blue   { background: rgba(37,99,235,.08); color: var(--blue); border: 1px solid rgba(37,99,235,.2); }

.card-cat {
  position: absolute; top: 9px; right: 9px;
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(255,255,255,0.85); padding: 2px 6px;
  border-radius: 999px; border: 1px solid var(--border);
}
body.dark .card-cat { background: rgba(0,0,0,0.5); }

.card-watchlist {
  position: absolute; bottom: 9px; right: 9px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.9); border: 1px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; transition: all var(--transition); z-index: 2;
}
body.dark .card-watchlist { background: rgba(26,26,26,0.9); }
.card-watchlist:hover { border-color: var(--amber); transform: scale(1.1); }
.card-watchlist.active { background: var(--amber-dim); border-color: var(--amber); }

.card-body { padding: 14px; }
.card-brand {
  font-size: 10px; color: var(--accent); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 3px;
}
.card-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; line-height: 1.35; }
.card-spec { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.card-divider { height: 1px; background: var(--border); margin: 10px 0; }

/* Retailer logo rows on card */
.card-prices { display: flex; flex-direction: column; gap: 6px; }
.retailer-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.retailer-name {
  font-size: 12px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px; overflow: hidden; flex: 1;
}
.retailer-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.retailer-price { font-family: var(--font-mono); font-size: 13px; font-weight: 600; flex-shrink: 0; }
.retailer-price.best { color: var(--green); }
.retailer-price.high { color: var(--text-muted); }

.price-bar-wrap { background: var(--bg-secondary); border-radius: 3px; height: 3px; margin: 10px 0 4px; }
.price-bar { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.5s ease; }
.price-bar-label { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }

.sparkline-row { display: flex; align-items: flex-end; gap: 2px; height: 22px; margin-top: 8px; }
.spark-bar { flex: 1; border-radius: 2px 2px 0 0; background: var(--border); min-width: 3px; }
.spark-bar.hi { background: var(--accent); }
.spark-bar.lo { background: #16a34a; }

.card-footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 8px; margin-top: 12px;
}
.best-price-block { line-height: 1; }
.best-price-label {
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
  color: var(--green); letter-spacing: -0.5px;
}
.best-price-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.save-label { font-size: 10px; color: #16a34a; font-weight: 600; margin-top: 2px; }

.card-actions { display: flex; gap: 5px; }
.btn-sm {
  padding: 5px 10px; font-size: 11px; font-weight: 500;
  border-radius: var(--radius-sm); transition: all var(--transition);
  font-family: var(--font-body); cursor: pointer;
}
.btn-outline { border: 1px solid var(--border); color: var(--text-secondary); background: transparent; }
.btn-outline:hover { border-color: var(--border-hover); color: var(--text-primary); background: var(--bg-secondary); }
.btn-add-compare { border: 1px solid var(--border); color: var(--text-muted); background: transparent; }
.btn-add-compare.added { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* LIST VIEW */
.product-grid.list-view .product-card { display: grid; grid-template-columns: 130px 1fr; }
.product-grid.list-view .card-image { height: 100%; min-height: 130px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); border-bottom: none; border-right: 1px solid var(--border); }
.product-grid.list-view .sparkline-row { display: none; }

/* ===== COMPARE DRAWER ===== */
.compare-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--bg-primary); border-top: 2px solid var(--accent);
  max-height: 70vh; overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.compare-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg-primary); z-index: 1;
}
.compare-title { font-family: var(--font-display); font-size: 20px; letter-spacing: 0.04em; }
.compare-header-actions { display: flex; gap: 8px; }
.compare-grid { padding: 18px 22px; overflow-x: auto; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 500px; }
.compare-table th { text-align: left; padding: 10px 12px; font-weight: 600; border-bottom: 2px solid var(--border); color: var(--text-primary); }
.compare-table th:first-child { color: var(--text-muted); font-weight: 400; width: 130px; }
.compare-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.compare-table td:first-child { color: var(--text-muted); font-size: 12px; }
.compare-price { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: var(--green); }
.compare-win { background: rgba(58,181,74,0.05); }
.compare-buy-btn {
  display: inline-block; padding: 5px 10px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 600; border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.compare-buy-btn:hover { background: var(--accent-hover); color: #fff; }

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(4px); animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal {
  background: var(--bg-primary); border: 1px solid var(--border);
  border-radius: var(--radius-xl); width: 100%; max-width: 760px;
  max-height: 90vh; overflow-y: auto; position: relative;
  animation: scaleIn 0.18s ease; box-shadow: var(--shadow-modal);
}
@keyframes scaleIn { from{opacity:0;transform:scale(0.96)} to{opacity:1;transform:scale(1)} }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted); z-index: 10; transition: all var(--transition);
}
.modal-close:hover { color: var(--text-primary); border-color: var(--border-hover); }
.modal-inner { padding: 28px; }

.modal-hero { display: flex; gap: 24px; margin-bottom: 24px; }
.modal-image {
  width: 170px; height: 170px; background: #f8f8f8;
  border-radius: var(--radius-lg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.modal-image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.modal-image-fallback { font-size: 70px; opacity: 0.15; }
.modal-info { flex: 1; }
.modal-brand { font-size: 11px; color: var(--accent); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 5px; }
.modal-name { font-family: var(--font-display); font-size: 28px; letter-spacing: 0.02em; line-height: 1.1; margin-bottom: 5px; }
.modal-spec { font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; }
.modal-best-price { font-family: var(--font-mono); font-size: 36px; font-weight: 700; color: var(--green); line-height: 1; }
.modal-price-sub { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.modal-section { margin-bottom: 24px; }
.modal-section-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

.modal-retailer-row {
  display: flex; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px;
}
.modal-retailer-row:last-child { border-bottom: none; }
.modal-retailer-name { flex: 1; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.modal-retailer-price { font-family: var(--font-mono); font-size: 17px; font-weight: 700; }
.modal-retailer-price.best { color: var(--green); }
.modal-retailer-diff { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); min-width: 50px; text-align: right; }
.modal-stock { font-size: 10px; font-weight: 600; }
.modal-stock.in { color: var(--green); }
.modal-stock.out { color: var(--red); }
.modal-visit-btn {
  padding: 7px 14px; background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 700; border-radius: var(--radius-sm);
  transition: background var(--transition), box-shadow var(--transition);
  font-family: var(--font-body); cursor: pointer; border: none; white-space: nowrap;
}
.modal-visit-btn:hover { background: var(--accent-hover); box-shadow: 0 2px 8px rgba(58,181,74,0.3); }

.chart-wrap { position: relative; height: 200px; }

.modal-specs-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spec-item { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 10px 12px; border: 1px solid var(--border); }
.spec-label { font-size: 10px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 3px; }
.spec-value { font-size: 13px; font-weight: 600; color: var(--text-primary); }

.modal-actions { display: flex; gap: 8px; margin-top: 14px; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 80px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { font-size: 17px; font-weight: 600; margin-bottom: 7px; }
.empty-state p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* LOAD MORE */
.load-more-wrap { text-align: center; padding: 28px 0; }
.load-more { padding: 10px 32px; font-size: 13px; }

/* TOAST */
.toast {
  position: fixed; bottom: 22px; right: 22px; background: var(--text-primary);
  color: var(--bg-primary); border-radius: var(--radius-md);
  padding: 11px 16px; font-size: 13px; z-index: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); opacity: 0; transform: translateY(8px);
  transition: all 0.2s ease; pointer-events: none; max-width: 280px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* FOOTER */
.site-footer {
  background: var(--bg-primary); border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner { max-width: 1480px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo-text { font-family: 'Arial Black', sans-serif; font-style: italic; font-size: 16px; font-weight: 900; color: var(--text-muted); }
.footer-logo-text .accent { color: var(--accent); }
.footer-text { font-size: 12px; color: var(--text-muted); line-height: 1.7; max-width: 680px; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { font-size: 12px; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--text-primary); }
.footer-retailers { display: flex; flex-direction: column; gap: 8px; }
.footer-ret-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; }
#footer-retailers-list { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.footer-ret-chip {
  display: flex; align-items: center; height: 26px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden;
  background: var(--bg-secondary);
}
.footer-ret-chip img { height: 22px; width: auto; max-width: 80px; object-fit: contain; padding: 2px 4px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .sidebar {
    position: static; max-height: none;
    display: none; /* mobile: toggle sidebar */
  }
  .sidebar.open { display: flex; }
}

@media (max-width: 600px) {
  .hero { padding: 24px 16px 20px; }
  .app-main { padding: 0 16px 60px; }
  .header-inner { padding: 0 16px; gap: 12px; }
  .header-nav { display: none; }
  .trust-inner { gap: 12px; }
  .modal-hero { flex-direction: column; }
  .modal-image { width: 100%; height: 160px; }
}
