* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #222;
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar .logo a {
  color: #fff;
  font-size: 1.5em;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin: 0 10px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #f39c12;
}

.search-bar {
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 5px;
  border: none;
  border-radius: 4px;
}

.search-bar button {
  padding: 5px 10px;
  margin-right: 5px;
  border: none;
  background-color: #f39c12;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.search-bar button:hover {
  background-color: #e67e22;
}

main {
  padding: 20px;
}

.featured {
  margin-bottom: 40px;
}

.featured h1 {
  margin-bottom: 20px;
  text-align: center;
}

.featured-products {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.categories {
  margin-bottom: 40px;
}

.categories h1 {
  margin-bottom: 20px;
  text-align: center;
}

.category-list {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

.category-item {
  text-align: center;
  margin: 10px;
}

.category-item img {
  width: 200px;
  height: auto;
  border-radius: 8px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.product-card {
  background-color: #fff;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
}

.product-card img {
  width: 80%;
  height: 250px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 10px;
}

.product-card h2 {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.product-card p.price {
  color: #f39c12;
  font-weight: bold;
  margin-bottom: 15px;
}

.add-to-cart {
  padding: 10px 15px;
  border: none;
  background-color: #27ae60;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.add-to-cart:hover {
  background-color: #219150;
}

.product-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.product-detail .product-image {
  flex: 1 1 300px;
}

.product-detail .product-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.product-detail .product-info {
  flex: 1 1 300px;
}

.product-detail .product-info h1 {
  margin-bottom: 20px;
}

.product-detail .product-info p.price {
  font-size: 1.5em;
  color: #f39c12;
  margin-bottom: 20px;
}

.product-detail .product-info .description {
  margin-bottom: 20px;
}

.cart {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.cart h1 {
  margin-bottom: 20px;
  text-align: center;
}

#cart-items {
  margin-bottom: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item .item-info {
  flex: 2;
}

.cart-item .item-info h3 {
  margin-bottom: 5px;
}

.cart-item .item-info p {
  color: #f39c12;
}

.cart-item .item-actions {
  flex: 1;
  text-align: center;
}

.cart-item .item-actions button {
  padding: 5px 10px;
  border: none;
  background-color: #c0392b;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.cart-summary {
  text-align: center;
  margin-top: 20px;
}

.btn-checkout {
  display: inline-block;
  padding: 10px 20px;
  background-color: #2980b9;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.btn-checkout:hover {
  background-color: #1c5980;
}

.checkout {
  background-color: #fff;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-width: 500px;
  margin: 0 auto;
}

.checkout h1 {
  text-align: center;
  margin-bottom: 20px;
}

.checkout form .form-group {
  margin-bottom: 15px;
}

.checkout form .form-group label {
  display: block;
  margin-bottom: 5px;
}

.checkout form .form-group input,
.checkout form .form-group select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

footer {
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 10px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
  }
  .nav-links {
    flex-direction: column;
    margin: 10px 0;
  }
  .featured-products, .category-list {
    flex-direction: column;
    align-items: center;
  }
  .product-detail {
    flex-direction: column;
  }
}
