/* Universal Product Grid Spacing Fix for All Pages */

/* Default Products Grid - Reduced Gap */
.products-grid {
    gap: 0.75rem !important;
}

/* Responsive Breakpoints with Reduced Gaps */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .products-grid {
        gap: 0.75rem !important;
    }
}

/* Medium Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .products-grid {
        gap: 0.75rem !important;
    }
}

/* Tablet (769px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
    .products-grid {
        gap: 0.5rem !important;
    }
}

/* Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .products-grid {
        gap: 0.5rem !important;
    }
}

/* Small Mobile (≤480px) */
@media (max-width: 480px) {
    .products-grid {
        gap: 0.5rem !important;
    }
}

/* Additional Grid Layouts */

/* 6 Column Grid (Homepage) */
.products-grid[style*="repeat(6"] {
    gap: 0.75rem !important;
}

/* 4 Column Grid (Products Page) */
.products-grid[style*="repeat(4"] {
    gap: 0.75rem !important;
}

/* 3 Column Grid (Tablet) */
.products-grid[style*="repeat(3"] {
    gap: 0.5rem !important;
}

/* 2 Column Grid (Mobile) */
.products-grid[style*="repeat(2"] {
    gap: 0.5rem !important;
}

/* Related Products Grid */
.related-products .products-grid,
.similar-products .products-grid,
.recommended-products .products-grid {
    gap: 0.5rem !important;
}

/* Category Page Grid */
.category-products .products-grid {
    gap: 0.75rem !important;
}

/* Search Results Grid */
.search-results .products-grid {
    gap: 0.75rem !important;
}

/* Wishlist Grid */
.wishlist-grid {
    gap: 0.75rem !important;
}

/* Cart Recommendations Grid */
.cart-recommendations .products-grid {
    gap: 0.5rem !important;
}

/* Product Cards Spacing Adjustments */
.product-card {
    margin-bottom: 0 !important;
}

/* Ensure consistent spacing across all product grids */
.container .products-grid,
.section .products-grid,
.main-content .products-grid {
    gap: 0.75rem !important;
}

/* Mobile specific adjustments */
@media (max-width: 768px) {
    .container .products-grid,
    .section .products-grid,
    .main-content .products-grid {
        gap: 0.5rem !important;
    }
}
