/* ==========================================================================
   GrumpyGopher Affiliate Review Components
   For product roundup / "best of" posts
   ========================================================================== */

/* --- Quick Picks Banner --- */
.gg-quick-picks {
  background: var(--gg-green-light, #e8f5ee);
  border: 2px solid var(--gg-green, #2a7d4f);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 0 0 36px;
}
.gg-quick-picks h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gg-green-dark, #1e5c3a);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gg-quick-pick {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(42,125,79,.15);
}
.gg-quick-pick:last-child { border-bottom: none; }
.gg-quick-pick-label {
  font-weight: 700;
  color: var(--gg-dark, #1a1a2e);
  white-space: nowrap;
  min-width: 140px;
}
.gg-quick-pick a {
  color: var(--gg-green, #2a7d4f);
  font-weight: 600;
  text-decoration: none;
}
.gg-quick-pick a:hover { text-decoration: underline; }
.gg-quick-pick-price {
  color: var(--gg-text-light, #718096);
  font-size: 0.9rem;
  margin-left: auto;
  white-space: nowrap;
}

/* --- Comparison Table --- */
.gg-compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 36px;
  border: 1px solid var(--gg-border, #e2e8f0);
  border-radius: 10px;
}
.gg-compare-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.gg-compare-table thead th {
  background: var(--gg-dark, #1a1a2e);
  color: #fff;
  font-weight: 600;
  padding: 12px 14px;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.gg-compare-table thead th:first-child {
  border-radius: 9px 0 0 0;
}
.gg-compare-table thead th:last-child {
  border-radius: 0 9px 0 0;
}
.gg-compare-table tbody tr {
  border-bottom: 1px solid var(--gg-border, #e2e8f0);
}
.gg-compare-table tbody tr:last-child { border-bottom: none; }
.gg-compare-table tbody tr:nth-child(even) {
  background: var(--gg-light, #f7fafc);
}
.gg-compare-table td {
  padding: 12px 14px;
  vertical-align: middle;
}
.gg-compare-table td:first-child {
  font-weight: 600;
  color: var(--gg-dark, #1a1a2e);
}
.gg-compare-badge {
  display: inline-block;
  background: var(--gg-gold, #c9a84c);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-left: 6px;
  vertical-align: middle;
}
.gg-compare-badge--green {
  background: var(--gg-green, #2a7d4f);
}
.gg-compare-cta {
  display: inline-block;
  background: var(--gg-green, #2a7d4f);
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}
.gg-compare-cta:hover {
  background: var(--gg-green-dark, #1e5c3a);
  color: #fff !important;
  text-decoration: none;
}

/* --- Product Review Card --- */
.gg-product-review {
  border: 1px solid var(--gg-border, #e2e8f0);
  border-radius: 12px;
  padding: 28px;
  margin: 0 0 32px;
  background: #fff;
  position: relative;
}
.gg-product-review--featured {
  border-color: var(--gg-green, #2a7d4f);
  box-shadow: 0 0 0 1px var(--gg-green, #2a7d4f);
}
.gg-product-award {
  position: absolute;
  top: -12px;
  left: 24px;
  background: var(--gg-gold, #c9a84c);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gg-product-award--green {
  background: var(--gg-green, #2a7d4f);
}
.gg-product-header {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.gg-product-img {
  flex: 0 0 180px;
  text-align: center;
}
.gg-product-img img {
  max-width: 180px;
  height: auto;
  border-radius: 8px;
}
.gg-product-info { flex: 1; }
.gg-product-info h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--gg-dark, #1a1a2e);
}
.gg-product-info h3 a {
  color: inherit;
  text-decoration: none;
}
.gg-product-info h3 a:hover { color: var(--gg-green, #2a7d4f); }
.gg-product-tagline {
  font-size: 1rem;
  color: var(--gg-text-light, #718096);
  margin: 0 0 12px;
}
.gg-product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gg-green, #2a7d4f);
}

/* Specs grid */
.gg-product-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 20px;
  padding: 16px;
  background: var(--gg-light, #f7fafc);
  border-radius: 8px;
}
.gg-spec {
  display: flex;
  flex-direction: column;
}
.gg-spec-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gg-text-light, #718096);
  font-weight: 600;
}
.gg-spec-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gg-dark, #1a1a2e);
}

/* Pros / Cons */
.gg-proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 20px;
}
.gg-pros, .gg-cons {
  padding: 16px;
  border-radius: 8px;
}
.gg-pros {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}
.gg-cons {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
}
.gg-pros h4, .gg-cons h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
}
.gg-pros h4 { color: #16a34a; }
.gg-cons h4 { color: #dc2626; }
.gg-pros ul, .gg-cons ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.gg-pros li, .gg-cons li {
  padding: 4px 0 4px 22px;
  position: relative;
  font-size: 0.9rem;
  line-height: 1.5;
}
.gg-pros li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}
.gg-cons li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  color: #ef4444;
  font-weight: 700;
}

/* Verdict */
.gg-verdict {
  background: var(--gg-light, #f7fafc);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 0 20px;
  border-left: 4px solid var(--gg-green, #2a7d4f);
}
.gg-verdict strong {
  color: var(--gg-green-dark, #1e5c3a);
}

/* CTA button row */
.gg-product-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.gg-btn-affiliate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--gg-green, #2a7d4f);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}
.gg-btn-affiliate:hover {
  background: var(--gg-green-dark, #1e5c3a);
  color: #fff !important;
  text-decoration: none;
  transform: translateY(-1px);
}
.gg-btn-affiliate--outline {
  background: transparent;
  color: var(--gg-green, #2a7d4f) !important;
  border: 2px solid var(--gg-green, #2a7d4f);
}
.gg-btn-affiliate--outline:hover {
  background: var(--gg-green-light, #e8f5ee);
  color: var(--gg-green-dark, #1e5c3a) !important;
}

/* --- Buyer's Guide Section --- */
.gg-guide-section {
  margin: 0 0 32px;
}
.gg-guide-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gg-dark, #1a1a2e);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gg-green, #2a7d4f);
  display: inline-block;
}

/* --- FAQ Accordion --- */
.gg-faq { margin: 0 0 36px; }
.gg-faq-q {
  background: var(--gg-light, #f7fafc);
  border: 1px solid var(--gg-border, #e2e8f0);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 0 0 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--gg-dark, #1a1a2e);
  transition: background 0.2s;
}
.gg-faq-q:hover { background: var(--gg-green-light, #e8f5ee); }
.gg-faq-q::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--gg-text-light, #718096);
  transition: transform 0.2s;
}
.gg-faq-q.active::after {
  content: "\2212";
}
.gg-faq-a {
  display: none;
  padding: 4px 20px 16px;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--gg-text, #2d3748);
}
.gg-faq-a.active { display: block; }

/* --- Affiliate Disclosure --- */
.gg-disclosure {
  background: var(--gg-light, #f7fafc);
  border-radius: 8px;
  padding: 14px 20px;
  font-size: 0.82rem;
  color: var(--gg-text-light, #718096);
  line-height: 1.6;
  margin: 0 0 32px;
}

/* --- Table of Contents --- */
.gg-toc {
  background: #fff;
  border: 1px solid var(--gg-border, #e2e8f0);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 0 0 32px;
}
.gg-toc h4 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gg-dark, #1a1a2e);
  margin: 0 0 12px;
}
.gg-toc ol {
  padding-left: 20px;
  margin: 0;
}
.gg-toc li {
  padding: 4px 0;
}
.gg-toc a {
  color: var(--gg-green, #2a7d4f);
  text-decoration: none;
  font-size: 0.92rem;
}
.gg-toc a:hover { text-decoration: underline; }

/* --- Quiz Embed --- */
.gg-quiz-embed {
  border: 2px solid var(--gg-green, #2a7d4f);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 36px;
  background: var(--gg-green-light, #e8f5ee);
  padding: 20px;
  text-align: center;
}
.gg-quiz-embed h3 {
  color: var(--gg-green-dark, #1e5c3a);
  margin: 0 0 8px;
}
.gg-quiz-embed p {
  color: var(--gg-text, #2d3748);
  margin: 0 0 16px;
  font-size: 0.95rem;
}
.gg-quiz-embed iframe {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: #fff;
}

/* --- Image fallback / loading state --- */
.gg-product-img img {
  background: var(--gg-light, #f7fafc);
  object-fit: contain;
}
.gg-product-img img[src=""],
.gg-product-img img:not([src]) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background: var(--gg-light, #f7fafc);
  border: 2px dashed var(--gg-border, #e2e8f0);
  border-radius: 8px;
}
/* Live price highlight when updated by API */
.gg-product-price.gg-price-live {
  position: relative;
}
.gg-product-price.gg-price-live::after {
  content: "live price";
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gg-green, #2a7d4f);
  background: var(--gg-green-light, #e8f5ee);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .gg-product-header { flex-direction: column; }
  .gg-product-img { flex: none; }
  .gg-product-img img { max-width: 140px; }
  .gg-proscons { grid-template-columns: 1fr; }
  .gg-product-specs { grid-template-columns: repeat(2, 1fr); }
  .gg-quick-pick { flex-wrap: wrap; }
  .gg-quick-pick-label { min-width: auto; }
  .gg-quick-pick-price { margin-left: 0; }
  .gg-product-review { padding: 20px; }
}
@media (max-width: 480px) {
  .gg-product-specs { grid-template-columns: 1fr 1fr; }
  .gg-product-cta { flex-direction: column; }
  .gg-btn-affiliate { justify-content: center; }
}
