/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --blue: #3b82f6;
  --blue-light: #eff6ff;
  --green: #10b981;
  --gray-100: #f9fafb;
  --gray-200: #e5e7eb;
  --gray-600: #4b5563;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 12px;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  color: var(--gray-900);
  background: linear-gradient(to bottom right, var(--blue-light), var(--purple-light));
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.text-center {
  text-align: center;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gray-900);
}

.logo-icon {
  font-size: 1.8rem;
}

.nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: var(--gray-600);
  font-weight: 600;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--purple);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-count {
  background: var(--purple);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  color: var(--purple);
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn.primary {
  background: var(--purple);
  color: white;
}

.btn.primary:hover {
  background: #6d28d9;
  transform: translateY(-2px);
}

.btn.secondary {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}

.btn.secondary:hover {
  background: var(--purple-light);
}

.btn.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

/* Books */
.books {
  padding: 4rem 0;
  background: white;
}

.section-title {
  font-size: 2.2rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  margin-bottom: 3rem;
  font-size: 1.1rem;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.book-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.book-card:hover {
  transform: translateY(-5px);
}

.book-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}

.book-info {
  padding: 1.5rem;
}

.book-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
}

.author {
  color: var(--gray-600);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.rating {
  margin-bottom: 0.75rem;
  color: #f59e0b;
  font-size: 0.9rem;
}

.reviews {
  color: var(--gray-600);
  margin-left: 0.5rem;
}

.description {
  color: var(--gray-600);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--purple);
}

.add-to-cart {
  background: var(--purple);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
}

.add-to-cart:hover {
  background: #6d28d9;
}

/* CTA */
.cta {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: white;
  text-align: center;
}

.cta h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Footer */
.footer {
  background: var(--gray-900);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

.footer-col a,
.footer-col p {
  color: #9ca3af;
  text-decoration: none;
  display: block;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }
}