/* Shared replacement-product recommendation for discontinued product pages. */
body.single-product .product-replacement-card {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    box-sizing: border-box;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--theme-accent) 34%, var(--border-control));
    border-radius: 12px;
    background: var(--surface-card);
    color: var(--text-body);
    box-shadow:
        inset -2px 0 0 var(--theme-accent),
        0 4px 14px color-mix(in srgb, var(--shadow-color) 20%, transparent);
}

body.single-product .product-replacement-card__image {
    display: grid;
    grid-row: 1 / span 2;
    align-self: start;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--surface-raised);
    place-items: center;
}

body.single-product .product-replacement-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.single-product .product-replacement-card__content {
    min-width: 0;
}

body.single-product .product-replacement-card__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

body.single-product .product-replacement-card__title {
    color: var(--text-strong);
    text-decoration: none;
}

body.single-product .product-replacement-card__title h3 {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: inherit;
    font-size: 14px;
    font-variation-settings: "wght" 560;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

body.single-product .product-replacement-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-top: 6px;
    font-size: 11px;
}

body.single-product .product-replacement-card__availability {
    color: var(--state-success, var(--amazing-title-color));
}

body.single-product .product-replacement-card__price {
    color: var(--text-strong);
    font-variation-settings: "wght" 520;
}

body.single-product .product-replacement-card__price .woocommerce-Price-currencySymbol {
    margin-right: 3px;
    font-size: 10px;
}

body.single-product .product-replacement-card__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--theme-accent);
    border-radius: 8px;
    background: var(--theme-accent);
    color: var(--text-on-accent);
    font-size: 12px;
    font-variation-settings: "wght" 520;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    transition:
        transform 150ms var(--theme-motion-ease),
        filter 150ms var(--theme-motion-ease);
}

body.single-product .product-replacement-card__cta i {
    font-size: 9px;
}

body.single-product .product-replacement-card__cta:hover {
    color: var(--text-on-accent);
    filter: brightness(0.96);
    transform: translateY(-1px);
}

body.single-product .product-replacement-card :is(a):focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 3px;
}

@media (max-width: 767px) {
    body.single-product #site-main .purchase-p .product-replacement-card {
        grid-template-columns: 72px minmax(0, 1fr);
        margin-block: 12px 0;
        padding: 10px;
    }

    body.single-product #site-main .purchase-p .product-replacement-card__image {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 359px) {
    body.single-product .product-replacement-card__cta {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.single-product .product-replacement-card__cta {
        transition: none;
    }
}
