/* ============================================================
   WooCommerce Product Grid Visual Consistency — 7b51bc8c
   Targets: WooLentor + Standard WooCommerce loops
   ============================================================ */

/* ----------------------------------------------------------
   1. GRID LAYOUT — equal columns, consistent gap
   ---------------------------------------------------------- */
ul.products,
.products.columns-1,
.products.columns-2,
.products.columns-3,
.products.columns-4,
.products.columns-5,
.wl-products-area,
.woolentor-products-area,
.wl-product-grid-wrapper,
.woolentor-product-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* ----------------------------------------------------------
   2. PRODUCT CARD — flex column so footer always sticks
   ---------------------------------------------------------- */
ul.products li.product,
.products li.product,
.wl-products-area .product,
.woolentor-products-area .product,
.wl-product-grid-wrapper .product,
.wl-product-wrapper,
.woolentor-product-grid .product {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

ul.products li.product:hover,
.products li.product:hover,
.wl-product-wrapper:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
}

/* ----------------------------------------------------------
   3. PRODUCT IMAGE — fixed aspect ratio 1:1, cover crop
   ---------------------------------------------------------- */
ul.products li.product a.woocommerce-LoopProduct-link,
.products li.product a.woocommerce-LoopProduct-link,
.wl-product-wrapper .wl-product-img,
.wl-product-wrapper .woocommerce-LoopProduct-link,
.woolentor-products-area .woocommerce-LoopProduct-link {
    display: block !important;
    width: 100% !important;
    margin-bottom: 12px !important;
}

ul.products li.product a.woocommerce-LoopProduct-link img,
.products li.product a.woocommerce-LoopProduct-link img,
.wl-product-wrapper img.wp-post-image,
.wl-product-wrapper img.attachment-woocommerce_thumbnail,
.woolentor-products-area img.wp-post-image,
.woolentor-products-area img.attachment-woocommerce_thumbnail,
.products img.wp-post-image,
.products img.attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    object-position: center center !important;
    display: block !important;
    border-radius: 6px !important;
    aspect-ratio: 1 / 1 !important;
    max-width: 100% !important;
}

/* ----------------------------------------------------------
   4. PRODUCT TITLE — locked typography + fixed height (2 lines)
   ---------------------------------------------------------- */
ul.products li.product .woocommerce-loop-product__title,
.products li.product .woocommerce-loop-product__title,
.wl-product-wrapper .woocommerce-loop-product__title,
.woolentor-products-area .woocommerce-loop-product__title,
.wl-product-title,
.woolentor-product-title {
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    color: #333333 !important;
    text-align: left !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    /* Clamp to exactly 2 lines so price always starts at the same Y */
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: calc(15px * 1.4 * 2) !important; /* 2 lines */
    max-height: calc(15px * 1.4 * 2) !important;
}

/* ----------------------------------------------------------
   5. PRICE — uniform size, weight, color, spacing
   ---------------------------------------------------------- */
ul.products li.product .price,
.products li.product .price,
.wl-product-wrapper .price,
.woolentor-products-area .price,
.wl-product-price,
.woolentor-product-price {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #6EC1E4 !important;
    line-height: 1.3 !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    display: block !important;
    min-height: 24px !important;
}

ul.products li.product .price del,
.products li.product .price del,
.wl-product-wrapper .price del {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #aaa !important;
    opacity: 1 !important;
    margin-right: 4px !important;
}

ul.products li.product .price ins,
.products li.product .price ins,
.wl-product-wrapper .price ins {
    text-decoration: none !important;
    font-weight: 700 !important;
}

/* ----------------------------------------------------------
   6. VARIATION TEXT — consistent sizing below title/price
   ---------------------------------------------------------- */
.wl-product-wrapper .woocommerce-variation-price,
.products li.product .woocommerce-variation-price,
.woocommerce-variation-description,
.product .variations,
.product .variations td,
.product .variations th,
.wl-product-wrapper .variations,
.wl-product-wrapper .woocommerce-variation {
    font-size: 13px !important;
    color: #7A7A7A !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
}

/* ----------------------------------------------------------
   7. ADD TO CART BUTTON — uniform size and position
      Push to bottom with margin-top: auto on wrapper
   ---------------------------------------------------------- */
ul.products li.product .button,
.products li.product .button,
.wl-product-wrapper .button,
.woolentor-products-area .button,
ul.products li.product a.add_to_cart_button,
.products li.product a.add_to_cart_button,
.wl-product-wrapper a.add_to_cart_button,
ul.products li.product a.product_type_simple,
.products li.product a.product_type_simple,
ul.products li.product a.product_type_variable,
.products li.product a.product_type_variable {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    padding: 11px 16px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    border-radius: 6px !important;
    margin-top: auto !important;
    cursor: pointer !important;
    transition: background 0.2s ease, color 0.2s ease !important;
    text-decoration: none !important;
}

/* ----------------------------------------------------------
   8. SPACER — push button to bottom of every card equally
   ---------------------------------------------------------- */
ul.products li.product,
.products li.product,
.wl-product-wrapper {
    justify-content: flex-start !important;
}

/* Inner content wrapper pushes button down */
ul.products li.product .button,
.products li.product .button,
.wl-product-wrapper .button {
    margin-top: auto !important;
}

/* Price and title sections fill available space */
ul.products li.product .price,
.products li.product .price,
.wl-product-wrapper .price {
    flex-shrink: 0 !important;
}

/* ----------------------------------------------------------
   9. SALE BADGE — consistent position
   ---------------------------------------------------------- */
ul.products li.product .onsale,
.products li.product .onsale,
.wl-product-wrapper .onsale {
    top: 12px !important;
    left: 12px !important;
    right: auto !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    z-index: 2 !important;
}

/* ----------------------------------------------------------
   10. STAR RATINGS — uniform size
   ---------------------------------------------------------- */
ul.products li.product .star-rating,
.products li.product .star-rating,
.wl-product-wrapper .star-rating {
    font-size: 13px !important;
    margin: 0 0 6px 0 !important;
    height: auto !important;
}

/* ----------------------------------------------------------
   11. RESPONSIVE — Tablet (≤ 1024px): 2 columns
   ---------------------------------------------------------- */
@media screen and (max-width: 1024px) {
    ul.products,
    .products.columns-1,
    .products.columns-2,
    .products.columns-3,
    .products.columns-4,
    .products.columns-5,
    .wl-products-area,
    .woolentor-products-area,
    .wl-product-grid-wrapper,
    .woolentor-product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    ul.products li.product a.woocommerce-LoopProduct-link img,
    .products li.product a.woocommerce-LoopProduct-link img,
    .wl-product-wrapper img.wp-post-image,
    .wl-product-wrapper img.attachment-woocommerce_thumbnail,
    .woolentor-products-area img.wp-post-image,
    .woolentor-products-area img.attachment-woocommerce_thumbnail,
    .products img.wp-post-image,
    .products img.attachment-woocommerce_thumbnail {
        height: 200px !important;
    }
}

/* ----------------------------------------------------------
   12. RESPONSIVE — Mobile (≤ 600px): 1 column
   ---------------------------------------------------------- */
@media screen and (max-width: 600px) {
    ul.products,
    .products.columns-1,
    .products.columns-2,
    .products.columns-3,
    .products.columns-4,
    .products.columns-5,
    .wl-products-area,
    .woolentor-products-area,
    .wl-product-grid-wrapper,
    .woolentor-product-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    ul.products li.product a.woocommerce-LoopProduct-link img,
    .products li.product a.woocommerce-LoopProduct-link img,
    .wl-product-wrapper img.wp-post-image,
    .wl-product-wrapper img.attachment-woocommerce_thumbnail,
    .woolentor-products-area img.wp-post-image,
    .woolentor-products-area img.attachment-woocommerce_thumbnail,
    .products img.wp-post-image,
    .products img.attachment-woocommerce_thumbnail {
        height: 220px !important;
    }

    ul.products li.product,
    .products li.product,
    .wl-product-wrapper {
        padding: 14px !important;
    }
}
