/**
 * Content Egg Plugin — Style Overrides
 * Adapts Content Egg components to Neon Underground dark theme.
 * Loaded AFTER child style.css (cascade order matters).
 *
 * @version 4.0.0
 */

/* ── Product list containers ── */
.cegg-list-withlogos {
  background: var(--bc-surface);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* ── List header label ── */
.cegg-list-withlogos .cegg-list-logo-title,
.cegg-list-withlogos > .row-products:first-child::before {
  font-family: var(--bc-font-display);
  color: #fff;
}

/* ── Product rows ── */
.cegg-list-withlogos .row-products {
  border-bottom: 1px solid var(--bc-border);
  padding: 16px 20px;
  transition: background 0.15s ease;
  position: relative;
}

.cegg-list-withlogos .row-products:last-child {
  border-bottom: none;
}

.cegg-list-withlogos .row-products:hover {
  background: rgba(57, 255, 20, 0.03);
}

/* ── Best price highlight (first row) ── */
.cegg-list-withlogos .row-products:first-child {
  background: var(--bc-neon-subtle);
  border-left: 3px solid var(--bc-neon);
  border-bottom: 1px solid rgba(57, 255, 20, 0.1);
  padding-left: 17px;
}

.cegg-list-withlogos .row-products:first-child:hover {
  background: var(--bc-neon-glow);
}

/* ── Comparison tables ── */
.cegg-comparison-table {
  background: var(--bc-surface);
  border: 1px solid var(--bc-border);
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.cegg-comparison-table th {
  background: var(--bc-surface-2);
  color: var(--bc-text-2);
  font-family: var(--bc-font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--bc-border);
}

.cegg-comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bc-border);
  color: var(--bc-text);
  font-size: 14px;
}

.cegg-comparison-table tr:last-child td {
  border-bottom: none;
}

.cegg-comparison-table tr:hover td {
  background: rgba(57, 255, 20, 0.03);
}

/* ── Best price row in comparison table ── */
.cegg-comparison-table tr:first-of-type td {
  background: var(--bc-neon-subtle);
}

/* ── Prices — neon green, unmissable ── */
.cegg-price {
  color: var(--bc-neon) !important;
  font-family: var(--bc-font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.cegg-price-old {
  color: var(--bc-text-dim);
  text-decoration: line-through;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* ── Buy buttons — neon green with glow on hover ── */
.cegg-btn,
.cegg-btn-buy {
  background: var(--bc-neon) !important;
  color: #050507 !important;
  font-family: var(--bc-font-body);
  font-weight: 800;
  font-size: 13px;
  border: none !important;
  border-radius: var(--bc-radius);
  padding: 10px 22px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.15s ease;
  display: inline-block;
  box-shadow: 0 2px 10px var(--bc-neon-glow);
}

.cegg-btn:hover,
.cegg-btn-buy:hover {
  background: #4dff33 !important;
  box-shadow: 0 4px 24px var(--bc-neon-flare);
  color: #050507 !important;
  transform: translateY(-1px);
}

.cegg-btn:active,
.cegg-btn-buy:active {
  transform: translateY(0) scale(0.98);
}

/* ── Store logos — brighter for dark bg ── */
.cegg-merchant-logo {
  max-height: 32px;
  opacity: 0.9;
  transition: opacity 0.15s ease;
  filter: brightness(1.2);
}

.cegg-merchant-logo:hover {
  opacity: 1;
}

/* ── Product titles — white and readable ── */
.cegg-title {
  color: #fff;
  font-family: var(--bc-font-body);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.4;
}

.cegg-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.15s ease;
}

.cegg-title a:hover {
  color: var(--bc-neon);
}

/* ── Product images in CE ── */
.cegg-image-container img,
.cegg-thumb img {
  border-radius: var(--bc-radius);
  border: 1px solid var(--bc-border);
}

/* ── Coupon/deal badges — neon green ── */
.cegg-coupon,
.cegg-price-row .cegg-discount {
  background: var(--bc-neon-glow);
  color: var(--bc-neon);
  border: 1px solid rgba(57, 255, 20, 0.2);
  border-radius: var(--bc-radius-full);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Star ratings ── */
.cegg-rating .star-rating,
.cegg-star-rating {
  color: #FFB800 !important;
}

/* ── Content Egg Gutenberg block wrapper ── */
.wp-block-jesuspended-content-egg {
  margin: 28px 0;
  border-radius: var(--bc-radius-lg);
  overflow: hidden;
}

/* ── Mobile: stack CE rows nicely ── */
@media (max-width: 768px) {
  .cegg-list-withlogos .row-products {
    padding: 14px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .cegg-price {
    font-size: 1.2rem;
  }

  .cegg-btn,
  .cegg-btn-buy {
    width: 100%;
    text-align: center;
    padding: 12px 18px;
  }

  .cegg-comparison-table {
    font-size: 13px;
  }

  .cegg-comparison-table th,
  .cegg-comparison-table td {
    padding: 10px 12px;
  }
}
