/* ==========================================================
   WAHAG HOME PRODUCT CARDS
   Equal card heights and aligned content
   ========================================================== */

/* Stretch all product items inside the row */
.home .products {
    align-items: stretch;
}

/* Make each product item take the full available height */
.home .products .product-grid-item,
.home .products .wd-product {
    height: 100%;
}

/* Build the card vertically */
.home .products .product-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Keep the image area equal for all products */
.home .products .product-element-top {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 10px;
}

/* Prevent different image dimensions from changing card height */
.home .products .product-element-top img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Use this class on a product widget when images must not be cropped */
.home .wahag-image-contain .product-element-top img {
    object-fit: contain;
    background-color: #ffffff;
}

/* Make the content section fill the remaining space */
.home .products .product-element-bottom {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    padding-top: 12px;
}

/* Reserve equal space for product titles */
.home .products .wd-entities-title,
.home .products .woocommerce-loop-product__title,
.home .products .product-title {
    display: -webkit-box;
    min-height: 50px;
    margin-top: 0;
    margin-bottom: 8px;
    overflow: hidden;

    line-height: 1.4;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Reserve equal space for product categories */
.home .products .wd-product-cats,
.home .products .product-categories {
    display: -webkit-box;
    min-height: 46px;
    margin-bottom: 8px;
    overflow: hidden;

    line-height: 1.45;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Push the price to the bottom of every product card */
.home .products .price {
    min-height: 28px;
    margin-top: auto;
    margin-bottom: 0;
}

/* Keep optional product buttons aligned */
.home .products .wd-add-btn,
.home .products .wd-bottom-actions,
.home .products .product-actions {
    margin-top: 10px;
}

/* Desktop */
@media (min-width: 1025px) {
    .home .products .product-grid-item,
    .home .products .wd-product {
        min-height: 470px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .home .products .product-grid-item,
    .home .products .wd-product {
        min-height: 430px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .home .products .product-grid-item,
    .home .products .wd-product {
        min-height: 380px;
    }

    .home .products .wd-entities-title,
    .home .products .woocommerce-loop-product__title,
    .home .products .product-title {
        min-height: 42px;
        font-size: 14px;
    }

    .home .products .wd-product-cats,
    .home .products .product-categories {
        min-height: 40px;
        font-size: 12px;
    }
}
/* Hide categories only inside selected Elementor product widgets */
.wahag-hide-product-categories .wd-product-cats,
.wahag-hide-product-categories .product-categories,
.wahag-hide-product-categories .posted-in {
    display: none !important;
}