/* CSS Variables for Colors (Adjusted: Softer blue accent instead of pink, calmer tones) */
:root {
  --text-color: #2c3e50; /* Darker text for better contrast */
  --card-bg: #fff;
  --card-shadow: rgba(0,0,0,0.08); /* Softer shadow */
  --price-color: #27ae60; /* Green for price to indicate value */
  --button-bg: #3498db;
  --button-hover: #2980b9;
  --secondary-text: #7f8c8d;
  --modal-bg: #fff;
  --modal-border: #bdc3c7;
}
/* Dark Mode Adaptation (Adjusted colors for better dark mode harmony) */
@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #e2e8f0;
    --card-bg: #2d3748;
    --card-shadow: rgba(0,0,0,0.4);
    --price-color: #48bb78;
    --button-bg: #63b3ed;
    --button-hover: #4299e1;
    --secondary-text: #a0aec0;
    --modal-bg: #2d3748;
    --modal-border: #4a5568;
  }
}
/* Reset styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.add-to-cart {
  background-color: var(--button-bg);
  color: #fff;
  border: none;
  padding: 14px 28px; /* Larger button */
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2em;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: auto;
}
.add-to-cart:hover {
  background-color: var(--button-hover);
  transform: scale(1.02);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin: 0px 10px;
}
.product-card {
  background-color: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  margin-left: 10px;
  margin-right: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
}
.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 20px var(--card-shadow);
}
.product-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
  margin: 0;
}
.product-info {
  padding: 25px; /* Increased padding inside card */
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-info h3 {
  font-size: 1.5em; /* Slightly larger title */
  margin-bottom: 12px;
}
.product-info p {
  color: var(--secondary-text);
  margin-bottom: 18px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1em; /* Slightly larger description */
}
.price {
  font-size: 1.5em; /* Larger price font */
  color: var(--price-color);
  margin-bottom: 18px;
}
/* Cart Modal (Unchanged) */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  padding-top: 100px;
}
.modal-content {
  background-color: var(--modal-bg);
  margin: 5% auto;
  padding: 25px;
  border: 1px solid var(--modal-border);
  width: 80%;
  max-width: 450px;
  border-radius: 15px;
  text-align: center;
  color: var(--text-color);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
/* Responsive Design (Adjusted for larger cards on mobile) */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 30px; /* Smaller gap on mobile */
  }
  .product-card img {
    height: 250px; /* Fixed height for consistency on mobile */
  }
}
