/* Custom WooCommerce Products Widget Styles */

.cw-products-widget-container {
    margin-bottom: 20px;
}

.cw-products-widget-container .products {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between; /* Distribute items evenly */
}

.cw-products-widget-container .products li.product {
    width: calc(25% - 15px); /* 4 columns, adjust 15px for spacing */
    margin-bottom: 30px;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
    text-align: center;
    border: 1px solid #eee;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.cw-products-widget-container .products li.product:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

/* Adjust for responsive 2 columns on smaller screens if needed */
@media (max-width: 992px) {
    .cw-products-widget-container .products li.product {
        width: calc(50% - 15px); /* 2 columns */
    }
}

/* Adjust for responsive 1 column on very small screens if needed */
@media (max-width: 576px) {
    .cw-products-widget-container .products li.product {
        width: 100%; /* 1 column */
    }
}


.cw-product-card {
    display: flex;
    flex-direction: column;
    height: 100%; /* Make sure cards take full height */
}

.cw-product-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block; /* Remove extra space below image */
}

.cw-product-title {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
    flex-grow: 1; /* Allow title to take up available space */
}

.cw-product-title a {
    text-decoration: none;
    color: #333;
    transition: color 0.2s ease;
}

.cw-product-title a:hover {
    color: #007bff; /* Example hover color */
}

.cw-product-price {
    font-size: 1.2em;
    color: #007bff; /* Primary color for price */
    font-weight: bold;
    margin-bottom: 15px;
    display: block; /* Ensure price is on its own line */
}

/* Ensure WooCommerce default price styling doesn't override too much */
.cw-product-price ins {
    background-color: transparent;
}

.cw-product-price .amount {
    color: inherit;
}

.cw-readmore-button {
    margin-top: auto; /* Push button to the bottom */
}

.cw-readmore-button .button {
    background-color: #f0f0f0; /* Light gray button */
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 0.9em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border-radius: 3px;
    display: inline-block; /* For proper padding and margin */
}

.cw-readmore-button .button:hover {
    background-color: #e0e0e0;
    color: #000;
    border-color: #ccc;
}

/* Hide default WooCommerce add to cart button if you only want 'Read More' */
.cw-products-widget-container .button.product_type_simple,
.cw-products-widget-container .button.add_to_cart_button {
    display: none !important;
}

/* For the image in the prompt, let's create a visual example of the card */