/* 🔒 1단계: 이미지가 inline이 되는 모든 원인 차단 */
.img-block,
.img-block a {
  display: block;
  line-height: 0 !important;
  font-size: 0 !important;
  margin: 0;
  padding: 0;
}

/* 🔒 2단계: 이미지 자체 */
.img-block img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  margin: 0;
  padding: 0;
  vertical-align: top;
}

/* PC: 연속 이미지 보정 */
.img-block + .img-block img {
  margin-top:-2px;
}

/* PC 기준 */
.img-block.m0 img { margin-top: 0; }
.img-block.m02 img { margin-top: -0.2px; }
.img-block.m04 img { margin-top: -0.4px; }
.img-block.m05 img { margin-top: -0.5px; }
.img-block.m06 img { margin-top: -0.6px; }
.img-block.m07 img { margin-top: -0.7px; }
.img-block.m08 img { margin-top: -0.8px; }
.img-block.m09 img { margin-top: -0.9px; }
.img-block.m1 img { margin-top: -1px; }
.img-block.m13 img { margin-top: -1.3px; }
.img-block.m15 img { margin-top: -1.5px; }
.img-block.m25 img { margin-top: -2.5px; }
.img-block.m3 img { margin-top: -3px; }
.img-block.m4 img { margin-top: -4px; }
.img-block.m6 img { margin-top: -6px; }

/* 모바일: 더 강하게 */
@media (max-width:768px){
  .img-block + .img-block img {
    margin-top:-3px;
    }
  .img-block.m0 img { margin-top: 0; }
  .img-block.m02 img { margin-top: -1.2px; }
  .img-block.m04 img { margin-top: -1.4px; }
  .img-block.m08 img { margin-top: -1.8px; }
  .img-block.m1 img { margin-top: -2px; }
  .img-block.m13 img { margin-top: -2.3px; }
  .img-block.m15 img { margin-top: -2.5px; }
  .img-block.m25 img { margin-top: -2.5px; }
  .img-block.m3 img { margin-top: 4px; }
  .img-block.m4 img { margin-top: -5px; }

  /* 모바일 렌더링 안정화 (중요) */
  .img-block img {
    transform: translateZ(0);
    backface-visibility: hidden;
  }
}

/* iOS Safari 전용 */
@supports (-webkit-touch-callout: none) {
  .img-block img {
    transform: translateZ(0);
  }
}

/* 안드로이드 Chrome */
@supports (-webkit-appearance: none) {
  .img-block img {
    backface-visibility: hidden;
  }
}


/* ===== 📸 사진업로드 모달 레이어 ===== */
.modal-overlay {
    display:none;
    position:fixed;
    left:0; top:0;
    width:100%; height:100%;
    background:rgba(0,0,0,0.65);
    z-index:999999;
    justify-content:center;
    align-items:center;
    padding:20px;
}
.modal-overlay.show { display:flex; }

.modal-box {
    background:#fff;
    width:100%;
    max-width:1000px;
    max-height:95vh;
    overflow-y:auto;
    border-radius:8px;
    box-shadow:0 4px 15px rgba(0,0,0,0.3);
}


/* 기존 popup 스타일 그대로 사용됨 */



/* 전체 박스 */
.popup-wrap {
  width: 1000px;
  margin: 100px auto;
  border: 1px solid #ddd;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.popup-content {
  padding: 50px;
}

/* 제목 */
.popup-title {
  margin: 0;
  padding: 20px 0 20px;
  text-align: center;
  font-size: 30px;
  font-weight: bold;
}

/* 위쪽 4칸 – flex */
.info-row {
  display: flex;
  border-top: 2px solid #ccc;
  border-left: 2px solid #ccc;
  border-right: 2px solid #ccc;
  border-bottom: 2px solid #ccc;
  background: #e5e5e5; 
  line-height: 30px;
}

.info-item {
  flex: 1;
  border-right: 1px solid #ccc;
  /* text-align: center;
  padding: 4px 6px; */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;   /* 위: label, 아래: input */
  padding: 0;               /* 겹치는 패딩 제거 */
}

.info-item:last-child {
  border-right: none;
}

.label {
  display: block;
  font-size: 15px;
  padding: 4px 0;
  border-bottom: 1px solid #ccc;
  text-align: center
}

.label-red {
  color: #cc0000;
  font-size: 15px;
  font-weight: bold;
  border-left: 1px solid #ccc;
}

.label-light {
  color: #555;
}

/* input 영역(아래쪽) */
.info-item input {
  flex: 1;                          /* 남는 세로 공간을 채움 */
  width: 100%;
  box-sizing: border-box;
  border: none;
  /* border-top: 1px solid #eee; */
  padding: 6px 4px;
  font-size: 13px;
  text-align: center;
  /* background: #ffffff;   /* 필요시 다른 색으로 조정 가능 */
  /* background-color: transparent; /* 바탕색 없앰 */
  line-height: 50px;
}

/* 가운데 영역 전체 – flex */
.middle-wrap {
  display: flex;
  border: 2px solid #ccc;
  border-top: none;
  height: 220px;
  box-sizing: border-box;
}

/* 왼쪽 파일 박스 / 오른쪽 메모 박스 비율 */
.file-box {
  flex: 1;
  border-right: 1px solid #ccc;
  display: flex;
  flex-direction: column;
}

.memo-box {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 회색 헤더 */
.file-header,
.memo-header {
  background: #e5e5e5;
  border-bottom: 1px solid #ccc;
  text-align: center;
  padding: 6px 0;
  /* font-size: 15px; */
  /* line-height: 30px; */
  height: 35px;
}

.memo-header {
  color: #555;
}

.file-header {
  color: #cc0000;
  font-size: 15px;
  font-weight: bold;
}

/* 파일 영역 안쪽 */
.file-inner {
  padding: 6px;
  flex: 1;
  box-sizing: border-box;
}

.file-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.file-label {
  background: #f5f5f5;
  border: 1px solid #ccc;
  padding: 4px 10px;
  font-size: 15px;
  cursor: pointer;
  color: #cc0000;
}

/* 실제 input 숨기기 */
#fileUp {
    display: none;
}

/* 커스텀 파일 선택 버튼 */
.file-custom-btn {
    display: inline-block;
    /* background: #f2f2f2; */
    border: 1px solid #cc0000;
    padding: 0 30px;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    font-weight: bold;
    color: #cc0000;
    user-select: none;
    height: 30px;
    margin-top: -10px;
}

#fileCount {
    color: #8f8e8e;
}

/* hover 효과 */
.file-custom-btn:hover {
    background: #e6e6e6;
    border-color: #777;
}

/*
#fileUp {
  font-size: 15px;
  color: #666;
} */

.file-count {
  font-size: 12px;
  color: #666;
  margin-top: -30px;
}

/* 파일 리스트 박스 */
.file-list {
  border: 1px solid #ddd;
  background: #fafafa;
  /* height: calc(100% - 40px); */
  height: 100%;
  overflow-y: auto;
  padding: 4px 50px;
  box-sizing: border-box;
  font-size: 15px;
}

/* 파일 항목 예시 */
.file-item {
  display: flex;
  width: 100%;
  align-items: center;
  margin-bottom: 4px;
  padding: 10px 10px;
}

.delete-btn {
  width: 50px;
  height: 16px;
  margin-left: 100px;
  padding-bottom: 3px;
  background: #ff6666;
  color: #fff;
  border: 0;
  border-radius: 10%;
  text-align: center;
  line-height: 16px;
  font-size: 11px;
  cursor: pointer;
}

/* 메모 textarea */
.memo-box textarea {
  flex: 1;
  border: none;
  box-sizing: border-box;
  padding: 6px;
  font-size: 13px;
  resize: none;
}

/* 안내 문구 */
.required-field {
  border-top: 1px solid #ccc;
  padding: 8px 10px;
  font-size: 15px;
  color: #cc0000;
  font-weight: bold;
  background: #fafafa;
}

/* 하단 버튼 */
.bottom-btn {
  text-align: center;
  padding: 20px 0 25px;
}

.bottom-btn button {
  background: #1e73be;
  color: #fff;
  border: none;
  padding: 12px 40px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
}

.bottom-btn button:hover {
  background: #155a90;
}

#detailView_wood img {
  max-width: 100%;
  height: auto;
  text-align: center;
  margin-top: -1px;
}



