/*
 * Product Suggestions — Amazon affiliate product grid. Only ever
 * enqueued alongside energyfix-public.css (see Frontend::maybe_enqueue_
 * product_suggestions_assets()), so every --ef-* custom property from
 * that stylesheet's :root block is already available here. No JS
 * dependency (unlike energyfix-service-map.css) — a product card's only
 * interactive element is its own outbound <a>, so this is plain CSS.
 */

.ef-product-suggestions {
    margin: 0 0 40px;
}

.ef-product-suggestions__heading {
    font-family: var(--ef-font-display);
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--ef-ink-on-glow, var(--ef-ink));
}

.ef-product-suggestions__disclosure {
    font-size: 12px;
    color: var(--ef-ink-2-on-glow, var(--ef-ink-2));
    margin: 0 0 16px;
    font-style: italic;
}

.ef-product-suggestions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.ef-pp-card {
    background: var(--ef-glass-panel);
    backdrop-filter: blur(var(--ef-glass-blur-sm)) saturate(1.4);
    -webkit-backdrop-filter: blur(var(--ef-glass-blur-sm)) saturate(1.4);
    border: 1px solid var(--ef-glass-border);
    border-radius: var(--ef-radius-sm);
    box-shadow: var(--ef-glass-shadow-sm);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ef-pp-card:hover { transform: translateY(-2px); box-shadow: var(--ef-glass-shadow); }

.ef-pp-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 14px;
    text-decoration: none;
    color: inherit;
}

.ef-pp-card__photo {
    width: 100%;
    height: 130px;
    border-radius: calc(var(--ef-radius-sm) - 4px);
    background-color: #fff;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 10px;
}
.ef-pp-card__photo--placeholder {
    background-color: var(--ef-panel-dark);
    background-image: linear-gradient(135deg, var(--ef-panel-dark), var(--ef-glass-panel-deep));
}

.ef-pp-card__title {
    font-family: var(--ef-font-body);
    font-weight: 600;
    font-size: 14px;
    line-height: 1.35;
    margin: 0 0 6px;
    color: var(--ef-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ef-pp-card__rating { font-family: var(--ef-font-mono); font-size: 12px; font-weight: 600; color: var(--ef-amber-on-glow, var(--ef-amber)); margin: 0 0 4px; }
.ef-pp-card__price { font-family: var(--ef-font-mono); font-size: 15px; font-weight: 700; color: var(--ef-ink); margin: 0 0 6px; }
.ef-pp-card__blurb {
    font-size: 12.5px;
    color: var(--ef-ink-2);
    margin: 0 0 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.ef-pp-card__cta {
    align-self: flex-start;
    margin-top: auto;
    pointer-events: none; /* the whole card is already the <a> — this is a visual label, not a nested link */
}
.ef-pp-card__cta svg { width: 14px; height: 14px; }


/* =====================================================================
 * v0.16.0 — Product Featuring (minimal / midi / max)
 * Card text wrapper, "mini" cards, the strip, the between-steps pick and
 * the scroll prompt (slide-in card on midi, following bar on max).
 * ===================================================================== */

.ef-pp-card .ef-pp-card__title { color: var(--ef-ink); } /* .energyfix h3 { color: inherit } would otherwise tint it with the link colour */
.ef-pp-card__text { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.ef-pp-card__seller { font-size: 11.5px; color: var(--ef-ink-2); margin: 0 0 6px; }

/* A product placed inside the Fix Library's results grid (max, on search). */
.ef-grid > .ef-pp-card--card { border-style: dashed; }

/* ---- mini card: thumbnail beside the text ---- */
.ef-pp-card--mini .ef-pp-card__link { flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; height: auto; }
.ef-pp-card--mini .ef-pp-card__photo { width: 64px; height: 64px; flex: 0 0 64px; margin: 0; }
.ef-pp-card--mini .ef-pp-card__title { font-size: 13.5px; margin: 0 0 3px; }
.ef-pp-card--mini .ef-pp-card__price { font-size: 13px; margin: 0; }
.ef-pp-card--mini .ef-pp-card__price .vmd-price__old { opacity: .6; margin-right: 4px; }
.ef-pp-card--mini .ef-pp-card__price .vmd-price__now { text-decoration: none; }

/* ---- strip: "Helpful for this fix" / "Related to your search" ---- */
.ef-pf-strip { margin: 0 0 28px; }
.ef-pf-strip .ef-kicker { margin: 0 0 2px; color: var(--ef-amber-on-glow, var(--ef-amber)); }
.ef-pf-strip__heading { font-family: var(--ef-font-display); font-size: 20px; margin: 0 0 10px; color: var(--ef-ink-on-glow, var(--ef-ink)); }
.ef-pf-strip__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.ef-pf-strip .ef-product-suggestions__disclosure { margin: 10px 0 0; }
.ef-pf-strip--search { margin-top: 0; }

/* ---- between-steps pick ---- */
.ef-pf-step { margin: -4px 0 18px 54px; padding: 8px 12px 6px; border-left: 3px solid var(--ef-amber); background: var(--ef-amber-soft); border-radius: 0 var(--ef-radius-sm) var(--ef-radius-sm) 0; }
.ef-pf-step__label { font-family: var(--ef-font-mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ef-copper); margin: 0 0 6px; }
.ef-pf-step .ef-pp-card { max-width: 420px; }
.ef-pf-step .ef-product-suggestions__disclosure { margin: 6px 0 0; }
@media (max-width: 600px) { .ef-pf-step { margin-left: 0; } }

/* ---- scroll prompt ---- */
.ef-pf-scroll {
    position: fixed;
    z-index: 9990;
    background: rgba(255, 252, 247, 0.96); /* near-opaque: it floats over arbitrary page content */
    -webkit-backdrop-filter: blur(var(--ef-glass-blur)) saturate(1.4);
    backdrop-filter: blur(var(--ef-glass-blur)) saturate(1.4);
    border: 1px solid var(--ef-glass-border);
    box-shadow: var(--ef-glass-shadow);
    opacity: 0;
    transition: opacity .25s ease, transform .3s ease;
}
.ef-pf-scroll[hidden] { display: none; }
.ef-pf-scroll.is-visible { opacity: 1; transform: none; }

/* midi — a card sliding in from the bottom-right corner */
.ef-pf-scroll--toast {
    right: 16px; bottom: 16px; width: min(340px, calc(100vw - 32px));
    border-radius: var(--ef-radius-sm);
    padding: 10px 12px 8px;
    transform: translateY(24px);
}
/* max — a bar across the bottom that changes product as each step passes */
.ef-pf-scroll--bar {
    left: 0; right: 0; bottom: 0;
    border-width: 1px 0 0;
    padding: 8px 52px 6px 16px;
    transform: translateY(100%);
}
.ef-pf-scroll--bar .ef-pf-scroll__stage { max-width: 760px; margin: 0 auto; }

.ef-pf-scroll__label { font-family: var(--ef-font-mono); font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ef-copper); margin: 0 0 4px; }
.ef-pf-scroll--bar .ef-pf-scroll__label { max-width: 760px; margin: 0 auto 4px; }
.ef-pf-scroll .ef-pp-card { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ef-pf-scroll .ef-pp-card:hover { transform: none; box-shadow: none; }
.ef-pf-scroll .ef-pp-card__link { padding: 4px 0; }
.ef-pf-scroll__stage { transition: opacity .2s ease; }
.ef-pf-scroll__stage.is-swapping { opacity: 0; }
.ef-pf-scroll__disclosure { font-size: 10.5px; color: var(--ef-ink-2); font-style: italic; margin: 2px 0 0; }
.ef-pf-scroll--bar .ef-pf-scroll__disclosure { max-width: 760px; margin: 2px auto 0; }
.ef-pf-scroll__close {
    position: absolute; top: 6px; right: 8px; width: 28px; height: 28px;
    border: 0; border-radius: 50%; background: transparent; color: var(--ef-ink-2);
    font-size: 20px; line-height: 1; cursor: pointer;
}
.ef-pf-scroll__close:hover, .ef-pf-scroll__close:focus-visible { background: rgba(0,0,0,.08); color: var(--ef-ink); }

@media (prefers-reduced-motion: reduce) {
    .ef-pf-scroll, .ef-pf-scroll__stage { transition: none; }
}
@media print {
    .ef-pf-scroll { display: none !important; }
}
