/* ── Product Card Grid ── */
.rlb-product-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
}

/* ── Card Container ── */
.rlb-product-card {
  border: 1px solid var(--gray-200);
  background: var(--surface-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rlb-product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ── Image ── */
.rlb-product-card__image-wrapper {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--surface-subtle);
}

.rlb-product-card__image {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ── Content Area ── */
.rlb-product-card__content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ── Product Name ── */
.rlb-product-card__name {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  line-height: 1.3;
  color: var(--text-color-strong);
}

.rlb-product-card__name--truncated .rlb-product-card__name-visible {
  display: inline;
}

/* Screen-reader-only utility */
.rlb-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Price ── */
.rlb-product-card__price {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color-strong);
}

/* ── Star Rating ── */
.rlb-product-card__rating {
  margin-bottom: 1rem;
}

.rlb-product-card__rating-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rlb-product-card__stars {
  display: flex;
  gap: 0.15rem;
}

.rlb-product-card__star {
  font-size: 1.2rem;
  line-height: 1;
}

.rlb-product-card__star--filled {
  color: var(--text-color-strong);
}

.rlb-product-card__star--half {
  color: var(--text-color-strong);
  opacity: 0.55;
}

.rlb-product-card__star--empty {
  color: var(--border-color);
}

/* ── Quick-Add Button ── */
.rlb-product-card__add-btn {
  display: inline-block;
  margin-top: auto;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color-inverse);
  background: var(--primary-color);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rlb-product-card__add-btn:hover {
  background: var(--primary-color-hover);
}

.rlb-product-card__add-btn:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 2px;
}

/* ── Live Region (visually hidden) ── */
.rlb-product-card__live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
