/* Premium Affiliate Site CSS - Fixed Grid/Images */

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

:root {
  --clr-primary: #6a11cb;
  --clr-accent: #ffdd57;
  --clr-bg: #f8f9fa;
  --clr-surface: white;
  --clr-text: #333;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
}

.hero {
  background: linear-gradient(135deg, var(--clr-primary), #2575fc);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<defs>
<pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse">
<circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/>
<circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/>
</pattern>
</defs>
<rect width="100" height="100" fill="url(%23grain)"></rect>
</svg>')
  repeat;
  opacity: 0.05;
}
.hero-content { max-width: 800px; margin: 0 auto; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }

.search-bar { max-width: 500px; margin: 2rem auto; }
.search-bar input { width: 100%; padding: 1rem 1.5rem; border: none; border-radius: var(--radius); font-size: 1rem; box-shadow: var(--shadow); }

.navbar { 
delete-this-line-if-placeholder
}

/* FIXED PRODUCT GRID & IMAGES */
#product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Fixed 3 columns on desktop */
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  #product-grid {
    grid-template-columns: 1fr; /* Single column on mobile */
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  min-height: 380px;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.image-wrapper {
  height: auto;
  overflow: hidden;
  position: relative;
}

.product-card img {
  width: 100%;
  height: auto; /* Allow height to adjust */
  object-fit: contain;
  object-position: center top;
}

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

.product-info {
  padding: 1.2rem;
  background: white;
  min-height: 120px;
}

.badges { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }

.badge {
  background: var(--clr-accent);
  color: #333;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

h3 { font-size: 1.2rem; margin-bottom: 0.5rem; line-height: 1.3; }

.product-info h3 { color: var(--clr-text); }

.price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--clr-accent);
  margin-bottom: 0.8rem;
}

.buy-button {
  display: block;
  padding: 0.8rem 1.5rem;
  background: var(--clr-primary);
  color: white;
  text-align: center;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.buy-button:hover {
  background: #5a0ca3;
  transform: translateY(-2px);
}

.price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--clr-accent);
  margin-bottom: 0.8rem;
}

.cta, .buy-button {
  display: block;
  width: 100%;
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, var(--clr-primary), #2575fc) !important;
  color: white !important;
  text-align: center;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(106,17,203,0.3);
  margin-top: auto;
}
.cta:hover, .buy-button:hover {
  background: linear-gradient(135deg, #5a0ca3, #1e5fc4) !important;
  transform: translateY(-2px);
}

.cta:hover { background: #5a0ca3; transform: translateY(-2px); }

.reviews {
  padding: 3rem 2rem;
  background: white;
  margin: 3rem auto;
  max-width: 1200px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
