/* --- product banner (single post, between body and subscribe) ---
   Width tracks --max-w-prose so the banner reads as a continuation of
   the article rather than a global section break (that's what subscribe
   and related are for). */
.product-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  align-items: stretch;
  max-width: var(--max-w-prose);
  margin: var(--sp-mega) auto 0;
  background: var(--color-bg);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  outline: 1px solid var(--color-rule);
  outline-offset: 6px;
  transition:
    outline-color .2s ease,
    outline-width .2s ease,
    outline-offset .2s ease,
    box-shadow .2s ease;

  &:hover {
    outline: 4px solid var(--color-fg);
    outline-offset: 8px;
    box-shadow: var(--shadow-hover);
  }

  & .product-banner__media {
    display: block;
    background: var(--color-bg-soft);
    overflow: hidden;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      aspect-ratio: 4 / 3;
    }
  }

  & .product-banner__body {
    padding: var(--sp-md);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-sm);
  }
  & .product-banner__name {
    font-family: var(--font-display);
    font-size: var(--fs-md);
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    margin: 0;
  }
  & .product-banner__tagline {
    margin: 0;
    color: var(--color-fg-prose);
    font-size: var(--fs-xs);
    line-height: 1.5;
  }
  & .product-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-top: var(--sp-xs);
  }

  /* Ghost variant of .btn for the secondary "Read the docs" CTA. */
  & .btn--ghost {
    background: transparent;
    color: var(--color-fg);
    border: 1px solid var(--color-rule);

    &:hover { background: var(--color-bg-soft); color: var(--color-fg); transform: translateY(-1px); }
  }

  /* Price chip nested inside the primary button. */
  & .product-banner__price {
    display: inline-block;
    margin-left: 0.5em;
    padding: 0.15em 0.55em;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.85em;
    font-weight: 500;
    line-height: 1.3;
  }

  @media (max-width: 600px) {
    grid-template-columns: 1fr;

    & .product-banner__media img { aspect-ratio: 16 / 9; }
    & .product-banner__body { padding: var(--sp-base); }
  }
}
