/* CSS Variables for Color Palette */
:root {
  --primary: #0ea5a4; /* Teal */
  --accent: #ff7aa2; /* Coral */
  --bg: #f7fbfb; /* Light background */
  --muted: #6b7280; /* Gray for text */
  --light: #ffffff; /* White */
  --dark: #1e293b; /* Dark text */
  --shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  padding: 2rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

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

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--dark);
  font-weight: 600;
  font-size: 2.5rem;
}

h1 span {
  color: var(--primary);
}

/* Product Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
}

/* Product Card Styles */
.product-card {
  background: var(--light);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

/* Product Image Container */
.product-image {
  position: relative;
  overflow: hidden;
  height: 250px;
  background-color: #f1f5f9;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

/* Image Overlay for Quick View */
.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 165, 164, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .image-overlay {
  opacity: 1;
}

.quick-view {
  color: white;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  padding: 10px 20px;
  border-radius: 30px;
  font-weight: 500;
  backdrop-filter: blur(5px);
  transition: var(--transition);
}

.quick-view:hover {
  background: white;
  color: var(--primary);
}

/* Wishlist Icon */
.wishlist-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.wishlist-icon:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.1);
}

/* Badges (Discount, Sold Out, etc.) */
.badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 10;
}

.discount-badge {
  background: var(--accent);
  color: white;
}

.sold-out-badge {
  background: var(--muted);
  color: white;
}

.limited-badge {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
}

/* Product Info */
.product-info {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.product-description {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Rating Styles */
.product-rating {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.stars {
  color: #ffc107;
  font-size: 1rem;
  letter-spacing: 2px;
  transition: var(--transition);
}

.product-card:hover .stars {
  text-shadow: 0 0 8px rgba(255, 193, 7, 0.5);
}

.rating-count {
  color: var(--muted);
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Price Styles */
.product-price {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.current-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: 0.75rem;
}

.original-price {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: line-through;
}

/* Add to Cart Button */
.add-to-cart {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--primary), #0d9488);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.add-to-cart:hover {
  background: linear-gradient(135deg, #0d9488, var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(14, 165, 164, 0.4);
}

.add-to-cart:active {
  transform: translateY(0);
}

/* Focus styles for accessibility */
button:focus,
.wishlist-icon:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  h1 {
    font-size: 2rem;
  }
}

/* Demo Section */
.demo-section {
  margin-top: 3rem;
  width: 100%;
  text-align: center;
}

.demo-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--dark);
}

.card-variations {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.variation-btn {
  padding: 8px 16px;
  background: var(--light);
  border: 2px solid var(--primary);
  border-radius: 30px;
  color: var(--primary);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.variation-btn.active {
  background: var(--primary);
  color: white;
}

.variation-btn:hover:not(.active) {
  background: rgba(14, 165, 164, 0.1);
}

footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
