/* WBAE Frontend Styles */
.wbae-product-recommendations {
  margin: 2rem 0;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
}

.wbae-recommendations-title {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.wbae-products-grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.wbae-products-grid.wbae-col-1 {
  grid-template-columns: 1fr;
}
.wbae-products-grid.wbae-col-2 {
  grid-template-columns: repeat(2, 1fr);
}
.wbae-products-grid.wbae-col-3 {
  grid-template-columns: repeat(3, 1fr);
}
.wbae-products-grid.wbae-col-4 {
  grid-template-columns: repeat(4, 1fr);
}
.wbae-products-grid.wbae-col-5 {
  grid-template-columns: repeat(5, 1fr);
}
.wbae-products-grid.wbae-col-6 {
  grid-template-columns: repeat(6, 1fr);
}

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

@media (max-width: 480px) {
  .wbae-products-grid {
    grid-template-columns: 1fr;
  }
}

.wbae-product-item {
  background: white;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wbae-product-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.wbae-product-image {
  margin-bottom: 1rem;
  text-align: center;
}

.wbae-product-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.wbae-product-details {
  text-align: center;
}

.wbae-product-title {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
}

.wbae-product-title a {
  color: #333;
  text-decoration: none;
}

.wbae-product-title a:hover {
  color: #0073aa;
}

.wbae-product-price {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #0073aa;
}

.wbae-product-actions {
  margin-top: 1rem;
}

.wbae-product-actions .button,
.wbae-product-actions .add_to_cart_button {
  width: 100%;
  padding: 0.5rem 1rem;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.wbae-product-actions .button:hover,
.wbae-product-actions .add_to_cart_button:hover {
  background: #005a87;
}

/* Cart Recommendations */
.wbae-cart-recommendations {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.wbae-cart-recommendations h4 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.wbae-cart-recommendation-item {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #f9f9f9;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.wbae-cart-recommendation-item:hover {
  background: #f0f0f0;
}

.wbae-cart-recommendation-item a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #333;
  width: 100%;
}

.wbae-cart-recommendation-item img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 0.75rem;
}

.wbae-cart-recommendation-item .product-title {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 500;
  margin-right: 0.5rem;
}

.wbae-cart-recommendation-item .product-price {
  font-size: 0.9rem;
  font-weight: 600;
  color: #0073aa;
}

/* Loading states */
.wbae-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.wbae-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: wbae-spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 600px) {
  .wbae-product-recommendations {
    margin: 1rem 0;
    padding: 0.75rem;
  }

  .wbae-recommendations-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .wbae-products-grid {
    gap: 1rem;
  }

  .wbae-product-item {
    padding: 0.75rem;
  }
}
