
/* Container grid fix */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(48%, 1fr));
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Product card styling */
ul.products li.product {
    background: #fff;
    border: 2px solid red;
    border-radius: 12px;
    overflow: hidden;
    padding: 0;
    margin: 0 !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 280px !important;
    box-sizing: border-box;
}

/* Product image large */
ul.products li.product img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover;
    border-bottom: 1px solid #ddd;
}

/* Cart icon */
ul.products li.product .button.add_to_cart_button {
    position: absolute !important;
    top: 8px;
    right: 8px;
    background: red !important;
    color: #fff !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50%;
    text-indent: -9999px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M7 4h-2l-3 7v2h2l3-7h10l3 7h2v-2l-3-7h-12zm0 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
}

/* Product title */
ul.products li.product .woocommerce-loop-product__title {
    font-size: 13px !important;
    font-weight: 600 !important;
    margin: 6px 5px 2px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 90%;
}

/* Reviews aligned below title */
ul.products li.product .star-rating {
    margin: 0 auto 2px auto !important;
    font-size: 11px !important;
    display: block;
}

/* Price aligned below reviews */
ul.products li.product .price {
    margin: 0 auto 6px auto !important;
    font-size: 13px !important;
    font-weight: bold;
    color: #000;
}

/* Hide default add to cart text button */
ul.products li.product .button.add_to_cart_button::after {
    content: '' !important;
}
