html {
  font-size: 14px;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #f8f9fa;
}

header {
  background-color: #333;
  padding: 1rem;
  color: white;
  text-align: center;
}

header nav {
  display: flex;
  gap: 1rem;
}

header nav a {
  color: white;
  text-decoration: none;
}

h1 {
  font-size: 2.5em;
  margin: 0;
}

h2 {
  font-size: 2em;
  margin: 20px 0;
}

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

footer {
  background-color: #f5f5f5;
  padding: 1rem;
  margin-top: 2rem;
}

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

/* Product grid styling */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.product-card h3 {
    font-size: 18px;
    margin: 10px 0;
}

.product-card p {
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.product-card button {
    margin-top: auto;
    width: 100%;
}

.product {
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 15px;
  margin: 15px;
  background-color: white;
  transition: box-shadow 0.3s;
}

.product:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.product-item {
  border: 1px solid #ddd;
  padding: 1rem;
  border-radius: 5px;
}

.product-item img {
  max-width: 100%;
  height: auto;
}

.cart {
  margin: 20px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #dee2e6;
}

.checkout-button {
  background-color: #28a745;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.checkout-button:hover {
  background-color: #218838;
}

.product-image {
    max-height: 400px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
}

.price {
    font-size: 1.2rem;
    color: #333;
}

.btn {
    margin-right: 10px;
}

/* Responsive design for product pages */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    h1, .h1 {
        font-size: 1.8rem;
    }
    
    h2, .h2 {
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .product-grid .card {
        margin-bottom: 15px;
    }
    
    .product-img {
        height: 150px;
    }
    
    .table-responsive {
        overflow-x: auto;
    }
}

/* Product details page */
.product-gallery {
    position: relative;
}

.main-product-image {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.product-thumbnail {
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-thumbnail.active {
    border: 2px solid #007bff;
}

.image-description {
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    background-color: #f8f9fa;
}

/* Responsive fixes for mobile */
@media (max-width: 576px) {
    .add-to-cart-btn {
        width: 100%;
    }
    
    .quantity-control {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .product-meta {
        margin-top: 1rem;
    }
}