/**
 * Camptime.ca Affiliate Cards Styling
 * Earthy, premium camping aesthetic
 */

/* Grid layout */
.aff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

@media (max-width: 600px) {
  .aff-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem;
  }
}

/* Card styling */
.aff-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e8e8e8;
}

.aff-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Card image */
.aff-card-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: #f5f5f5;
}

.aff-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

/* Card content */
.aff-card-content {
  padding: 1.25rem;
  position: relative;
}

/* Retailer badge */
.aff-card-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  color: white;
}

/* Retailer-specific badge colors */
.retailer-mec {
  background-color: #2d5a27;
}

.retailer-ct {
  background-color: #dc2626;
}

.retailer-amazon {
  background-color: #ff9900;
}

.retailer-sail {
  background-color: #1e40af;
}

.retailer-atmosphere {
  background-color: #1e3a8a;
}

.retailer-default {
  background-color: #374151;
}

/* Card title */
.aff-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

/* Card description */
.aff-card-blurb {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
}

/* Card footer */
.aff-card-footer {
  margin-top: auto;
}

/* CTA button */
.aff-card-cta {
  display: inline-block;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.aff-card-cta:hover {
  background: linear-gradient(135deg, #059669, #047857);
  text-decoration: none;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.aff-card-cta:active {
  transform: translateY(0);
}

/* No results message */
.aff-no-results {
  text-align: center;
  color: #6b7280;
  font-style: italic;
  padding: 2rem;
  grid-column: 1 / -1;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .aff-card {
    margin-bottom: 0;
  }
  
  .aff-card-content {
    padding: 1rem;
  }
  
  .aff-card-image {
    height: 180px;
  }
  
  .aff-card-title {
    font-size: 1rem;
  }
  
  .aff-card-cta {
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
  }
}

/* Loading state */
.aff-loading {
  text-align: center;
  padding: 2rem;
  color: #6b7280;
}

.aff-loading::after {
  content: "...";
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0%, 20% { opacity: 1; }
  50% { opacity: 0.5; }
  80%, 100% { opacity: 1; }
}

/* Premium indicator */
.aff-card-premium {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #fbbf24;
  color: #92400e;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

/* Category styling for specific types */
.category-shelter .aff-card-badge {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-safety .aff-card-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-cooking .aff-card-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-navigation .aff-card-badge {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* Integration styles for Camptime */
.aff-section { 
  margin-top: 18px; 
  padding-top: 14px; 
  border-top: 1px solid var(--c-border, #e5e7eb); 
}

.aff-heading { 
  font-size: 14px; 
  font-weight: 600; 
  margin: 0 0 10px; 
  color: var(--c-text, #1f2937); 
}

.aff-disclosure { 
  font-size: 11px; 
  color: #9ca3af; 
  margin: 10px 0 0; 
  text-align: center; 
  font-style: italic; 
}