/* =============================================
   CBCEduKenya.com — Main Stylesheet
   Mobile-first | CBC & IGCSE Learning Hub
   ============================================= */

:root {
  --blue:    #1E40AF;
  --blue-dark: #1e3a8a;
  --blue-light: #3b82f6;
  --green:   #059669;
  --green-light: #10b981;
  --gold:    #F59E0B;
  --gold-light: #fbbf24;
  --white:   #ffffff;
  --gray-50: #f9fafb;
  --gray-100:#f3f4f6;
  --gray-200:#e5e7eb;
  --gray-400:#9ca3af;
  --gray-600:#4b5563;
  --gray-800:#1f2937;
  --red:     #dc2626;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.12);
  --shadow:    0 4px 12px rgba(0,0,0,.10);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.15);
  --radius:  8px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; outline: none; }
input, select, textarea { outline: none; }

/* TYPOGRAPHY */
h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p  { font-size: 0.95rem; color: var(--gray-600); }

/* UTILITY */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.text-blue { color: var(--blue); }
.text-green { color: var(--green); }
.text-gold { color: var(--gold); }
.fw-bold { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* =============================================
   BADGES & PILLS
   ============================================= */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.badge-blue   { background: var(--blue); color: #fff; }
.badge-green  { background: var(--green); color: #fff; }
.badge-gold   { background: var(--gold); color: #fff; }
.badge-gray   { background: var(--gray-200); color: var(--gray-600); }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(30,64,175,.3);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-green {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,.3);
}
.btn-green:hover { background: #047857; transform: translateY(-1px); }
.btn-gold {
  background: var(--gold);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.btn-gold:hover { background: #d97706; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white {
  background: #fff;
  color: var(--blue);
}
.btn-white:hover { background: var(--gray-100); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-mpesa {
  background: #00A651;
  color: #fff;
  font-size: 1rem;
  padding: 0.8rem 1.8rem;
}
.btn-mpesa:hover { background: #007a3c; }

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
  background: var(--blue-dark);
  color: #cbd5e1;
  font-size: 0.78rem;
  padding: 0.35rem 0;
  display: none;
}
@media (min-width: 768px) { .topbar { display: block; } }
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a { color: var(--gold); }
.topbar a:hover { text-decoration: underline; }
.topbar-left { display: flex; gap: 1.2rem; align-items: center; }
.topbar-right { display: flex; gap: 1rem; align-items: center; }

/* =============================================
   HEADER / NAVIGATION
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow);
}
.nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
}
.logo-text .site-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.1;
}
.logo-text .site-tagline {
  font-size: 0.65rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: 0.1rem;
  flex: 1;
}
@media (min-width: 1024px) { .nav-links { display: flex; } }

.nav-item { position: relative; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-800);
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-item:hover > .nav-link {
  color: var(--blue);
  background: var(--gray-50);
}
.nav-link .chevron {
  font-size: 0.6rem;
  transition: transform var(--transition);
}
.nav-item:hover > .nav-link .chevron { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--gray-100);
  padding: 0.5rem 0;
  z-index: 100;
}
.nav-item:hover .dropdown { display: block; }
.dropdown-item a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--gray-600);
  transition: all var(--transition);
}
.dropdown-item a:hover {
  color: var(--blue);
  background: var(--gray-50);
  padding-left: 1.3rem;
}
.dropdown-divider { border-top: 1px solid var(--gray-100); margin: 0.3rem 0; }

/* Nav right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.cart-btn {
  position: relative;
  background: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: var(--gray-800);
  font-size: 1.2rem;
  transition: all var(--transition);
}
.cart-btn:hover { color: var(--blue); background: var(--gray-50); }
.cart-count {
  position: absolute;
  top: 0; right: 0;
  background: var(--red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
  background: none;
  border-radius: var(--radius);
}
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn span {
  width: 22px; height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav */
.mobile-nav {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--gray-100);
  padding: 1rem;
  max-height: 70vh;
  overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav-section { margin-bottom: 0.5rem; }
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--blue);
  background: var(--gray-50);
  border-radius: var(--radius);
  cursor: pointer;
}
.mobile-nav-items { display: none; padding: 0.3rem 0.5rem; }
.mobile-nav-items.open { display: block; }
.mobile-nav-items a {
  display: block;
  padding: 0.45rem 0.8rem;
  font-size: 0.82rem;
  color: var(--gray-600);
  border-radius: var(--radius);
}
.mobile-nav-items a:hover { color: var(--blue); background: var(--gray-50); }

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, #1d4ed8 100%);
  color: #fff;
  padding: 3rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--gold-light);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 1rem;
  backdrop-filter: blur(10px);
}
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero h1 span { color: var(--gold-light); }
.hero p { font-size: 1rem; color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; max-width: 550px; margin-left: auto; margin-right: auto; }
.hero-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.hero-trust {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
}
.trust-item .check { color: var(--green-light); font-weight: 700; }

/* Search bar in hero */
.hero-search {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  display: flex;
  align-items: center;
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
  gap: 0.5rem;
}
.hero-search input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.9rem;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.6); }
.hero-search .btn { border-radius: 40px; }

/* =============================================
   GRADE QUICK LINKS
   ============================================= */
.grade-nav {
  background: var(--white);
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.grade-nav-scroll {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.3rem;
  scrollbar-width: none;
}
.grade-nav-scroll::-webkit-scrollbar { display: none; }
.grade-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 1rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
  min-width: 70px;
}
.grade-pill:hover, .grade-pill.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30,64,175,.25);
}
.grade-pill .grade-num { font-size: 1rem; font-weight: 800; }

/* =============================================
   SECTION STYLES
   ============================================= */
.section { padding: 3rem 0; }
.section-sm { padding: 1.5rem 0; }
.section-lg { padding: 5rem 0; }
.section-gray { background: var(--gray-50); }
.section-blue { background: var(--blue); color: #fff; }
.section-dark { background: var(--gray-800); color: #fff; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header p { max-width: 550px; margin: 0.5rem auto 0; }
.section-title { position: relative; display: inline-block; }
.section-title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

/* =============================================
   PRODUCT CARDS
   ============================================= */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-light);
}
.product-card-image {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}
.product-card-image.math    { background: linear-gradient(135deg, #dbeafe, #eff6ff); }
.product-card-image.science { background: linear-gradient(135deg, #d1fae5, #ecfdf5); }
.product-card-image.english { background: linear-gradient(135deg, #fef3c7, #fffbeb); }
.product-card-image.kiswahili { background: linear-gradient(135deg, #fce7f3, #fdf2f8); }
.product-card-image.social  { background: linear-gradient(135deg, #e0e7ff, #eef2ff); }
.product-card-image.business{ background: linear-gradient(135deg, #f0fdf4, #dcfce7); }
.product-card-image.igcse   { background: linear-gradient(135deg, #fef2f2, #fff1f2); }
.product-card-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}
.product-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-body h3 { font-size: 0.9rem; margin-bottom: 0.3rem; color: var(--gray-800); }
.product-card-body .product-desc { font-size: 0.78rem; color: var(--gray-400); margin-bottom: 0.8rem; flex: 1; }
.product-card-meta { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.8rem;
  border-top: 1px solid var(--gray-100);
}
.product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--green);
}
.product-price-old {
  font-size: 0.75rem;
  color: var(--gray-400);
  text-decoration: line-through;
  margin-left: 0.2rem;
}

/* =============================================
   SUBJECT CATEGORY CARDS
   ============================================= */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
@media (min-width: 640px) { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .categories-grid { grid-template-columns: repeat(6, 1fr); } }
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 0.8rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.category-card:hover {
  border-color: var(--blue);
  background: #eff6ff;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.category-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.category-card h4 { font-size: 0.8rem; color: var(--gray-800); }
.category-card p  { font-size: 0.72rem; color: var(--gray-400); }

/* =============================================
   STATS BAR
   ============================================= */
.stats-bar { background: var(--blue); padding: 2rem 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-num {
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold-light);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.8);
  margin-top: 0.2rem;
}

/* =============================================
   FEATURES / WHY US
   ============================================= */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
@media (min-width: 640px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: var(--blue-light);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
.feature-icon.blue   { background: #dbeafe; }
.feature-icon.green  { background: #d1fae5; }
.feature-icon.gold   { background: #fef3c7; }
.feature-card h3 { margin-bottom: 0.4rem; font-size: 1rem; }

/* =============================================
   TESTIMONIALS
   ============================================= */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
@media (min-width: 768px) { .testimonials-grid { grid-template-columns: repeat(3, 1fr); } }
.testimonial-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  font-size: 3rem;
  color: var(--blue);
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonial-stars { color: var(--gold); margin-bottom: 0.5rem; font-size: 0.85rem; }
.testimonial-text { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 1rem; }
.testimonial-author { display: flex; align-items: center; gap: 0.6rem; }
.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.testimonial-name { font-size: 0.82rem; font-weight: 700; color: var(--gray-800); }
.testimonial-role { font-size: 0.72rem; color: var(--gray-400); }

/* =============================================
   CTA BANNER
   ============================================= */
.cta-banner {
  background: linear-gradient(135deg, var(--green) 0%, #047857 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-banner p  { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }
.cta-banner .cta-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* =============================================
   NEWSLETTER
   ============================================= */
.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 420px;
  margin: 1.5rem auto 0;
}
.newsletter-form input {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.newsletter-form input:focus { border-color: var(--blue); }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--gray-800);
  color: var(--gray-400);
  padding: 3rem 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand .logo-text .site-name { color: #fff; }
.footer-brand .logo-text .site-tagline { color: var(--gray-400); }
.footer-brand p { font-size: 0.82rem; margin-top: 0.8rem; max-width: 260px; }
.footer-contact { margin-top: 1rem; }
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  margin-bottom: 0.4rem;
  color: var(--gray-400);
}
.footer-contact-item a { color: var(--gold-light); }
.footer-section h4 { color: #fff; margin-bottom: 1rem; font-size: 0.9rem; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  font-size: 0.82rem;
  color: var(--gray-400);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold-light); }
.footer-payment { margin-top: 0.8rem; }
.payment-icons { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.payment-icon {
  padding: 0.3rem 0.6rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.payment-icon.mpesa { background: #00A651; }
.payment-icon.stripe { background: #635BFF; }
.payment-icon.paypal { background: #003087; }
.footer-bottom {
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.footer-bottom-links { display: flex; gap: 1rem; }
.footer-bottom-links a { color: var(--gray-400); }
.footer-bottom-links a:hover { color: var(--gold-light); }

/* =============================================
   SHOP / CATEGORY PAGE
   ============================================= */
.shop-header {
  background: linear-gradient(135deg, var(--gray-800), var(--blue-dark));
  color: #fff;
  padding: 2.5rem 0;
}
.shop-header h1 { color: #fff; }
.shop-header p { color: rgba(255,255,255,0.75); }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  margin-bottom: 0.5rem;
  color: rgba(255,255,255,0.6);
}
.breadcrumb a { color: var(--gold-light); }
.breadcrumb span { color: rgba(255,255,255,0.4); }
.shop-layout {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 768px) { .shop-layout { grid-template-columns: 240px 1fr; } }
.shop-sidebar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  height: fit-content;
}
.filter-section { margin-bottom: 1.2rem; }
.filter-section h4 { font-size: 0.82rem; font-weight: 700; color: var(--gray-800); margin-bottom: 0.6rem; border-bottom: 1px solid var(--gray-100); padding-bottom: 0.4rem; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0;
  font-size: 0.82rem;
  color: var(--gray-600);
  cursor: pointer;
}
.filter-option input { cursor: pointer; }
.filter-option:hover { color: var(--blue); }
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}
.sort-select {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--gray-600);
}
.results-count { font-size: 0.82rem; color: var(--gray-400); }

/* =============================================
   PRODUCT DETAIL PAGE
   ============================================= */
.product-detail {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) { .product-detail { grid-template-columns: 1fr 1fr; } }
.product-preview {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.product-preview .preview-icon { font-size: 4rem; }
.product-info h1 { font-size: 1.6rem; margin-bottom: 0.5rem; }
.product-info .price-block { margin: 1rem 0; }
.price-main { font-size: 2rem; font-weight: 900; color: var(--green); }
.product-info .product-meta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.product-info .product-desc { font-size: 0.9rem; color: var(--gray-600); margin-bottom: 1rem; line-height: 1.7; }
.product-includes { background: var(--gray-50); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.product-includes h4 { font-size: 0.85rem; margin-bottom: 0.5rem; color: var(--gray-800); }
.product-includes li {
  font-size: 0.82rem;
  color: var(--gray-600);
  padding: 0.2rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.product-includes li::before { content: '✓'; color: var(--green); font-weight: 700; }
.add-to-cart-block { display: flex; gap: 0.8rem; flex-wrap: wrap; }

/* =============================================
   CART
   ============================================= */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--gray-100);
}
.cart-table th { color: var(--gray-400); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
.cart-product { display: flex; align-items: center; gap: 0.8rem; }
.cart-product-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.cart-product-name { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); }
.cart-product-sub  { font-size: 0.75rem; color: var(--gray-400); }
.remove-btn { color: var(--red); font-size: 0.78rem; background: none; }
.remove-btn:hover { text-decoration: underline; }
.cart-summary {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.cart-summary h3 { margin-bottom: 1rem; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  color: var(--gray-600);
  border-bottom: 1px solid var(--gray-100);
}
.summary-row.total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
  border-bottom: none;
  padding-top: 0.8rem;
}
.summary-row .amount { color: var(--green); font-weight: 700; }
.cart-layout { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .cart-layout { grid-template-columns: 1fr 340px; } }

/* =============================================
   CHECKOUT
   ============================================= */
.checkout-layout { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .checkout-layout { grid-template-columns: 1fr 360px; } }
.checkout-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.checkout-form-card h3 { margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--gray-100); }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gray-600); margin-bottom: 0.3rem; }
.form-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: border-color var(--transition);
}
.form-input:focus { border-color: var(--blue); }
.form-input.error { border-color: var(--red); }
.form-error { font-size: 0.75rem; color: var(--red); margin-top: 0.2rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.payment-methods { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.payment-method {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.payment-method:hover { border-color: var(--blue-light); }
.payment-method.selected { border-color: var(--blue); background: #eff6ff; }
.payment-method input { cursor: pointer; }
.payment-method .pm-label { font-size: 0.85rem; font-weight: 600; color: var(--gray-800); }
.payment-method .pm-sub { font-size: 0.72rem; color: var(--gray-400); }
.payment-method .pm-icon { font-size: 1.5rem; margin-left: auto; }
.mpesa-details {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.5rem;
}
.mpesa-details p { font-size: 0.82rem; color: #166534; }
.order-processing {
  display: none;
  text-align: center;
  padding: 2rem;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   ORDER SUCCESS
   ============================================= */
.order-success {
  text-align: center;
  padding: 3rem 1rem;
  max-width: 500px;
  margin: 0 auto;
}
.success-icon {
  width: 80px;
  height: 80px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-info-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.contact-item { display: flex; gap: 0.8rem; padding: 0.8rem 0; border-bottom: 1px solid var(--gray-100); }
.contact-item:last-child { border-bottom: none; }
.contact-item-icon {
  width: 40px;
  height: 40px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-item-text .label { font-size: 0.72rem; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.contact-item-text a { font-size: 0.9rem; font-weight: 600; color: var(--blue); }
.contact-form-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
textarea.form-input { resize: vertical; min-height: 120px; }

/* =============================================
   ALERTS / NOTIFICATIONS
   ============================================= */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Toast notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--gray-800);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

/* Cart drawer */
.cart-drawer {
  position: fixed;
  right: -400px;
  top: 0;
  width: 360px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1999;
  display: none;
}
.cart-overlay.open { display: block; }
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--gray-100);
}
.cart-drawer-header h3 { font-size: 1rem; }
.cart-drawer-close { background: none; font-size: 1.2rem; color: var(--gray-600); padding: 0.3rem; }
.cart-drawer-items { flex: 1; overflow-y: auto; padding: 1rem; }
.cart-drawer-item {
  display: flex;
  gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.cart-drawer-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.cart-drawer-item-name { font-size: 0.82rem; font-weight: 600; color: var(--gray-800); }
.cart-drawer-item-price { font-size: 0.85rem; font-weight: 700; color: var(--green); margin-top: 0.2rem; }
.cart-drawer-remove { background: none; color: var(--red); font-size: 0.72rem; margin-top: 0.3rem; display: block; text-align: left; }
.cart-drawer-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--gray-100);
}
.cart-drawer-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
  font-weight: 700;
}
.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
}
.cart-empty .empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }

/* =============================================
   ADMIN
   ============================================= */
.admin-sidebar {
  width: 220px;
  background: var(--gray-800);
  min-height: 100vh;
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.admin-sidebar .logo { padding: 0 1rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition);
}
.admin-nav a:hover, .admin-nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.admin-layout { display: flex; min-height: 100vh; }
.admin-main { flex: 1; background: var(--gray-50); padding: 1.5rem; overflow: auto; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.admin-stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
}
.admin-stat .stat-num { font-size: 1.8rem; font-weight: 900; color: var(--blue); }
.admin-stat .stat-label { font-size: 0.78rem; color: var(--gray-400); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; }
.admin-table th { padding: 0.7rem 1rem; background: var(--gray-50); font-size: 0.75rem; font-weight: 700; color: var(--gray-400); text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--gray-200); }
.admin-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--gray-100); color: var(--gray-600); }
.admin-table tr:last-child td { border-bottom: none; }
.status-pill {
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.status-completed { background: #d1fae5; color: #065f46; }
.status-pending    { background: #fef3c7; color: #92400e; }
.status-failed     { background: #fee2e2; color: #991b1b; }

/* =============================================
   RESPONSIVE MEDIA QUERIES
   ============================================= */
@media (max-width: 640px) {
  .hide-mobile { display: none !important; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .hero { padding: 2rem 0 2.5rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .cart-drawer { width: 100%; right: -100%; }
}
@media (min-width: 641px) { .hide-desktop { display: none !important; } }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  gap: 0.3rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.page-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  color: var(--gray-600);
  background: var(--white);
  transition: all var(--transition);
}
.page-btn:hover, .page-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* =============================================
   WHATSAPP FLOAT BUTTON
   ============================================= */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  width: 54px;
  height: 54px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 16px rgba(37,211,102,0.5);
  z-index: 1000;
  transition: all var(--transition);
  text-decoration: none;
  color: #fff;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,0.6); }
