:root {
  --accent: #0e6a44;
  --muted: #f4efe6;
  --card-bg: #fbf9f4;
  --text: #222;
  --tag-bg: #efe7d9;
}

/* ======= Reviews ======= */
.reviews-wrap hr {
  border: 1px solid #F4F1E7;
  margin-top: 24px;
  margin-bottom: 24px;
}

.reviews-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reviews-selects {
  display: flex;
  gap: 30px;
}

.reviews-top select {
  border-radius: 22px;
  border: 1px solid #252627;
  background: #fff
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'><path d='M9 1L5 5L1 1' stroke='%23252627' stroke-linecap='round'/></svg>")
    no-repeat right 12px center/10px 6px;
  width: 255px;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
  height: 32px;
  padding-left: 12px;
}

.reviews-top .leave-btn {
  font-weight: 400;
  font-size: 20px;
  text-decoration: underline;
  color: var(--text);
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.review-card {
  background: var(--muted);
  padding: 18px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-author-wrapper {
  display: flex;
  justify-content: space-between;
}

.review-author-info {
  display: flex;
  flex-direction: column;
}

.review-author-details {
  display: flex;
  gap: 12px;
  align-items: baseline;
}

.review-author .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.review-author .name {
  font-weight: 700;
}

.review-author .date {
  font-size: 14px;
  color: #666;
}

.product-link {
  text-decoration: underline;
  color: #275DAD;
  font-size: 14px;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.review-tags {
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  background: var(--tag-bg);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 13px;
}

.review-body {
  display: flex;
  gap: 18px;
}

.review-texts {
  flex: 1;
}

.review-advantages,
.review-disadvantages {
  margin-bottom: 20px;
}

.review-advantages b {
  display: block;
  margin-bottom: 6px;
}

.rating {
  display: flex;
  gap: 8px;
  align-items: center;
}

.rating-count {
  font-size: 20px;
  height: 20px;
  color: #252627;
}

.rating .star {
  width: 16px;
  height: 16px;
  display: inline-block;
}

.rating-picker-wrapper {
  align-items:center
}

#rating-picker {
	display: flex;
	gap: 6px;
}

.star-picker {
	background: none;
	border: none;
	cursor: pointer;
	width: 18px;
	height: 18px;
	padding: 0;
}

.star-picker svg {
	width: 100%;
	height: 100%;
	fill: #ddd;
	transition: fill 0.2s;
}

.star-picker.active svg {
	fill: var(--accent);
}

.review-photos {
  width: 316px;
}

.slider {
  position: relative;
  padding-left: 30px;
  padding-right: 30px;
}

.slider-track {
  display: flex;
  gap: 8px;
  overflow: hidden;
}

.slider-track img {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 8px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.slider-arrow.left {
  left: -5px;
}

.slider-arrow.right {
  right: -5px;
}

/* ======= Modal ======= */
.review-modal {
  position: fixed; /* фиксируем на экране */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* полностью по высоте экрана */
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2000;
  overflow-y: auto; /* скроллим по вертикали если контент выше */
  padding: 20px; /* чтобы модалка не упиралась в края на мобиле */
  box-sizing: border-box;
}

.review-modal .input {
  max-width: unset !important;
}

.review-modal.open {
  display: flex;
}

#modal-close {
  float: right;
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
}

.modal-card {
  margin-top: 150px;
  width: 698px;
  background: #fff;
  border-radius: 10px;
  padding: 32px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  margin-top: 540px;
  margin-bottom: 100px;
}

.modal-card h3 {
  font-size: 24px;
  margin-bottom: 32px;
}

/* Form inside modal */

.input-row {
  display: flex;
  gap: 30px;
  margin-bottom: 12px;
}

.review-input {
  max-width: unset !important;
  width: 100%;
}

.review-input-text {
  border-radius: 8px !important;
  max-width: unset !important;
  width: 100% !important;
  border: 1px solid #006F56 !important;
}

.form-row {
  margin-bottom: 12px;
}

.form-row-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;  
}

.form-rating {
  display: flex;
  gap: 32px;
  height: 24px;
  margin-bottom: 24px;
}

.form-rating label {
  font-size: 16px;
  font-weight: 600;
}

.small-muted {
  background: #F4F1E7;
  padding: 24px;
  border-radius: 8px;
  margin-bottom: 32px;
}

.small-muted p {
  color: #252627;
  font-size: 14px;
  font-weight: 600;
}

.form-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.form-tag {
  background: var(--tag-bg);
  padding: 6px 12px;
  border-radius: 16px;
}

.upload-box {
  border: 1px dashed #ddd;
  border-radius: 10px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #ddd;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
}

.footer-note {
  font-size: 12px;
  color: #999;
  margin-top: 8px;
  text-align: center;
}

@media(max-width: 1040px) {
  .reviews-selects {
    gap: 15px;
  }

  .reviews-top select {
    width: 150px;
  }
}

@media(max-width: 768px) {
  .reviews-top {
    align-items: first baseline;
  }

  .reviews-selects {
    display: flex;
    margin-top: 16px;
    gap: 12px;
  }

  .reviews-selects .select {
    width: 100%;
    max-width: 255px;
  }

  .reviews-top select {
    width: 100%;
  }

  .reviews-top {
    display: flex;
    flex-direction: column-reverse;
  }

  .reviews-selects {
    width: 100%;
  }

  .review-body {
    display: flex;
    flex-direction: column;
  }

  .review-photos {
    margin: 0 auto;
  }

  .review-author-wrapper {
    flex-direction: column-reverse;
    gap: 20px;
  }
}

@media(max-width: 575px) {
  .modal-card {
    margin-top: 740px;
  }
}

@media(max-width: 475px) {
  .modal-card {
    margin-top: 740px;
  }
  .review-photos {
    width: 290px;
  }
  .slider {
    padding-left: 15px;
    padding-right: 15px;
  }
  .slider-arrow.left {
    left: -15px;
  }
  .slider-arrow.right  {
    right: -15px;
  }
  .input-row {
    gap: 12px;
    margin-bottom: 12px;
    flex-direction: column;
  }
  .form-tag {
    font-size: 12px;
    line-height: 18px;
  }
  .upload-box div {
    font-size: 12px;
  }
}
