:root{
  --brand-blue:#146EB4;     /* Amazon-like blue for headings & strong actions */
  --brand-red:#E12424;      /* AliExpress-like red for primary CTA */
  --brand-green:#10B981;
  --text:#111827;
  --muted:#64748b;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --badge-on:#ecfdf5;
  --badge-off:#fff7ed;
  --border:#e5e7eb;
  --shadow:0 6px 18px rgba(0,0,0,.08);
}
[data-theme="dark"]{
  --text:#e5e7eb;
  --muted:#94a3b8;
  --surface:#0b1220;
  --surface-2:#0e1527;
  --border:#1f2937;
  --shadow:0 8px 24px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial;
  color:var(--text);
  background:var(--surface);
}

.container{max-width:1200px;margin:0 auto}
.pad{padding:24px 16px}
.pad-b{padding:8px 16px 24px}

/* HERO */
.heroWrap{
  position:relative;
  border-radius:18px;
  overflow:hidden;

  /* Background image */
  background: url("/hero-security.jpg") center center / cover no-repeat;

  /* Ensure hero has height so image shows */
  min-height: 420px;
}

/* Overlay for readability */
.heroWrap::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.55),
    rgba(0,0,0,0.25)
  );
  z-index:0;
}

/* Put content above overlay */
.heroContent{
  position:relative;
  z-index:1;
  padding:24px 16px;
}

.topBar{display:flex;align-items:center;gap:12px;margin-bottom:12px}
.logoWrap{display:flex;align-items:center;gap:10px}

/* ✅ UPDATED: Make logo bigger */
.brandLogo{
  width:100px !important;
  height:auto !important;
  max-width:none !important;
}

/* If you still keep .logoText anywhere */
.logoText{font-weight:800;font-size:20px;color:#fff}

.topControls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.spacer{flex:1}

/* INPUTS / BUTTONS */
.btn,.select,.input{
  border:1px solid var(--border);
  border-radius:12px;
  padding:.7rem .95rem;
  background:var(--surface);
  color:var(--text);
}
.input.small,.select.small{padding:.45rem .6rem;border-radius:10px}
.btn:hover{box-shadow:var(--shadow)}
.btn-icon{border:1px solid var(--border);border-radius:10px;padding:.45rem .6rem;background:var(--surface)}
.btn-primary{background:var(--brand-red);color:#fff;border-color:transparent}
.btn-blue{background:var(--brand-blue);color:#fff;border-color:transparent}

.searchBar{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top:10px;
}

/* Headline and subtitle readable on image */
.heroTitle{
  font-weight:900;
  font-size:44px;
  margin:6px 0;
  color:#ffffff;
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
.heroSub{
  color:#e5e7eb;
  max-width:900px;
  margin-top:6px;
  text-shadow: 0 2px 14px rgba(0,0,0,.30);
}

/* Category buttons row */
.catBar{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.catBtn{
  border:1px solid var(--border);
  background:rgba(255,255,255,.92);
  color:#111827;
  border-radius:999px;
  padding:.45rem .75rem;
  font-weight:800;
  cursor:pointer;
}
.catBtn:hover{
  box-shadow:var(--shadow);
  transform:translateY(-1px);
}

/* FILTERS */
.controlsRow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:10px}
.controlLabel{font-size:13px;color:#e5e7eb}
.budget{display:flex;align-items:center;gap:6px}
.budget .dash{opacity:.6}
.select{background:var(--surface)}

/* GRID / CARDS */
.grid{
  display:grid;
  gap:14px;
  margin-top:12px;
  grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
}

.card{border:1px solid var(--border);border-radius:14px;background:var(--surface);overflow:hidden}
.card-hover:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.media{position:relative;width:100%;padding-top:56%}
.media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cardBody{padding:14px}
.title{font-size:15px;font-weight:800;line-height:1.25;margin:.1rem 0 .35rem}
.price{font-size:22px;font-weight:900}
.metaRow{display:flex;gap:8px;font-size:13px;margin-top:6px;flex-wrap:wrap}
.badge{border:1px solid var(--border);border-radius:999px;padding:4px 9px;background:var(--surface-2)}

/* vendor chips still useful on results */
.badge.vendor[data-vendor="Amazon"]{border-color:#1877F2}
.badge.vendor[data-vendor="eBay"]{border-color:#10B981}
.badge.vendor[data-vendor="AliExpress"]{border-color:#E12424}

.shipMeta{font-size:12px;color:var(--muted);margin-top:8px}
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:10px;gap:8px}
.btn-mini{padding:.4rem .6rem;border-radius:10px}

/* Toast */
.toast{
  display:none;
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  padding:10px 14px;
  border-radius:10px;
  background:rgba(0,0,0,.8);
  color:#fff;
  z-index:40;
}

/* Footer */
.footer{padding:18px 0;border-top:1px solid var(--border);background:var(--surface)}
.footerInner{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px}
.footerLinks{display:flex;gap:12px;font-size:14px}

/* Chat (kept, but hidden) */
.chat-fab{
  position:fixed;
  right:18px;
  bottom:18px;
  border:0;
  border-radius:999px;
  padding:.8rem 1rem;
  background:var(--brand-blue);
  color:#fff;
  box-shadow:var(--shadow);
  z-index:40;
}
.chat-panel{
  position:fixed;
  right:18px;
  bottom:82px;
  width:340px;
  max-height:70vh;
  display:flex;
  flex-direction:column;
  border:1px solid var(--border);
  border-radius:14px;
  background:var(--surface);
  box-shadow:var(--shadow);
  z-index:40;
}
.chat-head{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-bottom:1px solid var(--border)}
.chat-title{font-weight:800}
.chat-messages{overflow:auto;padding:10px;display:flex;flex-direction:column;gap:8px}
.chat-msg{padding:8px 10px;border-radius:10px;background:var(--surface-2)}
.chat-msg.me{align-self:flex-end;background:#e8f1ff}
.chat-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--border)}
.chat-input{flex:1}
.chat-card{display:flex;gap:8px;border:1px solid var(--border);border-radius:10px;padding:6px;background:var(--surface)}
.chat-card img{width:64px;height:64px;object-fit:cover;border-radius:8px}

.moreWrap{display:flex;justify-content:center;margin-top:12px}
.sr-only{position:absolute;left:-9999px}

/* Small screens */
@media (max-width: 520px){
  .heroTitle{font-size:34px}
  .searchBar{flex-wrap:wrap}
  .chat-panel{right:10px;left:10px;width:auto}
  .heroWrap{min-height: 520px;}

  /* ✅ Smaller logo on mobile */
  .brandLogo{
    width:80px;
  }
}

/* Force-hide any old floating assistant button */
.chat-fab{display:none !important;}

/* Active category highlight */
.catBtn.active {
  background:#146EB4;
  color:#fff;
  border-color:#146EB4;
}

/* === FORCE HERO BACKGROUND IMAGE (final override) === */
.heroWrap{
  background: url("/hero-security.jpg") center center / cover no-repeat !important;
  min-height: 420px;
}
.heroWrap::before{
  background: linear-gradient(to right, rgba(0,0,0,0.55), rgba(0,0,0,0.25)) !important;
}
.heroContent{ position:relative; z-index:1; }
.heroTitle{ color:#ffffff !important; }
.heroSub{ color:#e5e7eb !important; }
.logoText{ color:#ffffff !important; }
