@charset "UTF-8";

/* 웹폰트 (있으면 사용, 없으면 시스템 폰트로 대체) */
@font-face {
  font-family: 'IQOS Regular';
  src: url('font/IQOSHangul-Regular.woff');
}
@font-face {
  font-family: 'IQOS Bold';
  src: url('font/IQOSHangul-Bold.woff');
}
@font-face {
  font-family: 'Bacana';
  src: url('font/Bacana Regular.woff');
}

:root{
  --iq-teal: #00d1d2;
  --gray-100:#f5f5f5;
  --gray-200:#eee;
  --gray-300:#ddd;
  --gray-500:#aaa;
  --ink:#333;
  --bg:#efefef;
}

*{box-sizing:border-box}

body {
  font-family: "IQOS Regular", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--ink);
}

button { font-family: inherit; }

.simulator {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1360px;
  width: 100%;
  padding: 0 16px;
}


.device_section {margin: 20px 0;  background: #fff; padding: 15px; border-radius: 20px;}
.acc_section { background: #fff; padding: 15px; border-radius: 20px;}
.uv_section {margin: 20px 0;   background: #fff; padding: 15px; border-radius: 20px;}

/* ===========================
   기기 선택 버튼
   =========================== */
.device-selector{
  display:flex;
  gap:20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}
.device-selector button{
  padding:10px 0px;
  /*padding:8px 14px;*/
  border-radius: 999px;
  border:0;
  background: none;
  /*background: var(--gray-300);*/
  font-size: 12px;
  color:#333;
  cursor:pointer;
  opacity: 0.5;
}
.device-selector button.active{
  /*background: var(--iq-teal);*/
  color:#111;
  opacity: 1;
}

/* ===========================
   3단 레이아웃을 위한 컨테이너 */
.container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 1300px;
  gap: 40px;
}

/* ===========================
   왼쪽 영역: 기기 색상, 액세서리 */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 좌측 패널 제목 전용 스타일 */
.left-panel .control-tab {
  background: none !important;   /* 배경 제거 */
  border: none !important;       /* 테두리 제거 */
  border-radius: 0 !important;   /* 둥근 모서리 제거 */
  cursor: default !important;    /* 클릭 불가능하게 */
  font-size: 16px;               /* 제목 크기 */
  /*font-weight: bold;*/             /* 제목 굵게 */
  color: #fff;                   /* 텍스트 색상 */
  padding: 6px 0;                /* 위아래 여백 */
  text-align: left;              /* 왼쪽 정렬 */
}

/* active 클래스 적용 여부와 관계없이 동일한 스타일 유지 */
.left-panel .control-tab.active {
  background: none !important;
  color: #fff !important;
}

/* .color-btn 크기 줄이기 */
.left-panel .color-btn {
  width: 40px !important;   /* 너비를 40px로 설정 */
  height: 40px !important;  /* 높이를 40px로 설정 */
  border-radius: 50% !important;  /* 원 형태 유지 */
  background-size: cover !important; /* 배경 이미지가 잘 보이게 */
  background-position: center !important; /* 이미지 중앙 정렬 */
}

/* ===========================
   가운데 영역: 뷰 전환, 프리뷰 */
.center-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* ===========================
   오른쪽 영역: UV 프린팅 옵션 */
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===========================
   프리뷰 (싱글 레이어 3장)
   =========================== */
.preview {
  position: relative;
  width: 500px;
  height: 500px;
  margin: 10px 0 20px;
}
.preview img,
.layer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
}
.layer-img{
  opacity:1;
  pointer-events:none;
  transition: opacity .4s ease, transform .4s ease, filter .4s ease;
}
/* 레이어 z-index 순서 (기기 < 액세서리 < UV) */
#deviceLayer{ z-index:10; }
#accessoryLayer{ z-index:20; }
#uvLayer{ z-index:30; }

/* ===========================
   뷰 토글
   =========================== */
.view-toggle {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.view-toggle button {
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  background: var(--gray-500);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.view-toggle button.active { background: var(--iq-teal); }

/* 처음에는 후면 계열 숨김 (PRIME에서 UV-후면 카테고리 때 보임) */
#backViewBtn, #backUnfoldViewBtn{ display:none; }

/* ===========================
   컨트롤 탭 & UV 카테고리
   =========================== */
.control-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  /*margin: 6px 0 10px;*/
  margin: 0px 0% 10px;
  background: #34303d;
  border-radius: 50px;
}
.control-tab {
  padding: 8px 14px;
  /*background: var(--gray-300);*/
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}
.control-tab.active { /*background: var(--iq-teal);*/ color:#fff; }

/* UV 카테고리 인라인 영역 */
.control-tab-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.uv-categories-inline {
  display: none; /* UV 탭 활성 시 flex로 변경 */
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}

.uv_infoBox {}
.uv_infoBox .uv_infoImg {display: none;}
.uv_infoBox .uv_infoImg img {width: 100%;}
.uv_infoBox .uv_infoTxt {height: 80px; font-size: 14px; text-align: justify; display: none;}



.uv-sub-tab {
  background: var(--gray-300);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
}
.uv-sub-tab.active { background: var(--iq-teal); color:#fff; }

/* ===========================
   탭 패널 & 옵션
   =========================== */
.tab-content{ width:100%; max-width: 980px; }
.tab-panel {
  /*display: none;*/
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tab-panel.active { display: flex; }

.color-options {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  /*margin: 6px 0 20px;*/
  margin: 10px 0;
  justify-content: center;
}
.color-option-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 80px;
  /*margin: 5px 0;*/
  margin: 0px 0;
}


.right-panel .color-options {
  gap: 3px;
}

.right-panel .color-options .color-btn {
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2) inset;
  border: 4px solid #efefef;
}

.right-panel .color-option-wrapper {
  width: 60px;
}

.color-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color:#fff;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.2) inset;
  border: 4px solid #efefef;
}
.color-label {
  margin-top: 5px;
  font-size: 11px;
  text-align: center;
  color: #333;
  word-break: keep-all;
}
.color-option-wrapper.selected .color-btn{
  outline: 3px solid var(--iq-teal);
}

/* 전환 효과 */
.fade-out {
  opacity: 0 !important;
  transform: scale(0.985);
  filter: blur(2px);
}

/* 반응형 */
@media (max-width: 820px) {
  .preview { width: 300px; height: 300px; }
  .color-option-wrapper{ width: 84px; }
  
  /* 3단 레이아웃을 작은 화면에서 세로로 쌓이게 설정 */
  .container {
    flex-direction: column;
    gap: 20px;
  }

  .left-panel, .center-panel, .right-panel {
    flex: none;
    width: 100%;
  }
}