/* 🔍 Search Page Styles - Modern Design */

/* 검색 박스 스타일 */
.search-box {
  display: flex;
  gap: 0.75rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.search-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  outline: none;
  transition: border-color 0.3s ease;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-btn {
  padding: 0.875rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

/* 로딩 상태 */
.loading {
  text-align: center;
  padding: 3rem;
  display: none;
  color: var(--text-secondary);
}

/* 검색 결과 그리드 */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* 상품 카드 스타일 */
.product-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--bg-secondary);
}

.product-info {
  padding: 1.25rem;
}

.product-rank {
  display: inline-block;
  background: var(--secondary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.product-category {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

/* 상품 링크 스타일 */
.product-link, .product-title-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.product-link:hover .product-image {
  opacity: 0.9;
}

.product-title-link:hover .product-title {
  color: var(--primary-color);
}

/* 배지 스타일 */
.product-badges {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.badge {
  font-size: var(--font-size-xs);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 500;
}

.badge-rocket {
  background: var(--accent-color);
}

.badge-free {
  background: var(--primary-color);
}

/* 아카이브 상태 */
.archive-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.archived {
  color: var(--accent-color);
  font-size: var(--font-size-xs);
  font-weight: 600;
}

.not-archived {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.add-btn {
  padding: 0.375rem 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.add-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  .search-box {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .search-btn {
    width: 100%;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .product-info {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .search-input {
    font-size: 16px; /* iOS zoom 방지 */
  }
}