/* ===== 메인페이지 전용 스타일 ===== */

/* ===== 히어로 배너 ===== */
.hero-banner {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  max-height: 560px;
  overflow: hidden;
  background: var(--surface-light);
}

.hero-banner__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.hero-banner__slide--active {
  opacity: 1;
}

.hero-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 텍스트 위치: 좌측 중앙 */
.hero-banner__content {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  padding: 0 8%;
  max-width: 600px;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.hero-banner__cta-wrap {
  pointer-events: auto;
}

/* 검정 텍스트 (기본) */
.hero-banner__slide--dark .hero-banner__sub,
.hero-banner__slide--dark .hero-banner__title,
.hero-banner__slide--dark .hero-banner__desc {
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.hero-banner__cta-wrap {
  min-height: 48px;
}

.hero-banner__slide--dark .hero-banner__cta {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border: 1px solid var(--brand-primary);
}

/* 흰색 텍스트 */
.hero-banner__slide--light .hero-banner__sub,
.hero-banner__slide--light .hero-banner__title,
.hero-banner__slide--light .hero-banner__desc {
  font-weight: var(--weight-medium);
  color: var(--text-inverse);
}

.hero-banner__cta-wrap {
  min-height: 48px;
}

.hero-banner__slide--light .hero-banner__cta {
  background: var(--surface-white);
  color: var(--text-primary);
  border: 1px solid var(--surface-white);
}

.hero-banner__sub {
  font-size: var(--text-sm);
  letter-spacing: 3px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
  font-weight: var(--weight-light);
}

.hero-banner__title {
  font-size: 36px;
  font-weight: var(--weight-bold);
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero-banner__desc {
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  margin-bottom: 24px;
  font-weight: var(--weight-medium);
  line-height: 1.6;
}

.hero-banner__cta-wrap {
  min-height: 48px;
}

.hero-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 3px;
  text-decoration: none;
  transition: all var(--ease-base);
}

.hero-banner__cta:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

/* 좌우 화살표 */
.hero-banner__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: color var(--ease-fast);
  z-index: 5;
}

.hero-banner__arrow:hover {
  color: var(--text-primary);
}

.hero-banner__arrow--prev { left: 16px; }
.hero-banner__arrow--next { right: 16px; }

/* 도트: 하단 가운데 */
.hero-banner__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-banner__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.2);
  border: none;
  cursor: pointer;
  transition: all var(--ease-fast);
}

.hero-banner__dot--active {
  background: var(--brand-primary);
  width: 28px;
}

@media (max-width: 768px) {
  .hero-banner { aspect-ratio: 4 / 3; max-height: none; min-height: 420px; }
  .hero-banner__content {
    padding: 0 6% 24px;
    max-width: 100%;
    top: auto;
    bottom: 48px;
    transform: none;
  }
  .hero-banner__title { font-size: var(--text-2xl); }
  .hero-banner__desc { font-weight: var(--weight-medium); font-size: var(--text-sm); margin-bottom: 16px; }
  .hero-banner__cta-wrap { min-height: 48px; }
  .hero-banner__cta { padding: 12px 28px; font-size: var(--text-xs); }
  .hero-banner__arrow { display: none; }
  .hero-banner__dots { bottom: 12px; }
}

/* ===== 타임세일 캐러셀 ===== */
.ts-section {
  max-width: none;
  background: var(--surface-off-white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 48px 0 56px;
}

.ts-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.ts-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.ts-section__title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

.ts-section__sub {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

.ts-section__arrows {
  display: flex;
  gap: 6px;
}

.ts-arrow {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: var(--surface-white);
  cursor: pointer;
  transition: all var(--ease-fast);
}

.ts-arrow:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
}

.ts-track-wrap {
  overflow: hidden;
}

.ts-track {
  display: flex;
  gap: 16px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ts-card {
  flex: 0 0 calc((100% - 80px) / 6);
  min-width: 140px;
  text-decoration: none;
  color: inherit;
}

.ts-card__img {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-light);
  margin-bottom: 8px;
}

.ts-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-light);
  transition: transform 0.4s ease;
}

.ts-card:hover .ts-card__img img {
  transform: scale(1.03);
}

.ts-card__timer {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand-danger);
  color: var(--text-inverse);
  font-size: 10px;
  font-family: var(--font-ui);
  font-weight: var(--weight-semibold);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.3px;
}

.ts-card__placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface-light);
}

.ts-card__info {
  padding: 0 2px;
}

.ts-card__name {
  font-size: var(--text-xs);
  color: var(--text-primary);
  line-height: 1.4;
  height: calc(var(--text-xs) * 1.4 * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.ts-card__original {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-decoration: line-through;
  display: block;
}

.ts-card__price-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.ts-card__rate {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--brand-danger);
}

.ts-card__sale {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .ts-card { flex: 0 0 calc((100% - 32px) / 3); min-width: 120px; }
  .ts-section { padding: 32px 0 40px; }
  .ts-section__inner { padding: 0 16px; }
}

@media (max-width: 480px) {
  .ts-card { flex: 0 0 calc((100% - 16px) / 2.3); min-width: 110px; }
}

/* ===== 타임세일 슬라이드 (구) ===== */
.sale-slide {
  padding: 40px 0 20px;
  overflow: hidden;
  background: var(--surface-off-white);
  border-bottom: 1px solid var(--border-light);
}

.sale-slide__header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding) 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sale-slide__title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--brand-danger);
  letter-spacing: 2px;
}

.sale-slide__more {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  transition: color var(--ease-fast);
}

.sale-slide__more:hover { color: var(--brand-danger); }

.sale-slide__track-wrap {
  overflow: hidden;
  padding-bottom: 24px;
}

.sale-slide__track {
  display: flex;
  gap: 20px;
  will-change: transform;
}

.sale-slide__card {
  flex-shrink: 0;
  width: 220px;
  transition: transform var(--ease-fast);
}

.sale-slide__card:hover { transform: translateY(-4px); }

.sale-slide__img {
  position: relative;
  width: 220px;
  height: 280px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-light);
}

.sale-slide__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-light);
}

.sale-slide__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-danger);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.sale-slide__discount {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--brand-danger);
  margin-left: auto;
}

.sale-slide__timer {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0,0,0,0.7);
  color: var(--text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
}

.sale-slide__info {
  padding: 10px 4px 0;
}

.sale-slide__name {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.sale-slide__prices {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sale-slide__original {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-decoration: line-through;
}

.sale-slide__sale {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--brand-danger);
}

@media (max-width: 768px) {
  .sale-slide { padding: 24px 0 12px; }
  .sale-slide__header { padding: 0 16px 16px; }
  .sale-slide__card { width: 160px; }
  .sale-slide__img { width: 160px; height: 200px; }
}

/* ===== 무한스크롤 로더 ===== */
.scroll-loader {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.scroll-loader__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-light);
  border-top-color: var(--brand-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== 상품 더보기 버튼 ===== */
.section__more {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.section__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 48px;
  border: 1px solid var(--border-light);
  font-size: var(--text-md);
  font-weight: var(--weight-regular);
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  transition: all var(--ease-base);
  background: var(--surface-white);
}

.section__more-btn:hover {
  border-color: var(--brand-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== 상품 카드 링크 ===== */
.product-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ===== 타임세일 할인가 ===== */
.product-card__prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card__price-original {
  font-size: var(--text-md);
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card__price-sale {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--brand-danger);
  letter-spacing: -0.3px;
}

.product-card__discount {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--brand-danger);
}

/* 타이머 뱃지 */
.product-card__timer {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text-inverse);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  z-index: 2;
  backdrop-filter: blur(4px);
}

.product-card__timer svg {
  flex-shrink: 0;
}

/* ===== 타임세일 섹션 ===== */
.time-sale {
  background: var(--surface-off-white);
  max-width: none;
  padding: 80px 0 100px;
}

.time-sale .section__header,
.time-sale .product-grid,
.time-sale .section__more {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--page-padding);
  padding-right: var(--page-padding);
}

.time-sale .section__header {
  margin-bottom: 50px;
}

.product-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== 반응형 ===== */
@media (max-width: 1024px) {
  .time-sale .section__header,
  .time-sale .product-grid,
  .time-sale .section__more {
    padding-left: 20px;
    padding-right: 20px;
  }

  .product-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .time-sale { padding: 60px 0 80px; }

  .time-sale .section__header,
  .time-sale .product-grid,
  .time-sale .section__more {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-grid--4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .product-card__timer {
    padding: 4px 8px;
    font-size: 10px;
    gap: 4px;
  }

  .product-card__timer svg { width: 12px; height: 12px; }

  .product-card__price-original { font-size: var(--text-sm); }
  .product-card__price-sale { font-size: var(--text-md); }
  .product-card__discount { font-size: var(--text-xs); }

  .section__more-btn { padding: 14px 36px; font-size: var(--text-sm); }
}

/* ===== 베스트 리뷰 섹션 ===== */
.review-section {
  padding: 80px 0 100px;
  background: var(--surface-off-white);
  border-top: 1px solid var(--border-light);
}

.review-section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.review-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-carousel__arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  background: var(--surface-white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease-fast);
  z-index: 2;
}

.review-carousel__arrow:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.review-carousel__viewport {
  flex: 1;
  overflow: hidden;
}

.review-carousel__track {
  display: flex;
  gap: 16px;
  transition: transform var(--ease-slide);
}

/* ===== 리뷰 카드 (메인) ===== */
.review-card {
  flex: 0 0 calc((100% - 64px) / 5);
  min-width: 180px;
  cursor: pointer;
}

.review-card__img-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-light);
  cursor: pointer;
}

.review-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}

.review-card__img-wrap:hover .review-card__img {
  transform: scale(1.04);
}

.review-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
}

.review-card__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text-inverse);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.review-card__content {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.review-card__stars {
  color: var(--brand-accent);
  font-size: var(--text-sm);
  letter-spacing: 1px;
}

.review-card__author {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.75);
}

/* ===== 더보기 버튼 ===== */
.review-section__more {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.review-section__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 60px;
  border: 1px solid var(--border-subtle);
  font-size: var(--text-md);
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-white);
  transition: all var(--ease-base);
}

.review-section__more-btn:hover {
  border-color: var(--brand-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 1024px) {
  .review-card { flex: 0 0 calc((100% - 48px) / 4); }
}

@media (max-width: 768px) {
  .review-section { padding: 60px 0 80px; }
  .review-section__inner { padding: 0 16px; }
  .review-card { flex: 0 0 calc((100% - 32px) / 3); min-width: 140px; }
  .review-carousel__arrow { width: 32px; height: 32px; }
}

@media (max-width: 480px) {
  .review-card { flex: 0 0 calc((100% - 16px) / 2.2); min-width: 130px; }
}
