Discount ribbon
Discount ribbon: a CSS card. Copy the rules, or the prompt that rebuilds it.
-30%
Studio headphones
$199$285
CSS
.card-023 {
width: 240px;
padding: 12px;
background: #1c1c1e;
border-radius: 18px;
font-family: system-ui,sans-serif;
color: #f5f5f7
}
.card-023__img {
position: relative;
height: 190px;
border-radius: 12px;
overflow: hidden;
background: radial-gradient(circle at 50% 60%,#3a3a3c,#0b0b0c)
}
.card-023__img span {
position: absolute;
top: 14px;
right: -28px;
width: 110px;
padding: 4px 0;
text-align: center;
transform: rotate(45deg);
background: #ff453a;
font-size: 11px;
font-weight: 800
}
.card-023 h3 {
margin: 14px 6px 4px;
font-size: 15px;
font-weight: 600
}
.card-023 p {
margin: 0 6px 12px;
font-size: 15px
}
.card-023 b {
font-size: 18px
}
.card-023 s {
margin-left: 8px;
color: #8e8e93;
font-size: 13px
}
.card-023 button {
width: 100%;
padding: 10px;
border: 0;
border-radius: 10px;
background: #f5f5f7;
color: #1c1c1e;
font-weight: 700;
font-size: 13px;
cursor: pointer;
transition: background .15s,transform .15s
}
.card-023 button:hover {
background: #fff;
transform: translateY(-1px)
}
.card-023 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
HTML
<article class="card-023">
<div class="card-023__img"><span>-30%</span></div>
<h3>Studio headphones</h3>
<p><b>$199</b><s>$285</s></p>
<button>Buy now</button>
</article>Prompt
Build a 240px dark product card on #1c1c1e with 18px radius and 12px inner padding. Image block 190px, 12px radius, radial gradient #3a3a3c to #0b0b0c, with a red #ff453a diagonal ribbon "-30%" rotated 45deg across the top-right corner. Below: 15px product name in #f5f5f7, 18px bold price and a struck-through old price in #8e8e93, then a full-width off-white (#f5f5f7) "Buy now" button with 10px radius that lifts 1px on hover.