/* Global Styles */
body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
}

/* Navbar */
.navbar {
  background: linear-gradient(90deg, #1a1a1a 0%, #333 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar .logo {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  background: #ffbf00;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  transition: background 0.3s, transform 0.2s;
}

.nav-links li a:hover {
  background: #e6ac00;
  transform: translateY(-2px);
}

/* Animated Heading */
.animated-heading {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(45deg, #ffbf00, #ff6f61);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: bounce 2s infinite;
  margin: 2rem 0;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Layout */
.main-content {
  display: flex;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.sidebar h3 {
  color: #ffbf00;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar .category-item {
  padding: 0.8rem 1rem;
  cursor: pointer;
  color: #333;
  font-weight: 500;
  position: relative;
  transition: color 0.3s, background 0.3s;
  border-radius: 6px;
  margin: 0.5rem 0;
}

.sidebar .category-item:hover {
  background: #ffbf00;
  color: #fff;
}

.sidebar .category-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #ff6f61;
  transition: width 0.3s ease;
}

.sidebar .category-item:hover::after {
  width: 100%;
}

.sidebar .category-item.active {
  background: #ffbf00;
  color: #fff;
}

/* Product Section */
.product-section {
  flex-grow: 1;
  padding: 0 2rem;
}

.product-section h2 {
  font-size: 2rem;
  color: #333;
  border-bottom: 3px solid #ffbf00;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

/* Product Grid & Cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.product-card {
  border: none;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeIn 0.5s ease forwards;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  /* Temporary rule to ensure visibility */
  visibility: visible !important;
  opacity: 1 !important;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card .badge {
  background: #ff6f61;
  color: #fff;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.product-card img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto;
  transition: transform 0.3s;
}

.product-card:hover img {
  transform: scale(1.1);
}

.product-card .price {
  color: #e60000;
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

/* Product Actions */
.product-actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  flex: 1;
  max-width: 130px;
}

.add-to-cart {
  background: #ffbf00;
  color: #000;
}

.add-to-cart:hover {
  background: #e6ac00;
  transform: scale(1.05);
}

.buy-now {
  background: #333;
  color: #fff;
}

.buy-now:hover {
  background: #1a1a1a;
  transform: scale(1.05);
}

/* Footer */
.footer {
  background: #1a1a1a;
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  border-top: 4px solid #ffbf00;
}



/* Cart Page Specific */
.cart-page {
  max-width: 900px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.cart-page h2 {
  font-size: 2rem;
  color: #333;
  border-bottom: 3px solid #ffbf00;
  padding-bottom: 0.5rem;
  margin-bottom: 2rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  background: #fff;
  border: none;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}

.cart-item:hover {
  transform: translateY(-3px);
}

.cart-item-image {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin-right: 1.5rem;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #333;
}

.cart-item-price {
  font-size: 1.1rem;
  color: #e60000;
  margin: 0 0 0.5rem;
}

.remove-btn {
  background: #dc3545;
  color: #fff;
}

.remove-btn:hover {
  background: #c82333;
  transform: scale(1.05);
}

.empty-cart {
  text-align: center;
  font-size: 1.3rem;
  color: #666;
  margin: 3rem 0;
}

.cart-summary {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #ddd;
}

.cart-summary p {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.checkout-btn {
  background: #ffbf00;
  color: #000;
  padding: 0.7rem 2rem;
  font-size: 1.1rem;
}

.checkout-btn:hover {
  background: #e6ac00;
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1.5rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  .main-content {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #ddd;
  }

  .product-section {
    padding: 0 1.5rem;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .cart-item-image {
    margin-bottom: 1.5rem;
  }

  .cart-summary {
    flex-direction: column;
    align-items: flex-end;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .cart-item-image {
    width: 80px;
    height: 80px;
  }

  .checkout-btn {
    width: 100%;
    text-align: center;
  }

  .animated-heading {
    font-size: 1.8rem;
  }
}