:root {
  --card-bg: #ffffff;
  --card-border: var(--border);
  --card-radius: 16px;
}

.subcat-products {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.1));
  border: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* Divider between image and body */
.card-divider {
  height: 1px;
  width: 100%;
  background: rgba(0,0,0,0.08);
}

.card-body { display: flex; flex-direction: column; gap: 8px; }

.product-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.product-brand {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(34,34,34,0.7);
}

.product-title + .product-brand {
  margin-top: 2px;
}

/* 2x2 grid of buttons */
.card-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 6px; }

/* Unified button style */
.btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.12); }
.btn-card.view { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-alt)); border-color: rgba(0,0,0,0.2); }
.btn-card.cart { background: transparent; color: var(--text); }
.btn-card.price { background: #fff; color: var(--accent); border-style: dashed; }
.btn-card.wish { background: transparent; }
.btn-card.wish.active { background: rgba(14,165,233,0.1); border-color: rgba(14,165,233,0.4); }

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

@media (max-width: 520px) {
  .product-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }
}
