/* Dark background for product category pages */
body.tax-product_cat, body.post-type-archive-product {
    background-color: #1a1a1a !important;
    color: #e0e0e0 !important;
}

/* Make category titles readable */
body.tax-product_cat h1.woocommerce-products-header__title.page-title,
body.tax-product_cat .woocommerce-products-header .term-description,
body.post-type-archive-product h1.woocommerce-products-header__title.page-title {
    color: #ffffff !important;
}

/* Dark background for individual product cards in the grid and layout setup */
.woocommerce ul.products li.product {
    background-color: #2a2a2a !important;
    padding: 15px !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: center !important;
    height: 100% !important;
}

/* Ensure image takes appropriate space */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

/* Reduce product title size slightly for a nicer look */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    color: #ffffff !important;
    font-size: 1.1em !important;
    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

/* Ensure price is readable and placed before button correctly */
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price del,
.woocommerce ul.products li.product .price ins {
    color: #ffffff !important;
}

.woocommerce ul.products li.product .price {
    margin-bottom: 15px !important;
}

/* Prevent button from overflowing */
.woocommerce ul.products li.product .button {
    margin-top: auto !important; /* Pushes button to bottom after price */
    max-width: 100% !important;
    box-sizing: border-box !important;
}
