.elemerce-products-grid {
    display: grid;
    gap: 20px;
    width: 100%;
    justify-content: center !important;

}

.elemerce-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    height: 100%;
    /* Allow Elementor controls to set grid alignment and justification */
    justify-items: stretch;
    align-items: stretch;
    justify-content: stretch;
    align-content: stretch;
}

.elemerce-product-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Clickable card styles */
.elemerce-product-card.card-clickable {
    cursor: pointer;
    height: 100% !important;
}

.elemerce-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

.elemerce-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.elemerce-card-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Adjust product actions positioning for clickable cards */
.elemerce-product-card.card-clickable .elemerce-product-actions {
    margin-top: 10px;
}

.elemerce-product-actions {
    padding: 15px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.elemerce-product-card.card-clickable .elemerce-product-actions .add-to-cart-button {
    position: relative;
    z-index: 10;
}

.elemerce-product-image {
    position: relative;
    overflow: hidden;
}

/* Image overlay pseudo-element */
.elemerce-product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.elemerce-product-card:hover .elemerce-product-image::before {
    opacity: 1;
}

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

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

.elemerce-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4444;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    transition: all 0.3s ease;
}

/* Badge position variants */
.elemerce-product-image .elemerce-sale-badge {
    position: absolute;
}

/* Additional button styles */
.add-to-cart-button {
    width: 100%;
    padding: 12px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: auto;
}

.elemerce-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.elemerce-product-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    flex-grow: 1;
}

.elemerce-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.elemerce-product-title a:hover {
    color: #007cba;
}

.elemerce-product-rating {
    margin-bottom: 10px;
}

.elemerce-product-rating .star-rating {
    font-size: 14px;
}

.elemerce-product-price {
    margin-bottom: 15px;
    font-size: 20px;
    font-weight: 700;
    color: #222;
    text-align: left;
}
.elemerce-product-price .elemerce-from-label {
    font-size: 18px;
    font-weight: 500;
    color: #222;
    margin-right: 6px;
    letter-spacing: 0.5px;
}
.elemerce-product-price .elemerce-currency-symbol {
    font-size: 16px;
    font-weight: 500;
    color: #222;
    margin-right: 2px;
}
.elemerce-product-price .amount {
    font-size: 20px;
    font-weight: 700;
    color: #ff4444;
    margin-right: 0;
    letter-spacing: 0.5px;
    background: transparent !important;
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: auto;
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    flex: 1 1 auto;
}

.elemerce-product-price del {
    color: #bbb;
    margin-right: 8px;
    font-weight: 400;
    font-size: 16px;
    margin-left: 0;
}

.elemerce-product-price ins {
    text-decoration: none;
    color: #ff4444;
    font-size: 20px;
    font-weight: 700;
    margin-right: 0;
}

/* Price range dash styling */
.elemerce-product-price .woocommerce-price-suffix,
.elemerce-product-price .woocommerce-price-range {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0 8px;
    letter-spacing: 2px;
}
.elemerce-product-price .amount {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin: 0 2px;
    white-space: nowrap;
    min-width: 0;
}

.elemerce-product-description {
    margin: 12px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
}

.elemerce-product-description p {
    margin: 0;
    padding: 0;
}

/* Remove duplicate button styles and keep only the enhanced version above */

.add-to-cart-button:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.add-to-cart-button:active {
    transform: translateY(0);
}

.add-to-cart-button[data-product_type="variable"],
.add-to-cart-button[data-product_type="grouped"] {
    background: #28a745;
}

.add-to-cart-button[data-product_type="variable"]:hover,
.add-to-cart-button[data-product_type="grouped"]:hover {
    background: #1e7e34;
}

/* Responsive Design */
/* Large Desktop */
@media (min-width: 1200px) {
    .elemerce-products-grid {
        gap: 25px;
    }
}

/* Desktop */
@media (max-width: 1199px) and (min-width: 992px) {
    .elemerce-products-grid {
        gap: 20px;
    }
}

/* Tablet Landscape */
@media (max-width: 991px) and (min-width: 769px) {
    .elemerce-products-grid {
        gap: 18px;
    }
    
    .elemerce-product-content {
        padding: 12px;
    }
    
    .elemerce-product-title {
        font-size: 20px;
        font-weight: 700;
        color: #222;
        margin: 0 8px;
        letter-spacing: 2px;
        min-width: 0;
        white-space: nowrap;
    }
    
    .elemerce-product-image img {
        height: 220px;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) and (min-width: 481px) {
    .elemerce-products-grid {
        gap: 15px;
    }
    
    .elemerce-product-content {
        padding: 12px;
    }
    
    .elemerce-product-title {
        font-size: 14px;
    }
    
    .elemerce-product-price {
        font-size: 16px;
        margin-bottom: 12px;
    }
    
    .elemerce-product-image img {
        height: 200px;
    }
    
    .add-to-cart-button {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .elemerce-products-grid {
        gap: 10px;
    }
    
    .elemerce-product-content {
        padding: 10px;
    }
    
    .elemerce-product-title {
        font-size: 13px;
    }
    
    .elemerce-product-price {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .elemerce-product-image img {
        height: 180px;
    }
    
    .add-to-cart-button {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .elemerce-sale-badge {
        font-size: 10px;
        padding: 3px 8px;
        top: 8px;
        left: 8px;
    }
}

/* Extra Small Mobile */
@media (max-width: 360px) {
    .elemerce-products-grid {
        gap: 8px;
    }
    
    .elemerce-product-content {
        padding: 8px;
    }
    
    .elemerce-product-image img {
        height: 160px;
    }
}

/* Auto-fit responsive grid for ultra-wide screens */
@media (min-width: 1600px) {
    .elemerce-products-grid[data-columns="auto"] {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}
