#cwr-review-form {background: #f9f9f9; padding: 20px; border-radius: 8px; margin-bottom: 20px;}
#cwr-form input, #cwr-form textarea, #cwr-form select {width: 100%; margin-bottom: 10px; padding: 8px; border-radius: 4px; border: 1px solid #ddd;}
#cwr-form button {background: #0073aa; color: #fff; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer;}
#cwr-form button:hover {background: #005177;}
.cwr-review-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 6px;
  margin-bottom: 18px;
  padding: 18px 15px 12px 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: relative;
}
.cwr-review-item .cwr-review-img {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}
.cwr-review-item .cwr-review-img img {
  max-width: 80px;
  max-height: 80px;
  border-radius: 6px;
  border: 1px solid #eee;
  object-fit: cover;
  cursor: pointer;
}
.cwr-review-item b {
  font-size: 16px;
  color: #222;
}
.cwr-review-item span.cwr-like-btn {
  float: right;
  font-size: 15px;
  color: #888;
  cursor: pointer;
  margin-top: 2px;
}
.cwr-like-btn {color: #0073aa; cursor: pointer; margin-left: 10px;}
.cwr-like-btn.liked {color: #e67e22;}
@media (max-width:600px){#cwr-review-form, .cwr-review-item{padding:10px;}}
@media (max-width: 700px) {
  .cwr-review-summary {flex-direction: column; gap: 12px;}
  .cwr-summary-bar {min-width: 0;}
  .cwr-summary-images {flex-wrap: wrap;}
  .cwr-review-filter {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .cwr-sort-group {
    margin-left: 0;
    justify-content: flex-start;
  }
}

.cwr-star-rating {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
  gap: 2px;
}
.cwr-star-rating input[type="radio"] {
  display: none !important;
}
.cwr-star-rating label {
  cursor: pointer;
  padding: 0 2px;
  position: relative;
}
.cwr-star-rating label svg {
  fill: #ccc;
  transition: fill 0.2s;
  pointer-events: none;
  width: 38px;
  height: 38px;
  display: block;
}
.cwr-star-rating label.active svg {
  fill: #ffb300;
}
.cwr-star-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 340px;
  margin: 0 auto 10px auto;
  font-size: 15px;
  color: #444;
  padding-top: 2px;
}
.cwr-star-labels span {
  flex: 1;
  text-align: center;
}

.cwr-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 10px 0;
}
.cwr-page-btn {
  display: inline-block;
  min-width: 32px;
  padding: 6px 12px;
  border-radius: 50%;
  background: #f2f2f2;
  color: #0073aa;
  text-align: center;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid #e0e0e0;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.cwr-page-btn.active, .cwr-page-btn:hover {
  background: #0073aa;
  color: #fff;
  border: 1px solid #0073aa;
}

.cwr-review-summary {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.cwr-summary-left {
  min-width: 120px;
  text-align: center;
}
.cwr-summary-score {
  font-size: 32px;
  font-weight: bold;
  color: #ffb300;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cwr-summary-avg {
  font-size: 38px;
  font-weight: bold;
  color: #ffb300;
  line-height: 1;
}
.cwr-summary-star svg {
  margin: 0 1px;
}
.cwr-summary-total {
  font-size: 15px;
  color: #444;
  margin-top: 6px;
}
.cwr-summary-bar {
  min-width: 180px;
  flex: 1;
  margin-top: 6px;
}
.cwr-bar-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}
.cwr-bar-label {
  min-width: 38px;
  display: flex;
  align-items: center;
  font-size: 15px;
  color: #888;
}
.cwr-bar-bg {
  flex: 1;
  height: 10px;
  background: #eee;
  border-radius: 6px;
  margin: 0 8px;
  overflow: hidden;
}
.cwr-bar-fill {
  display: block;
  height: 100%;
  background: #ffb300;
  border-radius: 6px;
}
.cwr-bar-percent {
  min-width: 38px;
  font-size: 13px;
  color: #888;
}
.cwr-summary-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  max-width: 100%;
  max-height: 190px;
  overflow: hidden;
  position: relative;
}
.cwr-summary-images.expanded {
  max-height: none;
}
.cwr-summary-img-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #eee;
  cursor: pointer;
  flex-shrink: 0;
}
.cwr-more-images {
  width: 54px;
  height: 54px;
  background: rgba(0,0,0,0.5);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.cwr-more-images:hover {
  background: rgba(0,0,0,0.7);
}
.cwr-more-images::before {
  content: "+";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.cwr-more-images::after {
  content: "Xem thêm";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 10px;
  font-weight: normal;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cwr-more-images:hover::after {
  opacity: 1;
}
.cwr-review-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: nowrap;
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #eee;
  justify-content: space-between;
}
.cwr-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.cwr-sort-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cwr-filter-label {
  font-weight: 500;
  color: #444;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cwr-filter-label svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.cwr-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #fff;
  color: #666;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid #ddd;
  margin-right: 4px;
  transition: all 0.2s ease;
}
.cwr-filter-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.cwr-filter-btn.active, .cwr-filter-btn:hover {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
  box-shadow: 0 2px 4px rgba(0,115,170,0.2);
}
.cwr-sort-select {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  font-size: 14px;
  color: #666;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cwr-sort-select:hover {
  border-color: #0073aa;
  color: #0073aa;
}
.cwr-sort-select:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}
@media (max-width: 600px) {
  .cwr-review-filter {
    padding: 8px;
    gap: 8px;
  }
  .cwr-filter-btn {
    padding: 4px 10px;
    font-size: 13px;
  }
  .cwr-sort-select {
    padding: 4px 10px;
    font-size: 13px;
  }
}

#cwr-lightbox {
  position: fixed;
  z-index: 99999;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
#cwr-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.cwr-review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.cwr-review-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 18px;
  font-weight: bold;
  color: #0073aa;
}
.cwr-review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.cwr-avatar-text {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.cwr-review-verified {
  background: #e6f7e6;
  color: #27ae60;
  font-size: 13px;
  border-radius: 10px;
  padding: 2px 10px;
  margin-left: 6px;
  font-weight: 500;
}
.cwr-review-rating {
  margin-left: 8px;
}
.cwr-review-footer {
  margin-top: 8px;
}
.cwr-reply-btn {
  background: #f2f2f2;
  color: #0073aa;
  border: none;
  border-radius: 16px;
  padding: 4px 16px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cwr-reply-btn:hover {
  background: #0073aa;
  color: #fff;
}

.cwr-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.cwr-reply-form input[type="text"] {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 15px;
}
.cwr-reply-form button {
  background: #0073aa;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 4px 14px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}
.cwr-reply-form button:hover {
  background: #005177;
}
.cwr-reply-list {
  margin-top: 8px;
  padding-left: 18px;
  border-left: 2px solid #e0e0e0;
}
.cwr-reply-item {
  font-size: 15px;
  color: #333;
  margin-bottom: 4px;
  padding-left: 2px;
}

.cwr-review-block {
  font-family: Arial, Helvetica, sans-serif;
  background: #fafbfc;
  border-radius: 10px;
  box-sizing: border-box;
  padding: 18px 12px 12px 12px;
  margin: 0 auto 24px auto;
  max-width: 820px;
  min-width: 0;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.cwr-review-block * {
  box-sizing: border-box !important;
}
.cwr-review-list-block {
  margin-top: 8px;
}
.cwr-review-block hr {
  border: none;
  border-top: 1.5px solid #e0e0e0;
  margin: 18px 0;
}

.cwr-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.cwr-image-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cwr-image-preview-title {
    font-size: 15px;
    color: #444;
    font-weight: 500;
}

.cwr-clear-images {
    background: #fff;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cwr-clear-images:hover {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.cwr-clear-images svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.cwr-image-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
    cursor: move;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cwr-image-preview-item.dragging {
    opacity: 0.5;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cwr-image-preview-item.drag-over {
    border: 2px dashed #0073aa;
}

.cwr-image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cwr-image-preview-item .cwr-remove-image {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid #e74c3c;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    opacity: 0;
    transform: scale(0.8);
}

.cwr-image-preview-item:hover .cwr-remove-image {
    opacity: 1;
    transform: scale(1);
}

.cwr-image-preview-item .cwr-remove-image:hover {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 2px 4px rgba(231, 76, 60, 0.2);
}

.cwr-image-preview-item .cwr-remove-image::before {
    content: "×";
    font-weight: 300;
    transform: translateY(-1px);
}

.cwr-image-preview-item .cwr-remove-image:focus {
    outline: none;
}

.cwr-image-preview-item .cwr-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cwr-image-preview-item .cwr-loading::after {
    content: "";
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: cwr-spin 1s linear infinite;
}

@keyframes cwr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cwr-image-preview-item .cwr-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.1);
    overflow: hidden;
}

.cwr-image-preview-item .cwr-progress-bar {
    height: 100%;
    background: #0073aa;
    width: 0;
    transition: width 0.3s ease;
}

.cwr-image-preview-item .cwr-progress-text {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cwr-image-preview-item:hover .cwr-progress-text {
    opacity: 1;
}

/* Style cho input file */
.cwr-file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 10px;
}

.cwr-file-input-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.cwr-file-input-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 12px;
    color: #666;
    font-size: 15px;
    transition: all 0.2s ease;
}

.cwr-file-input-trigger:hover {
    border-color: #0073aa;
    color: #0073aa;
    background: #f0f7fb;
}

.cwr-file-input-trigger svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

@media (max-width: 600px) {
    .cwr-summary-images {
        gap: 6px;
        max-height: 162px;
    }
    .cwr-summary-img-thumb,
    .cwr-more-images {
        width: 48px;
        height: 48px;
    }
} 