/*
 * Baijia Elementor widgets stylesheet.
 * All rules are scoped under unique class names to avoid clashing with the
 * parent Woodmart theme.
 */

/* ==========================================================================
   Step Cards widget
   ========================================================================== */

.baijia-step-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: 100%;
}

.baijia-step-card {
    --baijia-overlay-start: rgba(136, 173, 153, 0.35);
    --baijia-overlay-end: rgba(136, 173, 153, 0.95);
    --baijia-overlay-angle: 180deg;

    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 320px;
    padding: 32px;
    overflow: hidden;
    border-radius: 20px;
    background-color: #8badf2;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #ffffff;
    text-decoration: none;
    isolation: isolate;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

a.baijia-step-card,
a.baijia-step-card:hover,
a.baijia-step-card:focus {
    color: #ffffff;
    text-decoration: none;
}

a.baijia-step-card:hover {
    transform: translateY(-4px);
}

.baijia-step-card__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image: linear-gradient(
        var(--baijia-overlay-angle),
        var(--baijia-overlay-start) 0%,
        var(--baijia-overlay-end) 100%
    );
    pointer-events: none;
}

.baijia-step-card__inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.baijia-step-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #2b4a73;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
}

.baijia-step-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.baijia-step-card__title {
    margin: 0;
    color: #ffffff;
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
}

.baijia-step-card__description {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 15px;
    line-height: 1.55;
}

/* Responsive fallbacks (only used when Elementor responsive controls are not
   explicitly set by the editor) */
@media (max-width: 1024px) {
    .baijia-step-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .baijia-step-cards {
        grid-template-columns: 1fr;
    }

    .baijia-step-card {
        min-height: 280px;
        padding: 24px;
    }

    .baijia-step-card__title {
        font-size: 22px;
    }
}

/* ==========================================================================
   Products Grid widget (pure display, no hover, no links)
   ========================================================================== */

.baijia-products-grid {
    --bj-cols: 4;
    display: grid;
    grid-template-columns: repeat(var(--bj-cols), minmax(0, 1fr));
    gap: 20px;
    width: 100%;
}

.baijia-products-grid__item {
    display: flex;
    flex-direction: column;
    /* Pure display: no <a> tags are rendered, but make the cursor neutral
       so the card never *feels* clickable. Text remains selectable. */
    cursor: default;
}

.baijia-products-grid__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.baijia-products-grid__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Explicitly disable any hover effect / transition */
    transition: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.baijia-products-grid__item:hover .baijia-products-grid__img,
.baijia-products-grid__image:hover .baijia-products-grid__img {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.baijia-products-grid__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #83b735;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.baijia-products-grid__badge--sale {
    background-color: #e94f4f;
}

.baijia-products-grid__info {
    margin-top: 14px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.baijia-products-grid__title {
    margin: 0;
    color: #1a1a1a;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
    /* Limit to 2 lines for tidy grid */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.baijia-products-grid__category {
    color: rgba(26, 26, 26, 0.55);
    font-size: 13px;
    line-height: 1.4;
    text-transform: capitalize;
}

.baijia-products-grid__price {
    margin-top: 4px;
    color: #83b735;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.baijia-products-grid__price del {
    color: rgba(26, 26, 26, 0.45);
    font-weight: 400;
    margin-right: 6px;
}

.baijia-products-grid__price ins {
    text-decoration: none;
    color: inherit;
}

/* Responsive fallbacks for sites that don't pre-set tablet/mobile in editor */
@media (max-width: 1024px) {
    .baijia-products-grid {
        --bj-cols: 3;
    }
}

@media (max-width: 640px) {
    .baijia-products-grid {
        --bj-cols: 2;
        gap: 12px;
    }

    .baijia-products-grid__title {
        font-size: 14px;
    }

    .baijia-products-grid__price {
        font-size: 14px;
    }
}

/* ==========================================================================
   Original Woodmart "Products (grid or carousel)" widget — disable
   click-to-jump on product images (request: clicks on the image should
   have no effect). We do NOT touch pagination, sliders or other widgets.
   ========================================================================== */

/* Image link wrappers (Woodmart + WooCommerce variants) */
.elementor-widget-wd_products .product-image-link,
.elementor-widget-wd_products .product-grid-item a:has(> img),
.elementor-widget-wd_products .wd-product a:has(> img),
.elementor-widget-wd_products .wd-product-grid a:has(> img),
.elementor-widget-wd_products a.woocommerce-LoopProduct-link,
.elementor-widget-wd_products a.woocommerce-loop-product__link,
/* Title link wrappers */
.elementor-widget-wd_products .wd-entities-title a,
.elementor-widget-wd_products .product-title a,
.elementor-widget-wd_products .woocommerce-loop-product__title a,
.elementor-widget-wd_products h1.wd-entities-title a,
.elementor-widget-wd_products h2.wd-entities-title a,
.elementor-widget-wd_products h3.wd-entities-title a,
.elementor-widget-wd_products h4.wd-entities-title a,
.elementor-widget-wd_products h5.wd-entities-title a,
.elementor-widget-wd_products h6.wd-entities-title a {
    pointer-events: none !important;
    cursor: default !important;
}

/* Also kill any hover effect that depends on the image link being interactive */
.elementor-widget-wd_products .product-image-link:hover,
.elementor-widget-wd_products .product-image-link:focus,
.elementor-widget-wd_products .product-image-link img {
    transform: none !important;
    filter: none !important;
}

/* --------------------------------------------------------------------------
   Remove the hover "pull-up" animation block (Read More / compare / quick
   view buttons that translate-up from below the product image).
   -------------------------------------------------------------------------- */

/* 1. Hide EVERY action button / icon in the product card.
      Final spec: pure display only — keep image + title + category + price.
      NO cart, NO compare, NO quick view, NO wishlist heart, NO hover overlay. */

/* Cart variants */
.elementor-widget-wd_products .wd-add-btn,
.elementor-widget-wd_products .wd-add-btn-replace,
.elementor-widget-wd_products .wd-buy-now-btn,
.elementor-widget-wd_products .quick-shop-button,
.elementor-widget-wd_products .add_to_cart_button,
.elementor-widget-wd_products .add_to_cart_inline,
.elementor-widget-wd_products .single_add_to_cart_button,
.elementor-widget-wd_products .added_to_cart,
.elementor-widget-wd_products .button.product_type_simple,
.elementor-widget-wd_products .button.product_type_variable,
.elementor-widget-wd_products .button.product_type_grouped,
.elementor-widget-wd_products .button.product_type_external,
/* Compare */
.elementor-widget-wd_products .compare-button,
.elementor-widget-wd_products .wd-compare-btn,
/* Quick view */
.elementor-widget-wd_products .btn-quick-view,
.elementor-widget-wd_products .button-quickview,
.elementor-widget-wd_products .wd-quick-view-btn,
/* Wishlist (top-of-image heart and any other variant) */
.elementor-widget-wd_products .add_to_wishlist,
.elementor-widget-wd_products .wd-wishlist-btn,
.elementor-widget-wd_products .yith-wcwl-add-to-wishlist,
.elementor-widget-wd_products .tinv-wishlist,
.elementor-widget-wd_products .tinv-wraper,
.elementor-widget-wd_products .wishlist_button,
/* Generic Woodmart hover button containers */
.elementor-widget-wd_products .wd-buttons,
.elementor-widget-wd_products .wd-tools-element,
.elementor-widget-wd_products .wd-action-btn,
.elementor-widget-wd_products .wd-buttons-icon-only,
.elementor-widget-wd_products .product-buttons,
.elementor-widget-wd_products .product-grid-item-buttons,
.elementor-widget-wd_products .icon-buttons,
.elementor-widget-wd_products .hover-content,
.elementor-widget-wd_products .wd-product-tools {
    display: none !important;
}

/* 2. Hide the second-image swap effect on hover */
.elementor-widget-wd_products .hover-img,
.elementor-widget-wd_products .product-image-back,
.elementor-widget-wd_products .wd-product-image-back {
    display: none !important;
}

/* 2b. Collapse the empty space between the image and the title that the
       hidden cart-button wrapper still reserves. */
.elementor-widget-wd_products .wd-add-btn,
.elementor-widget-wd_products .wd-add-btn-replace,
.elementor-widget-wd_products .wd-buy-now-btn {
    /* These are already display:none above, but also remove any reserved
       layout box just in case the parent uses gap / min-height. */
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
}

.elementor-widget-wd_products .product-element-top {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.elementor-widget-wd_products .product-element-bottom {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Title sits flush against the image bottom — no white strip in between */
.elementor-widget-wd_products .wd-entities-title,
.elementor-widget-wd_products .product-title,
.elementor-widget-wd_products h2.wd-entities-title,
.elementor-widget-wd_products h3.wd-entities-title,
.elementor-widget-wd_products h4.wd-entities-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Belt-and-braces: in hover state, also disallow ANY padding / margin /
   min-height between the image and the title so nothing white can show. */
.elementor-widget-wd_products .product-grid-item:hover .product-element-top,
.elementor-widget-wd_products .product-grid-item:hover .product-element-bottom,
.elementor-widget-wd_products .product-grid-item:hover .wd-buttons,
.elementor-widget-wd_products .product-grid-item:hover .wd-add-btn,
.elementor-widget-wd_products .product-grid-item:hover .wd-add-btn-replace,
.elementor-widget-wd_products .product-grid-item:hover .wd-entities-title,
.elementor-widget-wd_products .wd-product:hover .product-element-top,
.elementor-widget-wd_products .wd-product:hover .product-element-bottom,
.elementor-widget-wd_products .wd-product:hover .wd-buttons,
.elementor-widget-wd_products .wd-product:hover .wd-entities-title {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

/* 3. Cancel any transform / opacity / transition that drives the pull-up
      animation across the whole product card. */
.elementor-widget-wd_products .product-grid-item,
.elementor-widget-wd_products .product-grid-item *,
.elementor-widget-wd_products .wd-product,
.elementor-widget-wd_products .wd-product * {
    transition: none !important;
}

.elementor-widget-wd_products .product-grid-item:hover,
.elementor-widget-wd_products .product-grid-item:hover .product-image-link,
.elementor-widget-wd_products .product-grid-item:hover .product-element-top,
.elementor-widget-wd_products .product-grid-item:hover .wd-entities-title,
.elementor-widget-wd_products .product-grid-item:hover .price,
.elementor-widget-wd_products .product-grid-item:hover img,
.elementor-widget-wd_products .wd-product:hover,
.elementor-widget-wd_products .wd-product:hover * {
    transform: none !important;
    opacity: 1 !important;
    filter: none !important;
}

/* 4. Hover lock-down — nothing inside the product card may move, transform,
      transition or animate when the card is hovered. */
.elementor-widget-wd_products .product-grid-item:hover *,
.elementor-widget-wd_products .wd-product:hover * {
    transform: none !important;
    transition: none !important;
    animation: none !important;
    will-change: auto !important;
}

/* 5. Real Woodmart structure (per actual rendered HTML):
        .wd-product.product-grid-item
          .product-wrapper
            .product-element-top.wd-quick-shop
              a.product-image-link
              .wrapp-buttons > .wd-buttons      <-- hover button stack
            h3.wd-entities-title                <-- title (direct child)
            .wd-product-cats                    <-- category (direct child)
      The "slight pull-down" on hover is caused by Woodmart adding
      padding-bottom to .product-element-top.wd-quick-shop on hover so
      the buttons can slide up. We hid the buttons but the padding still
      lingers, pushing the title down on hover. Lock it. */

/* Hide the entire button wrapper, not just .wd-buttons */
.elementor-widget-wd_products .wrapp-buttons {
    display: none !important;
}

/* Pin .product-element-top spacing identical in hover and non-hover */
.elementor-widget-wd_products .product-element-top,
.elementor-widget-wd_products .product-element-top.wd-quick-shop,
.elementor-widget-wd_products .product-element-top.wd-hover-icons,
.elementor-widget-wd_products .wd-product:hover .product-element-top,
.elementor-widget-wd_products .wd-product:hover .product-element-top.wd-quick-shop,
.elementor-widget-wd_products .product-grid-item:hover .product-element-top,
.elementor-widget-wd_products .product-grid-item:hover .product-element-top.wd-quick-shop {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    transform: none !important;
    transition: none !important;
}

/* Pin .product-wrapper, .wd-entities-title, .wd-product-cats spacing
   identical in hover and non-hover state. */
.elementor-widget-wd_products .wd-product .product-wrapper,
.elementor-widget-wd_products .wd-product:hover .product-wrapper,
.elementor-widget-wd_products .product-grid-item:hover .product-wrapper {
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    transition: none !important;
}

.elementor-widget-wd_products .wd-product .wd-entities-title,
.elementor-widget-wd_products .wd-product .wd-product-cats,
.elementor-widget-wd_products .wd-product:hover .wd-entities-title,
.elementor-widget-wd_products .wd-product:hover .wd-product-cats,
.elementor-widget-wd_products .product-grid-item:hover .wd-entities-title,
.elementor-widget-wd_products .product-grid-item:hover .wd-product-cats {
    transform: none !important;
    transition: none !important;
    position: static !important;
    top: auto !important;
    bottom: auto !important;
}

/* The title's own line-height / font-weight must stay identical on hover
   (some themes add bolder weight which causes a 1-2px reflow). */
.elementor-widget-wd_products .wd-product .wd-entities-title,
.elementor-widget-wd_products .wd-product .wd-entities-title a,
.elementor-widget-wd_products .wd-product:hover .wd-entities-title,
.elementor-widget-wd_products .wd-product:hover .wd-entities-title a,
.elementor-widget-wd_products .product-grid-item:hover .wd-entities-title,
.elementor-widget-wd_products .product-grid-item:hover .wd-entities-title a {
    font-weight: inherit !important;
    text-decoration: none !important;
}
