/* ========== Root Theme ========== */
:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --accent: #0ea5e9;
  --ink: #111827;
  --muted: #6b7280;
  --bg: #f3f4f6;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  --focus: 0 0 0 3px rgba(37, 99, 235, 0.35);
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #e11d48;
  --star: #ffb703;
}

/* Reset-ish */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: Inter, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.5;
}
h1,
h2,
h3 {
  font-family: Poppins, Inter, system-ui, sans-serif;
}
img {
  max-width: 100%;
  height: auto;
}
a {
  text-decoration: none;
  color: var(--primary);
}
a:focus,
button:focus,
.form-control:focus {
  outline: none;
  box-shadow: var(--focus);
}
.container-narrow {
  max-width: 1100px;
  margin: auto;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}
.topbar {
  font-size: 0.875rem;
  background: var(--bg);
  padding: 0.35rem 0;
}
.header-main {
  padding: 0.7rem 0;
}
.brand-logo svg {
  height: 36px;
  width: auto;
}
.searchbar {
  position: relative;
}
.searchbar input {
  padding-left: 2.25rem;
  border-radius: 999px;
}
.searchbar .bi-search {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
}
.nav-cta .btn {
  border-radius: 999px;
}

/* Mega menu */
.mega-menu .dropdown-menu {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 760px;
  padding: 1rem;
}

/* USP strip */
.usp-strip {
  background: #0f172a;
  color: #e5e7eb;
}
.usp-pill {
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
}
.usp-pill .bi {
  font-size: 1rem;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #e0f2fe 0%, #eef2ff 100%);
}
.hero .badge {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}
.hero-cta .btn {
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
}

/* Cards */
.card-elev {
  border: 1px solid #e5e7eb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-elev .card-img-top {
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}
.price {
  font-weight: 800;
  color: var(--ink);
}
.mrp {
  color: var(--muted);
  text-decoration: line-through;
}
.badge-emi {
  background: #e0f2fe;
  color: #0369a1;
}
.badge-stock {
  background: #dcfce7;
  color: #166534;
}
.rating .bi-star-fill {
  color: var(--star);
}

/* Sidebar filters */
.filter-card .form-range {
  accent-color: var(--primary);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

/* Swiper sizes */
.swiper {
  --swiper-pagination-color: var(--primary);
}
.deals-swiper .swiper-slide {
  height: auto;
}
.brand-wall img {
  height: 28px;
  opacity: 0.85;
  filter: grayscale(1);
  transition: all 0.25s;
}
.brand-wall img:hover {
  filter: none;
  opacity: 1;
}

/* Tabs (product) */
.nav-tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 600;
}
.nav-tabs .nav-link.active {
  border-color: var(--primary);
  color: var(--primary);
}

/* Timeline (track repair) */
.timeline {
  position: relative;
  padding-left: 1.25rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.timeline-item {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #a7f3d0;
  border: 2px solid #10b981;
}

/* Loader */
.loader-wrap {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.loader {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 6px solid #e5e7eb;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.app-footer {
  background: #0b1220;
  color: #cbd5e1;
}
.app-footer a {
  color: #e2e8f0;
}
.footer-mini {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

/* Utilities */
.section {
  padding: 64px 0;
}
.section-sm {
  padding: 40px 0;
}
.kbd {
  border: 1px solid #e5e7eb;
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 0.1rem 0.3rem;
  background: #fff;
}
.focus-ring:focus {
  box-shadow: var(--focus);
}
