/**
 * SavingCat Affiliate Plugin - Frontend Styles
 * Version: 1.0.0
 */

/* ============================================
   BASE (same as magazine theme for consistency)
   ============================================ */
:root {
  --sc-blue: #4a9eed;
  --sc-dark: #1e1e1e;
  --sc-white: #ffffff;
  --sc-gray-100: #f5f5f5;
  --sc-gray-200: #e0e0e0;
  --sc-gray-400: #9e9e9e;
  --sc-gray-600: #757575;
  --sc-gray-800: #1e1e1e;
  --sc-dogs-bg: #e8f5e9;
  --sc-cats-bg: #fce4ec;
  --sc-products-bg: #fff8e1;
  --sc-newsletter-bg: #dbeafe;
  --sc-tag-dogs: #8b5cf6;
  --sc-tag-cats: #ec4899;
  --sc-tag-product: #f59e0b;
  --sc-tag-best: #22c55e;
  --sc-tag-premium: #ef4444;
  --sc-card-radius: 12px;
  --sc-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --sc-font-heading: Georgia, 'Times New Roman', serif;
}

/* ============================================
   HERO (if rendered via shortcode)
   ============================================ */
.sc-hero {
  position: relative;
  height: 360px;
  overflow: hidden;
  background: #c3d4e8;
  border-radius: 0;
}

.sc-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sc-hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
}

.sc-hero-content {
  position: absolute;
  bottom: 60px;
  left: 40px;
  max-width: 540px;
}

.sc-hero-tag {
  display: inline-block;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-transform: uppercase;
}

.sc-hero-title {
  font-family: var(--sc-font-heading);
  font-size: 30px;
  color: white;
  line-height: 1.3;
  margin-bottom: 12px;
}

.sc-hero-desc {
  color: #e0e0e0;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.sc-hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.sc-hero-meta {
  color: #bbb;
  font-size: 13px;
}

/* ============================================
   BUTTONS
   ============================================ */
.sc-btn-primary {
  display: inline-block;
  background: var(--sc-blue);
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 10px 24px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.sc-btn-primary:hover {
  background: #3a8ee5;
  color: white;
}

.sc-btn-check-price {
  display: inline-block;
  background: var(--sc-blue);
  color: white;
  font-size: 13px;
  font-weight: bold;
  padding: 7px 14px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  text-decoration: none;
}

.sc-btn-check-price:hover {
  background: #3a8ee5;
  color: white;
}

/* ============================================
   PRODUCT CARDS (grid)
   ============================================ */
.sc-products-section {
  padding: 20px 0;
}

.sc-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0 40px;
}

.sc-products-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 40px;
}

.sc-product-card {
  background: white;
  border-radius: var(--sc-card-radius);
  overflow: hidden;
  border: 1px solid var(--sc-gray-200);
  transition: transform 0.2s, box-shadow 0.2s;
}

.sc-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.sc-product-img-wrap {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: #eceff1;
}

.sc-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.sc-product-badge {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 11px;
  font-weight: bold;
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
}

.sc-product-body {
  padding: 14px;
}

.sc-product-title {
  font-family: var(--sc-font-heading);
  font-size: 15px;
  color: var(--sc-dark);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.sc-product-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sc-product-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--sc-dark);
}

.sc-product-price-row .sc-btn-check-price {
  margin-left: auto;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.sc-newsletter {
  background: var(--sc-newsletter-bg);
  border: 2px solid var(--sc-blue);
  margin: 0 40px 30px;
  border-radius: var(--sc-card-radius);
  padding: 30px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.sc-newsletter-title {
  font-family: var(--sc-font-heading);
  font-size: 22px;
  color: var(--sc-dark);
  margin-bottom: 8px;
}

.sc-newsletter-desc {
  color: var(--sc-gray-600);
  font-size: 14px;
  line-height: 1.5;
}

.sc-newsletter-form {
  display: flex;
  margin-left: auto;
  flex-shrink: 0;
}

.sc-newsletter-email {
  background: white;
  border: 1px solid var(--sc-blue);
  border-right: none;
  border-radius: 20px 0 0 20px;
  padding: 10px 20px;
  font-size: 14px;
  color: #333;
  width: 260px;
  outline: none;
}

.sc-newsletter-email::placeholder {
  color: #aaa;
}

.sc-newsletter-submit {
  background: var(--sc-blue);
  color: white;
  border: none;
  border-radius: 0 20px 20px 0;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.sc-newsletter-submit:hover {
  background: #3a8ee5;
}

/* ============================================
   DISCLOSURE
   ============================================ */
.savingcat-disclosure {
  font-size: 12px;
  color: #757575;
  line-height: 1.6;
  max-width: 800px;
  margin: 20px auto;
  text-align: center;
  padding: 0 20px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.savingcat-empty {
  color: #999;
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .sc-products-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 16px;
    gap: 12px;
  }

  .sc-newsletter {
    flex-direction: column;
    gap: 20px;
    padding: 24px 20px;
    margin: 0 16px 20px;
  }

  .sc-newsletter-form {
    margin-left: 0;
    width: 100%;
  }

  .sc-newsletter-email {
    width: 100%;
  }

  .sc-hero {
    height: 280px;
  }

  .sc-hero-title {
    font-size: 22px;
  }

  .sc-hero-content {
    left: 20px;
    bottom: 30px;
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .sc-products-grid {
    grid-template-columns: 1fr;
  }
}
