Product Card Design: 16 Examples and What to Put on One

Baymard Institute's 2023 benchmark found that 50% of ecommerce sites fail to show adequate list item attributes, and some test participants left the site because of it.

Product card design decides which fields a card shows, in what order and in which states. Below are 16 product card examples to try and copy, then a guide to fields, prices, states and accessibility.

By Bogdan Sandu · Updated October 28, 2026

Price, rating, stock and delivery

The fields a shopper reads before deciding to open a product. Every card uses the stretched link pattern: the product name is the only link, its ::after covers the card, and any button sits above it instead of inside it.

Sale card with was and now prices

  • del / ins
  • visually hidden text
  • stretched link

The current price comes first and heaviest, the original price is struck through in a lighter weight. Many screen readers do not announce del and ins, so hidden Was and Now words carry the meaning, and the badge states the discount in words as well as the percentage.

View code
.pc-sale {
  position: relative;
  width: min(290px, 100%);
  overflow: hidden;
  border: 1px solid #eadfd6;
  border-radius: 18px;
  background: #fffaf6;
  color: #2b2522;
  transition: box-shadow .25s ease;
}
.pc-sale:hover {
  box-shadow: 0 18px 40px rgba(76, 42, 24, .14);
}
.pc-sale__media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f4e9e0;
}
.pc-sale__art {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-sale__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: #9f2d14;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.pc-sale__body {
  padding: 16px 18px 18px;
}
.pc-sale__title {
  margin: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: normal;
  color: #2b2522;
}
.pc-sale__link {
  color: inherit;
  text-decoration: none;
}
.pc-sale__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
}
.pc-sale:hover .pc-sale__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-sale__link:focus-visible {
  outline: none;
}
.pc-sale__link:focus-visible::after {
  outline: 3px solid #9f2d14;
  outline-offset: -3px;
}
.pc-sale__brand {
  margin: 4px 0 0;
  color: #6b5d55;
  font-size: 14px;
}
.pc-sale__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 12px 0 0;
}
.pc-sale__now {
  color: #9f2d14;
  font-size: 22px;
  font-weight: 800;
  text-decoration: none;
}
.pc-sale__was {
  color: #6b5d55;
  font-size: 15px;
  text-decoration-thickness: 1.5px;
}
.pc-sale__ends {
  margin: 6px 0 0;
  color: #6b5d55;
  font-size: 13px;
}
.pc-sale__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

Rating average with review count

  • role="img"
  • custom property fill
  • numeric rating

The stars are one element with role="img" and a label, filled to 4.6 by a custom property on a clipped overlay. The number sits beside them in text, because pale stars alone fail contrast and do not say how many people rated the product.

View code
.pc-rt {
  position: relative;
  width: min(280px, 100%);
  border-radius: 20px;
  background: #fff;
  color: #1f2a37;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  transition: box-shadow .25s ease;
}
.pc-rt:hover {
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 18px 40px rgba(15, 23, 42, .14);
}
.pc-rt__media {
  aspect-ratio: 1;
  margin: 10px 10px 0;
  border-radius: 14px;
  background: #eef2fb;
}
.pc-rt__art {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-rt__body {
  padding: 14px 18px 18px;
}
.pc-rt__title {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1f2a37;
}
.pc-rt__link {
  color: inherit;
  text-decoration: none;
}
.pc-rt__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
}
.pc-rt:hover .pc-rt__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-rt__link:focus-visible {
  outline: none;
}
.pc-rt__link:focus-visible::after {
  outline: 3px solid #3b5bdb;
  outline-offset: 3px;
}
.pc-rt__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 14px;
}
.pc-rt__stars {
  --pc-rt-value: 4.6;
  position: relative;
  display: inline-block;
  color: #cbd2dc;
  font-size: 16px;
  line-height: 1;
  white-space: nowrap;
}
.pc-rt__stars::before {
  content: "\2605\2605\2605\2605\2605";
}
.pc-rt__stars::after {
  content: "\2605\2605\2605\2605\2605";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--pc-rt-value) / 5 * 100%);
  overflow: hidden;
  color: #b45309;
}
.pc-rt__score {
  font-weight: 700;
}
.pc-rt__count {
  color: #556172;
}
.pc-rt__price {
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 800;
}
.pc-rt__meta {
  margin: 4px 0 0;
  color: #556172;
  font-size: 13px;
}
.pc-rt__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

Low-stock and sold-out badges

  • aria-labelledby
  • disabled button
  • auto-fit grid

The sold-out card stays in the grid with a disabled button, and its link takes its name from the title and the badge through aria-labelledby, so the status is announced with the product. The low-stock badge pairs an icon with words, never color alone.

View code
.pc-st {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 14px;
  width: min(460px, 100%);
}
.pc-st__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 10px 14px;
  border-radius: 16px;
  background: #fff;
  color: #1d2a20;
  box-shadow: 0 6px 20px rgba(29, 42, 32, .08);
}
.pc-st__media {
  position: relative;
  aspect-ratio: 1;
  margin-bottom: 12px;
  border-radius: 12px;
  background: #eef1ea;
}
.pc-st__art {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-st__card--out .pc-st__art {
  opacity: .45;
}
.pc-st__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
}
.pc-st__badge--low {
  background: #fff3d6;
  color: #7a4a00;
}
.pc-st__badge--out {
  background: #1d2a20;
  color: #fff;
}
.pc-st__title {
  margin: 0 4px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1d2a20;
}
.pc-st__link {
  color: inherit;
  text-decoration: none;
}
.pc-st__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.pc-st__card:hover .pc-st__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-st__link:focus-visible {
  outline: none;
}
.pc-st__link:focus-visible::after {
  outline: 3px solid #2f6b3a;
  outline-offset: 3px;
}
.pc-st__price {
  margin: 4px 4px 12px;
  font-size: 17px;
  font-weight: 800;
}
.pc-st__btn {
  position: relative;
  z-index: 1;
  min-height: 44px;
  margin-top: auto;
  border: 0;
  border-radius: 10px;
  background: #2f6b3a;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease;
}
.pc-st__btn:hover {
  background: #24552d;
}
.pc-st__btn:focus-visible {
  outline: 3px solid #1d2a20;
  outline-offset: 2px;
}
.pc-st__btn:disabled {
  background: #e3e7e1;
  color: #5d6a60;
  cursor: not-allowed;
}

Free shipping and a delivery date

  • Intl.DateTimeFormat
  • <time datetime>
  • progressive text

A concrete date reads faster than a shipping speed. The script skips weekends, writes the date with Intl.DateTimeFormat and fills the datetime attribute, while the HTML ships a plain range so the line still makes sense if the script never runs.

View code
.pc-dl {
  position: relative;
  display: grid;
  width: min(300px, 100%);
  overflow: hidden;
  border-radius: 6px;
  background: #fff;
  color: #1c2b22;
  outline: 1px solid #e2e6df;
  transition: box-shadow .25s ease;
}
.pc-dl:hover {
  box-shadow: 0 16px 36px rgba(28, 43, 34, .14);
}
.pc-dl__media {
  aspect-ratio: 6 / 5;
  background: #f1efe7;
}
.pc-dl__art {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-dl__body {
  padding: 16px 18px 18px;
}
.pc-dl__title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: normal;
  color: #1c2b22;
}
.pc-dl__link {
  color: inherit;
  text-decoration: none;
}
.pc-dl__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pc-dl:hover .pc-dl__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-dl__link:focus-visible {
  outline: none;
}
.pc-dl__link:focus-visible::after {
  outline: 3px solid #2f6a3f;
  outline-offset: -3px;
}
.pc-dl__size {
  margin: 4px 0 0;
  color: #5b665e;
  font-size: 14px;
}
.pc-dl__price {
  margin: 10px 0 0;
  font-size: 20px;
  font-weight: 800;
}
.pc-dl__lines {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed #d5dbd2;
  list-style: none;
}
.pc-dl__line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #3d4a41;
  font-size: 14px;
}
.pc-dl__line svg {
  flex: none;
  color: #5b665e;
}
.pc-dl__line--free {
  color: #1f6b38;
  font-weight: 700;
}
.pc-dl__line--free svg {
  color: #1f6b38;
}
.pc-dl__date {
  font-weight: 700;
  color: #1c2b22;
}

Electronics card with spec chips

  • list of chips
  • flex-wrap
  • line-clamp

For spec-driven products the deciding attributes belong on the card. The chips are a real list in a fixed order, so every laptop in the grid shows screen, memory, storage and weight in the same place, and the title is clamped to two lines so it never pushes the price down.

View code
.pc-sp {
  position: relative;
  width: min(300px, 100%);
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  transition: border-color .2s ease, box-shadow .25s ease;
}
.pc-sp:hover {
  border-color: #94a3b8;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}
.pc-sp__media {
  aspect-ratio: 3 / 2;
  border-bottom: 1px solid #e5e9f0;
  border-radius: 14px 14px 0 0;
  background: #f5f7fa;
}
.pc-sp__art {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-sp__body {
  padding: 14px 16px 16px;
}
.pc-sp__title {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #0f172a;
}
.pc-sp__link {
  color: inherit;
  text-decoration: none;
}
.pc-sp__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.pc-sp:hover .pc-sp__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-sp__link:focus-visible {
  outline: none;
}
.pc-sp__link:focus-visible::after {
  outline: 3px solid #0f766e;
  outline-offset: 3px;
}
.pc-sp__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.pc-sp__chips li {
  margin: 0;
  padding: 4px 8px;
  border-radius: 6px;
  background: #eef2f6;
  color: #334155;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
}
.pc-sp__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}
.pc-sp__price {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.pc-sp__stock {
  margin: 0;
  color: #0f6b4f;
  font-size: 13px;
  font-weight: 600;
}

Card actions: add, save, compare

Second controls that save a trip to the product page. Each one is a real button or checkbox next to the link, with its state exposed through aria-pressed, a status region or the checked state.

Quick add with loading and added states

  • data-state
  • role="status"
  • aria-disabled

One button walks through three states without changing size: a spinner while the request would run, a check once it lands, then back to default. aria-disabled blocks double adds without dropping keyboard focus, and the status region announces the result.

View code
.pc-qa {
  position: relative;
  width: min(300px, 100%);
  padding: 12px;
  border-radius: 4px;
  background: #fff;
  color: #14213d;
  box-shadow: 0 10px 30px rgba(20, 33, 61, .1);
}
.pc-qa__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 10px solid #f3f1ec;
}
.pc-qa__body {
  padding: 14px 4px 2px;
}
.pc-qa__title {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: normal;
  color: #14213d;
}
.pc-qa__link {
  color: inherit;
  text-decoration: none;
}
.pc-qa__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pc-qa:hover .pc-qa__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-qa__link:focus-visible {
  outline: none;
}
.pc-qa__link:focus-visible::after {
  outline: 3px solid #14213d;
  outline-offset: 3px;
}
.pc-qa__meta {
  margin: 4px 0 0;
  color: #5a6478;
  font-size: 14px;
}
.pc-qa__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.pc-qa__price {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}
.pc-qa__btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 138px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: #14213d;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease;
}
.pc-qa__btn:hover {
  background: #23345c;
}
.pc-qa__btn:focus-visible {
  outline: 3px solid #e07a1f;
  outline-offset: 2px;
}
.pc-qa__btn[data-state="loading"] {
  cursor: progress;
  background: #3b4a6b;
}
.pc-qa__btn[data-state="added"] {
  background: #1d6b45;
}
.pc-qa__spin,
.pc-qa__check {
  display: none;
}
.pc-qa__spin {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
}
.pc-qa__btn[data-state="loading"] .pc-qa__spin,
.pc-qa__btn[data-state="added"] .pc-qa__check {
  display: block;
}
.pc-qa__status {
  min-height: 1.4em;
  margin: 8px 0 0;
  color: #1d6b45;
  font-size: 13px;
  line-height: 1.4;
}
@media (prefers-reduced-motion: no-preference) {
  .pc-qa__btn[data-state="loading"] .pc-qa__spin {
    animation: pc-qa-spin .7s linear infinite;
  }
}
@keyframes pc-qa-spin {
  to {
    transform: rotate(360deg);
  }
}

Wishlist heart toggle

  • aria-pressed
  • SVG fill
  • scale pop

The heart is a toggle button with aria-pressed, laid over the photo but outside the link. Its label names the product, the filled shape and a short status message confirm the save, and the small pop only plays when the visitor allows motion.

View code
.pc-wl {
  position: relative;
  width: min(290px, 100%);
  color: #1b1f24;
}
.pc-wl__media {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #d9d4cc;
}
.pc-wl__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}
.pc-wl__heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #1b1f24;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
  cursor: pointer;
}
.pc-wl__heart svg {
  fill: none;
  stroke: currentColor;
}
.pc-wl__heart[aria-pressed="true"] {
  color: #c8102e;
}
.pc-wl__heart[aria-pressed="true"] svg {
  fill: currentColor;
}
.pc-wl__heart:focus-visible {
  outline: 3px solid #1b1f24;
  outline-offset: 2px;
}
.pc-wl__body {
  padding: 12px 4px 0;
}
.pc-wl__brand {
  margin: 0;
  color: #59616b;
  font-size: 13px;
  font-weight: 600;
}
.pc-wl__title {
  margin: 2px 0 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1b1f24;
}
.pc-wl__link {
  color: inherit;
  text-decoration: none;
}
.pc-wl__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
}
.pc-wl:hover .pc-wl__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-wl__link:focus-visible {
  outline: none;
}
.pc-wl__link:focus-visible::after {
  outline: 3px solid #1b1f24;
  outline-offset: 4px;
}
.pc-wl__price {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 800;
}
.pc-wl__status {
  min-height: 1.4em;
  margin: 4px 0 0;
  color: #59616b;
  font-size: 13px;
}
@media (prefers-reduced-motion: no-preference) {
  .pc-wl__img {
    transition: transform .5s ease;
  }
  .pc-wl:hover .pc-wl__img {
    transform: scale(1.03);
  }
  .pc-wl__heart[aria-pressed="true"] svg {
    animation: pc-wl-pop .35s ease;
  }
}
@keyframes pc-wl-pop {
  50% {
    transform: scale(1.3);
  }
}

Compare checkbox with a selection tray

  • checkbox
  • :has(:checked)
  • aria-disabled

Select 2 or 3 machines to compare

Each card gets a labelled checkbox above the stretched link, and the checked card picks up an outline through :has(). The tray counts the selection and keeps the Compare button aria-disabled until two products are picked, explaining why in plain text.

View code
.pc-cp {
  width: min(560px, 100%);
  color: #1f2328;
}
.pc-cp__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px;
}
.pc-cp__card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px 12px 12px;
  border: 1px solid #dde1e6;
  border-radius: 14px;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pc-cp__card:has(input:checked) {
  border-color: #8a5a00;
  box-shadow: 0 0 0 2px #8a5a00;
}
.pc-cp__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 13;
  border-radius: 10px;
  background: #f4f1ec;
}
.pc-cp__title {
  margin: 10px 0 0;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1f2328;
}
.pc-cp__link {
  color: inherit;
  text-decoration: none;
}
.pc-cp__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.pc-cp__card:hover .pc-cp__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-cp__link:focus-visible {
  outline: none;
}
.pc-cp__link:focus-visible::after {
  outline: 3px solid #1f2328;
  outline-offset: 3px;
}
.pc-cp__price {
  margin: 4px 0 10px;
  font-size: 16px;
  font-weight: 800;
}
.pc-cp__check {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  min-height: 32px;
  margin-top: auto;
  color: #3d434a;
  font-size: 14px;
  cursor: pointer;
}
.pc-cp__check input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #8a5a00;
  cursor: pointer;
}
.pc-cp__check input:focus-visible {
  outline: 3px solid #1f2328;
  outline-offset: 2px;
}
.pc-cp__tray {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-top: 14px;
  padding: 10px 10px 10px 16px;
  border-radius: 12px;
  background: #1f2328;
  color: #fff;
}
.pc-cp__count {
  margin: 0;
  font-size: 14px;
}
.pc-cp__go {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 8px;
  background: #f0b429;
  color: #1f2328;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.pc-cp__go[aria-disabled="true"] {
  background: #4a5058;
  color: #d4d8dd;
  cursor: not-allowed;
}
.pc-cp__go:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

Grocery card with unit price and a quantity stepper

  • Intl.NumberFormat
  • focus management
  • unit price

The unit price sits under the pack price, smaller but easy to find, so shoppers can compare bottle sizes without dividing in their heads. Add turns into a stepper, focus moves to the plus button and back to Add at zero, and totals are formatted with Intl.NumberFormat.

View code
.pc-gr {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(230px, 100%);
  padding: 12px 12px 14px;
  border-radius: 16px;
  background: #fff;
  color: #1e2412;
  box-shadow: 0 6px 22px rgba(30, 36, 18, .09);
}
.pc-gr__media {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #f6f3e6;
}
.pc-gr__art {
  display: block;
  width: 100%;
  height: 100%;
}
.pc-gr__tag {
  position: absolute;
  bottom: 8px;
  left: 8px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e3ecc6;
  color: #3c4a10;
  font-size: 12px;
  font-weight: 700;
}
.pc-gr__title {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1e2412;
}
.pc-gr__link {
  color: inherit;
  text-decoration: none;
}
.pc-gr__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}
.pc-gr:hover .pc-gr__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-gr__link:focus-visible {
  outline: none;
}
.pc-gr__link:focus-visible::after {
  outline: 3px solid #4d5f12;
  outline-offset: 3px;
}
.pc-gr__size {
  margin: 2px 0 0;
  color: #5d634f;
  font-size: 13px;
}
.pc-gr__price {
  margin: 8px 0 0;
  font-size: 19px;
  font-weight: 800;
}
.pc-gr__unit {
  margin: 0;
  color: #5d634f;
  font-size: 13px;
}
.pc-gr__action {
  position: relative;
  z-index: 1;
  height: 44px;
  margin-top: 12px;
}
.pc-gr__add {
  width: 100%;
  height: 44px;
  border: 2px solid #4d5f12;
  border-radius: 999px;
  background: #fff;
  color: #3c4a10;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.pc-gr__add:hover {
  background: #4d5f12;
  color: #fff;
}
.pc-gr__step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  border-radius: 999px;
  background: #4d5f12;
  color: #fff;
}
.pc-gr__step[hidden] {
  display: none;
}
.pc-gr__minus,
.pc-gr__plus {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.pc-gr__minus:hover,
.pc-gr__plus:hover {
  background: #3c4a10;
}
.pc-gr__plus:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.pc-gr__qty {
  font-size: 16px;
  font-weight: 700;
}
.pc-gr__add:focus-visible,
.pc-gr__minus:focus-visible,
.pc-gr__plus:focus-visible {
  outline: 3px solid #1e2412;
  outline-offset: 2px;
}
.pc-gr__status {
  min-height: 1.4em;
  margin: 6px 0 0;
  color: #3c4a10;
  font-size: 13px;
  text-align: center;
}
.pc-gr__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

Variants and product types

Color, size and purchase options shown on the card itself, plus a premium card that changes the whole tone. Swatches are native radio inputs, so arrow keys and screen readers work without extra code.

Fashion card with color swatches and size chips

  • radio inputs
  • :has(:checked)
  • fieldset / legend

Color and size are two radio groups in fieldsets, so arrow keys move between options and the legends name each group. :has() recolors the drawn sweater and swaps the color name with no script, and the sold-out size stays visible but disabled and struck through.

View code
.pc-fs {
  --pc-fs-knit: #d8c7a8;
  position: relative;
  width: min(300px, 100%);
  overflow: hidden;
  border-radius: 2px;
  background: #fff;
  color: #222;
  box-shadow: 0 1px 0 #e6e2dc, 0 12px 34px rgba(34, 34, 34, .08);
}
.pc-fs:has(.pc-fs__sw--sage:checked) {
  --pc-fs-knit: #9fae8f;
}
.pc-fs:has(.pc-fs__sw--navy:checked) {
  --pc-fs-knit: #2e3a55;
}
.pc-fs:has(.pc-fs__sw--rust:checked) {
  --pc-fs-knit: #a8532f;
}
.pc-fs__media {
  aspect-ratio: 4 / 5;
  background: #f3f0ea;
}
.pc-fs__art {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10% 8%;
  box-sizing: border-box;
}
.pc-fs__knit {
  fill: var(--pc-fs-knit);
  transition: fill .3s ease;
}
.pc-fs__body {
  padding: 14px 16px 16px;
}
.pc-fs__title {
  margin: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: .01em;
  color: #222;
}
.pc-fs__link {
  color: inherit;
  text-decoration: none;
}
.pc-fs__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pc-fs:hover .pc-fs__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-fs__link:focus-visible {
  outline: none;
}
.pc-fs__link:focus-visible::after {
  outline: 3px solid #222;
  outline-offset: -3px;
}
.pc-fs__price {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
}
.pc-fs__set {
  position: relative;
  z-index: 1;
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}
.pc-fs__legend {
  margin: 0 0 6px;
  padding: 0;
  color: #555;
  font-size: 13px;
}
.pc-fs__name {
  display: none;
  color: #222;
  font-weight: 700;
}
.pc-fs:has(.pc-fs__sw--oat:checked) .pc-fs__name--oat,
.pc-fs:has(.pc-fs__sw--sage:checked) .pc-fs__name--sage,
.pc-fs:has(.pc-fs__sw--navy:checked) .pc-fs__name--navy,
.pc-fs:has(.pc-fs__sw--rust:checked) .pc-fs__name--rust {
  display: inline;
}
.pc-fs__swatches,
.pc-fs__sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pc-fs__sw {
  width: 28px;
  height: 28px;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, .25);
  border-radius: 50%;
  appearance: none;
  cursor: pointer;
}
.pc-fs__sw--oat {
  background: #d8c7a8;
}
.pc-fs__sw--sage {
  background: #9fae8f;
}
.pc-fs__sw--navy {
  background: #2e3a55;
}
.pc-fs__sw--rust {
  background: #a8532f;
}
.pc-fs__sw:checked {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #222;
}
.pc-fs__sw:focus-visible {
  outline: 2px solid #222;
  outline-offset: 5px;
}
.pc-fs__size {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #c9c4bc;
  border-radius: 6px;
  color: #222;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.pc-fs__size input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pc-fs__size:has(:checked) {
  border-color: #222;
  background: #222;
  color: #fff;
}
.pc-fs__size:has(:focus-visible) {
  outline: 3px solid #a8532f;
  outline-offset: 2px;
}
.pc-fs__size:has(:disabled) {
  border-style: dashed;
  color: #6f6a63;
  text-decoration: line-through;
  cursor: not-allowed;
}
.pc-fs__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

Variant image swap on swatch hover and focus

  • :has(:hover)
  • stacked images
  • visibility

Each colorway is its own image file, stacked in one box. Hovering a swatch previews that photo, moving away returns to the selected one, and keyboard users get the swap when arrow keys change the checked radio. Hidden images use visibility, so only the visible alt text is read.

View code
.pc-vs {
  position: relative;
  width: min(280px, 100%);
  padding: 10px;
  border-radius: 22px;
  background: #fff;
  color: #1c1f26;
  box-shadow: 0 10px 30px rgba(28, 31, 38, .09);
}
.pc-vs__media {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 14px;
  background: #eef0e8;
}
.pc-vs__img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s;
}
.pc-vs:has(input[value="moss"]:checked) .pc-vs__img--moss,
.pc-vs:has(input[value="rust"]:checked) .pc-vs__img--rust,
.pc-vs:has(input[value="ink"]:checked) .pc-vs__img--ink {
  opacity: 1;
  visibility: visible;
}
.pc-vs:has(.pc-vs__opt:hover) .pc-vs__media .pc-vs__img {
  opacity: 0;
  visibility: hidden;
}
.pc-vs:has(.pc-vs__opt--moss:hover) .pc-vs__media .pc-vs__img--moss,
.pc-vs:has(.pc-vs__opt--rust:hover) .pc-vs__media .pc-vs__img--rust,
.pc-vs:has(.pc-vs__opt--ink:hover) .pc-vs__media .pc-vs__img--ink {
  opacity: 1;
  visibility: visible;
}
.pc-vs__body {
  padding: 14px 8px 6px;
}
.pc-vs__title {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1c1f26;
}
.pc-vs__link {
  color: inherit;
  text-decoration: none;
}
.pc-vs__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
}
.pc-vs:hover .pc-vs__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-vs__link:focus-visible {
  outline: none;
}
.pc-vs__link:focus-visible::after {
  outline: 3px solid #1c1f26;
  outline-offset: 3px;
}
.pc-vs__price {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 800;
}
.pc-vs__set {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}
.pc-vs__legend {
  float: left;
  margin: 0 6px 0 0;
  padding: 0;
  color: #555b66;
  font-size: 13px;
}
.pc-vs__opt {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}
.pc-vs__opt::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2);
}
.pc-vs__opt--moss::before {
  background: #5f7a52;
}
.pc-vs__opt--rust::before {
  background: #b5562f;
}
.pc-vs__opt--ink::before {
  background: #2f3a56;
}
.pc-vs__opt:has(:checked) {
  box-shadow: inset 0 0 0 2px #1c1f26;
}
.pc-vs__opt:has(:focus-visible) {
  outline: 3px solid #b5562f;
  outline-offset: 2px;
}
.pc-vs__opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.pc-vs__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

Digital product with buy-once or membership

  • radio cards
  • Intl.NumberFormat
  • button label sync
City skyline at golden hour, with towers fading into haze along a lakeshore

24 presets · desktop and mobile

Golden Hour City photo presets

Instant download, ZIP 48 MB

Purchase option

A digital product has no stock or shipping, so the card spends that space on format details and the purchase option. The two options are radio cards, and the script rewrites the button label with the formatted price so the action always says what it costs.

View code
.pc-dg {
  position: relative;
  width: min(310px, 100%);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  color: #1a1625;
  box-shadow: 0 12px 34px rgba(26, 22, 37, .12);
}
.pc-dg__media {
  position: relative;
}
.pc-dg__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.pc-dg__fmt {
  position: absolute;
  bottom: 10px;
  left: 10px;
  margin: 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(20, 16, 30, .82);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
}
.pc-dg__body {
  padding: 16px 16px 18px;
}
.pc-dg__title {
  margin: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: #1a1625;
}
.pc-dg__link {
  color: inherit;
  text-decoration: none;
}
.pc-dg__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
}
.pc-dg:hover .pc-dg__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-dg__link:focus-visible {
  outline: none;
}
.pc-dg__link:focus-visible::after {
  outline: 3px solid #5b3fd1;
  outline-offset: -3px;
}
.pc-dg__meta {
  margin: 4px 0 0;
  color: #5c566b;
  font-size: 13px;
}
.pc-dg__plans {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 14px 0 0;
  padding: 0;
  border: 0;
}
.pc-dg__plan {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1.5px solid #ddd8e8;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
}
.pc-dg__plan input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #5b3fd1;
}
.pc-dg__plan:has(:checked) {
  border-color: #5b3fd1;
  background: #f4f1fd;
}
.pc-dg__plan:has(:focus-visible) {
  outline: 3px solid #5b3fd1;
  outline-offset: 2px;
}
.pc-dg__plan-name {
  font-weight: 600;
}
.pc-dg__plan-price {
  font-weight: 800;
  white-space: nowrap;
}
.pc-dg__btn {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 46px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: #5b3fd1;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease;
}
.pc-dg__btn:hover {
  background: #4a30b8;
}
.pc-dg__btn:focus-visible {
  outline: 3px solid #1a1625;
  outline-offset: 2px;
}
.pc-dg__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

Dark luxury card

  • Fraunces serif
  • hairline borders
  • restrained hover

Premium cards remove things: no badges, no stars, a serif name, generous spacing and a single warm accent on hairline rules. The price keeps full contrast against the near-black panel, and the hover only brightens the frame.

View code
.pc-lx {
  position: relative;
  width: min(300px, 100%);
  padding: 14px;
  border: 1px solid #3a332c;
  background: #14110f;
  color: #efe6d6;
  text-align: center;
  transition: border-color .3s ease;
}
.pc-lx:hover {
  border-color: #c9a96e;
}
.pc-lx__media {
  aspect-ratio: 1;
  background: #1d1916;
}
.pc-lx__art {
  display: block;
  width: 100%;
  height: 100%;
  padding: 12%;
  box-sizing: border-box;
}
.pc-lx__body {
  padding: 18px 8px 8px;
}
.pc-lx__house {
  margin: 0;
  color: #c9a96e;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.pc-lx__title {
  margin: 8px 0 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: normal;
  color: #efe6d6;
}
.pc-lx__link {
  color: inherit;
  text-decoration: none;
}
.pc-lx__link::after {
  content: "";
  position: absolute;
  inset: 0;
}
.pc-lx:hover .pc-lx__link {
  text-decoration: underline;
  text-decoration-color: #c9a96e;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.pc-lx__link:focus-visible {
  outline: none;
}
.pc-lx__link:focus-visible::after {
  outline: 2px solid #c9a96e;
  outline-offset: 4px;
}
.pc-lx__spec {
  margin: 8px 0 0;
  color: #b4aa99;
  font-size: 13.5px;
}
.pc-lx__price {
  margin: 14px auto 0;
  padding-top: 14px;
  border-top: 1px solid #3a332c;
  width: 70%;
  font-family: "Fraunces", Georgia, serif;
  font-size: 20px;
}
.pc-lx__perk {
  margin: 6px 0 0;
  color: #b4aa99;
  font-size: 12.5px;
}
@media (prefers-reduced-motion: no-preference) {
  .pc-lx__art {
    transition: transform .6s ease;
  }
  .pc-lx:hover .pc-lx__art {
    transform: scale(1.04);
  }
}

List view, mobile grid and loading

The same fields arranged for spec-driven lists, a two-column phone grid and the first load. Image boxes keep one aspect ratio everywhere, which is what keeps the price line straight and the layout from shifting.

Horizontal list-view card

  • container query
  • grid
  • description list
Yellow tents pitched in deep snow below jagged white peaks

Cirque 2P four-season tent

4.8 (212 reviews)

Weight
2.9 kg
Sleeps
2
Poles
Aluminium, 3
Packed
48 x 18 cm

$649.00

In stock, ships tomorrow

Spec-driven products read better in a list, where the image shrinks and attributes get the width. A container query lays the card out in three columns when its slot is wide and stacks it in a narrow one, and the specs are a dl so each value keeps its label.

View code
.pc-lv {
  width: min(760px, 100%);
  container-type: inline-size;
}
.pc-lv__card {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 12px;
  border: 1px solid #d9dee4;
  border-radius: 14px;
  background: #fff;
  color: #18212b;
  transition: box-shadow .25s ease;
}
.pc-lv__card:hover {
  box-shadow: 0 12px 30px rgba(24, 33, 43, .12);
}
.pc-lv__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
}
.pc-lv__title {
  margin: 0;
  font-family: inherit;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: normal;
  color: #18212b;
}
.pc-lv__link {
  color: inherit;
  text-decoration: none;
}
.pc-lv__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.pc-lv__card:hover .pc-lv__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-lv__link:focus-visible {
  outline: none;
}
.pc-lv__link:focus-visible::after {
  outline: 3px solid #0b5cad;
  outline-offset: 3px;
}
.pc-lv__rating {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.pc-lv__rating span[aria-hidden] {
  color: #b45309;
}
.pc-lv__muted {
  color: #56616d;
  font-weight: 400;
}
.pc-lv__specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 12px 0 0;
}
.pc-lv__specs div {
  margin: 0;
}
.pc-lv__specs dt {
  color: #56616d;
  font-size: 12px;
}
.pc-lv__specs dd {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.pc-lv__buy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pc-lv__price {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}
.pc-lv__stock {
  margin: 0;
  color: #1e6b3a;
  font-size: 13px;
}
.pc-lv__btn {
  position: relative;
  z-index: 1;
  min-height: 44px;
  margin-top: 8px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  background: #0b5cad;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease;
}
.pc-lv__btn:hover {
  background: #084a8c;
}
.pc-lv__btn:focus-visible {
  outline: 3px solid #18212b;
  outline-offset: 2px;
}
.pc-lv__vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
@container (min-width: 600px) {
  .pc-lv__card {
    grid-template-columns: 200px minmax(0, 1fr) 170px;
    align-items: start;
    gap: 20px;
  }
  .pc-lv__buy {
    padding-left: 20px;
    border-left: 1px solid #e3e7ec;
    align-self: stretch;
  }
  .pc-lv__btn {
    margin-top: auto;
  }
}

Compact two-column grid on a phone

  • 2-column grid
  • line-clamp
  • scroll container

Candles 24 items

Two columns is the usual phone layout for visually driven catalogs. At about 160px per card there is room for a square image, a two-line title, a price and a short rating, so everything else waits for the product page. The grid scrolls inside its own container under a sticky toolbar.

View code
.pc-pg {
  position: relative;
  height: 100%;
  overflow-y: auto;
  background: #faf8f5;
  color: #231f1b;
}
.pc-pg__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #ebe5dd;
  background: #faf8f5;
}
.pc-pg__heading {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.pc-pg__count {
  margin-left: 4px;
  color: #6b6259;
  font-size: 13px;
  font-weight: 400;
}
.pc-pg__sort {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d6cdc2;
  border-radius: 999px;
  background: #fff;
  color: #231f1b;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.pc-pg__sort:focus-visible {
  outline: 3px solid #8a4b2a;
  outline-offset: 2px;
}
.pc-pg__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 10px;
  margin: 0;
  padding: 14px 12px 24px;
  list-style: none;
}
.pc-pg__card {
  position: relative;
  margin: 0;
}
.pc-pg__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
}
.pc-pg__art--fig { background: #efe4ea; }
.pc-pg__art--fig .pc-pg__jar { fill: #7d4b63; }
.pc-pg__art--sea { background: #e2edf0; }
.pc-pg__art--sea .pc-pg__jar { fill: #4f7f8c; }
.pc-pg__art--amber { background: #f5e9d8; }
.pc-pg__art--amber .pc-pg__jar { fill: #b06d22; }
.pc-pg__art--sage { background: #e8ede2; }
.pc-pg__art--sage .pc-pg__jar { fill: #8a9c76; }
.pc-pg__art--rose { background: #f4e4df; }
.pc-pg__art--rose .pc-pg__jar { fill: #c0756a; }
.pc-pg__art--ink { background: #e4e5ec; }
.pc-pg__art--ink .pc-pg__jar { fill: #2f3346; }
.pc-pg__title {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: normal;
  color: #231f1b;
}
.pc-pg__link {
  color: inherit;
  text-decoration: none;
}
.pc-pg__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}
.pc-pg__link:focus-visible {
  outline: none;
}
.pc-pg__link:focus-visible::after {
  outline: 3px solid #8a4b2a;
  outline-offset: 2px;
}
.pc-pg__price {
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 800;
}
.pc-pg__rate {
  margin: 2px 0 0;
  font-size: 12.5px;
  font-weight: 600;
}
.pc-pg__rate span[aria-hidden] {
  color: #a3550f;
}
.pc-pg__muted {
  color: #6b6259;
  font-weight: 400;
}

Skeleton loading cards

  • aria-busy
  • same aspect ratio
  • opacity pulse

Loading products

The skeleton copies the final card exactly, image box included, so nothing moves when the products arrive. The list carries aria-busy while loading, a status message announces the swap, and the pulse is an opacity change that only runs when motion is allowed.

View code
.pc-sk {
  width: min(420px, 100%);
  color: #1d2327;
}
.pc-sk__ghost,
.pc-sk__real {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.pc-sk__ghost[hidden],
.pc-sk__real[hidden] {
  display: none;
}
.pc-sk__card {
  position: relative;
  padding: 10px 10px 12px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(29, 35, 39, .07);
}
.pc-sk__blk {
  border-radius: 6px;
  background: #e6e9ee;
}
.pc-sk__blk--img,
.pc-sk__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 10px;
}
.pc-sk__art {
  background: #eef3f2;
}
.pc-sk__blk--line {
  height: 14px;
  margin-top: 12px;
}
.pc-sk__blk--short {
  width: 60%;
  height: 14px;
  margin-top: 6px;
}
.pc-sk__blk--price {
  width: 40%;
  height: 18px;
  margin-top: 10px;
}
.pc-sk__title {
  display: -webkit-box;
  min-height: 2.7em;
  margin: 10px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: normal;
  color: #1d2327;
}
.pc-sk__link {
  color: inherit;
  text-decoration: none;
}
.pc-sk__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.pc-sk__card:hover .pc-sk__link {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pc-sk__link:focus-visible {
  outline: none;
}
.pc-sk__link:focus-visible::after {
  outline: 3px solid #2c6e6a;
  outline-offset: 3px;
}
.pc-sk__price {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 800;
}
.pc-sk__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.pc-sk__status {
  margin: 0;
  color: #4f5a61;
  font-size: 13.5px;
}
.pc-sk__toggle {
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid #2c6e6a;
  border-radius: 10px;
  background: #fff;
  color: #1f5653;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.pc-sk__toggle:focus-visible {
  outline: 3px solid #1d2327;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .pc-sk__blk {
    animation: pc-sk-pulse 1.4s ease-in-out infinite;
  }
}
@keyframes pc-sk-pulse {
  50% {
    opacity: .45;
  }
}

What Is a Product Card, and How Does It Differ From a Product Page?

On a listing page, one compact unit summarizes one item with an image, title, price, rating and action. That unit is the product card, and shoppers use it to compare options and decide what to open.

Nielsen Norman Group defines a card as a small container of related information that works as a linked entry point to fuller details (Page Laubheimer, 2016). A product card applies that idea to a single product.

The card sits in a grid, search result or carousel and carries a handful of fields, all to earn the click. The product page does the heavier work. It holds the full gallery, description, specifications and order button, and it has to close the sale.

You’ll also see some guides use “product card” to mean the product page itself. That’s a different thing, and Baymard sticks with list item for the listing unit.

The broader card layout is a general interface pattern, and NN/g flags a weakness for catalogs. Cards scan more slowly than lists and compare poorly, since field positions shift from item to item. A product card avoids that only when every field sits in the same place on every item.

Which Fields Belong on a Product Card, and in What Order?

Baymard’s research points to price, product title or type, thumbnail, rating average with rating count, and product variations as the core fields (Baymard Institute, 2023).

Small direct-to-consumer stores can drop site-provided ratings, and not every variation deserves a cue. A desk listing should show its sizes, while a shoe listing can skip them because shoppers assume sizes exist.

Required and optional fields

Thumbnail, price, title or product type and a link to the product page go on every card. Most stores also add the rating average and count, plus a variation cue such as color swatches. A sale badge, stock or delivery status and 1 to 3 category-specific attributes are situational.

If the catalog is visually driven, like apparel or decor, thumbnails and swatches carry most of the decision. Laptops and tools are different, since the deciding specs such as screen size and storage belong on the card itself.

Baymard’s 2023 research documents IKEA pairing a series name like KIVIK with a product type, 3-seat sofa, since the name alone identifies nothing.

Reading order and title truncation

A workable order is image, price, title, then rating. Baymard’s participants gave thumbnails a disproportionate share of attention.

Set the visual hierarchy with type size, weight and color, not extra borders. Baymard found that hard-to-scan list item information slowed assessment almost as much as having none.

Don’t lean on the F-pattern reading model to defend the order either. NN/g’s eyetracking of a flexible card layout showed users scanning in a semirandom pattern and looking back and forth between items.

Titles that run past 3 or 4 lines on mobile start to read as descriptions. Set a line clamp inside that limit and keep the product type in the visible part.

Baymard’s product list benchmark has a few numbers worth keeping in mind. 50% of sites do not show adequate list item attributes (Baymard Institute, May 2023). 64% get at least one of two design principles wrong (Baymard Institute, August 2023): consistent attributes across similar items, and visually distinct information elements, which 40% miss.

Missing attributes sent participants back and forth between the list and product pages, and some left the site.

How Should a Product Card Display Price and Discounts?

Show the current price in the heaviest text after the image and never hide it. Participants in Baymard’s tests did not understand why a list item said “see price in cart” instead of showing a price.

On a sale item, put the current price first and heaviest, and strike the original price through in a lighter weight. A discount badge can use a percent or a currency amount. Just pick one and use it on every card. A variant price range, or “from” pricing, hints that variants exist but not which ones differ (Baymard, 2023).

86% of benchmarked sites show no price per unit for items sold in different quantities or volumes (Baymard Institute, July 2023).

Without it, shoppers divide in their heads, which led some to abandon products that suited them.

Walmart prints the per-roll cost beside the pack price on toilet paper, a pattern Baymard cites as the right one.

Keep the unit price smaller than the total price but easy to find.

It applies only to multiquantity items, and it fails when units differ across a list. In one drugstore listing, some medicines were priced per tablet and others per ounce, so no comparison was possible.

Which Image Ratio and Hover Behavior Work Best on a Product Card?

Pick one image ratio for the whole grid. Square works for hardware and packaged goods, and 4:5 or 3:4 portrait works for apparel.

Mixed ratios give uneven row heights and a ragged price line, which breaks fixed field positions. Crop to a single aspect ratio at upload, then reserve that space in CSS.

Hover images and extra thumbnails

Older guidance said one additional thumbnail on hover was enough. Baymard’s November 2024 update asks for at least 3 thumbnails including the default, and as many as 5 to 15 for apparel and accessories.

The change came from testing in furniture and apparel, where 1 or 2 images pushed participants to open product pages just to see more views.

Hover does not exist on touch screens, so signal extra images with a small carousel and dots that are visible by default. Baymard found desktop works with permanent or on-hover arrows, but mobile needs the indicators always on.

Lazy loading and alt text

About 16% to 17% of pages lazy-load their LCP image, a share that has held steady since 2024 (HTTP Archive Web Almanac, 2025).

On a category page, a first-row card image can be the LCP element. Cards below the fold get loading=”lazy”. The first row skips lazy loading, and the likely LCP image gets fetchpriority=”high”. Custom data-src loaders hide the image source from the browser, so keep them off first-row cards.

Alt text names the product and one differentiator, such as color or material, instead of opening with “image of”.

Which Actions Earn Space on the Card: Quick View, Quick Add or Wishlist?

Make the whole card one link, then add a second control only when it saves a trip to the product page. Baymard’s stance on quick views has shifted over the years, and the newer guidance still leaves room for them.

In 2022, Baymard said quick views suit visually driven products with few key attributes, since they keep shoppers in the list (Baymard, August 2022). That reversed the 2014 and 2015 advice to avoid them, after desktop testing no longer showed shoppers overlooking the product page link or clicking the quick view button by accident.

The 2023 position is less friendly. For spec-driven products a quick view adds friction, and 21% of spec-driven sites still ship one (Baymard, August 2023). Baymard also calls quick views a complement to a good list item, not a replacement, and often a workaround for a weak product list.

A quick view is a modal laid over the list, so it only helps when the overlay holds what the card lacks. Spec-driven products carry more attributes than any overlay fits, and shoppers open the product page anyway.

Quick views suit sweaters. They do not suit laptops.

If you do ship one, the Back button should close the overlay and return to the list. At Nordstrom, Back sent shoppers to the homepage instead (per Baymard 2022). On mobile, leave the list visible behind the overlay so it does not pass for the product page, and put a product page link in the overlay where it’s visible without scrolling.

OptionWorks best whenFails whenEvidence
Whole card as one linkDetailed list items on spec-driven productsShoppers need more images or sizes before decidingBaymard, 2023
Quick viewVisually driven products with few key attributesSpec-driven products, or a thin list itemBaymard, 2022 and 2023
Add to cart in quick viewShoppers shortlist 2 or 3 items to compareThe list item itself is weakBaymard, 2022
Wishlist iconSaving items without leaving the listIt becomes one of several extra buttonsColoplast design system

Baymard’s 2022 testing found that add to cart works better inside a quick view than as a button on every list item, because shoppers use it to shortlist. A primary call-to-action in the default card state also competes with the card link for the same space.

Swatches and variant cues

Combine variations into one card per product, with swatches under the thumbnail, not one card per color (Baymard).

On mobile, show every color. When only a few swatches appear, some shoppers assume those are the only options and open the product page (Baymard guideline 2438, updated July 2026). An expandable swatch area or a scrolling row shows more colors, though the scrolling row risks scroll hijacking.

Which States Does a Product Card Need?

Default, hover, focus, selected, loading and out of stock cover a card. Each one changes a single visible thing, which keeps the set small enough to document as one component.

  • The default state shows image, title, price, rating and badge, plus a wishlist icon if the store has one.
  • On hover, a slight shadow or lift signals that the whole card is clickable (NN/g treats a slight drop shadow as a clickability signifier, 2016; Coloplast’s design system uses a soft shadow on hover).
  • Keyboard focus gets a visible ring on the focused link.
  • Selected means the favourite (wishlist) icon is switched on, a state Coloplast’s design system adds to its icon button for product cards.
  • Loading is a spinner on the pressed button and a skeleton of the grid on first load.
  • Out of stock gets a Sold out badge and a disabled add button, and the card stays in the grid.

Dawn applies its card hover effect only at viewport widths of 990px and up, as a 1.03 scale on the card image, and it limits its shape-morph hover effects to prefers-reduced-motion: no-preference (Shopify Dawn, October 2026).

The scale is a transform, and web.dev notes that a transform animation cannot push neighboring elements around. That makes it a safe CSS hover effect for a dense grid.

Nielsen Norman Group splits loading feedback by scope. Spinners suit a single module such as a card, while a skeleton screen suits a full-screen load under 10 seconds (reviewed September 2026). Below 1 second, neither helps.

So the grid gets a skeleton built at the final aspect ratio, and the card gets a spinner only on its own button. Dawn follows the same split, since its quick add button carries a loading spinner.

Dawn marks an unavailable product with a Sold out badge, disables the add button, and folds the badge into the link’s accessible name, so screen readers announce the status with the title.

How Many Product Cards Per Row, and Grid or List View?

Visually driven catalogs usually do well with 2 columns on phones, 3 on tablets and 4 on desktop, while spec-driven catalogs move to a list view. Shopify’s Dawn theme follows the first half of that rule, because its card image sizes attribute assumes exactly those counts.

ViewportColumns assumedBreakpoint
Phone2Below 750px
Tablet3750px to 989px
Desktop4990px and up

Source: Shopify Dawn card-product snippet and base.css, main branch, October 2026. The stylesheet ships column classes from 1 to 6 at 990px and up, so 4 is a default, not a ceiling.

Change the column count and the gutter and card padding need re-checking too, since they all belong to one grid system. Dawn keeps separate gap variables for mobile and desktop.

Those variables swap at 750px through media queries, the same breakpoint where the image sizes hint moves from 2 columns to 3. Dawn builds the grid with flex-wrap and computed widths, while CSS Grid states the same layout with one repeat() declaration.

Grid view or list view

For visually driven products, grid view wins. Baymard’s guideline 2272 ties the grid to products where list items must carry enough visual information (first observed February 2015, updated July 2026).

Spec-driven products belong in a list, because thumbnails in a grid take the space the attributes need. Yet 23% of benchmarked sites still use grid view for spec-driven products (Baymard, August 2023).

The sources disagree on the first case. Nielsen Norman Group (2016) prefers lists for homogeneous items and limits image grids to narrow categories, while Baymard recommends the grid when thumbnails carry the decision.

Some stores let shoppers switch between the two views, which keeps the list available for comparison.

Equal-height cards and spacing

Pin the price and button to the bottom with Flexbox inside each card. Dawn’s snippet has an extend_height flag, true by default, that stretches a card to the row’s height.

Titles of different length then stop pushing prices out of line, which keeps the fixed field positions intact across a row.

How to Make a Product Card Accessible

Most of a card’s accessibility comes down to WCAG 2.2 level AA criteria for text contrast, control contrast, target size and focus visibility. Text needs 4.5:1, controls and focus rings need 3:1, targets need 24 by 24 CSS pixels, and a focused link can never be fully hidden by sticky bars (W3C Understanding documents for WCAG 2.2).

Contrast and focus rings

Text needs 4.5:1 against the background, or 3:1 for large text (18 point, or 14 point bold). Sale badges, rating text and a muted original price all count. Icons, swatch outlines and focus indicators need 3:1 against adjacent colors.

The same color contrast check covers text that appears on hover or focus. W3C’s failing example for ratings is a pale yellow star on white at 1.2:1, so print the numeric rating beside the stars, as Dawn does.

Dawn draws focus as a 0.2rem outline at 50% of the foreground color with a 0.3rem offset (base.css, October 2026). Whether that reaches 3:1 depends on the color scheme, so test it per theme.

W3C exempts inactive controls from contrast rules, so a disabled Sold out button needs no ratio. The Sold out label beside it still does.

Target size and sticky headers

SC 2.5.8 sets a minimum target of 24 by 24 CSS pixels, with a spacing exception for smaller ones (W3C Understanding 2.5.8). W3C’s own example fits a card, since it involves a magnifier button laid over a linked image.

At 24 by 24 pixels the button passes. At 16 by 16 it fails, because its 24 pixel spacing circle intersects the large image target.

Sticky headers cause the other failure. SC 2.4.11 fails a page when a sticky header or footer entirely hides a focused card link, and CSS scroll-padding is the sufficient technique (W3C Understanding 2.4.11, June 2026).

Link and button semantics

The whole card acts as one link, so the open question is where the anchor starts and stops. HTML’s content model keeps interactive elements, such as buttons, out of an anchor.

In WooCommerce, content-product.php opens the product link at priority 10 on woocommerce_before_shop_loop_item and closes it at priority 5 on woocommerce_after_shop_loop_item, ahead of the add to cart button at priority 10 (template version 9.4.0, October 2026).

Dawn puts the link on the title, the rating is an image role with a label, the review count carries visually hidden text, and the quick add button takes its name from both itself and the product title (Shopify Dawn, October 2026).

Dawn’s ARIA attributes tie each button name to the product title, so a screen reader hears “Choose options” with the product it belongs to, not a row of identical buttons.

How to Prevent Layout Shift and Add Product Markup

Give every card image an explicit width and height, and keep Cumulative Layout Shift at 0.1 or less for at least 75% of page visits (web.dev, updated February 2025).

Reserve space for images and late content

62% of mobile pages fail to set dimensions on at least one image, down from 66% a year earlier (HTTP Archive Web Almanac, 2025).

Browsers derive a default aspect ratio from the width and height attributes, so the card holds its space before the file arrives. Every srcset candidate has to share one ratio, which a single-ratio grid already guarantees.

Dawn writes the media width and height onto every card image, in a srcset that runs from 165 to 1066 pixel widths.

Ratings or badges that a script fills in later need reserved space, set with min-height. Keep that space when a widget returns nothing too, since removing it shifts the row as much as adding content does.

Hover effects and load more

Hover is a known cause of layout shift. Web.dev counts any shift that happens while the pointer rests on content as unexpected, even inside the 500 millisecond window that normally excuses user-initiated shifts.

A quick add button that appears on hover therefore needs reserved space or an overlay.

A load more button the shopper presses keeps new cards out of the CLS score within 500 milliseconds, and web.dev suggests prefetching so they appear at once.

Lighthouse flags images missing width and height and lists shifted elements, but lab runs measure the initial load. Field data from the Chrome UX Report covers the page’s whole life, so hover and scroll shifts show up only there.

Product markup on cards and product pages

Google’s merchant listing documentation recommends Product structured data on product pages, not on pages that list products or a category (Google Search Central, retrieved October 2026).

Product rich results only support pages that focus on a single product, so a card grid is not eligible. The card’s job is to match what the product page markup and the Merchant Center feed say, because Google can verify merchant listing data before showing it.

The price patterns on the card map straight onto that markup. For a sale price, put the current price in price and the original price as a UnitPriceSpecification with priceType StrikethroughPrice. A unit price uses referenceQuantity with a value and a unitCode, plus a valueReference for the base unit, for example 100 ML. A sale window takes validFrom plus priceValidUntil or validThrough, in ISO 8601.

JavaScript-generated Product markup can make Shopping crawls less frequent and less reliable for fast-changing price and availability. Put it in the initial HTML.

How to Build and Document a Product Card Component

Build the card as one documented component, working from content model to platform template.

  1. Write the content model per catalog type: required fields, optional fields, line limits
  2. Fix the aspect ratio, column counts and spacing variables
  3. Draw every state as a Figma variant
  4. Build the markup with one link, buttons outside it and image dimensions set
  5. Write one Storybook story per state
  6. Run Lighthouse and the Storybook accessibility tests
  7. Map the component onto the platform template

In Figma, a variant property such as state takes values like default, hover, pressed and disabled, and each variant must be a unique combination of values. A walkthrough on creating variants in Figma covers the mechanics.

Figma does not require a variant for every combination, and it warns that importing large component sets slows files down (Figma Help Center).

A Storybook story captures the rendered state of a component, and one component can have several stories, one per state (Storybook docs, version 10.6). Autodocs turn those stories into usage guidelines for a design system, and the accessibility tests run against the same stories.

Platform templates: Shopify Dawn and WooCommerce

Dawn’s card-product snippet takes media_aspect_ratio (square or portrait, with portrait set to 0.8, which is 4:5), show_secondary_image (default false), show_vendor, show_rating, quick_add and lazy_load (default true). A section that renders the first row can pass lazy_load false.

WooCommerce wraps each product in a list item in content-product.php and fires five hooks in order, starting with link open, then sale flash and thumbnail, title, rating and price, and finally link close and add to cart. Override it by copying the file to yourtheme/woocommerce/content-product.php (template version 9.4.0, October 2026).

An override freezes the markup. When WooCommerce bumps the template version, the copy needs a manual update, as the file header itself warns.

Product Card Design FAQ

Is a product card the same as a product tile?

Yes, in everyday use. Both names describe the compact unit that summarizes one product in a grid, and Baymard’s research calls it a list item.

The word card usually implies a bordered, shadowed container, which is how Nielsen Norman Group defines the pattern.

Where can I find product card examples?

Baymard’s library holds more than 18,000 annotated ecommerce design examples, including product list screenshots from benchmarked stores (Baymard Institute, 2026).

Design systems such as Coloplast’s document card anatomy, and Shopify’s Dawn theme publishes working card code on GitHub.

Does a better card raise the conversion rate?

It raises it indirectly. A card decides which products a shopper opens, so the first change shows up in click-through to product pages, not in orders.

Track click-through and add-to-cart rate per card before crediting a design change with a conversion lift.

Are product cards used outside category pages?

Yes. Cards appear in search results, carousels and recommendation rows as well as category grids, and Baymard’s thumbnail research treats product lists and search results as one pattern.

The same component works in each place only while its fields keep the same positions.

Which Product Card Changes to Test First

Test in order of how many cards each change touches. Field order and attributes go first. Image ratio and the hover image come next, and the quick add and wishlist buttons go last.

Field changes reach every card in the grid and need no layout rework, so a gain or a loss shows up fastest. Button tests come last because they depend on the card already showing the right information.

The trade-off is speed. One variable per test makes each round slower, but a combined change cannot show which edit moved the add-to-cart rate.

Run each test across whole weeks so weekday and weekend traffic both appear. Repeat it after any change to column count, since a result at four columns does not carry over to two.