/* ============================================================
   Картка оцінювання — стаття блогу / товар
   Перенесено з референсу .design_handoff_dbags_onyx/Rating B+D.html
   Мобільні правила з класу .m референсу переведені в media-query.
   ============================================================ */

.rate {
  margin-top: 30px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 3px;
  padding: 28px 32px 26px;
  text-align: center;
  transition: border-color .4s;
}
.rate.done { border-color: var(--gold-deep); }

.rate .tick {
  width: 0;
  height: 30px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  color: var(--gold-lite);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .35s;
}
.rate.done .tick {
  width: 30px;
  border: 1px solid var(--gold);
  opacity: 1;
  margin-bottom: 12px;
  animation: rate-pop .45s cubic-bezier(.34,1.56,.64,1);
}
/* стан, відмальований одразу на завантаженні — без стрибка анімації */
.rate.done.rate--init .tick { animation: none; }
.rate .tick svg { width: 15px; height: 15px; flex-shrink: 0; }
@keyframes rate-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

.rate h4 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  color: var(--ink);
  transition: color .3s;
}
.rate.done h4 { color: var(--gold-lite); }
.rate .sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 5px;
}

/* слот підпису НАД зірками — вмикається лише на мобільному */
.rate .mood-top { display: none; }

.rate .stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  touch-action: none;
}
.rate .star {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--muted-2);
  font-family: inherit;
  transition: color .18s, transform .18s;
}
.rate .star svg { width: 30px; height: 30px; display: block; }
.rate .star:hover { transform: scale(1.12); }
.rate .star:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.rate .star.lit { color: var(--gold); }
.rate .star.set { color: var(--gold-lite); transform: scale(1.06); }
.rate.done .stars { pointer-events: none; }

/* ОДИН рядок під зірками: середня → настрій → результат. Без порожньої дірки. */
.rate .swap { position: relative; margin-top: 10px; height: 22px; }
.rate .swap > span {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  transition: opacity .2s;
  line-height: 22px;
}
.rate .swap .avg { font-size: 12.5px; color: var(--muted-2); }
.rate .swap .avg b { color: var(--gold-lite); font-weight: 600; }
.rate .swap .mood {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--gold-lite);
  opacity: 0;
}
.rate .swap .res { font-size: 12.5px; color: var(--muted); opacity: 0; }
.rate .swap .res b { color: var(--gold-lite); font-weight: 600; }
.rate .swap.hover .avg { opacity: 0; }
.rate .swap.hover .mood { opacity: 1; }
.rate.done .swap .avg,
.rate.done .swap .mood { opacity: 0; }
.rate.done .swap .res { opacity: 1; }

.rate .hintline {
  display: none;
  margin-top: 9px;
  font-size: 12px;
  color: var(--muted-2);
}
.rate.done .hintline { display: none; }

@media (max-width: 640px) {
  .rate {
    padding: 24px 20px 24px;
    margin-top: 26px;
  }
  .rate h4 { font-size: 22px; }
  .rate .mood-top { display: block; height: 26px; margin-top: 12px; }
  .rate .mood-top span {
    font-family: var(--serif);
    font-style: italic;
    font-size: 19px;
    color: var(--gold-lite);
    opacity: 0;
    transition: opacity .18s;
    line-height: 26px;
  }
  .rate .mood-top.show span { opacity: 1; }
  .rate .stars { gap: 4px; margin-top: 4px; }
  .rate .star { width: 52px; height: 52px; }
  .rate .swap .mood { display: none; }
  .rate .swap.hover .avg { opacity: 1; }
  .rate.done .swap .avg { opacity: 0; }
  .rate.done .mood-top { display: none; }
  .rate .hintline { display: block; }
}

/* ============================================================
   Відгуки до товара
   Перенесено з .design_handoff_dbags_onyx/Product Reviews.html
   Мобільні правила з класу .m переведені в media-query.
   ============================================================ */

/* ---- підсумкова панель ---- */
.reviews .sum {
  display: flex;
  gap: 38px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-soft);
  padding: 26px 2px;
  margin-bottom: 30px;
}
.reviews .sum-score {
  flex-shrink: 0;
  text-align: center;
  padding-right: 36px;
  border-right: 1px solid var(--line-soft);
}
.reviews .sum-score .num {
  font-family: var(--serif);
  font-size: 56px;
  line-height: .9;
  color: var(--gold-lite);
  font-weight: 600;
}
.reviews .sum-score .of { font-size: 13px; color: var(--muted-2); margin-top: 6px; }
.reviews .sum-score .st { color: var(--gold); letter-spacing: 3px; font-size: 14px; margin-top: 8px; }
.reviews .sum-score .st .off { color: var(--muted-2); }
.reviews .bars {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.reviews .bar {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted-2);
}
.reviews .bar .lb { width: 34px; flex-shrink: 0; text-align: right; }
.reviews .bar .track {
  flex: 1;
  height: 4px;
  background: var(--bg-3);
  border-radius: 2px;
  overflow: hidden;
}
.reviews .bar .fill { display: block; height: 100%; background: var(--gold-deep); }
.reviews .bar .n { width: 26px; flex-shrink: 0; }

/* ---- форма, що розкривається після вибору зірки ---- */
.rate .form {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .45s ease, opacity .35s ease, margin .45s ease;
}
.rate.open .form { max-height: 620px; opacity: 1; margin-top: 22px; }
.rate.done .form { max-height: 0; opacity: 0; margin-top: 0; }
/* одна колонка: поля «Місто» в цій CMS немає, тож «Ім'я» не має висіти на пів-ширини */
.rate .f-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  text-align: left;
}
.rate .fld { display: flex; flex-direction: column; gap: 7px; }
.rate .fld label {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.rate .fld input,
.rate .fld textarea {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s;
}
.rate .fld input:focus,
.rate .fld textarea:focus { border-color: var(--gold-deep); }
.rate .fld input::placeholder,
.rate .fld textarea::placeholder { color: var(--muted-2); }
.rate .fld input.fail--input,
.rate .fld textarea.fail--input { border-color: #a4483c; }
.rate .fld.full { grid-column: 1/-1; margin-top: 12px; }
.rate .fld textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.rate .f-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.rate .f-note {
  font-size: 11.5px;
  color: var(--muted-2);
  text-align: left;
  max-width: 300px;
  line-height: 1.5;
}
.rate .btn {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-lite);
  font-family: var(--sans);
  padding: 13px 30px;
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 2px;
  transition: background .25s, color .25s;
}
.rate .btn:hover { background: var(--gold); color: var(--bg); }

/* ---- список відгуків ---- */
.revs { margin-top: 34px; }
.revs .rev { border-top: 1px solid var(--line-soft); padding: 24px 0; }
.revs .rev:first-of-type { border-top: 1px solid var(--line); }
.revs .rev--hidden { display: none; }
.revs .rev-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.revs .rev-who { font-size: 14.5px; font-weight: 600; color: var(--ink); }
.revs .rev-date { font-size: 12px; color: var(--muted-2); letter-spacing: .12em; }
.revs .rev-st { color: var(--gold); letter-spacing: 3px; font-size: 13px; margin-bottom: 10px; }
.revs .rev-st .off { color: var(--muted-2); }
.revs .rev p { font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.revs .reply {
  margin-top: 16px;
  margin-left: 22px;
  padding: 16px 18px;
  background: var(--bg-2);
  border-left: 1px solid var(--gold-deep);
  border-radius: 2px;
}
.revs .reply .who {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 7px;
}
.revs .reply p { font-size: 14px; color: var(--muted); }
.revs .more {
  display: block;
  margin: 26px auto 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold-deep);
  color: var(--gold-lite);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  padding-bottom: 5px;
  cursor: pointer;
}
.revs .more:hover { color: var(--gold); }
.reviews--empty {
  margin-top: 30px;
  padding: 22px 0;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted-2);
  text-align: center;
}

@media (max-width: 640px) {
  .reviews .sum { flex-direction: column; gap: 20px; align-items: stretch; }
  .reviews .sum-score {
    padding-right: 0;
    border-right: 0;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-soft);
  }
  .rate .f-grid { grid-template-columns: 1fr; }
  .rate .f-foot { flex-direction: column; align-items: stretch; }
  .rate .btn { width: 100%; order: -1; }
  .rate .f-note { max-width: none; text-align: center; margin-top: 12px; }
  .revs .reply { margin-left: 0; }
}

/* ============================================================
   Сторінка /vidguki — сітка відгуків-фото (окремо від .revs,
   яка лишається для вкладки "Відгуки" товару). Референс:
   Downloads/dbags.com.ua/Reviews Page A2.html, класи з rg- префіксом.
   ============================================================ */

/* сітка ділить .js__list--container на всю ширину (як .fnc--articles--list у блозі) */
.js__list--container > .rg-wrap { grid-column: 1/-1; }

/* короткий текстовий блок у сайдбарному боксі ("Як це працює") */
.blog--sbox p.rg-note {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* "Як це працює" на мобільному — дублікат зверху центральної колонки (пояснює навіщо ділитись
   фото ДО форми), десктопна копія в сайдбарі на мобільному ховається — той самий патерн,
   що .blog--recent--mobile у блозі. */
.rg-how--mobile { display: none; }
@media (max-width: 820px) {
  .rg-how { display: none; }
  .rg-how--mobile { display: block; margin-bottom: 20px; }
}

/* ---- плашка "Поділіться своїм фото" ---- */
.rg-form {
  max-width: none; /* .fnc--addcomment--container (onyx.css) задає 560px для вузької форми товару — тут форма на всю ширину колонки */
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  padding: 28px 30px 30px;
  margin-bottom: 34px;
}
.rg-form h3 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
}
.rg-form .rg-lede {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 8px;
  max-width: 520px;
}
.rg-fgrid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}
.rg-drop {
  position: relative;
  border: 1px dashed var(--gold-deep);
  border-radius: 3px;
  padding: 26px 16px;
  text-align: center;
  background: rgba(201, 168, 106, .04);
  cursor: pointer;
  transition: background .25s, border-color .25s;
  aspect-ratio: 4/5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.rg-drop:hover,
.rg-drop.rg-drop--over { background: rgba(201, 168, 106, .09); border-color: var(--gold); }
.rg-drop.fail--input { border-color: #a4483c; }
.rg-drop .rg-ic { font-size: 30px; color: var(--gold); line-height: 1; }
.rg-drop b { display: block; font-size: 13.5px; color: var(--ink); margin-top: 12px; font-weight: 600; }
.rg-drop span { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 6px; line-height: 1.5; }
.rg-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.rg-drop__preview {
  display: none;
  position: absolute;
  inset: 0;
}
.rg-drop.rg-drop--has-file .rg-ic,
.rg-drop.rg-drop--has-file b,
.rg-drop.rg-drop--has-file > span { display: none; }
.rg-drop.rg-drop--has-file .rg-drop__preview { display: block; }
.rg-drop__preview img { width: 100%; height: 100%; object-fit: cover; }
.rg-drop__remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(12, 12, 14, .75);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  z-index: 2;
}
.rg-drop__remove:hover { border-color: var(--gold); color: var(--gold-lite); }
.rg-fields { display: flex; flex-direction: column; gap: 12px; height: 100%; }
.rg-fields input,
.rg-fields textarea {
  background: var(--bg-3);
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  padding: 14px 15px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  width: 100%;
  transition: border-color .25s;
}
.rg-fields input:focus,
.rg-fields textarea:focus { outline: 0; border-color: var(--gold-deep); }
.rg-fields input.fail--input,
.rg-fields textarea.fail--input { border-color: #a4483c; }
.rg-fields textarea { flex: 1; min-height: 130px; resize: vertical; line-height: 1.6; }
.rg-frow { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rg-frow .rg-hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.5; }
.rg-form .js__addcomment--info:not(:empty) { margin-top: 14px; font-size: 13px; color: var(--gold-lite); }

/* ---- сітка карток ---- */
.rg-cnt {
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 26px;
}
.rg-cnt b { color: var(--gold-lite); font-weight: 600; }
.rg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.rg-card {
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform .3s, border-color .3s;
}
.rg-card:hover { transform: translateY(-5px); border-color: var(--line); }
.rg-card--hidden { display: none; }
.rg-ph {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-3);
  flex-shrink: 0;
  overflow: hidden;
  cursor: zoom-in;
}
.rg-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rg-ph--empty { display: flex; align-items: center; justify-content: center; cursor: default; }
.rg-zoom {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 14, .42);
  opacity: 0;
  transition: opacity .25s;
}
.rg-ph:hover .rg-zoom { opacity: 1; }
.rg-zoom i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: rgba(12, 12, 14, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-lite);
  font-size: 19px;
  font-style: normal;
}
.rg-body { padding: 18px 19px 19px; display: flex; flex-direction: column; flex: 1; }
.rg-who {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 13px;
}
.rg-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--gold-lite);
  flex-shrink: 0;
  line-height: 1;
}
.rg-av--big { width: 64px; height: 64px; font-size: 28px; }
.rg-nm { display: block; font-size: 14.5px; color: var(--ink); font-weight: 600; line-height: 1.2; }
.rg-dt { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 3px; letter-spacing: .05em; }
.rg-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.68;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rg-more {
  display: none;
  margin-top: auto;
  padding-top: 14px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-lite);
  cursor: pointer;
}
.rg-more.rg-more--show { display: block; }
.rg-card:hover .rg-more { color: var(--gold); }
.rg-loadmore { display: flex; justify-content: center; margin-top: 34px; }

/* ---- порожній стан ---- */
.rg-empty {
  border: 1px dashed var(--line);
  border-radius: 3px;
  padding: 52px 30px;
  text-align: center;
}
.rg-empty__ic { font-size: 34px; color: var(--gold-deep); }
.rg-empty b { display: block; font-family: var(--serif); font-size: 24px; color: var(--ink); margin-top: 14px; font-weight: 600; }
.rg-empty p { font-size: 13.5px; color: var(--muted); margin-top: 9px; line-height: 1.6; max-width: 420px; margin-inline: auto; }

/* ---- лайтбокс ---- */
.rg-lb {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(6, 6, 8, .94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 48px 72px;
}
.rg-lb.on { display: flex; }
.rg-lb__in {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  max-width: 1040px;
  width: 100%;
  max-height: 100%;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.rg-lb__ph { background: var(--bg-3); min-height: 420px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.rg-lb__ph img { width: 100%; height: 100%; object-fit: contain; }
.rg-lb__side { padding: 30px 28px; display: flex; flex-direction: column; border-left: 1px solid var(--line-soft); overflow-y: auto; }
.rg-lb__side .rg-who { padding-bottom: 16px; margin-bottom: 16px; }
.rg-lb__side .rg-av { width: 44px; height: 44px; font-size: 20px; }
.rg-lb__side .rg-nm { font-size: 16px; }
.rg-lb__side .rg-dt { font-size: 12px; }
.rg-lb__text { font-size: 14px; color: var(--muted); line-height: 1.75; }
.rg-lb__x {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
}
.rg-lb__x:hover { border-color: var(--gold-deep); color: var(--gold-lite); }
.rg-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  background: rgba(12, 12, 14, .7);
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
}
.rg-lb__nav:hover { border-color: var(--gold-deep); color: var(--gold-lite); }
.rg-lb__nav--prev { left: 16px; }
.rg-lb__nav--next { right: 16px; }

@media (max-width: 1080px) {
  .rg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .rg-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .rg-fgrid { grid-template-columns: 1fr; gap: 14px; }
  .rg-drop { aspect-ratio: auto; padding: 24px 16px; }
  .rg-frow { flex-direction: column; align-items: stretch; gap: 12px; }
  .rg-frow .btn-gold { width: 100%; }
  .rg-body { padding: 14px 14px 15px; }
  .rg-av { width: 30px; height: 30px; font-size: 15px; }
  .rg-nm { font-size: 13.5px; }
  .rg-text { font-size: 13px; -webkit-line-clamp: 5; }
  .rg-lb { padding: 0; }
  .rg-lb__in { grid-template-columns: 1fr; max-height: 100%; overflow-y: auto; }
  .rg-lb__ph { min-height: 300px; }
}
