/* Product Grid Styles */
.mv-product-grid-container {
    width: 100%;
    position: relative;
}

/* Animation for new products */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.mv-product-card.new-item {
    animation: fadeIn 0.5s ease-out forwards;
}

.mv-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.mv-product-card {
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    background-color: #fff;
    overflow: hidden;
}

.mv-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mv-product-card-image {
    position: relative;
    overflow: hidden;
    height: 300px;
    width: 100%;
}

.mv-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.mv-product-card-image img.gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.mv-product-card:hover .mv-product-card-image img.featured-image {
    opacity: 0;
}

.mv-product-card:hover .mv-product-card-image img.gallery-image {
    opacity: 1;
}

.mv-product-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f44336;
    color: white;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 1;
    direction: rtl;
}

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

.mv-product-card-title {
    font-size: 16px;
    margin: 0 0 10px 0;
    text-align: center;
}

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

.mv-product-card-price {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.mv-product-card-price del {
    color: #999;
    margin-right: 5px;
    font-weight: normal;
}

.mv-product-card-price ins {
    text-decoration: none;
    color: #f44336;
}

.mv-product-card-rating {
    margin-top: auto;
    text-align: center;
}

.mv-product-card-rating .star-rating {
    margin: 0 auto;
}

.mv-pagination {
    margin-top: 30px;
    text-align: center;
}

.mv-pagination a,
.mv-pagination span {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 3px;
    border: 1px solid #ddd;
    text-decoration: none;
}

.mv-pagination .current {
    background-color: #f0f0f0;
}

.mv-load-more-btn {
    display: block;
    margin: 30px auto 0;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mv-load-more-btn:hover {
    background-color: #555;
}

.mv-infinite-scroll-loader {
    text-align: center;
    padding: 20px 0;
}

.loader-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #333;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* RTL Support */
html[dir="rtl"] .mv-product-card-badge {
    right: auto;
    left: 10px;
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .mv-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .mv-product-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}
