/* Review pop-up (reviews-modal.js). Mobile-first; no inline styles (CSP style-src 'self'). */
.pdp-write { margin-top: 24px; text-align: center; }
.rv-open[hidden] { display: none; }
.pdp-write-nojs > summary { list-style: none; cursor: pointer; }
.pdp-write-nojs > summary::-webkit-details-marker { display: none; }

.rv-form { display: grid; gap: 16px; text-align: left; margin-inline: auto; max-width: 520px; }
.rv-field { display: grid; gap: 6px; font-size: 0.9rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.rv-field legend { padding: 0; margin-bottom: 6px; }
.rv-field input[type="text"], .rv-field input[type="email"], .rv-field input[type="number"],
.rv-field textarea, .rv-field select {
  width: 100%; min-height: 46px; padding: 10px 12px; font: inherit; font-size: 1rem; box-sizing: border-box;
  background: #fff; border: 1px solid var(--border); border-radius: 0; color: var(--text);
}
.rv-field textarea { min-height: 110px; resize: vertical; }
.rv-field input:focus-visible, .rv-field textarea:focus-visible, .rv-field select:focus-visible,
.rv-star:focus-visible, .rv-bar input:focus-visible, .rv-close:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.rv-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.rv-hint { margin: 0; font-size: 0.82rem; color: var(--muted); }
.rv-hint.is-bad { color: var(--error); }

.rv-stars { display: flex; gap: 6px; }
.rv-star { flex: 1; max-width: 56px; min-height: 48px; padding: 0; font-size: 1.8rem; line-height: 1; background: #fff;
  border: 1px solid var(--border); color: var(--soft); cursor: pointer; }
.rv-star.is-on { color: var(--wine); border-color: var(--wine); background: var(--wine-soft); }

.rv-bar { display: grid; gap: 4px; }
.rv-bar label { display: flex; justify-content: space-between; gap: 8px; font-size: 0.9rem; }
.rv-bar output { color: var(--wine); font-weight: 600; }
.rv-bar input[type="range"] { width: 100%; min-height: 44px; margin: 0; accent-color: var(--wine); }
.rv-ends { display: flex; justify-content: space-between; margin: 0; font-size: 0.78rem; color: var(--muted); }

.rv-photos input[type="file"] { font-size: 0.85rem; min-height: 44px; }
.rv-previews { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rv-previews li { width: 72px; height: 72px; border: 1px solid var(--border); background: var(--panel); }
.rv-previews img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-submit { width: 100%; }

/* Modal shell */
.rv-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(23, 19, 26, 0.55);
  display: flex; align-items: flex-end; justify-content: center; }
.rv-overlay[hidden] { display: none; }
.rv-dialog { position: relative; width: 100%; max-height: 94vh; max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); padding: 20px 16px 28px; box-sizing: border-box; }
.rv-dialog h2 { margin: 0 44px 16px 0; font-size: 1.25rem; }
.rv-close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1;
  background: none; border: 0; cursor: pointer; color: var(--text); }
body.rv-lock { overflow: hidden; }
@media (min-width: 640px) {
  .rv-overlay { align-items: center; }
  .rv-dialog { width: 560px; max-height: 90vh; padding: 28px 32px 32px; }
}

.pdp-review-photo { padding: 0; border: 0; background: none; cursor: zoom-in; flex: 0 0 auto; }
.pdp-review-photo:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }


/* ---- Review section in the reference-store layout (owner 2026-10-23) ----
   Phone first. The 3-column card and the 6-column header switch on the width of the section itself (container
   query) so the cards also stack cleanly on narrow tablets. No inline styles anywhere. */
.pdp-reviews { container-type: inline-size; }
.rev-wrap { max-width: 1200px; }
.rev-star { width: 18px; height: 18px; display: block; fill: var(--text); }
.rev-star.is-off { fill: var(--border); }
.rev-stars { display: inline-flex; gap: 2px; align-items: center; }
.rev-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.rev-header { display: grid; grid-template-columns: 1fr; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.rev-col { min-width: 0; padding: 0 8px; }
.rev-vsep { display: none; width: 1px; background: var(--line); align-self: stretch; }
.rev-summary { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.rev-score { margin: 0; font-family: var(--head); font-size: 3.5rem; font-weight: 500; line-height: 1; }
.rev-based { margin: 0; font-size: 0.875rem; }
.rev-dist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rev-dist-row { position: relative; display: grid; grid-template-columns: 24px 14px 1fr 28px; align-items: center; gap: 8px; font-size: 0.8125rem; }
.rev-dist-row .rev-star { width: 14px; height: 14px; }
.rev-bar { display: block; position: relative; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.rev-bar svg { display: block; width: 100%; height: 100%; fill: var(--text); }
.rev-dist-row > span:last-of-type:not(.rev-sr) { text-align: right; }
.rev-cta { display: flex; justify-content: center; align-items: center; }
.rev-cta .pdp-write { margin: 0; }

.rev-qcards { display: flex; flex-direction: column; gap: 14px; }
.rev-qcard { display: flex; flex-direction: column; gap: 4px; }
.rev-qcard-title { font-size: 0.8125rem; color: var(--muted); }
.rev-qbar { position: relative; height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.rev-qbar-fill { position: absolute; top: 0; bottom: 0; background: var(--text); border-radius: 999px; }
.rev-qbar-fit { width: 12%; }
.rev-qbar-fit[data-pos="1"] { left: 0; }
.rev-qbar-fit[data-pos="2"] { left: 22%; }
.rev-qbar-fit[data-pos="3"] { left: 44%; }
.rev-qbar-fit[data-pos="4"] { left: 66%; }
.rev-qbar-fit[data-pos="5"] { left: 88%; }
.rev-qbar-quality { left: 0; }
.rev-qbar-quality[data-pos="1"] { width: 20%; }
.rev-qbar-quality[data-pos="2"] { width: 40%; }
.rev-qbar-quality[data-pos="3"] { width: 60%; }
.rev-qbar-quality[data-pos="4"] { width: 80%; }
.rev-qbar-quality[data-pos="5"] { width: 100%; }
.rev-qcard-value { font-size: 0.8125rem; font-weight: 600; }
.rev-fit-val[data-pos="1"], .rev-fit-val[data-pos="2"] { text-align: left; }
.rev-fit-val[data-pos="3"] { text-align: center; }
.rev-fit-val[data-pos="4"], .rev-fit-val[data-pos="5"] { text-align: right; }
.rev-quality-val { text-align: right; }

.rev-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); margin: 0; }
.rev-search { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--border);
  background: #fff; font-size: 0.875rem; flex: 1 1 220px; min-width: 0; box-sizing: border-box; }
.rev-search input { border: 0; outline: 0; background: transparent; width: 100%; font: inherit; color: inherit; min-height: 0; padding: 0; }
.rev-search:focus-within, .rev-select:focus-within, .rev-media-btn:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
/* Like the reference, the select is invisible on top of a bordered box: the rating box shows only the chevron,
   the sort box shows "Sort by:" and the chevron. */
.rev-select { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; min-width: 58px; padding: 0 36px 0 14px;
  border: 1px solid var(--border); background: #fff; font-size: 0.875rem; box-sizing: border-box; cursor: pointer; }
.rev-select select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0 14px;
  background: transparent; font: inherit; color: inherit; min-height: 0; }
.rev-select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 1.5px solid var(--text); border-bottom: 1.5px solid var(--text); transform: translateY(-70%) rotate(45deg); }
.rev-select-label { pointer-events: none; white-space: nowrap; }
.rev-media-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--border);
  background: #fff; color: var(--text); font: inherit; font-size: 0.875rem; cursor: pointer; }
.rev-media-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.rev-filters-spacer { flex: 1 0 0; }
.rev-empty { padding: 28px 0; text-align: center; font-size: 0.875rem; margin: 0; }
.rev-empty[hidden], .pdp-review[hidden] { display: none; }

.rev-list { display: block; }
.pdp-review { padding: 24px 0; border-bottom: 1px solid var(--line); }
.rev-card { display: grid; grid-template-columns: 1fr; gap: 18px; }
.rev-who { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rev-name { font-weight: 600; font-size: 0.875rem; }
.rev-verified { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; }
.rev-verified-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--text); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; }
.rev-verified-dot svg { width: 9px; height: 9px; }
.rev-keyvals { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 4px 0 0; font-size: 0.8125rem; color: var(--muted); }
.rev-keyvals dt, .rev-keyvals dd { margin: 0; }
.rev-title-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.rev-title { margin: 0; font-size: 1rem; font-weight: 700; }
.rev-body { margin: 0; font-size: 0.875rem; line-height: 1.55; }
.rev-photos { margin-top: 10px; }
.pdp-review-photo img { display: block; border-radius: 0; }

@container (min-width: 990px) {
  .rev-header { grid-template-columns: 1.1fr 1px 1.4fr 1px 1.3fr 1fr; align-items: center; }
  .rev-vsep { display: block; }
}
@container (min-width: 900px) {
  .rev-card { grid-template-columns: 220px 1fr 220px; gap: 24px; }
}

.rev-list[data-collapsed="true"] .pdp-review[data-rev-extra] { display: none; }
.rev-country { font-size: 0.6875rem; font-weight: 700; margin-left: 4px; }
.rev-seemore { display: flex; justify-content: center; padding: 28px 0 0; }
.rev-seemore[hidden], .rev-seemore [hidden] { display: none; }
.rev-seemore .btn { min-width: 220px; }
