/* AI Tools logo row — normalized logos, uniform size */
.aim-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.aim-tools-row__label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-right: 2px;
}

.aim-tool-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Fixed uniform box — every tool gets the same footprint regardless of its
     logo's aspect ratio (wordmark vs square icon). */
  width: 128px;
  height: 60px;
  padding: 10px 14px;
  box-sizing: border-box;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.aim-tool-logo:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
  border-color: #dcdcdc;
}

/* Logo scales to FIT inside the box (contain), centered. Mixed wordmarks and
   square icons all sit cleanly within the same uniform box. */
.aim-tool-logo img {
  max-height: 36px !important;
  max-width: 100px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
}

@media (max-width: 690px) {
  .aim-tools-row { gap: 10px; }
  .aim-tool-logo { width: 104px; height: 52px; padding: 8px 12px; }
  .aim-tool-logo img { max-height: 30px !important; max-width: 80px !important; }
}

/* ==========================================================================
   "In a Hurry?" sticky picks — fixed left rail of affiliate-tool logos.
   Shows only tools that have BOTH a logo and an affiliate (/go) link.
   Each logo is a real, user-clicked sponsored link (new tab).
   ========================================================================== */
.aim-picks {
  position: fixed;
  left: 16px;
  top: 176px;   /* clear the sticky header that appears on scroll-up */
  z-index: 95;
  width: 156px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Hidden by default; JS toggles .is-visible to fade in/out within its scroll
     range (after the featured image, before the "Still Not Sure" section). */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}
.aim-picks.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.aim-picks__inner {
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 14px 12px;
}
.aim-picks__title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.2px;
  color: #6d00c0;
}
.aim-picks__sub {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.35;
  color: #777;
}
.aim-picks__list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.aim-pick {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 8px 10px;
  box-sizing: border-box;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
/* "Free plan" badge — top-right corner of the logo. */
.aim-pick__free {
  position: absolute;
  top: -7px;
  right: -7px;
  background: #16a34a;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.3px;
  padding: 3px 5px;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
  pointer-events: none;
}
.aim-pick:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
  border-color: #d8c2ec;
}
.aim-pick img {
  max-height: 30px !important;
  max-width: 100% !important;   /* scale to the (possibly narrowed) rail width */
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
}
/* Narrow gutter (small screens): drop the subheading, tighten everything so the
   rail still fits and keeps the logos exposed. */
.aim-picks--narrow .aim-picks__inner { padding: 11px 8px; }
.aim-picks--narrow .aim-picks__title { font-size: 13px; }
.aim-picks--narrow .aim-picks__sub { display: none; }
.aim-picks--narrow .aim-pick { height: 46px; padding: 6px 7px; }
/* JS (ai-tools.js) pins the rail in the left gutter and hides it when there is
   no room. This is just the mobile fallback (no gutter on phones). */
@media (max-width: 782px) {
  .aim-picks { display: none !important; }
}

/* ==========================================================================
   Animated logo stream — infinite horizontal marquee of affiliate-tool logos.
   The track holds the logos twice and slides -50% for a seamless loop. Each
   logo unit carries its own right margin (not flex gap) so -50% tiles exactly.
   ========================================================================== */
.aim-stream {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
}
.aim-stream__heading {
  margin: 0 0 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #888;
}
.aim-stream__viewport {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.aim-stream__track {
  display: flex;
  width: max-content;
  animation: aim-stream-scroll var(--aim-stream-speed, 45s) linear infinite;
}
.aim-stream:hover .aim-stream__track { animation-play-state: paused; }
.aim-stream--rtl .aim-stream__track { animation-direction: reverse; }
@keyframes aim-stream-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.aim-stream__logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 142px;
  height: 64px;
  margin-right: 18px;          /* tiling gap — keeps the -50% loop seamless */
  padding: 10px 16px;
  box-sizing: border-box;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #fff;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.aim-stream__logo:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
  border-color: #dcdcdc;
}
.aim-stream__logo img {
  max-height: 34px !important;
  max-width: 108px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  display: block;
  margin: 0 !important;
}
@media (max-width: 690px) {
  .aim-stream__logo { width: 116px; height: 56px; margin-right: 14px; padding: 8px 12px; }
  .aim-stream__logo img { max-height: 28px !important; max-width: 86px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .aim-stream__track { animation: none; }
}

/* ==========================================================================
   Collection product "Where to buy" box (multi-retailer affiliate buttons).
   ========================================================================== */
.aim-buybox {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 20px 0 6px;
  padding: 14px 18px;
  border: 1px solid #ececec;
  border-radius: 12px;
  background: #faf9ff;
}
.aim-buybox__price { font-size: 20px; font-weight: 800; color: #6d00c0; margin-right: 6px; }
.aim-buybox__label { font-size: 13px; font-weight: 600; color: #777; }
.aim-buybox__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 18px; border-radius: 9999px; background: #6d00c0;
  color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.aim-buybox__btn:hover { background: #5500a0; transform: translateY(-1px); }
@media (max-width: 600px) {
  .aim-buybox { flex-direction: column; align-items: flex-start; }
  .aim-buybox__btn { width: 100%; }
}

/* ==========================================================================
   AI Hardware Review archive — filter bar (All / AI TV / AI Glasses / AI GPU).
   Rendered via nectar_before_blog_loop_row ABOVE the posts grid; the buttons
   themselves are Salient [nectar_button] elements (theme brand styling) —
   this wrapper only handles layout.
   ========================================================================== */
.aim-hwr-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 4px 0 32px;
  width: 100%;
}
.aim-hwr-filter .nectar-button {
  margin: 0 !important;
}

/* ==========================================================================
   AIMiracle star rating — SVG stars with exact fractional fill.
   Gray base row + clipped gold overlay (width = score/5). No JS, no images.
   ========================================================================== */
.aim-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
}
.aim-rating__label { font-weight: 800; color: #1a1a1a; font-size: 21px; }
.aim-rating__stars {
  position: relative;
  display: inline-flex;
  line-height: 0;
}
.aim-rating__base,
.aim-rating__fill {
  display: inline-flex;
  gap: 2px;
  white-space: nowrap;
}
/* Stars must NEVER shrink — the overlay row keeps its full natural width and
   gets CLIPPED by overflow (otherwise flex squeezes 5 gold stars into the
   percentage width and the two rows misalign). */
.aim-rating__base svg,
.aim-rating__fill svg {
  flex: 0 0 auto;
  min-width: 0;
}
.aim-rating__base svg { fill: #e2e2e2; }
.aim-rating__fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  overflow: hidden;          /* clips the gold row at the exact percentage */
}
.aim-rating__fill svg { fill: var(--aim-star, #f5a623); }
.aim-rating__value { font-weight: 800; color: #1a1a1a; font-size: 24px; }
.aim-rating__note { font-size: 14px; color: #888; }
.aim-rating--compact { gap: 6px; margin: 6px 0; }
