/* =========================================================================
   Category promo banner — Figma "Section - Hero Promo Banner"
   US category page, nodes 1:6987 (wide, 1344×362) and 1:8081 (tall, 288×751)

   One rule set, two shapes. Everything except the container geometry is shared,
   because in the design they are the same component at two widths.

   The gradient start #FBBF24 is exactly --fmm-yellow, so the banner is already
   on the app's palette; only the paler end and the slate ink needed declaring.
   ========================================================================= */

.fmm-cpromo {
    --cp-ink: #0F172A;          /* design slate — deeper than --fmm-text */
    --cp-amber-soft: #FDE68A;   /* gradient end */
    --cp-tall-height: 751px;

    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(90deg, var(--fmm-yellow) 0%, var(--cp-amber-soft) 100%);
    box-shadow: 0 4px 18px -2px rgba(0, 0, 0, .05);
    text-decoration: none;
    color: var(--cp-ink);
    transition: transform .18s ease, box-shadow .18s ease;
}

.fmm-cpromo:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(0, 0, 0, .14);
}

.fmm-cpromo:focus-visible {
    outline: 3px solid var(--cp-ink);
    outline-offset: 3px;
}

/* ── Background art ───────────────────────────────────────────────────────
   The export is a wide photograph of gadgets on yellow. The design crops it
   hard (h-480%, top -190%) so only a band of it shows; `object-fit: cover`
   with a top-biased position reproduces that read at any container size
   without hard-coding the design's percentages, which only hold at 1344px. */

.fmm-cpromo__art {
    position: absolute;
    inset: 0;
}

.fmm-cpromo__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 38%;
    display: block;
}

/* The copy sits on the left, so the artwork is faded out from the left edge —
   otherwise the headline lands on top of a photographed laptop. */
.fmm-cpromo__art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(251, 191, 36, .9) 0%, rgba(251, 191, 36, 0) 100%);
}

/* ── Copy ─────────────────────────────────────────────────────────────── */

.fmm-cpromo__body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
}

.fmm-cpromo__pill {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .3);
    backdrop-filter: blur(5px);
    font-size: 10.5px;
    line-height: 14px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--cp-ink);
}

.fmm-cpromo__title {
    display: block;
    margin-top: 14px;
    font-size: 42px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--cp-ink);
}

.fmm-cpromo__lead {
    display: block;
    margin-top: 14px;
    font-size: 15.8px;
    line-height: 24px;
    font-weight: 500;
    color: rgba(15, 23, 42, .8);
}

.fmm-cpromo__btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 28px;
    padding: 12px 28px;
    border-radius: 10.5px;
    background: var(--cp-ink);
    color: #fff;
    font-size: 14px;
    line-height: 21px;
    font-weight: 600;
    box-shadow: 0 9px 13px -3px rgba(0, 0, 0, .1), 0 4px 5px -4px rgba(0, 0, 0, .1);
}

/* ── Wide variant — above the product grid ────────────────────────────── */

.fmm-cpromo--wide {
    min-height: 362px;
    margin-bottom: 24px;
}

.fmm-cpromo--wide .fmm-cpromo__body {
    max-width: 590px;
    padding: 42px;
}

/* ── Tall variant — in the filter rail ────────────────────────────────── */

.fmm-cpromo--tall {
    min-height: var(--cp-tall-height);
    margin-top: 20px;
}

.fmm-cpromo--tall .fmm-cpromo__body {
    padding: 24px 18px;
}

.fmm-cpromo--tall .fmm-cpromo__title { font-size: 32px; }
.fmm-cpromo--tall .fmm-cpromo__lead  { font-size: 14.5px; line-height: 22px; }
.fmm-cpromo--tall .fmm-cpromo__btn   { padding: 11px 22px; }

/* The left-to-right fade is wrong on a narrow column — the copy fills the
   whole width, so the art is dimmed evenly instead. */
.fmm-cpromo--tall .fmm-cpromo__art::after {
    background: linear-gradient(180deg, rgba(251, 191, 36, .82) 0%, rgba(251, 191, 36, .55) 100%);
}

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .fmm-cpromo--wide { min-height: 300px; }
    .fmm-cpromo--wide .fmm-cpromo__body { padding: 28px; max-width: none; }
    .fmm-cpromo__title { font-size: 32px; }
    /* At this width the copy spans the banner, so the horizontal fade would
       leave the right-hand words sitting on bare photograph. */
    .fmm-cpromo__art::after {
        background: linear-gradient(180deg, rgba(251, 191, 36, .85) 0%, rgba(251, 191, 36, .6) 100%);
    }
}

@media (max-width: 560px) {
    .fmm-cpromo--wide { min-height: 260px; border-radius: 18px; }
    .fmm-cpromo__title { font-size: 27px; }
    .fmm-cpromo__lead { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .fmm-cpromo { transition: none; }
    .fmm-cpromo:hover { transform: none; }
}
