/*
 * AW Related Products v1.1.5
 * Catalog-style recommendation cards. All selectors are scoped to
 * .aw-product-detail-related; the product catalog is unchanged.
 */
.aw-product-detail-related {
    --aw-related-ink: #292b29;
    --aw-related-muted: #72746e;
    --aw-related-border: #e7e5de;
    --aw-related-tint: #f5f4ef;
}
.aw-product-detail-related .aw-related-heading {
    margin: 0 0 14px !important;
    color: var(--aw-related-ink);
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: .04em;
}
.aw-product-detail-related .aw-related-list {
    display: grid;
    gap: 18px;
    align-items: stretch;
}
.aw-product-detail-related a.aw-related-card {
    box-sizing: border-box;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: var(--aw-related-ink);
    background: #fff;
    border: 1px solid var(--aw-related-border);
    border-radius: 3px;
    text-decoration: none;
    opacity: 1;
    transition: box-shadow .2s, transform .2s;
}
.aw-product-detail-related a.aw-related-card:hover {
    color: var(--aw-related-ink);
    opacity: 1;
    box-shadow: 0 8px 30px rgba(30, 28, 23, .09);
    transform: translateY(-2px);
    text-decoration: none;
}
.aw-product-detail-related a.aw-related-card:focus-visible {
    outline: 2px solid #526b59;
    outline-offset: 3px;
}
.aw-product-detail-related .aw-related-card-image {
    box-sizing: border-box;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    background: var(--aw-related-tint);
}
.aw-product-detail-related .aw-related-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    transition: transform .25s;
}
.aw-product-detail-related a.aw-related-card:hover .aw-related-card-image img {
    transform: scale(1.018);
}
.aw-product-detail-related .aw-related-card-body {
    box-sizing: border-box;
    position: static;
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    width: 100%;
    padding: 13px 14px 17px;
    color: var(--aw-related-ink);
    background: #fff;
    pointer-events: auto;
    text-shadow: none;
}
.aw-product-detail-related .aw-related-card-title {
    box-sizing: border-box;
    display: block;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--aw-related-ink);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-shadow: none;
}
.aw-product-detail-related .aw-related-card-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: auto;
    color: var(--aw-related-ink);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.5;
    font-variant-numeric: tabular-nums;
    text-shadow: none;
}
.aw-product-detail-related .aw-related-tax {
    margin-left: 0;
    color: var(--aw-related-muted);
    font-size: 10px;
    font-weight: 400;
    line-height: 1.5;
}
@media screen and (min-width: 1024px) {
    /* Desktop: the original three slots stay in the narrow right column. */
    .aw-product-detail-related .aw-related-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .aw-product-detail-related a.aw-related-card.aw-related-card--mobile-only {
        display: none;
    }
}
@media screen and (max-width: 1023px) {
    /* Mobile and tablet: up to four items in a 2 x 2 grid. */
    .aw-product-detail-related .aw-related-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media screen and (max-width: 720px) {
    .aw-product-detail-related .aw-related-list {
        gap: 15px 9px;
    }
    .aw-product-detail-related .aw-related-card-body {
        gap: 5px;
        padding: 9px 10px 12px;
    }
    .aw-product-detail-related .aw-related-card-title {
        font-size: 12px;
    }
    .aw-product-detail-related .aw-related-card-price {
        font-size: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .aw-product-detail-related a.aw-related-card,
    .aw-product-detail-related .aw-related-card-image img {
        transition: none;
    }
}

/* AW Related Products random slots v1.1.5.
 * The original recommendation remains in normal document flow while the
 * separately requested random card is loading. Only the active breakpoint's
 * final slot is concealed; image and card dimensions are preserved.
 * If JavaScript is unavailable, the original recommendation remains visible.
 */
@media screen and (min-width: 1024px) {
    html.awrp-random-js .aw-product-detail-related[data-awrp-random-url]
    .aw-related-list > a.aw-related-card:nth-child(3):not(.awrp-random-ready) {
        visibility: hidden;
    }
}
@media screen and (max-width: 1023px) {
    html.awrp-random-js .aw-product-detail-related[data-awrp-random-url]
    .aw-related-list > a.aw-related-card:nth-child(4):not(.awrp-random-ready) {
        visibility: hidden;
    }
}
