/* Tailwind CSS 기본 스타일 */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* 한글 폰트 설정 */
@layer base {
  * {
    font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard Variable', Pretendard, Roboto, 'Noto Sans KR', 'Segoe UI', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  }
}

/* 커스텀 컴포넌트 */
@layer components {
  .btn-primary {
    @apply bg-orange-500 text-white px-4 py-2 rounded-lg font-medium hover:bg-orange-600 transition-colors;
  }
  
  .btn-secondary {
    @apply bg-gray-200 text-gray-900 px-4 py-2 rounded-lg font-medium hover:bg-gray-300 transition-colors;
  }
  
  .nav-link {
    @apply text-gray-600 font-medium hover:text-orange-500 transition-colors;
  }
  
  .nav-link-active {
    @apply text-orange-500 font-medium;
  }
  
  .card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200;
  }
  
  .input-field {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-orange-500 focus:border-transparent;
  }
}

/* 타이포그래피 유틸리티 */
@layer utilities {
  .typo-h1 {
    @apply text-xl font-bold leading-7 tracking-tight text-gray-900;
  }
  
  .typo-h2 {
    @apply text-lg font-bold leading-6 text-gray-900;
  }
  
  .typo-h3 {
    @apply text-base font-bold leading-5 text-gray-900;
  }
  
  .typo-body {
    @apply text-sm font-normal leading-5 text-gray-900;
  }
  
  .typo-caption {
    @apply text-xs font-normal leading-4 text-gray-600;
  }
  
  .typo-caption2 {
    @apply text-xs font-normal leading-4 text-center break-words;
  }
  
  .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* 전역 스타일 */
body {
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  color: #1f2937;
}

a {
  text-decoration: none;
  color: inherit;
}

a:hover {
  text-decoration: none;
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 배너 슬라이더 스타일 */
.banner-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.banner-track {
  display: flex;
  transition: transform 0.3s ease-in-out;
}

.banner-slide {
  flex-shrink: 0;
  width: 100%;
}

.banner-slide img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* 별점 스타일 */
.star-rating {
  display: flex;
  align-items: center;
  gap: 1px;
}

.star-rating svg {
  width: 16px;
  height: 16px;
}

/* 반응형 이미지 */
.aspect-ratio-16-9 {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 비율 */
}

.aspect-ratio-16-9 img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 애니메이션 */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* 모바일 네비게이션 활성화 스타일 */
.nav-active {
  color: #ea580c !important; /* orange-600 */
}

.nav-active svg {
  fill: #ea580c !important;
}

/* 로딩 스피너 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #ea580c;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 카드 호버 효과 */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

/* 플레이스홀더 이미지 스타일 */
.placeholder-image {
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
}

/* 검색 입력 스타일 */
.search-input {
  border: 2px solid #ea580c;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.1);
}

/* 태블릿 및 데스크톱 스타일 */
@media (min-width: 768px) {
  .banner-slide img {
    height: 240px;
  }
}

@media (min-width: 1024px) {
  .banner-slide img {
    height: 280px;
  }
}