/* CSS Variables - Design System (Figma M_1.1_메인(최종) 기준) */
:root {
  /* Primary Colors - 인디고 블루 */
  --primary-blue: #3F51B5;
  --primary-blue-light: #7986CB;
  --primary-dark-blue: #303F9F;
  
  /* Background Colors */
  --bg-white: #FFFFFF;
  --bg-light-gray: #F5F5F5;
  --bg-gray: #EEEEEE;
  --bg-light-blue: #e8f4fd;
  --bg-body: #F8F9FA;
  
  /* Text Colors - Figma 디자인 기준 */
  --text-primary: #171717;
  --text-secondary: #333333;
  --text-muted: #6A6A6A;
  --text-gray: #737373;
  --text-light-gray: #404040;
  --text-white: #FFFFFF;
  
  /* Gradient Colors */
  --gradient-points-start: #3F51B5;
  --gradient-points-end: #7986CB;
  --gradient-badge-start: #3F51B5;
  --gradient-badge-end: #7986CB;
  
  /* Border Colors */
  --border-light: #E5E5E5;
  --border-divider: #EEEEEE;
  
  /* Font Family */
  --font-primary: 'Noto Sans KR', 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Font Sizes */
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 20px;
  --font-size-xl: 22px;
  --font-size-2xl: 32px;
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  /* Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.5;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 20px;
  --spacing-xl: 24px;
  
  /* Border Radius - Figma 디자인 기준 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 100px;
  --radius-full: 50%;
  
  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-badge: 0 4px 12px rgba(63, 81, 181, 0.3);
  --shadow-container: 0 0 30px rgba(0, 0, 0, 0.15);
}

/* Reset and base styles */
body {
  font-family: var(--font-primary);
  background-color: var(--bg-body);
  line-height: var(--line-height-normal);
  margin: 0;
  padding: 0;
}

/* Mobile-First 컨테이너 */
.home-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  background-color: var(--bg-white);
  min-height: 100vh;
  position: relative;
}

/* GNB (56px) - Figma 디자인 */
.gnb {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: var(--bg-white);
}

.gnb-logo {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.32px;
}

.gnb-menu-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 상단 배너 (16:9 비율 유지) - Figma 디자인 */
.top-banner {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
}

.top-banner .banner-slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.top-banner .banner-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.top-banner .banner-slide {
  width: 100%;
  flex: 0 0 100%;
  height: 100%;
  position: relative;
}

.top-banner .banner-slide img.banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.top-banner .banner-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.top-banner .banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 105px;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0) 0%, rgba(17, 17, 17, 0.4) 100%);
}

.top-banner .banner-content {
  position: absolute;
  bottom: 38px;
  left: 16px;
  z-index: 2;
}

.top-banner .banner-text {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.44px;
  line-height: 33px;
  margin: 0;
}

.banner-indicator {
  position: absolute;
  bottom: 32px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(17, 17, 17, 0.6);
  border-radius: var(--radius-pill);
  height: 32px;
  padding-left: 12px;
  z-index: 3;
}

.indicator-text {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-white);
  letter-spacing: -0.24px;
}

.indicator-play {
  width: 32px;
  height: 32px;
  background: rgba(17, 17, 17, 0.6);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 적립금 카드 (151px) - Figma 디자인 */
.points-card-section {
  padding: 16px;
}

.points-card {
  position: relative;
  height: 119px;
  border-radius: var(--radius-xs);
  background: url('/images/points-card-bg.svg') no-repeat center center;
  background-size: cover;
  overflow: hidden;
  padding: 16px;
  display: flex;
  align-items: center;
}

.points-card-bg {
  display: none;
}

.points-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.points-label {
  font-family: 'Noto Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.32px;
  line-height: 1.2;
  margin: 0;
}

.points-amount {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: var(--text-white);
  letter-spacing: -0.64px;
  line-height: 1.2;
  margin: 0;
}

.rocket-link {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-white);
  letter-spacing: -0.28px;
  line-height: 1.2;
  text-decoration: none;
  margin-top: 4px;
}

.rocket-link svg {
  width: 20px;
  height: 20px;
}

/* 구분선 (8px) */
.divider {
  height: 8px;
  background-color: var(--bg-gray);
  width: 100%;
}

/* 카테고리 바로가기 (127px) - Figma 디자인 */
.category-shortcuts {
  height: 127px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px;
  background-color: var(--bg-white);
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.category-icon {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  background-color: var(--bg-light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.category-icon img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.category-name {
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.28px;
  line-height: 21px;
}

/* 근조 세부 카테고리 탭 - Figma 디자인 */
.funeral-divider {
  height: 8px;
  background-color: var(--bg-gray);
  width: 100%;
  display: none;
}

.funeral-divider.show {
  display: block;
}

.funeral-subcategory-tabs {
  height: 61px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background-color: var(--bg-white);
  overflow-x: auto;
}

.funeral-subcategory-tabs.show {
  display: flex;
}

.funeral-subcategory-tabs::-webkit-scrollbar {
  display: none;
}

.subcategory-tab {
  height: 37px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.subcategory-tab.active {
  background-color: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--text-white);
  font-weight: 700;
}

/* 상품 캐러셀 섹션 (490px) - Figma 디자인 */
.product-carousel-section {
  padding: 0 0 40px;
  background-color: var(--bg-white);
  overflow: hidden; /* 카드가 밖으로 나가지 않도록 */
}

.product-carousel {
  display: flex;
  gap: 16px;
  padding: 0;
  /* JS에서 transform으로 이동, overflow는 visible로 설정됨 */
  touch-action: pan-y; /* 세로 스크롤은 허용, 가로는 JS가 처리 */
  user-select: none;
  -webkit-user-select: none;
}

.product-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-spacer-left,
.carousel-spacer-right {
  flex-shrink: 0;
  width: calc((100% - 280px) / 2);
  min-width: 20px;
  pointer-events: none;
}

.product-card {
  flex-shrink: 0;
  width: 280px;
  background-color: var(--bg-white);
  border-radius: var(--radius-xs);
  overflow: hidden;
  scroll-snap-align: center;
}

.product-image-wrapper {
  display: block;
  position: relative;
  width: 280px;
  height: 280px;
  background-color: var(--bg-light-gray);
  border-radius: var(--radius-xs);
  overflow: hidden;
  text-decoration: none;
}

.product-image-wrapper .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reward-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  height: 57px;
  background: linear-gradient(180deg, #3F51B5 0%, #7986CB 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 12px 0 8px;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3);
}

.reward-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  background-color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reward-icon-text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #3F51B5;
  letter-spacing: -0.42px;
  line-height: 1;
  margin-top: -2px;
}

.reward-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.reward-label {
  font-family: 'Noto Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-white);
  letter-spacing: -0.19px;
  line-height: 15px;
  white-space: nowrap;
}

.reward-amount {
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.38px;
  line-height: 26px;
}

.product-card .purchase-btn {
  display: block;
  width: 100%;
  height: 52px;
  background-color: var(--primary-blue);
  color: var(--text-white);
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.32px;
  line-height: 52px;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  border-radius: 0 0 4px 4px;
}

.product-card .purchase-btn:hover {
  background-color: var(--primary-dark-blue);
}

.product-card .product-info {
  padding: 8px 0;
}

.product-name {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.32px;
  line-height: 24px;
  margin: 0 0 4px 0;
}

.delivery-badge {
  font-weight: 700;
  color: #3F51B5;
  font-size: 16px;
}

.product-desc {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.28px;
  line-height: 21px;
  margin: 0;
}

/* 베스트 후기 섹션 (423px) - Figma 디자인 */
.best-reviews-section {
  padding: 0 16px 20px;
  background-color: var(--bg-white);
}

.best-reviews-section .section-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 30px;
  margin: 0 0 12px 0;
}

.reviews-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  cursor: grab;
  user-select: none;
}

.reviews-carousel::-webkit-scrollbar {
  display: none;
}

.reviews-carousel:active {
  cursor: grabbing;
}

.review-card {
  flex-shrink: 0;
  width: 242px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  display: block;
}

.review-card:hover {
  text-decoration: none;
}

.review-image-wrapper {
  width: 242px;
  height: 242px;
  background-color: var(--bg-light-gray);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-bottom: 8px;
}

.review-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-content {
  background-color: var(--bg-light-gray);
  border-radius: var(--radius-xs);
  padding: 12px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.review-stars {
  display: flex;
  gap: 0;
}

.review-author {
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: -0.28px;
}

.review-text {
  font-family: 'Noto Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-gray);
  letter-spacing: -0.28px;
  line-height: 21px;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 로켓발사 구경하기 섹션 (381px) - Figma 디자인 */
.rocket-viewing-section {
  padding: 20px 16px;
  background-color: var(--bg-white);
}

.rocket-viewing-section .section-title {
  font-family: 'Noto Sans', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.4px;
  line-height: 30px;
  margin: 0 0 12px 0;
}

.rocket-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  cursor: grab;
  user-select: none;
}

.rocket-carousel::-webkit-scrollbar {
  display: none;
}

.rocket-carousel:active {
  cursor: grabbing;
}

.rocket-card {
  flex-shrink: 0;
  width: 242px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
}

.rocket-card:hover {
  text-decoration: none;
}

.rocket-image-wrapper {
  width: 242px;
  height: 242px;
  background-color: var(--bg-light-gray);
  border-radius: var(--radius-xs);
  overflow: hidden;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rocket-image-wrapper .rocket-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.rocket-card .rocket-info {
  padding: 0;
}

.rocket-title {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.32px;
  line-height: 24px;
  margin: 0 0 4px 0;
}

.rocket-desc {
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: -0.28px;
  line-height: 21px;
  margin: 0;
}

/* 푸터 (224px) - Figma 디자인 */
.footer {
  padding: 40px 16px 60px;
  background-color: var(--bg-white);
}

.footer-content p {
  font-family: 'Noto Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light-gray);
  letter-spacing: -0.24px;
  line-height: 24px;
  margin: 0;
}

/* 반응형 디자인 */
@media (max-width: 360px) {
  .banner-title {
    font-size: 16px;
    line-height: 22px;
  }
  
  .banner-subtitle {
    font-size: 10px;
    line-height: 14px;
  }
  
  .banner-icon {
    width: 80px;
    height: 80px;
  }
  
  .icon-image {
    width: 68px;
    height: 68px;
  }
  
  .tab-item {
    font-size: 18px; /* 최소 크기 유지 */
    padding: 8px 2px;
  }
  

}

@media (max-width: 480px) {
  .home-container {
    max-width: 100%;
  }
  
  .banner-content {
    flex-direction: row;
    text-align: left;
    gap: clamp(10px, 3vw, 20px);
  }
  
  .banner-text {
    flex: 1;
  }
  
  .banner-icon {
    flex-shrink: 0;
  }
  
  .product-slider {
    justify-content: flex-start;
    padding: 0 clamp(8px, 2vw, 12px);
  }
  
  .rocket-products {
    justify-content: flex-start;
    padding: 0 clamp(8px, 2vw, 12px);
  }
}

/* PC/태블릿 - Mobile-First 원칙에 따라 360px 중앙 정렬 */
@media (min-width: 481px) {
  .home-container {
    max-width: 360px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
  }
}






