/**
 * Amazon affiliate spotlight — template-style cards (colored header, circular image, CTA)
 * Loaded once per page from omr_amazon_affiliate_spotlight()
 */

.omr-affiliate-spotlight {
  --omr-aff-peach: #fff5ed;
  margin: 2rem 0;
  padding: 0;
  border: none;
  border-radius: 16px;
  background: var(--omr-aff-peach);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  font-family: 'Poppins', 'Source Sans 3', system-ui, sans-serif;
}

.omr-affiliate-spotlight__head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(251, 146, 60, 0.15);
}

.omr-affiliate-spotlight__head-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #14532d, #22c55e);
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.omr-affiliate-spotlight__head-text {
  flex: 1;
  min-width: 0;
}

.omr-affiliate-spotlight__kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #78716c;
}

.omr-affiliate-spotlight__title {
  margin: 0.2rem 0 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #14532d;
  line-height: 1.2;
}

.omr-affiliate-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #92400e;
  background: linear-gradient(180deg, #fef3c7, #fde68a);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
  flex-shrink: 0;
}

.omr-affiliate-spotlight__grid-wrap {
  padding: 1.25rem 1rem 1.5rem;
}

.omr-affiliate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

@media (min-width: 640px) {
  .omr-affiliate-grid--cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  .omr-affiliate-grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

/* Per-card theme — circle tints blend JPEG mattes; dots stay muted decorative */
.omr-affiliate-card--theme-1 {
  --aff-header: linear-gradient(145deg, #f97316 0%, #ea580c 100%);
  --aff-circle-bg: #fff7ed;
  --aff-circle-mid: #ffedd5;
  --aff-dot: #fb923c;
}

.omr-affiliate-card--theme-2 {
  --aff-header: linear-gradient(145deg, #14b8a6 0%, #0d9488 100%);
  --aff-circle-bg: #f0fdfa;
  --aff-circle-mid: #ccfbf1;
  --aff-dot: #2dd4bf;
}

.omr-affiliate-card--theme-3 {
  --aff-header: linear-gradient(145deg, #ec4899 0%, #db2777 100%);
  --aff-circle-bg: #fdf2f8;
  --aff-circle-mid: #fce7f3;
  --aff-dot: #f472b6;
}

.omr-affiliate-card {
  --aff-pad-x: 1.125rem;
  --aff-circle-size: clamp(124px, 34vw, 148px);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  overflow: visible;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.omr-affiliate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.11);
}

/* Coloured header band */
.omr-affiliate-card__header {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 0.75rem;
  padding: 1.125rem var(--aff-pad-x) 3.35rem;
  background: var(--aff-header);
  border-radius: 14px 14px 0 0;
  min-height: 5.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.omr-affiliate-card__header-text {
  flex: 1 1 12rem;
  min-width: 0;
}

.omr-affiliate-card__headline {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.32;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.omr-affiliate-card__subline {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.96);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Secondary Amazon mark — smaller, lighter elevation than product hero */
.omr-affiliate-card__badge {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  color: #232f3e;
  font-size: 1.12rem;
}

.omr-affiliate-card__badge .fab {
  line-height: 1;
  display: block;
  transform: translateY(0.5px);
}

/* Circular product image overlaps header + body */
.omr-affiliate-card__middle {
  display: flex;
  justify-content: center;
  margin-top: calc(var(--aff-circle-size) * -0.30);
  margin-bottom: 0;
  padding: 0 var(--aff-pad-x);
  position: relative;
  z-index: 2;
}

.omr-affiliate-card__circle {
  width: var(--aff-circle-size);
  height: var(--aff-circle-size);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, var(--aff-circle-bg) 0%, var(--aff-circle-mid) 72%, var(--aff-circle-mid) 100%);
  border: 3px solid #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.omr-affiliate-card .omr-affiliate-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  max-height: none;
  background: transparent;
  border: none;
}

.omr-affiliate-card .omr-affiliate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.22rem;
  display: block;
  box-sizing: border-box;
}

.omr-affiliate-card .omr-affiliate-thumb--fallback img {
  display: none !important;
}

.omr-affiliate-card .omr-affiliate-thumb__placeholder {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: #64748b;
}

.omr-affiliate-card .omr-affiliate-thumb--fallback .omr-affiliate-thumb__placeholder {
  display: flex;
}

.omr-affiliate-card .omr-affiliate-thumb__placeholder i {
  font-size: 2rem;
  color: #94a3b8;
}

/* Footer: decorative dots + primary CTA */
.omr-affiliate-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  min-height: 3.25rem;
  padding: 0.875rem var(--aff-pad-x) 1.125rem;
  background: #fafafa;
  border-radius: 0 0 14px 14px;
  margin-top: 0.5rem;
}

.omr-affiliate-card__dots {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.55;
  flex-shrink: 0;
}

/* Decorative only — no fake “active slide” cue */
.omr-affiliate-card__dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--aff-dot);
  opacity: 0.45;
}

.omr-affiliate-card__dots span:nth-child(3) {
  opacity: 0.45;
  transform: none;
}

/* Navy CTA — touch-friendly, keyboard focus, hover stays on-brand */
.omr-affiliate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 8px;
  background: linear-gradient(180deg, #1e3a5f 0%, #172554 100%);
  border: 1px solid rgba(30, 58, 95, 0.35);
  box-shadow: 0 2px 6px rgba(30, 58, 95, 0.2);
  white-space: nowrap;
  transition: background 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.omr-affiliate-cta:hover {
  color: #fff !important;
  filter: brightness(1.08);
  box-shadow: 0 3px 10px rgba(30, 58, 95, 0.28);
}

.omr-affiliate-cta:focus {
  outline: none;
}

.omr-affiliate-cta:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

@media (max-width: 380px) {
  .omr-affiliate-cta {
    white-space: normal;
    text-align: center;
    max-width: 11rem;
    line-height: 1.25;
  }
}

.omr-affiliate-disclosure {
  margin: 0;
  padding: 0.85rem 1.25rem 1.1rem;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #57534e;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(254, 215, 170, 0.45);
}
