/* ===================================================================
   ACE Affiliate Site - Main Stylesheet
   Clean, responsive design for Amazon Associates compliance
   =================================================================== */

/* === CSS Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c3e50;
  --accent-color: #e67e22;
  --text-color: #333;
  --text-light: #666;
  --border-color: #e0e0e0;
  --bg-light: #f9f9f9;
  --success-color: #27ae60;
  --danger-color: #e74c3c;
  --max-width: 1200px;
  --spacing: 2rem;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background: #fff;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

p { margin-bottom: 1rem; }

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--primary-color); }

/* === Container === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* === Header === */
.site-header {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title a {
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
}

.site-nav {
  display: flex;
  gap: 2rem;
}

.site-nav a {
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.1);
}

/* === Main Content === */
.site-main {
  min-height: 60vh;
  padding: var(--spacing) 0;
}

/* === Homepage === */
.hero {
  text-align: center;
  padding: 6rem 4rem;
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
              url('/images/hero-coffee.jpg') center/cover no-repeat;
  border-radius: 8px;
  margin-bottom: 3rem;
  position: relative;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: white;
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.latest-reviews,
.categories {
  margin: 4rem 0;
}

.latest-reviews h2,
.categories h2 {
  text-align: center;
  margin-bottom: 2rem;
}

/* === Article Grid === */
.article-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card,
.category-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--bg-light);
}

.card-content,
.category-card {
  padding: 1.5rem;
}

.card-content h3 {
  margin-bottom: 0.5rem;
}

.card-content h3 a {
  color: var(--primary-color);
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--accent-color);
  font-weight: 500;
}

/* === Article Page === */
.article {
  max-width: 800px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 2rem;
}

.article-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.article-hero {
  width: 100%;
  height: 400px;
  object-fit: contain;
  background: var(--bg-light);
  border-radius: 8px;
}

/* === Product Card === */
.product-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2rem;
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.product-image img {
  width: 100%;
  border-radius: 8px;
}

.product-rating {
  margin: 1rem 0;
}

.stars {
  color: #f39c12;
  font-size: 1.25rem;
}

.rating-number {
  margin-left: 0.5rem;
  font-weight: bold;
}

.review-count {
  color: var(--text-light);
  margin-left: 0.5rem;
}

.product-price {
  font-size: 2rem;
  color: var(--accent-color);
  font-weight: bold;
  margin: 1rem 0;
}

.buy-button {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 1rem 2rem;
  border-radius: 4px;
  font-weight: bold;
  text-align: center;
  transition: background 0.2s;
  margin: 1rem 0;
}

.buy-button:hover {
  background: #d35400;
  color: white;
}

.buy-button-large {
  font-size: 1.25rem;
  padding: 1.25rem 2.5rem;
}

.affiliate-notice {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* === Article Content === */
.article-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1rem 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* === Pros & Cons === */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.pros, .cons {
  padding: 1.5rem;
  border-radius: 8px;
}

.pros {
  background: #e8f8f5;
  border-left: 4px solid var(--success-color);
}

.cons {
  background: #fadbd8;
  border-left: 4px solid var(--danger-color);
}

.pros h3 { color: var(--success-color); }
.cons h3 { color: var(--danger-color); }

.pros ul, .cons ul {
  list-style: none;
  margin: 1rem 0 0 0;
}

.pros li, .cons li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.pros li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

.cons li::before {
  content: "✗";
  position: absolute;
  left: 0;
  color: var(--danger-color);
  font-weight: bold;
}

/* === CTA === */
.article-cta {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  margin: 3rem 0;
}

.article-cta h3 {
  margin-bottom: 1rem;
}

/* === Footer === */
.site-footer {
  background: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  text-align: center;
}

.disclosure {
  background: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
}

.footer-links a {
  color: white;
}

.copyright {
  color: rgba(255,255,255,0.7);
  margin-top: 2rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .article-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-columns: 1fr;
  }

  .pros-cons {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}
