.wc-cat-grid{
  --gap: 14px;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
  --border: rgba(0,0,0,.06);
  --wc-cat-cols-desktop: 9; /* اگر columns ندهید، 5 ستون پیش‌فرض دسکتاپ */
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* موبایل: 2 ستون */
  gap: var(--gap);
}

@media (min-width: 640px){
  .wc-cat-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px){
  .wc-cat-grid{ grid-template-columns: repeat(var(--wc-cat-cols-desktop), minmax(0, 1fr)); }
}

.wc-cat-card{
  text-decoration: none !important;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
  transition: transform .2s ease, box-shadow .2s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.wc-cat-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.wc-cat-card__media{
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(0,0,0,.04), rgba(0,0,0,.01));
}

.wc-cat-card__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
}

.wc-cat-card__body{
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wc-cat-card__title{
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.wc-cat-card__meta{
  font-size: 12.5px;
  opacity: .7;
}

.wc-cat-grid--empty,
.wc-cat-grid--error{
  padding: 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
}
