/* Kasak Reviews — uses theme variables with fallbacks */
.kr-wrap, .kr-modal {
  --kr-brand: var(--kasak-deep-red, #412D15);
  --kr-brand-dark: var(--kasak-dark-red, #2E1F0E);
  --kr-star: #D4A55A;
  --kr-text: var(--text-strong, #000);
  --kr-muted: var(--text-muted-dark, #3D3D3D);
  --kr-line: var(--blush-200, #E0D7CD);
  --kr-soft: var(--blush-50, #FAF8F6);
  --kr-soft2: var(--blush-100, #F1ECE7);
  --kr-serif: var(--font-serif, "Cormorant Garamond", Georgia, serif);
  --kr-sans: var(--font-sans, "Plus Jakarta Sans", system-ui, sans-serif);
  font-family: var(--kr-sans); color: var(--kr-text);
}
.kr-wrap *, .kr-modal * { box-sizing: border-box; }
.kr-wrap { max-width: 820px; margin: 0 auto; padding: 8px 0; }
.kr-wrap h2, .kr-wrap p, .kr-modal h3, .kr-modal p { margin: 0; }

/* stars (partial fill via --p) */
.kr-stars { position: relative; display: inline-block; font-size: 17px; line-height: 1; letter-spacing: 2px; color: var(--kr-line); white-space: nowrap; }
.kr-stars::before { content: "★★★★★"; }
.kr-stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--p, 0%); overflow: hidden; color: var(--kr-star); }

/* buttons */
.kr-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; cursor: pointer;
  background: var(--kr-brand); color: #fff; border: 1px solid var(--kr-brand); border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: background .2s;
}
.kr-btn:hover { background: var(--kr-brand-dark); color: #fff; }
.kr-btn.is-outline { background: #fff; color: var(--kr-brand); }
.kr-btn.is-outline:hover { background: var(--kr-soft); color: var(--kr-brand); }
.kr-btn:disabled { opacity: .6; cursor: not-allowed; }

/* title */
.kr-title { font-family: var(--kr-serif); font-size: 28px; font-weight: 700; line-height: 1.2; text-align: center; }
@media (min-width: 768px) { .kr-title { font-size: 32px; } }

/* top row: rating + buttons */
.kr-top { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: 20px 0 0; padding: 18px 0; border-top: 1px solid var(--kr-line); border-bottom: 1px solid var(--kr-line); text-align: center; }
@media (min-width: 640px) { .kr-top { flex-direction: row; justify-content: space-between; text-align: left; } }
.kr-info { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.kr-info .kr-stars { font-size: 18px; }
.kr-avg { font-size: 15px; font-weight: 700; }
.kr-cnt { font-size: 14px; font-weight: 500; color: var(--kr-muted); }
.kr-btns { display: flex; flex-direction: column; gap: 10px; width: 100%; }
@media (min-width: 640px) { .kr-btns { flex-direction: row; width: auto; } }

/* review list (this product only) */
.kr-list[hidden] { display: none; }
.kr-item { padding: 20px 0; border-bottom: 1px solid var(--kr-line); }
.kr-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.kr-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14.5px; }
.kr-verified { font-size: 10.5px; font-weight: 700; color: #2f6b2f; background: #f4faf4; border: 1px solid #c7e2c7; border-radius: 99px; padding: 1px 8px; }
.kr-date { font-size: 12px; font-weight: 500; color: var(--kr-muted); }
.kr-text { font-size: 14.5px; font-weight: 500; line-height: 1.65; }

/* popup */
.kr-modal { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; background: rgba(20,16,12,.55); backdrop-filter: blur(3px); }
.kr-modal.is-open { display: flex; }
.kr-dialog { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; overflow-y: auto; padding: 60px 22px 24px; background: #fff; }
@media (min-width: 640px) { .kr-dialog { width: 520px; height: auto; max-height: 92vh; padding: 56px 36px 30px; border-radius: 18px; box-shadow: var(--shadow-xl, 0 20px 50px rgba(0,0,0,.25)); } }
.kr-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; background: none; border: 0; font-size: 32px; line-height: 1; color: var(--kr-text); cursor: pointer; }
.kr-dots { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.kr-dot { width: 22px; height: 4px; border-radius: 99px; background: var(--kr-line); }
.kr-dot.is-on { background: var(--kr-brand); }
.kr-modal.is-done .kr-dots { display: none; }
.kr-step { display: none; flex-direction: column; flex: 1; }
.kr-step.is-active { display: flex; }
.kr-m-title { font-family: var(--kr-serif); font-size: 28px; font-weight: 700; line-height: 1.2; text-align: center; }
.kr-m-sub { margin-top: 8px !important; font-size: 14px; font-weight: 500; line-height: 1.6; text-align: center; color: var(--kr-muted); }
.kr-m-img { display: block; width: 150px; aspect-ratio: 4 / 5; object-fit: cover; margin: 22px auto 14px; border-radius: 12px; background: var(--kr-soft2); }
.kr-m-prod { font-size: 15px; font-weight: 700; text-align: center; margin-bottom: 18px !important; }
.kr-m-prod--top { margin: 4px 0 12px !important; }
.kr-rate { display: flex; justify-content: center; gap: 10px; }
.kr-rate button { width: 46px; height: 46px; padding: 4px; background: none; border: 0; cursor: pointer; }
.kr-rate svg { width: 100%; height: 100%; fill: none; stroke: var(--kr-star); stroke-width: 1.5; stroke-linejoin: round; transition: fill .15s, transform .15s; }
.kr-rate button.is-on svg { fill: var(--kr-star); }
.kr-rate button:hover svg { transform: scale(1.08); }
.kr-rate--sm button { width: 38px; height: 38px; }
.kr-rate-labels { display: flex; justify-content: space-between; max-width: 290px; margin: 6px auto 0; font-size: 11px; font-weight: 700; }
.kr-rate-labels--sm { max-width: 240px; margin-bottom: 18px; }
.kr-field { margin-bottom: 16px; }
.kr-field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.kr-field label em { font-style: normal; font-weight: 500; color: var(--kr-muted); }
.kr-field small { display: block; margin-top: 5px; font-size: 11.5px; color: var(--kr-muted); }
.kr-field input, .kr-field textarea {
  display: block; width: 100%; padding: 12px 14px; font-family: inherit; font-size: 14px; font-weight: 500; color: var(--kr-text);
  background: #fff; border: 1px solid var(--blush-300, #C7B9AB); border-radius: 10px; transition: border-color .2s, box-shadow .2s;
}
.kr-field textarea { min-height: 150px; line-height: 1.6; resize: vertical; }
.kr-field input:focus, .kr-field textarea:focus { outline: none; border-color: var(--kr-brand); box-shadow: 0 0 0 3px rgba(65,45,21,.12); }
@media (max-width: 639px) { .kr-field input, .kr-field textarea { font-size: 16px; } }
.kr-check { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-size: 14px; font-weight: 500; cursor: pointer; }
.kr-check input { width: 18px; height: 18px; accent-color: var(--kr-brand); }
.kr-as { margin: 22px 0 14px !important; text-align: center; font-size: 14px; }
.kr-legal { font-size: 11.5px; line-height: 1.55; color: var(--kr-muted); text-align: center; }
.kr-legal a { color: var(--kr-text); text-decoration: underline; }
.kr-error { min-height: 18px; margin: 10px 0 0 !important; font-size: 13px; font-weight: 600; color: #c0392b; text-align: center; }
.kr-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 18px; }
.kr-actions .kr-btn { flex: 1; max-width: 220px; margin-left: auto; }
.kr-actions--center { justify-content: center; }
.kr-actions--center .kr-btn { margin: 0; }
.kr-back { padding: 8px 4px; background: none; border: 0; font-family: inherit; font-size: 14px; font-weight: 600; color: var(--kr-text); cursor: pointer; }
.kr-done-ico { width: 64px; height: 64px; margin: 20px auto 16px; display: grid; place-items: center; border-radius: 50%; background: #f4faf4; border: 2px solid #c7e2c7; color: #2f6b2f; font-size: 30px; }
