/* ============================================
   네비바 스타일
============================================ */
.navbar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.navbar-brand {
  color: white !important;
  font-weight: 800;
  font-size: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand i {
  animation: fire-pulse 2s infinite;
}

@keyframes fire-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px rgba(255, 100, 0, 0.8));
  }
  50% {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px rgba(255, 150, 0, 1));
  }
}

/* ============================================
   핫 배너
============================================ */
.hot-banner {
  background: linear-gradient(135deg, #d53369 0%, #daae51 100%);
  padding: 50px 30px;
  border-radius: 25px;
  text-align: center;
  color: white;
  margin-top: 30px;
  margin-bottom: 30px;
  box-shadow: 0 15px 40px rgba(213, 51, 105, 0.35);
  position: relative;
  overflow: hidden;
}

.hot-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate-gradient 15s linear infinite;
}

@keyframes rotate-gradient {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hot-banner h1 {
  font-size: 2.5rem !important;
  font-weight: 900;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
  margin-bottom: 0.8rem !important;
}

.hot-banner p {
  font-size: 1.1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}

/* ============================================
   콘텐츠 소개 카드
============================================ */
.content-intro .card {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.content-intro h2 i {
  animation: cart-bounce 2s infinite;
}

@keyframes cart-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ============================================
   업데이트 정보 섹션
============================================ */
.update-info-section {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  padding: 30px;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.update-info-section h3 {
  color: #1976d2;
  font-weight: 800;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.update-info-section i {
  font-size: 3rem;
  color: #1976d2;
  animation: target-pulse 2s infinite;
}

@keyframes target-pulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 0 5px rgba(25, 118, 210, 0.5));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 15px rgba(25, 118, 210, 0.8));
  }
}

.update-time {
  font-size: 2rem;
  font-weight: 700;
  color: #0d47a1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================================
   카테고리 카드
============================================ */
.category-card {
  background: white;
  border-radius: 15px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  height: 100%;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.category-card.card-1 i {
  color: #3498db;
  animation: icon-float 3s infinite;
}

.category-card.card-2 i {
  color: #2ecc71;
  animation: icon-float 3s 0.5s infinite;
}

.category-card.card-3 i {
  color: #e74c3c;
  animation: icon-float 3s 1s infinite;
}

@keyframes icon-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.category-card i {
  font-size: 3rem;
  margin-bottom: 15px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.2));
}

.category-card h4 {
  font-weight: 700;
  margin-bottom: 10px;
  color: #2c3e50;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.category-card p {
  color: #7f8c8d;
  font-size: 0.95rem;
}

/* ============================================
   통계 카드
============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stat-card i {
  font-size: 2rem;
  margin-bottom: 10px;
}

.stat-card.fire i {
  color: #e74c3c;
}

.stat-card.folder i {
  color: #f39c12;
}

.stat-card.users i {
  color: #9b59b6;
}

.stat-card.clock i {
  color: #e91e63;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.95rem;
  color: #7f8c8d;
  font-weight: 600;
}

/* ============================================
   탭 네비게이션
============================================ */
.nav-pills .nav-link {
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
  padding: 12px 25px;
}

.nav-pills .nav-link:not(.active) {
  background: #f8f9fa;
  color: #6c757d;
}

.nav-pills .nav-link.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* ============================================
   상품 카드 - 3D 효과
============================================ */
.product-card {
  background: white !important;
  border-radius: 28px !important;
  overflow: hidden !important;
  box-shadow:
      0 10px 30px rgba(0, 0, 0, 0.08),
      0 1px 8px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  border: none !important;
  margin-bottom: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

.product-card:hover {
  transform: translateY(-16px) scale(1.02) !important;
  box-shadow:
      0 30px 60px rgba(0, 0, 0, 0.15),
      0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* 이미지 영역 */
.product-image-wrapper {
  position: relative !important;
  width: 100% !important;
  padding-top: 100% !important;
  background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%) !important;
  overflow: hidden !important;
}

.product-image {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 85% !important;
  height: 85% !important;
  object-fit: contain !important;
  transition: transform 0.5s ease !important;
}

.product-card:hover .product-image {
  transform: translate(-50%, -50%) scale(1.1) rotate(3deg) !important;
}

/* 할인 배지 - 네온 효과 */
.discount-badge {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%) !important;
  color: white !important;
  padding: 10px 16px !important;
  border-radius: 50px !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  box-shadow:
      0 0 20px rgba(245, 87, 108, 0.6),
      0 8px 16px rgba(0, 0, 0, 0.2) !important;
  animation: neon-pulse 2s ease-in-out infinite !important;
  z-index: 10 !important;
}

@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(245, 87, 108, 0.6), 0 8px 16px rgba(0, 0, 0, 0.2); }
  50% { box-shadow: 0 0 30px rgba(245, 87, 108, 0.9), 0 12px 24px rgba(0, 0, 0, 0.3); }
}

/* 순위 배지 */
.rank-badge {
  position: absolute !important;
  top: 16px !important;
  left: 16px !important;
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%) !important;
  color: #1a202c !important;
  padding: 10px 16px !important;
  border-radius: 50px !important;
  font-weight: 900 !important;
  font-size: 1rem !important;
  box-shadow: 0 8px 16px rgba(255, 215, 0, 0.4) !important;
  z-index: 10 !important;
}

/* 카드 바디 - flex로 만들어서 버튼이 항상 하단에 위치 */
.product-card .card-body {
  padding: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
}

/* 카테고리 */
.product-category {
  font-size: 0.75rem !important;
  color: #a0aec0 !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  margin-bottom: 8px !important;
}

/* 상품명 - 고정 높이로 통일 */
.product-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: #2d3748 !important;
  line-height: 1.5 !important;
  margin-bottom: 16px !important;
  min-height: 48px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

/* 가격 */
.product-price {
  font-size: 1.75rem !important;
  font-weight: 900 !important;
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  margin-bottom: 8px !important;
}

/* 원래 가격 */
.product-original-price {
  color: #cbd5e0 !important;
  text-decoration: line-through !important;
  margin-bottom: 12px !important;
}

/* 배지 */
.product-badges {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin-bottom: 16px !important;
}

.product-badges .badge {
  padding: 6px 14px !important;
  border-radius: 20px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border: 2px solid !important;
}

.badge-primary, .bg-primary {
  background: rgba(102, 126, 234, 0.1) !important;
  color: #667eea !important;
  border-color: #667eea !important;
}

.badge-success, .bg-success {
  background: rgba(79, 172, 254, 0.1) !important;
  color: #4facfe !important;
  border-color: #4facfe !important;
}

/* 평점 */
.product-rating {
  font-size: 0.9rem !important;
  color: #718096 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.product-rating i {
  color: #fbbf24 !important;
}

/* 버튼 */
.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  border: none !important;
  border-radius: 16px !important;
  padding: 14px 24px !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3) !important;
  transition: all 0.3s ease !important;
}

.btn-primary:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4) !important;
}

/* ============================================
   카테고리 섹션
============================================ */
.category-section {
  background: rgba(255, 255, 255, 0.6) !important;
  backdrop-filter: blur(10px) !important;
  border-radius: 28px !important;
  padding: 32px !important;
  margin-bottom: 40px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

.category-header {
  margin-bottom: 32px !important;
  padding-bottom: 20px !important;
  border-bottom: 3px solid #e2e8f0 !important;
}

.category-title {
  font-size: 1.75rem !important;
  font-weight: 900 !important;
  color: #2d3748 !important;
}

.category-title small {
  display: inline-block;
  white-space: nowrap;
  font-size: 0.9rem !important;
}

.category-title .badge {
  padding: 12px 24px !important;
  border-radius: 50px !important;
  font-size: 1rem !important;
  font-weight: 900 !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
}

.bg-danger {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%) !important;
}

.bg-info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* ============================================
   로딩 스피너
============================================ */
.spinner-border {
  border-width: 3px;
}

/* ============================================
   푸터
============================================ */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.footer a {
  color: #ecf0f1;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: #3498db;
  text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

/* ============================================
   모바일 대응 - 태블릿 (768px 이하)
============================================ */
@media (max-width: 768px) {
  /* 네비게이션 */
  .navbar-brand {
    font-size: 1.2rem;
  }

  /* 배너 */
  .hot-banner {
    padding: 30px 20px;
  }

  .hot-banner h1 {
    font-size: 1.8rem !important;
  }

  /* 통계 카드 */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .stat-card {
    padding: 20px 15px;
  }

  .stat-card i {
    font-size: 1.5rem;
  }

  .stat-value {
    font-size: 2rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  /* 카테고리 카드 */
  .category-card {
    padding: 20px 15px;
    margin-bottom: 15px;
  }

  .category-card i {
    font-size: 2.5rem;
  }

  .category-card h4 {
    font-size: 1rem;
  }

  .category-card p {
    font-size: 0.85rem;
  }

  /* 탭 네비게이션 */
  .nav-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-pills .nav-link {
    padding: 10px 15px;
    font-size: 0.9rem;
    margin: 5px;
  }

  .nav-pills .nav-link i {
    display: none;
  }

  /* 상품 카드 */
  .product-title {
    font-size: 0.9rem !important;
  }

  .product-price {
    font-size: 1.5rem !important;
  }
}

/* ============================================
   모바일 최적화 (576px 이하) - 리스트형 레이아웃
============================================ */
@media (max-width: 576px) {
  /* 네비게이션 */
  .navbar-brand {
    font-size: 0.95rem !important;
  }

  .navbar-brand i {
    display: none;
  }

  /* 배너 축소 */
  .hot-banner {
    padding: 20px !important;
    margin-bottom: 20px !important;
    border-radius: 20px !important;
  }

  .hot-banner h1 {
    font-size: 1.4rem !important;
  }

  .hot-banner p {
    font-size: 0.85rem !important;
  }

  /* 통계 카드 - 2개만 표시 */
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 15px 10px;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .stat-card.clock .stat-value {
    font-size: 1rem !important;
  }

  /* 탭 축소 */
  .nav-pills .nav-link {
    padding: 8px 12px;
    font-size: 0.85rem;
  }

  /* ===== 상품 카드를 리스트형으로 변경 ===== */
  .product-card {
    display: flex !important;
    flex-direction: row !important;
    border-radius: 16px !important;
    margin-bottom: 12px !important;
    height: auto !important;
    min-height: 140px !important;
  }

  .product-card:hover {
    transform: translateY(-4px) scale(1.01) !important;
  }

  /* 이미지를 크게 좌측 배치 */
  .product-image-wrapper {
    width: 140px !important;
    min-width: 140px !important;
    height: 140px !important;
    padding-top: 0 !important;
    flex-shrink: 0;
    border-radius: 16px 0 0 16px !important;
    background: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .product-image {
    position: static !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    padding: 0 !important;
    transform: none !important;
  }

  .product-card:hover .product-image {
    transform: scale(1.08) !important;
  }

  /* 할인 배지 축소 */
  .discount-badge {
    top: 8px !important;
    right: 8px !important;
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    border-radius: 20px !important;
  }

  .rank-badge {
    top: 8px !important;
    left: 8px !important;
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    border-radius: 20px !important;
  }

  /* 상품 정보를 우측에 배치 */
  .product-card .card-body {
    flex: 1;
    padding: 10px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
  }

  /* 카테고리 */
  .product-category {
    font-size: 9px !important;
    margin-bottom: 4px !important;
  }

  /* 상품명 - 1줄로 고정 */
  .product-title {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-bottom: 6px !important;
    min-height: 17px !important;
    max-height: 17px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* 가격 */
  .product-price {
    font-size: 16px !important;
    margin-bottom: 4px !important;
  }

  .product-original-price {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  /* 배지들 */
  .product-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 6px;
  }

  .product-badges .badge {
    font-size: 8px !important;
    padding: 3px 6px !important;
    border-radius: 10px !important;
  }

  /* 평점 */
  .product-rating {
    font-size: 10px !important;
    margin-top: 4px !important;
  }

  /* 버튼 */
  .btn-primary {
    padding: 8px 12px !important;
    font-size: 12px !important;
    border-radius: 10px !important;
  }

  /* 카테고리 섹션 */
  .category-section {
    padding: 16px !important;
    border-radius: 20px !important;
    margin-bottom: 20px !important;
  }

  .category-header {
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
  }

  .category-title {
    font-size: 1.1rem !important;
  }

  .category-title small {
    font-size: 0.75rem !important;
    display: block !important;
    margin-top: 4px !important;
  }

  .category-title .badge {
    font-size: 0.8rem !important;
    padding: 6px 12px !important;
  }

  /* 컨테이너 여백 축소 */
  .container {
    padding-left: 8px;
    padding-right: 8px;
  }

  /* Footer */
  footer {
    font-size: 11px !important;
    padding: 20px 0 !important;
  }

  /* 로딩 스피너 */
  .spinner-border {
    width: 40px !important;
    height: 40px !important;
  }
}

/* ============================================
   모바일 최적화 (480px 이하)
============================================ */
@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 15px 10px;
  }

  .stat-value {
    font-size: 1.8rem;
  }

  .stat-card.clock .stat-value {
    font-size: 1rem !important;
  }

  .nav-pills .nav-link {
    padding: 8px 12px;
    font-size: 0.85rem;
  }
}

/* ============================================
   작은 모바일 (375px ~ 576px)
============================================ */
@media (min-width: 375px) and (max-width: 576px) {
  .product-image-wrapper {
    width: 140px !important;
    min-width: 140px !important;
    height: 140px !important;
  }
}

/* ============================================
   아주 작은 화면 (360px 이하)
============================================ */
@media (max-width: 360px) {
  .product-card {
    min-height: 130px !important;
  }

  .product-image-wrapper {
    width: 130px !important;
    min-width: 130px !important;
    height: 130px !important;
  }

  .product-title {
    font-size: 12px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    -webkit-line-clamp: 1 !important;
  }

  .product-price {
    font-size: 14px !important;
  }
}

/* ============================================
   태블릿 (577px ~ 768px)
============================================ */
@media (min-width: 577px) and (max-width: 768px) {
  .product-card {
    display: flex !important;
    flex-direction: column !important;
  }

  .product-image-wrapper {
    width: 100% !important;
    padding-top: 100% !important;
    height: auto !important;
    border-radius: 28px 28px 0 0 !important;
  }
}