/* board-detail.css */
/* 컨테이너 (디테일/폼 페이지 공통) */
.board-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

/* 게시글 detail페이지 공통 헤더 */
.post-header {
  margin-top: 8px;
  border-top: 2px solid #e0e0e0;
  border-bottom: 1px solid #e0e0e0;
}

/* 1번째 칸 : 제목 (연한 회색 배경) */
.post-title-row {
  padding: 10px 12px 8px;
  background: #f7f7f7;
}

.post-title-row .post-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

/* 2번째 칸 : 작성자 + 메타 (완전 흰색 박스) */
.post-meta-row {
  padding: 6px 12px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #666;
  border-top: 1px solid #eaeaea;   /* 1~2번 칸 경계선 */
}

.post-meta-left .post-writer {
  font-size: 0.9rem;
  color: #555;
  /* 닉네임 전용 폰트 */
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

.post-meta-right {
  white-space: nowrap;
}

.post-meta-item strong {
  font-weight: 600;
}

.post-meta-sep {
  margin: 0 4px;
  color: #cccccc;
}

/* 본문 영역 */
.post-body {
  padding: 16px 12px 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 본문도 닉네임과 같은 폰트 사용 */
.post-body .post-content {
  font-family: 'Montserrat', 'Segoe UI', sans-serif;
}

/* 본문 링크 */
.post-body .post-content a {
  text-decoration: underline;
  word-break: break-word;
}

/* 유튜브 임베드 영역 */
.post-video {
  margin: 0 0 14px;
}

.youtube-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid #e3e5e8;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 추천 박스 공통 */
.post-recommend-section {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.recommend-box {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #e3e5e8;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .03);
  color: #333;
  cursor: pointer;
}

.recommend-box .recommend-count-text {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #555;
}

/* 추천 상태 강조 (JS에서 recommend-box-active 클래스 사용) */
.recommend-box.recommend-box-active {
  border-color: #ff6b6b;
}

.recommend-box.recommend-box-active .recommend-count {
  font-weight: 700;
  color: #ff6b6b;
}

/* 공통: 글쓰기/수정 폼 스타일 (write/edit 페이지) */
.board-form {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.board-form input[name="title"] {
  font-size: 1.1rem;
  padding: 10px;
}

.board-form textarea[name="content"] {
  height: 280px;
  font-size: 1rem;
  padding: 12px;
  line-height: 1.5;
}

.board-form button[type="submit"] {
  width: fit-content;
  padding: 10px 20px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* item(상품) 상세 전용 레이아웃 */
.item-body .item-detail-layout {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 16px;
}

.item-image-box img {
  max-width: 300px;
  width: 100%;
  border: 1px solid #e3e5e8;
  background: #fafafa;
}

.item-info-box {
  margin-top: 12px;
  font-size: 1rem;
}

.item-info-box .item-price {
  font-size: 1.1rem;
  font-weight: 600;
}

/* 공통 입력 요소 (디테일/폼에서 사용) */
input[type="text"],
textarea {
  font-size: 1rem;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* 반응형 (모바일 전용)    */
@media (max-width: 600px) {

  /* 헤더 메타 두 줄로 재배치 */
  .post-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .post-meta-right {
    white-space: normal;
  }
}
