/* ========================================
main.css
메인 페이지 전용 스타일
히어로 섹션, 검색, 상품 그리드, 상품 카드,
대체상품, 가격 비교, 평가 버튼, 폼 섹션(상품등록),
중복 검증 모달, 더보기 섹션 포함
   ======================================== */

/* ========================================
메인 레이아웃
   ======================================== */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) 20px;
}

/* ========================================
   콘텐츠 섹션
   ======================================== */
.content-section {
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}

.content-section:hover {
  transform: translateY(-2px);
}

.section-title {
  font-size: var(--font-2xl);
  font-weight: bold;
  margin-bottom: var(--spacing-lg);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========================================
   섹션 헤더 및 필터 버튼
   ======================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.filter-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: var(--radius-full);
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.filter-btn:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.filter-btn.active {
  background: var(--primary-color);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.filter-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--gray-200);
  color: var(--gray-500);
  border-color: var(--gray-300);
}

/* ========================================
   더보기 섹션
   ======================================== */
.load-more-section {
  text-align: center;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--gray-200);
}

.load-more-btn {
  min-width: 200px;
  font-weight: 500;
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-btn .loading-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  margin-right: 8px;
}

/* ========================================
   내 닉네임 강조
   ======================================== */
.my-nickname {
  color: var(--primary-color) !important;
  font-weight: 700 !important;
}

/* 새 상품 추가 애니메이션 */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.new-product-animation {
  animation: slideInFromTop 0.5s ease-out;
}

/* ========================================
   히어로 섹션
   ======================================== */
.hero-section {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  padding: var(--spacing-2xl) 0;
  user-select: none;
  caret-color: transparent;
}

.hero-title {
  font-size: var(--font-4xl);
  font-weight: bold;
  color: var(--text-inverse);
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: var(--font-xl);
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  font-weight: 300;
  line-height: 1.3;
}

/* 히어로 통계 및 버튼 영역 */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.hero-product-btn {
  font-size: 14px;
  padding: 7px 14px;
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  line-height: 1;
  margin: 0;
}

/* 메인 검색 */
.main-search {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.main-search-input {
  width: 100%;
  padding: 20px 60px 20px 25px;
  font-size: 18px;
  border: none;
  border-radius: var(--radius-full);
  outline: none;
  box-shadow: var(--shadow-xl);
  background: var(--bg-surface);
  transition: all var(--transition-base);
  user-select: text;
  caret-color: auto;
}

.main-search-input:focus {
  box-shadow: var(--shadow-xl), 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border: none;
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  color: var(--text-inverse);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  transform: translateY(-50%) scale(1.1);
  box-shadow: var(--shadow-lg);
}

/* 미니멀 강조 카운터 */
.stats-counter {
  color: #ffd700;
  font-weight: 800;
  font-size: 1.2em;
  font-family: 'Pretendard Variable', sans-serif;
  transition: all var(--transition-base);
}

/* ========================================
   상품 그리드 레이아웃
   ======================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

/* ========================================
   상품 세트 카드 컴포넌트
   ======================================== */
.product-set-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid var(--gray-100);
  margin-bottom: 20px;
}

.product-set-card:hover {
  box-shadow: var(--shadow-md);
}

/* ========================================
   상품 태그 영역
   ======================================== */
.product-tags {
  background: var(--gray-700);
  padding: 10px 15px;
  border-bottom: 1px solid var(--gray-200);
  font-size: var(--font-xs);
  color: var(--text-inverse);
  font-weight: 500;
}

/* ========================================
   메인 상품 영역
   ======================================== */
.main-product-section {
  padding: 15px;
  border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition-fast);
}

.main-product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.main-product-info {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.main-product-info:hover {
  background: var(--gray-100);
}

/* 메인 상품 이미지 */
.main-product-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.main-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--bg-alt);
}

.main-product-image.no-image {
  background: var(--bg-primary);
  color: var(--text-inverse);
  font-size: 24px;
  font-weight: 600;
}

/* 메인 상품 콘텐츠 */
.main-product-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.main-product-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

.main-product-title .title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  flex: 1;
  min-width: 0;
}

.main-product-price {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
}

/* 메인 상품 가격 비교 스타일 */
.main-product-price .price-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.main-product-price .price-diff {
  font-size: var(--font-xs);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 500;
  white-space: nowrap;
}

.main-product-price .price-diff.lowest {
  background: #d4edda;
  color: #155724;
}

.main-product-price .price-diff.low {
  background: #fff3cd;
  color: #856404;
}

.main-product-price .price-diff.medium {
  background: #ffe8d4;
  color: #8b4513;
}

.main-product-price .price-diff.high {
  background: #f8d7da;
  color: #721c24;
}

.main-product-price .price-diff.no-price {
  background: var(--gray-200);
  color: var(--text-secondary);
}

.main-product-details {
  font-size: var(--font-xs);
  color: var(--text-secondary);
}

/* 변환된 URL 표시 스타일 */
.converted-url {
  font-size: var(--font-xs);
  color: var(--primary-color);
  font-weight: 500;
  background: rgba(102, 126, 234, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-top: 2px;
  word-break: break-all;
  line-height: 1.2;
}

/* 대체상품에서의 변환된 URL */
.alternative-price .converted-url {
  display: block;
  margin-top: 4px;
  margin-left: 0;
}

/* 상품 링크 스타일 */
.main-product-link,
.alternative-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.main-product-link:hover,
.main-product-link:focus,
.alternative-link:hover,
.alternative-link:focus {
  text-decoration: none;
  color: inherit;
}

/* 링크 내부의 호버 효과 */
.main-product-link:hover .main-product-info,
.alternative-link:hover .alternative-info {
  background: var(--gray-100);
}

/* 버튼 영역 예외처리 - 링크 효과 차단 */
.alternative-actions {
  position: relative;
  z-index: 10;
  background: var(--bg-surface);
  margin-top: var(--spacing-sm);
  padding: var(--spacing-sm) 0;
}

/* 버튼들이 링크 효과를 받지 않도록 */
.rating-btn,
.delete-btn {
  position: relative;
  z-index: 11;
  pointer-events: auto;
}

/* 링크된 상품 정보 영역의 패딩 조정 */
.main-product-link .main-product-info,
.alternative-link .alternative-info {
  margin: 0;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

/* 포커스 상태 개선 */
.main-product-link:focus-visible,
.alternative-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

/* ========================================
   대체상품 영역
   ======================================== */
.alternatives-section {
  background: var(--bg-alt);
}

.alternatives-header {
  padding: 15px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--transition-fast);
}

.alternatives-header:hover {
  background: var(--gray-100);
}

.alternatives-toggle {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  color: var(--primary-color);
  transition: transform var(--transition-base);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alternatives-toggle.collapsed {
  transform: rotate(-90deg);
}

.alternatives-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.alternatives-list.expanded {
  max-height: 1000px;
}

/* ========================================
   대체상품 아이템
   ======================================== */
.alternative-item {
  padding: 15px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--bg-surface);
  transition: background-color var(--transition-fast);
}

.alternative-item:last-child {
  border-bottom: none;
}

.alternative-info {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.alternative-info:hover {
  background: var(--gray-100);
}

/* 대체상품 이미지 */
.alternative-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.alternative-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.alternative-image.no-image {
  background: var(--bg-primary);
  color: var(--text-inverse);
  font-size: 18px;
  font-weight: 600;
}

/* 대체상품 콘텐츠 */
.alternative-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.alternative-title {
  font-size: var(--font-sm);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: wrap;
}

.alternative-title .title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  flex: 1;
  min-width: 0;
}

/* 대체상품 가격 */
.alternative-price {
  font-size: var(--font-sm);
  font-weight: 600;
  margin-bottom: 5px;
}

/* 대체상품 설명 */
.alternative-description {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-style: italic;
  line-height: 1.4;
}

.alternative-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--spacing-sm);
  position: relative;
  z-index: 10;
  background: var(--bg-surface);
  padding: var(--spacing-sm) 0;
}

.alternative-ratings {
  display: flex;
  gap: 15px;
  align-items: center;
  flex: 1;
}

.alternative-author {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  margin-left: auto;
}

/* ========================================
   가격 비교 컴포넌트
   ======================================== */
.price-comparison {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.price-diff {
  font-size: var(--font-xs);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 500;
  white-space: nowrap;
}

.price-diff.lowest {
  background: #d4edda;
  color: #155724;
}

.price-diff.low {
  background: #fff3cd;
  color: #856404;
}

.price-diff.medium {
  background: #ffe8d4;
  color: #8b4513;
}

.price-diff.high {
  background: #f8d7da;
  color: #721c24;
}

.price-diff.no-price {
  background: var(--gray-200);
  color: var(--text-secondary);
}

/* 최저가 상품 가격 강조 */
.main-product-price:has(.price-diff.lowest) span:first-child,
.alternative-price:has(.price-diff.lowest) .price-comparison span:first-child {
  color: var(--primary-color);
  font-weight: 700;
}

/* has() 미지원 브라우저 대응 */
.lowest-price-highlight {
  color: var(--primary-color) !important;
  font-weight: 700 !important;
}

/* 가격 요약 */
.price-summary {
  font-size: var(--font-xs);
  color: var(--primary-color);
  font-weight: 500;
  background: rgba(102, 126, 234, 0.1);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  white-space: nowrap;
}

/* ========================================
   평가 버튼 컴포넌트
   ======================================== */
.rating-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: var(--font-xs);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  font-weight: 500;
}

.rating-btn:hover {
  background: var(--gray-100);
  transform: translateY(-1px);
}

.rating-btn.liked {
  color: var(--success-color);
  background: rgba(16, 185, 129, 0.1);
}

.rating-btn.disliked {
  color: var(--error-color);
  background: rgba(239, 68, 68, 0.1);
}

/* ========================================
   액션 버튼들
   ======================================== */
.delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--font-sm);
  color: var(--error-color);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  margin-left: 8px;
}

.delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  transform: translateY(-1px);
}

/* ========================================
   상품 세트 하단 통계
   ======================================== */
.product-set-stats {
  padding: 10px 15px;
  background: var(--bg-alt);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--gray-200);
}

.stats-row1 {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

.stats-row2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--font-xs);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--transition-fast);
  padding: 4px 8px;
  border-radius: var(--radius-md);
}

.stat-item:hover {
  color: var(--text-primary);
  background: var(--gray-100);
}

/* 관리자 삭제 버튼 (sync-btn 빨간색 버전) */
.admin-delete-btn {
  background: none;
  border: 1px solid #dc3545;
  color: #dc3545;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.admin-delete-btn:hover {
  background: #dc3545;
  color: #fff;
  transform: translateY(-1px);
}

/* 동기화 버튼 스타일 */
.sync-btn {
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 4px 8px;
  border-radius: var(--radius-md);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 500;
  white-space: nowrap;
}

.sync-btn:hover:not(:disabled) {
  background: var(--primary-color);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.sync-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--gray-200);
  color: var(--gray-500);
  border-color: var(--gray-300);
}

.sync-btn .loading-sm {
  width: 12px;
  height: 12px;
  border-width: 1px;
}


/* ========================================
   URL 미리보기 컴포넌트
   ======================================== */
.url-preview {
  margin-top: 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: none;
  background: var(--bg-surface);
}

.url-preview.show {
  display: block;
}

.url-preview .link-preview {
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.url-preview .link-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--gray-100);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.url-preview .link-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.url-preview .link-image.no-image {
  background: var(--bg-primary);
  color: var(--text-inverse);
  font-size: 18px;
  font-weight: 600;
}

.url-preview .link-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.url-preview .link-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin: 0;
}

.url-preview .link-description {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  line-height: 1.3;
}

.url-preview .link-site {
  font-size: var(--font-xs);
  color: var(--text-muted);
}

.preview-error {
  color: var(--error-color);
  font-size: var(--font-xs);
  padding: 8px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ========================================
   폼 섹션 (상품등록 전용)
   ======================================== */
.form-section {
  margin-bottom: 25px;
  padding: 20px;
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}

.form-section h4 {
  margin: 0 0 15px 0;
  color: var(--text-primary);
  font-size: var(--font-lg);
  font-weight: 600;
}

/* 입력 그룹 */
.market-input-group,
.esm-input-group {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.esm-input-group .btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.market-select {
  min-width: 120px;
  padding: 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  background: var(--bg-surface);
}

.price-input-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  align-items: center;
}

.price-input-group input {
  flex: 1;
}

.price-input-group label {
  font-size: var(--font-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  margin: 0;
}

/* ========================================
   검증 상태 표시
   ======================================== */
.validation-status {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  display: none;
  animation: fadeIn var(--transition-base) ease;
}

.validation-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.validation-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ESM 상태 표시 */
.esm-status {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--font-sm);
  display: none;
  font-weight: 500;
}

.esm-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}

.esm-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.esm-status.loading {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
  display: block;
}

.esm-status.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
  display: block;
}

/* ========================================
   대체상품 폼 컴포넌트
   ======================================== */
.alternative-form-item {
  background: var(--bg-surface);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 15px;
  transition: border-color var(--transition-fast);
}

.alternative-form-item:hover {
  border-color: var(--gray-300);
}

.alternative-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--gray-200);
}

.alternative-form-header span {
  font-weight: 600;
  color: var(--text-primary);
}

.remove-alternative-btn {
  background: var(--error-color);
  color: var(--text-inverse);
  border: none;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--font-xs);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 500;
}

.remove-alternative-btn:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

/* ========================================
   중복 검증 모달
   ======================================== */
.duplicate-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.warning-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.duplicate-warning p {
  margin: 0;
  color: #856404;
  font-weight: 500;
  line-height: 1.4;
}

.duplicate-list {
  margin-bottom: 20px;
  max-height: 300px;
  overflow-y: auto;
}

.duplicate-item {
  background: var(--bg-alt);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 10px;
}

.duplicate-item:last-child {
  margin-bottom: 0;
}

.duplicate-code {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--error-color);
  margin-bottom: 8px;
}

.duplicate-location {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.duplicate-existing {
  font-size: var(--font-sm);
  color: var(--text-primary);
  background: var(--gray-200);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary-color);
}

.duplicate-note {
  padding: 15px;
  background: #e7f3ff;
  border: 1px solid #b8daff;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.duplicate-note p {
  margin: 0;
  color: #004085;
  font-size: var(--font-sm);
  line-height: 1.5;
}

.duplicate-actions {
  text-align: center;
}