/* ============================================================
   [ oemodm.css ] OEM / ODM 전체 통합 스타일 (프로세스 + 공장소개)
   ============================================================ */

/* ── 공통 인트로 여백 ── */
.oem-intro { padding: 60px 0 80px; }

/* ============================================================
   [ 1 ] process.php (OEM / ODM 프로세스 1500px 와이드 레이아웃)
   ============================================================ */
.oem-process-sec { padding: 0 0 160px; }

.process-group { margin-bottom: 140px; }
.process-group:last-child { margin-bottom: 0; }

.process-header { text-align: center; margin-bottom: 100px; } 
.process-main-title { font-family: var(--font-en), var(--font-kr); font-size: 2.5rem; font-weight: 800; color: #333; margin-bottom: 12px; letter-spacing: -0.01em; }
.process-sub-desc { font-size: 1.1rem; color: #666; margin: 0; word-break: keep-all; overflow-wrap: break-word; }

/* ── 4단 그리드 (1500px 꽉 참) ── */
.process-grid { 
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 100px 40px; 
  max-width: 1500px; 
  margin: 0 auto; 
}
.pr-item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }

/* 원형 박스 (240px) */
.pr-circle { 
  position: relative; width: 240px; height: 240px; border-radius: 50%; border: 2px solid #ccc; background: #fff;
  display: flex; flex-direction: column; justify-content: center; align-items: center; margin-bottom: 30px;
  transition: transform 0.4s ease, box-shadow 0.4s ease; z-index: 2;
}
.pr-item:hover .pr-circle { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.06); }
.pr-item.is-last .pr-circle { border-color: #333; border-width: 3px; }

/* 검은색 알약 뱃지 */
.pr-num { 
  background: #111; color: #fff; font-family: var(--font-en), sans-serif; font-size: 1rem; font-weight: 700;
  padding: 8px 20px; border-radius: 30px; display: inline-flex; justify-content: center; align-items: center;
  letter-spacing: 0.05em; white-space: nowrap; margin-bottom: 20px; 
}
.pr-num::before { content: 'Step '; }
.pr-num::after { content: '.'; }

/* 아이콘 및 텍스트 */
.pr-circle img { width: 90px; height: 90px; object-fit: contain; opacity: 0.8; }
.pr-title { font-size: 1.3rem; font-weight: 800; color: #111; margin: 0; line-height: 1.4; word-break: keep-all; overflow-wrap: break-word; padding: 0 10px; }
.pr-step { display: none; }

/* ── PC 화살표 (커스텀 이미지 arrow.png S자 지그재그 구현) ── */
@media(min-width: 1025px) {
  .pr-item:nth-child(1) { grid-area: 1 / 1 / 2 / 2; }
  .pr-item:nth-child(2) { grid-area: 1 / 2 / 2 / 3; }
  .pr-item:nth-child(3) { grid-area: 1 / 3 / 2 / 4; }
  .pr-item:nth-child(4) { grid-area: 1 / 4 / 2 / 5; }
  
  .pr-item:nth-child(5) { grid-area: 2 / 4 / 3 / 5; }
  .pr-item:nth-child(6) { grid-area: 2 / 3 / 3 / 4; }
  .pr-item:nth-child(7) { grid-area: 2 / 2 / 3 / 3; }
  .pr-item:nth-child(8) { grid-area: 2 / 1 / 3 / 2; }
  
  .pr-item:nth-child(9) { grid-area: 3 / 1 / 4 / 2; }

  .pr-item::after {
    content: ''; position: absolute; width: 26px; height: 26px; 
    background: url('/images/oemodm/arrow.png') no-repeat center center / contain; z-index: -1;
  }
  
  .pr-item:nth-child(1)::after, .pr-item:nth-child(2)::after, .pr-item:nth-child(3)::after, .pr-item:nth-child(9)::after {
    top: 120px; right: -30px; transform: translateY(-50%);
  }
  .pr-item:nth-child(4)::after, .pr-item:nth-child(8)::after {
    bottom: -60px; left: 50%; transform: translateX(-50%) rotate(90deg);
  }
  .pr-item:nth-child(5)::after, .pr-item:nth-child(6)::after, .pr-item:nth-child(7)::after {
    top: 120px; left: -30px; transform: translateY(-50%) rotate(180deg);
  }
  .pr-item.is-last::after { display: none !important; }
}


/* ============================================================
   [ 2 ] factory.php (공장소개 갤러리 + 현황 대시보드)
   ============================================================ */

/* ── 1. 설비 갤러리 영역 (썸네일 2열 배치 & 메인 이미지 비율 조정) ── */
.fac-gallery-sec { padding: 0 0 160px; }

.fac-gallery-wrap { 
  display: flex; 
  height: 650px; 
  box-shadow: 0 20px 50px rgba(0,0,0,0.1); 
  border-radius: 12px; /* 살짝 둥글게 */
  overflow: hidden;
}

/* 좌측 메인 이미지 (우측 패널이 넓어짐에 따라 자연스럽게 가로가 줄어듦) */
.fac-main-view { 
  flex: 1; 
  background: #f4f4f4; 
  position: relative;
}
/* 좌측 메인 이미지 (무조건 정중앙 포커스!) */
.fac-main-view img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position: center center; /* ✨ 이미지가 잘려도 무조건 정중앙을 기준으로 보여줌 */
  transition: opacity 0.3s ease-in-out; 
}

/* ✨ 우측 초록색 썸네일 패널 (가로를 넓혀서 2열 배치 공간 확보) */
.fac-thumb-panel { 
  flex: 0 0 500px; /* 기존 320px에서 420px로 확장! */
  background: #6a9b47; 
  padding: 40px 30px; 
  display: flex; 
  flex-direction: column; 
}
.panel-title { 
  font-family: var(--font-en); 
  font-size: 1.5rem; 
  font-weight: 800; 
  color: #fff; 
  margin: 0 0 30px; 
  letter-spacing: 0.05em; 
  line-height: 1.2; 
  text-align: center; /* 2열 중앙에 맞춤 */
}

/* 세로 스크롤이 가능한 썸네일 리스트 래퍼 */
.thumb-list-wrap { 
  flex: 1; 
  overflow: hidden; 
  position: relative;
}

/* ✨ 썸네일 리스트 (스크롤바 살리기 및 디자인 적용) */
.thumb-list { 
  height: 100%; 
  overflow-y: auto; 
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: 20px 16px; 
  padding: 5px 10px 10px 5px; 
  
  /* 파이어폭스용 얇은 스크롤바 */
  scrollbar-width: thin; 
  scrollbar-color: rgba(255,255,255,0.4) transparent; 
}

/* ✨ 웹킷(크롬, 사파리, 엣지) 커스텀 스크롤바 디자인 */
.thumb-list::-webkit-scrollbar { 
  width: 6px; /* 스크롤바 두께 얇게 */
  display: block; /* 숨김 해제! */
}
.thumb-list::-webkit-scrollbar-track { 
  background: rgba(0,0,0,0.1); /* 스크롤바 뒷배경 */
  border-radius: 10px; 
}
.thumb-list::-webkit-scrollbar-thumb { 
  background: rgba(255,255,255,0.4); /* 스크롤바 막대기 색상 (반투명 하얀색) */
  border-radius: 10px; 
}
.thumb-list::-webkit-scrollbar-thumb:hover { 
  background: rgba(255,255,255,0.7); /* 마우스 올리면 진해짐 */
}

/* 썸네일 아이템 */
.thumb-item { 
  cursor: pointer; 
  opacity: 0.6; 
  transition: opacity 0.3s ease, transform 0.2s; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
}
.thumb-item:hover, .thumb-item.active { opacity: 1; transform: translateY(-3px); } 

/* 썸네일 이미지 크기 및 얇은 테두리 */
.th-img { 
  position: relative; /* 자식 img를 위한 기준점 */
  width: 100%; 
  padding-top: 65%; /* aspect-ratio 대신 패딩 트릭을 사용해 모든 브라우저에서 비율 완벽 고정 (약 16:10) */
  overflow: hidden; 
  border: 2px solid transparent; 
  transition: border-color 0.3s ease;
}
.thumb-item.active .th-img { border-color: #fff; } 
.thumb-item.active .th-img { border-color: #fff; } 

/* 썸네일 이미지 (무조건 정중앙 포커스!) */
.th-img img { 
  position: absolute; /* 부모 박스에 꽉 차게 고정 */
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  object-fit: cover; /* 이미지가 찌그러지지 않고 꽉 참 */
  object-position: center center; /* 사진 중앙이 항상 먼저 보이도록 */
}

/* 썸네일 텍스트 */
.th-txt { 
  font-size: 0.9rem; 
  color: #fff; 
  margin: 10px 0 0; 
  font-weight: 500; 
  text-align: center; 
  word-break: keep-all; overflow-wrap: break-word; 
}

/* 하단 화살표 (<- ->) */
.fac-nav { 
  display: flex; 
  justify-content: center; 
  gap: 40px; 
  margin-top: 30px; 
}
.nav-btn { 
  color: #fff; 
  font-size: 1.4rem; 
  opacity: 0.7; 
  transition: opacity 0.2s, transform 0.2s; 
}
.nav-btn:hover { opacity: 1; }
.nav-btn.prev:hover { transform: translateX(-5px); }
.nav-btn.next:hover { transform: translateX(5px); }

/* ── 2. 바이온셀 현황 대시보드 영역 (가운데 정렬 + 상하 배치) ── */
.fac-overview-sec { position: relative; padding: 100px 0 120px; z-index: 1; }
.fac-overview-sec::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 100vw; transform: translateX(-50%); 
  background: var(--c-lightgray); 
  z-index: -1;
}

.ov-flex { display: flex; flex-direction: column; gap: 60px; align-items: center; }

/* ✨ 상단 텍스트 (가운데 정렬 통일!) */
.ov-left { width: 100%; text-align: center; }
.ov-title { font-size: 3.5rem; font-weight: 900; color: #3a312a; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 30px; }
.ov-desc { 
  font-size: 1.1rem; line-height: 1.6; color: #555; margin: 0 auto; word-break: keep-all; overflow-wrap: break-word; 
  /* 기존 왼쪽 선 삭제 후 중앙 정렬에 맞게 가독성 설정 */
  max-width: 800px;
}

/* 하단 대시보드 박스 */
.ov-right { width: 100%; max-width: 1500px; /* 전체 1500px 룰 적용 */ }

.ov-fac-box { background: #fff; padding: 50px; display: flex; gap: 60px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); border-radius: 12px; text-align: left; /* 박스 안은 다시 왼쪽 정렬 */ }
.fac-text-area { flex: 1; }
.fac-box-title { font-family: var(--font-en), sans-serif; font-size: 1.2rem; font-weight: 800; color: #3a312a; margin: 0 0 30px; letter-spacing: 0.05em; text-transform: uppercase; }

.fac-total { margin-bottom: 40px; }
.fac-label { font-family: var(--font-en), sans-serif; font-size: 1rem; color: #888; display: block; margin-bottom: 8px; text-transform: uppercase; }
.fac-val { font-size: 3.5rem; font-weight: 900; color: #3a312a; line-height: 1; }
.fac-val i { font-size: 1.4rem; font-weight: 500; font-style: normal; color: #666; margin-left: 4px; }

.fac-details { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 60px; }
.fac-row { width: 100%; }
.fac-row-text { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 10px; }
.fac-item-name { font-size: 1.05rem; font-weight: 700; color: #333; }
.fac-item-val { font-size: 1.1rem; font-weight: 700; color: #3a312a; }

.fac-progress { width: 100%; height: 6px; background: #eaeaea; border-radius: 4px; overflow: hidden; }
.fac-bar { width: 0%; height: 100%; background: #3a312a; border-radius: 4px; transition: width 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

.fac-img-area { flex: 0 0 400px; border-radius: 8px; overflow: hidden; }
.fac-img-area img { width: 100%; height: 100%;}
/* ============================================================
   📱 모바일 및 태블릿 반응형 공통
   ============================================================ */
@media(max-width: 1024px) {
  /* 프로세스 2단 레이아웃 전환 */
  .pr-item { grid-area: auto !important; }
  .process-grid { grid-template-columns: repeat(2, 1fr); gap: 60px 40px; }
  .pr-item::after { display: none; } 
  
  .pr-item:nth-child(odd):not(.is-last)::after {
    content: ''; display: block; position: absolute; width: 24px; height: 24px; 
    background: url('/images/oemodm/arrow.png') no-repeat center center / contain;
    top: 120px; right: -25px; transform: translateY(-50%);
  }
}

@media(max-width: 768px) {
  .oem-intro { padding: 40 20px 60px !important; } 
  
  /* 1. OEM/ODM 프로세스 */
  .oem-process-sec { padding: 0 0 80px; }
  .process-main-title { font-size: 1.8rem; margin-bottom: 16px; }
  .process-sub-desc { font-size: 0.95rem; }
  .process-group { margin-bottom: 80px; }
  .process-grid { gap: 60px 10px; } 
  
  .pr-circle { width: 150px; height: 150px; border-width: 1px; }
  .pr-num { font-size: 0.8rem; padding: 4px 12px; margin-bottom: 16px; }
  .pr-circle img { width: 60px; height: 60px; } 
  .pr-title { font-size: 1.05rem; }

  .pr-item:nth-child(odd):not(.is-last)::after { width: 20px; height: 20px; top: 75px; right: -15px; }

  /* ── 2. 공장소개 갤러리 모바일 ── */
  .fac-gallery-sec { padding: 0 20px 80px; }
  .fac-gallery-wrap { flex-direction: column; height: auto; }
  .fac-main-view { height: 300px; flex: none; }
  .fac-thumb-panel { flex: none; width: 100%; padding: 30px 20px; }
  .panel-title { text-align: center; margin-bottom: 24px; }
  
  /* 스크롤바를 보여주기 위해 부모 숨김 해제 */
  .thumb-list-wrap { overflow: visible; } 

  /* ✨ 가로 스와이프 리스트 */
  .thumb-list { 
    display: flex; 
    flex-direction: row; 
    overflow-x: auto; 
    overflow-y: hidden; 
    height: auto; 
    padding: 10px 0 20px 0; /* 스크롤바를 위해 하단 여유 공간(20px) 확보 */
    gap: 16px; 
    -webkit-overflow-scrolling: touch; 
  }
  
  /* ✨ 스마트폰 브라우저 커스텀 스크롤바 */
  .thumb-list::-webkit-scrollbar { 
    height: 4px; /* 얇은 선 두께 */
    display: block !important; 
    -webkit-appearance: none;
  }
  .thumb-list::-webkit-scrollbar-track { 
    background: rgba(255, 255, 255, 0.4) !important; /* 뚜렷한 반투명 하얀선 트랙 */
    border-radius: 10px; 
  }
  .thumb-list::-webkit-scrollbar-thumb { 
    background: #111 !important; /* 진한 검은색 막대 */
    border-radius: 10px; 
  }

  /* ✨ 썸네일 아이템 (이미지만 꽉 차게 표시) */
  .thumb-item { 
    flex: 0 0 calc(50% - 8px); /* 한 화면에 정확히 2개씩 배치 */
    display: block; /* 텍스트가 없으므로 단순 블록 처리 */
  }
  
  /* 이미지 박스 */
  .th-img { width: 100%; height: auto; } 
  
  /* ✨ 대표님이 의도하신 대로 모바일에서 텍스트 완전 숨김! */
  .th-txt { display: none !important; }
  
  .fac-nav { margin-top: 10px; gap: 40px; }

  /* 3. 바이온셀 현황 대시보드 */
  .fac-overview-sec { padding: 60px 0 80px; }
  .ov-flex { gap: 40px; }
  .ov-title { font-size: 2.4rem; margin-bottom: 20px; }
  .ov-desc { font-size: 1rem; padding: 0 10px; }
  
  .ov-fac-box { flex-direction: column; padding: 30px 20px; gap: 30px; }
  .fac-text-area { padding-right: 0; }
  .fac-details { grid-template-columns: 1fr; gap: 24px; }
  .fac-val { font-size: 2.8rem; }
  .fac-img-area { height: 200px; flex: auto; }
}
