{
  "id": "sale-product-card",
  "name": "Sale Product Card",
  "category": "cards",
  "tags": [
    "sale",
    "discount",
    "badge",
    "strikethrough price",
    "low stock",
    "ecommerce"
  ],
  "description": "A product card for discounts, with a percent-off badge, crossed-out old price and a low-stock meter.",
  "url": "https://copy-css.com/snippets/sale-product-card",
  "markdown": "https://copy-css.com/snippets/sale-product-card.md",
  "html": "<article class=\"sale-card\">\n  <div class=\"sale-card-media\">\n    <img src=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 25'%3E%3Crect width='40' height='25' fill='%23ffe4e6'/%3E%3Cpath d='M13 16v-3a7 7 0 0 1 14 0v3' fill='none' stroke='%23be123c' stroke-width='2.2'/%3E%3Crect x='11' y='14' width='5' height='7' rx='2' fill='%23e11d48'/%3E%3Crect x='24' y='14' width='5' height='7' rx='2' fill='%23e11d48'/%3E%3C/svg%3E\" alt=\"Red wireless headphones\" width=\"200\" height=\"125\">\n    <span class=\"sale-card-badge\">−30%</span>\n  </div>\n  <h3><a href=\"#\">Wireless Headphones</a></h3>\n  <p class=\"sale-card-price\"><ins>$139</ins> <del>$199</del></p>\n  <p class=\"sale-card-stock\" style=\"--left: 15%\">Only 3 left</p>\n</article>",
  "css": ".sale-card {\n  width: 200px;\n  padding: 10px 10px 14px;\n  border-radius: 16px;\n  background: #fff;\n  color: #18181b;\n  font-family: system-ui, sans-serif;\n}\n\n.sale-card-media {\n  position: relative;\n  margin-bottom: 10px;\n}\n\n.sale-card-media img {\n  display: block;\n  width: 100%;\n  height: auto;\n  border-radius: 10px;\n}\n\n.sale-card-badge {\n  position: absolute;\n  top: 8px;\n  left: 8px;\n  padding: 3px 8px;\n  border-radius: 6px;\n  background: #e11d48;\n  color: #fff;\n  font-size: 12px;\n  font-weight: 800;\n}\n\n.sale-card h3 {\n  margin: 0 4px;\n  font-size: 14px;\n  font-weight: 600;\n}\n\n.sale-card h3 a {\n  color: inherit;\n  text-decoration: none;\n}\n\n.sale-card h3 a:focus-visible {\n  outline: 2px solid #e11d48;\n  outline-offset: 2px;\n}\n\n.sale-card-price {\n  margin: 4px 4px 8px;\n}\n\n.sale-card-price ins {\n  color: #e11d48;\n  font-size: 18px;\n  font-weight: 800;\n  text-decoration: none;\n}\n\n.sale-card-price del {\n  color: #a1a1aa;\n  font-size: 13px;\n}\n\n.sale-card-stock {\n  margin: 0 4px;\n  color: #be123c;\n  font-size: 12px;\n  font-weight: 600;\n}\n\n.sale-card-stock::after {\n  content: \"\";\n  display: block;\n  height: 5px;\n  margin-top: 5px;\n  border-radius: 999px;\n  background: linear-gradient(90deg, #e11d48 var(--left, 20%), #ffe4e6 0);\n}",
  "features": [
    "linear gradients",
    "keyboard focus styles",
    "custom properties"
  ],
  "customProperties": []
}
