/**
 * Random Product Box Styles with integrated Tailwind-like utilities
 * This file contains all necessary styles without requiring the Tailwind CDN
 */

/* Reset and base styles */
.rpb-product-box-wrapper *,
.rpb-product-box-wrapper *::before,
.rpb-product-box-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Main wrapper */
.rpb-product-box-wrapper {
  max-width: 100%;
  margin: 2rem auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Product box container */
.rpb-product-box {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Product image container */
.rpb-product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: #f3f4f6;
}

/* Product image */
.rpb-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* No image placeholder */
.rpb-no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f3f4f6;
  color: #6b7280;
  font-size: 1rem;
  text-align: center;
}

/* Product details container */
.rpb-product-details {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Product title */
.rpb-product-title {
  margin: 0 0 0.5rem 0;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.25;
}

/* Rating container */
.rpb-product-rating {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

/* Star icons */
.rpb-star-filled,
.rpb-star-empty {
  width: 1.25rem;
  height: 1.25rem;
}

.rpb-star-filled {
  color: #f59e0b;
}

.rpb-star-empty {
  color: #d1d5db;
}

/* Featured text */
.rpb-featured-text {
  margin-bottom: 0.5rem;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.5;
}

.rpb-featured-text p {
  margin-bottom: 0.75rem;
}

.rpb-featured-text p:last-child {
  margin-bottom: 0;
}

/* Button container */
.rpb-button-container {
  margin-top: 0.5rem;
}

/* Buy button */
.rpb-buy-button {
  display: inline-block;
  background-color: #3b82f6;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  text-decoration: none !important;
  text-align: center;
  transition: background-color 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
  line-height: 1.5;
}

.rpb-buy-button:hover {
  background-color: #2563eb;
  color: #ffffff !important;
  transform: translateY(-1px);
  text-decoration: none !important;
}

.rpb-buy-button:active {
  transform: translateY(0);
}

/* No products message */
.rpb-no-products {
  padding: 2rem;
  background-color: #f3f4f6;
  text-align: center;
  border-radius: 0.375rem;
  color: #4b5563;
  font-size: 1rem;
}

/* Responsive layout for desktop */
@media (min-width: 768px) {
  .rpb-product-box {
    flex-direction: row;
    align-items: stretch;
  }
  
  .rpb-product-image {
    width: 40%;
    height: auto;
    min-height: 100%;
  }
  
  .rpb-product-details {
    width: 60%;
    padding: 2rem;
  }
}