/* shared.css — Kwacha Car Sales — Red/Green Brand Theme */
:root {
  --red: #D32F2F;
  --red-dark: #B71C1C;
  --red-light: #EF5350;
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --green-light: #43A047;
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #181818;
  --text: #f0f0f0;
  --text-muted: #9a9a9a;
  --glass-bg: rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);
  --glass-border-light: rgba(255,255,255,0.05);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.4);
  --glass-shadow-hover: 0 16px 48px rgba(211,47,47,0.2);
  --blur: blur(20px);
  --blur-strong: blur(32px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --accent: #D32F2F;
  --accent2: #2E7D32;
  --accent-glow: rgba(211,47,47,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; overflow-x: hidden; }

/* ── NAV ── */
.site-nav { background: rgba(10,10,10,0.95); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid rgba(211,47,47,0.2); position: sticky; top: 0; z-index: 900; }
.nav-row1 { max-width: 1200px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-row2 { max-width: 1200px; margin: 0 auto; padding: 0 24px 10px; display: flex; align-items: center; gap: 20px; }

.logo { display: flex; align-items: center; gap: 0; text-decoration: none; }
.logo-img { height: 44px; width: auto; }

.location-pill { display: flex; align-items: center; gap: 6px; background: rgba(211,47,47,0.08); border: 1px solid rgba(211,47,47,0.2); border-radius: 50px; padding: 6px 14px; font-size: 12px; font-weight: 600; color: #EF5350; cursor: pointer; }
.location-pill i { color: #D32F2F; }

.nav-links { display: flex; list-style: none; gap: 4px; flex: 1; }
.nav-links a { display: flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; transition: all 0.2s; letter-spacing: 0.3px; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.active { color: var(--text); background: rgba(211,47,47,0.12); border: 1px solid rgba(211,47,47,0.25); }
.nav-links a i { font-size: 12px; }
.sell-nav { background: linear-gradient(135deg,#D32F2F,#B71C1C) !important; color: #fff !important; border-radius: 10px; }
.sell-nav:hover { opacity: 0.9; background: linear-gradient(135deg,#D32F2F,#B71C1C) !important; color: #fff !important; }
.sell-nav.active { background: linear-gradient(135deg,#D32F2F,#B71C1C) !important; border: none !important; color:#fff !important; }

.search-bar { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 10px 16px; flex: 1; max-width: 380px; margin-left: auto; }
.search-bar i { color: var(--text-muted); font-size: 14px; }
.search-bar input { background: none; border: none; outline: none; color: var(--text); font-size: 13px; width: 100%; font-family: var(--font); }
.search-bar input::placeholder { color: var(--text-muted); }

/* ── PAGE CONTENT ── */
.page-content { min-height: 80vh; }

/* ── BUTTONS ── */
.btn-primary-glass { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: linear-gradient(135deg,#D32F2F,#B71C1C); color: #fff; border: none; border-radius: 14px; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.25s; box-shadow: 0 4px 20px rgba(211,47,47,0.3); }
.btn-primary-glass:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(211,47,47,0.4); color: #fff; }
.btn-outline-glass { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: transparent; color: var(--text); border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.25s; }
.btn-outline-glass:hover { border-color: rgba(211,47,47,0.4); color: var(--text); transform: translateY(-2px); }
.btn-green-glass { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; background: linear-gradient(135deg,#2E7D32,#1B5E20); color: #fff; border: none; border-radius: 14px; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none; transition: all 0.25s; box-shadow: 0 4px 20px rgba(46,125,50,0.3); }
.btn-green-glass:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(46,125,50,0.4); color: #fff; }

/* ── FOOTER ── */
footer { background: #050505; border-top: 1px solid rgba(211,47,47,0.15); padding: 56px 40px 32px; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; max-width: 1100px; margin: 0 auto; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.footer-brand .logo-img { height: 36px; }
.footer-col h4 { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #D32F2F; margin-bottom: 18px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-muted); text-decoration: none; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-socials { display: flex; gap: 10px; }
.footer-socials a { width: 36px; height: 36px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 14px; text-decoration: none; transition: all 0.2s; }
.footer-socials a:hover { border-color: rgba(211,47,47,0.4); color: #EF5350; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 28px; font-size: 12px; color: var(--text-muted); max-width: 1100px; margin: 0 auto; flex-wrap: wrap; gap: 8px; }

/* ── TOAST ── */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; background: rgba(10,10,10,0.95); border: 1px solid rgba(211,47,47,0.3); border-radius: 14px; padding: 14px 18px; font-size: 13px; font-weight: 600; color: var(--text); box-shadow: 0 8px 32px rgba(0,0,0,0.4); opacity: 0; transform: translateX(20px); transition: all 0.4s cubic-bezier(0.34,1.2,0.64,1); min-width: 240px; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.success { border-color: rgba(46,125,50,0.4); }
.toast i { color: #D32F2F; }
.toast.success i { color: #43A047; }

/* ── CHATBOT ── */
.kcs-chat-wrap { position: fixed; bottom: 110px; right: 22px; z-index: 998; }
.kcs-chat-bubble { width: 56px; height: 56px; background: linear-gradient(135deg,#D32F2F,#B71C1C); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 8px 24px rgba(211,47,47,0.4); position: relative; transition: all 0.3s; }
.kcs-chat-bubble:hover { transform: scale(1.08); }
.kcs-chat-avatar { width: 32px; height: 32px; overflow: hidden; border-radius: 50%; }
.kcs-chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kcs-notif-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; background: #43A047; border-radius: 50%; border: 2px solid var(--bg); }
.kcs-chat-panel { position: absolute; bottom: 70px; right: 0; width: 340px; background: rgba(10,10,10,0.98); border: 1px solid rgba(211,47,47,0.25); border-radius: 20px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); display: none; flex-direction: column; max-height: 480px; }
.kcs-chat-panel.open { display: flex; }
.kcs-chat-header { background: linear-gradient(135deg,#D32F2F,#B71C1C); padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.kcs-agent-avatar { width: 36px; height: 36px; background: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; }
.kcs-chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.kcs-msg { display: flex; }
.kcs-msg-bot { justify-content: flex-start; }
.kcs-msg-user { justify-content: flex-end; }
.kcs-msg-bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.5; }
.kcs-msg-bot .kcs-msg-bubble { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); color: var(--text); border-bottom-left-radius: 4px; }
.kcs-msg-user .kcs-msg-bubble { background: linear-gradient(135deg,#D32F2F,#B71C1C); color: #fff; border-bottom-right-radius: 4px; }
.kcs-quick-btns { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0; }
.kcs-quick-btns button { background: rgba(211,47,47,0.1); border: 1px solid rgba(211,47,47,0.25); border-radius: 20px; padding: 5px 10px; font-size: 11px; font-weight: 600; color: var(--text); cursor: pointer; transition: all 0.2s; font-family: var(--font); }
.kcs-quick-btns button:hover { background: rgba(211,47,47,0.2); border-color: rgba(211,47,47,0.4); }
.kcs-typing span { display: inline-block; width: 6px; height: 6px; background: var(--text-muted); border-radius: 50%; margin: 0 2px; animation: bounce 1.2s infinite; }
.kcs-typing span:nth-child(2) { animation-delay: 0.2s; }
.kcs-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-6px)} }
.kcs-chat-input-row { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,0.06); }
.kcs-chat-input-row input { flex: 1; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 10px; padding: 9px 12px; color: var(--text); font-size: 13px; outline: none; font-family: var(--font); }
.kcs-chat-input-row input:focus { border-color: rgba(211,47,47,0.35); }
.kcs-chat-input-row button { width: 36px; height: 36px; background: linear-gradient(135deg,#D32F2F,#B71C1C); border: none; border-radius: 10px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ── SUPPORT FAB ── */
.support-fab { position: fixed; bottom: 40px; right: 22px; width: 56px; height: 56px; background: linear-gradient(135deg,#2E7D32,#1B5E20); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; cursor: pointer; z-index: 999; box-shadow: 0 10px 25px rgba(46,125,50,0.4); transition: all 0.25s; }
.support-fab:hover { transform: scale(1.08); }
.support-card { position: fixed; bottom: 105px; right: 18px; width: 250px; background: rgba(8,8,8,0.97); border: 1px solid rgba(46,125,50,0.5); border-radius: 16px; padding: 16px; z-index: 999; box-shadow: 0 12px 30px rgba(0,0,0,0.5); }
.support-card h4 { margin: 0 0 10px; font-size: 14px; color: var(--text); border-bottom: 1px solid rgba(211,47,47,0.2); padding-bottom: 8px; }
.support-card p { color: #ccc; font-size: 12px; margin: 0.2rem 0; }
.support-card a { color: #EF5350; text-decoration: none; }
.support-card a:hover { text-decoration: underline; }

/* ── ANIMATIONS ── */
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* ── RESPONSIVE ── */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-row2 { flex-wrap: wrap; }
  .search-bar { max-width: 100%; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .nav-links a span { display: none; }
  .kcs-chat-panel { width: 300px; right: -10px; }
}
