.wc-card-dbbee88d-grid {
    display: grid;
    /* Force exactly 2 columns on mobile to ensure it doesn't break */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px; /* Smaller gap on mobile */
}

/* Tablet Columns */
@media (min-width: 768px) {
    .wc-card-dbbee88d-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 15px;
    }
}

/* Desktop Columns */
@media (min-width: 1025px) {
    .wc-card-grid-desktop-4 .wc-card-dbbee88d-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px;}
    .wc-card-grid-desktop-5 .wc-card-dbbee88d-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px;}
    .wc-card-grid-desktop-6 .wc-card-dbbee88d-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px;}
}

.wc-card-dbbee88d-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    position: relative;
    text-align: center;
    padding-bottom: 15px;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from overflowing grid */
}

.wc-card-image-wrap {
    position: relative;
    width: 100%;
}

.wc-card-image-wrap img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.badge-sale, .badge-new {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    z-index: 1;
}

.badge-sale { left: 10px; background-color: #FE7004; }
.badge-new { right: 10px; background-color: #01B3FD; }

.wc-card-content {
    padding: 10px; /* Reduced padding for mobile */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .wc-card-content {
        padding: 15px;
    }
}

.wc-card-title {
    font-size: 14px;
    margin: 0 0 10px;
}

@media (min-width: 768px) {
    .wc-card-title {
        font-size: 16px;
    }
}

.wc-card-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Price Styling Improvements */
.wc-card-dbbee88d-item .price {
    font-size: 16px;
    font-weight: bold;
    color: #01B3FD;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    width: 100%;
}

@media (min-width: 768px) {
    .wc-card-dbbee88d-item .price {
        font-size: 18px;
        margin-bottom: 15px;
        gap: 8px;
    }
}

/* Strictly small and gray regular price */
.wc-card-dbbee88d-item .price del,
.wc-card-dbbee88d-item .price del .amount,
.wc-card-dbbee88d-item .price del .woocommerce-Price-currencySymbol {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: #888 !important;
    text-decoration: line-through !important;
}

.wc-card-dbbee88d-item .price ins {
    text-decoration: none;
    color: #01B3FD; /* Controlled by Elementor */
}

/* Full Width Add to Cart Button Container Fix */
.wc-card-button-wrap {
    margin-top: auto; /* Pushes button to bottom */
    width: 100%;
    display: block;
    padding: 0;
    box-sizing: border-box;
}

.wc-card-button-wrap .add_to_cart_button {
    background-color: #FE7004;
    color: #fff;
    padding: 10px 5px; /* Adjusted padding to ensure fit on mobile */
    border-radius: 4px;
    text-decoration: none;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important; /* Force full width */
    max-width: 100% !important;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
    font-size: 13px; /* Slightly smaller base font for mobile */
    white-space: nowrap; /* Prevent breaking lines on narrow screens */
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .wc-card-button-wrap .add_to_cart_button {
        padding: 12px 20px;
        font-size: 14px;
    }
}

.wc-card-button-wrap .add_to_cart_button i {
    font-size: 14px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .wc-card-button-wrap .add_to_cart_button i {
        font-size: 16px;
    }
}

.wc-card-button-wrap .add_to_cart_button:hover {
    background-color: #01B3FD; /* Controlled via Elementor now, fallback provided */
}

/* Hide any stray WooCommerce added-to-cart or extra cart icons generated outside our wrapper */
.wc-card-dbbee88d-item .added_to_cart,
.wc-card-dbbee88d-item > i.eicon-cart-medium,
.wc-card-content > i.eicon-cart-medium {
    display: none !important;
}


.wc-card-dbbee88d-pagination {
    margin-top: 30px;
    text-align: center;
}
.wc-card-dbbee88d-pagination .page-numbers {
    padding: 8px 12px;
    border: 1px solid #ddd;
    margin: 0 4px;
    text-decoration: none;
    color: #333;
}
.wc-card-dbbee88d-pagination .current {
    background: #01B3FD;
    color: #fff;
    border-color: #01B3FD;
}

/* Toast Notification */
.wc-toast-message {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}
.wc-toast-message.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}