/*! CustomersSay embed.css (Storefront API v1) - generated by app/lib/storefront/embedBundle.server.ts */

/* ---- customerssay-header.css ---- */
/**
 * CustomersSay Header - 公用样式
 * 统一 B 端和 C 端的 Header 组件样式
 * 基于 Figma 设计稿：
 * - 有图片版本: node-id=1694-1723
 * - 无图片版本: node-id=1694-1149
 */

/* ===== 主容器 ===== */
.customerssay-header {
  background: var(--customerssay-card-bg, #fff);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 12px;
  box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.1);
  color: var(--customerssay-text-color, #1b1f27);
}

/* ===== 标题 ===== */
.customerssay-header-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--customerssay-text-color, #1b1f27);
}

.customerssay-header-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===== 有图片模式布局 ===== */
.customerssay-header-main-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .customerssay-header-main-row {
    flex-direction: row;
    align-items: flex-end;
  }
}

/* ===== 无图片模式布局 ===== */
.customerssay-header-no-gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .customerssay-header-no-gallery {
    flex-direction: row;
    align-items: center;
  }

  .customerssay-header-no-gallery .customerssay-header-stats {
    flex: 0 0 auto;
  }

  .customerssay-header-no-gallery .customerssay-header-divider {
    display: block;
  }

  .customerssay-header-no-gallery .customerssay-header-breakdown-section {
    flex: 1;
    max-width: 300px;
  }

  .customerssay-header-no-gallery .customerssay-header-write-review,
  .customerssay-header-no-gallery .customerssay-header-action-buttons {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* 分隔线 */
.customerssay-header-divider {
  display: none;
  width: 1px;
  align-self: stretch;
  background-color: #e5e5e5;
  margin: 0 24px;
}

/* ===== 评分区域 ===== */
.customerssay-header-rating-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 0 430px;
  min-width: 280px;
}

.customerssay-header-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 总体评分 */
.customerssay-header-overall {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customerssay-header-rating-number {
  font-size: 24px;
  font-weight: 600;
  color: var(--customerssay-text-color, #1b1f27);
  line-height: 1;
}

.customerssay-header-stars {
  display: flex;
  align-items: center;
  gap: 0;
}

.customerssay-header-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.customerssay-header-star.filled {
  color: var(--star-color, #ffcc43);
}

.customerssay-header-star.empty {
  color: #e5e5e5;
}

.customerssay-header-star svg {
  width: 100%;
  height: 100%;
}

.customerssay-header-star-small {
  width: 14px;
  height: 14px;
}

.customerssay-header-rating-text {
  color: var(--customerssay-text-color, #23272f);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

/* ===== 推荐百分比 ===== */
.customerssay-header-recommendation {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customerssay-header-recommendation-percentage {
  color: var(--customerssay-text-color, #1b1f27);
  font-size: 20px;
  font-weight: 600;
}

.customerssay-header-recommendation-text {
  color: var(--customerssay-text-color, #000000);
  font-size: 14px;
  font-weight: 600;
}

/* ===== 星级分布 ===== */
.customerssay-header-breakdown,
.customerssay-header-breakdown-section .customerssay-header-breakdown {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.customerssay-header-breakdown-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customerssay-header-breakdown-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.customerssay-header-breakdown-label {
  font-size: 14px;
  font-weight: 400;
  color: var(--customerssay-text-color, #23272f);
  width: 10px;
  text-align: center;
  line-height: 20px;
}

.customerssay-header-breakdown-star {
  color: var(--star-color, #ffcc43);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}

.customerssay-header-breakdown-star svg {
  width: 100%;
  height: 100%;
}

.customerssay-header-breakdown-progress {
  flex: 1;
  background-color: #e5e5e5;
  border-radius: 3px;
  height: 6px;
  overflow: hidden;
  position: relative;
}

.customerssay-header-breakdown-fill {
  display: block !important;
  position: absolute;
  left: 0;
  top: 0;
  background-color: #ffcc43;
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.customerssay-header-breakdown-count {
  font-size: 14px;
  font-weight: 400;
  color: var(--customerssay-text-color, #23272f);
  line-height: 20px;
  min-width: 20px;
  text-align: right;
}

/* ===== 图片画廊 ===== */
.customerssay-header-gallery-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: 196px;
}

.customerssay-header-gallery {
  height: 196px;
  max-height: 196px;
}

.customerssay-header-gallery-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.customerssay-header-gallery-scroll {
  overflow: hidden;
  height: 100%;
}

.customerssay-header-gallery-row {
  display: flex;
  gap: 4px;
  height: 196px;
  transition: transform 0.3s ease;
}

.customerssay-header-gallery-item {
  flex: 0 0 auto;
  width: calc(25% - 3px);
  height: 100%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border-radius: 4px;
}

.customerssay-header-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customerssay-header-gallery-item:hover {
  opacity: 0.9;
}

/* 视频覆盖层 */
.customerssay-header-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.customerssay-header-video-play {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-header-video-play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 16px solid #333;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

/* 无媒体占位 */
.customerssay-header-no-media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 14px;
  width: 100%;
  min-height: 172px;
  border-radius: 10px;
}

/* 滚动按钮 */
.customerssay-header-scroll-btn {
  position: absolute;
  top: 0;
  width: 24px;
  height: 196px;
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.95) 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 0;
  transition: opacity 0.2s ease;
}

.customerssay-header-scroll-btn:hover {
  background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 1) 100%);
}

.customerssay-header-scroll-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

.customerssay-header-scroll-left {
  left: 0;
  background: linear-gradient(to left, transparent 0%, rgba(255, 255, 255, 0.95) 100%);
}

.customerssay-header-scroll-left:hover {
  background: linear-gradient(to left, transparent 0%, rgba(255, 255, 255, 1) 100%);
}

.customerssay-header-scroll-left::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-left: 2px solid #374151;
  border-bottom: 2px solid #374151;
  transform: rotate(45deg);
  margin-right: -4px;
}

.customerssay-header-scroll-right {
  right: 0;
}

.customerssay-header-scroll-right::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid #374151;
  border-bottom: 2px solid #374151;
  transform: rotate(-45deg);
  margin-left: -4px;
}

/* ===== Action Buttons (Write a Review + Ask a Question) ===== */
.customerssay-header-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.customerssay-header-write-review {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.customerssay-header-write-btn,
.customerssay-header-ask-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.customerssay-header-write-btn {
  background: #252525;
  color: #fff;
}

.customerssay-header-write-btn:hover {
  background: #3a3a3a;
}

.customerssay-header-ask-btn {
  background: #fff;
  color: #252525;
  border: 1px solid #d1d5db;
}

.customerssay-header-ask-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.customerssay-header-ask-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.customerssay-icon-write-review {
  display: inline-flex;
  width: 16px;
  height: 16px;
}

/* 底部行：推荐百分比 + Action Buttons */
.customerssay-header-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

/* ===== 响应式 ===== */
@media (max-width: 767px) {
  .customerssay-header-rating-section {
    flex: 1 1 100%;
    min-width: auto;
  }

  .customerssay-header-gallery-section {
    max-height: 140px;
  }

  .customerssay-header-gallery {
    height: 140px;
    max-height: 140px;
  }

  .customerssay-header-gallery-row {
    height: 140px;
  }

  .customerssay-header-gallery-item {
    width: calc(50% - 2px);
  }

  .customerssay-header-scroll-btn {
    height: 140px;
  }

  .customerssay-header-no-gallery {
    flex-direction: column;
    align-items: stretch;
  }

  .customerssay-header-no-gallery .customerssay-header-breakdown-section {
    max-width: none;
  }

  .customerssay-header-write-review,
  .customerssay-header-action-buttons {
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
  }

  .customerssay-header-bottom-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .customerssay-header-bottom-row .customerssay-header-write-review,
  .customerssay-header-bottom-row .customerssay-header-action-buttons {
    justify-content: center;
    width: 100%;
  }

  /* 移动端按钮尺寸调整 */
  .customerssay-header-write-btn,
  .customerssay-header-ask-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}


/* ---- customerssay-review-card.css ---- */
/**
 * CustomersSay Review Card - 公共样式
 * 适用于所有布局 (List, Split, Grid, Carouse)
 * 各布局通过父容器类名区分差异
 */

/* ===== CSS Variables for Theme Support ===== */
:root {
  --customerssay-bg-color: #ffffff;
  --customerssay-text-color: #1f2937;
  --customerssay-card-bg: #ffffff;
  --customerssay-border-color: #e5e7eb;
  --customerssay-star-color: #ffc107;
  --customerssay-secondary-text: #6b7280;
  --customerssay-widget-bg: #f9fafb;
}

/* Dark Theme */
.customerssay-widget.theme-dark {
  --customerssay-bg-color: #1f2937;
  --customerssay-text-color: #f9fafb;
  --customerssay-card-bg: #374151;
  --customerssay-border-color: #4b5563;
  --customerssay-secondary-text: #9ca3af;
  --customerssay-widget-bg: #111827;
}

/* ===== 评论卡片基础 ===== */
.customerssay-review-item,
.customerssay-list-review-item,
.customerssay-split-review-item,
.customerssay-carouse-review-item,
.customerssay-grid-review-item {
  background: var(--customerssay-card-bg, #ffffff);
  border-radius: 8px;
  padding: 16px;
}

/* ===== 头像 ===== */
.customerssay-reviewer-avatar,
.customerssay-list-reviewer-avatar,
.customerssay-split-review-avatar,
.customerssay-carouse-reviewer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.customerssay-card__merchant-content{
  width: 100%;
}

.customerssay-reviewer-initials,
.customerssay-list-reviewer-initials,
.customerssay-split-reviewer-initials,
.customerssay-carouse-reviewer-initials {
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  line-height: 1;
}

/* ===== 昵称 ===== */
.customerssay-reviewer-name,
.customerssay-list-reviewer-name-text,
.customerssay-split-reviewer-name,
.customerssay-carouse-reviewer-name-text {
  font-size: 14px;
  font-weight: 500;
  color: #1B1F27;
  line-height: 1.4;
}

/* ===== 认证徽章 ===== */
.customerssay-verified-badge,
.customerssay-list-verified-badge,
.customerssay-split-verified-badge,
.customerssay-carouse-verified-badge {
  color: #3b82f6;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

/* ===== 评论标题 ===== */
.customerssay-review-title,
.customerssay-list-review-title,
.customerssay-split-review-title,
.customerssay-carouse-review-title {
  color: #000000;
  font-size: 15px;
  font-weight: 600;
  line-height: normal;
  word-break: break-word;
}

/* ===== 星星评分 ===== */
.customerssay-review-stars,
.customerssay-list-review-stars,
.customerssay-split-review-stars,
.customerssay-carouse-review-stars {
  display: flex;
  gap: 2px;
}

.customerssay-review-stars .star,
.customerssay-list-review-stars .star,
.customerssay-split-review-stars .star,
.customerssay-carouse-review-stars .star {
  width: 16px;
  height: 16px;
  color: var(--star-color, #fbbf24);
}

.customerssay-review-stars .star.empty,
.customerssay-list-review-stars .star.empty,
.customerssay-split-review-stars .star.empty,
.customerssay-carouse-review-stars .star.empty {
  color: #d1d5db;
}

/* ===== 时间 ===== */
.customerssay-review-time,
.customerssay-list-review-time,
.customerssay-split-review-time,
.customerssay-carouse-review-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #909090;
  font-weight: 400;
}

.customerssay-review-time svg,
.customerssay-list-review-time svg,
.customerssay-split-review-time svg,
.customerssay-carouse-review-time svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* ===== 推荐 ===== */
.customerssay-review-recommendation,
.customerssay-list-review-recommendation,
.customerssay-split-review-recommendation,
.customerssay-carouse-review-recommendation {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #3F3F3F;
}

.customerssay-review-recommendation svg,
.customerssay-list-review-recommendation svg,
.customerssay-split-review-recommendation svg,
.customerssay-carouse-review-recommendation svg {
  width: 16px;
  height: 16px;
  color: #10b981;
}

/* ===== 评论内容 ===== */
.customerssay-review-text,
.customerssay-list-review-text,
.customerssay-split-review-text,
.customerssay-carouse-review-text {
  color: #373737;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customerssay-review-text.expanded,
.customerssay-list-review-text.expanded,
.customerssay-split-review-text.expanded,
.customerssay-carouse-review-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

/* ===== Read More 按钮 ===== */
.customerssay-read-more-btn,
.customerssay-list-read-more-btn,
.customerssay-split-read-more-btn,
.customerssay-carouse-read-more-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  margin-top: 4px;
  transition: color 0.2s;
}

.customerssay-read-more-btn:hover,
.customerssay-list-read-more-btn:hover,
.customerssay-split-read-more-btn:hover,
.customerssay-carouse-read-more-btn:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

/* ===== 评论图片 ===== */
.customerssay-review-images-grid,
.customerssay-list-review-images-grid,
.customerssay-split-review-images-grid,
.customerssay-carouse-review-images-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.customerssay-review-image,
.customerssay-list-review-image,
.customerssay-split-review-image,
.customerssay-carouse-review-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.customerssay-review-image img,
.customerssay-list-review-image img,
.customerssay-split-review-image img,
.customerssay-carouse-review-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customerssay-review-image:hover,
.customerssay-list-review-image:hover,
.customerssay-split-review-image:hover,
.customerssay-carouse-review-image:hover {
  opacity: 0.9;
}

/* ===== 有用性反�?===== */
.customerssay-review-helpfulness,
.customerssay-list-review-helpfulness,
.customerssay-split-review-helpfulness,
.customerssay-carouse-review-helpfulness {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.customerssay-helpfulness-text,
.customerssay-list-helpfulness-text,
.customerssay-split-helpfulness-text,
.customerssay-carouse-helpfulness-text {
  font-size: 13px;
  color: #909090;
}

.customerssay-helpfulness-buttons,
.customerssay-list-helpfulness-buttons,
.customerssay-split-helpfulness-buttons,
.customerssay-carouse-helpfulness-buttons {
  display: flex;
  gap: 8px;
}

.customerssay-helpfulness-btn,
.customerssay-list-helpfulness-btn,
.customerssay-split-helpfulness-btn,
.customerssay-carouse-helpfulness-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background-color: transparent;
  color: #000000;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.customerssay-helpfulness-btn:hover,
.customerssay-list-helpfulness-btn:hover,
.customerssay-split-helpfulness-btn:hover,
.customerssay-carouse-helpfulness-btn:hover {
  background-color: #f9fafb;
}

.customerssay-helpfulness-btn.active,
.customerssay-list-helpfulness-btn.active,
.customerssay-split-helpfulness-btn.active,
.customerssay-carouse-helpfulness-btn.active {
  background-color: #3b82f6;
  color: white;
}

.customerssay-like-count,
.customerssay-dislike-count,
.customerssay-list-like-count,
.customerssay-list-dislike-count,
.customerssay-split-like-count,
.customerssay-split-dislike-count,
.customerssay-carouse-like-count,
.customerssay-carouse-dislike-count {
  font-size: 12px;
  font-weight: 400;
  color: #000000;
}

/* ===== 商家回复 ===== */
.customerssay-merchant-response,
.customerssay-list-merchant-response,
.customerssay-split-merchant-response,
.customerssay-carouse-merchant-response {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #DCDCDC;
  border-radius: 8px;
  display: flex;
  gap: 12px;
}

.customerssay-merchant-avatar-img,
.customerssay-list-merchant-avatar-img,
.customerssay-split-merchant-avatar-img,
.customerssay-carouse-merchant-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background-color: #f0f0f0;
}

.customerssay-merchant-response-label,
.customerssay-list-merchant-response-label,
.customerssay-split-merchant-response-label,
.customerssay-carouse-merchant-response-label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.customerssay-merchant-response-content,
.customerssay-list-merchant-response-content,
.customerssay-split-merchant-response-content,
.customerssay-carouse-merchant-response-content {
  font-size: 14px;
  line-height: 1.5;
  color: #374151;
}

.customerssay-merchant-response-time,
.customerssay-list-merchant-response-time,
.customerssay-split-merchant-response-time,
.customerssay-carouse-merchant-response-time {
  font-size: 12px;
  color: #909090;
  margin-top: 8px;
}

/* ===== 无评论消�?===== */
.customerssay-no-reviews-message,
.customerssay-list-no-reviews-message,
.customerssay-split-no-reviews-message,
.customerssay-carouse-no-reviews-message,
.customerssay-grid-no-reviews-message {
  text-align: center;
  color: #6b7280;
  font-size: 16px;
  padding: 40px 20px;
}

/* ===== Show More 按钮 ===== */
.customerssay-more-button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  margin-top: 20px;
}

.customerssay-more-btn {
  background-color: #252525;
  border: none;
  border-radius: 4px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 100px;
}

.customerssay-more-btn:hover {
  background-color: #3a3a3a;
}

/* ================================================
   新组件样�?- customerssay-card
   ================================================ */

/* 卡片容器 */
.customerssay-card {
  background: var(--customerssay-card-bg, #ffffff);
  padding: 24px 12px;
  border-bottom: 1px solid var(--customerssay-border-color, #F1F1F1);
}

.customerssay-card:last-child {
  border-bottom: none;
}

/* 卡片头部 */
.customerssay-card__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

/* 头像 */
.customerssay-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  /* 背景色由 JS 动态设置 */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.customerssay-card__initials {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  text-transform: uppercase;
}

/* 头部信息容器 */
.customerssay-card__header-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* 名字�?*/
.customerssay-card__name-row {
  display: flex;
  align-items: center;
}

.customerssay-card__name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.customerssay-card__name-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--customerssay-secondary-text, #666666);
  line-height: 1.4;
}

/* 认证徽章 */
.customerssay-card__verified {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  color: var(--customerssay-text-color, #111);
}

/* 标题+时间�?*/
.customerssay-card__title-time-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

/* 标题 */
.customerssay-card__title {
  font-size: 16px;
  font-weight: 700; /* 加粗 */
  color: var(--customerssay-text-color, #000000);
  line-height: 1.4;
  margin-top: 2px;
  word-break: break-word;
}

/* 时间 */
.customerssay-card__time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--customerssay-secondary-text, #9CA3AF);
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px; /* 微调对齐 */
}

.customerssay-card__time svg {
  display: flex;
  align-items: center;
  width: 14px;
  height: 14px;
}

/* 评分�?*/
.customerssay-card__rating-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

/* 星星 */
.customerssay-card__stars {
  display: flex;
  gap: 3px;
}

.customerssay-card__star {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customerssay-card__star.filled {
  color: #FBBF24;
}

.customerssay-card__star.half {
  color: #FBBF24;
}

.customerssay-card__star.empty {
  color: #E5E7EB;
}

/* 推荐标签 */
.customerssay-card__recommendation {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
}

.customerssay-card__recommendation svg {
  width: 16px;
  height: 16px;
  color: #1F2937;
}

/* 内容�?*/
.customerssay-card__content {
  margin-top: 12px;
}

.customerssay-card__text {
  font-size: 15px; /* 加大一点内容字�?*/
  line-height: 1.6;
  color: #374151;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;
}

.customerssay-card__text.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.customerssay-card__read-more {
  background: none;
  border: none;
  color: #000;
  text-decoration: underline;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-top: 8px;
}

/* 媒体�?*/
.customerssay-card__media {
  margin-top: 16px;
}

.customerssay-card__media-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.customerssay-card__media-item {
  width: 160px; /* 加大图片尺寸 */
  height: 120px;
  border-radius: 12px; /* 更大的圆�?*/
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 1px solid #eee;
}

.customerssay-card__media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.customerssay-card__media-item:hover img {
  transform: scale(1.05);
}

.customerssay-card__media-item.is-video::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}

/* 有用性反�?*/
.customerssay-card__helpfulness {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.customerssay-card__helpfulness-text {
  font-size: 12px;
  color: var(--customerssay-secondary-text, #9CA3AF);
}

.customerssay-card__helpfulness-buttons {
  display: flex;
  gap: 8px;
}

.customerssay-card__helpfulness-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #6B7280;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.customerssay-card__helpfulness-btn:hover {
  background-color: #F3F4F6;
  color: #111;
}

.customerssay-card__helpfulness-btn.active {
  color: #2563eb;
  background-color: #eff6ff;
  font-weight: 500;
}

.customerssay-card__helpfulness-btn.active svg {
  fill: currentColor;
}

.customerssay-card__count {
  font-weight: 600;
  font-size: 12px;
}

/* 商家回复 */
.customerssay-card__merchant-response {
  margin-top: 20px;
  padding: 16px 20px;
  background: #F9FAFB;
  border-left: 3px solid #E5E7EB;
  border-radius: 4px; /* 方一�?*/
  display: flex;
  gap: 16px;
}

.customerssay-card__merchant-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

/* 商家回复头部：标题 + 时间 */
.customerssay-card__merchant-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.customerssay-card__merchant-label {
  font-size: 13px;
  font-weight: 700;
  color: #111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.customerssay-card__merchant-text {
  font-size: 14px;
  color: #4B5563;
  line-height: 1.6;
}

.customerssay-card__merchant-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #9CA3AF;
}

/* ===============================
   布局容器样式
   =============================== */

.customerssay-widget {
  background: var(--customerssay-widget-bg, #f9fafb);
  padding: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--customerssay-text-color, #1f2937);
  box-sizing: border-box;
}

.customerssay-comments-section {
  background: var(--customerssay-card-bg, #ffffff);
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.customerssay-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.customerssay-comments-title {
  font-size: 18px;
  font-weight: 600;
  color: #1b1f27;
  margin: 0;
}

.customerssay-sort-select {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

.customerssay-reviews-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.customerssay-no-reviews {
  text-align: center;
  color: #6b7280;
  font-size: 16px;
  padding: 40px 20px;
}

.customerssay-pagination {
  display: flex;
  justify-content: center;
  padding: 20px 0;
}

.customerssay-load-more-btn {
  background: #252525;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.customerssay-load-more-btn:hover {
  background: #3a3a3a;
}

/* 排序时的平滑加载状�?*/
#customerssay-reviews-container {
  transition: opacity 0.3s ease;
}

#customerssay-reviews-container.loading-update {
  opacity: 0.5;
  pointer-events: none;
}

/* =========================================
   Split Layout (左右分栏布局)
   ========================================= */

.customerssay-card--split {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.customerssay-card__left {
  width: 220px; /* 固定宽度侧边�?*/
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 24px;
  border-right: 1px solid #F3F4F6;
}

.customerssay-card__right {
  flex: 1;
  min-width: 0; /* 防止内容溢出 */
}

/* Split 布局下的特定样式调整 */
.customerssay-card--split .customerssay-card__user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customerssay-card--split .customerssay-card__avatar {
  width: 48px;
  height: 48px;
  font-size: 20px;
}

.customerssay-card--split .customerssay-card__name {
  font-size: 15px;
  font-weight: 600;
}

.customerssay-card--split .customerssay-card__rating-row {
  margin-top: 8px;
  justify-content: flex-start;
  gap: 12px;
}

/* 响应式：移动端回退到堆叠布局 */
@media (max-width: 768px) {
  .customerssay-card--split {
    flex-direction: column;
    gap: 16px;
  }

  .customerssay-card__left {
    width: 100%;
    padding-right: 0;
    border-right: none;
    flex-direction: column;
    align-items: left;
    border-bottom: 1px solid #F3F4F6;
    padding-bottom: 12px;
  }
}

/* Split Header (Title + Time) */
.customerssay-card__split-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start; /* Title might wrap, keep time at top or center? Start is safer */
  gap: 16px;
}

.customerssay-card__split-header .customerssay-card__title {
  margin: 0; /* Override default margins if any */
  padding: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.customerssay-card__split-header .customerssay-card__time {
  margin-top: 2px; /* Slight adjust to align with text top */
}

/* =========================================
   Carousel Layout (3 列网格布局)
   �?Figma 设计�?node-id=313-1329
   ========================================= */

/* Carousel 容器 - 3 列网�?*/
.customerssay-reviews-Carouse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .customerssay-reviews-Carouse {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .customerssay-reviews-Carouse {
    grid-template-columns: 1fr;
  }
}

/* Carousel 卡片 */
.customerssay-card--Carouse {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: none;
}

/* Carousel 图片区域 - 顶部 */
.customerssay-card__media-top {
  width: 100%;
  height: 186px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f9fafb;
}

.customerssay-card__media-top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.customerssay-card__media-top:hover img {
  transform: scale(1.05);
}

/* 无图片占�?*/
.customerssay-card__media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9ca3af;
  font-size: 14px;
}

/* "+N more" 标签 */
.customerssay-card__media-more {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

/* Carousel 卡片主体 */
.customerssay-card--Carouse .customerssay-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* 用户行：头像 + 名称 */
.customerssay-card__user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customerssay-card--Carouse .customerssay-card__avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

/* 推荐标签 */
.customerssay-card--Carouse .customerssay-card__recommendation {
  font-size: 12px;
  gap: 4px;
}

.customerssay-card--Carouse .customerssay-card__recommendation svg {
  display: flex;
  align-items: center;
  width: 14px;
  height: 14px;
}

/* 评分时间�?*/
.customerssay-card__rating-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customerssay-card--Carouse .customerssay-card__stars {
  gap: 2px;
}

.customerssay-card--Carouse .customerssay-card__star {
  width: 14px;
  height: 14px;
}

.customerssay-card--Carouse .customerssay-card__time {
  font-size: 12px;
}

/* 标题 */
.customerssay-card--Carouse .customerssay-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 4px;
}

/* 内容文本 */
.customerssay-card--Carouse .customerssay-card__text {
  font-size: 13px;
  line-height: 1.5;
  -webkit-line-clamp: 3;
}

/* 底部行：回复 + 反馈 */
.customerssay-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

.customerssay-card__reply-link {
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
}

.customerssay-card__reply-link:hover {
  color: #1d4ed8;
}

/* Carousel 反馈按钮调整 */
.customerssay-card--Carouse .customerssay-card__helpfulness {
  margin-top: 0;
  gap: 8px;
}

.customerssay-card--Carouse .customerssay-card__helpfulness-text {
  font-size: 11px;
}

.customerssay-card--Carouse .customerssay-card__helpfulness-btn {
  padding: 2px 6px;
  font-size: 12px;
}

/* Carousel 商家回复 */
.customerssay-card--Carouse .customerssay-card__merchant-response {
  margin-top: 12px;
  padding: 12px;
  font-size: 13px;
  border-radius: 8px;
  background: #f3f4f6;
  border-left: none;
}

.customerssay-card--Carouse .customerssay-card__merchant-label {
  font-size: 12px;
}

.customerssay-card--Carouse .customerssay-card__merchant-text {
  font-size: 12px;
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customerssay-card--Carouse .customerssay-card__merchant-time {
  font-size: 11px;
}


/* =========================================
   Grid/Masonry Layout (ٲ)
    Figma Ƹ node-id=313-2227
   ========================================= */

/* Grid 容器 - 瀑布流 3 列 */
.customerssay-reviews-grid {
  column-count: 3;
  column-gap: 16px;
  column-fill: balance; /* 尝试平衡各列高度 */
  width: 100%;
}

@media (max-width: 1024px) {
  .customerssay-reviews-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .customerssay-reviews-grid {
    column-count: 1;
  }
}

/* Grid 卡片 - 防止断裂 */
.customerssay-card--grid {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  /* 使用 block 而不是 inline-block，有助于列平衡 */
  display: block;
  width: 100%;
  margin-bottom: 16px;
  /* 现代浏览器使用 break-inside */
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  padding: 0;
  border: none;
}

/* Grid ͼƬ - Ӧ߶ */
.customerssay-card--grid .customerssay-card__media-top {
  width: 100%;
  height: auto;
  min-height: 120px;
  max-height: 280px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f9fafb;
}

.customerssay-card--grid .customerssay-card__media-top img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.customerssay-card--grid .customerssay-card__media-top:hover img {
  transform: scale(1.05);
}

/* Grid ��Ƭ���� */
.customerssay-card--grid .customerssay-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Grid �û��� */
.customerssay-card--grid .customerssay-card__user-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customerssay-card--grid .customerssay-card__avatar {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

/* Grid �Ƽ���ǩ */
.customerssay-card--grid .customerssay-card__recommendation {
  font-size: 12px;
  gap: 4px;
}

/* Grid ����ʱ���� */
.customerssay-card--grid .customerssay-card__rating-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customerssay-card--grid .customerssay-card__stars {
  gap: 2px;
}

.customerssay-card--grid .customerssay-card__star {
  width: 14px;
  height: 14px;
}

.customerssay-card--grid .customerssay-card__time {
  font-size: 12px;
}

/* Grid ���� */
.customerssay-card--grid .customerssay-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-top: 4px;
}

/* Grid �����ı� - ���������� */
.customerssay-card--grid .customerssay-card__text {
  font-size: 13px;
  line-height: 1.5;
}

/* Grid �ײ��� */
.customerssay-card--grid .customerssay-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}

/* Grid ������ť */
.customerssay-card--grid .customerssay-card__helpfulness {
  margin-top: 0;
  gap: 8px;
}

.customerssay-card--grid .customerssay-card__helpfulness-text {
  font-size: 11px;
}

.customerssay-card--grid .customerssay-card__helpfulness-btn {
  padding: 2px 6px;
  font-size: 12px;
}

/* Grid �̼һظ� */
.customerssay-card--grid .customerssay-card__merchant-response {
  margin-top: 12px;
  padding: 12px;
  font-size: 13px;
  border-radius: 8px;
  background: #f3f4f6;
  border-left: none;
}

.customerssay-card--grid .customerssay-card__merchant-label {
  font-size: 12px;
}

.customerssay-card--grid .customerssay-card__merchant-text {
  font-size: 12px;
}

.customerssay-card--grid .customerssay-card__merchant-time {
  font-size: 11px;
}


@media screen and (max-width: 768px) {
  .customerssay-comments-title {
    font-size: 14px;
  }

  /* 移动端：标题+时间行改为纵向排列，避免标题被压缩 */
  .customerssay-card__title-time-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .customerssay-card__time {
    margin-top: 0;
  }

  /* Split 布局：移动端标题+时间也改为纵向排列 */
  .customerssay-card__split-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .customerssay-card__split-header .customerssay-card__time {
    margin-top: 0;
  }
  .customerssay-card__rating-row{
    flex-direction: column;
    align-items: flex-start;
    gap: 8px
  }
}


/* ---- customerssay-mobile.css ---- */
/* CustomersSay Reviews - 移动端通用样式 */

/* 移动端基础样式 - 768px断点 */
.customerssay-mobile {
  /* 确保在移动端有合适的间距 */
  padding: 16px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 768px !important;
}

/* 防止所有子元素溢出，但允许自适应换行 */
.customerssay-mobile * {
  box-sizing: border-box;
  word-wrap: break-word;
}

/* 移动端按钮样式 */
@media (max-width: 768px) {

  .customerssay-write-review-btn,
  .customerssay-grid-write-review-btn,
  .customerssay-grid-filters-btn,
  .customerssay-action-btn,
  .customerssay-grid-vote-btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    padding: 10px 16px;
    font-size: 14px;
    white-space: nowrap;
    box-sizing: border-box;
  }

  /* 确保按钮容器自适应换行 */
  .customerssay-grid-left-controls,
  .customerssay-grid-right-controls,
  .customerssay-list-summary-action {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  /* 移动端文本输入框 */
  .customerssay-search-bar {
    font-size: 16px;
    /* 防止iOS缩放 */
  }

  /* 移动端图片网格 */
  .customerssay-photos-grid,
  .customerssay-grid-gallery-grid {
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
  }

  .customerssay-grid-gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  }

  /* 移动端评论卡片间距 */
  .customerssay-grid-review-card,
  .customerssay-review-item {
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  /* 移动端评论图片 */
  .customerssay-grid-review-images,
  .customerssay-review-image {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
  }

  .customerssay-grid-review-image,
  .customerssay-review-media-item {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
  }

  /* 移动端头像大小调整 */
  .customerssay-reviewer-initials,
  .customerssay-grid-reviewer-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* 移动端验证标签 */
  .customerssay-grid-verified-badge,
  .customerssay-verified-badge {
    margin-left: 0 !important;
    margin-top: 4px;
    align-self: flex-start;
  }

  /* 移动端星星评分大小 */
  .customerssay-stars,
  .customerssay-grid-review-rating {
    font-size: 16px;
  }

  /* 移动端商家回复样式 */
  .customerssay-merchant-reply,
  .customerssay-grid-merchant-reply {
    margin-left: 0;
    margin-right: 0;
  }

  /* 移动端反应按钮 */
  .customerssay-review-reactions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .customerssay-grid-vote-section {
    justify-content: center;
    width: 100%;
  }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
  .customerssay-mobile {
    padding: 12px !important;
  }

  /* 超小屏幕按钮 */
  .customerssay-write-review-btn,
  .customerssay-grid-write-review-btn,
  .customerssay-grid-filters-btn {
    padding: 8px 16px;
    font-size: 14px;
  }

  /* 超小屏幕头像 */
  .customerssay-reviewer-initials,
  .customerssay-grid-reviewer-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  /* 超小屏幕评分数字 */
  .customerssay-list-average-rating,
  .customerssay-grid-rating-number {
    font-size: 1.8rem;
  }

  /* 超小屏幕标题 */
  .customerssay-list-title,
  .customerssay-grid-title {
    font-size: 1.5rem;
  }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {

  .customerssay-list-summary,
  .customerssay-grid-rating-overview {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }

  .customerssay-list-summary-left {
    text-align: left;
  }

  .customerssay-list-summary-distribution {
    max-width: 250px;
  }
}

/* 触摸友好的交互 */
@media (max-width: 768px) {

  /* 增加点击区域 */
  .customerssay-tab,
  .customerssay-sort-select,
  .customerssay-grid-sort-select {
    min-height: 44px;
    padding: 12px 16px;
  }

  /* 改善滚动体验 */
  .customerssay-review-list,
  .customerssay-grid-reviews-grid {
    -webkit-overflow-scrolling: touch;
  }

  /* 防止意外缩放 */
  input,
  textarea,
  select {
    font-size: 16px;
  }
}

/* 可访问性增强 */
@media (max-width: 768px) {

  /* 确保对比度 */
  .customerssay-action-btn:focus,
  .customerssay-grid-vote-btn:focus,
  .customerssay-write-review-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
  }

  /* 改善文本可读性 */
  .customerssay-review-content,
  .customerssay-grid-review-text,
  .customerssay-merchant-reply,
  .customerssay-grid-merchant-reply {
    line-height: 1.6;
    font-size: 15px;
  }
}

/* 加载状态移动端优化 */
@media (max-width: 768px) {
  .customerssay-loading {
    padding: 20px;
  }

  .customerssay-loading div {
    font-size: 14px;
  }
}

/* 错误状态移动端优化 */
@media (max-width: 768px) {
  .customerssay-error {
    padding: 20px;
    text-align: center;
  }

  .customerssay-error p {
    font-size: 14px;
    margin: 0;
  }
}

/* Grid 布局 - 移动端对齐 List/Carouse 的行为 */
@media (max-width: 768px) {
  /* 顶部容器纵向排列 */
  .customerssay-grid-top-content {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    max-width: 100%;
    overflow: hidden;
  }

  /* 左侧评分区与推荐文案（桌面位） */
  .customerssay-grid-rating-section {
    order: 1;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
  }
  .customerssay-grid-recommendation { /* 桌面位置的推荐文案在移动端隐藏 */
    display: none !important;
  }

  /* 右侧图片画廊，移动端横向滚动展示 4 张（70px） */
  .customerssay-grid-gallery-section {
    order: 2;
    max-width: 100%;
    overflow-x: auto;
  }
  .customerssay-grid-images-container {
    max-width: calc(70px * 4 + 8px * 3);
  }
  .customerssay-grid-image-item {
    width: 70px;
    height: 70px;
    min-height: 70px;
  }

  /* 移动端推荐文案（独立区域） */
  .customerssay-grid-mobile-recommendation {
    order: 3 !important;
    text-align: center;
    border-top: 1px solid #e5e7eb;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    display: block;
  }
  .customerssay-grid-mobile-recommendation .customerssay-grid-recommendation-percentage {
    color: #1b1f27;
    font-family: "PingFang SC";
    font-size: 16px;
    font-weight: 600;
    margin-right: 4px;
  }
  .customerssay-grid-mobile-recommendation .customerssay-grid-recommendation-text {
    color: #000000;
    font-family: "PingFang SC";
    font-size: 12px;
    font-weight: 400;
  }

  /* Write a Review 区域靠右对齐，按钮触摸友好 */
  .customerssay-grid-write-review-section {
    order: 4 !important;
    text-align: right;
    max-width: 100%;
    display: flex;
    justify-content: flex-end;
    margin-top: 0;
  }
  .customerssay-grid-write-review-btn {
    font-size: 12px;
    padding: 8px 12px;
    min-width: auto;
    width: auto;
    max-width: 100%;
  }

  /* Comments 头部与其他布局一致：标题 + 排序在一行（若有） */
  .customerssay-grid-comments-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    flex-wrap: nowrap;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
  }
  .customerssay-grid-comments-title {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
  }
}

/* 桌面端隐藏移动端推荐文本，显示桌面端推荐文本 */
@media (min-width: 769px) {
  .customerssay-grid-mobile-recommendation { display: none !important; }
  .customerssay-grid-recommendation { display: block !important; }
}

/* 无图片布局 - 移动端适配 */
@media (max-width: 768px) {
  .customerssay-list-no-images-layout {
    display: flex !important;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    margin: 12px 0;
  }

  .customerssay-list-no-img-stats {
    width: 100%;
    text-align: center;
  }

  .customerssay-list-no-img-rating {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  .customerssay-list-no-img-rating-number {
    font-size: 32px;
  }

  .customerssay-list-no-img-stars {
    justify-content: center;
  }

  .customerssay-list-no-img-rating-text {
    font-size: 13px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .customerssay-list-no-img-recommendation {
    text-align: center;
    padding-top: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .customerssay-list-no-img-recommendation-percentage,
  .customerssay-list-no-img-recommendation-text {
    font-size: 12px;
    display: inline;
    line-height: 1.5;
  }

  .customerssay-list-no-img-breakdown {
    width: 100%;
  }

  .customerssay-list-no-img-rating-bar {
    gap: 6px;
  }

  .customerssay-list-no-img-rating-progress {
    min-width: 80px;
  }

  .customerssay-list-no-img-write-review {
    width: 100%;
  }

  .customerssay-list-no-img-write-btn {
    width: 100%;
    padding: 12px 16px;
    justify-content: center;
  }
}


/* ---- media-viewer.css ---- */
/* 媒体查看器弹窗样式 */
.customerssay-media-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.customerssay-media-viewer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

.customerssay-media-viewer-container {
  position: relative;
  width: 50vw; /* 限制为屏幕宽度的50% */
  max-width: 50vw; /* 避免被其他规则覆盖 */
  max-height: 90vh;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.customerssay-media-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.customerssay-media-viewer-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.customerssay-media-viewer-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  color: #6b7280;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-media-viewer-close:hover {
  background-color: #f3f4f6;
  color: #374151;
}

.customerssay-media-viewer-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customerssay-media-viewer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #f9fafb;
}

.customerssay-media-viewer-media-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden; /* 改为 hidden，防止滚动 */
  min-height: 0;
  padding: 16px; /* 给图片留出边距 */
}

.customerssay-media-viewer-image {
  max-width: 100%;
  max-height: 100%; /* 关键：确保高度不超过容器 */
  width: auto; /* 改为 auto，保持宽高比 */
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.customerssay-media-viewer-video {
  max-width: 100%;
  max-height: 100%; /* 关键：确保高度不超过容器 */
  width: auto; /* 改为 auto，保持宽高比 */
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* 视频控制栏 */
.customerssay-media-viewer-video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: white;
}

.customerssay-media-viewer-play-pause {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: white;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-media-viewer-play-pause:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.customerssay-media-viewer-progress {
  flex: 1;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
}

.customerssay-media-viewer-progress-bar {
  width: 100%;
  height: 100%;
  position: relative;
}

.customerssay-media-viewer-progress-fill {
  height: 100%;
  background-color: white;
  border-radius: 2px;
  transition: width 0.1s;
  width: 0%;
}

.customerssay-media-viewer-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  min-width: 100px;
}

.customerssay-media-viewer-volume {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  color: white;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-media-viewer-volume:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* 缩略图导航 */
.customerssay-media-viewer-thumbnails {
  padding: 20px 24px;
  background: white;
  border-top: 1px solid #e5e7eb;
  flex-shrink: 0;
  min-height: 100px;
}

.customerssay-media-viewer-thumbnails-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.customerssay-media-viewer-thumbnail {
  position: relative;
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.customerssay-media-viewer-thumbnail:hover {
  border-color: #d1d5db;
  transform: scale(1.05);
}

.customerssay-media-viewer-thumbnail.active {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.customerssay-media-viewer-thumbnail img,
.customerssay-media-viewer-thumbnail video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customerssay-media-viewer-thumbnail-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .customerssay-media-viewer {
    padding: 0; /* 移除 padding，全屏显示 */
  }

  .customerssay-media-viewer-container {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .customerssay-media-viewer-header {
    padding: 12px 16px;
  }

  .customerssay-media-viewer-title {
    font-size: 16px;
  }

  .customerssay-media-viewer-close {
    padding: 10px;
  }

  .customerssay-media-viewer-media-container {
    padding: 8px;
  }

  .customerssay-media-viewer-video-controls {
    padding: 16px 20px;
    gap: 12px;
  }

  .customerssay-media-viewer-thumbnails {
    padding: 12px 16px;
    min-height: 70px;
  }

  .customerssay-media-viewer-thumbnail {
    width: 56px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .customerssay-media-viewer-header {
    padding: 10px 12px;
  }

  .customerssay-media-viewer-title {
    font-size: 14px;
  }

  .customerssay-media-viewer-video-controls {
    padding: 12px 16px;
  }

  .customerssay-media-viewer-thumbnails {
    padding: 10px 12px;
    min-height: 60px;
  }

  .customerssay-media-viewer-thumbnail {
    width: 48px;
    height: 36px;
  }
}

/* 滚动条样式 */
.customerssay-media-viewer-thumbnails-container::-webkit-scrollbar {
  height: 4px;
}

.customerssay-media-viewer-thumbnails-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 2px;
}

.customerssay-media-viewer-thumbnails-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.customerssay-media-viewer-thumbnails-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}


/* ---- review-detail-modal.css ---- */
/* CustomersSay Review Detail Modal */
#customerssay-review-detail-modal.cs-rdm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 强化为直接子元素时的伸展规则，确保占满右列高度 */
.cs-rdm-info > .customerssay-list-review-item { flex: 1 1 auto !important; min-height: 0 !important; }
/* Helpful 固定在右列底部 */
.cs-rdm-info .cs-rdm-helpful-row { margin-top: auto !important; }

.cs-rdm-wrap {
  width: min(1000px, 92vw);
  height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 18px 18px 12px;
  box-sizing: border-box;
  position: relative; /* 供关闭按钮绝对定位参照 */
}

.cs-rdm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.cs-rdm-title {
  font-weight: 600;
  font-size: 16px;
}

.cs-rdm-close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.cs-rdm-media {
  width: 100%;
  height: 100%;
  min-height: 0; /* 关键：允许在 grid 中按需收缩 */
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cs-rdm-media-content {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cs-rdm-media-el {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* 统一 contain */
  display: block;
}
.cs-rdm-media-clickable { cursor: pointer; }

.cs-rdm-media-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  transition: background 0.2s ease;
  z-index: 2;
}
.cs-rdm-media-nav:hover,
.cs-rdm-media-nav:focus {
  background: rgba(0, 0, 0, 0.65);
  outline: none;
}
.cs-rdm-media-prev { left: 12px; }
.cs-rdm-media-next { right: 12px; }

.cs-rdm-media-swiper {
  width: 100%;
  height: 100%;
}

.cs-rdm-media-swiper .swiper-wrapper {
  width: 100%;
  height: 100%;
}

.cs-rdm-media-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.cs-rdm-media-swiper .swiper-slide img,
.cs-rdm-media-swiper .swiper-slide video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.cs-rdm-media-swiper-prev,
.cs-rdm-media-swiper-next {
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.cs-rdm-media-swiper-prev:hover,
.cs-rdm-media-swiper-prev:focus,
.cs-rdm-media-swiper-next:hover,
.cs-rdm-media-swiper-next:focus {
  background: rgba(0, 0, 0, 0.65);
}

.cs-rdm-media-swiper-pagination {
  bottom: 14px !important;
}

.cs-rdm-media-swiper-pagination .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.6);
  opacity: 1;
}

.cs-rdm-media-swiper-pagination .swiper-pagination-bullet-active {
  background: #2563eb;
}

.cs-rdm-no-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
}

.cs-rdm-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  grid-template-rows: 1fr; /* 让唯一一行填满容器高度 */
  gap: 18px;
  align-items: stretch; /* 让左右两列等高，保证底部对齐 */
  flex: 1;          /* 占满可用高度 */
  min-height: 0;    /* 避免内容溢出撑开 */
  height: 60vh;     /* 与 MCC 保持一致，确保右列有确定高度 */
}
/* 移除全局强制，右侧具体由 .cs-rdm-info 作用域控制 */

/* 右侧信息列布局，与 MCC 一致 */
.cs-rdm-info { padding: 4px; display: flex; flex-direction: column; height: 100%; min-height: 0; }
/* 复用 reactions 选择器所需的 list-review-item 外壳，但在 RDM 右侧去除卡片视觉，使之与 MCC 一致 */
.cs-rdm-info .customerssay-list-review-item {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
  /* 关键：让内部“Was this helpful?” 能贴底 */
  display: flex !important; /* 确保为纵向自适应容器 */
  flex-direction: column;
  height: 100%;
  flex: 1 1 auto; /* 在父级为 flex 的情况下确保可伸展填满 */
  min-height: 0;
  width: 100%;
}
/* 子元素默认不拉伸，Helpful 通过 margin-top:auto 贴底 */
.cs-rdm-info .customerssay-list-review-item > * { flex: 0 0 auto; }

.cs-rdm-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}
.cs-rdm-user-left { display: flex; align-items: center; gap: 10px; }
.cs-rdm-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.cs-rdm-name { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; color: #111827; font-size: 14px; white-space: nowarp;}
.cs-rdm-verified { display: inline-flex; vertical-align: middle; color: #10b981; margin-left: 6px; font-size: 14px; }

.cs-rdm-recommend { display: inline-flex; align-items: center; gap: 8px; color: #111; white-space: nowrap; font-size: 14px;}
.cs-rdm-recommend.hidden { display: none; }

.cs-rdm-meta-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.cs-rdm-time { color: #6b7280; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.cs-rdm-stars {display: flex; color: #fbbf24; }

.cs-rdm-review-title {
  margin: 6px 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cs-rdm-content {
  color: #111827;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cs-rdm-helpful-row { display: flex; align-items: center; justify-content:right; gap: 10px; margin-top: auto; padding: 10px; }
.cs-rdm-helpful-label { color: #6b7280; }
.cs-rdm-helpful-buttons { display: inline-flex; align-items: center; gap: 10px; }
.customerssay-carouse-helpfulness-btn { background: none; border: none; cursor: pointer; color: #111; display: inline-flex; align-items: center; }

.cs-rdm-replies {
  margin-top: 16px;
  background: #f9fafb;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
}
.cs-rdm-reply-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cs-rdm-reply-who { font-weight: 600; }
.cs-rdm-reply-time { color: #6b7280; font-size: 12px; }
.cs-rdm-reply-content { line-height: 1.6; }

/* 移动端响应式样式 */
@media (max-width: 768px) {
  .cs-rdm-wrap {
    width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    padding: 12px;
  }

  .cs-rdm-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: auto;
    overflow-y: auto;
  }

  .cs-rdm-media {
    width: 100%;
    min-height: 200px;
    max-height: 40vh;
    flex-shrink: 0;
  }

  .cs-rdm-info {
    flex: 1;
    padding: 8px 4px;
    overflow-y: auto;
  }

  .cs-rdm-user-row {
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0;
  }

  .cs-rdm-recommend {
    font-size: 12px;
  }

  .cs-rdm-name {
    font-size: 13px;
  }

  .cs-rdm-avatar {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .cs-rdm-review-title {
    font-size: 14px;
  }

  .cs-rdm-content {
    font-size: 13px;
  }

  .cs-rdm-helpful-row {
    padding: 8px 4px;
    gap: 8px;
    font-size: 13px;
  }
  .cs-rdm-close-btn {
    z-index: 10;
    top: 6px;
    right: 8px;
    font-size: 24px;
    padding: 6px;
    color: #000;
  }

  .cs-rdm-replies {
    padding: 10px;
    margin-top: 12px;
  }
}

/* 超小屏幕 */
@media (max-width: 480px) {
  .cs-rdm-media {
    min-height: 160px;
    max-height: 35vh;
  }

  .cs-rdm-user-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .cs-rdm-meta-row {
    flex-wrap: wrap;
  }
}


/* ---- review-form.css ---- */
/* 评论表单模态框样式 */
.customerssay-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  /* Resolve against the containing viewport without covering a theme's reserved scrollbar gutter. */
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.customerssay-modal.show {
  display: flex !important;
  align-items: center;
  justify-content: center;
  animation: customerssay-modal-fade-in 0.3s ease-out;
}

.customerssay-modal-content {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 520px;
  width: 90%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  margin: 8px;
  position: relative;
  transform: scale(1);
}

.customerssay-modal.show .customerssay-modal-content {
  animation: customerssay-modal-scale-in 0.3s ease-out forwards;
}

/* 模态框动画 */
@keyframes customerssay-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes customerssay-modal-scale-in {
  from {
    transform: scale(0.9);
    opacity: 0.5;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.customerssay-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.customerssay-modal-header h3 {
  color: #202223;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.customerssay-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  transition: opacity 0.2s;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-modal-close:hover {
  opacity: 0.8;
}

/* 产品信息区域 */
.customerssay-product-info {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  gap: 10px;
}

.customerssay-product-image {
  width: 48px;
  height: 48px;
  background-color: #f0f0f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #e0e0e0;
}

/* 限制产品图片尺寸，避免溢出容器 */
#customerssay-form-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.customerssay-product-details {
  flex: 1;
}

.customerssay-product-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #202223;
  font-size: 1.1rem;
}

.customerssay-product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.customerssay-product-rating .star {
  color: #ffc107;
  font-size: 16px;
}

/* 表单样式 */
.customerssay-form-group {
  margin-bottom: 6px;
}

.customerssay-form-group.rating-group {
  margin-bottom: 8px;
}

.customerssay-form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  color: #202223;
  text-align: left;
  font-size: 13px;
}

.customerssay-form-label .required {
  color: #d73502;
}

.customerssay-rating-input {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: flex-start;
}

.customerssay-rating-star {
  color: #e0e0e0;
  font-size: 24px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.customerssay-rating-star:hover {
  color: #ffc107;
}

.customerssay-rating-star.selected {
  color: #ffc107;
}

.customerssay-rating-text {
  color: #666;
  font-size: 0.9rem;
  min-height: 20px;
  margin-bottom: 8px;
}

.customerssay-form-input {
  width: 100%;
  padding: 8px;
  border: 1px solid #e1e3e5;
  border-radius: 6px;
  font-size: 13px;
  color: #202223;
  transition: border-color 0.2s ease;
  background-color: #ffffff;
  font-family: inherit;
}

.customerssay-form-input:focus {
  outline: none;
  border-color: #008060;
}

.customerssay-form-textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #e1e3e5;
  border-radius: 6px;
  font-size: 13px;
  color: #202223;
  resize: vertical;
  min-height: 40px;
  transition: border-color 0.2s ease;
  background-color: #ffffff;
  font-family: inherit;
}

.customerssay-form-textarea:focus {
  outline: none;
  border-color: #008060;
}

.customerssay-textarea-container {
  position: relative;
}

.customerssay-char-count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  color: #999;
  font-size: 12px;
}

.customerssay-char-count.over-limit {
  color: #d73502;
}

/* 推荐选择 */
.customerssay-recommend-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.customerssay-recommend-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #202223;
}

.customerssay-recommend-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #008060;
}

/* 媒体上传 */
.customerssay-media-group {
  margin-bottom: 8px;
}

.customerssay-media-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.customerssay-media-label {
  font-weight: 500;
  color: #202223;
}

.customerssay-media-count {
  font-size: 14px;
  color: #666;
}

.customerssay-media-description {
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}

.customerssay-media-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.customerssay-media-slot {
  width: 100%;
  height: 80px;
  border: 1px solid #e1e3e5;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fafafa;
  position: relative;
}

.customerssay-media-slot:hover {
  border-color: #008060;
  background-color: #f0f8f5;
}

.customerssay-media-slot svg {
  margin-bottom: 4px;
}

.customerssay-media-slot .upload-text {
  font-size: 12px;
  color: #666;
}

.customerssay-media-slot img,
.customerssay-media-slot video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.customerssay-media-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ff4444;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 新版统一上传区域 */
.customerssay-upload-zone {
  display: flex;
  align-items: center;
  flex-direction: column;
  border: 2px dashed #e1e3e5;
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background-color: #fafafa;
}

.customerssay-upload-zone:hover {
  border-color: #008060;
  background-color: #f0fdf4;
}

.customerssay-upload-zone.dragover {
  border-color: #008060;
  background-color: #dcfce7;
}

.customerssay-upload-zone svg {
  color: #9ca3af;
  margin-bottom: 12px;
}

.customerssay-upload-text {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin: 0 0 4px 0;
}

.customerssay-upload-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

/* 已上传文件预览列表 */
.customerssay-media-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.customerssay-media-preview-list:empty {
  display: none;
}

.customerssay-media-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

.customerssay-media-item img,
.customerssay-media-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customerssay-media-item .video-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  background: rgba(0,0,0,0.7);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.customerssay-media-item .remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* 上传状态叠加层 */
.upload-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.upload-status.uploading {
  background: rgba(0, 0, 0, 0.6);
  flex-direction: column;
  gap: 6px;
}

.upload-status.error {
  background: rgba(239, 68, 68, 0.8);
  color: white;
  font-size: 20px;
  font-weight: bold;
}

/* 进度条 */
.progress-bar {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #10b981;
  border-radius: 3px;
  transition: width 0.2s ease;
}

.progress-text {
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.customerssay-media-item.uploaded .upload-status.success {
  animation: fade-out 1s ease-out forwards;
  animation-delay: 0.5s;
}

@keyframes fade-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* 提交按钮 */
.customerssay-submit-button {
  padding: 10px 20px;
  background-color: #6c757d;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  text-transform: none;
}

.customerssay-submit-button:hover {
  background-color: #5a6268;
  transform: translateY(-1px);
}

.customerssay-submit-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* 加载动画 */
@keyframes customerssay-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.customerssay-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: customerssay-spin 1s linear infinite;
}

.customerssay-loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .customerssay-modal-content {
    width: 95%;
    padding: 24px;
    max-height: 90vh;
  }

  .customerssay-media-preview {
    grid-template-columns: repeat(3, 1fr);
  }

  .customerssay-product-info {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .customerssay-product-image {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .customerssay-modal-content {
    width: 98%;
    padding: 20px;
  }

  .customerssay-media-preview {
    grid-template-columns: repeat(2, 1fr);
  }

  .customerssay-rating-input {
    gap: 4px;
  }

  .customerssay-rating-star {
    font-size: 24px;
  }
}

/* ===== 分步式表单样式 ===== */

/* 步骤指示器 */
.customerssay-step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 0;
}

.customerssay-step-dots {
  display: flex;
  gap: 8px;
}

.customerssay-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #e5e7eb;
  transition: all 0.3s ease;
}

.customerssay-step-dot.active {
  background-color: #252525;
  transform: scale(1.2);
}

.customerssay-step-dot.completed {
  background-color: #10b981;
}

.customerssay-step-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* 步骤容器 - 滑动动画 */
.customerssay-steps-wrapper {
  overflow: hidden;
  /* Hidden overflow still scrolls when a field receives focus; clip must not become a scroll container. */
  overflow: clip;
  position: relative;
  min-width: 0;
}

.customerssay-steps-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 300%;
}

.customerssay-form-step {
  width: 33.333%;
  flex-shrink: 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 0 4px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.customerssay-form-step:not(.active) {
  pointer-events: none;
  visibility: hidden;
}

/* 步骤动画效果 */
.customerssay-form-step.slide-in-right {
  animation: slideInRight 0.4s ease forwards;
}

.customerssay-form-step.slide-in-left {
  animation: slideInLeft 0.4s ease forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 底部按钮区域 */
.customerssay-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
}

/* 导航按钮 */
.customerssay-nav-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.customerssay-prev-button {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.customerssay-prev-button:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.customerssay-next-button {
  background: #252525;
  color: #fff;
  border: none;
  margin-left: auto;
}

.customerssay-next-button:hover {
  background: #3a3a3a;
}

.customerssay-next-button:disabled,
.customerssay-prev-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 可选提示 */
.customerssay-step-optional-hint {
  margin-top: 16px;
  padding: 12px 16px;
  background: #f0fdf4;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.customerssay-step-optional-hint p {
  margin: 0;
  font-size: 13px;
  color: #166534;
  text-align: center;
}

/* 响应式调整 */
@media (max-width: 480px) {
  .customerssay-form-actions {
    flex-wrap: wrap;
  }

  .customerssay-nav-button {
    flex: 1;
    justify-content: center;
  }

  .customerssay-submit-button {
    width: 100%;
  }
}

/* 上传中提示 */
.customerssay-uploading-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  background-color: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
}

.uploading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #fcd34d;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: uploading-spin 0.8s linear infinite;
}

@keyframes uploading-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 提交按钮上传中禁用状态 */
.customerssay-submit-button.uploading-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ---- customerssay-qa.css ---- */
/**
 * CustomersSay Q&A Card Styles
 * Q&A 问答卡片样式 - 根据 Figma 设计稿
 */

/* 问题卡片容器 */
.customerssay-qa-card {
  background: #f9f9f9;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 16px;
}

/* 问题头部 - 用户信息和时间 */
.customerssay-qa-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

/* 用户头像 */
.customerssay-qa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  /* 背景色由 JS 动态设置 */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}

.customerssay-qa-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 用户信息区域 - 占满剩余空间 */
.customerssay-qa-user-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

/* 用户名 + 验证标记 */
.customerssay-qa-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
}

.customerssay-qa-verified {
  width: 16px;
  height: 16px;
  color: #1a1a1a;
  display: none;
}

/* 时间 - 右对齐 */
.customerssay-qa-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #8c8c8c;
  flex-shrink: 0;
}

.customerssay-qa-time svg {
  width: 12px;
  height: 12px;
}

/* 问题内容 */
.customerssay-qa-content {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 13px;
}

.customerssay-qa-content.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customerssay-qa-read-more {
  color: #1a73e8;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  margin-top: 4px;
  display: inline-block;
}

.customerssay-qa-read-more:hover {
  color: #1557b0;
}

/* 问题底部操作栏 */
.customerssay-qa-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.customerssay-qa-helpful-text {
  font-size: 12px;
  color: #8c8c8c;
}

.customerssay-qa-reactions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customerssay-qa-reaction-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: #666;
  transition: all 0.2s;
}

.customerssay-qa-reaction-btn:hover {
  background: #e8e8e8;
}

.customerssay-qa-reaction-btn.active {
  color: #1a73e8;
}

.customerssay-qa-reaction-btn svg {
  width: 16px;
  height: 16px;
}

/* 商家回复区域 */
.customerssay-qa-answer {
  background: #f9f9f9;
  border: 1px solid #d6d6d6;
  border-radius: 8px;
  padding: 12px;
  margin-left: 58px;
  margin-top: 13px;
}

.customerssay-qa-answer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.customerssay-qa-merchant-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.customerssay-qa-merchant-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customerssay-qa-merchant-info {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.customerssay-qa-merchant-name {
  font-weight: 600;
  font-size: 14px;
  color: #1a1a1a;
}

.customerssay-qa-merchant-time {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #8c8c8c;
}

.customerssay-qa-answer-content {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
}

.customerssay-qa-answer-content.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customerssay-qa-answer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8e8e8;
}

/* Tab 区域容器 - 让 tabs 和 sort 左右分开 */
.customerssay-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e8e8e8;
  margin-bottom: 20px;
}

/* Tab 按钮组 */
.customerssay-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
}

/* 排序下拉 - 右侧 */
.customerssay-sort-wrapper {
  flex-shrink: 0;
}

.customerssay-tab {
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--customerssay-secondary-text, #666);
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  transition: color 0.2s;
}

.customerssay-tab:hover {
  color: #333;
}

.customerssay-tab.active {
  color: var(--customerssay-text-color, #1a1a1a);
  font-weight: 600;
}

.customerssay-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--customerssay-text-color, #1a1a1a);
}



.customerssay-sort-select {
  padding: 6px 28px 6px 12px;
  font-size: 13px;
  border: 1px solid var(--customerssay-border-color, #e8e8e8);
  border-radius: 6px;
  background: var(--customerssay-card-bg, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
  appearance: none;
  cursor: pointer;
  color: var(--customerssay-text-color, #333);
}

.customerssay-qa-sort-select:focus {
  outline: none;
  border-color: #1a73e8;
}

/* Q&A 列表容器 */
.customerssay-qa-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 空状态 */
.customerssay-qa-empty {
  text-align: center;
  padding: 60px 20px;
  color: #8c8c8c;
}

.customerssay-qa-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  color: #d9d9d9;
}

.customerssay-qa-empty-title {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.customerssay-qa-empty-text {
  font-size: 14px;
  color: #8c8c8c;
}

/* 提问按钮 */
.customerssay-ask-question-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 16px;
}

.customerssay-ask-question-btn:hover {
  background: #1557b0;
}

/* 加载更多 */
.customerssay-qa-load-more {
  text-align: center;
  padding: 20px;
}

.customerssay-qa-load-more-btn {
  background: #f5f5f5;
  border: 1px solid #e8e8e8;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.customerssay-qa-load-more-btn:hover {
  background: #e8e8e8;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .customerssay-qa-answer {
    margin-left: 0;
  }

  .customerssay-qa-footer {
    flex-wrap: wrap;
    gap: 8px;
  }

  .customerssay-tabs {
    gap: 16px;
  }

  .customerssay-tab {
    font-size: 13px;
  }

  .customerssay-qa-modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 20px;
  }
}

/* Q&A 提问模态框 */
.customerssay-qa-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

.customerssay-qa-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-qa-modal-content {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.customerssay-qa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e8e8e8;
}

.customerssay-qa-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.customerssay-qa-modal-close {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #8c8c8c;
  border-radius: 4px;
  transition: all 0.2s;
}

.customerssay-qa-modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.customerssay-qa-modal-close svg {
  width: 20px;
  height: 20px;
  display: block;
}

.customerssay-qa-modal-body {
  padding: 20px;
}

.customerssay-qa-form-group {
  margin-bottom: 16px;
}

.customerssay-qa-form-group:last-child {
  margin-bottom: 0;
}

.customerssay-qa-form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  margin-bottom: 6px;
}

.customerssay-qa-form-label .optional {
  color: #8c8c8c;
  font-weight: 400;
}

.customerssay-qa-form-input,
.customerssay-qa-form-textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.customerssay-qa-form-input:focus,
.customerssay-qa-form-textarea:focus {
  outline: none;
  border-color: #1a73e8;
}

.customerssay-qa-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.customerssay-qa-modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
}

.customerssay-qa-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.customerssay-qa-btn-cancel {
  background: #f5f5f5;
  border: 1px solid #d9d9d9;
  color: #333;
}

.customerssay-qa-btn-cancel:hover {
  background: #e8e8e8;
}

.customerssay-qa-btn-submit {
  background: #1a73e8;
  border: none;
  color: #fff;
}

.customerssay-qa-btn-submit:hover {
  background: #1557b0;
}

.customerssay-qa-btn-submit:disabled {
  background: #a0c4f1;
  cursor: not-allowed;
}

/* 成功/错误提示 */
.customerssay-qa-toast {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 10001;
  animation: toastIn 0.3s ease-out;
}

.customerssay-qa-toast.success {
  background: #52c41a;
  color: #fff;
}

.customerssay-qa-toast.error {
  background: #ff4d4f;
  color: #fff;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}


/* ---- media-card-carousel.css ---- */
/* Media Card Carousel styles */
:root {
  --mcc-card-radius: 12px;
  --mcc-shadow: 0 4px 16px rgba(0,0,0,.08);
  --mcc-star-color: #fbbf24;
  --mcc-text-color: #111827;
  --mcc-subtext-color: #6b7280;
  --mcc-border-color: #e5e7eb;
  --mcc-bg: #ffffff;
  --mcc-verified-color: #10b981;
  --mcc-nav-bg: #111827;
  --mcc-nav-color: #ffffff;
  --mcc-media-height: 220px; /* image area height; seam between image and text */
}

.customerssay-mcc-wrapper {
  position: relative;
  margin: 0 auto;
  padding: 8px 12px 24px;
}

.customerssay-mcc-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--mcc-text-color);
  margin: 8px 0 20px;
}
.customerssay-mcc-title.align-left { text-align: left; }
.customerssay-mcc-title.align-center { text-align: center; }
.customerssay-mcc-title.align-right { text-align: right; }

/* Swiper container inside shadow root will inherit these */
.customerssay-mcc-swiper {
  overflow: hidden;
  width: 100%;
}

/* Nav arrows */
.customerssay-mcc-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: transparent; /* let inner SVG render visual background */
  color: var(--mcc-nav-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  cursor: pointer;
  z-index: 3;
}
.customerssay-mcc-nav-btn.nav-centered { height: 37px; }
.customerssay-mcc-nav-btn.nav-text {
  top: 50%;
  transform: translateY(-50%);
}
.customerssay-mcc-nav-btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.customerssay-mcc-nav-btn.is-disabled svg circle { fill: #9CA3AF; }
.customerssay-mcc-prev { left: -18px; }
.customerssay-mcc-next { right: -18px; }

/* 默认布局：桌面端才显示导航按钮 */
@media (max-width: 1279px) {
  .customerssay-mcc-prev:not(.show-mobile),
  .customerssay-mcc-next:not(.show-mobile) { display: none; }
}

/* Customers Carousel 布局：移动端也显示导航按钮 */
.customerssay-mcc-wrapper:has(.centered-layout) .customerssay-mcc-prev,
.customerssay-mcc-wrapper:has(.centered-layout) .customerssay-mcc-next {
  display: flex !important;
}

/* Text Carousel 布局：默认隐藏，JS 加载完成后显示 */
.customerssay-mcc-nav-btn.nav-text {
  display: none;
}
.customerssay-mcc-nav-btn.nav-text.show {
  display: flex !important;
}
/* Arrows inside the review item for centered layout (desktop) */
.customerssay-mcc-wrapper:has(.centered-layout) .customerssay-mcc-prev { left: 16px; }
.customerssay-mcc-wrapper:has(.centered-layout) .customerssay-mcc-next { right: 16px; }

@media (max-width: 640px) {
  .customerssay-mcc-wrapper:has(.centered-layout) .customerssay-mcc-prev {
    left: 8px;
  }
  .customerssay-mcc-wrapper:has(.centered-layout) .customerssay-mcc-next {
    right: 8px;
  }
}

/* Card */
.customerssay-mcc-card {
  background: var(--mcc-bg);
  border-radius: var(--mcc-card-radius);
  box-shadow: var(--mcc-shadow);
  border: 1px solid var(--mcc-border-color);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 400px; /* fixed per design */
}

.customerssay-mcc-image-wrap {
  position: relative;
  width: 100%;
  height: var(--mcc-media-height); /* top media height inside 400px card */
  background: #f3f4f6;
}
.customerssay-mcc-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Stars pill overlay on image */
.customerssay-mcc-stars-pill {
  position: absolute;
  left: 50%;
  top: var(--mcc-media-height); /* center to the seam between image and text */
  transform: translate(-50%, -50%);
  padding: 7px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 16px;
  background: #FFF;
  box-shadow: 0 5px 6px 0 #0000000f;
  z-index: 2;
  pointer-events: none;
}
.customerssay-mcc-star {
  color: var(--mcc-star-color);
  font-size: 14px;
  line-height: 1;
}
.customerssay-mcc-star.empty { color: #d1d5db; }

.customerssay-mcc-more-count {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(17,24,39,.72);
  color: #fff;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 8px;
}

.customerssay-mcc-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.customerssay-mcc-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--mcc-text-color);
}
.customerssay-mcc-verified {
  display: inline-flex;
  align-items: center;
  color: var(--mcc-verified-color);
  font-size: 12px;
}
.customerssay-mcc-text {
  margin-top: 8px;
  color: var(--mcc-text-color);
  font-size: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4; /* clamp with ellipsis */
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.customerssay-mcc-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--mcc-subtext-color);
  font-size: 12px;
}
.customerssay-mcc-date { display: inline-flex; align-items: center; gap: 6px; }
.customerssay-mcc-date svg { width: 12px; height: 12px; color: var(--mcc-subtext-color); }
.customerssay-mcc-flag {
  font-size: 16px;
  line-height: 1;
  font-family: 'Apple Color Emoji','Segoe UI Emoji','Noto Color Emoji', system-ui, sans-serif;
}

/* Loading / Empty / Error */
.customerssay-mcc-loading,
.customerssay-mcc-empty,
.customerssay-mcc-error {
  display: none;
  text-align: center;
  color: var(--mcc-subtext-color);
  padding: 24px 8px;
}

/* Fine tune slides spacing */
.swiper-slide { height: auto; }

/* Ensure multiple slides show on desktop when initialized */
.customerssay-mcc-swiper.swiper-initialized .swiper-wrapper { display: flex; }

/* Centered layout: 单列显示 */
.customerssay-mcc-swiper.swiper-initialized .swiper-slide:has(.centered-layout) {
  width: 100% !important;
}

/* Default layout: 多列显示 */
@media (min-width: 1024px) {
  .customerssay-mcc-swiper.swiper-initialized .swiper-slide:not(:has(.centered-layout)) { width: calc((100% - 48px) / 3); } /* ~3 per view at >=1024px */
}
@media (min-width: 1280px) {
  .customerssay-mcc-swiper.swiper-initialized .swiper-slide:not(:has(.centered-layout)) { width: calc((100% - 54px) / 4); } /* ~4 per view at >=1280px */
}

/* Fallback: if Swiper fails to initialize, provide horizontal scroll with snap */
.customerssay-mcc-swiper:not(.swiper-initialized) .swiper-wrapper {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scroll-padding: 12px;
}
.customerssay-mcc-swiper:not(.swiper-initialized) .swiper-slide {
  flex: 0 0 auto;
  width: 260px;
  scroll-snap-align: start;
}

/* ========================= */
/* Modal styles (design spec) */
/* ========================= */
.customerssay-mcc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.customerssay-mcc-modal.open { display: flex; }
.customerssay-mcc-modal-content {
  background: #fff;
  width: min(1000px, 92vw);
  height: 62vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 18px 18px 12px;
  position: relative;
  overflow: hidden;
}
.customerssay-mcc-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
}
.customerssay-mcc-modal-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: stretch; /* 让左右两列等高，保证底部对齐 */
  height: 60vh;
}
.customerssay-mcc-modal-media {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
}
.customerssay-mcc-modal-media .swiper { width: 100%; height: 100%; }
.customerssay-mcc-modal-media .swiper-wrapper { width: 100%; height: 100%; }
.customerssay-mcc-modal-media .swiper-slide { display: flex; align-items: center; justify-content: center; }
.customerssay-mcc-modal-media .swiper-slide img,
.customerssay-mcc-modal-media .swiper-slide video { width: 100%; height: 100%; object-fit: contain; }
.mcc-modal-prev, .mcc-modal-next { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); display: none; }
.mcc-modal-pagination { --swiper-theme-color: #fff; }

.customerssay-mcc-modal-media img,
.customerssay-mcc-modal-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.customerssay-mcc-modal-info { padding: 4px 4px; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.customerssay-mcc-modal-reviewer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.customerssay-mcc-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--mcc-avatar-bg, #e5e7eb);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.customerssay-mcc-country { font-size: 16px; margin-left: 4px; }
.customerssay-mcc-verified-badge { color: var(--mcc-verified-color); margin-left: 6px; font-size: 14px; }
.customerssay-mcc-modal-stars { margin: 8px 0; color: var(--mcc-star-color); }
.customerssay-mcc-modal-title { font-weight: 700; margin: 6px 0 4px; color: var(--mcc-text-color); }
.customerssay-mcc-modal-text { color: var(--mcc-text-color); line-height: 1.6; }
.customerssay-mcc-modal-date { color: var(--mcc-subtext-color); font-size: 12px; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.customerssay-mcc-modal-date svg { width: 14px; height: 14px; color: var(--mcc-subtext-color); }
.customerssay-mcc-modal-stars-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.customerssay-mcc-modal-stars-row .customerssay-mcc-modal-date { margin-left: 8px; }
.customerssay-mcc-product-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--mcc-border-color);
  background: #fafafa;
  border-radius: 10px;
  padding: 10px;
  margin-top: auto; /* 将产品卡固定在右列底部 */
}
.customerssay-mcc-product-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
}
.customerssay-mcc-product-info { display: flex; flex-direction: column; }
.customerssay-mcc-product-name { font-weight: 600; color: var(--mcc-text-color); font-size: 14px; }
.customerssay-mcc-product-link { color: #4218ff; font-weight: 600; text-decoration: none; font-size:12px; }
.customerssay-mcc-product-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .customerssay-mcc-modal-body { grid-template-columns: 1fr; min-height: 0; }
  .customerssay-mcc-modal-media { height: auto; }
}

/* ========================= */
/* Centered Layout (Gradient) */
/* ========================= */
.customerssay-mcc-card.centered-layout {
  background: linear-gradient(135deg, #e0f2fe 0%, #fce7f3 100%);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
  position: relative;
  min-height: 400px;
  width: 100%;
  border-radius: var(--mcc-card-radius);
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-avatar-large {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--mcc-avatar-bg, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--mcc-text-color);
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-avatar-large img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-name-row {
  flex-direction: row;
  gap: 6px;
  margin-bottom: 12px;
  align-items: center;
  justify-content: center;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-name-row span {
  font-size: 16px;
  font-weight: 600;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-stars-centered {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  justify-content: center;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--mcc-text-color);
  margin: 0 0 16px 0;
  max-width: 90%;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-quote-left,
.customerssay-mcc-card.centered-layout .customerssay-mcc-quote-right {
  position: absolute;
  font-size: 48px;
  color: rgba(59, 130, 246, 0.2);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-quote-left {
  top: 8px;
  left: 8px;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-quote-right {
  bottom: 8px;
  right: 8px;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-footer {
  margin-top: auto;
  justify-content: center;
  gap: 8px;
}

.customerssay-mcc-card.centered-layout .customerssay-mcc-date {
  font-size: 13px;
  color: var(--mcc-date-color, var(--mcc-subtext-color));
}

/* Text Carousel Layout - Infinite Scroll */
 .customerssay-mcc-text-scroll-container {
  width: 100%;
  overflow: hidden;
  background: #E7ECF2;
  padding: 32px 0;
  position: relative;
  display: none;
  min-height: 340px;
  border-radius: 24px;
}

.customerssay-mcc-text-scroll-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 320px;
  grid-template-rows: repeat(3, minmax(90px, auto));
  column-gap: 70px;
  row-gap: 36px;
  animation: scroll-left 12s linear infinite;
  will-change: transform;
  height: 100%;
  align-content: start;
  width: max-content;
  transition: transform 0.3s ease-out;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.customerssay-mcc-text-scroll-track:hover {
  animation-play-state: paused;
}

.customerssay-mcc-text-card {
  width: 100%;
  padding: 4px 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  min-height: 84px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: translateY(var(--mcc-text-shift, 0));
}

.customerssay-mcc-text-card[data-row] {
  margin-top: 0 !important;
}

.customerssay-mcc-text-card:hover {
  transform: translateY(calc(var(--mcc-text-shift, 0) - 6px));
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.customerssay-mcc-text-card-content {
  display: flex;
  gap: 16px;
  align-items: center;
  width: 100%;
}

.customerssay-mcc-text-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--mcc-avatar-bg, #D1D8E5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--mcc-text-color, #0F172A);
  flex-shrink: 0;
  overflow: hidden;
}

.customerssay-mcc-text-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customerssay-mcc-text-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customerssay-mcc-text-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customerssay-mcc-text-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--mcc-text-color, #0F172A);
  line-height: 1.2;
}

.customerssay-mcc-text-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--mcc-subtext-color, #475569);
}

.customerssay-mcc-text-card-stars {
  display: inline-flex;
  gap: 2px;
  font-size: 14px;
}

.customerssay-mcc-text-card-stars .customerssay-mcc-star {
  font-size: 14px;
  line-height: 1;
}

.customerssay-mcc-text-card-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--mcc-text-color, #0F172A);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.customerssay-mcc-text-card:nth-child(6n + 1) {
  width: 320px;
  --mcc-text-shift: -6px;
}

.customerssay-mcc-text-card:nth-child(6n + 2) {
  width: 300px;
  --mcc-text-shift: 8px;
}

.customerssay-mcc-text-card:nth-child(6n + 3) {
  width: 315px;
  --mcc-text-shift: -10px;
}

.customerssay-mcc-text-card:nth-child(6n + 4) {
  width: 305px;
  --mcc-text-shift: 4px;
}

.customerssay-mcc-text-card:nth-child(6n + 5) {
  width: 320px;
  --mcc-text-shift: -2px;
}

.customerssay-mcc-text-card:nth-child(6n) {
  width: 300px;
  --mcc-text-shift: 10px;
}


/* ---- customerssay-embed.css ---- */
/*
 * CustomersSay 嵌入样式（只打包进 /api/storefront/v1/embed.css，主题区块不加载）
 *
 * 主题区块把这些样式写在 Liquid 的内联 <style> 里（blocks/reviews.liquid、blocks/store-reviews.liquid），
 * headless 站点没有 Liquid，这里按 customerssay-embed.js 生成的挂载结构改写选择器：
 *   #customerssay-dynamic-reviews-{{ block.id }} → .customerssay-embed-reviews
 *   store-reviews.liquid 的 .customerssay-loading → .customerssay-embed-store-reviews .customerssay-loading
 * 评论列表 / 卡片 / 表单等组件样式仍来自 Liquid 引用的各个 CSS 资源（embed.css 中排在本文件之前）。
 */

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

/* ── 商品评论容器（来源：blocks/reviews.liquid 内联样式） ── */
.customerssay-embed-reviews {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 200px;
  box-sizing: border-box;
}

.customerssay-embed-reviews #customerssay-reviews-container,
.customerssay-embed-reviews .customerssay-widget,
.customerssay-embed-reviews .customerssay-header,
.customerssay-embed-reviews .customerssay-comments-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.customerssay-embed-reviews .customerssay-loading {
  min-height: 200px;
  padding: 20px;
}

.customerssay-embed-reviews .customerssay-skeleton {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.customerssay-embed-reviews .customerssay-skeleton__header {
  margin-bottom: 24px;
}

.customerssay-embed-reviews .customerssay-skeleton__title,
.customerssay-embed-reviews .customerssay-skeleton__stars,
.customerssay-embed-reviews .customerssay-skeleton__text,
.customerssay-embed-reviews .customerssay-skeleton__avatar,
.customerssay-embed-reviews .customerssay-skeleton__line {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.customerssay-embed-reviews .customerssay-skeleton__title {
  width: 180px;
  height: 28px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.customerssay-embed-reviews .customerssay-skeleton__stats {
  display: flex;
  gap: 12px;
  align-items: center;
}

.customerssay-embed-reviews .customerssay-skeleton__stars {
  width: 120px;
  height: 20px;
  border-radius: 4px;
}

.customerssay-embed-reviews .customerssay-skeleton__text {
  width: 80px;
  height: 16px;
  border-radius: 4px;
}

.customerssay-embed-reviews .customerssay-skeleton__cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.customerssay-embed-reviews .customerssay-skeleton__card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: #fafafa;
  border-radius: 8px;
}

.customerssay-embed-reviews .customerssay-skeleton__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.customerssay-embed-reviews .customerssay-skeleton__lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customerssay-embed-reviews .customerssay-skeleton__line {
  height: 14px;
  border-radius: 4px;
}

.customerssay-embed-reviews .customerssay-skeleton__line.short {
  width: 60%;
}

.customerssay-embed-reviews .customerssay-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: 8px;
  color: #6c757d;
}

.customerssay-embed-reviews .customerssay-notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.customerssay-embed-reviews .customerssay-notice strong {
  color: #495057;
}

/* ── 店铺评论容器（来源：blocks/store-reviews.liquid 内联样式） ── */
.customerssay-embed-store-reviews {
  min-height: 200px;
}

.customerssay-embed-store-reviews .customerssay-review-list {
  border-radius: 12px;
  padding: 12px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.customerssay-embed-store-reviews .customerssay-loading {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customerssay-embed-store-reviews .customerssay-embed-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: customerssay-embed-spin 1s linear infinite;
}

/* ── 星级摘要（来源：blocks/product-rating-summary.liquid 内联样式） ── */
[data-customerssay-rating] {
  margin: 10px 0;
}

@media (max-width: 768px) {
  .customerssay-embed-reviews .customerssay-skeleton__card {
    flex-direction: column;
  }
}

/* ── 星级摘要 Shadow DOM（来源：review-summary-component.js 构造函数注入的 <style>） ──
 * 嵌入运行时下组件不再注入 <style>（严格 CSP 的 style-src 会拦截），Shadow DOM 改用 <link> 导入 embed.css。
 * 规则与组件注入的样式一致，选择器限定到 review-summary：普通选择器前加 :host(review-summary)，
 * :host / :host([layout=...]) 改为 :host(review-summary) / :host(review-summary[layout=...])。
 * 在商家页面的文档里不匹配任何元素，同样导入 embed.css 的其它 Shadow DOM（媒体轮播）也不受影响；
 * 普通选择器特异性增加 (0,1,1)、:host 类增加 (0,0,1)，原来由 :host([layout=...]) 覆盖的规则仍被覆盖。
 * 修改组件内的样式时同步修改这里（app/lib/storefront/__tests__/review-summary.client.test.ts 校验两者一致）。
 */
:host(review-summary) {
  display: block;
  font-family: inherit;
  --star-color: var(--customerssay-star-color, #f8ce0b);
  --text-color: var(--customerssay-text-color, #666);
  --font-size: var(--customerssay-font-size, 14px);
}

:host(review-summary[layout="inline"]) {
  display: inline-flex;
}

:host(review-summary) .review-summary-container {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size);
  color: var(--text-color);
}

:host(review-summary[layout="compact"]) .review-summary-container {
  gap: 4px;
  font-size: calc(var(--font-size) - 1px);
}

:host(review-summary[layout="full"]) .review-summary-container {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

:host(review-summary) .rating-stars {
  position: relative;
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  font-size: inherit;
}

:host(review-summary[layout="compact"]) .rating-stars {
  font-size: calc(var(--font-size) + 2px);
}

:host(review-summary[layout="full"]) .rating-stars {
  font-size: calc(var(--font-size) + 4px);
}

:host(review-summary) .stars-empty {
  display: inline-block;
  color: #e0e0e0;
}

:host(review-summary) .stars-filled {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--star-color);
  overflow: hidden;
  white-space: nowrap;
}

:host(review-summary) .rating-count {
  font-size: inherit;
  color: var(--text-color);
  white-space: nowrap;
}

:host(review-summary) .rating-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-color);
  font-size: inherit;
}

:host(review-summary) .rating-text .template-stars {
  color: var(--star-color);
  display: inline-flex;
  white-space: nowrap;
  letter-spacing: 0.8px;
}

:host(review-summary[layout="compact"]) .rating-count {
  font-size: calc(var(--font-size) - 1px);
}

:host(review-summary) .review-count {
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.2s ease;
}

:host(review-summary) .review-count:hover {
  text-decoration-color: currentColor;
}

:host(review-summary) [style*="cursor: pointer"] {
  transition: opacity 0.2s ease;
}

:host(review-summary) [style*="cursor: pointer"]:hover {
  opacity: 0.8;
}

:host(review-summary) .loading {
  color: #999;
  font-size: inherit;
  display: flex;
  align-items: center;
  gap: 4px;
}

:host(review-summary) .no-reviews {
  color: #999;
  font-size: calc(var(--font-size) - 1px);
  font-style: italic;
}

/* 响应式调整 */
@media (max-width: 768px) {
  :host(review-summary) {
    --font-size: calc(var(--customerssay-font-size, 14px) - 1px);
  }

  :host(review-summary) .review-summary-container {
    gap: 3px;
  }
}

:host(review-summary) .customerssay-review-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--customerssay-text-color, #666);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
  margin: 2px 0;
  position: relative;
  z-index: 1;
}

:host(review-summary) .customerssay-review-summary:hover {
  color: var(--customerssay-hover-color, #333);
}

:host(review-summary) .customerssay-review-summary.compact {
  font-size: 11px;
  gap: 2px;
}

:host(review-summary) .customerssay-review-summary.inline {
  display: inline-flex;
  margin: 0 4px;
}

:host(review-summary) .customerssay-review-summary.full {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
}

/* 星级样式 */
:host(review-summary) .customerssay-stars {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-size: inherit;
  color: var(--customerssay-star-color, #ffc107);
  letter-spacing: 0;
}

:host(review-summary) .customerssay-stars.empty {
  color: var(--customerssay-empty-star-color, #e0e0e0);
}

/* 评论数量样式 */
:host(review-summary) .customerssay-count {
  font-size: inherit;
  color: inherit;
  white-space: nowrap;
}

/* 自动注入容器样式 */
:host(review-summary) .customerssay-auto-injected {
  margin: 4px 0;
  pointer-events: auto;
  z-index: 1;
}

/* 防止干扰父元素的hover效果 */
:host(review-summary) .customerssay-auto-injected:hover {
  background: transparent;
}

/* 确保在按钮内不会破坏按钮样式 */
:host(review-summary) button .customerssay-auto-injected,
:host(review-summary) .button .customerssay-auto-injected,
:host(review-summary) .btn .customerssay-auto-injected {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
  background: white;
  padding: 2px 4px;
  border-radius: 3px;
  box-shadow: 0 1px 3px #0000001a;
  pointer-events: auto;
  z-index: 10;
}

/* 响应式设计 */
@media (max-width: 768px) {
  :host(review-summary) .customerssay-review-summary {
    font-size: 11px;
  }

  :host(review-summary) .customerssay-review-summary.compact {
    font-size: 10px;
  }
}

/* 加载占位符样式 */
:host(review-summary) .customerssay-loading-placeholder {
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
  animation: customerssay-pulse 1.5s ease-in-out infinite;
}

@keyframes customerssay-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

/* 淡入动画 */
@keyframes customerssay-fade-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

:host(review-summary) .customerssay-auto-injected {
  animation: customerssay-fade-in 0.3s ease-out;
  animation-delay: var(--customerssay-animation-delay, 0ms);
  animation-fill-mode: both;
}

/* Fallback内容过渡 */
:host(review-summary) .fallback-transition {
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* ── 媒体轮播弹窗（来源：media-card-carousel.js _ensureModalStylesInHead 注入的 <style>） ──
 * 嵌入运行时下不再注入 document <style>；本段排在 media-card-carousel.css 之后，与主题店"注入的 <style> 在后"覆盖关系相同。
 * 修改注入的样式时同步修改这里（app/lib/storefront/__tests__/media-card-carousel.client.test.ts 校验两者一致）。
 */
.customerssay-mcc-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}
.customerssay-mcc-modal.open { display: flex; }
.customerssay-mcc-modal-content {
  background: #fff;
  width: min(1000px, 92vw);
  height: 60vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 18px 18px 12px;
  position: relative;
  overflow: hidden;
}
.customerssay-mcc-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  z-index: 10;
}
.customerssay-mcc-modal-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
  align-items: stretch;
  height: 60vh;
}
.customerssay-mcc-modal-media {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  border-radius: 12px;
  overflow: hidden;
}
.customerssay-mcc-modal-media .swiper { width: 100%; height: 100%; }
.customerssay-mcc-modal-media .swiper-wrapper { width: 100%; height: 100%; }
.customerssay-mcc-modal-media .swiper-slide { display: flex; align-items: center; justify-content: center; }
.customerssay-mcc-modal-media .swiper-slide img,
.customerssay-mcc-modal-media .swiper-slide video { width: 100%; height: 100%; object-fit: contain; }
.customerssay-mcc-modal-media img,
.customerssay-mcc-modal-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.customerssay-mcc-modal-info { padding: 4px 4px; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.customerssay-mcc-modal-reviewer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.customerssay-mcc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}
.customerssay-mcc-modal-name { font-weight: 600; font-size: 15px; }
.customerssay-mcc-country { font-size: 16px; margin-left: 4px; }
.customerssay-mcc-verified-badge { color: #10b981; margin-left: 6px; font-size: 14px; }
.customerssay-mcc-modal-stars { margin: 8px 0; color: #ffc107; }
.customerssay-mcc-modal-stars .customerssay-mcc-star { display: inline-block; }
.customerssay-mcc-modal-stars .customerssay-mcc-star.empty { opacity: 0.3; }
.customerssay-mcc-modal-title { font-weight: 700; margin: 6px 0 4px; color: #1f2937; }
.customerssay-mcc-modal-text { color: #4b5563; line-height: 1.6; }
.customerssay-mcc-modal-date { color: #9ca3af; font-size: 12px; margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.customerssay-mcc-modal-date svg { width: 14px; height: 14px; color: #9ca3af; }
.customerssay-mcc-modal-stars-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; gap: 10px; }
.customerssay-mcc-modal-stars-row .customerssay-mcc-modal-date { margin-left: 8px; }
.customerssay-mcc-product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
  margin-top: auto;
}
.customerssay-mcc-product-thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}
.customerssay-mcc-product-info { flex: 1; }
.customerssay-mcc-product-name { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.customerssay-mcc-product-link { color: #3b82f6; text-decoration: none; font-size: 13px; }
.customerssay-mcc-product-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .customerssay-mcc-modal-body { grid-template-columns: 1fr; min-height: 0; }
  .customerssay-mcc-modal-media { height: auto; }
}

