/* ==========================================================================
   theme.css - 동적 상세 페이지 스타일
   ========================================================================== */
:root {
  --font-primary: 'Noto Sans KR', sans-serif;
  --font-english: 'Outfit', sans-serif;
  --bg-main: #F4F6F9;
  --bg-header: #FFFFFF;
  --bg-card: #FFFFFF;
  --text-main: #2C3E50;
  --text-muted: #7F8C8D;
  --border-light: #E2E8F0;
  --accent-color: #0073E6;
  --accent-gradient: linear-gradient(135deg, #0073E6 0%, #1E90FF 100%);
  --color-gold: #FFB300;
  --color-silver: #A0AEC0;
  --color-bronze: #CD7F32;
  --color-good: #2ECC71;
  --color-normal: #F39C12;
  --color-bad: #E74C3C;
  --container-width: 1000px;
  --border-radius: 12px;
  --transition-speed: 0.25s;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

.container {
  width: 92%;
  max-width: var(--container-width);
  margin: 0 auto;
}

/* ==========================================================================
   Header
   ========================================================================== */
.main-header {
  background-color: var(--bg-header);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.8rem 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  font-family: var(--font-english);
  font-weight: 800;
  font-size: 1.4rem;
  color: #111;
  text-decoration: none;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-accent { color: var(--accent-color); }
.logo-pang { color: #E74C3C; }


.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-link {
  color: var(--accent-color);
  text-decoration: none;
  transition: opacity var(--transition-speed);
}

.breadcrumb-link:hover { opacity: 0.7; }
.breadcrumb-sep { color: var(--text-muted); }
.breadcrumb-current { color: var(--text-muted); font-weight: 500; }

.admin-link-btn {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-speed);
}

.admin-link-btn:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

/* ==========================================================================
   Theme Page Header
   ========================================================================== */
.theme-main {
  padding: 1.5rem 0 3rem;
}

.theme-page-header {
  text-align: center;
  padding: 1.5rem 1rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #FFFFFF 0%, #EBF8FF 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
}

.theme-page-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #1A202C;
  margin-bottom: 0.4rem;
}

.theme-page-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================================
   TOP3 섹션 라벨 & 추가 추천 섹션 헤더
   ========================================================================== */
.top3-section {
  margin-bottom: 2rem;
}

.top3-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-gold);
  background-color: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 6px;
  padding: 0.35rem 0.8rem;
  margin-bottom: 1rem;
}

.extra-section {
  margin-top: 1rem;
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
}

.extra-section-header {
  margin-bottom: 1.2rem;
}

.extra-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2D3748;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.extra-section-title i { color: var(--accent-color); }

.extra-section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   ★ 카드 그리드 (3열 배치)
   ========================================================================== */
.theme-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   ★ 상품 카드 스타일 (메인 슬라이더와 동일한 배치 구조)
   ========================================================================== */
.theme-product-card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--text-main);
  transition: transform var(--transition-speed) ease,
              box-shadow var(--transition-speed) ease,
              border-color var(--transition-speed) ease;
}

.theme-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.theme-card-link:hover {
  text-decoration: none;
}

.theme-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-color);
}

/* 카드 테두리 색상 랭킹별 차별화 (바깥 라인 강조) */
.theme-product-card.rank-1 { border: 3px solid var(--color-gold) !important; }
.theme-product-card.rank-2 { border: 3px solid var(--color-silver) !important; }
.theme-product-card.rank-3 { border: 3px solid var(--color-bronze) !important; }
.theme-product-card.rank-other { border: 1px solid var(--border-light); }


/* 랭킹 번호 상단 (색상 없음, 일반 텍스트) */
.theme-card-rank {
  font-size: 1.3rem;
  font-weight: 800;
  padding: 0.45rem 0.8rem 0.25rem;
  line-height: 1;
  color: #2D3748;
}

/* 카드 상단: 이미지(좌) + 메타(우) 가로 분할 */
.theme-card-top {
  display: flex;
  border-bottom: 1px solid var(--border-light);
  height: 130px;
}

.theme-card-img-frame {
  width: 50%;
  height: 100%;
  overflow: hidden;
  background-color: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-light);
  flex-shrink: 0;
}

.theme-card-img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
  transition: transform 0.4s ease;
}

.theme-product-card:hover .theme-card-img-frame img {
  transform: scale(1.05);
}

.theme-card-meta {
  width: 50%;
  padding: 0.6rem 0.7rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}

.theme-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2D3748;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.theme-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: #E74C3C;
  line-height: 1.2;
}

.theme-card-price span {
  font-size: 0.75rem;
  font-weight: 500;
}

.theme-price-signal {
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-top: 0.15rem;
}

.theme-price-signal.good { color: var(--color-good); }
.theme-price-signal.normal { color: var(--color-normal); }
.theme-price-signal.bad { color: var(--color-bad); }

/* 카드 하단: 장단점 (아코디언 확장 스타일) */
.theme-card-bottom {
  padding: 0.5rem 0.7rem 0.6rem;
  flex-grow: 1;
  max-height: 96px; /* 기본 요약 높이 */
  overflow: hidden;
  position: relative;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 아래에 글씨가 더 숨겨져 있음을 보여주는 스무스 그라데이션 */
.theme-card-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 28px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.95) 100%);
  pointer-events: none;
  transition: opacity 0.25s ease;
  opacity: 1;
}

/* expanded 클래스가 붙었을 때 높이 팽창 (모바일 및 공통 적용) */
.theme-product-card.expanded .theme-card-bottom {
  max-height: 380px; /* 장단점 전체를 보여줄 최대치 */
}
.theme-product-card.expanded .theme-card-bottom::after {
  opacity: 0;
}

/* 마우스 호버가 지원되는 PC 기기에서만 호버 시 펼쳐지도록 지원 */
@media (hover: hover) {
  .theme-product-card:hover .theme-card-bottom {
    max-height: 380px;
  }
  .theme-product-card:hover .theme-card-bottom::after {
    opacity: 0;
  }
}

.theme-pros-cons {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.theme-review-label {
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.theme-review-label.pros { color: var(--color-good); }
.theme-review-label.cons { color: var(--color-bad); }

.theme-review-list {
  list-style: none;
  font-size: 0.72rem;
  color: #4A5568;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}

.theme-review-list li {
  position: relative;
  padding-left: 0.65rem;
  margin-bottom: 0.15rem;
}

.theme-review-list.pros li::before {
  content: "•";
  color: var(--color-good);
  position: absolute;
  left: 0;
}

.theme-review-list.cons li::before {
  content: "•";
  color: var(--color-bad);
  position: absolute;
  left: 0;
}

/* ==========================================================================
   더 보기 / 접기 토글 버튼
   ========================================================================== */
.expand-toggle-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.3rem 0;
  background: none;
  border: none;
  border-top: 1px dashed var(--border-light);
  color: var(--accent-color);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-primary);
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.01em;
  transition: opacity 0.2s ease;
}

.expand-toggle-btn:hover {
  opacity: 0.7;
}

/* PC 호버 시에는 버튼 숨김 (호버로 자동 펼쳐지므로 불필요) */
@media (hover: hover) {
  .theme-product-card:hover .expand-toggle-btn {
    display: none;
  }
}

/* ★ 카드가 펼쳐진 상태(expanded)일 때는 호버 상태(가상 터치 등)와 무관하게 버튼(접기 🔼)이 항상 보여야 함 */
.theme-product-card.expanded .expand-toggle-btn,
.theme-product-card.expanded:hover .expand-toggle-btn {
  display: block !important;
}

/* 데이터 없음 피드백 */
.extra-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  background-color: #F8FAFC;
  border-radius: 8px;
  border: 1px dashed var(--border-light);
  grid-column: 1 / -1;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.main-footer {
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-light);
  padding: 1.8rem 0;
  text-align: center;
  margin-top: 3rem;
}

.back-to-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  transition: all var(--transition-speed);
}

.back-to-home-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
}

.disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 0.6rem auto;
  line-height: 1.6;
}

.copyright {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .theme-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .theme-cards-grid {
    grid-template-columns: 1fr;
  }
  
  .theme-page-title { font-size: 1.4rem; }
  .theme-page-desc { font-size: 0.82rem; }

  .theme-card-top {
    height: 120px;
  }
}

/* ==========================================================================
   주제별 큐레이션 - 4위 이하 흐림(Blur) 처리 카드
   ========================================================================== */

/* 블러 카드 래퍼: 상대 위치를 잡아 오버레이를 얹음 */
.blurred-extra-wrapper {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.blurred-extra-wrapper:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
}

/* 카드 내용 전체를 흐리게 */
.blurred-extra-wrapper .blurred-card-content {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

/* 반투명 오버레이 */
.blurred-extra-wrapper .blur-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 10;
  backdrop-filter: blur(1px);
}

/* 클릭 유도 아이콘 */
.blur-overlay .blur-icon {
  font-size: 2rem;
  animation: bounce-icon 1.6s ease-in-out infinite;
}

/* 클릭 유도 텍스트 */
.blur-overlay .blur-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.85);
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  letter-spacing: -0.01em;
}

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

/* ==========================================================================
   파트너스 안내 배너 (상세페이지용 추가)
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #EBF8FF 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius);
  padding: 1rem 1.5rem;
  margin: 1rem 0 2rem 0;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.hero-banner p.partner-notice {
  font-size: 0.98rem;
  color: #0073E6; /* 쿠팡 파란색 강조 */
  font-weight: 700;
  line-height: 1.4;
}

