/**
 * Affiliate Engine — Public Frontend Styles
 *
 * Optimized for performance and conversion.
 * Mobile-first responsive design.
 */

/* ─── Disclosure ────────────────────────────────────────────────────── */
.ae-disclosure {
  background: #f8fafc;
  border-left: 3px solid #94a3b8;
  padding: 10px 16px;
  margin-bottom: 24px;
  border-radius: 0 6px 6px 0;
}

.ae-disclosure small {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

/* ─── Product List ──────────────────────────────────────────────────── */
.ae-product-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 0;
}

/* ─── Product Card ──────────────────────────────────────────────────── */
.ae-product-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: box-shadow 0.2s ease;
}

.ae-product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

@media (max-width: 640px) {
  .ae-product-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ─── Rank Badge ────────────────────────────────────────────────────── */
.ae-product-rank {
  position: absolute;
  top: -8px;
  left: 16px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 1;
}

/* ─── Product Image ─────────────────────────────────────────────────── */
.ae-product-image {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ae-product-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
}

@media (max-width: 640px) {
  .ae-product-image {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }
}

/* ─── Product Info ──────────────────────────────────────────────────── */
.ae-product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ae-product-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.ae-product-title a {
  color: #0f172a;
  text-decoration: none;
}

.ae-product-title a:hover {
  color: #2563eb;
}

/* ─── Meta ──────────────────────────────────────────────────────────── */
.ae-product-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}

.ae-brand {
  background: #f1f5f9;
  padding: 2px 10px;
  border-radius: 12px;
  font-weight: 500;
}

.ae-rating {
  color: #f59e0b;
}

/* ─── Price ─────────────────────────────────────────────────────────── */
.ae-product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.ae-price-now {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
}

.ae-price-was {
  font-size: 16px;
  color: #94a3b8;
  text-decoration: line-through;
}

.ae-savings {
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ─── Price Freshness ───────────────────────────────────────────────── */
.ae-price-freshness {
  font-size: 11px;
}

.ae-price-fresh {
  color: #16a34a;
}

.ae-price-aging {
  color: #ca8a04;
}

.ae-price-stale {
  color: #dc2626;
}

/* ─── Description ───────────────────────────────────────────────────── */
.ae-product-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}

/* ─── Features ──────────────────────────────────────────────────────── */
.ae-features {
  list-style: none;
  padding: 0;
  margin: 4px 0;
}

.ae-features li {
  position: relative;
  padding-left: 18px;
  font-size: 13px;
  color: #475569;
  line-height: 1.8;
}

.ae-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #16a34a;
  font-weight: bold;
}

/* ─── Pros & Cons ───────────────────────────────────────────────────── */
.ae-pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 13px;
}

@media (max-width: 480px) {
  .ae-pros-cons {
    grid-template-columns: 1fr;
  }
}

.ae-pros ul,
.ae-cons ul {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}

.ae-pros li::before {
  content: "👍 ";
}

.ae-cons li::before {
  content: "👎 ";
}

/* ─── CTA Button ────────────────────────────────────────────────────── */
.ae-cta-button {
  display: inline-block;
  background: #f59e0b;
  color: #0f172a;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: all 0.15s ease;
  margin-top: 8px;
}

.ae-cta-button:hover {
  background: #d97706;
  color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.ae-cta-button:active {
  transform: translateY(0);
}

.ae-cta-woo {
  background: #7c3aed;
  color: #fff;
}

.ae-cta-woo:hover {
  background: #6d28d9;
  color: #fff;
}

/* ─── Price Drops ───────────────────────────────────────────────────── */
.ae-price-drops {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.ae-drop-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  position: relative;
  text-align: center;
}

.ae-drop-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.ae-drop-card img {
  max-width: 120px;
  height: auto;
  margin: 8px auto;
  display: block;
}

.ae-drop-card h4 {
  font-size: 14px;
  margin: 8px 0;
}

.ae-drop-card h4 a {
  color: #0f172a;
  text-decoration: none;
}

.ae-drop-prices {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: baseline;
}

.ae-drop-prices .ae-was {
  color: #94a3b8;
  text-decoration: line-through;
  font-size: 14px;
}

.ae-drop-prices .ae-now {
  color: #dc2626;
  font-size: 20px;
  font-weight: 700;
}

/* ─── Price Drops Widget ────────────────────────────────────────────── */
.ae-price-drops-widget {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ae-drop-item {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ae-drop-item .ae-drop-badge {
  position: static;
  font-size: 11px;
  padding: 2px 8px;
}

/* ─── Comparison ────────────────────────────────────────────────────── */
.ae-comparison-widget {
  margin: 24px 0;
}

.ae-comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

.ae-comparison-table th,
.ae-comparison-table td {
  padding: 12px 16px;
  text-align: center;
  border-bottom: 1px solid #e2e8f0;
}

.ae-comparison-table th {
  background: #f8fafc;
}

.ae-comp-header img {
  margin-bottom: 8px;
  border-radius: 6px;
}

.ae-comp-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ─── Footer Disclosure ─────────────────────────────────────────────── */
.ae-footer-disclosure {
  margin-top: 40px;
  padding: 20px;
  border-top: 1px solid #e2e8f0;
}

.ae-footer-disclosure p {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

/* ─── Category Hub ──────────────────────────────────────────────────── */
.ae-category-hub .ae-brand-nav {
  margin-bottom: 24px;
}

.ae-category-hub .ae-brand-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.ae-category-hub .ae-brand-nav li a {
  display: inline-block;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  transition: background 0.15s;
}

.ae-category-hub .ae-brand-nav li a:hover {
  background: #e2e8f0;
}

/* ─── Intro Section ─────────────────────────────────────────────────── */
.ae-intro {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  margin-bottom: 24px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
}

/* ─── Comparison Page ───────────────────────────────────────────────── */
.ae-comparison {
  margin: 24px 0;
}

.ae-comparison-analysis {
  font-size: 15px;
  line-height: 1.7;
  color: #475569;
  margin-top: 24px;
}
