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

:root {
  /* Color Palette */
  --bg-primary: #f4fbf6;
  --bg-secondary: #e6f5ea;
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(0, 0, 0, 0.06);
  --primary: #2f855a;
  --secondary: #68d391;
  --accent: #f6ad55;
  --text-main: #1a202c;
  --text-muted: #4a5568;
  
  /* Gradients & Shadows */
  --primary-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --glass-shadow: 0 8px 32px rgba(47, 133, 90, 0.08);
  --hover-shadow: 0 12px 40px rgba(47, 133, 90, 0.15);
  --glow-shadow: 0 4px 15px rgba(104, 211, 145, 0.4);
  
  /* Layout */
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
p { color: var(--text-muted); margin-bottom: 1rem; }

/* Layout & Container */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  color: var(--primary);
}

/* Header & Glass Navbar */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(47, 133, 90, 0.05);
  padding: 1rem 0;
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-main);
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: var(--primary-gradient);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.menu-toggle-btn {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-main);
}

#menu-toggle {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: var(--glass-shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-shadow);
  color: #ffffff;
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

.btn-accent:hover {
  background: #ed9a3b;
  box-shadow: 0 4px 15px rgba(246, 173, 85, 0.4);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(244, 251, 246, 0.95), rgba(244, 251, 246, 0.7));
  z-index: -1;
}

.hero-content {
  max-width: 700px;
  animation: fadeInUp 1s ease forwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

/* Page Banner */
.page-banner {
  position: relative;
  padding: 150px 0 80px;
  background: var(--bg-secondary);
  text-align: center;
  overflow: hidden;
}

.page-banner-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
  z-index: 0;
}

.page-banner-content {
  position: relative;
  z-index: 1;
}

/* Grids */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Glass Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(104, 211, 145, 0.3);
}

/* Book Card */
.book-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  text-align: center;
  height: 100%;
}

.book-cover-container {
  width: 100%;
  aspect-ratio: 2/3;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.book-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.book-category {
  font-size: 0.8rem;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.book-title {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  flex-grow: 1;
}

.book-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.book-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--glass-border);
  padding-top: 1rem;
}

.book-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

/* Category Card */
.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
}

.category-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.8s ease;
}

.category-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(26, 32, 44, 0.8), rgba(26, 32, 44, 0.1));
  z-index: 1;
}

.category-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  width: 100%;
}

.category-content h3 {
  color: #ffffff;
  margin: 0;
  font-size: 1.5rem;
}

.category-card:hover .category-bg {
  transform: scale(1.1);
}

/* Feature Card */
.feature-card {
  text-align: center;
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary);
}

/* Testimonials */
.testimonial-card {
  background: linear-gradient(135deg, #ffffff, var(--bg-primary));
}

.stars {
  color: var(--accent);
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.customer-name {
  font-weight: 600;
  color: var(--primary);
}

/* Product Details Page */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.product-image-container {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.product-image-container img {
  width: 100%;
  height: auto;
}

.product-meta {
  margin-bottom: 2rem;
}

.product-price-large {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 1rem 0;
}

.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  align-items: center;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  background: var(--glass-bg);
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-main);
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--bg-secondary);
}

.qty-input {
  width: 50px;
  text-align: center;
  border: none;
  background: none;
  font-size: 1rem;
  font-weight: 600;
}

/* Cart & Checkout Pages */
.cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-secondary);
  color: var(--text-muted);
}

.cart-table td {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--glass-border);
  vertical-align: middle;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-item-img {
  width: 80px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.remove-btn {
  background: none;
  border: none;
  color: #e53e3e;
  cursor: pointer;
  font-size: 0.9rem;
}

.remove-btn:hover {
  text-decoration: underline;
}

.summary-card {
  background: var(--primary);
  color: #ffffff;
}

.summary-card h3, .summary-card p {
  color: #ffffff;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.summary-total {
  font-size: 1.5rem;
  font-weight: 700;
  border-bottom: none;
  margin-top: 1rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  background: rgba(255,255,255,0.9);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Contact & About */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-info-icon {
  color: var(--primary);
}

.map-container {
  border-radius: var(--radius);
  overflow: hidden;
  height: 300px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-img {
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: 80px 0 40px;
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.1);
  color: var(--text-muted);
}

/* Utilities */
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.w-100 { width: 100%; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  section { padding: 70px 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .product-layout, .cart-layout, .checkout-layout, .contact-grid, .about-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  section { padding: 50px 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
  }
  .menu-toggle-btn { display: block; }
  #menu-toggle:checked ~ .nav-links { display: flex; }
  
  .hero { text-align: center; }
  .hero-buttons { justify-content: center; }
  
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
    display: block;
    width: 100%;
  }
  .cart-table tr { margin-bottom: 2rem; border-bottom: 2px solid var(--primary); }
  .cart-table td { text-align: right; padding-left: 50%; position: relative; border: none; }
  .cart-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 50%;
    text-align: left;
    font-weight: 600;
  }
  .cart-item-info { justify-content: flex-end; }
}

@media (max-width: 480px) {
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; }
}