/* Fix for ::before pseudo-element issues */
.woocommerce ul.products::before,
.woocommerce ul.products li::before,
.products::before,
.products li::before,
.cakeclub-product-card::before {
    display: none !important;
    content: none !important;
}

/* Custom Product Card Styles */
.cakeclub-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cakeclub-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-primary, #99c3b9);
}

/* Product Image Container */
.cakeclub-product-card .product-image-container {
    position: relative;
    overflow: hidden;
}

.cakeclub-product-card .product-image {
    position: relative;
}

.cakeclub-product-card .product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cakeclub-product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Sale Badge */
.cakeclub-product-card .onsale {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4757;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* Add to Cart Button Overlay */
.cakeclub-product-card .add_to_cart_button {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-primary, #99c3b9);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
}

.cakeclub-product-card:hover .add_to_cart_button {
    opacity: 1;
}

.cakeclub-product-card .add_to_cart_button:hover {
    background: #85b3a9;
    transform: translateX(-50%) translateY(-2px);
}

/* Product Content */
.cakeclub-product-card .product-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Title and Price */
.cakeclub-product-card .product-title-price {
    margin-bottom: 15px;
}

.cakeclub-product-card .woocommerce-loop-product__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--title-color, #333);
    line-height: 1.3;
}

.cakeclub-product-card .woocommerce-loop-product__title:hover {
    color: var(--accent-primary, #99c3b9);
}

.cakeclub-product-card .price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary, #99c3b9);
    margin: 0;
}

.cakeclub-product-card .price del {
    color: #999;
    font-weight: 400;
    margin-right: 8px;
}

/* Product Details */
.cakeclub-product-card .product-details {
    margin-bottom: 15px;
    flex-grow: 1;
}

.cakeclub-product-card .product-detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    font-size: 14px;
}

.cakeclub-product-card .product-detail-item.description {
    flex-direction: column;
    align-items: flex-start;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.cakeclub-product-card .detail-label {
    font-weight: 600;
    color: #666;
    margin-right: 8px;
    min-width: 60px;
}

.cakeclub-product-card .detail-value {
    color: #333;
    line-height: 1.4;
}

.cakeclub-product-card .product-detail-item.description .detail-value {
    font-style: italic;
    color: #666;
    font-size: 13px;
}

/* Featured Badge */
.cakeclub-product-card .featured-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-top: auto;
    border: 2px solid #ffd700;
}

.cakeclub-product-card .featured-star {
    margin-right: 5px;
    font-size: 14px;
}

/* Rating Stars */
.cakeclub-product-card .star-rating {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cakeclub-product-card .product-image img {
        height: 200px;
    }
    
    .cakeclub-product-card .product-content {
        padding: 15px;
    }
    
    .cakeclub-product-card .woocommerce-loop-product__title {
        font-size: 16px;
    }
}

/* Grid Layout Support */
.products-grid .cakeclub-product-card,
.featured-products-grid .cakeclub-product-card {
    height: 100%;
}

/* WooCommerce Shop Page Compatibility */
.woocommerce ul.products .cakeclub-product-card {
    margin-bottom: 30px;
}

.woocommerce ul.products .cakeclub-product-card:hover {
    transform: translateY(-4px);
}

/* Override default WooCommerce product styling */
.woocommerce .product {
    border: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Product gallery navigation buttons */
.wc-block-product-gallery-large-image-next-previous__button {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.wc-block-product-gallery-large-image-next-previous__button:hover {
    opacity: 0.7;
}

/* Product price margin override */
.wp-block-woocommerce-product-price {
    margin-block-start: 0px !important;
}