/* Hero: the pinned hottest deal on page one of the Hot feed. */

@layer components {
  .hero {
    margin: 0;
    padding: 1rem 1.5ch;
    border-radius: var(--radius-lg);
    background: var(--color-pine);
    color: var(--color-text-onpine);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    /* Admin-pinned hero: a gold ring marks it as deliberately featured. */
    &.hero--featured {
      box-shadow: inset 0 0 0 2px var(--color-featured);
    }
  }

  .hero__pin {
    font-size: var(--text-x-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-featured);
  }

  .hero__row {
    display: flex;
    align-items: flex-start;
    gap: var(--inline-space);
  }

  .hero__img {
    inline-size: 4rem;
    block-size: 4rem;
    flex: none;
    object-fit: contain;
    border-radius: var(--radius-md);
    background: var(--color-canvas);
  }

  .hero__main {
    flex: 1;
    min-inline-size: 0;
  }

  .hero__title {
    margin-block-end: 0.375rem;

    a {
      display: block;
      color: var(--color-text-onpine);
      font-size: var(--text-normal);
      font-weight: 600;
      line-height: var(--leading-snug);

      @media (any-hover: hover) {
        &:hover {
          text-decoration: underline;
        }
      }
    }
  }

  .hero__price {
    font-size: var(--text-large);
  }

  .hero__was {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: var(--text-small);
    text-decoration: line-through;
    opacity: 0.7;
  }

  .hero__disc {
    font-family: var(--font-mono);
    font-size: var(--text-small);
    font-weight: 700;
    color: var(--color-up);
  }

  .hero__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-block-size: var(--tap);
    border-radius: var(--radius-md);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: var(--text-small);
    font-weight: 700;

    @media (any-hover: hover) {
      &:hover {
        background: var(--color-primary-press);
        text-decoration: none;
      }
    }
  }

  .hero__vote {
    align-self: flex-start;

    .vote {
      flex-direction: row;
    }

    .vote__count {
      color: var(--color-ink);
    }
  }
}
