﻿.rfw-box {
  --rfw-accent: #c27acb;
  --rfw-accent-dark: #a95cb5;
  --rfw-accent-soft: #fbf4fc;
  --rfw-border: #e9d7ec;
  --rfw-text: #47364e;
  --rfw-muted: #7f6d86;
  --rfw-gold: #f4b400;
  --rfw-gold-deep: #d99a00;
  max-width: 760px;
  margin: 28px auto;
  padding: 28px;
  border: 1px solid var(--rfw-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(194, 122, 203, 0.12), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fffafc 100%);
  box-shadow: 0 18px 40px rgba(153, 92, 170, 0.08);
  color: var(--rfw-text);
}

.rfw-box h2 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 2rem;
  line-height: 1.1;
  color: var(--rfw-accent-dark);
}

.rfw-box > p {
  margin: 0 0 22px;
  text-align: center;
  color: var(--rfw-muted);
}

.rfw-product-review {
  margin: 24px 0;
  padding: 26px;
  border: 1px solid #ecdff0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.rfw-product-review h3 {
  margin: 0 0 14px;
  text-align: center;
  color: var(--rfw-accent-dark);
  font-size: 1.9rem;
}

.rfw-product-review label {
  display: block;
  margin: 18px 0 8px;
  font-weight: 700;
  color: var(--rfw-text);
}

.rfw-product-review select,
.rfw-product-review textarea,
.rfw-product-review input[type="text"],
.rfw-product-review input[type="email"] {
  width: 100%;
  max-width: 100%;
  border: 1px solid #dcc8e1;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(109, 70, 120, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rfw-product-review textarea {
  min-height: 148px;
  padding: 16px 18px;
  resize: vertical;
}

.rfw-product-review select:focus,
.rfw-product-review textarea:focus,
.rfw-product-review input[type="text"]:focus,
.rfw-product-review input[type="email"]:focus {
  border-color: var(--rfw-accent);
  box-shadow: 0 0 0 4px rgba(194, 122, 203, 0.14);
  outline: none;
}

.rfw-product-image {
  display: flex;
  justify-content: center;
  margin: 12px 0 18px;
}

.rfw-product-image img {
  width: min(100%, 320px);
  height: auto;
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(116, 85, 128, 0.16);
}

.rfw-stars {
  display: inline-flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 8px 0 14px;
}

.rfw-stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rfw-stars label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin: 0;
  cursor: pointer;
}

.rfw-stars label::before {
  content: "\2605";
  font-size: 32px;
  line-height: 1;
  color: #e5d7a7;
  text-shadow: 0 2px 5px rgba(217, 154, 0, 0.14);
  transition: transform 0.16s ease, color 0.16s ease, text-shadow 0.16s ease;
}

.rfw-stars label:hover::before,
.rfw-stars label:hover ~ label::before,
.rfw-stars input:checked ~ label::before {
  color: var(--rfw-gold);
  text-shadow: 0 4px 10px rgba(244, 180, 0, 0.28);
}

.rfw-stars label:hover::before {
  transform: translateY(-1px) scale(1.06);
}

.rfw-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  margin: 12px auto 0;
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rfw-accent) 0%, var(--rfw-accent-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 14px 24px rgba(169, 92, 181, 0.22);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.rfw-button:hover,
.rfw-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 18px 26px rgba(169, 92, 181, 0.28);
  filter: saturate(1.04);
}

.rfw-review-form {
  display: flex;
  flex-direction: column;
}

.rfw-review-form > .rfw-button {
  align-self: center;
}

.rfw-success {
  border-color: #b9e5c5;
  background: linear-gradient(180deg, #ffffff 0%, #f3fff7 100%);
}

.rfw-error {
  border-color: #f0c2c2;
  background: linear-gradient(180deg, #ffffff 0%, #fff6f6 100%);
}

.woocommerce .star-rating,
.woocommerce p.stars a,
.woocommerce .stars span a,
.wc-block-grid__product-rating .star-rating,
.wc-block-components-product-rating .wc-block-components-product-rating__stars {
  color: var(--rfw-gold);
}

.woocommerce .star-rating,
.wc-block-grid__product-rating .star-rating,
.wc-block-components-product-rating .wc-block-components-product-rating__stars {
  position: relative;
  display: inline-block;
  overflow: hidden;
  font-family: Arial, sans-serif;
  letter-spacing: 0.14em;
  line-height: 1;
}

.woocommerce .star-rating::before,
.woocommerce p.stars a::before,
.woocommerce .stars span a::before,
.wc-block-grid__product-rating .star-rating::before,
.wc-block-components-product-rating .wc-block-components-product-rating__stars::before {
  content: "\2605\2605\2605\2605\2605";
  color: #e9dbaa;
}

.woocommerce .star-rating span::before,
.woocommerce p.stars.selected a::before,
.woocommerce p.stars:hover a::before,
.wc-block-grid__product-rating .star-rating span::before,
.wc-block-components-product-rating .wc-block-components-product-rating__stars span::before {
  content: "\2605\2605\2605\2605\2605";
  color: var(--rfw-gold);
  text-shadow: 0 2px 8px rgba(244, 180, 0, 0.22);
}

.woocommerce .star-rating span,
.wc-block-grid__product-rating .star-rating span,
.wc-block-components-product-rating .wc-block-components-product-rating__stars span {
  position: absolute;
  inset: 0 auto 0 0;
  overflow: hidden;
  display: block;
}

.woocommerce-review__verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fff7d8 0%, #f7edbf 100%);
  color: #8f6500;
  font-size: 0.86em;
  font-style: normal;
  font-weight: 700;
}

.woocommerce-review__verified::before {
  content: "\2713";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f4b400;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .rfw-box {
    margin: 18px 12px;
    padding: 22px 18px;
    border-radius: 16px;
  }

  .rfw-box h2 {
    font-size: 1.7rem;
  }

  .rfw-product-review {
    padding: 18px 16px;
  }

  .rfw-product-review h3 {
    font-size: 1.45rem;
  }

  .rfw-stars label {
    width: 34px;
    height: 34px;
  }

  .rfw-stars label::before {
    font-size: 28px;
  }

  .rfw-button {
    width: 100%;
    min-width: 0;
  }
}

