/* Shared base for WooCommerce product cards used in archive and related/upsell grids. */
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product {
    position: relative;
    border-radius: var(--radius-panel);
    border: var(--border-subtle);
    background: var(--surface-card-soft);
    box-shadow: var(--shadow-1);
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .onsale.liquidmaster-sale-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(180, 112, 255, 0.32);
    border-radius: 999px;
    background:
        linear-gradient(135deg, rgba(144, 20, 223, 0.28), rgba(77, 106, 177, 0.16)),
        rgba(10, 12, 20, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(6, 8, 16, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    color: #f6f0ff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .onsale.liquidmaster-sale-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
    background: radial-gradient(circle, #f2e4ff 0%, #c06bff 55%, #7f4cff 100%);
    box-shadow: 0 0 14px rgba(192, 107, 255, 0.55);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product:hover {
    transform: translateY(-4px);
    border-color: var(--border-color-accent-hover);
    box-shadow: var(--shadow-2);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product a {
    color: var(--text-color);
    text-decoration: none;
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .imgParent {
    overflow: hidden;
    border-radius: var(--radius-panel) var(--radius-panel) 0 0;
    background: #fff;
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .woocommerce-loop-product__link .imgParent img,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .imgParent img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin: 0;
    box-sizing: border-box;
    background: var(--surface-panel-soft);
    transition: transform var(--transition-base);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product:hover .imgParent img {
    transform: scale(1.06) rotate(1.02deg) translateY(-5px);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .woocommerce-loop-product__title,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .wc-loop-product__title,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product h2 {
    display: -webkit-box;
    margin: var(--space-lg) var(--space-lg) var(--space-xs);
    overflow: hidden;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .price {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
    margin: 0 var(--space-lg) var(--space-md);
    padding: 10px 16px;
    border: 1px solid rgba(180, 112, 255, 0.16);
    border-radius: calc(var(--radius-panel) - 2px);
    background:
        linear-gradient(135deg, rgba(144, 20, 223, 0.12), rgba(77, 106, 177, 0.06)),
        rgba(12, 15, 24, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 24px rgba(6, 8, 16, 0.18);
    color: #f5eeff;
    font-weight: 700;
    justify-content: center;
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .price del {
    color: rgba(255, 255, 255, 0.44);
    opacity: 0.8;
    text-decoration-color: rgba(255, 255, 255, 0.28);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .price ins {
    display: inline-block;
    text-decoration: none;
    color: var(--primary-color);
    transform: scale(1.08);
    text-shadow: 0 0 18px rgba(183, 108, 255, 0.18);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .button,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .added_to_cart {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: calc(100% - 36px);
    min-height: 44px;
    padding: 0;
    border-radius: var(--radius-field);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .add_to_cart_button,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .product_type_simple,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .ajax_add_to_cart {
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--button-text);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base), background var(--transition-base);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .add_to_cart_button:hover,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .product_type_simple:hover,
:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .ajax_add_to_cart:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
    color: var(--button-text);
}

:where(
    .liquidmaster-shop-results,
    .liquidmaster-product-card__after-summary .related.products,
    .liquidmaster-product-card__after-summary .upsells.products
) .products li.product .added_to_cart {
    border: var(--border-strong);
    background: var(--surface-panel);
    color: var(--text-color);
    box-shadow: none;
}
