/* ─────────────────────────────────────────────────────────────────────
   Product reviews
   Section shell, rating display, review list, photo grid, and the
   review form. Dark, gold-accented to match the product page.
   ───────────────────────────────────────────────────────────────────── */

.eman-reviews {
  padding: clamp(48px, 7vw, 96px) clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, #0d0a07 0%, #12100c 100%);
}

.eman-reviews-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.eman-reviews-head {
  margin-bottom: clamp(28px, 4vw, 44px);
}

.eman-reviews-heading {
  margin: 0;
  color: var(--sp-cream, #f4ebdd);
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.eman-reviews-sub {
  margin: 8px 0 0;
  color: var(--sp-muted, #b4a89a);
  font-size: 14px;
}

.eman-reviews-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

/* ── Summary column ──────────────────────────────────────────────── */

.eman-reviews-summary {
  position: sticky;
  top: 24px;
  padding: 24px;
  border: 1px solid rgba(201, 164, 92, 0.18);
  border-radius: 16px;
  background: var(--color-card);
}

.eman-reviews-score {
  display: grid;
  justify-items: start;
  gap: 6px;
}

.eman-reviews-score-num {
  color: var(--sp-cream, #f4ebdd);
  font-family: var(--font-heading, Georgia, serif);
  font-size: 52px;
  line-height: 1;
}

.eman-reviews-score-count {
  color: var(--sp-muted, #b4a89a);
  font-size: 12.5px;
}

.eman-reviews-bars {
  display: grid;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.eman-reviews-bar {
  display: grid;
  grid-template-columns: 42px 1fr 30px;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
  color: var(--sp-muted, #b4a89a);
}

.eman-reviews-bar-label {
  white-space: nowrap;
}

.eman-reviews-bar-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(36, 26, 16, 0.10);
  overflow: hidden;
}

.eman-reviews-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sp-gold-light, #e0c07f), var(--sp-gold, #c9a45c));
}

.eman-reviews-bar-count {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.eman-reviews-empty {
  margin: 0;
  color: var(--sp-muted, #b4a89a);
  font-size: 13.5px;
  line-height: 1.6;
}

.eman-reviews-jump {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 22px;
  padding: 11px 18px;
  border: 1px solid rgba(201, 164, 92, 0.4);
  border-radius: 999px;
  color: var(--sp-gold, #c9a45c);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.eman-reviews-jump:hover,
.eman-reviews-jump:focus-visible {
  background: var(--sp-gold, #c9a45c);
  color: #16110a;
  outline: none;
}

/* ── Star rendering ──────────────────────────────────────────────── */

/* Two stacked rows of five stars; the gold row is clipped to the rating.
   Reads correctly for screen readers via the parent's role="img". */
.eman-stars {
  position: relative;
  display: inline-block;
  font-size: var(--eman-stars-size, 16px);
  line-height: 1;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.eman-stars-base {
  color: rgba(36, 26, 16, 0.18);
}

.eman-stars-gold {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--eman-stars-fill, 0%);
  color: var(--sp-gold, #c9a45c);
  overflow: hidden;
}

/* ── Review list ─────────────────────────────────────────────────── */

.eman-reviews-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.eman-review {
  padding: 22px 24px;
  border: 1px solid rgba(36, 26, 16, 0.10);border-radius: 14px;background: var(--color-card);
}

/* No CSS-only trimming: without JavaScript the visitor simply sees every
   review, which is the honest fallback. product-reviews.js collapses the list
   to --eman-reviews-visible and wires up the "show more" button. */
.eman-review.is-collapsed {
  display: none;
}

.eman-review-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.eman-review-author {
  color: var(--sp-cream, #f4ebdd);
  font-size: 13.5px;
  font-weight: 600;
}

.eman-review-verified {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(30, 125, 79, 0.16);
  color: #7ad3a6;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eman-review-date {
  margin-left: auto;
  color: rgba(36, 26, 16, 0.55);
  font-size: 12px;
}

.eman-review-body {
  margin-top: 12px;
  color: rgba(36, 26, 16, 0.86);
  font-size: 14px;
  line-height: 1.72;
}

.eman-review-body p {
  margin: 0 0 10px;
}

.eman-review-body p:last-child {
  margin-bottom: 0;
}

.eman-review-body ul,
.eman-review-body ol {
  margin: 0 0 10px;
  padding-left: 20px;
}

/* ── Photos ──────────────────────────────────────────────────────── */

.eman-review-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.eman-review-photo-item {
  margin: 0;
}

.eman-review-photos a {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(36, 26, 16, 0.14);
  border-radius: 10px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.eman-review-photos a:hover,
.eman-review-photos a:focus-visible {
  border-color: var(--sp-gold, #c9a45c);
  outline: none;
  transform: translateY(-2px);
}

.eman-review-photos img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: cover;
}

.eman-reviews-more {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(201, 164, 92, 0.3);
  border-radius: 12px;
  background: none;
  color: var(--sp-gold, #c9a45c);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.eman-reviews-more:hover,
.eman-reviews-more:focus-visible {
  background: rgba(201, 164, 92, 0.12);
  outline: none;
}

.eman-reviews-more[hidden] {
  display: none;
}

/* ── Notices ─────────────────────────────────────────────────────── */

.eman-reviews-notice {
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 11px;
  font-size: 13.5px;
}

.eman-reviews-notice.is-success {
  border: 1px solid rgba(30, 125, 79, 0.42);
  background: rgba(30, 125, 79, 0.14);
  color: #7ad3a6;
}

.eman-reviews-notice.is-error {
  border: 1px solid rgba(200, 90, 78, 0.42);
  background: rgba(200, 90, 78, 0.12);
  color: #e0a49c;
}

/* ── Form ────────────────────────────────────────────────────────── */

.eman-review-form {
  margin-top: 26px;
  padding: clamp(22px, 3vw, 32px);
  border: 1px solid rgba(201, 164, 92, 0.18);
  border-radius: 16px;
  background: var(--color-card);
}

.eman-review-form-title {
  margin: 0;
  color: var(--sp-cream, #f4ebdd);
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(20px, 2.4vw, 25px);
  font-weight: 400;
}

.eman-review-form-intro {
  margin: 7px 0 0;
  color: var(--sp-muted, #b4a89a);
  font-size: 13px;
}

.eman-review-form-stars {
  margin: 26px 0 0;
  padding: 0;
  border: 0;
}

.eman-review-form-legend,
.eman-review-form-field > label {
  display: block;
  margin-bottom: 9px;
  padding: 0;
  color: rgba(36, 26, 16, 0.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eman-review-required {
  color: var(--sp-gold, #c9a45c);
}

.eman-review-optional {
  color: rgba(180, 168, 154, 0.7);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

/* Interactive stars: radios are invisible, labels are the visible glyphs.
   Source order is 5→1, so reverse the row to get 1→5 visually. */
.eman-reviews .eman-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eman-review-stars {
  position: relative;
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}

.eman-review-stars input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.eman-review-stars label {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #978875;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, transform 0.15s ease;
}

.eman-review-stars label:hover {
  transform: scale(1.12);
}

/* Fill everything up to the chosen rating. */
.eman-review-stars input:checked ~ label {
  color: #7a5c22;
}

.eman-review-stars:has(label:hover) label {
  color: #978875;
}

.eman-review-stars:has(label:hover) label:hover,
.eman-review-stars:has(label:hover) label:hover ~ label {
  color: #7a5c22;
}

.eman-review-stars input:focus-visible + label {
  outline: 2px solid #7a5c22;
  outline-offset: 3px;
}

.eman-review-stars-value {
  margin: 6px 0 0;
  color: var(--sp-muted, #b4a89a);
  font-size: 12.5px;
}

.eman-review-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.eman-review-form-field {
  margin-top: 20px;
}

.eman-review-form-row .eman-review-form-field {
  margin-top: 0;
}

.eman-review-form input[type="text"],
.eman-review-form input[type="email"],
.eman-review-form textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(36, 26, 16, 0.2);
  border-radius: 10px;
  background: #ffffff;
  color: var(--sp-cream, #f4ebdd);
  font: inherit;
  font-size: 14px;
  outline: 0;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.eman-review-form input[type="text"]:focus,
.eman-review-form input[type="email"]:focus,
.eman-review-form textarea:focus {
  border-color: var(--sp-gold, #c9a45c);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.16);
}

.eman-review-form-note {
  margin: 7px 0 0;
  color: rgba(180, 168, 154, 0.7);
  font-size: 11.5px;
  line-height: 1.5;
}

/* ── Editor ──────────────────────────────────────────────────────── */

.eman-review-editor {
  overflow: hidden;
  border: 1px solid rgba(36, 26, 16, 0.2);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.eman-review-editor:focus-within {
  border-color: var(--sp-gold, #c9a45c);
  box-shadow: 0 0 0 3px rgba(201, 164, 92, 0.16);
}

.eman-review-toolbar {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 7px 8px;
  border-bottom: 1px solid rgba(36, 26, 16, 0.10);background: rgba(36, 26, 16, 0.04);
}

.eman-review-tool {
  display: grid;
  width: 30px;
  height: 28px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: rgba(36, 26, 16, 0.72);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.eman-review-tool:hover,
.eman-review-tool:focus-visible {
  border-color: rgba(201, 164, 92, 0.4);
  background: rgba(201, 164, 92, 0.14);
  color: var(--sp-gold, #c9a45c);
  outline: none;
}

.eman-review-toolbar-hint {
  margin-left: auto;
  padding-right: 4px;
  color: rgba(180, 168, 154, 0.55);
  font-size: 10.5px;
  letter-spacing: 0.04em;
}

.eman-review-editor textarea {
  display: block;
  min-height: 132px;
  padding: 14px;
  border: 0;
  border-radius: 0;
  background: none;
  resize: vertical;
}

.eman-review-editor textarea:focus {
  box-shadow: none;
}

.eman-review-counter {
  margin: 0;
  padding: 0 14px 11px;
  color: rgba(180, 168, 154, 0.6);
  font-size: 11.5px;
  text-align: right;
}

.eman-review-counter.is-short {
  color: #e0a49c;
}

.eman-review-counter.is-good {
  color: #7ad3a6;
}

/* ── Uploader ────────────────────────────────────────────────────── */

.eman-review-form-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.eman-review-uploader input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.eman-review-dropzone {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px dashed rgba(201, 164, 92, 0.4);
  border-radius: 12px;
  background: rgba(201, 164, 92, 0.05);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.eman-review-dropzone:hover,
.eman-review-dropzone:focus-visible,
.eman-review-dropzone.is-dragover {
  border-color: var(--sp-gold, #c9a45c);
  background: rgba(201, 164, 92, 0.11);
  outline: none;
}

.eman-review-dropzone-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(201, 164, 92, 0.45);
  border-radius: 50%;
  color: var(--sp-gold, #c9a45c);
  font-size: 21px;
  line-height: 1;
}

.eman-review-dropzone-text {
  display: grid;
  gap: 3px;
  color: var(--sp-muted, #b4a89a);
  font-size: 12.5px;
}

.eman-review-dropzone-text strong {
  color: var(--sp-cream, #f4ebdd);
  font-size: 13.5px;
}

.eman-review-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.eman-review-previews:empty {
  display: none;
}

.eman-review-preview {
  position: relative;
  margin: 0;
}

.eman-review-preview img {
  display: block;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(36, 26, 16, 0.15);
  border-radius: 9px;
  object-fit: cover;
}

.eman-review-preview-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  background: #16110a;
  color: #f4ebdd;
  font: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.eman-review-preview-remove:hover,
.eman-review-preview-remove:focus-visible {
  background: var(--sp-gold, #c9a45c);
  color: #16110a;
  outline: none;
}

.eman-review-submit {
  width: 100%;
  min-height: 52px;
  margin-top: 24px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sp-gold-light, #e0c07f), var(--sp-gold, #c9a45c));
  box-shadow: 0 12px 28px rgba(201, 164, 92, 0.26);
  color: #16110a;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.eman-review-submit:hover,
.eman-review-submit:focus-visible {
  box-shadow: 0 16px 34px rgba(201, 164, 92, 0.38);
  filter: brightness(1.06);
  outline: none;
  transform: translateY(-2px);
}

.eman-review-moderation {
  margin: 12px 0 0;
  color: rgba(180, 168, 154, 0.62);
  font-size: 11.5px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .eman-reviews-layout {
    grid-template-columns: 1fr;
  }

  .eman-reviews-summary {
    position: static;
  }
}

@media (max-width: 620px) {
  .eman-review-form-row {
    grid-template-columns: 1fr;
  }

  .eman-review-date {
    margin-left: 0;
    width: 100%;
  }

  .eman-review-toolbar-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .eman-reviews *,
  .eman-review-photos a,
  .eman-review-stars label,
  .eman-review-submit {
    animation: none;
    transition: none;
  }
}

/* LIGHT THEME: this stylesheet reuses the signup popup's --sp-* aliases,
   which are no longer enqueued; give the reviews UI light-surface values. */
.eman-reviews {
  --sp-gold: var(--color-gold);
  --sp-gold-light: var(--color-gold-light);
  --sp-cream: var(--color-cream);
  --sp-muted: var(--color-text);
  --sp-white: var(--color-white);
}
