/* Global Styles */
body {
  font-family: Arial, sans-serif;
  background-color: #FAF6F0;
  margin: 0;
  padding: 20px;
  text-align: center;
}

h1 {
  color: #111;
  margin-bottom: 25px;
}

/* Storefront Container - Designed specifically for a 4-Column Grid */
.container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px;
}

/* Fallback Flexbox Grid for older browser support */
@supports not (display: grid) {
  .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Individual Product Card */
.card, .product-card {
  background: #ffffff;
  border: 2px solid #6b21a8;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.card:hover, .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Badge Styling (Supports both .badge and .card-number) */
.badge, .card-number {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #6b21a8;
  color: #ffffff;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
  z-index: 2;
}

/* Product Image Sizing (Prevents Cropping & Ensures Uniform Height) */
.card img, .product-card img {
  width: 100% !important;
  height: 220px !important;
  object-fit: contain !important;
  border-radius: 8px;
  margin-top: 10px;
  margin-bottom: 10px;
  background-color: #ffffff;
}

/* Product Title */
.card h3, .product-card h3 {
  font-size: 13px;
  color: #222222;
  margin: 8px 0;
  line-height: 1.3;
  height: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Price Styling */
.price {
  font-weight: bold;
  color: #d97706;
  font-size: 15px;
  margin: 4px 0 10px 0;
}

/* Buy / View Button */
.buy-btn, .shop-now-btn {
  background-color: #ff9900;
  color: #000000;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  border-radius: 6px;
  display: inline-block;
  border: 1px solid #d97706;
  transition: background-color 0.2s ease;
  width: 85%;
  text-align: center;
  font-size: 13px;
}

.buy-btn:hover, .shop-now-btn:hover {
  background-color: #e68a00;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 992px) {
  .container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .container {
    grid-template-columns: repeat(1, 1fr);
  }
}
/* Product Card Badge Styling */
.card {
    position: relative;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #6a1b9a;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    padding: 4px 8px;
    min-width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 2;
}

/* Final Override: Wide Orange CTA Buttons Across All Card Formats */
.card a,
.card .buy-btn,
.card .shop-btn,
.card .shop-now-btn,
.product-card a,
.product-card .buy-btn,
.product-card .shop-btn,
.product-card .shop-now-btn,
.buy-btn,
.shop-btn,
.shop-now-btn {
  display: block !important;
  width: 85% !important;
  max-width: 85% !important;
  margin: 10px auto 4px auto !important;
  padding: 10px 0 !important;
  background-color: #f39c12 !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  border: none !important;
  text-align: center !important;
}

.card a:hover,
.card .buy-btn:hover,
.card .shop-btn:hover,
.card .shop-now-btn:hover,
.product-card a:hover,
.product-card .buy-btn:hover,
.product-card .shop-btn:hover,
.product-card .shop-now-btn:hover,
.buy-btn:hover,
.shop-btn:hover,
.shop-now-btn:hover {
  background-color: #e67e22 !important;
  color: #ffffff !important;
}
