/* Giao diện khung đánh giá chuẩn maybom.com.vn tương thích Flatsome */
.wdmx-wrapper {
  width: 100%;
  max-width: 100%;
  margin: 18px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #222222;
  box-sizing: border-box;
}

.wdmx-wrapper *,
.wdmx-wrapper *::before,
.wdmx-wrapper *::after {
  box-sizing: border-box;
}

.wdmx-box {
  background: #ffffff;
  padding: 4px 0;
}

.wdmx-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 20px 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* Chống trùng khung đánh giá & form đánh giá mặc định của WooCommerce/Flatsome */
#reviews:not(.wdmx-wrapper),
.woocommerce-Reviews:not(.wdmx-wrapper),
#review_form_wrapper,
#review_form,
.col.large-12:has(> #review_form_wrapper) {
  display: none !important;
}

/* Sao tóm tắt dưới tiêu đề sản phẩm */
.wdmx-header-rating {
  margin: 4px 0 10px 0;
  font-style: normal !important;
}

.wdmx-header-rating-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none !important;
  color: #374151 !important;
  font-size: 13px;
  line-height: 1.3;
}

.wdmx-header-rating-link:hover .wdmx-header-count {
  color: #0f62a8;
  text-decoration: underline;
}

.wdmx-header-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.wdmx-header-score {
  color: #111827;
  font-weight: 700;
}

.wdmx-header-count {
  color: #0f62a8;
}

.wdmx-title {
  margin: 0 0 14px 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #222222;
  font-style: normal !important;
}

/* Hộp tổng hợp 3 cột có viền mảnh */
.wdmx-summary-card {
  display: grid;
  grid-template-columns: 185px 1fr 220px;
  align-items: stretch;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #ffffff;
  margin-bottom: 14px;
}

.wdmx-col-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 14px;
  border-right: 1px solid #e5e7eb;
  text-align: center;
}

.wdmx-score-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.wdmx-score-main {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  color: #f7941d;
}

.wdmx-score-label {
  font-size: 12px;
  font-weight: 700;
  color: #222222;
  letter-spacing: 0.2px;
}

.wdmx-col-bars {
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border-right: 1px solid #e5e7eb;
}

.wdmx-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.25;
}

.wdmx-bar-label {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  width: 30px;
  flex-shrink: 0;
  font-weight: 700;
  color: #111111;
}

.wdmx-bar-track {
  flex: 1;
  height: 10px;
  background: #eeeeee;
  border-radius: 999px;
  overflow: hidden;
}

.wdmx-bar-fill {
  height: 100%;
  background: #f7941d;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.wdmx-bar-info {
  width: 112px;
  flex-shrink: 0;
  font-size: 12px;
  color: #0f62a8;
  white-space: nowrap;
}

.wdmx-bar-info strong {
  font-weight: 700;
  color: #0f62a8;
}

.wdmx-col-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wdmx-btn-write {
  background: #0f62a8 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 12px 22px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.4px !important;
  line-height: 1.2 !important;
  min-height: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
}

.wdmx-btn-write:hover {
  background: #0b4f8a !important;
}

/* Thanh bộ lọc nền xám nhạt */
.wdmx-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: #f5f5f5;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  padding: 10px 14px;
  margin-bottom: 14px;
}

.wdmx-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: #ffffff !important;
  color: #333333 !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 4px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.25 !important;
  min-height: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
}

.wdmx-filter-btn:hover {
  border-color: #0f62a8 !important;
  color: #0f62a8 !important;
}

.wdmx-filter-btn.is-active {
  background: #0f62a8 !important;
  border-color: #0f62a8 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

.wdmx-filter-btn.is-active .wdmx-star-svg path {
  fill: #ffffff;
}

/* Danh sách đánh giá */
.wdmx-list {
  margin-top: 4px;
}

.wdmx-item {
  padding: 10px 0 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.wdmx-item:last-child {
  border-bottom: none;
}

.wdmx-item.wdmx-hidden,
.wdmx-item.wdmx-filter-hidden {
  display: none;
}

.wdmx-item-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.wdmx-author {
  font-size: 14px;
  font-weight: 700;
  color: #111111;
  font-style: normal !important;
}

.wdmx-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  font-style: italic !important;
  color: #2ea44f;
}

.wdmx-item-body {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.wdmx-inline-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex-shrink: 0;
  transform: translateY(1px);
}

.wdmx-star-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.wdmx-item-text {
  flex: 1;
  min-width: 220px;
  font-size: 14px;
  line-height: 1.5;
  color: #222222;
  font-style: normal !important;
}

.wdmx-item-text p {
  display: inline;
  margin: 0 !important;
  font-style: normal !important;
}

.wdmx-item-text p + p::before {
  content: " ";
}

.wdmx-item-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  line-height: 1.3;
  font-style: normal !important;
}

.wdmx-reply-toggle,
.wdmx-helpful-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  line-height: 1.3 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #0f62a8 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
}

.wdmx-reply-toggle:hover,
.wdmx-helpful-btn:hover {
  text-decoration: underline !important;
}

.wdmx-helpful-btn.is-voted {
  font-weight: 700 !important;
  color: #0b4f8a !important;
}

.wdmx-dot {
  color: #9ca3af;
}

.wdmx-date {
  color: #8c8c8c;
  font-size: 12px;
}

/* Trả lời con & form trả lời */
.wdmx-replies {
  margin: 8px 0 4px 18px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #0f62a8;
  border-radius: 0 4px 4px 0;
}

.wdmx-reply-item {
  padding: 4px 0;
}

.wdmx-reply-item + .wdmx-reply-item {
  border-top: 1px dashed #e2e8f0;
  margin-top: 6px;
  padding-top: 6px;
}

.wdmx-reply-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.wdmx-reply-author {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.wdmx-admin-badge {
  background: #0f62a8;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
}

.wdmx-reply-date {
  font-size: 11px;
  color: #8c8c8c;
}

.wdmx-reply-text {
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
}

.wdmx-reply-text p {
  margin: 0 !important;
  font-style: normal !important;
}

.wdmx-reply-form-wrap {
  margin: 10px 0 4px 18px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.wdmx-reply-form textarea,
.wdmx-reply-inputs input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
  margin: 0 0 8px 0;
}

.wdmx-reply-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wdmx-reply-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.wdmx-reply-submit {
  background: #0f62a8 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

.wdmx-reply-cancel {
  background: #ffffff !important;
  color: #4b5563 !important;
  border: 1px solid #d1d5db !important;
  border-radius: 4px !important;
  padding: 5px 12px !important;
  font-size: 12px !important;
  text-transform: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

.wdmx-reply-msg {
  font-size: 12px;
}

.wdmx-reply-msg.is-error {
  color: #dc2626;
}

.wdmx-reply-msg.is-success {
  color: #16a34a;
}

.wdmx-filter-empty,
.wdmx-empty {
  padding: 18px 0;
  font-size: 14px;
  color: #6b7280;
}

.wdmx-more-wrap {
  margin-top: 14px;
  text-align: center;
}

.wdmx-btn-more {
  background: #ffffff !important;
  color: #0f62a8 !important;
  border: 1px solid #0f62a8 !important;
  border-radius: 4px !important;
  padding: 8px 20px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  cursor: pointer;
}

.wdmx-btn-more:hover {
  background: #eff6ff !important;
}

/* Modal Đánh giá ngay */
.wdmx-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.wdmx-modal.is-open {
  display: flex;
}

.wdmx-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.wdmx-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #ffffff;
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  z-index: 1;
}

.wdmx-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent !important;
  border: none !important;
  color: #6b7280 !important;
  font-size: 24px !important;
  line-height: 1 !important;
  padding: 4px 8px !important;
  margin: 0 !important;
  min-height: 0 !important;
  cursor: pointer;
}

.wdmx-modal-title {
  margin: 0 28px 16px 0;
  font-size: 17px;
  font-weight: 700;
  color: #111827;
}

.wdmx-form-stars {
  text-align: center;
  margin-bottom: 14px;
}

.wdmx-form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.wdmx-star-picker {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 4px;
}

.wdmx-star-pick {
  background: transparent !important;
  border: none !important;
  padding: 2px !important;
  margin: 0 !important;
  min-height: 0 !important;
  cursor: pointer;
}

.wdmx-star-pick svg path {
  fill: #d8dde6;
  transition: fill 0.15s ease;
}

.wdmx-star-pick.is-active svg path {
  fill: #f7941d;
}

.wdmx-star-text {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #d97706;
}

.wdmx-form-field {
  margin-bottom: 12px;
}

.wdmx-form-field textarea,
.wdmx-form-field input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: 14px;
  color: #111827;
  background: #ffffff;
  margin: 0;
}

.wdmx-form-field textarea:focus,
.wdmx-form-field input:focus {
  outline: none;
  border-color: #0f62a8;
  box-shadow: 0 0 0 3px rgba(15, 98, 168, 0.12);
}

.wdmx-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wdmx-form-msg {
  font-size: 13px;
  margin-bottom: 10px;
  min-height: 18px;
}

.wdmx-form-msg.is-error {
  color: #dc2626;
}

.wdmx-form-msg.is-success {
  color: #16a34a;
}

.wdmx-btn-submit {
  width: 100%;
  background: #0f62a8 !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  cursor: pointer;
  margin: 0 !important;
}

.wdmx-btn-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.wdmx-hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Mục Hỏi đáp */
.wdmx-qa-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #e5e7eb;
}

.wdmx-qa-title {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #222222;
  font-style: normal !important;
}

.wdmx-qa-box {
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #ffffff;
  overflow: hidden;
}

.wdmx-qa-box textarea {
  width: 100%;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 12px 14px;
  font-size: 13px;
  color: #222222;
  background: #ffffff;
  resize: vertical;
  margin: 0 !important;
  min-height: 92px;
}

.wdmx-qa-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-top: 1px solid #e5e7eb;
}

.wdmx-qa-gender {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #222222;
  padding-right: 4px;
}

.wdmx-qa-gender label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
  font-weight: 600 !important;
  cursor: pointer;
}

.wdmx-qa-gender input[type="radio"] {
  margin: 0 !important;
}

.wdmx-qa-input {
  flex: 1;
  min-width: 150px;
  border: 1px solid #d1d5db !important;
  border-radius: 3px !important;
  padding: 7px 10px !important;
  font-size: 13px !important;
  color: #111827 !important;
  background: #ffffff !important;
  margin: 0 !important;
  height: 34px !important;
}

.wdmx-qa-logged-hint {
  flex: 1;
  font-size: 13px;
  color: #374151;
}

.wdmx-qa-submit {
  background: #e2c033 !important;
  color: #222222 !important;
  border: none !important;
  border-radius: 3px !important;
  padding: 0 22px !important;
  height: 34px !important;
  min-height: 34px !important;
  line-height: 34px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  margin: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
}

.wdmx-qa-submit:hover {
  background: #cfaf28 !important;
}

.wdmx-qa-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.wdmx-qa-msg {
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
}

.wdmx-qa-msg.is-error {
  color: #dc2626;
}

.wdmx-qa-msg.is-success {
  color: #16a34a;
}

.wdmx-qa-list {
  margin-top: 10px;
}

.wdmx-qa-content {
  font-size: 14px;
  line-height: 1.5;
  color: #222222;
  margin-bottom: 6px;
  font-style: normal !important;
}

.wdmx-qa-empty {
  padding: 14px 0 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: #222222;
}

@media (max-width: 768px) {
  .wdmx-card {
    padding: 14px 16px;
  }
  .wdmx-qa-input {
    width: 100%;
    flex: 1 1 100%;
  }
  .wdmx-qa-submit {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .wdmx-summary-card {
    grid-template-columns: 1fr;
  }
  .wdmx-col-score {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px;
  }
  .wdmx-col-bars {
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px;
  }
  .wdmx-col-cta {
    padding: 14px;
  }
  .wdmx-btn-write {
    width: 100%;
  }
  .wdmx-form-row,
  .wdmx-reply-inputs {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
