.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Shopping Cart Panel */
.cart-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background-color: white;
  box-shadow: -5px 0 20px var(--shadow);
  transition: right 0.4s;
  z-index: 1000;
  overflow-y: auto;
}

.cart-panel.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  background-color: var(--primary);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.cart-title {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.cart-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
}

.cart-items {
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--gray);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-weight: bold;
  color: var(--primary);
  flex-shrink: 0;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-size: 1rem;
  margin-bottom: 5px;
  font-weight: 500;
}

.cart-item-price {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: bold;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  margin-top: 10px;
  gap: 10px;
}

.quantity-btn {
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--light);
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.quantity-input {
  width: 40px;
  height: 25px;
  text-align: center;
  border: 1px solid var(--gray);
  border-radius: 5px;
}

.cart-item-remove {
  background: none;
  border: none;
  color: red;
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 5px;
}

.cart-footer {
  padding: 20px;
  background-color: var(--light);
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--gray);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-weight: 500;
}

.cart-subtotal-value {
  font-weight: bold;
  color: var(--accent);
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.checkout-btn:hover {
  background-color: #ff8277;
}

/* Empty Cart */
.empty-cart {
  text-align: center;
  padding: 50px 20px;
}

.empty-cart-icon {
  font-size: 3rem;
  color: var(--gray);
  margin-bottom: 20px;
}

.empty-cart-message {
  margin-bottom: 20px;
  color: var(--dark);
  opacity: 0.7;
}

.continue-shopping {
  display: inline-block;
  background-color: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s;
}

.continue-shopping:hover {
  background-color: #0062cc;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: white;
  border-radius: 10px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  background-color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
}

.book-preview {
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.preview-header {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
}

.preview-img {
  width: 200px;
  height: 300px;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary);
  flex-shrink: 0;
}

.preview-info h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.preview-meta {
  margin-bottom: 15px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.preview-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 20px;
}

.preview-actions {
  display: flex;
  gap: 15px;
}

.preview-btn-lg {
  padding: 12px 25px;
  font-size: 1rem;
}

.preview-description {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid var(--gray);
}

.preview-description h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--primary);
}

.preview-description p {
  line-height: 1.7;
  margin-bottom: 15px;
}

.preview-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray);
  margin-bottom: 20px;
}

.preview-tab {
  padding: 10px 20px;
  cursor: pointer;
  position: relative;
}

.preview-tab.active {
  color: var(--primary);
  font-weight: bold;
}

.preview-tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary);
}

/* Header & Navigation */
header {
  background-color: white;
  box-shadow: 0 2px 15px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  transition: color 0.3s;
}

nav a:hover {
  color: var(--primary);
}

nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s;
}

nav a:hover::after {
  width: 100%;
}

.nav-cta {
  background-color: var(--accent);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
  text-decoration: none;
}

.nav-donate {
  background-color: var(--primary);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.3s, background-color 0.3s;
  text-decoration: none;
  margin-left: 15px;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="white" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}

.header-content-main {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  font-size: 3.2rem;
  margin-bottom: 20px;
  font-weight: bold;
}

.page-header p {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.header-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  display: block;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Page Layout */
.page-layout {
  padding: 60px 0;
  display: flex;
  gap: 40px;
}

.sidebar {
  flex: 1;
  min-width: 280px;
  max-width: 320px;
}

.main-content {
  flex: 3;
  min-width: 300px;
}

/* Filters & Categories */
.filter-section {
  background-color: white;
  border-radius: 10px;
  padding: 25px;
  margin-bottom: 25px;
  box-shadow: 0 5px 15px var(--shadow);
  position: sticky;
  top: 120px;
}

.filter-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--primary);
  font-weight: bold;
  display: flex;
  align-items: center;
}

.filter-title::before {
  content: "🔍";
  margin-right: 10px;
}

.filter-group {
  margin-bottom: 25px;
}

.filter-group h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--dark);
  font-weight: 600;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.filter-option:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.filter-option input {
  margin-right: 10px;
}

.filter-option label {
  cursor: pointer;
  flex-grow: 1;
}

.item-count {
  background-color: var(--light);
  color: var(--dark);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.price-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-input {
  width: 80px;
  padding: 8px;
  border: 1px solid var(--gray);
  border-radius: 5px;
  font-size: 0.9rem;
}

.apply-filters {
  width: 100%;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 5px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 20px;
}

.apply-filters:hover {
  background-color: #0062cc;
}

/* Shopping Tools */
.shopping-tools {
  background-color: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 5px 15px var(--shadow);
}

.tool-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--primary);
  font-weight: bold;
}

.quick-add {
  margin-bottom: 20px;
}

.quick-add-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--gray);
  border-radius: 5px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
}

.quick-add-option:hover {
  border-color: var(--primary);
  background-color: rgba(0, 123, 255, 0.05);
}

.bundle-info h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.bundle-price {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: bold;
}

.savings {
  background-color: var(--accent);
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Main Content Controls */
.content-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--shadow);
}

.results-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.results-count {
  font-size: 0.95rem;
  color: var(--dark);
  opacity: 0.7;
}

.view-toggle {
  display: flex;
  border: 1px solid var(--gray);
  border-radius: 5px;
  overflow: hidden;
}

.view-btn {
  padding: 8px 12px;
  background-color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.view-btn.active {
  background-color: var(--primary);
  color: white;
}

.sort-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.sort-label {
  font-size: 0.9rem;
  font-weight: 500;
}

.sort-select {
  padding: 8px 12px;
  border: 1px solid var(--gray);
  border-radius: 5px;
  background-color: white;
  min-width: 160px;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
  min-height: 400px;
  position: relative;

}

.product-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--accent);
  color: white;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 2;
}

.product-image {
  height: 350px;
  background-color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary);
  position: relative;
  overflow: hidden;
}
.product-image img{
  width: 100%;
  height: 100%;
   object-fit: cover;
}

.product-image::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.1));
}

.quick-preview {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  opacity: 0;
}

.product-card:hover .quick-preview {
  opacity: 1;
}

.quick-preview:hover {
  background-color: white;
  transform: scale(1.1);
}

.product-details {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.product-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.age-range {
  background-color: var(--light);
  color: var(--dark);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--dark);
  font-weight: bold;
  line-height: 1.3;
}

.learning-outcomes {
  margin-bottom: 15px;
}

.learning-outcomes h4 {
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 8px;
  font-weight: 600;
}

.outcomes-list {
  list-style: none;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--dark);
  opacity: 0.8;
}

.outcomes-list li {
  margin-bottom: 4px;
  padding-left: 15px;
  position: relative;
}

.outcomes-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.product-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid var(--light);
}

.price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.price {
  font-weight: bold;
  font-size: 1.3rem;
  color: var(--accent);
}

.stock-status {
  font-size: 0.8rem;
  color: #28a745;
  font-weight: 500;
}

.product-actions {
  display: flex;
  gap: 10px;
}

.add-to-cart {
  flex: 2;
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.add-to-cart:hover {
  background-color: #0062cc;
  transform: translateY(-1px);
}

.preview-btn {
  flex: 1;
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.preview-btn:hover {
  background-color: var(--primary);
  color: white;
}

/* Essential Series Highlight */
.essential-highlight {
  background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
  color: white;
  padding: 50px 0;
  margin: 60px 0;
  border-radius: 15px;
  position: relative;
  overflow: hidden;
}

.essential-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
}

.highlight-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.highlight-title {
  font-size: 2.2rem;
  margin-bottom: 15px;
  font-weight: bold;
}

.highlight-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 30px;
  opacity: 0.9;
  line-height: 1.6;
}

.highlight-cta {
  display: inline-block;
  background-color: var(--accent);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.highlight-cta:hover {
  background-color: #ff8277;
  transform: translateY(-2px);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 40px 0;
}

.page-item {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background-color: white;
  color: var(--dark);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 5px var(--shadow);
}

.page-item:hover {
  background-color: var(--primary);
  color: white;
}

.page-item.active {
  background-color: var(--primary);
  color: white;
}

/* Cart Summary Fixed */
.cart-summary {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--accent);
  color: white;
  padding: 15px 20px;
  border-radius: 50px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-summary:hover {
  transform: scale(1.05);
  background-color: #ff8277;
}

.cart-icon {
  font-size: 1.2rem;
}

.cart-count {
  background-color: white;
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
}

.cart-total {
  font-weight: bold;
  font-size: 0.9rem;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: white;
  padding: 70px 0 30px;
  margin-top: 80px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}

.footer-about h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.footer-about p {
  opacity: 0.7;
  line-height: 1.6;
  margin-bottom: 20px;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.social-icon:hover {
  background-color: var(--accent);
}

.footer-links h4 {
  font-size: 1.2rem;
  margin-bottom: 20px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: white;
  opacity: 0.7;
  text-decoration: none;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Mobile Responsive */
@media (max-width: 900px) {
  .page-layout {
    flex-direction: column;
  }

  .sidebar {
    max-width: none;
    order: 2;
  }

  .main-content {
    order: 1;
  }

  .filter-section {
    position: static;
  }

  .header-stats {
    flex-wrap: wrap;
    gap: 20px;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-content {
    gap: 15px;
  }

  nav ul {
    gap: 15px;
  }

  .content-controls {
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .page-header h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 2rem;
  }

  .cart-summary {
    bottom: 20px;
    right: 20px;
    padding: 12px 16px;
  }
}
