.woocommerce ul.products li.product {
    list-style: none;
    display: flex;
}

.bd-dev-product-card {
    background: var(--bd-dev-card-bg, #ffffff);
    border-radius: var(--bd-dev-card-radius, 12px);
    padding: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.bd-dev-product-card,
.bd-dev-product-card .button {
    font-family: var(--bd-dev-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.bd-dev-product-card .bd-dev-card-image a,
.bd-dev-product-card .bd-dev-card-image img {
    display: block;
}

.bd-dev-product-card .bd-dev-card-image {
    position: relative;
}

.bd-dev-product-card .bd-dev-card-image img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--bd-dev-card-radius, 12px) - 4px);
}

.bd-dev-product-card .bd-dev-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.bd-dev-product-card .bd-dev-onsale {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #dc2626;
    color: #fef2f2;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bd-dev-product-card .bd-dev-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(15, 23, 42, 0.9);
    color: #f9fafb;
}

.bd-dev-product-card .bd-dev-badge-discount {
    background: #dc2626;
    color: #fef2f2;
}

.bd-dev-product-card .bd-dev-badge-stock {
    background: #b91c1c;
    color: #fee2e2;
}

.bd-dev-product-card .bd-dev-badge-best-seller {
    background: #fbbf24;
    color: #1f2937;
}

.bd-dev-product-card .bd-dev-badge-new {
    background: #22c55e;
    color: #022c22;
}

.bd-dev-product-card .bd-dev-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.bd-dev-product-card .bd-dev-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--bd-dev-card-title-color, #111827);
    margin: 14px 0 6px;
    line-height: 1.4;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--bd-dev-font-heading, var(--bd-dev-font-body, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif));
}

.bd-dev-product-card .bd-dev-card-title a {
    color: inherit;
    text-decoration: none;
}

.bd-dev-product-card .bd-dev-card-title a:hover {
    text-decoration: underline;
}

.bd-dev-product-card .bd-dev-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--bd-dev-card-price-color, #111827);
    margin-bottom: 14px;
}

.bd-dev-product-card .bd-dev-card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.bd-dev-product-card .button {
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.18s ease-out, color 0.18s ease-out, transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

.bd-dev-product-card .add_to_cart_button {
    background: var(--bd-dev-card-add-bg, #111827) !important;
    color: var(--bd-dev-card-add-text, #ffffff) !important;
}

.bd-dev-product-card .add_to_cart_button:hover {
    background: var(--bd-dev-card-button-hover-bg, var(--bd-dev-card-add-bg, #111827)) !important;
    color: var(--bd-dev-card-button-hover-text, var(--bd-dev-card-add-text, #ffffff)) !important;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.24);
}

.bd-dev-product-card .bd-dev-buy-now {
    background: var(--bd-dev-card-buy-bg, #f97316) !important;
    color: var(--bd-dev-card-buy-text, #ffffff) !important;
}

.bd-dev-product-card .bd-dev-buy-now:hover {
    background: var(--bd-dev-card-button-hover-bg, var(--bd-dev-card-buy-bg, #f97316)) !important;
    color: var(--bd-dev-card-button-hover-text, var(--bd-dev-card-buy-text, #ffffff)) !important;
}

.bd-dev-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.24);
}

.bd-dev-layout-overlay .bd-dev-card-image {
    position: relative;
}

.bd-dev-layout-overlay .bd-dev-card-image img {
    height: 220px;
    object-fit: cover;
}

.bd-dev-layout-overlay .bd-dev-card-content {
    position: absolute;
    inset: auto 16px 16px 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.3), transparent);
}

.bd-dev-layout-overlay .bd-dev-card-title,
.bd-dev-layout-overlay .bd-dev-card-price {
    color: #f9fafb;
}

.bd-dev-layout-overlay .bd-dev-card-actions {
    margin-top: 10px;
}

.bd-dev-layout-bordered {
    background: #ffffff;
    box-shadow: none;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.bd-dev-layout-bordered:hover {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
}

.bd-dev-layout-shadow {
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.22);
}

.bd-dev-layout-shadow:hover {
    box-shadow: 0 20px 55px rgba(15, 23, 42, 0.3);
}

.bd-dev-buttons-outline .add_to_cart_button,
.bd-dev-buttons-outline .bd-dev-buy-now {
    background: transparent !important;
    color: var(--bd-dev-card-title-color, #111827) !important;
    border: 1px solid rgba(15, 23, 42, 0.5) !important;
}

.bd-dev-buttons-outline .add_to_cart_button:hover,
.bd-dev-buttons-outline .bd-dev-buy-now:hover {
    background: var(--bd-dev-card-button-hover-bg, rgba(15, 23, 42, 0.9)) !important;
    color: var(--bd-dev-card-button-hover-text, #f9fafb) !important;
}

.bd-dev-buttons-pill .bd-dev-card-actions {
    flex-direction: column;
}

.bd-dev-buttons-pill .button {
    width: 100%;
    text-align: center;
}

.bd-dev-buttons-pill .add_to_cart_button {
    border-radius: 999px;
}

.bd-dev-buttons-pill .bd-dev-buy-now {
    border-radius: 999px;
}

.bd-dev-buttons-ghost .add_to_cart_button,
.bd-dev-buttons-ghost .bd-dev-buy-now {
    background: transparent !important;
    color: var(--bd-dev-card-title-color, #111827) !important;
}

.bd-dev-buttons-ghost .add_to_cart_button {
    border-radius: 6px;
}

.bd-dev-buttons-ghost .bd-dev-buy-now {
    border-radius: 6px;
}

.bd-dev-buttons-ghost .add_to_cart_button:hover,
.bd-dev-buttons-ghost .bd-dev-buy-now:hover {
    background: var(--bd-dev-card-button-hover-bg, rgba(15, 23, 42, 0.06)) !important;
    color: var(--bd-dev-card-button-hover-text, var(--bd-dev-card-title-color, #111827)) !important;
}

.bd-dev-buttons-gradient .add_to_cart_button,
.bd-dev-buttons-gradient .bd-dev-buy-now {
    background-image: linear-gradient(
        90deg,
        var(--bd-dev-card-add-bg, #0ea5e9),
        var(--bd-dev-card-buy-bg, #0369a1)
    ) !important;
    background-color: transparent !important;
    border: none;
    color: var(--bd-dev-card-add-text, #ffffff) !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.45);
}

.bd-dev-buttons-gradient .bd-dev-buy-now {
    color: var(--bd-dev-card-buy-text, #ffffff) !important;
}

.bd-dev-buttons-gradient .add_to_cart_button::before,
.bd-dev-buttons-gradient .bd-dev-buy-now::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.26);
    vertical-align: middle;
}

.bd-dev-buttons-gradient .add_to_cart_button:hover,
.bd-dev-buttons-gradient .bd-dev-buy-now:hover {
    background: var(--bd-dev-card-button-hover-bg, transparent) !important;
    color: var(--bd-dev-card-button-hover-text, var(--bd-dev-card-add-text, #ffffff)) !important;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.6);
}

.bd-dev-button-shape-pill .bd-dev-card-actions .button {
    border-radius: 999px;
}

.bd-dev-button-shape-rounded .bd-dev-card-actions .button {
    border-radius: 14px;
}

.bd-dev-button-shape-soft .bd-dev-card-actions .button {
    border-radius: 8px;
}

.bd-dev-button-shape-square .bd-dev-card-actions .button {
    border-radius: 0;
}

.bd-dev-button-shape-cut .bd-dev-card-actions .button {
    border-radius: 0;
    position: relative;
    overflow: hidden;
}

.bd-dev-button-shape-cut .bd-dev-card-actions .button::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: rgba(255, 255, 255, 0.15);
    transform: skewX(-25deg);
    opacity: 0;
    transition: opacity 0.2s ease-out;
}

.bd-dev-button-shape-cut .bd-dev-card-actions .button:hover::before {
    opacity: 1;
}

.bd-dev-button-shape-underline .bd-dev-card-actions .button {
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 2px solid currentColor;
}

.bd-dev-button-full .bd-dev-card-actions {
    flex-direction: column;
}

.bd-dev-button-full .bd-dev-card-actions .button {
    width: 100%;
    text-align: center;
}

/*
 * Universal Theme Support / Fallback
 * Ensures colors apply even if the custom card template is not used.
 * Targeting standard WooCommerce classes and common theme structures.
 */

/* Title Color */
body.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.woocommerce ul.products li.product .bd-dev-card-title,
body.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
body.woocommerce ul.products li.product h3.woocommerce-loop-product__title,
body.woocommerce ul.products li.product .astra-shop-summary-wrap .ast-loop-product__link,
body.woocommerce ul.products li.product .product-title {
    color: var(--bd-dev-card-title-color) !important;
}

/* Price Color */
body.woocommerce ul.products li.product .price,
body.woocommerce ul.products li.product .price .amount,
body.woocommerce ul.products li.product .bd-dev-card-price {
    color: var(--bd-dev-card-price-color) !important;
}

/* Add to Cart Button */
body.woocommerce ul.products li.product .button.add_to_cart_button,
body.woocommerce ul.products li.product .added_to_cart,
body.woocommerce ul.products li.product .bd-dev-card-actions .button,
body.woocommerce ul.products li.product a.button,
body.woocommerce ul.products li.product button.button,
body.woocommerce ul.products li.product input.button,
/* Astra specific */
.ast-plain-container .woocommerce ul.products li.product .button.add_to_cart_button,
.ast-site-header-cart .widget_shopping_cart .buttons .button,
/* Woodmart specific */
.woodmart-hover-base .wd-bottom-actions .wd-action-btn.wd-add-btn > a,
.woodmart-hover-base .wd-bottom-actions .wd-action-btn.wd-add-btn > button,
/* OceanWP specific */
.woocommerce ul.products li.product .btn-add-to-cart a,
/* Generic fallbacks with high specificity */
div.woocommerce ul.products li.product .button.add_to_cart_button,
div.woocommerce ul.products li.product .button.product_type_simple,
div.woocommerce ul.products li.product .button.product_type_variable {
    background-color: var(--bd-dev-card-add-bg) !important;
    background: var(--bd-dev-card-add-bg) !important;
    color: var(--bd-dev-card-add-text) !important;
    border-color: transparent;
}

/* Button Hover */
body.woocommerce ul.products li.product .button.add_to_cart_button:hover,
body.woocommerce ul.products li.product .bd-dev-card-actions .button:hover,
body.woocommerce ul.products li.product a.button:hover,
body.woocommerce ul.products li.product button.button:hover,
body.woocommerce ul.products li.product input.button:hover,
/* Astra specific hover */
.ast-plain-container .woocommerce ul.products li.product .button.add_to_cart_button:hover,
/* Woodmart specific hover */
.woodmart-hover-base .wd-bottom-actions .wd-action-btn.wd-add-btn > a:hover,
.woodmart-hover-base .wd-bottom-actions .wd-action-btn.wd-add-btn > button:hover,
/* Generic fallbacks hover */
div.woocommerce ul.products li.product .button.add_to_cart_button:hover {
    background-color: var(--bd-dev-card-button-hover-bg, var(--bd-dev-card-add-bg)) !important;
    background: var(--bd-dev-card-button-hover-bg, var(--bd-dev-card-add-bg)) !important;
    color: var(--bd-dev-card-button-hover-text, var(--bd-dev-card-add-text)) !important;
}
