/**
 * WooCommerce Product Card Styles
 * 
 * Add this CSS to your theme's style.css or enqueue it separately
 * Make sure to enqueue the Cairo font in your theme's functions.php
 */

:root {
  --primary-blue: #004d8a;
  --primary-blue-hover: #003b6a;
  --accent-blue: #005a9e;
  --bright-blue: #009aff;
  --bg-light-blue: #eef8ff;
  --bg-lighter-blue: #f0f9ff;
  --price-red: #d84e36;
  --text-dark: #111827;
  --text-gray: #6b7280;
  --border-color: #e5e7eb;
  --font-cairo: 'Cairo', sans-serif;
}

/* Main Product Wrapper */
.products-entry.content-product4 {
  width: 100%;
  max-width: 380px;
  background-color: white;
  border-radius: 24px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  font-family: var(--font-cairo);
  direction: rtl; /* Right-to-left for Arabic */
  margin-bottom: 30px;
}

/* Product Thumbnail Section */
.products-entry.content-product4 .products-thumb {
  position: relative;
  margin-bottom: 24px;
  display: flex;
  justify-content: center;
}

.products-entry.content-product4 .image-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.products-entry.content-product4 .products-thumb img {
  height: 192px;
  width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
  margin: 0 auto;
}

/* Badges */
.badge-express {
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--accent-blue);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-bottom-right-radius: 8px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-seller {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--bright-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-bottom-left-radius: 8px;
  border-top-right-radius: 8px;
  z-index: 10;
}

/* Product Content Section */
.products-entry.content-product4 .card-content {
  padding: 16px;
  padding-top: 32px;
}

/* Top Actions Row */
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.icon-group {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background-color: #f9fafb;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
  padding: 0;
}

.icon-btn:hover {
  background-color: #f3f4f6;
}

.rating-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: #fffbeb;
  padding: 2px 8px;
  border-radius: 6px;
}

.rating-num {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.star-icon {
  color: #facc15;
  fill: #facc15;
  width: 12px;
  height: 12px;
}

/* Product Title */
.products-entry.content-product4 .product-title {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.products-entry.content-product4 .product-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.products-entry.content-product4 .product-title a:hover {
  color: var(--primary-blue);
}

/* Price Section */
.price-cart {
  margin-top: auto;
}

.price-box {
  background-color: #e6f4fd;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
}

.price-container {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.current-price {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--price-red);
  font-weight: 700;
  font-size: 18px;
}

.currency {
  font-size: 12px;
}

.old-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.strike {
  text-decoration: line-through;
}

.savings-badge {
  background-color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid #f3f4f6;
}

/* Hide default WooCommerce price display if using custom */
.price-cart .price {
  display: none;
}

.price-cart .woocommerce-Price-amount {
  display: none;
}

/* Installment Box */
.installment-box {
  background-color: #eef8ff;
  border: 1px solid #eff6ff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  text-align: center;
}

.installment-text {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: #374151;
  margin-bottom: 8px;
  display: block;
}

.payment-img {
  height: 24px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
  opacity: 0.9;
  mix-blend-mode: multiply;
}


/* Card Footer */
.card-footer {
  padding: 16px;
  padding-top: 0;
  display: flex;
  gap: 12px;
}

.cart-btn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  border: 2px solid #f3f4f6;
  background-color: white;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  text-decoration: none;
}

.cart-btn:hover {
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

.buy-btn {
  flex-grow: 1;
  height: 48px;
  border-radius: 12px;
  background-color: var(--primary-blue);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 15px -3px rgba(30, 58, 138, 0.15);
  transition: background-color 0.2s;
  font-family: var(--font-cairo);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.buy-btn:hover {
  background-color: var(--primary-blue-hover);
  color: white;
}

/* Utility for icons */
.icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.icon.star-icon {
  fill: #facc15;
  stroke: none;
}

/* WooCommerce Rating Override */
.products-entry.content-product4 .star-rating {
  display: none; /* Hide default rating, use custom */
}

/* Responsive Design */
@media (max-width: 768px) {
  .products-entry.content-product4 {
    max-width: 100%;
  }
  
  .products-entry.content-product4 .products-thumb img {
    height: 160px;
  }
}

/* Sale Flash Badge Styling */
.products-entry.content-product4 .onsale {
  position: absolute;
  top: 0;
  right: 0;
  background-color: var(--bright-blue);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-bottom-left-radius: 8px;
  border-top-right-radius: 8px;
  z-index: 10;
  border: none;
  min-height: auto;
  line-height: 1.2;
}

/* Hide default WooCommerce rating display since we're using custom */
.products-entry.content-product4 .star-rating {
  display: none;
}

/* Ensure product image is properly contained */
.products-entry.content-product4 .products-thumb img,
.products-entry.content-product4 .image-container img {
  height: 192px;
  width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
  margin: 0 auto;
}

