/* ── components.css ── */
/* 베스트카드, 퀵메뉴, 계산기, FAQ, 후기 등 페이지 컴포넌트 */

/* ── 베스트 요금제 카드 ── */
.best-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.best-card {
  background: var(--white);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius);
  padding: 22px 20px;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}
.best-card:hover {
  border-color: var(--purple-soft);
  box-shadow: var(--shadow-h);
  transform: translateY(-3px);
}
.best-card.top {
  border-color: var(--gold);
}

.best-rank {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.best-rank.r1 {
  background: var(--gold);
  color: var(--dark);
}
.best-rank.r2 {
  background: #c0b8d8;
  color: #fff;
}
.best-rank.r3 {
  background: #d4cde8;
  color: #888;
}

.best-cat-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--purple-soft);
  background: var(--purple-pale);
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.best-tag {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.best-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}
/* 통신사 로고 텍스트 (이미지 교체 전) */
.plogo {
  font-weight: 900;
  font-family: Arial, sans-serif;
}
.plogo.kt {
  color: #e31837;
  font-size: 20px;
}
.plogo.lg {
  color: #a50034;
  font-size: 17px;
}
.plogo.sk {
  color: #e8312a;
  font-size: 17px;
}

/* 통신사 로고 이미지 영역 (나중에 img로 교체) */
.plogo-img {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.best-name {
  font-size: 15px;
  font-weight: 700;
}
.best-ch {
  font-size: 12px;
  color: var(--text-muted);
}

.gift-box {
  background: #fff5f7;
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  margin: 14px 0;
}
.gift-label {
  font-size: 11px;
  color: #e8547a;
  font-weight: 600;
  margin-bottom: 4px;
}
.gift-amt {
  font-size: 20px;
  font-weight: 800;
  color: #d03060;
}

.best-before {
  font-size: 12px;
  color: var(--text-muted);
  text-align: right;
  margin-bottom: 2px;
}
.best-after {
  font-size: 13px;
  color: var(--text-sub);
  text-align: right;
}
.best-after strong {
  font-size: 17px;
  font-weight: 800;
  color: #e8547a;
}

/* ── 퀵메뉴 ── */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.quick-card {
  background: var(--white);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius);
  padding: 26px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.25s;
}
.quick-card:hover {
  border-color: var(--purple-soft);
  box-shadow: var(--shadow-h);
  transform: translateY(-2px);
}
.quick-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.qi-purple {
  background: var(--purple-pale);
}
.qi-gold {
  background: var(--gold-pale);
}
.quick-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 5px;
}
.quick-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.5;
}
.quick-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 20px;
  flex-shrink: 0;
}

/* ── 지원금 계산기 ── */
.calc-wrap {
  background: var(--white);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
}
.calc-head {
  background: linear-gradient(135deg, #18103a, #2d1f6e);
  padding: 24px 32px;
}
.calc-head h2 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.calc-head p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}
.calc-body {
  padding: 32px;
}
.calc-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--purple-soft);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.calc-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* 통신사 스크롤 */
.prov-scroll {
  overflow-x: auto;
  margin: 0 -32px;
  padding: 4px 32px;
  scrollbar-width: none;
}
.prov-scroll::-webkit-scrollbar {
  display: none;
}
.prov-row {
  display: flex;
  gap: 10px;
  width: max-content;
}

.prov-card {
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 13px 16px 10px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  position: relative;
  min-width: 86px;
}
.prov-card:hover {
  border-color: #c5bdee;
  background: #fff;
  transform: translateY(-2px);
}
.prov-card.selected {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  background: var(--gold-pale);
}
.prov-card.selected::after {
  content: '✓';
  position: absolute;
  top: 5px;
  right: 7px;
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
}
.prov-logo {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

/* 로고 플레이스홀더 — img 태그로 교체 가능 */
.logo-placeholder {
  width: 60px;
  height: 28px;
  background: var(--border-card);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.2s;
}
.prov-card:hover .logo-placeholder {
  background: var(--purple-pale);
}
.prov-card.selected .logo-placeholder {
  background: rgba(201, 168, 76, 0.15);
}

.prov-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

/* 요금제 */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.plan-card {
  background: var(--bg);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.plan-card:hover {
  border-color: var(--purple-soft);
  background: #fff;
  transform: translateY(-2px);
}
.plan-card.selected {
  border-color: var(--gold);
  box-shadow: var(--shadow-gold);
  background: var(--gold-pale);
}

.badge-rec {
  position: absolute;
  top: -1px;
  right: 12px;
  background: var(--purple);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 0 0 7px 7px;
}
.plan-spd {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}
.plan-spd span {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-sub);
}
.plan-nm {
  font-size: 11px;
  color: var(--text-sub);
  margin: 4px 0 1px;
}
.plan-fee {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 10px;
}
.plan-fee span {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-sub);
}
.plan-gift {
  background: rgba(201, 168, 76, 0.1);
  border: 1px solid var(--gold-border);
  border-radius: 7px;
  padding: 5px 9px;
}
.plan-gift-l {
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 1px;
}
.plan-gift-v {
  font-size: 12px;
  font-weight: 700;
  color: #8a6a00;
}

/* 결합 옵션 */
.opt-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.opt-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1.5px solid var(--border-card);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}
.opt-chip:hover {
  border-color: var(--purple-soft);
}
.opt-chip.checked {
  border-color: var(--gold);
  background: var(--gold-pale);
  color: #8a6a00;
}
.chk {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #dddaef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  transition: all 0.2s;
}
.opt-chip.checked .chk {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

/* TV */
.tv-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tv-card {
  background: var(--bg);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 13px 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.tv-card:hover {
  border-color: var(--purple-soft);
  background: #fff;
}
.tv-card.selected {
  border-color: var(--gold);
  background: var(--gold-pale);
  box-shadow: var(--shadow-gold);
}
.tv-ch {
  font-size: 18px;
  font-weight: 900;
}
.tv-ch span {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-sub);
}
.tv-gd {
  font-size: 10px;
  font-weight: 600;
  color: var(--purple-soft);
  margin: 3px 0 2px;
}
.tv-fee {
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
}

/* step 블록 */
.step-block {
  display: none;
}
.step-block.visible {
  display: block;
}

/* ── 통신사 로고 그리드 ── */
.provider-logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.plogo-card {
  background: var(--white);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.plogo-card:hover {
  border-color: var(--purple-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.plogo-img-area {
  width: 72px;
  height: 44px;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  transition: all 0.2s;
  overflow: hidden;
}
.plogo-img-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}
.plogo-card:hover .plogo-img-area {
  background: var(--purple-pale);
}
.plogo-name {
  font-size: 11px;
  color: var(--text-sub);
  font-weight: 500;
}

/* ── 꿀팁 / 후기 ── */
.knowledge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.knowledge-card {
  background: var(--white);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
}
.kc-head {
  background: var(--purple-pale);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kc-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple);
}
.kc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}
.kc-item:last-child {
  border-bottom: none;
}
.kc-item:hover {
  background: var(--bg);
}
.kc-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.4;
  flex: 1;
}
.kc-tag {
  font-size: 10px;
  font-weight: 600;
  background: var(--purple-pale);
  color: var(--purple-soft);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  margin-left: 10px;
}

/* ── 후기 카드 ── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.review-card {
  background: var(--white);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.review-card:hover {
  box-shadow: var(--shadow-h);
  transform: translateY(-2px);
}
.review-img {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  position: relative;
}
.review-img.c1 {
  background: linear-gradient(135deg, #1a2a5e, #2d1f6e);
}
.review-img.c2 {
  background: linear-gradient(135deg, #1a3a2e, #2d6e4f);
}
.review-img.c3 {
  background: linear-gradient(135deg, #3a1a1a, #6e2d2d);
}
.review-img-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.review-body {
  padding: 16px;
}
.review-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 6px;
}
.review-desc {
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.55;
}
.review-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.review-cat {
  background: var(--purple-pale);
  color: var(--purple-soft);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 999px;
}

/* ── FAQ ── */
.faq-list {
  display: flex;
  flex-direction: column;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  gap: 16px;
}
.faq-q:hover {
  color: var(--purple);
}
.faq-icon {
  font-size: 16px;
  color: var(--text-muted);
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-q.open .faq-icon {
  transform: rotate(180deg);
  color: var(--purple);
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-a.open {
  max-height: 200px;
}
.faq-a-inner {
  padding: 0 0 18px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.75;
}

/* ════════════════════════════════════
   반응형
   ════════════════════════════════════ */
@media (max-width: 1024px) {
  .best-grid {
    grid-template-columns: 1fr 1fr;
  }
  .review-grid {
    grid-template-columns: 1fr 1fr;
  }
  .provider-logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  .prov-scroll {
    margin: 0 -24px;
    padding: 4px 24px;
  }
  .calc-body {
    padding: 20px;
  }
  .calc-head {
    padding: 20px 24px;
  }
}

@media (max-width: 768px) {
  .best-grid {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .review-grid {
    grid-template-columns: 1fr 1fr;
  }
  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .tv-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .provider-logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .plan-spd {
    font-size: 18px;
  }
  .gift-amt {
    font-size: 17px;
  }
  .best-name {
    font-size: 14px;
  }

  .quick-card {
    padding: 18px 16px;
  }
  .quick-title {
    font-size: 14px;
  }
  .quick-desc {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .best-grid {
    grid-template-columns: 1fr;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .tv-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .provider-logo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  .plan-spd {
    font-size: 16px;
  }
  .faq-q {
    font-size: 13px;
  }
}
