Rating swatches
Rating swatches: a CSS card. Copy the rules, or the prompt that rebuilds it.
Trail runner 2
$139
CSS
.card-022 {
width: 250px;
background: #fff;
border: 1px solid #e5e7eb;
border-radius: 16px;
overflow: hidden;
font-family: system-ui,sans-serif;
color: #111827
}
.card-022__img {
height: 180px;
background: linear-gradient(135deg,#cbd5e1,#475569)
}
.card-022__body {
padding: 14px 16px 16px
}
.card-022__rating {
font-size: 12px;
color: #f59e0b
}
.card-022__rating span {
color: #9ca3af
}
.card-022 h3 {
margin: 4px 0 8px;
font-size: 15px
}
.card-022__swatches {
display: flex;
gap: 6px;
margin-bottom: 12px
}
.card-022__swatches i {
width: 16px;
height: 16px;
border-radius: 50%;
border: 2px solid #fff;
box-shadow: 0 0 0 1px #d1d5db;
cursor: pointer
}
.card-022__swatches i:hover {
box-shadow: 0 0 0 2px #111827
}
.card-022__row {
display: flex;
justify-content: space-between;
align-items: center
}
.card-022 strong {
font-size: 17px
}
.card-022 button {
padding: 7px 16px;
border: 0;
border-radius: 999px;
background: #111827;
color: #fff;
font-size: 13px;
font-weight: 600;
cursor: pointer
}
.card-022 button:hover {
background: #374151
}
.card-022 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
HTML
<article class="card-022">
<div class="card-022__img"></div>
<div class="card-022__body">
<div class="card-022__rating">★★★★☆ <span>(212)</span></div>
<h3>Trail runner 2</h3>
<div class="card-022__swatches"><i style="background:#1e293b"></i><i style="background:#f97316"></i><i style="background:#22c55e"></i></div>
<div class="card-022__row"><strong>$139</strong><button>Add</button></div>
</div>
</article>Prompt
Create a 250px product card: white, 1px #e5e7eb border, 16px radius. Image placeholder 180px with 135deg gradient #cbd5e1 to #475569. Body: a 12px star rating "★★★★☆" in #f59e0b with review count in #9ca3af, a 15px product name, three 16px circular color swatches (#1e293b, #f97316, #22c55e) ringed by a 1px #d1d5db shadow that becomes a 2px black ring on hover, then a row with a 17px bold price and a black pill "Add" button.