:root {
  --primary-navy: #1e3a8a;
  --secondary-gold: #f59e0b;
  --accent-sky: #0ea5e9;
  --bg-light: #f8fafc;
  --text-dark: #1f2937;
  --success-green: #10b981;
  --footer-dark: #1e293b;
}

html {
  scroll-behavior: smooth;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

footer {
  margin-top: auto;
}

.heading-font {
  font-family: "Poppins", system-ui, -apple-system, sans-serif;
}

.nav-shadow {
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.header-shrink {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  transition: all 0.25s ease;
}

.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-menu.open {
  transform: translateX(0);
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.carousel-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.carousel-dot.active {
  background: var(--secondary-gold);
}

.whatsapp-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(37, 211, 102, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.section-divider {
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
  height: 1px;
}

.footer-link:hover {
  color: var(--secondary-gold);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.overlay-gradient {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.65));
}

/* ========== NEW UI IMPROVEMENTS ========== */

/* Fade-in animations */
.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* School card improvements */
.school-card {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.school-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.school-card:hover::before {
  opacity: 1;
}

.school-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(245, 158, 11, 0.15);
}

/* Book card improvements */
.book-card {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.book-card:hover .book-image {
  transform: scale(1.05);
}

.book-image {
  transition: transform 0.4s ease;
}

/* Add to cart button animation */
.btn-add-cart {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-add-cart::after {
  content: '✓ Added!';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.btn-add-cart.added {
  background: #22c55e !important;
}

.btn-add-cart.added span {
  opacity: 0;
}

.btn-add-cart.added::after {
  opacity: 1;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 100px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--primary-navy);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 40;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--secondary-gold);
  transform: translateY(-3px);
}

/* Search bar */
.search-container {
  position: relative;
}

.search-input {
  padding-left: 45px;
  transition: all 0.3s ease;
  border: 2px solid #e2e8f0;
}

.search-input:focus {
  border-color: var(--secondary-gold);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

/* Badge styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-new {
  background: #dcfce7;
  color: #166534;
}

.badge-popular {
  background: #fef3c7;
  color: #92400e;
}

.badge-sale {
  background: #fee2e2;
  color: #991b1b;
}

/* Quantity buttons */
.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.qty-btn:hover {
  background: var(--secondary-gold);
  color: white;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #1e293b;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  opacity: 0;
  transition: all 0.4s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-success { border-left: 4px solid #22c55e; }
.toast-error { border-left: 4px solid #ef4444; }
.toast-info { border-left: 4px solid #3b82f6; }

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

/* Improved form inputs */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary-gold) !important;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

/* Price tag */
.price-tag {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: var(--secondary-gold);
}

.price-original {
  text-decoration: line-through;
  color: #94a3b8;
  font-size: 0.875em;
}

/* Feature badges on cards */
.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 90px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}
