/* Category-page review surfaces (1.7) — header summary + bottom "top reviews"
   section. Kept in its own stylesheet so the listing template only loads it
   when there's a category-level aggregate to render. */

/* --- Header summary band --- */

.category-review-summary {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  margin: 0 0 18px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  flex-wrap: wrap;
  /* Clickable: scrolls to the bottom "Les meilleurs avis" section (#category-reviews). */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.category-review-summary:hover {
  background: #ffedd5;
  border-color: #fdba74;
}

/* Half-star renderer (shared review/_stars.html) sized to the band. */
.category-review-summary__stars .rev-stars {
  font-size: 22px;
}

.category-review-summary__score {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: inherit;
}

.category-review-summary__value {
  font-size: 28px;
  font-weight: 700;
  color: #ec7330;
  line-height: 1;
}

.category-review-summary__scale {
  font-size: 14px;
  color: #ec7330;
}

.category-review-summary__stars {
  display: inline-flex;
  gap: 2px;
  font-size: 22px;
  line-height: 1;
}

.category-review-summary__star {
  color: #c4c4c4;
}

.category-review-summary__star.on {
  color: #f59e0b;
}

.category-review-summary__count {
  font-size: 14px;
  color: #57534e;
}

.category-review-summary__count strong {
  color: #1c1917;
  font-weight: 600;
}

/* --- Bottom "top reviews" section --- */

.category-top-reviews {
  margin: 36px 0 24px;
  padding: 24px 0 0;
  border-top: 1px solid #e7e5e4;
  /* Anchor target of the summary band — keep it clear of the sticky header. */
  scroll-margin-top: 90px;
}

.category-top-reviews__head {
  margin-bottom: 20px;
}

.category-top-reviews__title {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
  color: #1c1917;
}

.category-top-reviews__subtitle {
  font-size: 14px;
  color: #78716c;
  margin: 0;
}

.category-top-reviews__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-top-reviews__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
}

.category-top-reviews__card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.category-top-reviews__stars {
  display: inline-flex;
  font-size: 22px;
}

.category-top-reviews__verified {
  font-size: 11px;
  background: #ecfdf5;
  color: #047857;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.category-top-reviews__body {
  color: #292524;
  margin: 0;
}

.category-top-reviews__card-foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px dashed #e7e5e4;
}

.category-top-reviews__author {
  color: #57534e;
  font-size: 13px;
}

.category-top-reviews__author strong {
  color: #1c1917;
  font-weight: 600;
}

.category-top-reviews__date {
  color: #a8a29e;
}

.category-top-reviews__product-link {
  color: #c2410c;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.category-top-reviews__product-link:hover {
  text-decoration: underline;
}
