/* ============================================
   EcoHome Intelligence — Conversion Components
   Add to ecohome-theme-v2.css
   ============================================ */

/* === PRODUCT COMPARISON TABLE === */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.95rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(15,46,34,0.08);
}
.comparison-table thead {
  background: var(--forest-strong);
  color: white;
}
.comparison-table th {
  padding: 16px 20px;
  font-weight: 700;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--emerald-100);
  vertical-align: middle;
}
.comparison-table tbody tr {
  background: white;
  transition: background 0.2s;
}
.comparison-table tbody tr:hover {
  background: var(--emerald-50);
}
.comparison-table .badge-best {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #059669, #047857);
  color: white;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-table .badge-budget {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-table .badge-apartments {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.comparison-table .price-tag {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--forest-strong);
}
.comparison-table .savings-tag {
  color: var(--emerald-700);
  font-weight: 600;
  font-size: 0.85rem;
}

/* === AFFILIATE CTA BUTTON (standalone) === */
.affiliate-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(217,119,6,0.3);
}
.affiliate-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(217,119,6,0.4);
}
.affiliate-cta svg {
  width: 18px;
  height: 18px;
}

/* === AUTHOR BIO BOX === */
.author-bio-v2 {
  background: var(--warm-bg);
  border-radius: 16px;
  padding: 32px;
  margin: 3rem 0;
  border: 1px solid var(--emerald-100);
}
.author-bio-v2 .author-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}
.author-bio-v2 .author-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--forest), var(--emerald-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
}
.author-bio-v2 .author-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
}
.author-bio-v2 .author-title {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 500;
}
.author-bio-v2 .author-cred {
  font-size: 0.8rem;
  color: var(--emerald-700);
  margin: 0;
  font-weight: 600;
}
.author-bio-v2 .author-body {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0;
}
.author-bio-v2 .author-body a {
  color: var(--forest);
  font-weight: 600;
}

/* === SIDEBAR PRODUCT BOX === */
.product-sidebar {
  background: white;
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--emerald-100);
  box-shadow: 0 4px 20px rgba(15,46,34,0.06);
  max-width: 340px;
}
.product-sidebar h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.product-sidebar .product-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--emerald-50);
}
.product-sidebar .product-item:last-child {
  border-bottom: none;
}
.product-sidebar .product-thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.5rem;
}
.product-sidebar .product-details h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.4;
}
.product-sidebar .product-details .savings {
  font-size: 0.8rem;
  color: var(--emerald-700);
  font-weight: 600;
  margin: 0;
}
.product-sidebar .product-details .vendor {
  font-size: 0.75rem;
  color: var(--slate-400);
  margin: 4px 0 0;
}

/* === STICKY TABLE OF CONTENTS === */
.sticky-toc {
  position: sticky;
  top: 100px;
  background: white;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--emerald-100);
  box-shadow: 0 4px 16px rgba(15,46,34,0.04);
  max-width: 280px;
}
.sticky-toc h4 {
  font-size: 0.85rem;
  font-weight: 800;
  margin: 0 0 16px;
  color: var(--ink);
}
.sticky-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sticky-toc li {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--emerald-50);
}
.sticky-toc li:last-child {
  border-bottom: none;
}
.sticky-toc a {
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.sticky-toc a:hover {
  color: var(--forest);
}
.sticky-toc a.current {
  color: var(--forest);
  font-weight: 700;
}

/* === UPDATED DATE BADGE === */
.last-updated-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald-50);
  color: var(--forest);
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* === ENERGY SAVINGS CALLOUT === */
.savings-callout {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-radius: 16px;
  padding: 28px 32px;
  margin: 2rem 0;
  border: 1px solid var(--emerald-200);
}
.savings-callout h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--forest-strong);
  margin: 0 0 12px;
}
.savings-callout p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 16px;
}
.savings-callout .savings-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.savings-callout .savings-row .number {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--forest);
}
.savings-callout .savings-row .label {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* === MOBILE OPTIMIZATIONS === */
@media (max-width: 768px) {
  .comparison-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .comparison-table th,
  .comparison-table td {
    white-space: nowrap;
    padding: 12px 16px;
  }
  .author-bio-v2 .author-header {
    flex-direction: column;
    text-align: center;
  }
  .product-sidebar {
    max-width: 100%;
  }
}
