/*
 * Lili Gallery - WoodMart Products widget visual skin.
 * Version: 2.3.0
 * IMPORTANT: all WoodMart native hover mechanics are preserved.
 */

.elementor-widget-wd_products {
    --lili-card-bg: #fff;
    --lili-card-border: #eceff3;
    --lili-card-border-hover: #d8dce5;
    --lili-text: #1f2340;
    --lili-title: #2b2f4a;
    --lili-muted: #8b91a1;
    --lili-line: #f0f1f4;
    --lili-accent: var(--wd-primary-color, #8f1b86);
    --lili-radius: var(--lili-ui-radius, 9px);
}

/* Use WoodMart variables instead of replacing its layout/interaction rules. */
.elementor-widget-wd_products .wd-product {
    --wd-brd-radius: var(--lili-radius);
    --wd-thumb-brd-radius: var(--lili-radius);
    --wd-prod-gap: 10px;
    min-width: 0;
}

.elementor-widget-wd_products .wd-product .product-wrapper {
    border: 1px solid var(--lili-card-border);
    border-radius: var(--lili-radius) !important;
    background: var(--lili-card-bg);
    box-shadow: 0 2px 8px rgba(17,24,39,.035);
    transition: border-color .22s ease, box-shadow .22s ease, transform .3s ease;
}

@media (hover:hover) and (pointer:fine) {
    .elementor-widget-wd_products .wd-product:hover .product-wrapper {
        border-color: var(--lili-card-border-hover);
        box-shadow: 0 12px 28px rgba(31,35,48,.09);
    }
}

/* Image surface only; don't touch native positioning/overflow. */
.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-line);
    background: linear-gradient(180deg,#fff 0%,#fff 88%,#fcfcfd 100%);
}

.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;
}

.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;
}

/* Purple sale badge + consistent radius. */
.elementor-widget-wd_products .wd-product .product-labels {
    top: 11px;
    right: 11px;
    left: auto;
    gap: 5px;
}
.elementor-widget-wd_products .wd-product .product-label {
    min-width: 0;
    min-height: 0;
    padding: 5px 9px;
    border-radius: var(--lili-radius) !important;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.15;
    box-shadow: none;
}
.elementor-widget-wd_products .wd-product .product-label.onsale {
    background: var(--lili-accent) !important;
    color: #fff !important;
}

/* Keep action button placement/visibility native; visual skin only. */
.elementor-widget-wd_products .wd-product .wd-buttons .wd-action-btn > a,
.elementor-widget-wd_products .wd-product .wd-buttons .wd-action-btn > button,
.elementor-widget-wd_products .wd-product .wd-buttons > div > a {
    border-radius: var(--lili-radius) !important;
}

/* Product text. Do not force product-element-bottom to flex: several WoodMart
   hover modes depend on its native transform / absolute positioning. */
.elementor-widget-wd_products .wd-product .wd-entities-title {
    display: -webkit-box !important;
    height: auto !important;
    min-height: 50px !important;
    max-height: 50px !important;
    overflow: hidden !important;
    color: var(--lili-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;
}
.elementor-widget-wd_products .wd-product .wd-entities-title a {
    color: inherit !important;
}
.elementor-widget-wd_products .wd-product .wd-entities-title a:hover {
    color: var(--lili-accent) !important;
}

.elementor-widget-wd_products .wd-product :is(.wd-product-cats,.wd-product-brands-links,.wd-product-sku) {
    font-size: 11px;
}

.elementor-widget-wd_products .wd-product .price {
    color: var(--lili-text) !important;
    font-variant-numeric: tabular-nums;
}
.elementor-widget-wd_products .wd-product .price ins {
    color: var(--lili-text) !important;
    text-decoration: none !important;
}
.elementor-widget-wd_products .wd-product .price > .amount,
.elementor-widget-wd_products .wd-product .price ins .amount {
    color: var(--lili-text) !important;
    font-size: 19px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}
.elementor-widget-wd_products .wd-product .price del,
.elementor-widget-wd_products .wd-product .price del .amount {
    color: var(--lili-muted) !important;
    font-size: 10.5px !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}
.elementor-widget-wd_products .wd-product .woocommerce-Price-currencySymbol {
    font-size: .72em !important;
    font-weight: 700 !important;
}

/* Native BUTTON hover: WoodMart darkens the whole image and centers Add to cart.
   Only recolor the overlay/button, never alter display/opacity/position. */
@media (min-width:1025px) {
    .elementor-widget-wd_products .wd-product.wd-hover-button .wd-product-thumb:before {
        display: block !important;
        background: rgba(27,25,40,.48) !important;
    }
    .elementor-widget-wd_products .wd-product.wd-hover-button .wd-add-btn > a {
        border-radius: var(--lili-radius) !important;
    }
}

/* Native BASE/FW fade card must extend outside the normal card. */
.elementor-widget-wd_products .wd-product.wd-hover-with-fade .product-wrapper {
    overflow: visible !important;
}
.elementor-widget-wd_products .wd-product.wd-hover-with-fade .wd-product-card-bg {
    border-color: var(--lili-card-border) !important;
    border-radius: var(--lili-radius) !important;
    background: #fff !important;
    box-shadow: 0 14px 34px rgba(31,35,48,.12);
}
.elementor-widget-wd_products .wd-product.wd-hover-with-fade .wd-product-card-hover {
    border-radius: 0 0 var(--lili-radius) var(--lili-radius);
}

/* Native buttons on hover: retain slide-up footer. */
.elementor-widget-wd_products .wd-product.wd-hover-buttons-on-hover .wd-add-btn > a,
.elementor-widget-wd_products .wd-product.wd-hover-fw-button .wd-add-btn > a,
.elementor-widget-wd_products .wd-product.wd-hover-standard .wd-add-btn > a,
.elementor-widget-wd_products .wd-product.wd-hover-base .wd-bottom-actions .wd-add-btn > a {
    border-radius: var(--lili-radius) !important;
}

/* Tabs/options extras remain polished without changing their behavior. */
.elementor-widget-wd_products .wd-product .star-rating {
    color: #f9a825;
}
.elementor-widget-wd_products .wd-product .wd-stock-progress .progress-area,
.elementor-widget-wd_products .wd-product .wd-stock-progress .progress-bar {
    border-radius: 999px;
}
.elementor-widget-wd_products .wd-product .wd-product-countdown {
    border-radius: var(--lili-radius);
}

/* Carousel UI. */
.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: var(--lili-radius) !important;
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 6px 16px rgba(25,29,45,.08) !important;
}
.elementor-widget-wd_products .flickity-page-dots .dot,
.elementor-widget-wd_products .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #d5d8df;
    opacity: 1;
}
.elementor-widget-wd_products .flickity-page-dots .dot.is-selected,
.elementor-widget-wd_products .swiper-pagination-bullet-active {
    width: 18px;
    background: var(--lili-accent);
}

@media (max-width:1024px) {
    .elementor-widget-wd_products .wd-product .wd-entities-title {
        min-height: 46px !important;
        max-height: 46px !important;
        font-size: 12.7px !important;
        line-height: 1.8 !important;
    }
    .elementor-widget-wd_products .wd-product .price > .amount,
    .elementor-widget-wd_products .wd-product .price ins .amount {
        font-size: 17px !important;
    }
}
@media (max-width:767px) {
    .elementor-widget-wd_products .wd-product .wd-entities-title {
        min-height: 40px !important;
        max-height: 40px !important;
        font-size: 11.2px !important;
        line-height: 1.75 !important;
    }
    .elementor-widget-wd_products .wd-product .price > .amount,
    .elementor-widget-wd_products .wd-product .price ins .amount {
        font-size: 15px !important;
    }
}
