/**
 * Product List v7.0 - 추가 스타일
 * 스마트 뱃지 + 리뷰 정보 + 내 제품 + 영업대표 인사이트
 */

/* ========================================
   스마트 뱃지 (🔥 인기 / ✨ 신규 / 💎 전문가 추천)
   ======================================== */
.smart-badges {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  z-index: 2;
}

.smart-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.smart-badge.hot {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.smart-badge.new {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
}

.smart-badge.expert-rec {
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
}

/* 카드 이미지에 relative 보장 */
.product-card .card-image {
  position: relative;
  overflow: hidden;
}


/* ========================================
   리뷰 정보 영역
   ======================================== */
.card-review-info {
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
  margin-top: 6px;
}

.card-review-info .review-stars {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f59e0b;
}

.card-review-info .review-count {
  font-size: 0.78rem;
  color: #64748b;
  margin-left: 6px;
}

.card-review-info .review-excerpt {
  font-size: 0.75rem;
  color: #475569;
  margin: 4px 0 0;
  font-style: italic;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 리뷰 없음 */
.card-review-info.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-review-info .review-empty-text {
  font-size: 0.75rem;
  color: #94a3b8;
}

.card-review-info .review-write-link {
  font-size: 0.72rem;
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.card-review-info .review-write-link:hover {
  text-decoration: underline;
}


/* ========================================
   내 제품 하이라이트
   ======================================== */
.product-card.is-my-product {
  border: 2px solid #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.my-product-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #6366f1;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px 3px 12px;
  border-radius: 0 12px 0 10px;
  z-index: 5;
  letter-spacing: 0.3px;
}


/* ========================================
   영업대표 인사이트
   ======================================== */
.sales-insight {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  margin-top: 6px;
}

.sales-insight .insight-icon {
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sales-insight .insight-text {
  color: #475569;
  line-height: 1.3;
}

/* 내 제품 인사이트 */
.sales-insight.my-insight {
  background: #f0f0ff;
  border: 1px solid #e0e0ff;
}

.sales-insight.my-insight .insight-text {
  color: #4338ca;
  font-weight: 500;
}

/* 경쟁 넛지 */
.sales-insight.competitor-nudge {
  background: #fef3c7;
  border: 1px solid #fde68a;
}

.sales-insight.competitor-nudge .insight-text {
  color: #92400e;
  font-weight: 600;
}


/* ========================================
   리스트 뷰 조정
   ======================================== */
.products-grid.list-view .smart-badges {
  position: static;
  margin-top: 4px;
}

.products-grid.list-view .card-review-info {
  border-top: none;
  padding-top: 0;
}

.products-grid.list-view .sales-insight {
  margin-top: 4px;
}


/* ========================================
   모바일
   ======================================== */
@media (max-width: 768px) {
  .smart-badge {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  
  .card-review-info .review-excerpt {
    display: none;
  }
  
  .sales-insight {
    font-size: 0.68rem;
    padding: 4px 6px;
  }
  
  .my-product-badge {
    font-size: 0.62rem;
    padding: 2px 8px 2px 10px;
  }
}

/* ========================================
   Unclaimed 제품 카드 (G2/Capterra 스타일)
   ======================================== */

/* 카드 전체: 약간 흐린 톤 + 점선 테두리 */
.product-card.is-unclaimed {
  border: 1.5px dashed #d1d5db;
  background: #fafbfc;
  opacity: 0.92;
  transition: opacity 0.2s, border-color 0.2s;
}

.product-card.is-unclaimed:hover {
  opacity: 1;
  border-color: #6366f1;
}

/* Unclaimed 이미지 영역: 그레이스케일 + 워터마크 */
.product-card.is-unclaimed .card-image {
  position: relative;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.product-card.is-unclaimed .card-image img {
  filter: grayscale(60%) opacity(0.6);
}

.product-card.is-unclaimed .card-image-icon {
  opacity: 0.5;
}

/* Unclaimed 배지 스타일 */
.card-top-badge.unclaimed {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-bottom: 1px solid #d1d5db;
}

.card-top-badge.unclaimed .badge-label {
  color: #6b7280;
}

.card-top-badge.unclaimed .badge-label i {
  color: #9ca3af;
}

.badge-unclaimed-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  border: 1px solid #fde68a;
}

/* Unclaimed 카드 body 텍스트 */
.product-card.is-unclaimed .card-title {
  color: #4b5563;
}

.product-card.is-unclaimed .card-company {
  color: #9ca3af;
}

/* Unclaimed 정보 완성도: 낮은 레벨 강조 */
.product-card.is-unclaimed .completeness-text .level {
  color: #ef4444;
  font-weight: 700;
}

/* Unclaimed 푸터 */
.unclaimed-footer {
  flex-direction: column !important;
  gap: 8px !important;
}

.unclaimed-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 10px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #92400e;
}

.unclaimed-notice i {
  color: #f59e0b;
  font-size: 0.8rem;
}

.unclaimed-footer .card-actions {
  display: flex;
  width: 100%;
  gap: 8px;
}

.unclaimed-footer .card-detail-btn {
  flex: 1;
}

/* Claim 유도 버튼 (핵심 CTA) */
.card-claim-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.card-claim-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.card-claim-btn i {
  font-size: 0.75rem;
}

/* Unclaimed 카드에서 불필요한 요소 숨김 */
.product-card.is-unclaimed .card-keywords {
  display: none;
}

/* 리스트 뷰 조정 */
.products-grid.list-view .product-card.is-unclaimed {
  border-style: dashed;
}

.products-grid.list-view .unclaimed-footer {
  flex-direction: row !important;
  align-items: center;
}

.products-grid.list-view .unclaimed-notice {
  width: auto;
}

.products-grid.list-view .unclaimed-footer .card-actions {
  width: auto;
  margin-left: auto;
}

/* 모바일 */
@media (max-width: 768px) {
  .unclaimed-notice {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  .card-claim-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  
  .badge-unclaimed-tag {
    font-size: 0.62rem;
  }
}