/* ==========================================================================
   Heart to Kiss — personalized.css
   개인화 추천 섹션 + 최근 본 상품 스타일
   fromtome 미니멀 톤 / 다크 베이스
   ========================================================================== */

/* ── 공통 섹션 래퍼 ────────────────────────────────────────────────────── */
.personalized-section {
  padding: 72px 0;
}

.personalized-section__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.personalized-section__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
}

.personalized-section__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}

/* ── 추천 이유 칩 ───────────────────────────────────────────────────────── */
.personalized-reason {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
  min-height: 24px;
}

.personalized-reason__label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

.personalized-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  background: #1a1a1a;
  color: #fff;
}

.personalized-chip--tag {
  background: transparent;
  color: #1a1a1a;
  border: 1.5px solid #1a1a1a;
}

/* ── 개인화 추천 그리드 (Weekly Best 와 동일) ────────────────────────── */
.personalized-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 16px;
  margin-bottom: 32px;
}

@media (max-width: 1024px) {
  .personalized-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .personalized-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 12px;
  }
}

/* ── 최근 본 상품 — 가로 스크롤 row ────────────────────────────────────── */
.rv-section {
  padding: 64px 0;
  border-top: 1px solid #f0f0f0;
}

.rv-section__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.rv-section__header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 24px;
}

.rv-section__title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.rv-section__count {
  font-size: 12px;
  color: #aaa;
  font-weight: 400;
}

/* 가로 스크롤 컨테이너 */
.rv-scroll-wrap {
  position: relative;
  overflow: hidden; /* 페이드 mask 용 */
}

/* 우측 그라데이션 페이드 */
.rv-scroll-wrap::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(to right, transparent, #ffffff);
  pointer-events: none;
  z-index: 1;
}

.rv-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: 12px;

  /* 스크롤바 숨김 */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
}
.rv-row::-webkit-scrollbar { display: none; }

/* 카드 */
.rv-card {
  flex: 0 0 calc((100% - 5 * 16px) / 6); /* PC: 6개 */
  min-width: 140px;
  scroll-snap-align: start;
  text-decoration: none;
  color: inherit;
  display: block;
}

@media (max-width: 1024px) {
  .rv-card {
    flex: 0 0 calc((100% - 3 * 16px) / 3.5); /* 태블릿: ~3.5개 */
  }
}

@media (max-width: 640px) {
  .rv-card {
    flex: 0 0 calc((100% - 16px) / 2.5); /* 모바일: 2.5개 visible */
    min-width: 120px;
  }
}

.rv-card__media {
  aspect-ratio: 3/4;
  background: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
}

.rv-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.rv-card:hover .rv-card__img {
  transform: scale(1.03);
}

.rv-card__cat {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 4px;
}

.rv-card__name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-card__price {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

/* ── 빈 상태 CTA ───────────────────────────────────────────────────────── */
.rv-empty {
  text-align: center;
  padding: 40px 0;
  color: #aaa;
  font-size: 14px;
}

.rv-empty a {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 24px;
  border: 1.5px solid #1a1a1a;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #1a1a1a;
  text-transform: uppercase;
}

/* ── 다크모드 대비 ─────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .rv-scroll-wrap::after {
    background: linear-gradient(to right, transparent, #111111);
  }
}
