﻿/* ═════════════════════════════════════
   skin.preference.css
   통신사 선택 모달 + 최근 본 상품 + 개인화
   ═════════════════════════════════════ */

/* ── 통신사 선택 모달 (전체화면 스타일) ── */
.pref-modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  z-index:9999;
  background:rgba(0,0,0,0.4);
  align-items:center;
  justify-content:center;
}
.pref-modal-overlay.is-open{
  display:flex;
}

.pref-modal-fullscreen{
  background:#fff;
  width:440px;
  max-width:100%;
  max-height:100vh;
  display:flex;
  flex-direction:column;
  border-radius:20px;
  box-shadow:0 20px 60px rgba(0,0,0,0.15);
  animation:prefSlideUp .3s cubic-bezier(.4,0,.2,1);
  overflow:hidden;
}
@keyframes prefSlideUp{
  from{ opacity:0; transform:translateY(20px); }
  to{ opacity:1; transform:translateY(0); }
}

/* header */
.pref-modal-head{
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  padding:16px 20px;
  border-bottom:1px solid #f0f0f0;
}
.pref-modal-head-title{
  font-size:16px;
  font-weight:700;
  color:#111827;
}
.pref-modal-close{
  position:absolute;
  right:16px;
  top:50%;
  transform:translateY(-50%);
  background:none;
  border:none;
  font-size:24px;
  color:#9ca3af;
  cursor:pointer;
  width:36px;
  height:36px;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.pref-modal-close:hover{ color:#111827; }

/* body */
.pref-modal-body{
  flex:1 1 auto;
  padding:32px 28px 20px;
  overflow-y:auto;
}
.pref-modal-title{
  font-size:22px;
  font-weight:900;
  color:#111827;
  letter-spacing:-0.5px;
  line-height:1.4;
  margin:0 0 12px;
}
.pref-modal-desc{
  font-size:13px;
  color:#9ca3af;
  line-height:1.6;
  margin:0 0 28px;
}

/* radio list */
.pref-tc-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.pref-tc-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:16px 20px;
  border:1.5px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:all .15s;
}
.pref-tc-item:hover{
  border-color:#93b4f5;
  background:#fafbff;
}
.pref-tc-item.sel{
  border-color:#2563eb;
  background:#f0f5ff;
}
.pref-tc-name{
  font-size:16px;
  font-weight:700;
  color:#111827;
}
.pref-tc-check{
  font-size:22px;
  color:#d1d5db;
  transition:color .15s;
}
.pref-tc-item.sel .pref-tc-check{
  color:#2563eb;
}

/* footer - 항상 하단에 고정 */
.pref-modal-foot{
  padding:16px 28px 28px;
  flex-shrink:0;
  background:#fff;
  z-index:2;
  box-shadow:0 -4px 12px rgba(0,0,0,0.05);
}
.pref-btn-next{
  display:block;
  width:100%;
  padding:16px;
  background:#2563eb;
  color:#fff;
  border:none;
  border-radius:14px;
  font-size:17px;
  font-weight:800;
  cursor:pointer;
  transition:background .2s;
}
.pref-btn-next:hover,
.pref-btn-next:active{
  background:#1d4ed8;
}

/* ── 환영 메시지 ── */
.pref-welcome-wrap{
  display:none;
  max-width:1200px;
  margin:24px auto 0;
  padding:0 15px;
  box-sizing:border-box;
}
.pref-welcome-inner{
  display:flex;
  align-items:center;
  gap:10px;
  padding:14px 20px;
  background:linear-gradient(135deg, #eef3ff 0%, #f0f5ff 100%);
  border:1px solid #dbeafe;
  border-radius:14px;
}
.pref-welcome-text{
  font-size:16px;
  font-weight:800;
  color:#111827;
  letter-spacing:-0.3px;
}
.pref-welcome-badge{
  display:inline-flex;
  align-items:center;
  padding:3px 10px;
  border-radius:8px;
  color:#fff;
  font-size:12px;
  font-weight:900;
}
.pref-change-telecom{
  margin-left:auto;
  font-size:13px;
  font-weight:700;
  color:#2563eb;
  text-decoration:none;
  padding:4px 12px;
  border:1.5px solid #2563eb;
  border-radius:8px;
  transition:all .15s;
  white-space:nowrap;
}
.pref-change-telecom:hover{
  background:#2563eb;
  color:#fff;
}

/* ── 최근 본 상품 섹션 (성지스토어 어제보다 더 성지스토어 스타일) ── */
.pref-recent-wrap{
  display:none;
  max-width:980px;
  margin:var(--tp-gap-pc, 36px) auto 0;
  padding:0 15px;
  box-sizing:border-box;
}
.pref-recent-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:18px;
}
.pref-recent-header-left{
  display:flex;
  align-items:center;
  gap:8px;
}
.pref-recent-header h2{
  font-size:24px;
  font-weight:700;
  color:#111827;
  letter-spacing:-0.5px;
  margin:0;
}
.pref-recent-header .badge-recent{
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:help;
  color:#666;
  font-size:14px;
}
.pref-recent-more{
  font-size:14px;
  font-weight:600;
  color:#6b7280;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:4px;
}
.pref-recent-more:hover{ color:#2563eb; }

/* 카드 스크롤 영역 */
.rv-scroll{
  display:flex;
  gap:20px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  padding:14px 0;
}
.rv-scroll::-webkit-scrollbar{ height:0; display:none; }

/* 개별 카드 (성지스토어 그림자 카드) */
.rv-card{
  flex:0 0 200px;
  scroll-snap-align:start;
  display:flex;
  flex-direction:column;
  align-items:center;
  background:#fff;
  border-radius:16px;
  padding:16px;
  text-decoration:none;
  color:inherit;
  box-shadow:0 4px 12px rgba(37,99,235,0.08);
  transition:all .3s ease;
}
.rv-card:hover{
  box-shadow:0 8px 20px rgba(37,99,235,0.13);
  transform:translateY(-4px);
}

/* 통신사 뱃지 (성지스토어 작은 pill) */
.rv-telecom-badge{
  display:inline-flex;
  padding:2px 6px;
  border-radius:8px;
  background:#f3f4f6;
  color:rgba(51,51,51,0.67);
  font-size:10px;
  font-weight:600;
  margin-bottom:8px;
  white-space:nowrap;
}

/* 모델명 */
.rv-card-name{
  font-size:16px;
  font-weight:700;
  color:#111827;
  letter-spacing:-0.3px;
  margin:0 0 0;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:100%;
}

/* 이미지 영역 */
.rv-card-img{
  width:140px;
  height:140px;
  margin-bottom:0;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rv-card-img img{
  max-width:100%;
  max-height:100%;
  object-fit:contain;
}
.rv-card-noimg{
  width:80px;
  height:80px;
  background:#f3f4f6;
  border-radius:16px;
}

/* 날짜 표시 */
.pref-recent-footer{
  text-align:right;
  margin-top:0;
  font-size:12px;
  color:#9ca3af;
  font-weight:500;
}

/* ── 반응형 ── */
@media (max-width:992px){
  .pref-welcome-wrap{ padding:0 10px; margin-top:16px; }
  .pref-welcome-inner{ padding:12px 16px; }
  .pref-welcome-text{ font-size:14px; }

  .pref-recent-wrap{ padding:0 10px; margin-top:var(--tp-gap-m, 26px); }
  .pref-recent-header h2{ font-size:20px; }
  .rv-card{ flex:0 0 160px; padding:12px; }
  .rv-card-img{ width:110px; height:110px; }
  .rv-card-name{ font-size:14px; }
  .rv-telecom-badge{ font-size:9px; }
}

@media (max-width:480px){
  .pref-modal-overlay{
    align-items:flex-start;
  }
  .pref-modal-fullscreen{
    width:100%;
    max-width:100%;
    height:100dvh;
    max-height:100dvh;
    border-radius:0;
  }
  .pref-modal-body{
    padding:28px 20px 16px;
    padding-bottom:calc(20px + env(safe-area-inset-bottom));
    flex:1 1 0;
    min-height:0;
    overflow-y:auto;
  }
  .pref-modal-title{ font-size:20px; }
  .pref-modal-foot{
    padding:12px 20px 24px;
    padding-bottom:calc(24px + env(safe-area-inset-bottom, 16px));
  }
  .pref-tc-item{ padding:14px 16px; }
}

/* ══════════════════════════════════════
   기종 선택 팝업 (model popup)
   ══════════════════════════════════════ */

/* 정보 배너 */
.model-info-bar{
  display:flex;
  align-items:center;
  gap:6px;
  padding:10px 16px;
  background:linear-gradient(135deg, #eef3ff 0%, #dbeafe 100%);
  border-radius:10px;
  font-size:13px;
  font-weight:600;
  color:#1e40af;
  margin-bottom:20px;
}
.model-info-bar strong{ font-weight:900; color:#2563eb; }
.model-info-ico{ font-size:16px; }

/* 진행 바 */
.model-progress{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:18px;
}
.model-progress-text{
  font-size:14px;
  font-weight:800;
  color:#2563eb;
  white-space:nowrap;
}
.model-progress-bar{
  flex:1;
  height:6px;
  background:#e5e7eb;
  border-radius:999px;
  overflow:hidden;
}
.model-progress-fill{
  height:100%;
  width:33%;
  background:#2563eb;
  border-radius:999px;
  transition:width .3s;
}

/* 브랜드 탭 */
.model-tabs{
  display:flex;
  gap:0;
  margin-bottom:16px;
  border:1.5px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;
}
.model-tab{
  flex:1;
  padding:12px 0;
  border:none;
  background:#fff;
  font-size:14px;
  font-weight:700;
  color:#6b7280;
  cursor:pointer;
  transition:all .15s;
  text-align:center;
}
.model-tab + .model-tab{
  border-left:1.5px solid #e5e7eb;
}
.model-tab.active{
  background:#111827;
  color:#fff;
}
.model-tab:hover:not(.active){
  background:#f9fafb;
}

/* 모델 리스트 */
.model-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:300px;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.model-list::-webkit-scrollbar{ width:4px; }
.model-list::-webkit-scrollbar-thumb{ background:#d1d5db; border-radius:4px; }

.model-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:16px 20px;
  border:1.5px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:all .15s;
}
.model-item:hover{
  border-color:#93b4f5;
  background:#fafbff;
}
.model-item.sel{
  border-color:#2563eb;
  background:#f0f5ff;
}
.model-item-name{
  font-size:16px;
  font-weight:700;
  color:#111827;
}
.model-item-check{
  font-size:22px;
  color:#d1d5db;
  transition:color .15s;
}
.model-item.sel .model-item-check{
  color:#2563eb;
}

/* 모델 없음 안내 */
.model-empty{
  text-align:center;
  padding:40px 0;
  color:#9ca3af;
  font-size:14px;
  font-weight:600;
}

@media (max-width:480px){
  .model-list{ max-height:calc(100vh - 380px); }
  .model-item{ padding:14px 16px; }
  .model-item-name{ font-size:15px; }
}

/* ══════════════════════════════════════
   스크롤 맨 위로 버튼 (성지스토어 #scroll-to-top)
   ══════════════════════════════════════ */
.scroll-top-btn{
  display:none;
  position:fixed;
  right:20px;
  bottom:90px;
  width:48px;
  height:48px;
  border-radius:50%;
  background:#fff;
  border:1px solid #e5e7eb;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  cursor:pointer;
  z-index:1070;
  align-items:center;
  justify-content:center;
  transition:all .3s ease;
  color:#6b7280;
  font-size:20px;
}
.scroll-top-btn.is-visible{
  display:flex;
}
.scroll-top-btn:hover{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
  box-shadow:0 6px 16px rgba(37,99,235,0.25);
  transform:translateY(-2px);
}
@media (max-width:768px){
  .scroll-top-btn{
    right:14px;
    bottom:70px;
    width:42px;
    height:42px;
    font-size:18px;
  }
}

/* ══════════════════════════════════════
   FAQ 아코디언 섹션 (성지스토어 .faq-item)
   ══════════════════════════════════════ */
.faq-section{
  max-width:980px;
  margin:var(--tp-gap-pc, 36px) auto 0;
  padding:0 15px;
  box-sizing:border-box;
}
.faq-section-header{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:20px;
}
.faq-section-header h2{
  font-size:24px;
  font-weight:700;
  color:#111827;
  letter-spacing:-0.5px;
  margin:0;
}
.faq-section-header .faq-ico{
  font-size:22px;
}
.faq-list{
  display:flex;
  flex-direction:column;
  gap:0;
  border:1px solid #e5e7eb;
  border-radius:16px;
  overflow:hidden;
}
.faq-item{
  border-bottom:1px solid #f0f0f0;
}
.faq-item:last-child{
  border-bottom:none;
}
.faq-question{
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  padding:18px 20px;
  background:#fff;
  border:none;
  cursor:pointer;
  text-align:left;
  font-size:15px;
  font-weight:600;
  color:#111827;
  letter-spacing:-0.3px;
  transition:background .15s;
}
.faq-question:hover{
  background:#f9fafb;
}
.faq-question .q-label{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  height:24px;
  background:#2563eb;
  color:#fff;
  border-radius:6px;
  font-size:13px;
  font-weight:900;
  margin-right:12px;
  flex-shrink:0;
}
.faq-question .q-text{
  flex:1;
}
.faq-question .q-arrow{
  font-size:16px;
  color:#9ca3af;
  transition:transform .25s;
  flex-shrink:0;
  margin-left:12px;
}
.faq-item.active .faq-question .q-arrow{
  transform:rotate(180deg);
}
.faq-answer{
  display:none;
  padding:0 20px 18px;
  padding-left:56px;
  font-size:14px;
  line-height:1.7;
  color:#6b7280;
  background:#fff;
}
.faq-item.active .faq-answer{
  display:block;
}
@media (max-width:992px){
  .faq-section{ padding:0 10px; margin-top:var(--tp-gap-m, 26px); }
  .faq-section-header h2{ font-size:20px; }
  .faq-question{ padding:15px 16px; font-size:14px; }
  .faq-answer{ padding-left:44px; font-size:13px; }
  .faq-question .q-label{ width:22px; height:22px; font-size:12px; margin-right:10px; }
}

/* ══════════════════════════════════════
   고객 후기 섹션 → skin.index.php 인라인으로 이동
   ══════════════════════════════════════ */
