.review-main,
.reviews-main {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 64px 0 88px;
}

.review-hero,
.reviews-hero {
  max-width: 760px;
  margin-bottom: 34px;
}

.review-hero h1,
.reviews-hero h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: .98;
}

.review-hero p,
.reviews-hero p,
.review-muted,
.reviews-muted {
  color: var(--muted, #666862);
  line-height: 1.65;
}

.review-card,
.review-form-card,
.review-trust,
.reviews-empty,
.shop-reviews-preview {
  background: #fffdf8;
  border: 1px solid #d8d1c5;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(28, 33, 27, .05);
}

.review-form-card {
  max-width: 760px;
  padding: clamp(22px, 4vw, 38px);
}

.review-order-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
}

.review-pill,
.verified-badge,
.review-product {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: .82rem;
  font-weight: 700;
  background: #e7efe5;
  color: #1c211b;
}

.review-product { background: #ece6da; }

.review-field {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.review-field label,
.review-rating-label {
  font-weight: 800;
}

.review-field input,
.review-field textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cfc8bc;
  border-radius: 10px;
  background: #fff;
  color: #1c211b;
  font: inherit;
  padding: 12px 14px;
}

.review-field input[type="file"] { padding: 10px; }

.review-field textarea {
  min-height: 150px;
  resize: vertical;
}

.review-help,
.review-count {
  color: #666862;
  font-size: .84rem;
  line-height: 1.5;
}

.review-count { text-align: right; }

.star-picker {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.star-picker button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b8b2a8;
  font-size: 2.4rem;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

.star-picker button.is-selected,
.star-picker button.is-preview {
  color: #1c211b;
}

.review-submit,
.review-photo-remove {
  border: 0;
  border-radius: 10px;
  background: #1c211b;
  color: #f5f0e6;
  font: inherit;
  font-weight: 800;
  padding: 12px 18px;
  cursor: pointer;
}

.review-submit:disabled,
.review-photo-remove:disabled { opacity: .5; cursor: default; }

.review-photo-preview {
  display: grid;
  gap: 10px;
  justify-items: start;
  margin-top: 4px;
}

.review-photo-preview[hidden] { display: none; }

.review-photo-preview img {
  display: block;
  width: min(100%, 420px);
  max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #d8d1c5;
}

.review-photo-remove {
  background: #fffdf8;
  color: #1c211b;
  border: 1px solid #b8b2a8;
  padding: 8px 12px;
}

.review-message {
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ece6da;
  line-height: 1.55;
}

.review-message.is-error { background: #f4d7e2; }

.review-trust {
  margin-top: 28px;
  padding: 22px 24px;
  max-width: 760px;
}

.review-trust h2 { margin-top: 0; }

.review-trust-compact {
  margin-top: 18px;
  padding: 14px 18px;
}

.review-trust-compact h2 {
  margin: 0 0 5px;
  font-size: 1rem;
}

.review-trust-compact p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.45;
}

.reviews-summary {
  display: flex;
  align-items: end;
  gap: 14px;
  margin-top: 22px;
}

.reviews-average {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.reviews-stars,
.review-card-stars {
  letter-spacing: .08em;
  font-weight: 900;
}

.reviews-list {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.review-card { padding: 24px; }

.review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.review-card h2,
.review-card h3 {
  margin: 7px 0 5px;
  font-size: 1.18rem;
  line-height: 1.25;
  letter-spacing: -.015em;
}

.review-card > p {
  margin: 10px 0 14px;
  font-size: .96rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.review-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: #666862;
  font-size: .84rem;
}

.review-photo-link {
  display: block;
  margin: 16px 0;
  width: min(100%, 560px);
}

.review-photo {
  display: block;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #d8d1c5;
}

.review-owner-response {
  margin-top: 18px;
  padding: 15px 17px;
  background: #ece6da;
  border-radius: 12px;
}

.review-owner-response strong { display: block; margin-bottom: 6px; }

.reviews-empty { padding: 28px; color: #666862; }

/* The shop already has generous spacing at the end of its configurator. Keep reviews close to checkout. */
.shop-main { padding-bottom: 18px !important; }
.shop-main .shop-hero { padding-bottom: 42px !important; }

.shop-review-top-link {
  margin: 16px 0 0;
  color: var(--muted, #666862);
  font-size: .92rem;
  line-height: 1.5;
}

.shop-review-top-link a {
  color: inherit;
  font-weight: 800;
}

.shop-reviews-preview {
  width: min(100% - 32px, 1100px);
  margin: 4px auto 72px;
  padding: clamp(22px, 4vw, 34px);
}

.shop-reviews-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.shop-reviews-preview-head h2 { margin: 0 0 5px; }
.shop-reviews-preview-head a { font-weight: 800; color: inherit; }

.shop-review-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.shop-review-mini {
  padding: 18px;
  border-radius: 13px;
  background: #f5f0e6;
}

.shop-review-mini p { margin: 8px 0 12px; line-height: 1.5; }
.shop-review-mini small { color: #666862; }

@media (max-width: 720px) {
  .shop-main .shop-hero { padding-bottom: 28px !important; }
  .shop-review-cards { grid-template-columns: 1fr; }
  .shop-reviews-preview-head,
  .review-card-head { align-items: start; flex-direction: column; }
}
