:root {
  --reviews-accent: #111214;
  --reviews-accent-soft: #f2f2f3;
  --reviews-star: #ffcc00;
  --reviews-blue: var(--reviews-accent);
  --reviews-green: var(--reviews-accent);
  --reviews-ink: #111214;
  --reviews-muted: #74777d;
  --reviews-line: #e7e8ea;
  --reviews-panel: #ffffff;
}

main.reviews-page {
  flex: 1;
  padding: 48px 0 64px;
  background: #fff;
}

.reviews-page .container { max-width: 1400px; }

.reviews-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}

.reviews-eyebrow {
  display: block;
  margin-bottom: 9px;
  color: var(--reviews-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.reviews-page .page-title {
  margin: 0 0 9px;
  color: var(--reviews-ink);
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-transform: none;
}

.reviews-intro {
  margin: 0;
  color: var(--reviews-muted);
  font-size: 14px;
  line-height: 1.55;
}

.write-review-btn {
  min-width: 190px;
  border: 1px solid #111;
  border-radius: 10px;
  background: #111;
  color: #fff;
  padding: 14px 20px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.write-review-btn:hover { background: #303033; transform: translateY(-1px); }
.write-review-btn::before { content: '+'; margin-right: 9px; color: #fff; font-size: 20px; font-weight: 400; line-height: 0; vertical-align: -1px; }

.reviews-summary {
  display: grid;
  grid-template-columns: minmax(220px, .55fr) minmax(0, 1.45fr);
  border: 1px solid var(--reviews-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--reviews-panel);
}

.summary-cell {
  min-height: 170px;
  padding: 25px;
  border-right: 1px solid var(--reviews-line);
}

.summary-cell:last-child { border-right: 0; }
.summary-label { color: var(--reviews-muted); font-size: 11px; line-height: 1.45; }

.rating-overview { text-align: center; }
.rating-number { margin: 11px 0 4px; font-size: 47px; font-weight: 800; letter-spacing: -.05em; line-height: 1; }
.rating-stars { color: var(--reviews-star); font-size: 21px; letter-spacing: 2px; white-space: nowrap; }
.rating-count { margin-top: 12px; color: var(--reviews-muted); font-size: 10px; }

.rating-bars { display: grid; gap: 10px; align-content: center; padding-left: 34px; padding-right: 34px; }
.rating-bar-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: center; gap: 13px; width: 100%; font-size: 10px; color: var(--reviews-muted); }
.rating-bar-label { color: var(--reviews-ink); font-weight: 600; }
.rating-bar-label span { color: var(--reviews-star); }
.rating-track { height: 6px; border-radius: 999px; background: #eceef1; overflow: hidden; }
.rating-fill { display: block; height: 100%; border-radius: inherit; background: var(--reviews-blue); transition: width .4s ease; }

.reviews-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 12px;
}

.review-select {
  min-width: 180px;
  border: 1px solid var(--reviews-line);
  border-radius: 9px;
  background: #fff;
  color: var(--reviews-ink);
  padding: 11px 36px 11px 14px;
  font: 600 11px/1.2 inherit;
  cursor: pointer;
}

.reviews-list { display: grid; gap: 14px; max-width: none; margin: 0; }

.review-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  padding: 28px 30px;
  overflow: hidden;
  border: 1px solid #e5e6e8;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #fff 72%, #f7f7f8 100%);
  box-shadow: 0 8px 30px rgba(18,20,24,.035);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.review-card:hover { transform: translateY(-2px); border-color: #dadbdd; box-shadow: 0 18px 50px rgba(18,20,24,.075); }
.review-main { min-width: 0; }
.review-author-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.review-avatar { width: 50px; height: 50px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #dedfe2; border-radius: 50%; background: linear-gradient(145deg, #f9f9fa, #ececef); color: #1b1c1f; box-shadow: inset 0 0 0 5px rgba(255,255,255,.68); font-size: 18px; font-weight: 700; }
.review-author-copy { min-width: 0; }
.review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 6px; }
.review-name { color: var(--reviews-ink); font-size: 16px; font-weight: 750; letter-spacing: -.02em; }
.review-auth-mark { width: 14px; height: 14px; flex: 0 0 auto; display: block; object-fit: contain; opacity: .72; transform: translateY(-1px); }
.review-rating-row { display: flex; align-items: center; gap: 10px; }
.review-stars { color: var(--reviews-star); font-size: 17px; letter-spacing: 2px; white-space: nowrap; text-shadow: 0 4px 12px rgba(255,204,0,.12); }
.review-score { color: #686c73; font-size: 10px; font-weight: 650; }
.review-comment { position: relative; display: flex; gap: 10px; max-width: 930px; color: #35383d; font-size: 13px; font-weight: 450; line-height: 1.75; white-space: pre-line; }
.review-quote { flex: 0 0 auto; margin-top: -6px; color: var(--reviews-accent); font-family: Georgia, serif; font-size: 30px; line-height: 1; opacity: .8; }
.review-criteria { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); max-width: 920px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #eceef0; }
.review-criterion { min-width: 0; padding: 0 18px; border-left: 1px solid #eceef0; }
.review-criterion:first-child { padding-left: 0; border-left: 0; }
.review-criterion-label { display: block; margin-bottom: 8px; overflow: hidden; color: #62666d; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.review-criterion-stars { display: block; color: var(--reviews-star); font-size: 13px; letter-spacing: 1.5px; white-space: nowrap; }
.review-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 20px; color: #8b8f96; font-size: 9px; }
.review-meta > * { display: inline-flex; align-items: center; gap: 7px; }
.review-meta > *::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #c9ccd1; }
.review-date::before { background: var(--reviews-accent); }
.review-source { color: #696d74; font-weight: 600; }

.review-photos { position: relative; z-index: 1; display: flex; align-self: center; align-items: center; gap: 8px; max-width: 330px; padding: 8px; border: 1px solid #e6e7e9; border-radius: 15px; background: rgba(255,255,255,.88); box-shadow: 0 10px 28px rgba(18,20,24,.06); }
.review-photo-button { display: block; padding: 0; border: 0; border-radius: 10px; background: transparent; line-height: 0; cursor: zoom-in; }
.review-photo {
  width: 154px;
  height: 126px;
  border: 0;
  border-radius: 10px;
  object-fit: cover;
  background: #f4f4f5;
  transition: transform .2s ease, filter .2s ease;
}
.review-photos:has(.review-photo-button:nth-child(2)) .review-photo { width: 94px; height: 94px; }
.review-photo-button:hover .review-photo { transform: scale(1.018); filter: saturate(1.05); }
.review-photo-button:focus-visible { outline: 2px solid var(--reviews-accent); outline-offset: 3px; }

.reviews-empty { padding: 55px 20px; border: 1px dashed var(--reviews-line); border-radius: 12px; color: var(--reviews-muted); text-align: center; font-size: 13px; }
.reviews-loading { border-style: solid; }

.review-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12,13,15,.48);
  backdrop-filter: blur(6px);
}
.review-modal.active { display: flex; }
.review-modal-card { width: min(680px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 18px; background: #fff; box-shadow: 0 25px 70px rgba(0,0,0,.2); font-family: 'Montserrat', sans-serif; }
.review-modal-head { display: flex; justify-content: space-between; gap: 20px; padding: 28px 30px 21px; border-bottom: 1px solid var(--reviews-line); }
.review-modal-title { margin: 0 0 7px; color: var(--reviews-ink); font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.review-modal-subtitle { margin: 0; max-width: 500px; color: var(--reviews-muted); font-size: 13px; font-weight: 400; line-height: 1.55; }
.review-modal-close { width: 38px; height: 38px; flex: 0 0 auto; border: 0; border-radius: 50%; background: #f4f4f5; color: #333; font-size: 23px; cursor: pointer; }
.review-form { display: grid; gap: 20px; padding: 26px 30px 30px; }
.review-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.review-field { display: grid; gap: 8px; }
.review-field label { color: #34363a; font-size: 13px; font-weight: 600; line-height: 1.4; }
.review-field input, .review-field textarea {
  width: 100%;
  border: 1px solid var(--reviews-line);
  border-radius: 9px;
  padding: 13px 14px;
  background: #fff;
  color: #161719;
  font: 400 14px/1.5 inherit;
  outline: none;
}
.review-field textarea { min-height: 125px; resize: vertical; }
.review-field input:focus, .review-field textarea:focus { border-color: #111214; box-shadow: 0 0 0 3px rgba(17,18,20,.08); }
.review-questions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review-question { min-width: 0; margin: 0; padding: 15px 16px 14px; border: 1px solid var(--reviews-line); border-radius: 11px; background: #fafafa; }
.review-question legend { width: 100%; padding: 0; color: #34363a; font-size: 12px; font-weight: 600; line-height: 1.4; }
.rating-inputs { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 3px; margin-top: 10px; }
.rating-inputs input { position: absolute; opacity: 0; pointer-events: none; }
.rating-inputs label { color: #d4d6da; font-size: 29px; line-height: 1; cursor: pointer; transition: color .15s ease, transform .15s ease; }
.rating-inputs label:hover { transform: translateY(-1px); }
.rating-inputs label:hover, .rating-inputs label:hover ~ label, .rating-inputs input:checked ~ label { color: var(--reviews-star); }
.rating-inputs input:focus-visible + label { outline: 2px solid var(--reviews-accent); outline-offset: 3px; border-radius: 3px; }
.photo-help { color: var(--reviews-muted); font-size: 11px; line-height: 1.5; }
.review-consent { display: flex; gap: 9px; align-items: flex-start; color: var(--reviews-muted); font-size: 11px; line-height: 1.5; }
.review-consent input { margin-top: 1px; }
.review-submit { border: 0; border-radius: 10px; padding: 15px 18px; background: #111; color: #fff; font: 600 13px/1.2 inherit; cursor: pointer; }
.review-submit:disabled { opacity: .55; cursor: wait; }
.review-form-status { min-height: 16px; color: var(--reviews-muted); font-size: 12px; line-height: 1.5; }
.review-form-status.is-success { color: var(--reviews-green); }
.review-form-status.is-error { color: var(--reviews-ink); }
.telegram-option { padding-top: 15px; border-top: 1px solid var(--reviews-line); color: var(--reviews-muted); font-size: 12px; line-height: 1.55; }

body.dialog-open { overflow: hidden; }
.review-success-toast[hidden], .reviews-toolbar[hidden] { display: none; }
.review-success-toast {
  pointer-events: none;
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 2600;
  display: flex;
  align-items: center;
  gap: 13px;
  width: min(620px, calc(100% - 32px));
  padding: 16px 18px;
  border: 1px solid #bfe6cb;
  border-radius: 13px;
  background: #effaf2;
  color: #185b2f;
  box-shadow: 0 18px 55px rgba(18, 86, 43, .18);
  opacity: 0;
  transform: translate(-50%, -14px);
  transition: opacity .22s ease, transform .22s ease;
}
.review-success-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.review-success-toast strong, .review-success-toast span { display: block; }
.review-success-toast strong { margin-bottom: 3px; font-size: 13px; }
.review-success-toast span { font-size: 11px; line-height: 1.45; }
.review-success-icon { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #d8f2df; color: #16823a; font-size: 18px; font-weight: 800; }

.review-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 84px;
  background: rgba(8,9,11,.88);
  backdrop-filter: blur(10px);
}
.review-lightbox.active { display: flex; }
.lightbox-figure { max-width: min(1100px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; }
.lightbox-figure img { display: block; max-width: 100%; max-height: calc(100vh - 150px); border-radius: 12px; object-fit: contain; box-shadow: 0 22px 70px rgba(0,0,0,.35); }
.lightbox-figure figcaption { min-height: 17px; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.4; text-align: center; }
.lightbox-close { position: absolute; top: 22px; right: 26px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; width: 48px; height: 58px; margin-top: -29px; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 38px; line-height: 1; cursor: pointer; }
.lightbox-nav:hover, .lightbox-close:hover { background: rgba(255,255,255,.22); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-nav[hidden] { display: none; }

@media (max-width: 1120px) {
  .reviews-summary { grid-template-columns: minmax(190px, .65fr) minmax(0, 1.35fr); }
  .summary-cell { padding: 20px 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .review-card, .review-photo, .rating-fill, .rating-inputs label, .review-success-toast, .write-review-btn { transition: none; }
  .review-card:hover, .write-review-btn:hover, .rating-inputs label:hover { transform: none; }
}
/* Responsive reviews, matching the storefront's mobile spacing and panels. */
@media (min-width: 768px) and (max-width: 1120px) {
  .review-card { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .review-criteria { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .review-criterion:nth-child(odd) { padding-left: 0; border-left: 0; }
  .review-photos { justify-self: start; }
}
@media (max-width: 767px) {
  .reviews-body main.reviews-page { padding: 24px 0 32px; }
  .reviews-hero { flex-direction: column; align-items: stretch; gap: 20px; margin-bottom: 20px; }
  .reviews-eyebrow { font-size: 9px; letter-spacing: .08em; margin-bottom: 10px; }
  .reviews-page .page-title { font-size: 30px; line-height: 1.1; margin-bottom: 10px; letter-spacing: -.04em; text-transform: uppercase; }
  .reviews-intro { max-width: 440px; font-size: 13px; line-height: 1.6; }
  .write-review-btn { width: 100%; min-height: 46px; min-width: 0; padding: 12px 16px; border-radius: 10px; }
  .write-review-btn:hover { transform: none; }
  .reviews-summary { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border-radius: 13px; }
  .summary-cell { min-width: 0; min-height: 164px; padding: 18px 12px; }
  .summary-label { font-size: 10px; }
  .rating-number { font-size: 44px; margin: 10px 0 5px; }
  .rating-stars { font-size: 17px; letter-spacing: 1px; }
  .rating-count { margin-top: 8px; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
  .rating-bars { gap: 10px; padding: 18px 12px; }
  .rating-bar-row { grid-template-columns: 23px minmax(0, 1fr) 22px; gap: 6px; font-size: 9px; }
  .rating-bar-row > :last-child { text-align: right; overflow-wrap: anywhere; }
  .rating-track { height: 4px; background: #e4e4e8; }
  .reviews-toolbar { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 10px; margin: 22px 0 14px; }
  .review-select { min-width: 0; width: 100%; min-height: 44px; padding: 10px 24px 10px 10px; font-family: inherit; font-size: 11px; font-weight: 400; text-overflow: ellipsis; }
  .reviews-list { gap: 12px; }
  .review-card, .review-card:hover { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 18px 16px; border: 1px solid #eeeef1; border-radius: 13px; background: #fff; box-shadow: none; transform: none; }
  .review-author-row { gap: 10px; margin-bottom: 16px; }
  .review-avatar { width: 38px; height: 38px; font-size: 14px; box-shadow: none; background: #f3f3f5; border: 0; }
  .review-head { gap: 6px; margin-bottom: 4px; }
  .review-name { font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
  .review-stars { font-size: 14px; letter-spacing: 1px; text-shadow: none; }
  .review-score { font-size: 9px; }
  .review-rating-row { gap: 8px; }
  .review-comment { font-size: 12px; line-height: 1.7; gap: 0; }
  .review-comment > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  .review-quote { display: none; }
  .review-criteria { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin-top: 18px; padding-top: 16px; }
  .review-criterion { padding: 0; border: 0; }
  .review-criterion-label { font-size: 9px; line-height: 1.5; margin-bottom: 4px; white-space: normal; }
  .review-criterion-stars { font-size: 12px; letter-spacing: 1px; }
  .review-meta { margin-top: 16px; gap: 8px 12px; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
  .review-photos { width: 100%; max-width: none; padding: 0; gap: 8px; border: 0; border-radius: 0; box-shadow: none; background: none; overflow-x: auto; overscroll-behavior-x: contain; }
  .review-photo-button { flex: 0 0 auto; }
  .review-photo, .review-photos:has(.review-photo-button:nth-child(2)) .review-photo { width: 82px; height: 82px; border-radius: 8px; }
  .reviews-empty { padding: 36px 18px; font-size: 12px; line-height: 1.6; }
  .review-modal { align-items: flex-end; padding: 0; z-index: 3100; }
  .review-modal-card { display: flex; flex-direction: column; width: 100%; height: min(92dvh, 920px); max-height: 100dvh; overflow: hidden; border-radius: 20px 20px 0 0; }
  .review-modal-head { flex-shrink: 0; gap: 10px; padding: 20px 16px 16px; }
  .review-modal-title { font-size: 19px; line-height: 1.25; letter-spacing: -.025em; }
  .review-modal-subtitle { margin-top: 8px; font-size: 10px; line-height: 1.5; }
  .review-modal-close { flex: 0 0 44px; width: 44px; height: 44px; margin: -8px -8px 0 0; }
  .review-form { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px max(20px, env(safe-area-inset-bottom)); gap: 18px; }
  .review-form-row, .review-questions { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .review-field { min-width: 0; }
  .review-field label { font-size: 12px; }
  .review-field input, .review-field textarea { width: 100%; min-width: 0; min-height: 46px; padding: 12px; font-family: inherit; font-size: 16px; line-height: 1.5; border-radius: 9px; }
  .review-field input[type=file] { font-size: 12px; padding: 12px 8px; }
  .review-field textarea { min-height: 140px; }
  .review-question { padding: 14px 12px 10px; background: #f8f8fa; border-radius: 10px; }
  .review-question legend { font-size: 12px; line-height: 1.5; }
  .rating-inputs { gap: 2px; margin-top: 8px; }
  .rating-inputs label { display: grid; place-items: center; width: 44px; height: 44px; font-size: 32px; }
  .review-consent { gap: 10px; font-size: 11px; line-height: 1.6; }
  .review-consent input { flex: 0 0 20px; width: 20px; height: 20px; accent-color: #111; }
  .review-submit { min-height: 48px; font-family: inherit; font-size: 12px; }
  .review-lightbox { padding: 64px 12px calc(80px + env(safe-area-inset-bottom)); z-index: 3200; }
  .lightbox-figure img { max-height: calc(100dvh - 180px - env(safe-area-inset-bottom)); border-radius: 8px; }
  .lightbox-figure figcaption { font-size: 11px; }
  .lightbox-close { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; }
  .lightbox-nav { top: auto; bottom: max(18px, env(safe-area-inset-bottom)); width: 52px; height: 46px; margin: 0; }
  .lightbox-prev { left: calc(50% - 60px); }
  .lightbox-next { left: calc(50% + 8px); right: auto; }
  .reviews-body .epc-chat-tooltip { display: none; }
  .review-success-toast { z-index: 3300; top: max(16px, env(safe-area-inset-top)); }
  .reviews-body :is(button, a, select):focus-visible { outline: 2px solid #777; outline-offset: 3px; }
}
@keyframes reviews-mobile-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 767px) and (prefers-reduced-motion: no-preference) {
  .reviews-hero, .reviews-summary, .review-card { animation: reviews-mobile-reveal .3s ease-out; }
  .review-modal.active .review-modal-card { animation: reviews-mobile-reveal .25s ease-out; }
}
