/*
 * listing-tiers.css
 * 구독권 티어별 카드 스타일 + 그리드 시스템
 * 프리미엄=2칸 / 스페셜=3칸 / 일반=4칸
 */

/* ══════════════════════════════════════════
   티어 그리드 (공통)
══════════════════════════════════════════ */
.tier-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.tier-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.tier-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ══════════════════════════════════════════
   섹션 헤더
══════════════════════════════════════════ */
.tier-section {
  margin-bottom: 40px;
}
.tier-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.tier-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}
.tier-section-title .tier-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.tier-section-title.is-premium .tier-icon { background: linear-gradient(135deg,#FFD700,#FFA500); }
.tier-section-title.is-special  .tier-icon { background: linear-gradient(135deg,#7C3AED,#A855F7); }
.tier-section-title.is-general  .tier-icon { background: #EFF6FF; }
.tier-section-desc {
  font-size: 13px;
  color: #888;
  margin-top: 3px;
}
/* ── 더보기 버튼 (플랫폼 통일 — 생활정보 기준) ── */
.tier-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 28px;
  background: #06B6D4;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  font-family: inherit;
  white-space: nowrap;
}
.tier-more-btn:hover { background: #0891B2; box-shadow: 0 2px 8px rgba(6,182,212,.25); }
a.tier-more-btn { text-decoration: none; }

/* ══════════════════════════════════════════
   기본 카드 (공통 베이스)
══════════════════════════════════════════ */
.tc {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid #E8E8E8;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s, border-color .2s;
  text-decoration: none;
  display: block;
  color: inherit;
  position: relative;
}
.tc:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* ── 이미지 영역 ── */
.tc__img-wrap {
  position: relative;
  overflow: hidden;
}
.tc__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
  display: block;
}
.tc:hover .tc__img-wrap img { transform: scale(1.05); }
.tc__no-img {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f8fafc;
  color: #94a3b8;
  font-size:13px;
  font-weight: 500;
}

/* ── 티어 리본 (이미지 좌상단) ── */
.tc__ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}
.tc__ribbon-badge {
  padding: 3px 9px;
  border-radius: 20px;
  font-size:13px;
  font-weight: 700;
  letter-spacing: .3px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.tc__ribbon-badge.is-premium {
  background: linear-gradient(135deg,#FFD700,#FFA500);
  color: #fff;
  box-shadow: 0 2px 8px rgba(255,165,0,.4);
}
.tc__ribbon-badge.is-special {
  background: linear-gradient(135deg,#7C3AED,#A855F7);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.35);
}
.tc__ribbon-badge.is-general-paid {
  background: #10B981;
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.35);
}

/* ── 컨텐츠 ── */
.tc__body {
  padding: 14px 14px 12px;
}
.tc__cats {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 7px;
  flex-wrap: wrap;
}
.tc__cat {
  padding: 2px 8px;
  border-radius: 4px;
  font-size:13px;
  font-weight: 600;
}
.tc__cat.매매  { background:#EEF2FF; color:#0027A6; }
.tc__cat.전세  { background:#ECFDF5; color:#059669; }
.tc__cat.월세  { background:#FFF7ED; color:#EA580C; }
.tc__cat.매물  { background:#F1F5F9; color:#475569; }
.tc__cat.정규직 { background:#F0FDF4; color:#16A34A; }
.tc__cat.계약직 { background:#FFFBEB; color:#B45309; }
.tc__cat.알바  { background:#FFF1F2; color:#BE123C; }
.tc__cat-default { background:#F1F5F9; color:#475569; }

.tc__title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}
/* ── 거래유형 배지 (부동산) ── */
.tc__deal {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size:13px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.tc__deal--매매 { background: #FFF7ED; color: #C2410C; border: 1px solid #FDBA74; }
.tc__deal--전세 { background: #F0FDF4; color: #15803D; border: 1px solid #86EFAC; }
.tc__deal--월세 { background: #EFF6FF; color: #1D4ED8; border: 1px solid #93C5FD; }
.tc__deal--년세 { background: #F5F3FF; color: #6D28D9; border: 1px solid #C4B5FD; }
.tc__deal--임대 { background: #F9FAFB; color: #374151; border: 1px solid #D1D5DB; }

/* ── 특징/옵션 (부동산) ── */
.tc__feat {
  font-size:13px;
  color: #6B7280;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── 가격 래퍼 (부동산: 보증금/월세 분리 표시) ── */
.tc__price-wrap {
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-wrap: wrap;
  margin-bottom: 7px;
  line-height: 1.3;
}
.tc__pl { /* 레이블: 보증금, 월세, 전세, 매매 */
  font-size:13px;
  color: #6B7280;
  margin-right: 1px;
}
.tc__pv { /* 가격 값 */
  font-size: 15px;
  font-weight: 800;
  color: #0027A6;
}
.tc__pv--main  { color: #1D4ED8; }  /* 월세 금액 */
.tc__pv--jeonse { color: #15803D; } /* 전세 금액 */
.tc__pv--sale  { color: #C2410C; }  /* 매매 금액 */
.tc__sep { font-size:13px; color: #9CA3AF; margin: 0 2px; }

/* ── 기존 .tc__price (비부동산 페이지 호환) ── */
.tc__price {
  font-size: 16px;
  font-weight: 800;
  color: #0027A6;
  margin-bottom: 8px;
  line-height: 1.2;
}
.tc__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size:13px;
  color: #888;
  margin-top: 4px;
  flex-wrap: wrap;
}
.tc__meta svg { flex-shrink: 0; }
.tc__meta-dot { color: #D1D5DB; font-size:13px; }
.tc__desc {
  font-size:13px;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* ══════════════════════════════════════════
   프리미엄 카드 (2칸 - 크고 화려)
══════════════════════════════════════════ */
.tc.is-premium {
  border: 2.5px solid transparent;
  background-clip: padding-box;
  outline: 2.5px solid #FFB800;
  outline-offset: -2.5px;
  box-shadow: 0 4px 20px rgba(255,165,0,.18);
}
.tc.is-premium:hover {
  outline-color: #FF8C00;
  box-shadow: 0 10px 36px rgba(255,140,0,.28);
}
.tc.is-premium .tc__img-wrap { height: 210px; }
.tc.is-premium .tc__title { font-size: 16px; }
.tc.is-premium .tc__price { font-size: 18px; }

/* ══════════════════════════════════════════
   스페셜 카드 (3칸)
══════════════════════════════════════════ */
.tc.is-special {
  outline: 2px solid #9333EA;
  outline-offset: -2px;
  box-shadow: 0 3px 14px rgba(147,51,234,.13);
}
.tc.is-special:hover {
  outline-color: #7C3AED;
  box-shadow: 0 8px 28px rgba(124,58,237,.22);
}
.tc.is-special .tc__img-wrap { height: 180px; }

/* ══════════════════════════════════════════
   일반 카드 (4칸 — 구매권 유무 통합, 배지 없음)
══════════════════════════════════════════ */
.tc.is-general {
  outline: 1px solid #E8E8E8;
  outline-offset: -1px;
}
.tc.is-general:hover {
  outline-color: #CBD5E1;
  box-shadow: 0 4px 14px rgba(0,0,0,.07);
}
.tc.is-general .tc__img-wrap { height: 152px; }

/* ══════════════════════════════════════════
   통합 리스트(tier-grid-4) 내 카드 크기 통일
   프리미엄·스페셜도 4열 그리드에서는 일반 카드와 동일한 높이로
══════════════════════════════════════════ */
.tier-grid-4 .tc.is-premium .tc__img-wrap,
.tier-grid-4 .tc.is-special .tc__img-wrap { height: 152px; }
.tier-grid-4 .tc.is-premium .tc__title { font-size: 14px; }
.tier-grid-4 .tc.is-premium .tc__price  { font-size: 16px; }

/* ══════════════════════════════════════════
   빈 상태
══════════════════════════════════════════ */
.tier-empty {
  padding: 48px 20px;
  text-align: center;
  color: #94a3b8;
  grid-column: 1 / -1;
}
.tier-empty svg { opacity: .3; display: block; margin: 0 auto 10px; }

/* ══════════════════════════════════════════
   Responsive
══════════════════════════════════════════ */
@media (max-width: 1200px) {
  .tier-grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .tier-grid-2 { grid-template-columns: repeat(2, 1fr); }
  .tier-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tier-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .tier-grid-2,
  .tier-grid-3,
  .tier-grid-4 { grid-template-columns: 1fr; }
  .tier-section-title { font-size: 17px; }
}
