/* ============================================
   mypage-cards.css
   스마트 명함 사용자 시스템 스타일
   ============================================ */

/* ============================================
   명함 만들기 - 단계 표시
   ============================================ */
.card-create-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0;
  padding: 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gray-200);
  color: var(--gray-500);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  transform: scale(1.1);
}

.step.completed .step-number {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
}

.step.completed .step-number::after {
  content: '✓';
  font-size: 1.5rem;
}

.step-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 500;
}

.step.active .step-label {
  color: var(--primary);
  font-weight: 700;
}

.step-divider {
  width: 60px;
  height: 2px;
  background: var(--gray-200);
  margin: 0 1rem;
}

.step.completed ~ .step-divider {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* ============================================
   단계별 콘텐츠
   ============================================ */
.create-step-content {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.create-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================
   템플릿 그리드
   ============================================ */
.template-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--gray-200);
  border-radius: 2rem;
  background: white;
  color: var(--gray-700);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  border-color: transparent;
  color: white;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.template-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.template-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
  transform: translateY(-4px);
}

.template-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
}

.template-card.selected::after {
  content: '✓';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.template-thumbnail {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 0.5rem;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

/* 이미지가 있으면 표시 */
.template-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
}

/* 템플릿 레이아웃 미리보기 컨테이너 */
.template-thumbnail::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* 템플릿 레이아웃 요소들 */
.template-thumbnail::after {
  content: '';
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.template-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.template-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.badge-premium {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-season {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============================================
   명함 정보 입력 폼
   ============================================ */
.card-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.char-count {
  text-align: right;
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ============================================
   제품 선택
   ============================================ */
.product-selection-header {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 0.75rem;
  text-align: center;
}

.product-selection-header strong {
  color: var(--primary);
  font-size: 1.25rem;
}

.product-selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.product-selection-item {
  padding: 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-selection-item:hover {
  border-color: var(--primary);
  background: var(--gray-50);
}

.product-selection-item.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.product-selection-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.product-selection-item label {
  flex: 1;
  cursor: pointer;
}

.product-name {
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.product-company {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* ============================================
   명함 미리보기
   ============================================ */
.card-preview-area {
  max-width: 600px;
  margin: 0 auto;
}

.card-preview {
  padding: 2rem;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.preview-template {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border-radius: 0.75rem;
  text-align: center;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.preview-field {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-200);
}

.preview-field strong {
  color: var(--gray-700);
  margin-right: 0.5rem;
}

.preview-products,
.preview-message {
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 0.75rem;
  margin-top: 1rem;
}

/* ============================================
   내 명함 목록
   ============================================ */
.my-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.my-card-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.my-card-item:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-preview-thumb {
  position: relative;
  width: 200px;
  min-width: 200px;
  aspect-ratio: 3/2;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.card-preview-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 템플릿 배지 */
.template-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.95);
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.3px;
  backdrop-filter: blur(4px);
}

/* 썸네일 콘텐츠 */
.thumb-content {
  margin-top: auto;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.thumb-content h5 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: white;
  line-height: 1.2;
}

.thumb-content .company {
  font-size: 14px;
  opacity: 0.95;
  margin: 0;
  color: white;
  font-weight: 500;
}

.card-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-item-info h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
}

.card-item-info p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

.card-stats-mini {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.card-stats-mini span {
  font-size: 0.875rem;
  color: var(--gray-600);
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--gray-100);
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.25rem;
  transition: all 0.3s ease;
}

.btn-icon:hover {
  background: var(--primary);
  transform: scale(1.1);
}

/* ============================================
   통계 카드
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.stat-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.stat-info {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
}

/* ============================================
   카테고리 탭
   ============================================ */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  flex-wrap: wrap;
}

.tab-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--gray-700);
  font-weight: 600;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  background: var(--gray-100);
}

.tab-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}

.tab-count {
  padding: 0.25rem 0.625rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  font-size: 0.875rem;
}

.tab-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   데이터 테이블
   ============================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--gray-50);
}

.data-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--gray-700);
  border-bottom: 2px solid var(--gray-200);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-600);
}

.data-table tbody tr:hover {
  background: var(--gray-50);
}

/* ============================================
   빈 상태
   ============================================ */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--gray-500);
}

.empty-state p {
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

/* ============================================
   반응형
   ============================================ */
@media (max-width: 768px) {
  .card-create-steps {
    overflow-x: auto;
    justify-content: flex-start;
  }
  
  .step-divider {
    width: 40px;
    margin: 0 0.5rem;
  }
  
  .template-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .my-card-item {
    flex-direction: column;
  }
  
  .card-preview-thumb {
    width: 100%;
    height: 240px;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}


/* 카테고리별 템플릿 스타일 */
.template-card[data-category="basic"] .template-thumbnail {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.template-card[data-category="basic"] .template-thumbnail::before {
  content: '📄';
}

.template-card[data-category="seasonal"] .template-thumbnail {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.template-card[data-category="seasonal"] .template-thumbnail::before {
  content: '🎊';
}

.template-card[data-category="business"] .template-thumbnail {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.template-card[data-category="business"] .template-thumbnail::before {
  content: '💼';
}

.template-card[data-category="premium"] .template-thumbnail {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.template-card[data-category="premium"] .template-thumbnail::before {
  content: '⭐';
}


/* ============================================
   템플릿별 레이아웃 미리보기
   ============================================ */

/* 기본: 심플 기본 - 중앙 정렬, 깔끔한 레이아웃 */
.template-card[data-template="basic-simple"] .template-thumbnail,
.template-card[data-category="basic"]:nth-child(1) .template-thumbnail {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.template-card[data-template="basic-simple"] .template-thumbnail::before,
.template-card[data-category="basic"]:nth-child(1) .template-thumbnail::before {
  content: '📄';
  font-size: 4rem;
  opacity: 0.2;
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

/* 심플 기본: 카드 박스 */
.template-card[data-template="basic-simple"] .template-thumbnail::before,
.template-card[data-category="basic"]:nth-child(1) .template-thumbnail::before {
  width: 60%;
  height: 60%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.15);
  border-radius: 0.3rem;
  box-shadow: 
    0 0 0 1px rgba(255,255,255,0.2),
    0 0.5rem 1rem rgba(0,0,0,0.1);
}

/* 심플 기본: 텍스트 라인 + 아이콘 */
.template-card[data-template="basic-simple"] .template-thumbnail::after,
.template-card[data-category="basic"]:nth-child(1) .template-thumbnail::after {
  content: '📄';
  font-size: 3rem;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 15%;
  z-index: 2;
}

.template-card[data-template="basic-simple"] .template-thumbnail::after,
.template-card[data-category="basic"]:nth-child(1) .template-thumbnail::after {
  background: 
    linear-gradient(white, white) 50% 48%/50% 3px no-repeat,
    linear-gradient(white, white) 50% 60%/40% 2px no-repeat,
    linear-gradient(white, white) 50% 68%/45% 2px no-repeat,
    linear-gradient(white, white) 50% 80%/30% 2px no-repeat;
  font-size: 0;
}

/* 기본: 모던 기본 - 왼쪽 정렬, 강조선 */
.template-card[data-template="basic-modern"] .template-thumbnail,
.template-card[data-category="basic"]:nth-child(2) .template-thumbnail {
  background: linear-gradient(135deg, #667eea 0%, #a855f7 100%);
}

.template-card[data-template="basic-modern"] .template-thumbnail::before,
.template-card[data-category="basic"]:nth-child(2) .template-thumbnail::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), rgba(255,255,255,0.3));
}

.template-card[data-template="basic-modern"] .template-thumbnail::after,
.template-card[data-category="basic"]:nth-child(2) .template-thumbnail::after {
  content: '';
  position: absolute;
  left: 15%;
  top: 50%;
  transform: translateY(-50%);
  width: 70%;
  height: 50%;
  background: 
    linear-gradient(white, white) 0 20%/60% 4px no-repeat,
    linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)) 0 40%/45% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)) 0 50%/50% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)) 0 60%/40% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)) 0 80%/30% 2px no-repeat;
}

/* 기본: 프리미엄 기본 - 고급스러운 프레임 */
.template-card[data-template="basic-premium"] .template-thumbnail,
.template-card[data-category="basic"]:nth-child(3) .template-thumbnail {
  background: linear-gradient(135deg, #1e1e1e 0%, #3a3a3a 100%);
}

.template-card[data-template="basic-premium"] .template-thumbnail::before,
.template-card[data-category="basic"]:nth-child(3) .template-thumbnail::before {
  content: '';
  width: 85%;
  height: 85%;
  border: 2px solid rgba(212, 175, 55, 0.6);
  border-radius: 0.2rem;
  box-shadow: 
    inset 0 0 0 1px rgba(212, 175, 55, 0.3),
    0 0.5rem 1rem rgba(0,0,0,0.3);
}

.template-card[data-template="basic-premium"] .template-thumbnail::after,
.template-card[data-category="basic"]:nth-child(3) .template-thumbnail::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 40%;
  background: 
    linear-gradient(rgba(212, 175, 55, 0.8), rgba(212, 175, 55, 0.8)) 50% 30%/70% 3px no-repeat,
    linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)) 50% 45%/60% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)) 50% 55%/60% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0.4)) 50% 70%/40% 1px no-repeat;
}

/* 시즌: 신년/설날 - 장식 요소 */
.template-card[data-category="seasonal"] .template-thumbnail {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.template-card[data-category="seasonal"] .template-thumbnail::before {
  content: '🎊';
  font-size: 3rem;
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  opacity: 0.9;
}

.template-card[data-category="seasonal"] .template-thumbnail::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 50%;
  top: 45%;
  left: 50%;
  transform: translateX(-50%);
  background: 
    linear-gradient(white, white) 50% 30%/80% 4px no-repeat,
    linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)) 50% 50%/60% 3px no-repeat,
    linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)) 50% 65%/70% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)) 50% 80%/50% 2px no-repeat;
}

/* 비즈니스: 2단 레이아웃 */
.template-card[data-category="business"] .template-thumbnail {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  position: relative;
}

/* 비즈니스: 왼쪽 다크 영역 + 구분선 + 오른쪽 텍스트 라인 */
.template-card[data-category="business"] .template-thumbnail::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: 
    linear-gradient(135deg, rgba(0,0,0,0.2), rgba(0,0,0,0.1)) 0 0/35% 100% no-repeat,
    linear-gradient(rgba(255,255,255,0.2), rgba(255,255,255,0.2)) 35% 0/2px 100% no-repeat,
    linear-gradient(white, white) 60% 25%/35% 3px no-repeat,
    linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)) 60% 35%/30% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.7), rgba(255,255,255,0.7)) 60% 42%/32% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)) 60% 55%/28% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)) 60% 62%/30% 2px no-repeat,
    linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)) 60% 69%/25% 2px no-repeat;
  z-index: 1;
}

/* 비즈니스: 왼쪽 아이콘 */
.template-card[data-category="business"] .template-thumbnail::after {
  content: '💼';
  font-size: 2.5rem;
  position: absolute;
  left: 17.5%;
  top: 30%;
  transform: translateX(-50%);
  opacity: 0.8;
  z-index: 5;
}

/* 프리미엄 카테고리 */
.template-card[data-category="premium"] .template-thumbnail {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.template-card[data-category="premium"] .template-thumbnail::before {
  content: '⭐';
  font-size: 4rem;
  position: absolute;
  opacity: 0.3;
}

.template-card[data-category="premium"] .template-thumbnail::after {
  content: '';
  width: 75%;
  height: 75%;
  border: 3px solid rgba(255,255,255,0.5);
  border-radius: 0.5rem;
  background: 
    linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.8)) 50% 40%/60% 4px no-repeat,
    linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)) 50% 55%/50% 3px no-repeat,
    linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)) 50% 65%/55% 2px no-repeat;
}

/* 호버 효과 */
.template-card:hover .template-thumbnail {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.template-card:hover .template-thumbnail::before {
  opacity: 1;
}


/* 템플릿 카드 전환 효과 */
.template-card {
  transition: all 0.3s ease;
}

.template-thumbnail {
  transition: all 0.3s ease;
}

.template-thumbnail::before,
.template-thumbnail::after {
  transition: all 0.3s ease;
}

/* 선택된 카드 강조 */
.template-card.selected {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.template-card.selected .template-thumbnail {
  border: 3px solid #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}


/* ============================================
   템플릿별 고유 아이콘 추가
   (기존 레이아웃은 모두 유지)
   ============================================ */

/* 시즌 카테고리 - 템플릿별 아이콘 */
.template-card[data-template="newyear-traditional"] .template-thumbnail::before {
  content: '🎆';
}

.template-card[data-template="newyear-modern"] .template-thumbnail::before {
  content: '🎇';
}

.template-card[data-template="lunar-traditional"] .template-thumbnail::before {
  content: '🌙';
}

.template-card[data-template="lunar-cute"] .template-thumbnail::before {
  content: '🐰';
}

/* 비즈니스 카테고리 - 템플릿별 아이콘 */
.template-card[data-template="business-meeting"] .template-thumbnail::after {
  content: '🤝';
}

.template-card[data-template="business-seminar"] .template-thumbnail::after {
  content: '🎓';
}

.template-card[data-template="business-exhibition"] .template-thumbnail::after {
  content: '🏢';
}

/* ============================================
   모달 및 배너 스타일
   mypage-cards.css에 추가할 스타일
   ============================================ */

/* ============================================
   공통 모달 스타일
   ============================================ */

.business-profile-modal,
.card-prompt-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.business-profile-modal.show,
.card-prompt-modal.show {
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 500px;
  animation: modalSlideUp 0.3s;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content {
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-content.compact {
  max-width: 440px;
  padding: 2rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-light);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text);
}

/* ============================================
   비즈니스 프로필 필수 모달
   ============================================ */

.modal-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 1rem;
}

.modal-content h2 {
  font-size: 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.modal-message {
  text-align: center;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.modal-message p {
  margin-bottom: 1rem;
}

.modal-message strong {
  color: var(--primary);
  font-weight: 600;
}

.benefits-compact {
  background: var(--gray-50);
  padding: 1.25rem;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.benefits-compact .benefit {
  color: var(--text);
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  width: 100%;
  padding: 0.875rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  font-size: 1rem;
}

.modal-actions .btn-primary {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
}

.modal-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.modal-actions .btn-secondary {
  background: white;
  color: var(--text-light);
  border: 2px solid var(--gray-200);
}

.modal-actions .btn-secondary:hover {
  background: var(--gray-50);
}

/* ============================================
   프로필 등록 완료 모달
   ============================================ */

.modal-content.success {
  text-align: center;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.card-benefits {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  text-align: left;
}

.card-benefits .benefit-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}

.card-benefits .benefit-item:not(:last-child) {
  border-bottom: 1px solid var(--gray-200);
}

.card-benefits .icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-benefits .text {
  color: var(--text);
  font-size: 0.95rem;
}

.modal-actions .btn-primary.large {
  padding: 1.125rem;
  font-size: 1.05rem;
}

.modal-actions .btn-primary i {
  margin-right: 0.5rem;
}

/* ============================================
   스마트 명함 배너
   ============================================ */

.smart-card-banner {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 2px solid #bae6fd;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s;
}

.smart-card-banner.show {
  opacity: 1;
  transform: translateY(0);
}

.smart-card-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #6366f1, #8b5cf6);
}

.banner-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
  z-index: 2;
}

.banner-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text);
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.banner-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.banner-text {
  flex: 1;
}

.banner-text h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.banner-text p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.banner-cta {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border: none;
  padding: 0.875rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.banner-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.banner-cta i {
  font-size: 1.125rem;
}

.banner-benefits {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.banner-benefits .badge {
  background: white;
  color: var(--primary);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #bae6fd;
}

/* ============================================
   자동 입력 안내
   ============================================ */

.auto-filled-notice {
  background: linear-gradient(135deg, #d1f4e0, #a8e6cf);
  border-left: 4px solid #10b981;
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.auto-filled-notice i {
  color: #059669;
  font-size: 1.25rem;
}

.auto-filled-notice span {
  color: #065f46;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ============================================
   반응형
   ============================================ */

@media (max-width: 768px) {
  .modal-content {
    padding: 2rem 1.5rem;
  }
  
  .banner-content {
    flex-direction: column;
    text-align: center;
  }
  
  .banner-cta {
    width: 100%;
    justify-content: center;
  }
  
  .banner-benefits {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .modal-dialog {
    width: 95%;
  }
  
  .modal-icon,
  .success-icon {
    font-size: 2.5rem;
  }
  
  .modal-content h2 {
    font-size: 1.125rem;
  }
  
  .banner-icon {
    font-size: 2.5rem;
  }
  
  .banner-text h3 {
    font-size: 1.125rem;
  }
}

/* ============================================
   카테고리별 템플릿 색상
   ============================================ */

/* 기본 템플릿 - 보라 그라데이션 */
.card-preview-thumb[data-category="basic"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 비즈니스 템플릿 - 다크 블루 */
.card-preview-thumb[data-category="business"] {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
}

/* 크리에이티브 템플릿 - 핑크 그라데이션 */
.card-preview-thumb[data-category="creative"] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

/* 미니멀 템플릿 - 라이트 그레이 */
.card-preview-thumb[data-category="minimal"] {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

/* 시즌 템플릿 - 핑크-옐로우 그라데이션 */
.card-preview-thumb[data-category="season"] {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

/* 프리미엄 템플릿 - 골드 그라데이션 */
.card-preview-thumb[data-category="premium"] {
  background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
}

/* ============================================
   템플릿별 세부 색상
   ============================================ */

/* 클래식 */
.card-preview-thumb[data-template="template-basic-1"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 모던 */
.card-preview-thumb[data-template="template-basic-2"] {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* 비즈니스 */
.card-preview-thumb[data-template="template-business-1"] {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
}

/* 프로페셔널 */
.card-preview-thumb[data-template="template-business-2"] {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

/* 크리에이티브 */
.card-preview-thumb[data-template="template-creative-1"] {
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
}

/* 아티스틱 */
.card-preview-thumb[data-template="template-creative-2"] {
  background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

/* 미니멀 */
.card-preview-thumb[data-template="template-minimal-1"] {
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
}

/* 심플 */
.card-preview-thumb[data-template="template-minimal-2"] {
  background: linear-gradient(135deg, #e0e0e0 0%, #ffffff 100%);
}

/* 봄 시즌 */
.card-preview-thumb[data-template="template-season-spring"] {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

/* 여름 시즌 */
.card-preview-thumb[data-template="template-season-summer"] {
  background: linear-gradient(135deg, #08aeea 0%, #2af598 100%);
}

/* 가을 시즌 */
.card-preview-thumb[data-template="template-season-autumn"] {
  background: linear-gradient(135deg, #ff9a56 0%, #ff6a00 100%);
}

/* 겨울 시즌 */
.card-preview-thumb[data-template="template-season-winter"] {
  background: linear-gradient(135deg, #e6e9f0 0%, #eef1f5 100%);
}

/* ============================================
   미니멀 카테고리 텍스트 색상 조정
   ============================================ */

.card-preview-thumb[data-category="minimal"] .thumb-content h5,
.card-preview-thumb[data-category="minimal"] .thumb-content .company,
.card-preview-thumb[data-template="template-minimal-1"] .thumb-content h5,
.card-preview-thumb[data-template="template-minimal-1"] .thumb-content .company,
.card-preview-thumb[data-template="template-minimal-2"] .thumb-content h5,
.card-preview-thumb[data-template="template-minimal-2"] .thumb-content .company,
.card-preview-thumb[data-template="template-season-winter"] .thumb-content h5,
.card-preview-thumb[data-template="template-season-winter"] .thumb-content .company {
  color: #2c3e50;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.card-preview-thumb[data-category="minimal"] .template-badge,
.card-preview-thumb[data-template="template-minimal-1"] .template-badge,
.card-preview-thumb[data-template="template-minimal-2"] .template-badge,
.card-preview-thumb[data-template="template-season-winter"] .template-badge {
  background: rgba(44, 62, 80, 0.9);
  color: white;
}

/* ============================================
   반응형 디자인
   ============================================ */

@media (max-width: 768px) {
  .card-preview-thumb {
    width: 160px;
    min-width: 160px;
    padding: 12px;
  }
  
  .template-badge {
    font-size: 10px;
    padding: 4px 10px;
    top: 8px;
    right: 8px;
  }
  
  .thumb-content h5 {
    font-size: 16px;
  }
  
  .thumb-content .company {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .card-preview-thumb {
    width: 120px;
    min-width: 120px;
    padding: 10px;
  }
  
  .thumb-content h5 {
    font-size: 14px;
  }
  
  .thumb-content .company {
    font-size: 12px;
  }
}

/* ============================================
   다크 모드 지원
   ============================================ */

@media (prefers-color-scheme: dark) {
  .template-badge {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    backdrop-filter: blur(8px);
  }
  
  .card-preview-thumb {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }
  
  .card-preview-thumb:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  }
}

/* ============================================
   애니메이션
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.my-card-item {
  animation: fadeInUp 0.4s ease-out;
}

/* ============================================
   제품 연결 관리 스타일
   ============================================ */

/* 제품 연결 관리 스타일 */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  border: 2px solid #e5e7eb;
  display: flex;
  gap: 1rem;
  align-items: center;
  transition: all 0.3s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 2.5rem;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
}

.filter-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
}

.filter-btn.active {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: white;
  border-color: #4f46e5;
}

.product-link-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all 0.3s;
}

.product-link-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.product-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.product-info p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.linked-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.card-badge button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.card-badge button:hover {
  opacity: 1;
}

.linked-cards-empty {
  color: #9ca3af;
  font-size: 0.875rem;
  font-style: italic;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

/* 명함 선택 모달 */
.card-checkbox-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.3s;
}

.card-checkbox-item:hover {
  border-color: #6366f1;
  background: #f9fafb;
}

.card-checkbox-item.selected {
  border-color: #6366f1;
  background: #eef2ff;
}

.card-checkbox-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-right: 1rem;
  cursor: pointer;
}

.card-checkbox-info {
  flex: 1;
}

.card-checkbox-info h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.25rem 0;
}

.card-checkbox-info p {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}