/**
 * Homepage + product comments review cards (HTML dump parity).
 */

/* Fluid waterfall-style grid (original mo-waterfall: 3 cols / 30px gutters) */
.block_comment_image .block_comment_list,
ul.block_comment_list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: start;
  width: 100%;
}

.block_comment_view_more {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.block_comment_li {
  background: #f6f6f6;
  border-radius: 9px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  break-inside: avoid;
  list-style: none;
}

.block_comment_list_img {
  display: block;
  line-height: 0;
}

.block_comment_list_img a {
  display: block;
}

.block_comment_list_img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  vertical-align: top;
}

.block_comment-content {
  position: relative;
  padding: 30px 20px 20px;
  flex: 1 1 auto;
}

.block_comment_list_star {
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  height: 24px;
  padding: 0 12px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f8ad6b;
  z-index: 1;
}

.block_comment_list_star svg {
  width: 16px;
  height: 16px;
  display: block;
}

.block_comment_list_author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--title_color, #121b17);
  margin: 0 0 10px;
  font-size: 14px;
  overflow: hidden;
}

.block_comment_list_author .flag,
.block_comment_list_author img {
  width: 20px;
  max-width: 20px;
  max-height: 20px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.block_comment_list_author span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Full body visible — no fold / line-clamp on review copy */
.block_comment_list_content {
  margin-bottom: 10px;
  overflow: visible;
  color: var(--detail_color, #121b17);
  text-align: left;
  font-size: 14px;
  line-height: 1.55;
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  max-height: none;
  white-space: normal;
}

.block_comment_list_content_link {
  color: inherit;
  text-decoration: none;
}

.block_comment_list_content_link:hover {
  text-decoration: underline;
}

.block_comment_read_more {
  display: inline;
  margin-left: 4px;
  color: var(--main_button_bg, #2c676a);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.block_comment_read_more:hover {
  text-decoration: underline;
}

.block_comment_list_time {
  margin-top: 12px;
  font-size: 12px;
  color: var(--detail_color, #888);
}

.block_comment_product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #dddddd;
  margin-top: auto;
}

.block_comment_product a {
  display: flex;
  align-items: center;
  gap: 0;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  width: 100%;
}

.block_comment_product .pic {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 0;
  flex-shrink: 0;
  display: block;
}

/* Match HTML: 2-line clamp on product title (not single-line ellipsis) */
.block_comment_product .name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  word-wrap: break-word;
  word-break: normal;
  white-space: normal;
  text-overflow: unset;
  width: calc(100% - 50px);
  padding-left: 10px;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 1.35;
  color: var(--detail_color, #121b17);
}

/* Product comments archive (/comments/{slug}) */
.comments_detail {
  padding: 40px 0 60px;
}

.comments_detail > .title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--title_color, #121b17);
}

.comments_detail .product {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e9e9e9;
}

.comments_detail .product-images {
  flex: 0 0 120px;
}

.comments_detail .product-images img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  display: block;
}

.comments_detail .product-comment {
  flex: 1;
  min-width: 0;
}

.comments_detail .comment-product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  color: var(--title_color, #121b17);
  text-decoration: none;
  margin-bottom: 8px;
}

.comments_detail .product-comment-fraction {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f8ad6b;
}

.comments_detail .product-comment-fraction span {
  color: var(--title_color, #121b17);
  font-weight: 700;
}

.comments_detail-comment-wrap {
  margin-top: 20px;
}

.comments_detail .comment_warp {
  background: #f6f6f6;
  border-radius: 9px;
  padding: 20px;
  margin-bottom: 20px;
}

.comments_detail .comment_warp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 700;
}

.comments_detail .comment_warp-header-nation {
  width: 20px;
  height: auto;
  margin-right: 8px;
}

.comments_detail .comment_warp-score {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
}

.comments_detail .comment_warp-content-lable {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--detail_color, #121b17);
}

.comments_detail .comment_warp-images {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.comments_detail .comment_warp-images img {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 4px;
}

.comments_detail-empty {
  color: #666;
  font-size: 14px;
}

@media (max-width: 1023px) {
  .block_comment_image .block_comment_list,
  ul.block_comment_list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 767px) {
  /* Original waterfall: 2 columns on mobile (not single stack) */
  .block_comment_image .block_comment_list,
  ul.block_comment_list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

  .block_comment-content {
    padding: 20px 10px 10px;
  }

  .block_comment_product {
    padding: 10px;
  }

  .block_comment_product .pic {
    width: 40px;
    height: 40px;
  }

  .block_comment_product .name {
    width: calc(100% - 40px);
  }

  .block_comment_list_star svg {
    width: 14px;
    height: 14px;
  }

  .comments_detail .product {
    flex-direction: column;
  }
}
