﻿/* ============================================
   Product Card Text Visibility Fixes
   Ensures all text is always readable
   ============================================ */

/* Force visible text colors on all product cards */
.product-card *,
.product-card-modern *,
.small-product-card *,
.regular-product-card * {
  color: inherit;
}

/* Product titles - Always dark */
.product-card .product-title,
.product-card-modern .product-title,
.small-product-card .product-title,
.regular-product-card .product-title,
.product-info .product-title,
h3.product-title,
.product-card h3,
.product-card-modern h3 {
  color: #111827 !important;
  font-weight: 600 !important;
}

/* Product prices - Always red/visible */
.product-card .product-price,
.product-card-modern .product-price,
.small-product-card .product-price,
.regular-product-card .product-price,
.product-info .product-price,
.product-card .price,
.product-card-modern .price,
span.product-price {
  color: #dc2626 !important;
  font-weight: 700 !important;
}

/* Old prices - Always gray and visible */
.product-card .product-old-price,
.product-card .product-price-old,
.product-card-modern .product-old-price,
.product-card-modern .product-price-old,
.small-product-card .product-old-price,
.regular-product-card .product-old-price,
div.product-old-price,
[class*="product-old-price"] {
  color: #374151 !important;
  text-decoration: line-through !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Current/Sale prices - Always red and visible */
.product-card .product-price,
.product-card-modern .product-price,
.small-product-card .product-price,
.regular-product-card .product-price,
.product-info .product-price,
.product-card .price,
.product-card-modern .price,
div.product-price,
[class*="product-price"]:not([class*="old"]):not([class*="wrapper"]),
span.product-price {
  color: #dc2626 !important;
  font-weight: 700 !important;
  opacity: 1 !important;
  visibility: visible !important;
  -webkit-text-fill-color: #dc2626 !important;
  background: transparent !important;
  text-shadow: none !important;
}

/* Categories - Always visible */
.product-card .product-category,
.product-card-modern .product-category,
.regular-product-card .product-category {
  color: #dc2626 !important;
  font-weight: 600 !important;
}

/* Ratings - Always visible */
.product-card .product-rating,
.product-card-modern .product-rating,
.small-product-card .product-rating,
.regular-product-card .product-rating {
  color: #6b7280 !important;
}

.product-card .product-rating .stars,
.product-card-modern .product-rating .stars,
.small-product-card .product-rating .stars,
.regular-product-card .product-rating .stars {
  color: #fbbf24 !important;
}

.product-card .product-rating .count,
.product-card-modern .product-rating .count,
.product-card .product-rating-count,
.product-card-modern .product-rating-count,
.small-product-card .product-rating .count,
.regular-product-card .product-rating .count {
  color: #9ca3af !important;
}

/* Shipping info */
.product-card .shipping-info,
.product-card-modern .shipping-info,
.regular-product-card .shipping-info {
  color: #10b981 !important;
}

/* Stock status colors */
.product-card .stock-status,
.regular-product-card .stock-status {
  font-weight: 600 !important;
}

.stock-status.in-stock {
  color: #10b981 !important;
  background: #d1fae5 !important;
}

.stock-status.low-stock {
  color: #f59e0b !important;
  background: #fef3c7 !important;
}

.stock-status.out-of-stock {
  color: #ef4444 !important;
  background: #fee2e2 !important;
}

/* Discount badges */
.product-card .product-discount,
.product-card-modern .product-discount,
.small-product-card .product-discount,
.regular-product-card .product-discount {
  color: #92400e !important;
  background: #fef3c7 !important;
  font-weight: 600 !important;
}

/* Product info section background */
.product-card .product-info,
.product-card-modern .product-info,
.product-card .product-content,
.product-card-modern .product-content,
.small-product-card .product-content,
.regular-product-card .product-content {
  background: white !important;
}

/* Ensure all product card backgrounds are white */
.product-card,
.product-card-modern,
.small-product-card,
.regular-product-card {
  background: white !important;
}

/* Buttons in product cards */
.product-card button,
.product-card-modern button,
.regular-product-card button,
.product-card .btn,
.product-card-modern .btn,
.regular-product-card .btn {
  color: white !important;
}

/* Link colors in product cards */
.product-card a:not(.btn),
.product-card-modern a:not(.btn) {
  color: inherit;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
  /* Ensure text is visible on small cards */
  .small-product-card .product-title {
    color: #111827 !important;
  }

  .small-product-card .product-price {
    color: #dc2626 !important;
  }

  /* Ensure regular cards are readable */
  .regular-product-card .product-title {
    color: #111827 !important;
  }

  .regular-product-card .product-price {
    color: #dc2626 !important;
  }

  /* Grid product cards */
  .product-card .product-title,
  .product-card h3 {
    color: #111827 !important;
  }

  .product-card .product-price,
  .product-card .price {
    color: #dc2626 !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .product-title {
    color: #000000 !important;
    font-weight: 700 !important;
  }

  .product-price {
    color: #dc2626 !important;
    font-weight: 800 !important;
  }
}
