/* React Product Listing Block Styles - ALLDATA Style */

.products-hero {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
}

.react-product-listing {
  padding: 3rem 0;
  background: #fff;
}

.react-product-listing .container {
  max-width: 1400px;
}

.product-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 1.5rem 0;
  margin-bottom: 2rem;
}

.results-count {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
}

.products-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.products-grid.columns-2 {
  grid-template-columns: repeat(2, 1fr);
}

.products-grid.columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.products-grid.columns-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Product Card - ALLDATA Style */
.product-card-hover {
  transition: all 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
}

.product-card-hover:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15) !important;
  transform: translateY(-8px);
}

.product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

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

.product-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  background: #f5f5f5;
}

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

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

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.75rem 0;
  line-height: 1.4;
}

.product-description {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2196f3;
  margin: 0;
}

.product-actions {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 1rem;
}

.btn-add-cart,
.btn-view-details {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  display: inline-block;
}

.btn-add-cart {
  background: #2196f3;
  color: #fff;
}

.btn-add-cart:hover {
  background: #1976d2;
}

.btn-view-details {
  background: #fff;
  color: #2196f3;
  border: 1px solid #2196f3;
}

.btn-view-details:hover {
  background: #e3f2fd;
}

.react-product-listing-loading,
.react-product-listing-error {
  text-align: center;
  padding: 4rem 0;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2196f3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 992px) {
  .products-grid.columns-3,
  .products-grid.columns-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Enhanced Button Styles */
.btn-primary {
  background: #2196f3;
  border-color: #2196f3;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #1976d2;
  border-color: #1976d2;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-outline-secondary {
  border-color: #6c757d;
  color: #6c757d;
  transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
  background: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

/* Price Badge */
.badge.bg-primary {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%) !important;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.4);
}

/* Product Image Hover Effect */
.product-card-hover .card-img-top {
  transition: transform 0.4s ease-in-out;
}

.product-card-hover:hover .card-img-top {
  transform: scale(1.1);
}

/* Loading State */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.15em;
}

@media (max-width: 992px) {
  .products-hero .display-4 {
    font-size: 2rem;
  }

  .products-hero .lead {
    font-size: 1rem;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr !important;
  }

  .product-actions {
    flex-direction: column;
  }

  .products-hero {
    padding: 2rem 0 !important;
  }

  .products-hero .display-4 {
    font-size: 1.75rem;
  }
}
