/* ───────────────────────────────────────────────────────────────────────────
   reviews-v1.css — product page Reviews block, V1 (default desc_style).
   1:1 Figma source: node 243:23868 (BobrCraft / Reviews block).

   Token strategy: every paint colour goes through a CSS-var on `.rev-block`
   so admin / dark-mode overrides can re-paint without touching component
   selectors.  Sizing follows OneTap's 4-breakpoint convention.
   ─────────────────────────────────────────────────────────────────────────── */

.rev-block {
  --rev-text:        #131314;
  --rev-text-sub:    #7D7D7D;
  --rev-border:      #DDDDDD;
  --rev-yellow:      #F79E02;
  --rev-green:       #0FA379;
  --rev-btn-brown:   #392923;
  --rev-card-bg:     #FFFFFF;
  --rev-thumb-bg:    #F7F7F7;
  --rev-font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 16px;
  border-radius: 10px;
  background: var(--rev-card-bg);
  color: var(--rev-text);
  font-family: var(--rev-font);
}

/* ── Heading "Reviews" ─────────────────────────────────────────────────── */
.rev-block__heading {
  align-self: stretch;
  margin: 0;
  font: 600 16px/1.375 var(--rev-font);
  color: var(--rev-text);
  text-align: left;
}

/* ── Header row: summary | metrics | CTA ──────────────────────────────── */
.rev-block__header {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: stretch;
  gap: 40px;
}

/* Summary block (4.9 + ⭐ on top, "228 reviews" below). */
.rev-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.rev-summary__score-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.rev-summary__score {
  font: 500 48px/1.21 var(--rev-font);
  color: var(--rev-text);
}
.rev-summary__star {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: var(--rev-yellow);
}
.rev-summary__total {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 400 16px/1.375 var(--rev-font);
  color: var(--rev-text-sub);
}
.rev-summary__total-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: currentColor;
}

/* Sub-metrics row — 4 fixed-width 140px cards. */
.rev-metrics {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}
.rev-metric {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 140px;
  flex: 0 0 140px;
}
.rev-metric__ring {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: block;
}
.rev-metric__label {
  font: 400 14px/1.4286 var(--rev-font);
  color: var(--rev-text);
  /* Two-line wrap allowed inside fixed 140px container — last 2 labels are
     long ("Customer service", "Would recommend") and wrap naturally. */
  word-break: break-word;
}

/* CTA — "Leave a review" button. */
.rev-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  height: 48px;
  border-radius: 10px;
  background: var(--rev-btn-brown);
  color: #FFFFFF;
  border: 0;
  cursor: pointer;
  font: 500 16px/1.25 var(--rev-font);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, transform 0.05s ease;
}
.rev-cta:hover { background: #4a3528; color: #FFFFFF; text-decoration: none; }
.rev-cta:active { transform: translateY(1px); }
.rev-cta:focus-visible { outline: 2px solid var(--rev-yellow); outline-offset: 2px; }

/* ── Reviews list ─────────────────────────────────────────────────────── */
.rev-list {
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

/* Per-review card. Padding-only spacing — border-bottom is the visual
   separator between consecutive items. */
.rev-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: stretch;
  padding: 24px 0;
  border-bottom: 1px solid var(--rev-border);
}
.rev-item:last-child {
  /* Last item drops the divider so the row doesn't crowd the "More reviews"
     button below. */
  border-bottom: 0;
}

/* Item header: profile column (avatar + name + verified) | date column. */
.rev-item__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-self: stretch;
}
.rev-item__profile-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rev-item__profile-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.rev-item__avatar {
  width: 40px;
  height: 40px;
  border-radius: 100px;
  background: var(--rev-border);
  color: var(--rev-text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 18px/1.21 var(--rev-font);
  text-transform: uppercase;
  flex: 0 0 auto;
  overflow: hidden;
}
.rev-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.rev-item__avatar--placeholder svg {
  width: 22px;
  height: 22px;
  color: var(--rev-text-sub);
}
.rev-item__name {
  font: 600 14px/1.4286 var(--rev-font);
  color: var(--rev-text);
}
.rev-item__verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--rev-green);
  font: 400 12px/1.21 var(--rev-font);
}
.rev-item__verified-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
}
.rev-item__stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--rev-yellow);
}
.rev-item__stars .fa { font-size: 16px; }
.rev-item__date {
  font: 400 14px/1.21 var(--rev-font);
  color: var(--rev-text-sub);
  white-space: nowrap;
}

/* Body row — text (fill) + optional 80×64 media thumbnail (right). */
.rev-item__body {
  display: flex;
  flex-direction: row;
  align-self: stretch;
  gap: 16px;
}
.rev-item__text {
  flex: 1 1 auto;
  min-width: 0;
  font: 400 14px/1.4286 var(--rev-font);
  color: var(--rev-text);
  text-align: left;
  word-break: break-word;
}
.rev-item__media {
  position: relative;
  width: 80px;
  height: 64px;
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  background: var(--rev-thumb-bg);
  cursor: zoom-in;
  display: block;
}
.rev-item__media img,
.rev-item__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.rev-item__media-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 100px;
  background: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rev-text);
  pointer-events: none;
}
.rev-item__media-play svg { width: 16px; height: 16px; }
.rev-item__media-count {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.55);
  color: #FFFFFF;
  font: 600 11px/1 var(--rev-font);
  padding: 2px 6px;
  border-radius: 999px;
  pointer-events: none;
}

/* ── Store reply ──────────────────────────────────────────────────────── */
.rev-reply {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-self: stretch;
}
.rev-reply__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--rev-text);
}
.rev-reply__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}
.rev-reply__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  gap: 12px;
}
.rev-reply__author {
  font: 600 14px/1.4286 var(--rev-font);
  color: var(--rev-text);
}
.rev-reply__date {
  font: 400 14px/1.4286 var(--rev-font);
  color: var(--rev-text-sub);
  white-space: nowrap;
}
.rev-reply__text {
  font: 400 14px/1.4286 var(--rev-font);
  color: var(--rev-text);
  text-align: left;
  word-break: break-word;
}

/* ── "More reviews" footer button ─────────────────────────────────────── */
.rev-show-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 8px 4px;
  cursor: pointer;
  color: var(--rev-text);
  font: 400 16px/1.375 var(--rev-font);
  align-self: center;
  text-decoration: none;
}
.rev-show-more:hover { color: var(--rev-btn-brown); text-decoration: none; }
.rev-show-more svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

/* ────────────────────────────────────────────────────────────────────────
   Responsive breakpoints — OneTap 4-step convention.
   ──────────────────────────────────────────────────────────────────────── */

/* Laptop ≤1366px — slightly tighter gap so 4 metric cards still fit one row
   on the inner content column. */
@media (max-width: 1366px) {
  .rev-block__header { gap: 24px; }
  .rev-metrics { gap: 12px; }
}

/* Mid-width ≤1199px — once the right sidebar (Shipping etc.) eats into the
   content column, the single-row "summary | 4 metrics | CTA" layout no longer
   fits at ~720px wide and the metric labels collide with the score block.
   Break early: summary + CTA stay on the top row, metrics drop to their own
   full-width row underneath. Same shape as the previous ≤991 rule — just
   triggered sooner so we never hit the broken intermediate state. */
@media (max-width: 1199px) {
  .rev-block__header { gap: 20px; flex-wrap: wrap; }
  .rev-summary  { order: 1; align-items: flex-start; }
  .rev-cta      { order: 2; margin-left: auto; }
  .rev-metrics  { width: 100%; order: 3; justify-content: space-between; flex-wrap: wrap; row-gap: 12px; }
  .rev-metric   { flex: 0 1 auto; min-width: 0; }
}

/* Mobile ≤500px — per Figma:
   • Top row: big "4.9 ⭐" + "💬 228 reviews" on the LEFT, "Leave a review"
     button on the RIGHT (NOT stacked).
   • Bottom row: 4 metric rings in a SINGLE row (column layout: ring above,
     label centered below across two lines if needed). Rings are 60×60. */
@media (max-width: 500px) {
  .rev-block__header {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 12px;
  }
  .rev-summary {
    order: 1;
    align-items: flex-start;
    flex: 0 0 auto;
    gap: 8px;
  }
  .rev-summary__score { font-size: 36px; }
  .rev-summary__star  { width: 32px; height: 32px; }
  .rev-summary__total { font-size: 14px; }

  .rev-cta {
    order: 2;
    margin-left: auto;
    width: auto;
    height: 48px;
    padding: 12px 20px;
    font-size: 15px;
    flex: 0 0 auto;
  }

  /* 4 metrics in ONE row, each card takes equal flex share. Ring above,
     label below — vertical stack inside each card. */
  .rev-metrics {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: space-between;
  }
  .rev-metric {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .rev-metric__ring {
    width: 60px;
    height: 60px;
  }
  .rev-metric__label {
    font-size: 13px;
    line-height: 1.3;
    text-align: center;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Reviews list — body row collapses to column on mobile so the 80×64
     thumbnail sits below the text instead of squeezing it sideways. */
  .rev-item__body {
    flex-direction: column;
    gap: 12px;
  }
  .rev-item__header { gap: 8px; }
  .rev-item__date { font-size: 13px; }
}
