/* ============================================================
   커뮤니티 섹션 전용 스타일 — 쇼핑몰 헤더(크림톤)와 분리된 독립 챕터.
   명함 무드(딥그린블랙 + 골드)를 헤더에 항시 적용해 "다른 공간"임을 표시하고,
   본문은 사이트 공통 규칙대로 크림 배경 + 골드 포인트를 유지한다.
   ============================================================ */

.community-header {
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(188,159,118,.14), transparent 60%),
    linear-gradient(160deg, var(--home-forest-deep) 0%, var(--brand-void) 85%);
  border-bottom: 1px solid var(--brand-gold-soft);
}
.community-header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  height: 88px; display: flex; align-items: center; gap: 40px;
}
.community-logo { display: flex; align-items: center; gap: 12px; }
.community-logo img { height: 34px; }
.community-logo-divider {
  width: 1px; height: 22px; background: var(--brand-gold-soft);
}
.community-logo-sub {
  color: var(--brand-gold); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; transition: color .15s;
}
.community-logo-sub:hover { color: var(--brand-cream); }

.community-gnb { display: flex; align-items: center; gap: 32px; flex: 1; }
.community-gnb a {
  color: rgba(238,234,223,.68); font-size: 14px; font-weight: 600;
  letter-spacing: .3px; display: flex; align-items: center; gap: 6px;
  padding: 8px 2px; border-bottom: 2px solid transparent;
  transition: color .18s, border-color .18s;
}
.community-gnb a:hover { color: var(--brand-cream); }
.community-gnb a.active { color: var(--brand-gold); border-bottom-color: var(--brand-gold); }
.community-gnb a.is-soon { cursor: default; }
.soon-badge {
  font-size: 10px; font-weight: 700; color: var(--brand-void);
  background: var(--brand-gold-soft); border-radius: 20px; padding: 2px 7px;
  letter-spacing: 0;
}

.community-header-actions { display: flex; align-items: center; gap: 20px; }
.community-profile-link {
  color: var(--brand-gold); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
}
.community-profile-link:hover { color: var(--brand-cream); }
.community-back-link {
  color: rgba(238,234,223,.6); font-size: 13px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.community-back-link:hover { color: var(--brand-cream); }

@media (max-width: 860px) {
  .community-header-inner { height: auto; flex-wrap: wrap; padding: 16px 20px; gap: 16px; }
  .community-gnb { order: 3; width: 100%; gap: 20px; }
  .community-header-actions { margin-left: auto; }
}

/* ── 커뮤니티 전용 푸터 (헤더와 같은 딥그린블랙+골드 톤) ── */
.community-footer {
  background:
    radial-gradient(ellipse 70% 60% at 50% 100%, rgba(188,159,118,.12), transparent 60%),
    linear-gradient(160deg, var(--home-forest-deep) 0%, var(--brand-void) 85%);
  color: rgba(238,234,223,.65);
  padding: 48px 24px 32px; margin-top: 64px; font-size: 13px;
  border-top: 1px solid var(--brand-gold-soft);
}
.community-footer-inner { max-width: 1200px; margin: 0 auto; }
.community-footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.community-footer-brand img { height: 24px; }
.community-footer-tagline { font-size: 12px; color: var(--brand-gold); letter-spacing: .3px; }
.community-footer-links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.community-footer-links a { color: rgba(238,234,223,.65); }
.community-footer-links a:hover { color: var(--brand-gold); }
.community-footer-biz { font-size: 12px; color: rgba(238,234,223,.4); margin-top: 8px; }
.community-footer-copy { margin-top: 4px; color: rgba(238,234,223,.4); }

/* ── 본문 ── */
.community-wrap { color: var(--home-ink); }

.community-intro {
  max-width: 1200px; margin: 0 auto; padding: 64px 24px 40px; text-align: center;
}
.community-eyebrow {
  color: var(--brand-gold-ink); font-size: 12px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; margin-bottom: 14px;
}
.community-title {
  font-family: var(--home-serif); font-size: 34px; font-weight: 700;
  color: var(--home-ink); margin-bottom: 14px;
}
.community-desc { color: var(--home-forest); font-size: 15px; max-width: 520px; margin: 0 auto; }

.community-section { max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px; }
.community-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 20px;
}
.community-section-title { font-size: 19px; font-weight: 700; color: var(--home-ink); }
.community-board-page-desc { font-size: 13px; color: var(--home-forest); margin: 6px 0 0; }

/* ── 게시판 카테고리 카드 ── */
.community-board-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}
.community-board-card {
  display: block; background: #fff; border: 1px solid var(--home-line);
  border-radius: 4px; padding: 28px 24px; transition: border-color .18s, transform .18s;
}
.community-board-card:hover { border-color: var(--brand-gold-ink); transform: translateY(-2px); }
.community-board-card i { font-size: 26px; color: var(--brand-gold-ink); margin-bottom: 14px; display: block; }
.community-board-card-title { font-size: 16px; font-weight: 700; color: var(--home-ink); margin-bottom: 6px; }
.community-board-card-desc { font-size: 13px; color: var(--home-forest); }
.community-board-card.is-disabled {
  cursor: default; background: var(--home-cream-deep);
}
.community-board-card.is-disabled i { color: #b7bba9; }
.community-board-card.is-disabled .community-board-card-title { color: #8a8f7d; }
.community-board-card .soon-badge {
  color: var(--brand-gold-ink); background: rgba(147,118,75,.14);
  font-size: 11px; padding: 3px 9px; border-radius: 20px; margin-left: 8px;
}

/* ── 인기글 목록 ── */
.community-post-list { border-top: 2px solid var(--home-ink); }
.community-post-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 4px; border-bottom: 1px solid var(--home-line);
}
.community-post-row:hover { background: var(--home-cream-deep); }
.community-post-badge {
  flex-shrink: 0; font-size: 11px; font-weight: 700; color: var(--brand-gold-ink);
  background: rgba(147,118,75,.12); padding: 3px 9px; border-radius: 20px;
}
.community-post-title {
  flex: 1; min-width: 0; font-size: 14.5px; font-weight: 500; color: var(--home-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.community-post-meta {
  flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  font-size: 12.5px; color: var(--home-forest);
}
.community-post-meta i { margin-right: 3px; }

.community-empty-state {
  text-align: center; padding: 64px 20px; color: var(--home-forest);
  border-top: 2px solid var(--home-ink);
}
.community-empty-state i { font-size: 30px; color: var(--brand-gold-ink); margin-bottom: 12px; display: block; }

/* ── 글쓰기 버튼 ── */
.community-write-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--home-ink); color: #fff; border: none;
  padding: 10px 20px; border-radius: 3px; font-size: 13.5px; font-weight: 600;
  transition: background .18s;
}
.community-write-btn:hover { background: var(--brand-gold-ink); color: #fff; }

/* ── 글쓰기 폼 ── */
.community-write-form .form-label { font-weight: 600; font-size: 13.5px; color: var(--home-ink); }
.community-write-form .form-label-hint { font-weight: 400; color: var(--home-forest); font-size: 12px; }
.community-write-form .form-control:focus { border-color: var(--brand-gold-ink); box-shadow: 0 0 0 .2rem rgba(147,118,75,.14); }

.write-columns {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
.write-col-photo { border-right: 1px solid var(--home-line); padding-right: 40px; }

@media (max-width: 760px) {
  .write-columns { grid-template-columns: 1fr; gap: 0; }
  .write-col-photo { border-right: none; padding-right: 0; margin-bottom: 24px; }
}

.media-preview-grid {
  display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px;
}
.media-preview-item {
  width: 96px; height: 96px; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--home-line); background: #000;
}
.media-preview-item img, .media-preview-item video {
  width: 100%; height: 100%; object-fit: cover;
}
.media-preview-item.is-taggable {
  width: 100%; max-width: 340px; aspect-ratio: 1 / 1; height: auto;
  position: relative; overflow: visible; cursor: crosshair;
}
.media-preview-item.is-taggable img { border-radius: 4px; }

/* ── 사진 상품 태그 핀 (작성 화면) ── */
.tag-pin-layer { position: absolute; inset: 0; pointer-events: none; }
.tag-pin-layer .tag-pin { pointer-events: auto; }
.tag-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; background: none; border: none; padding: 0; cursor: pointer;
}
.tag-pin-dot {
  width: 16px; height: 16px; border-radius: 50%; display: block;
  background: var(--brand-gold); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}
.tag-pin-label {
  display: none; margin-left: 6px; background: rgba(8,17,8,.88); color: #fff;
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 20px; white-space: nowrap;
}
.tag-pin:hover .tag-pin-label { display: inline-block; }

/* ── 상품 태그 검색 팝오버 ── */
.tag-popover {
  position: absolute; z-index: 1000; width: 260px; max-height: 340px;
  background: #fff; border: 1px solid var(--home-line); border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 10px; display: flex; flex-direction: column;
}
.tag-popover-input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--home-line); border-radius: 4px;
  font-size: 13px; margin-bottom: 8px;
}
.tag-popover-input:focus { outline: none; border-color: var(--brand-gold-ink); }
.tag-popover-results { overflow-y: auto; max-height: 270px; }
.tag-popover-heading {
  font-size: 11px; font-weight: 700; color: var(--home-forest); text-transform: uppercase;
  letter-spacing: .5px; padding: 4px 4px 6px;
}
.tag-popover-empty, .tag-popover-loading {
  font-size: 12.5px; color: var(--home-forest); padding: 16px 4px; text-align: center;
}
.tag-result-item {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 4px;
  background: none; border: none; text-align: left; border-radius: 4px; cursor: pointer;
}
.tag-result-item:hover { background: var(--home-cream-deep); }
.tag-result-img {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 4px; overflow: hidden;
  background: var(--home-cream-deep); display: flex; align-items: center; justify-content: center;
}
.tag-result-img img { width: 100%; height: 100%; object-fit: cover; }
.tag-result-img i { color: #b7bba9; font-size: 14px; }
.tag-result-info { min-width: 0; }
.tag-result-name {
  font-size: 12.5px; font-weight: 600; color: var(--home-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tag-result-price { font-size: 11.5px; color: var(--brand-gold-ink); font-weight: 600; }

/* ── 게시글 상세 ── */
.community-post-detail-title { font-size: 24px; font-weight: 700; color: var(--home-ink); margin: 4px 0 10px; }
.community-post-detail-meta {
  display: flex; gap: 16px; font-size: 13px; color: var(--home-forest);
  padding-bottom: 20px; border-bottom: 1px solid var(--home-line); margin-bottom: 24px;
}
.community-post-media-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px;
  margin-bottom: 24px;
}
.community-post-media-item { position: relative; }
.community-post-media-item img, .community-post-media-item video {
  display: block; width: 100%; height: 420px; object-fit: cover; border-radius: 4px; background: #000;
}

@media (max-width: 760px) {
  .community-post-media-grid { grid-template-columns: 1fr; }
  .community-post-media-item img, .community-post-media-item video { height: 320px; }
}
.view-tag-pin { position: absolute; transform: translate(-50%, -50%); }
.view-tag-pin-icon {
  display: block; width: 18px; height: 18px; border-radius: 50%;
  background: var(--home-forest-deep); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.35);
  animation: tagPinPulse 2.2s ease-in-out infinite;
}
@keyframes tagPinPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
  50%      { box-shadow: 0 0 0 6px rgba(26,52,35,.35); }
}
.view-tag-pin-label {
  display: none; position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  align-items: center; gap: 8px; background: rgba(8,17,8,.92); color: #fff;
  padding: 8px 12px 8px 8px; border-radius: 8px; white-space: nowrap;
}
.view-tag-pin:hover .view-tag-pin-label { display: flex; }
.view-tag-pin-thumb {
  width: 36px; height: 36px; border-radius: 4px; overflow: hidden; flex-shrink: 0;
  background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center;
}
.view-tag-pin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.view-tag-pin-thumb i { color: rgba(255,255,255,.4); font-size: 14px; }
.view-tag-pin-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.view-tag-pin-name { font-size: 12px; font-weight: 600; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.view-tag-pin-price { font-size: 11.5px; color: var(--brand-gold); font-weight: 600; }
.view-tag-pin-price-row { display: flex; align-items: center; gap: 6px; }
.view-tag-pin-price-original {
  font-size: 10.5px; color: rgba(255,255,255,.4); text-decoration: line-through;
}
.community-post-detail-content {
  font-size: 15px; line-height: 1.8; color: var(--home-ink); white-space: pre-wrap;
}

.community-author-link { color: var(--home-forest); font-weight: 600; }
.community-author-link:hover { color: var(--brand-gold-ink); }
.community-post-author { cursor: pointer; }
.community-post-author:hover { color: var(--brand-gold-ink); }

/* ── 좋아요/댓글/공유 액션바 ── */
.post-action-bar { display: flex; gap: 10px; margin: 28px 0; }
.post-action-bar .like-btn-detail { text-decoration: none; }

/* ── 댓글 ── */
.comment-section { border-top: 2px solid var(--home-ink); padding-top: 24px; margin-top: 8px; }
.comment-count-badge { color: var(--brand-gold-ink); font-weight: 700; }
.comment-form textarea { resize: vertical; }
.comment-login-hint {
  font-size: 13px; color: var(--home-forest); background: var(--home-cream-deep);
  padding: 14px; border-radius: 4px; margin-bottom: 20px;
}
.comment-login-hint a { color: var(--brand-gold-ink); font-weight: 600; }
.comment-empty { font-size: 13px; color: var(--home-forest); padding: 24px 0; text-align: center; }
.comment-list { margin-top: 20px; display: flex; flex-direction: column; }
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--home-line); }
.comment-item:last-child { border-bottom: none; }
.comment-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-size: 13px; font-weight: 700; color: var(--home-ink); }
.comment-author:hover { color: var(--brand-gold-ink); }
.comment-date { font-size: 11.5px; color: #aab0a0; }
.comment-content { font-size: 14px; line-height: 1.7; color: var(--home-ink); white-space: pre-wrap; }

.comment-form-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.comment-add-product-btn {
  display: flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--home-line);
  border-radius: 20px; padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: var(--home-forest);
  cursor: pointer; transition: border-color .15s, color .15s;
}
.comment-add-product-btn:hover { border-color: var(--brand-gold-ink); color: var(--brand-gold-ink); }
.comment-product-search {
  position: relative; margin-top: 10px; border: 1px solid var(--home-line); border-radius: 6px;
  padding: 10px; background: #fff;
}
.comment-product-search .tag-popover-input { margin-bottom: 8px; }
.comment-product-search .tag-popover-results { max-height: 240px; overflow-y: auto; }

/* 댓글 상품 칩 — 작성 중 미리보기(수정 가능) / 등록된 댓글(링크, 고정) 공용 */
.comment-product-chip {
  display: flex; align-items: center; gap: 10px; background: var(--home-cream-deep);
  border-radius: 6px; padding: 8px 10px; margin-top: 10px; max-width: 320px;
}
.comment-product-chip-static { text-decoration: none; transition: background .15s; }
.comment-product-chip-static:hover { background: #efece0; }
.comment-product-chip-thumb {
  width: 32px; height: 32px; border-radius: 4px; overflow: hidden; flex-shrink: 0;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.comment-product-chip-thumb img { width: 100%; height: 100%; object-fit: cover; }
.comment-product-chip-thumb i { color: #b7bba9; font-size: 13px; }
.comment-product-chip-info, .comment-product-chip-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.comment-product-chip-name {
  font-size: 12px; font-weight: 600; color: var(--home-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.comment-product-chip-price { font-size: 11.5px; color: var(--brand-gold-ink); font-weight: 600; }
.comment-product-chip-price-original { color: #aab0a0; text-decoration: line-through; margin-right: 4px; font-weight: 400; }
.comment-product-chip-remove {
  background: none; border: none; color: #aab0a0; cursor: pointer; padding: 2px; flex-shrink: 0;
}
.comment-product-chip-remove:hover { color: #dc3545; }

/* ── 글쓴이 프로필 페이지 ── */
.profile-columns { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.profile-col-info {
  border-right: 1px solid var(--home-line); padding-right: 32px; text-align: center;
}
.profile-avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 16px;
  background: var(--home-forest-deep); display: flex; align-items: center; justify-content: center;
  color: var(--brand-gold); font-size: 34px;
}
.profile-name { font-size: 19px; font-weight: 700; color: var(--home-ink); margin-bottom: 6px; }
.profile-meta { font-size: 12.5px; color: var(--home-forest); margin-bottom: 18px; }
.profile-stat {
  font-size: 13px; color: var(--home-ink); background: var(--home-cream-deep);
  border-radius: 4px; padding: 12px; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.profile-stat strong { color: var(--brand-gold-ink); }
.profile-garden-link {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; color: var(--home-forest); background: #fff; border: 1px solid var(--home-line);
  border-radius: 4px; padding: 12px; margin-top: 10px; transition: border-color .15s, color .15s;
}
.profile-garden-link:hover { border-color: var(--brand-gold-ink); color: var(--brand-gold-ink); }
.profile-garden-link strong { color: var(--brand-gold-ink); }

/* ── 마이가든 ── */
.garden-add-form {
  border: 1px solid var(--home-line); border-radius: 6px; padding: 20px;
  margin-bottom: 24px; max-width: 420px; background: #fff;
}
.garden-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px;
}
.garden-card {
  border: 1px solid var(--home-line); border-radius: 6px; overflow: hidden; background: #fff;
}
.garden-card-photo {
  aspect-ratio: 1 / 1; background: var(--home-cream-deep); display: flex; align-items: center; justify-content: center;
}
.garden-card-photo img { width: 100%; height: 100%; object-fit: cover; }
.garden-card-photo i { font-size: 32px; color: #b7bba9; }
.garden-card-body { padding: 14px; }
.garden-card-name { font-size: 14.5px; font-weight: 700; color: var(--home-ink); }
.garden-card-product { font-size: 12px; color: var(--home-forest); margin-top: 2px; }
.garden-card-date { font-size: 11.5px; color: var(--brand-gold-ink); margin-top: 8px; }
.garden-card-note {
  font-size: 12.5px; color: var(--home-ink); line-height: 1.6; margin-top: 8px;
  white-space: pre-wrap; word-break: break-word;
}
.garden-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.garden-card-edit-btn, .garden-card-delete-btn {
  display: flex; align-items: center; gap: 4px; background: none; border: none;
  font-size: 12px; color: var(--home-forest); cursor: pointer; padding: 0;
}
.garden-card-edit-btn:hover { color: var(--brand-gold-ink); }
.garden-card-delete-btn:hover { color: #dc3545; }
.garden-edit-form { margin-top: 12px; border-top: 1px solid var(--home-line); padding-top: 12px; }

.community-pagination {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px;
}
.community-page-link { font-size: 13px; font-weight: 600; color: var(--home-forest); }
.community-page-link:hover { color: var(--brand-gold-ink); }
.community-page-current { font-size: 12.5px; color: #aab0a0; }

@media (max-width: 760px) {
  .community-board-grid { grid-template-columns: 1fr; }
  .community-post-meta { display: none; }
  .profile-columns { grid-template-columns: 1fr; }
  .profile-col-info { border-right: none; padding-right: 0; margin-bottom: 24px; }
}
