/*
 * Lili Gallery - single product related/upsell products match approved cards.
 * Version: 2.7.0
 */
.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) {
    --lili-related-border: #eceff3;
    --lili-related-border-hover: #d8dce5;
    --lili-related-text: #1f2340;
    --lili-related-title: #2b2f4a;
    --lili-related-muted: #8b91a1;
    --lili-related-line: #f0f1f4;
    --lili-related-accent: var(--wd-primary-color,#8f1b86);
    --lili-related-radius: var(--lili-ui-radius,9px);
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product {
    --wd-brd-radius: var(--lili-related-radius);
    --wd-thumb-brd-radius: var(--lili-related-radius);
    --wd-prod-gap: 10px;
    min-width: 0;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item .product-wrapper {
    box-sizing: border-box;
    border: 1px solid var(--lili-related-border) !important;
    border-radius: var(--lili-related-radius) !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(17,24,39,.035);
    transition: border-color .22s ease, box-shadow .22s ease;
}

@media (hover:hover) and (pointer:fine) {
    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item:hover .product-wrapper {
        border-color: var(--lili-related-border-hover) !important;
        box-shadow: 0 12px 28px rgba(31,35,48,.09);
    }
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product:not(.wd-hover-small):not(.wd-hover-info):not(.wd-hover-tiled) .product-element-top {
    border-bottom: 1px solid var(--lili-related-line) !important;
    background: linear-gradient(180deg,#fff 0%,#fff 88%,#fcfcfd 100%) !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product:not(.wd-hover-small):not(.wd-hover-info):not(.wd-hover-tiled) :is(.product-image-link,.wd-product-img-link) {
    padding: 14px !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product:not(.wd-hover-small):not(.wd-hover-info):not(.wd-hover-tiled) .product-element-top img {
    object-fit: contain;
    object-position: center;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-labels {
    top: 11px !important;
    right: 11px !important;
    left: auto !important;
    gap: 5px;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-label {
    min-width: 0;
    min-height: 0;
    padding: 5px 9px !important;
    border-radius: var(--lili-related-radius) !important;
    font-size: 10.5px !important;
    font-weight: 800;
    line-height: 1.15;
    box-shadow: none;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-label.onsale {
    background: var(--lili-related-accent) !important;
    color: #fff !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item :is(.product-element-bottom,.product-information) {
    padding-inline: 18px !important;
    padding-top: 14px !important;
    padding-bottom: 16px !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item .wd-entities-title {
    display: -webkit-box !important;
    height: auto !important;
    min-height: 50px !important;
    max-height: 50px !important;
    margin: 0 0 8px !important;
    overflow: hidden !important;
    color: var(--lili-related-title) !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    line-height: 1.85 !important;
    text-align: right !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-entities-title a {
    color: inherit !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    color: var(--lili-related-text) !important;
    font-variant-numeric: tabular-nums;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price ins {
    color: var(--lili-related-text) !important;
    text-decoration: none !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price > .amount,
.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price ins .amount {
    color: var(--lili-related-text) !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price del,
.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price del .amount {
    color: var(--lili-related-muted) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

/* Fixed CTA modes match the approved full-width product card treatment. */
.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product.wd-hover-fw-button .wd-add-btn,
.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product.wd-hover-standard .wd-add-btn {
    width: 100% !important;
    max-width: none !important;
    margin-top: 12px !important;
    margin-inline: 0 !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product.wd-hover-fw-button .wd-add-btn > a,
.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-product.wd-hover-standard .wd-add-btn > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    min-height: 44px !important;
    padding: 8px 14px !important;
    border-radius: var(--lili-related-radius) !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-hover-with-fade .product-wrapper {
    overflow: visible !important;
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .wd-hover-with-fade .wd-product-card-bg {
    border: 1px solid var(--lili-related-border) !important;
    border-radius: var(--lili-related-radius) !important;
    background: #fff !important;
    box-shadow: 0 14px 34px rgba(31,35,48,.12);
}

.single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) :is(.wd-btn-arrow,.wd-nav-arrows .wd-btn-arrow) {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7ec !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 6px 16px rgba(25,29,45,.08) !important;
}

@media (max-width:1024px) {
    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item :is(.product-element-bottom,.product-information) {
        padding-inline: 14px !important;
        padding-bottom: 14px !important;
    }

    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item .wd-entities-title {
        min-height: 46px !important;
        max-height: 46px !important;
        font-size: 12.7px !important;
        line-height: 1.8 !important;
    }

    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price > .amount,
    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price ins .amount {
        font-size: 17px !important;
    }
}

@media (max-width:767px) {
    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item :is(.product-element-bottom,.product-information) {
        padding: 10px 11px 12px !important;
    }

    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .product-grid-item .wd-entities-title {
        min-height: 40px !important;
        max-height: 40px !important;
        font-size: 11.2px !important;
        line-height: 1.75 !important;
    }

    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price > .amount,
    .single-product :is(.related-products,.upsells-products,.cross-sells,.elementor-widget-wd_products) .price ins .amount {
        font-size: 15px !important;
    }
}
