/* ============================================================
   Vidyarthi — Main Stylesheet  v2.0  FIXED
   Mobile-first | Hindi+English | Churu, Rajasthan
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;500;600;700;800&family=Nunito:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --brand-primary:    #E8472F;
  --brand-secondary:  #1A3A5C;
  --brand-accent:     #F5A623;
  --brand-dark:       #0f2540;
  --brand-light:      #FFF5F3;
  --success:          #10B981;
  --warning:          #F59E0B;
  --danger:           #EF4444;
  --info:             #3B82F6;
  --text-primary:     #1F2937;
  --text-secondary:   #6B7280;
  --text-light:       #9CA3AF;
  --bg-white:         #ffffff;
  --bg-light:         #F9FAFB;
  --bg-warm:          #FFF8F6;
  --border:           #E5E7EB;
  --border-focus:     #E8472F;
  --shadow-sm:        0 1px 3px rgba(0,0,0,.08);
  --shadow:           0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:        0 10px 40px rgba(0,0,0,.15);
  --shadow-card:      0 2px 12px rgba(232,71,47,.08);
  --radius-sm:        8px;
  --radius:           12px;
  --radius-lg:        20px;
  --font-heading:     'Baloo 2', sans-serif;
  --font-body:        'Nunito', sans-serif;
  --transition:       all .2s ease;
  --container:        1200px;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
ul { list-style: none; }

/* ── Container ──────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Announcement Bar ───────────────────────────────────── */
.announcement-bar {
  background: var(--brand-secondary);
  color: #fff;
  padding: 8px 16px;
  font-size: .83rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}
.ann-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ann-inner marquee { flex: 1; }
.ann-inner button {
  background: rgba(255,255,255,.2);
  color: #fff;
  border-radius: 50%;
  width: 24px; height: 24px;
  font-size: .8rem;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.ann-inner button:hover { background: rgba(255,255,255,.35); }

/* ── Flash Messages ─────────────────────────────────────── */
.flash-message {
  padding: 12px 20px;
  margin: 0;
  font-weight: 600;
  font-size: .9rem;
  text-align: center;
}
.flash-success { background: #d1fae5; color: #065f46; border-bottom: 2px solid #10b981; }
.flash-error   { background: #fee2e2; color: #991b1b; border-bottom: 2px solid #ef4444; }
.flash-warning { background: #fef3c7; color: #92400e; border-bottom: 2px solid #f59e0b; }
.flash-info    { background: #dbeafe; color: #1e40af; border-bottom: 2px solid #3b82f6; }

/* ── Site Header ────────────────────────────────────────── */
.site-header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo */
.logo-link { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon {
  width: 40px; height: 40px;
  background: var(--brand-primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.logo-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.1;
}
.logo-text small {
  display: block;
  font-size: .68rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
@media (max-width: 480px) { .logo-text small { display: none; } }

/* Header Search */
.header-search {
  flex: 1;
  display: flex;
  gap: 0;
  max-width: 480px;
}
.header-search input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: .88rem;
  background: var(--bg-light);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}
.header-search input:focus {
  border-color: var(--brand-primary);
  background: #fff;
}
.header-search button {
  padding: 9px 16px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .9rem;
  transition: var(--transition);
}
.header-search button:hover { background: #c73d28; }

/* Header Icons */
.header-icons { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-link {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: .7rem;
  color: var(--text-secondary);
  position: relative;
  transition: var(--transition);
  gap: 2px;
}
.icon-link:hover { background: var(--bg-light); color: var(--brand-primary); }
.icon-link .icon { font-size: 1.3rem; line-height: 1; }
.icon-label { font-weight: 600; font-size: .65rem; white-space: nowrap; }
.cart-icon { position: relative; }
.cart-badge {
  position: absolute;
  top: 2px; right: 4px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: .6rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.cart-badge.hidden { display: none !important; }
.admin-link { color: var(--brand-secondary) !important; }

/* Hamburger */
.hamburger {
  display: none;
  padding: 8px;
  font-size: 1.4rem;
  color: var(--text-primary);
  border-radius: var(--radius-sm);
}
.hamburger:hover { background: var(--bg-light); }

/* Main Nav */
.main-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}
.main-nav .container { padding: 0 16px; }
.nav-list {
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li a {
  display: block;
  padding: 10px 14px;
  font-size: .83rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.nav-list li a:hover { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }
.nav-list li a.active { color: var(--brand-primary); border-bottom-color: var(--brand-primary); }

@media (max-width: 768px) {
  .header-search { display: none; }
  .hamburger { display: block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; padding: 8px 0; }
  .nav-list li a { padding: 12px 20px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
  .nav-list li a:hover { border-left-color: var(--brand-primary); border-bottom-color: var(--border); }
}

/* ── Main Content ───────────────────────────────────────── */
.main-content { min-height: 60vh; }

/* ── Sections ───────────────────────────────────────────── */
.section { padding: 48px 0; }
.section-sm { padding: 28px 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}
.section-title span { color: var(--brand-primary); }
.view-all {
  font-size: .83rem;
  font-weight: 700;
  color: var(--brand-primary);
  padding: 6px 14px;
  border: 1.5px solid var(--brand-primary);
  border-radius: 20px;
  transition: var(--transition);
}
.view-all:hover { background: var(--brand-primary); color: #fff; }

/* ── Hero Section ───────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--brand-secondary) 0%, #0f2540 60%, #1a3a5c 100%);
  color: #fff;
  padding: 60px 16px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 140%; height: 200%;
  background: radial-gradient(ellipse at 60% 40%, rgba(232,71,47,.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero > div { position: relative; z-index: 2; max-width: 700px; width: 100%; }
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.15;
}
.hero-subtitle {
  font-size: 1rem;
  opacity: .85;
  margin-bottom: 28px;
  line-height: 1.6;
}
.hero-subtitle small { opacity: .75; font-size: .85rem; }
.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
}
.hero-search select {
  padding: 14px 12px;
  border: none;
  background: var(--bg-light);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  min-width: 120px;
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.hero-search input {
  flex: 1;
  padding: 14px 16px;
  border: none;
  font-size: .9rem;
  color: var(--text-primary);
  outline: none;
  min-width: 180px;
}
.hero-search button {
  padding: 14px 24px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
  white-space: nowrap;
  transition: var(--transition);
}
.hero-search button:hover { background: #c73d28; }
@media (max-width: 480px) {
  .hero { padding: 40px 16px 36px; min-height: auto; }
  .hero-search { flex-direction: column; border-radius: var(--radius-sm); }
  .hero-search select { border-right: none; border-bottom: 1px solid var(--border); }
  .hero-search input { padding: 12px 16px; }
  .hero-search button { padding: 12px; width: 100%; }
}

/* ── 4 Pillars ──────────────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: -28px auto 0;
  position: relative;
  z-index: 10;
  padding: 0 16px 32px;
  max-width: var(--container);
}
.pillar-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1.5px solid var(--border);
  transition: var(--transition);
  display: block;
  color: var(--text-primary);
}
.pillar-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--brand-primary); }
.pillar-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  margin: 0 auto 12px;
}
.pillar-title { font-family: var(--font-heading); font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.pillar-desc { font-size: .78rem; color: var(--text-secondary); line-height: 1.4; }
@media (max-width: 640px) {
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: -20px; }
}

/* ── Product Grid ───────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
@media (max-width: 640px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(232,71,47,.3); }
.product-card-img {
  position: relative;
  display: block;
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--bg-light);
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--brand-primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: .3px;
}
.product-card-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .88rem;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta { font-size: .72rem; color: var(--text-secondary); }
.product-price { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.price-sell {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand-primary);
}
.price-mrp {
  font-size: .8rem;
  color: var(--text-light);
  text-decoration: line-through;
}
.price-off {
  font-size: .72rem;
  font-weight: 700;
  color: var(--success);
  background: #d1fae5;
  padding: 1px 6px;
  border-radius: 10px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}
.btn-primary:hover { background: #c73d28; border-color: #c73d28; transform: translateY(-1px); }
.btn-secondary {
  background: var(--brand-secondary);
  color: #fff;
  border-color: var(--brand-secondary);
}
.btn-secondary:hover { background: #0f2540; border-color: #0f2540; }
.btn-outline {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}
.btn-outline:hover { background: var(--brand-primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: .95rem; }
.btn-full { width: 100%; }
.btn-add-cart {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 700;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  margin-top: auto;
}
.btn-add-cart:hover { background: #c73d28; }
.btn-add-cart:disabled { background: var(--text-light); cursor: not-allowed; }
.btn-notify {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  color: var(--brand-secondary);
  border: 1.5px solid var(--brand-secondary);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  margin-top: auto;
}
.btn-notify:hover { background: var(--brand-secondary); color: #fff; }

/* ── Card ───────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  padding: 14px 18px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .95rem;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-light);
  color: var(--brand-secondary);
}
.card-body { padding: 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--bg-light);
}

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .83rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text-primary);
  background: #fff;
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(232,71,47,.1);
}
.form-control::placeholder { color: var(--text-light); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; }

/* ── Grid Layouts ───────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ── School Strip / Chips ───────────────────────────────── */
.school-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.school-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.school-chip:hover { border-color: var(--brand-primary); color: var(--brand-primary); box-shadow: var(--shadow-sm); }
.school-chip-logo { font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }

/* ── Steps Grid ─────────────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
  z-index: 0;
}
.step-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  border: 1.5px solid var(--border);
  position: relative;
  z-index: 1;
  transition: var(--transition);
}
.step-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.step-num {
  width: 48px; height: 48px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 auto 12px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--brand-primary);
}
.step-title { font-family: var(--font-heading); font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.step-desc { font-size: .78rem; color: var(--text-secondary); }
@media (max-width: 640px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
}

/* ── Breadcrumbs ────────────────────────────────────────── */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
  padding: 12px 0;
}
.breadcrumbs a:hover { color: var(--brand-primary); }
.sep { color: var(--text-light); }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: capitalize;
}
.badge-pending    { background: #fef3c7; color: #92400e; }
.badge-confirmed  { background: #dbeafe; color: #1e40af; }
.badge-processing { background: #ede9fe; color: #5b21b6; }
.badge-shipped    { background: #d1fae5; color: #065f46; }
.badge-delivered  { background: #d1fae5; color: #065f46; border: 1px solid #10b981; }
.badge-cancelled  { background: #fee2e2; color: #991b1b; }
.badge-returned   { background: #fef3c7; color: #92400e; }
.badge-paid       { background: #d1fae5; color: #065f46; }
.badge-failed     { background: #fee2e2; color: #991b1b; }
.badge-credit     { background: #d1fae5; color: #065f46; }
.badge-debit      { background: #fee2e2; color: #991b1b; }
.badge-partner    { background: #fef3c7; color: #92400e; }
.badge-featured   { background: #ede9fe; color: #5b21b6; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  border-left: 4px solid;
  margin-bottom: 16px;
}
.alert-success { background: #d1fae5; color: #065f46; border-color: var(--success); }
.alert-error   { background: #fee2e2; color: #991b1b; border-color: var(--danger); }
.alert-warning { background: #fef3c7; color: #92400e; border-color: var(--warning); }
.alert-info    { background: #dbeafe; color: #1e40af; border-color: var(--info); }

/* ── Product Detail ─────────────────────────────────────── */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 32px 0;
}
@media (max-width: 768px) { .product-detail-layout { grid-template-columns: 1fr; gap: 20px; } }
.product-gallery { position: sticky; top: 80px; }
.main-image {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--bg-light);
}
.main-image img { width: 100%; height: 100%; object-fit: cover; }
.size-selector { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.size-btn {
  padding: 7px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}
.size-btn:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.size-btn.selected { border-color: var(--brand-primary); background: var(--brand-primary); color: #fff; }
.size-btn:disabled { opacity: .4; cursor: not-allowed; }
.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 36px; height: 36px;
  background: var(--bg-light);
  font-size: 1.1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--brand-primary); color: #fff; }
.qty-value { padding: 0 16px; font-weight: 700; font-size: .95rem; min-width: 40px; text-align: center; }

/* ── Cart Page ──────────────────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 768px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 72px; height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-light);
  flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-name { font-weight: 700; font-size: .88rem; margin-bottom: 4px; }
.cart-item-meta { font-size: .75rem; color: var(--text-secondary); }
.order-summary { position: sticky; top: 80px; }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: .88rem;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-row.total {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--brand-primary);
}
.coupon-input { display: flex; gap: 8px; }
.coupon-input input { flex: 1; }

/* ── Institution Pages ──────────────────────────────────── */
.inst-hero {
  background: linear-gradient(135deg, var(--brand-secondary), #0f2540);
  color: #fff;
  padding: 40px 16px;
}
.inst-hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.inst-logo {
  width: 80px; height: 80px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
  overflow: hidden;
}
.inst-logo img { width: 100%; height: 100%; object-fit: cover; }
.inst-info { flex: 1; }
.inst-info h1 { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.inst-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inst-tag {
  padding: 4px 12px;
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}

/* ── Schools Grid ───────────────────────────────────────── */
.schools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.school-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text-primary);
}
.school-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.school-card-logo {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  overflow: hidden;
}

/* ── Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.filter-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: var(--text-secondary);
  transition: var(--transition);
}
.filter-btn:hover,
.filter-btn.active { border-color: var(--brand-primary); color: var(--brand-primary); background: var(--brand-light); }

/* ── Account Pages ──────────────────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
  padding: 32px 0;
}
.account-sidebar {
  position: sticky;
  top: 80px;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  overflow: hidden;
}
.account-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.account-sidebar a:hover,
.account-sidebar a.active { background: var(--brand-light); color: var(--brand-primary); }
.account-sidebar a:last-child { border-bottom: none; }
@media (max-width: 768px) { .account-layout { grid-template-columns: 1fr; } .account-sidebar { position: static; } }

/* ── Stat Cards ─────────────────────────────────────────── */
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  border: 1.5px solid var(--border);
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand-primary);
  display: block;
}
.stat-label { font-size: .78rem; color: var(--text-secondary); font-weight: 600; }

/* ── Wallet ─────────────────────────────────────────────── */
.wallet-balance-card {
  background: linear-gradient(135deg, var(--brand-secondary), #0f2540);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.wallet-amount {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  display: block;
  margin-bottom: 6px;
}

/* ── Donation ────────────────────────────────────────────── */
.donate-hero {
  background: linear-gradient(135deg, #065f46, #10b981);
  color: #fff;
  padding: 48px 16px;
  text-align: center;
}
.donate-hero h1 { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; margin-bottom: 10px; }
.dropbox-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 20px;
  transition: var(--transition);
}
.dropbox-card:hover { box-shadow: var(--shadow); border-color: var(--success); }
.condition-stars { color: #f59e0b; letter-spacing: 2px; font-size: .9rem; }

/* ── Resell ──────────────────────────────────────────────── */
.resell-item-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 20px;
  transition: var(--transition);
  position: relative;
}
.resell-item-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ── Data Table ─────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--bg-light);
  font-weight: 700;
  color: var(--text-secondary);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 2px solid var(--border);
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--bg-light); }
.table-responsive { overflow-x: auto; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 24px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 700;
  transition: var(--transition);
  min-width: 38px;
  text-align: center;
}
.pagination a:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.pagination .active { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* ── Toast Notifications ────────────────────────────────── */
.toast-container,
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
}
.toast {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid var(--info);
  animation: slideInToast .3s ease;
  pointer-events: all;
  min-width: 240px;
}
.toast-success { border-left-color: var(--success); }
.toast-error   { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info    { border-left-color: var(--info); }
@keyframes slideInToast {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Modal ──────────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  transform: scale(.95);
  transition: var(--transition);
}
.modal.open .modal-box { transform: scale(1); }
.modal-title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 800; margin-bottom: 16px; }
.modal-close {
  float: right;
  background: var(--bg-light);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger); color: #fff; }

/* ── Site Footer ────────────────────────────────────────── */
.site-footer {
  background: var(--brand-dark);
  color: rgba(255,255,255,.85);
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 32px;
}
.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .83rem; opacity: .75; transition: var(--transition); }
.footer-col ul li a:hover { opacity: 1; color: var(--brand-accent); padding-left: 4px; }
.footer-brand .logo strong { color: #fff; }
.footer-brand .logo small { color: rgba(255,255,255,.6); }
.footer-city { font-size: .82rem; opacity: .7; margin-top: 10px; }
.footer-brand p { font-size: .82rem; opacity: .7; margin-top: 6px; }
.footer-brand p a { opacity: 1; color: var(--brand-accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-bottom p { font-size: .78rem; opacity: .6; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: var(--transition);
}
.social-links a:hover { background: var(--brand-primary); transform: translateY(-2px); }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 32px 0 20px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

/* ── WhatsApp Float Button ──────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 999;
  background: #25d366;
  color: #fff !important;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 24px rgba(37,211,102,.4);
  transition: var(--transition);
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 30px rgba(37,211,102,.5); }
.wa-text {
  position: absolute;
  right: 64px;
  background: #fff;
  color: #1a1a1a;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.whatsapp-float:hover .wa-text { opacity: 1; }

/* ── Utility ─────────────────────────────────────────────── */
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.text-muted    { color: var(--text-secondary); }
.text-success  { color: var(--success); }
.text-error    { color: var(--danger); }
.text-warning  { color: var(--warning); }
.fw-bold       { font-weight: 700; }
.fw-800        { font-weight: 800; }
.font-heading  { font-family: var(--font-heading); }
.mb-1          { margin-bottom: 8px; }
.mb-2          { margin-bottom: 16px; }
.mb-3          { margin-bottom: 24px; }
.mt-1          { margin-top: 8px; }
.mt-2          { margin-top: 16px; }
.mt-3          { margin-top: 24px; }
.mt-4          { margin-top: 32px; }
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2         { gap: 8px; }
.out-of-stock  { opacity: .5; }
.divider       { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.hidden        { display: none !important; }
.partner       { color: var(--success); font-size: .72rem; font-weight: 700; }

/* ── Skeleton Loading ───────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skeleton 1.5s infinite; border-radius: var(--radius-sm); }
.sk-block { height: 16px; margin-bottom: 8px; }
@keyframes skeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Admin Layout ───────────────────────────────────────── */
.admin-topbar {
  background: var(--brand-secondary);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.admin-topbar h1 { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 800; }
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}
.admin-sidebar {
  background: #0f2540;
  color: rgba(255,255,255,.8);
  padding: 16px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: .83rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  border-left: 3px solid transparent;
  transition: var(--transition);
  text-decoration: none;
}
.admin-sidebar a:hover,
.admin-sidebar a.active { color: #fff; background: rgba(255,255,255,.08); border-left-color: var(--brand-primary); }
.admin-content { padding: 24px; }
@media (max-width: 768px) { .admin-layout { grid-template-columns: 1fr; } .admin-sidebar { display: none; } }
