# Badge add to cart (C 020)

Category: Cards  
Tags: product, ecommerce, badge, price, light, hover-lift  
Page: https://designforai.dev/snippet/card-020

## Prompt

Make a 240px product card: white, 14px radius, shadow 0 1px 3px rgba(0,0,0,.08) that grows to 0 12px 28px rgba(0,0,0,.12) with a 3px lift on hover. Image area 200px with a 160deg stone gradient #e7e5e4 to #a8a29e and a black "NEW" badge (11px uppercase, 6px radius) at top-left. Body: 15px semibold product name, 16px bold price "$120" with a struck-through "$150" in #999, and a full-width outlined "Add to cart" button that fills black with white text on hover.

## HTML

```html
<article class="card-020">
  <div class="card-020__img"><span>New</span></div>
  <div class="card-020__body">
    <h3>Linen weekender bag</h3>
    <p class="card-020__price">$120 <s>$150</s></p>
    <button>Add to cart</button>
  </div>
</article>
```

## CSS

```css
.card-020 {
  width: 240px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  font-family: system-ui,sans-serif;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  transition: transform .2s,box-shadow .2s
}
.card-020:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0,0,0,.12)
}
.card-020__img {
  position: relative;
  height: 200px;
  background: linear-gradient(160deg,#e7e5e4,#a8a29e)
}
.card-020__img span {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #111;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase
}
.card-020__body {
  padding: 14px 16px 16px
}
.card-020 h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600
}
.card-020__price {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700
}
.card-020__price s {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 400;
  color: #999
}
.card-020 button {
  width: 100%;
  padding: 9px;
  border: 1px solid #111;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s,color .15s
}
.card-020 button:hover {
  background: #111;
  color: #fff
}
.card-020 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
```
