/* glow3d product reviews: stars on the product cards / product page and the reviews panel (desktop drawer, phone sheet).
   Shared by index.html, catalog.html and product.html with reviews.js. Everything is scoped to .rv-* classes;
   .rv-meta is only added to a card's price row by reviews.js once the ratings have loaded. */

/* ---------- stars + count on the price row ---------- */
.rv-rating {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 0; padding: 0.35rem 0; margin: 0;
  color: #888; font: inherit; font-size: 0.75rem; letter-spacing: 0.04em; line-height: 1;
  cursor: pointer; transition: color 0.3s; -webkit-tap-highlight-color: transparent;
}
.rv-rating:hover { color: #ccc; }
.rv-rating:hover .rv-stars { filter: drop-shadow(0 0 6px rgba(255,176,136,0.35)); }
.rv-rating:focus-visible { outline: 1px solid rgba(0,229,255,0.6); outline-offset: 4px; border-radius: 4px; }
.rv-stars { display: inline-flex; gap: 2px; transition: filter 0.3s; }
.rv-stars svg { width: 12px; height: 12px; display: block; }
.rv-stars .s-full path { fill: #ffb088; stroke: #ffb088; }
.rv-stars .s-empty path { fill: none; stroke: rgba(255,255,255,0.28); }
.rv-stars .s-part path { stroke: rgba(255,255,255,0.28); }
.rv-stars path { stroke-width: 1; stroke-linejoin: round; }
.product-meta.rv-meta { flex-wrap: nowrap; gap: 1.1rem; }
.product-meta.rv-meta .btn-view { margin-left: auto; }
/* the grey price note tucks under the price so price · stars · View share one line */
.rv-meta .product-price { line-height: 1.25; }
.rv-meta .product-price small { display: block; white-space: nowrap; margin-top: 0.2rem; }
/* with the admin's red "needs print file" dots there is no room for one line: dots + View wrap under price · stars */
.product-meta.rv-meta.pf-has-dots { flex-wrap: wrap; row-gap: 0.9rem; }
.product-meta.rv-meta.pf-has-dots .product-price { flex: none; min-width: auto; }
.product-meta.rv-meta.pf-has-dots .product-price small { white-space: nowrap; }
@media (max-width: 640px) {
  .product-meta.rv-meta { gap: 0.8rem; }
  .rv-meta .product-price { min-width: 0; flex: 0 1 auto; }
  .rv-meta .product-price small { white-space: normal; }
  .rv-meta .rv-rating { flex: none; gap: 0.35rem; }
  .rv-meta .rv-stars svg { width: 11px; height: 11px; }
  .rv-meta .btn-view { flex: none; }
}

/* product page: the same stars beside the price (the note goes under the price, as on the cards) */
.rv-pdp-row { display: flex; align-items: center; gap: 1.4rem; margin-bottom: 0.4rem; }
.rv-pdp-row .price-line { margin-bottom: 0; line-height: 1.25; }
.rv-pdp-row .price-line small { display: block; margin-top: 0.25rem; }
.rv-pdp-row .rv-rating { flex: none; }

/* ---------- reviews panel: right drawer on desktop, bottom sheet on phone ---------- */
.rv-lock, .rv-lock body { overflow: hidden !important; }
.rv-scrim {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(8,8,12,0.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0s linear 0.4s;
  touch-action: none;
}
.rv-panel {
  position: fixed; z-index: 301; top: 0; right: 0; bottom: 0;
  width: min(460px, 100%);
  background: #101016; color: #f0f0f2;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.6; text-align: left;
  border-left: 1px solid rgba(255,255,255,0.06);
  box-shadow: -30px 0 80px rgba(0,0,0,0.5), -10px 0 60px rgba(0,229,255,0.05);
  display: flex; flex-direction: column;
  transform: translateX(102%); visibility: hidden;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0s linear 0.5s;
}
.rv-panel *, .rv-panel *::before, .rv-panel *::after { box-sizing: border-box; }
.rv-open .rv-scrim { opacity: 1; visibility: visible; transition: opacity 0.4s; }
.rv-open .rv-panel { transform: none; visibility: visible; transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); }
.rv-panel.rv-dragging { transition: none; }
.rv-panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(160deg, rgba(0,229,255,0.04), transparent 35%, transparent 70%, rgba(255,107,74,0.04));
}
.rv-grab { display: none; }
.rv-head { padding: 2rem 2rem 1.4rem; border-bottom: 1px solid rgba(255,255,255,0.05); position: relative; flex: none; }
.rv-eyebrow { font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: #888; font-weight: 300; }
.rv-title { font-size: 1.5rem; font-weight: 300; margin: 0.35rem 3rem 0 0; letter-spacing: -0.01em; line-height: 1.3; outline: none; }
.rv-close {
  position: absolute; top: 1.6rem; right: 1.6rem; width: 36px; height: 36px; border-radius: 50%; padding: 0;
  background: none; border: 1px solid rgba(255,255,255,0.1); color: #aaa; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: border-color 0.3s, color 0.3s;
}
.rv-close:hover, .rv-close:focus-visible { border-color: #00e5ff; color: #fff; outline: none; }
.rv-close svg { width: 12px; height: 12px; }
.rv-summary { display: flex; align-items: center; gap: 1.6rem; margin-top: 1.4rem; }
.rv-big { font-size: 2.6rem; font-weight: 300; line-height: 1; letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff, #ffd0b0); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.rv-summary .rv-stars svg { width: 14px; height: 14px; }
.rv-summary-sub { color: #888; font-size: 0.75rem; letter-spacing: 0.04em; margin-top: 0.35rem; }
.rv-bars { margin-left: auto; display: grid; gap: 4px; min-width: 120px; }
.rv-bar { display: flex; align-items: center; gap: 0.5rem; font-size: 0.65rem; color: #666; line-height: 1.3; }
.rv-bar i { flex: 1; height: 2px; border-radius: 2px; background: rgba(255,255,255,0.07); position: relative; overflow: hidden; }
.rv-bar i b { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #00e5ff, #ff6b4a); opacity: 0.75; border-radius: 2px; }
.rv-write {
  display: block; margin-top: 1.5rem; width: 100%; text-align: center; cursor: pointer;
  font: inherit; font-weight: 500; font-size: 0.9rem; letter-spacing: 0.08em; line-height: 1.6;
  background: none; border: 1px solid rgba(255,255,255,0.15); border-radius: 50px; color: #fff; padding: 0.85rem 1.5rem;
  transition: all 0.35s ease;
}
.rv-write:hover, .rv-write:focus-visible { border-color: #00e5ff; box-shadow: 0 0 25px rgba(0,229,255,0.2); outline: none; }
.rv-writing .rv-write { display: none; }
.rv-body { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0.6rem 2rem 2rem; flex: 1; position: relative; }
.rv-note { color: #666; font-size: 0.72rem; letter-spacing: 0.04em; font-weight: 300; margin: 1rem 0 0.2rem; }
.rv-thanks { color: #ffb088; font-size: 0.8rem; letter-spacing: 0.04em; font-weight: 300; margin: 1.2rem 0 0.2rem; }
.rv-empty { padding: 2.2rem 0 1rem; }
.rv-empty strong { display: block; font-size: 1rem; font-weight: 400; color: #f0f0f2; }
.rv-empty p { color: #888; font-size: 0.9rem; font-weight: 300; margin: 0.4rem 0 0; line-height: 1.65; }
.rv-item { padding: 1.4rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.rv-item:last-child { border-bottom: 0; }
.rv-item-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rv-name { font-size: 0.9rem; font-weight: 400; color: #f0f0f2; overflow-wrap: anywhere; }
.rv-date { font-size: 0.72rem; color: #666; letter-spacing: 0.04em; white-space: nowrap; }
.rv-item .rv-stars { margin-top: 0.45rem; }
.rv-item p { color: #aaa; font-size: 0.9rem; font-weight: 300; margin: 0.55rem 0 0; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }

/* write-a-review form */
.rv-form { display: none; padding-top: 1.2rem; margin: 0; }
.rv-writing .rv-form { display: block; }
.rv-writing .rv-list { display: none; }
.rv-field { margin-bottom: 1.2rem; border: 0; padding: 0; min-width: 0; }
.rv-field label, .rv-field .rv-label { display: block; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: #888; margin-bottom: 0.5rem; font-weight: 400; padding: 0; }
.rv-field input, .rv-field textarea {
  width: 100%; background: #08080c; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px;
  color: #f0f0f2; font: inherit; font-size: 0.9rem; font-weight: 300; padding: 0.8rem 1rem; outline: none; margin: 0;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.rv-field input:focus, .rv-field textarea:focus { border-color: rgba(0,229,255,0.5); box-shadow: 0 0 0 3px rgba(0,229,255,0.08); }
.rv-field textarea { min-height: 120px; resize: vertical; line-height: 1.6; display: block; }
.rv-pick { display: flex; gap: 8px; align-items: center; }
.rv-pick button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; line-height: 0; border-radius: 4px; -webkit-tap-highlight-color: transparent; }
.rv-pick button:focus-visible { outline: 1px solid rgba(0,229,255,0.6); outline-offset: 3px; }
.rv-pick svg { width: 26px; height: 26px; display: block; }
.rv-pick .s-full path { fill: #ffb088; stroke: #ffb088; }
.rv-pick .s-empty path { fill: none; stroke: rgba(255,255,255,0.3); }
.rv-pick path { stroke-width: 0.8; stroke-linejoin: round; }
.rv-pick-label { font-size: 0.75rem; color: #888; letter-spacing: 0.04em; margin-left: 0.6rem; align-self: center; }
.rv-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.rv-msg { color: #ffb0a6; font-size: 0.8rem; letter-spacing: 0.02em; margin: -0.4rem 0 1rem; min-height: 0; }
.rv-msg:empty { display: none; }
.rv-form-actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 0.4rem; }
.rv-post {
  border: 0; border-radius: 50px; cursor: pointer; font: inherit; font-weight: 500; font-size: 0.9rem; letter-spacing: 0.08em; line-height: 1.6;
  padding: 0.85rem 2rem; background: linear-gradient(90deg, #00e5ff, #ff6b4a); color: #08080c;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.25); transition: all 0.35s ease;
}
.rv-post:hover { transform: translateY(-3px); box-shadow: 0 10px 50px rgba(255, 107, 74, 0.4); }
.rv-post:focus-visible { outline: 2px solid rgba(0,229,255,0.7); outline-offset: 3px; }
.rv-post:disabled { opacity: 0.6; cursor: progress; transform: none; }
.rv-cancel { background: none; border: 0; padding: 0; color: #888; font: inherit; font-size: 0.85rem; letter-spacing: 0.04em; cursor: pointer; }
.rv-cancel:hover, .rv-cancel:focus-visible { color: #fff; outline: none; }

@media (max-width: 640px) {
  .rv-panel {
    top: auto; left: 0; right: 0; width: 100%; max-height: 86vh; max-height: 86dvh; height: 86vh; height: 86dvh;
    border-left: 0; border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -30px 80px rgba(0,0,0,0.6), 0 -10px 60px rgba(0,229,255,0.06);
    transform: translateY(102%);
  }
  .rv-panel::before { border-radius: 24px 24px 0 0; }
  .rv-grab { display: block; width: 38px; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.18); margin: 0.7rem auto 0; flex: none; }
  .rv-head { padding: 1.1rem 1.5rem 1.2rem; touch-action: none; }
  .rv-head .rv-write { touch-action: manipulation; }
  .rv-close { top: 1.1rem; right: 1.2rem; }
  .rv-body { padding: 0.4rem 1.5rem 1.8rem; padding-bottom: calc(1.8rem + env(safe-area-inset-bottom, 0px)); }
  .rv-summary { gap: 1.2rem; }
  .rv-big { font-size: 2.2rem; }
  .rv-bars { min-width: 100px; }
  .rv-field input, .rv-field textarea { font-size: 16px; } /* iPhone: no zoom on focus */
}
@media (prefers-reduced-motion: reduce) {
  .rv-scrim, .rv-panel, .rv-open .rv-panel, .rv-post, .rv-write { transition: none; }
  .rv-post:hover { transform: none; }
}
