/* Tarjeta PST compartida por categorías y productos relacionados. */
ul.products li.product.wfa-pst-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow 0.3s ease;
}

ul.products li.product.wfa-pst-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

ul.products li.product.wfa-pst-card .wfa-pst-card__media-link,
ul.products li.product.wfa-pst-card .wfa-pst-card__title-link {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 0;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__media-link:focus-visible,
ul.products li.product.wfa-pst-card .wfa-pst-card__title-link:focus-visible,
ul.products li.product.wfa-pst-card .wfa-pst-card__cta:focus-visible,
ul.products li.product.wfa-pst-card .wfa-pst-card__info-button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: -3px;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__media {
    position: relative;
    width: 100%;
    min-width: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f4f5f5;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__media img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    transition: transform 0.3s ease;
}

ul.products li.product.wfa-pst-card:hover .wfa-pst-card__media img {
    transform: scale(1.03);
}

ul.products li.product.wfa-pst-card .wfa-pst-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 2px 8px rgba(21, 31, 38, 0.12);
    color: #4f5a60;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(4px);
}

ul.products li.product.wfa-pst-card .wfa-pst-card__content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    padding: 15px;
    gap: 12px;
    box-sizing: border-box;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__title {
    position: static;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: auto;
    min-height: calc(1.2em * 2);
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: auto;
    border: 0;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__model,
ul.products li.product.wfa-pst-card .wfa-pst-card__dimensions {
    display: block;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__model {
    color: #31373b;
    font-size: 1.08rem;
    font-weight: 700;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__dimensions {
    color: #687177;
    font-size: 0.96rem;
    font-weight: 500;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__actions {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 8px;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__cta {
    position: static;
    display: inline-flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-height: 38px;
    padding: 8px 11px;
    transform: none;
    border: 1px solid #c9d0d4;
    border-radius: 8px;
    background: #f4f6f7;
    box-shadow: none;
    color: #3f4a50;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    backdrop-filter: none;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

ul.products li.product.wfa-pst-card:hover .wfa-pst-card__cta {
    border-color: #8d989e;
    background: #eef1f2;
    color: #20272b;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__help {
    position: static;
    display: inline-flex;
    flex: 0 0 25px;
    align-items: center;
    justify-content: center;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__info-button {
    display: inline-grid;
    flex: 0 0 25px;
    place-items: center;
    width: 25px;
    min-width: 25px;
    height: 25px;
    padding: 0;
    margin: 0;
    border: 1px solid #aeb8bd;
    border-radius: 50%;
    background: #fff;
    color: #536067;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    appearance: none;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__info-button:hover,
ul.products li.product.wfa-pst-card .wfa-pst-card__info-button[aria-expanded="true"] {
    border-color: #68757b;
    background: #eef1f2;
    color: #20272b;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__tooltip {
    position: absolute;
    z-index: 20;
    top: 72px;
    right: 12px;
    bottom: auto;
    left: 12px;
    width: auto;
    max-width: none;
    padding: 12px 14px;
    box-sizing: border-box;
    border: 1px solid #d3d9dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(21, 31, 38, 0.16);
    color: #39444a;
    font-size: 13px;
    line-height: 1.45;
    text-align: left;
    transform: none;
}

ul.products li.product.wfa-pst-card .wfa-pst-card__tooltip[hidden] {
    display: none;
}

.wca-card-tooltip--visible {
    animation: wca-card-tooltip-in 160ms ease both;
}

/* Relacionados: reserva espacio estable y posterga el trabajo fuera de pantalla. */
.fp-related-presets {
    content-visibility: auto;
    contain-intrinsic-size: auto 620px;
}

.fp-related-presets__content {
    min-height: 0;
}

.fp-related-presets ul.products.fp-related-presets__list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.fp-related-presets__skeleton {
    pointer-events: none;
}

.fp-related-presets__skeleton-media,
.fp-related-presets__skeleton-line {
    background: linear-gradient(100deg, #eef0f1 25%, #f8f9f9 42%, #eef0f1 58%);
    background-size: 200% 100%;
    animation: fp-related-presets-shimmer 1.25s ease-in-out infinite;
}

.fp-related-presets__skeleton-line {
    display: block;
    width: 100%;
    height: 14px;
    border-radius: 6px;
}

.fp-related-presets__skeleton-line--title {
    width: 82%;
    height: 18px;
    margin: 0 auto;
}

.fp-related-presets__skeleton-line--meta {
    width: 58%;
    margin: 0 auto;
}

.fp-related-presets__skeleton-line--button {
    height: 38px;
    margin-top: auto;
    border-radius: 8px;
}

.fp-related-presets__error {
    padding: 14px 16px;
    border-radius: 8px;
    background: #f5f6f7;
    color: #576168;
}

@keyframes wca-card-tooltip-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fp-related-presets-shimmer {
    from {
        background-position: 100% 0;
    }
    to {
        background-position: -100% 0;
    }
}

@media (max-width: 1199px) {
    .fp-related-presets ul.products.fp-related-presets__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .fp-related-presets ul.products.fp-related-presets__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .fp-related-presets ul.products.fp-related-presets__list {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(250px, 82vw);
        justify-content: start;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        padding-bottom: 12px;
        scroll-snap-type: inline mandatory;
        scrollbar-width: thin;
    }

    .fp-related-presets ul.products.fp-related-presets__list > li {
        scroll-snap-align: start;
    }
}

@media (prefers-reduced-motion: reduce) {
    ul.products li.product.wfa-pst-card,
    ul.products li.product.wfa-pst-card .wfa-pst-card__media img,
    ul.products li.product.wfa-pst-card .wfa-pst-card__cta,
    .fp-related-presets__skeleton-media,
    .fp-related-presets__skeleton-line {
        animation: none;
        transition: none;
    }
}
