:root {
  /* 브랜드 3색 팔레트(메인 #FEFCFA / 세컨 #88936D / 써드 #1A3423) 기준으로 통일 */
  --green:       #4C6B44;
  --green-dark:  #1A3423;
  --green-light: #88936D;
  --accent:      #C7CEB8;
  --bg:          #FEFCFA;
  --border:      #E7E3D6;
  --text:        #1A3423;
  --text-muted:  #7C8070;
}

* { box-sizing: border-box; }
body { background: var(--bg); font-family: 'Noto Sans KR', sans-serif; color: var(--text); margin: 0; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── 헤더 ── */
.site-header {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center;
  padding: 0 20px; height: 64px; gap: 32px;
}
.site-logo {
  font-size: 22px; font-weight: 700; color: var(--green);
  letter-spacing: -0.5px; flex-shrink: 0;
  display: flex; align-items: center;
}
.site-logo span { color: var(--green-light); }
.site-logo img { height: 44px; width: auto; display: block; }
.header-search {
  flex: 1; max-width: 480px;
  display: flex; gap: 0;
}
.header-search input {
  flex: 1; border: 1px solid var(--border); border-right: none;
  border-radius: 8px 0 0 8px; padding: 8px 16px; font-size: 14px;
  outline: none; font-family: inherit;
  transition: border-color .15s;
}
.header-search input:focus { border-color: var(--green-light); }
.header-search button {
  background: var(--green); color: #fff; border: none;
  border-radius: 0 8px 8px 0; padding: 0 16px; cursor: pointer;
  font-size: 16px; transition: background .15s;
}
.header-search button:hover { background: var(--green-dark); }
.header-actions {
  display: flex; align-items: center; gap: 20px;
  font-size: 13px; color: var(--text-muted); flex-shrink: 0; margin-left: auto;
}
.header-actions a { color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.header-actions a:hover { color: var(--green); }
.header-actions .icon-label { font-size: 11px; }
.cart-badge {
  position: relative;
}
.cart-badge .count {
  position: absolute; top: -6px; right: -8px;
  background: #E63946; color: #fff; font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── GNB ── */
.gnb { background: var(--green); }
.gnb-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; padding: 0 20px;
}
.gnb a {
  color: rgba(255,255,255,.85); font-size: 14px; font-weight: 500;
  padding: 10px 16px; display: block; transition: color .15s;
}
.gnb a:hover, .gnb a.active { color: #fff; background: rgba(255,255,255,.1); }

/* ── 컨테이너 ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-title {
  font-size: 20px; font-weight: 700; color: var(--green-dark);
  margin-bottom: 24px;
}

/* ── 배너 ── */
.hero-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 60%, var(--green-light) 100%);
  color: #fff; padding: 80px 20px; text-align: center;
}
.hero-banner h1 { font-size: 36px; font-weight: 700; margin-bottom: 12px; }
.hero-banner p { font-size: 16px; color: rgba(255,255,255,.8); margin-bottom: 28px; }
.hero-banner .btn-hero {
  background: #fff; color: var(--green); font-weight: 700;
  padding: 12px 32px; border-radius: 50px; font-size: 15px;
  display: inline-block; transition: transform .15s;
}
.hero-banner .btn-hero:hover { transform: translateY(-2px); }

/* ── 배너 텍스트 오버레이 ── */
.banner-text1 {
  font-size: 38px; font-weight: 800; line-height: 1.2;
  margin-bottom: 12px; letter-spacing: -0.5px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.banner-text2 {
  font-size: 16px; line-height: 1.6; color: rgba(255,255,255,.88);
  margin-bottom: 24px; font-weight: 400;
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.banner-btn {
  display: inline-block; background: #fff; color: var(--green-dark);
  padding: 12px 28px; border-radius: 50px; font-size: 14px; font-weight: 700;
  letter-spacing: -0.2px; transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.banner-slide a:hover .banner-btn {
  transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.2);
}
@media (max-width: 768px) {
  .banner-text1 { font-size: 22px; }
  .banner-text2 { font-size: 13px; margin-bottom: 16px; }
  .banner-btn   { padding: 9px 20px; font-size: 13px; }
  .banner-text-overlay { padding: 0 28px !important; }
  .banner-slide img { height: 280px !important; }
}

/* ── 카테고리 칩 (구) ── */
.category-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.cat-chip {
  padding: 8px 18px; border-radius: 50px;
  border: 1px solid var(--border); background: #fff;
  font-size: 13px; color: #555; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.cat-chip:hover, .cat-chip.active {
  background: var(--green); border-color: var(--green); color: #fff;
}

/* ── 카테고리 카드 ── */
.category-cards {
  display: flex; gap: 14px; flex-wrap: nowrap;
  overflow-x: auto; padding-bottom: 12px; margin-bottom: 28px;
  scrollbar-width: none;
}
.category-cards::-webkit-scrollbar { display: none; }
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex-shrink: 0; text-decoration: none; color: #444;
  transition: transform .15s;
}
.cat-card:hover { transform: translateY(-3px); color: var(--green-dark); }
.cat-card-img {
  width: 76px; height: 76px; border-radius: 50%;
  overflow: hidden; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  background: #f5f8f5; font-size: 26px; color: var(--green);
  transition: border-color .15s;
}
.cat-card:hover .cat-card-img { border-color: var(--green); }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-name {
  font-size: 12px; font-weight: 600; white-space: nowrap;
  color: inherit; text-align: center;
}

/* ── AI 검색 ── */
.ai-search-panel {
  background: linear-gradient(135deg, #F4F6F4 0%, #EDE9DD 100%);
  border: 1px solid var(--border, #e0e8e0); border-radius: 14px;
  padding: 24px; margin-bottom: 28px;
}
.ai-search-answer { margin-bottom: 18px; }
.ai-search-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-dark); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 12px;
  border-radius: 50px; margin-bottom: 10px;
}
.ai-search-answer p { font-size: 15px; line-height: 1.7; color: #333; margin: 0; }
.ai-search-products {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media (max-width: 1000px) { .ai-search-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .ai-search-products { grid-template-columns: repeat(2, 1fr); } }

/* ── 상품 카드 ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1000px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }

.product-card-wrap { position: relative; }
.product-card {
  display: block; background: #fff; border-radius: 4px;
  border: none; overflow: hidden;
  transition: box-shadow .25s, transform .25s; cursor: pointer;
}
.product-card:hover { box-shadow: 0 14px 32px rgba(26,52,35,.10); transform: translateY(-3px); }
.product-card-img {
  aspect-ratio: 1; background: var(--home-cream-deep, #F4F2E9); position: relative;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img .no-img { color: #ccc; font-size: 40px; }
.card-soldout-badge {
  position: absolute; inset: 0;
  background: rgba(26,52,35,.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
}
.product-card-body { padding: 14px 2px 8px; }
.product-card-partner {
  font-size: 11px; color: var(--green-light); font-weight: 600;
  letter-spacing: .4px; margin-bottom: 4px;
}
.product-card-name { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-price { font-size: 15px; font-weight: 700; color: var(--green-dark); }

/* ── 카드 호버 오버레이 ── */
.card-hover-actions {
  position: absolute;
  top: 0; left: 0; right: 0;
  aspect-ratio: 1;                          /* 이미지와 같은 비율로 이미지 영역만 덮음 */
  border-radius: 12px 12px 0 0;
  background: linear-gradient(to top, rgba(0,0,0,.52) 0%, rgba(0,0,0,.0) 55%);
  display: flex; align-items: flex-end; gap: 8px;
  padding: 14px 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.product-card-wrap:hover .card-hover-actions {
  opacity: 1;
  pointer-events: none; /* 배경은 클릭 통과 → 아래 <a> 태그로 이동 */
}
.card-hover-actions .card-like-btn,
.card-hover-actions .card-cart-btn {
  pointer-events: auto; /* 버튼만 개별적으로 클릭 활성화 */
}

/* 좋아요 버튼 — 호버 오버레이 */
.card-like-btn {
  display: flex; align-items: center; gap: 5px; flex-shrink: 0;
  background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  border: 1.5px solid rgba(255,255,255,.35);
  color: #fff; border-radius: 20px;
  padding: 7px 13px; cursor: pointer;
  font-size: 12px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.card-like-btn:hover { background: rgba(255,255,255,.3); border-color: rgba(255,255,255,.6); }
.card-like-btn.liked { background: rgba(231,76,60,.75); border-color: rgba(231,76,60,.5); }
.card-like-btn i { font-size: 13px; }

/* 장바구니 버튼 — 호버 오버레이 */
.card-cart-btn {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.95); color: var(--green-dark);
  border: none; border-radius: 20px;
  padding: 7px 12px; cursor: pointer;
  font-size: 12px; font-weight: 700;
  transition: background .15s, color .15s; white-space: nowrap;
}
.card-cart-btn:hover { background: #fff; color: var(--green); }
.card-cart-btn.added { background: var(--green-light); color: #fff; }

/* 좋아요 버튼 — 기존 절대위치형 (다른 곳 호환용) */
.like-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  background: rgba(255,255,255,.88); border: none; border-radius: 20px;
  padding: 5px 10px; cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: #aaa; line-height: 1;
  transition: all .15s; backdrop-filter: blur(4px);
}
.like-btn:hover { background: #fff; color: #e74c3c; }
.like-btn.liked { color: #e74c3c; }
.like-btn i { font-size: 14px; }

/* 좋아요 버튼 — 상세 페이지 */
.like-btn-detail {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid #e8e8e8; border-radius: 20px;
  padding: 8px 16px; cursor: pointer; color: #aaa; font-size: 14px;
  font-weight: 500; transition: all .15s;
}
.like-btn-detail:hover { border-color: #e74c3c; color: #e74c3c; }
.like-btn-detail.liked { border-color: #e74c3c; color: #e74c3c; background: #fff5f5; }
.like-btn-detail i { font-size: 18px; }

/* ── 상품 상세 탭 ── */
.product-detail { padding: 40px 0; }
.pdp-tabs {
  display: flex; border-bottom: 2px solid var(--border);
  margin-top: 48px; gap: 0;
}
.pdp-tab {
  padding: 14px 28px; font-size: 15px; font-weight: 600; color: #aaa;
  background: none; border: none; border-bottom: 3px solid transparent;
  cursor: pointer; margin-bottom: -2px; transition: color .15s;
  display: flex; align-items: center; gap: 6px;
}
.pdp-tab:hover { color: var(--green); }
.pdp-tab.active { color: var(--green-dark); border-bottom-color: var(--green-dark); }
.pdp-tab-count {
  background: var(--green); color: #fff; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px; line-height: 1.4;
}
.pdp-tab-content { padding: 32px 0; }
.pdp-empty { text-align: center; padding: 60px 20px; color: #ccc; }
.pdp-empty i { font-size: 44px; display: block; margin-bottom: 14px; }
.pdp-empty p { font-size: 14px; margin: 0; }

/* ── 리뷰 ── */
.review-summary {
  display: flex; align-items: center; gap: 20px;
  background: #F4F6F4; border-radius: 12px; padding: 24px 28px;
  margin-bottom: 24px;
}
.review-avg { font-size: 48px; font-weight: 800; color: var(--green-dark); line-height: 1; }
.review-write-box {
  background: #F8FAFC; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; margin-bottom: 24px;
}

/* 별점 라디오 */
.star-rating-group { display: flex; align-items: center; flex-direction: row-reverse; width: fit-content; }
.star-rating-group input[type=radio] { display: none; }
.star-rating-group label {
  font-size: 28px; color: #ddd; cursor: pointer; transition: color .1s; padding: 0 2px;
}
.star-rating-group input:checked ~ label,
.star-rating-group label:hover,
.star-rating-group label:hover ~ label { color: #f5a623; }

.review-list { display: flex; flex-direction: column; gap: 0; }
.review-item {
  padding: 20px 0; border-bottom: 1px solid #F0F0F0;
}
.review-item:last-child { border-bottom: none; }
.review-item.my-review { background: #FFFDF0; border-radius: 8px; padding: 16px; margin-bottom: 2px; }
.review-content { font-size: 14px; line-height: 1.75; color: #444; margin: 8px 0 0; }

/* ── 리뷰 ... 메뉴 ── */
.rv-menu-wrap { position: relative; }
.rv-menu-btn {
  background: none; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; color: #ccc; padding: 2px 6px;
  border-radius: 6px; line-height: 1; letter-spacing: 1px;
}
.rv-menu-btn:hover { color: #888; background: #f4f6f4; }
.rv-menu-drop {
  display: none; position: absolute; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid #e8e8e8; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,.1); min-width: 110px; z-index: 50; overflow: hidden;
}
.rv-menu-drop.open { display: block; }
.rv-menu-drop button {
  display: flex; align-items: center; width: 100%; padding: 10px 14px;
  font-size: 13px; text-align: left; background: none; border: none;
  cursor: pointer; color: #444; white-space: nowrap;
}
.rv-menu-drop button:hover { background: #f7f8f7; }
.rv-delete-btn { color: #dc3545 !important; }
.rv-delete-btn:hover { background: #fff5f5 !important; }

/* ── 리뷰 좋아요 ── */
.rv-like-btn {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 12px;
  background: none; border: 1px solid var(--border, #e8ede8); border-radius: 20px;
  padding: 5px 12px; font-size: 12px; color: #888; cursor: pointer; transition: all .15s;
}
.rv-like-btn:hover { border-color: #e0a0a0; color: #d9534f; }
.rv-like-btn.liked { border-color: #d9534f; color: #d9534f; background: #fff5f5; }

/* ── 리뷰 이미지 ── */
.review-img-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.review-img-thumb-link { display: block; width: 80px; height: 80px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.review-img-thumb { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.review-img-thumb-link:hover .review-img-thumb { opacity: .85; }

/* 업로드 폼 이미지 그리드 */
.review-img-edit-grid { display: flex; flex-wrap: wrap; gap: 8px; }

/* 기존 이미지 (삭제 체크) */
.rv-existing-wrap {
  position: relative; width: 80px; height: 80px;
  border-radius: 8px; overflow: hidden; cursor: pointer; flex-shrink: 0;
}
.rv-existing-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rv-del-overlay {
  position: absolute; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px; opacity: 0; transition: opacity .15s;
}
.rv-existing-wrap:hover .rv-del-overlay { opacity: .7; }
.rv-existing-wrap.delete-marked img { opacity: .35; }
.rv-existing-wrap.delete-marked .rv-del-overlay { opacity: 1; background: rgba(220,53,69,.55); }
.img-del-check { display: none; }

/* 새 이미지 프리뷰 */
.rv-new-wrap {
  position: relative; width: 80px; height: 80px;
  border-radius: 8px; overflow: visible; flex-shrink: 0;
}
.rv-new-wrap img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; display: block; }
.rv-new-del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #dc3545; color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1; padding: 0;
}
.rv-new-del:hover { background: #b02a37; }

/* 업로드 영역 */
.review-upload-area {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 12px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px;
}
#newImgPreview { display: flex; flex-wrap: wrap; gap: 8px; }
#uploadPlaceholder {
  width: 80px; height: 80px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; background: #F4F6F4;
  transition: background .15s;
}
#uploadPlaceholder:hover { background: #E8EDE8; }

/* ── Q&A ── */
.qna-list { display: flex; flex-direction: column; gap: 0; }
.qna-item { border-bottom: 1px solid #F0F0F0; }
.qna-item:last-child { border-bottom: none; }
.qna-q { padding: 18px 0 12px; }
.qna-a { padding: 12px 0 18px; background: linear-gradient(90deg, #F8FAFC 0%, transparent 100%); border-radius: 0 0 4px 4px; padding-left: 8px; }
.qna-badge {
  width: 24px; height: 24px; border-radius: 6px; display: flex;
  align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  flex-shrink: 0; margin-top: 2px;
}
.qna-badge-q { background: var(--green-dark); color: #fff; }
.qna-badge-a { background: #E8F5E9; color: var(--green-dark); }
.qna-text { font-size: 14px; line-height: 1.75; color: #444; margin: 0; }
.product-image-wrap {
  position: relative;
  background: #F4F6F4; border-radius: 16px;
  aspect-ratio: 1; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.product-image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-image-date {
  position: absolute; left: 10px; bottom: 10px; z-index: 2;
  font-size: 11px; color: #fff; background: rgba(0,0,0,.45);
  padding: 3px 8px; border-radius: 6px; line-height: 1.4;
}
.product-detail-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.product-detail-partner { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.product-detail-price { font-size: 28px; font-weight: 700; color: var(--green-dark); margin-bottom: 24px; }
.product-detail-desc {
  font-size: 14px; line-height: 1.8; color: #555;
  border-top: 1px solid var(--border); padding-top: 20px; margin-bottom: 24px;
  white-space: pre-wrap;
}
/* ── 공유하기 드롭다운 ── */
.share-wrap { position: relative; }
.share-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0; z-index: 300;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; min-width: 168px;
}
.share-dropdown.open { display: block; }
.share-drop-title {
  font-size: 11px; font-weight: 700; color: #aaa;
  letter-spacing: .8px; padding: 4px 8px 8px; text-transform: uppercase;
}
.share-option {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 12px; border: none; background: none;
  font-size: 13px; font-weight: 500; color: #333; border-radius: 8px;
  cursor: pointer; text-align: left; transition: background .12s;
}
.share-option:hover { background: #F4F6F4; }
.share-option i { font-size: 15px; width: 16px; text-align: center; }
.share-kakao:hover { background: #FFF9D6; color: #3A1D1D; }
.share-twitter:hover { background: #f0f8ff; color: #000; }
.share-facebook:hover { background: #EEF2FF; color: #1877F2; }
.share-facebook i { color: #1877F2; }

/* Toast 알림 — 데스크톱은 우측 상단, 모바일은 하단 중앙 */
.share-toast {
  position: fixed; top: 84px; right: 24px; bottom: auto; left: auto;
  transform: translateX(8px); transform-origin: top right;
  background: rgba(0,0,0,.78); color: #fff; font-size: 13px; font-weight: 500;
  padding: 10px 22px; border-radius: 20px; z-index: 9999;
  opacity: 0; transition: opacity .22s, transform .22s; pointer-events: none; white-space: nowrap;
}
.share-toast.show { opacity: 1; transform: translateX(0); }

@media (max-width: 768px) {
  .share-toast {
    top: auto; bottom: 28px; right: auto; left: 50%;
    transform: translateX(-50%) translateY(16px);
  }
  .share-toast.show { transform: translateX(-50%) translateY(0); }
}

/* ── 최대 적립 포인트 ── */
.pdp-earn-box { border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.pdp-earn-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.pdp-earn-total { font-size: 17px; font-weight: 800; color: var(--brand-gold-ink, #93764B); background: rgba(188,159,118,.15); padding: 2px 8px; border-radius: 6px; }
.pdp-earn-body { margin-top: 14px; }
.pdp-earn-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; color: #555; padding: 5px 0; padding-left: 12px; position: relative;
}
.pdp-earn-row::before { content: '·'; position: absolute; left: 0; color: #bbb; }
.pdp-earn-note { font-size: 11px; color: #aaa; margin-top: 8px; line-height: 1.5; }
.pdp-earn-toggle {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px; color: #999; cursor: pointer;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid #f0f0f0;
}
.pdp-earn-box.collapsed .pdp-earn-body,
.pdp-earn-box.collapsed .pdp-earn-note { display: none; }
.pdp-earn-box.collapsed .pdp-earn-toggle { margin-top: 0; border-top: none; padding-top: 0; }

.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  width: fit-content;
}
.qty-btn {
  width: 40px; height: 40px; border: none; background: #F4F6F4;
  font-size: 18px; cursor: pointer; transition: background .15s;
}
.qty-btn:hover { background: var(--accent); }
.qty-input {
  width: 56px; text-align: center; border: none; border-left: 1px solid var(--border);
  border-right: 1px solid var(--border); height: 40px; font-size: 15px; font-weight: 600;
  outline: none;
}

/* ── 버튼 ── */
.btn-green {
  background: var(--green); color: #fff; border: none;
  padding: 14px 28px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background .15s; font-family: inherit;
}
.btn-green:hover { background: var(--green-dark); }
.btn-outline-green {
  background: #fff; color: var(--green); border: 2px solid var(--green);
  padding: 12px 28px; border-radius: 10px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.btn-outline-green:hover { background: var(--green); color: #fff; }

/* ── 장바구니 ── */
.cart-item {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; display: flex; align-items: center; gap: 16px; margin-bottom: 12px;
}
.cart-item-img {
  width: 80px; height: 80px; border-radius: 8px;
  background: #F4F6F4; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.cart-item-option { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-price { font-weight: 700; color: var(--green-dark); font-size: 16px; }
.cart-summary {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 24px; position: sticky; top: 80px;
}
.cart-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border);
}
.cart-summary-row:last-of-type { border-bottom: none; }
.cart-total { font-size: 18px; font-weight: 700; color: var(--green-dark); }

/* ── 주문/체크아웃 ── */
.checkout-section {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; margin-bottom: 20px;
}
.checkout-section h5 { font-size: 16px; font-weight: 700; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-label { font-size: 13px; font-weight: 500; color: #444; }
.form-control:focus { border-color: var(--green-light); box-shadow: 0 0 0 .2rem rgba(136,147,109,.2); }

/* ── 마이페이지 ── */
.mypage-nav {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  overflow: hidden; margin-bottom: 0;
}
.mypage-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; font-size: 14px; color: #555;
  border-bottom: 1px solid var(--border); transition: all .15s;
}
.mypage-nav a:last-child { border-bottom: none; }
.mypage-nav a:hover, .mypage-nav a.active { color: var(--green); background: #F4FAF6; font-weight: 600; }
.mypage-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.mypage-card-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  font-size: 15px; font-weight: 700; color: var(--green-dark);
}
.order-row {
  padding: 20px; border-bottom: 1px solid var(--border);
}
.order-row:last-child { border-bottom: none; }

/* ── 배지 ── */
.badge-order {
  display: inline-block; padding: 3px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 600;
}
.badge-pending   { background:#FFF3CD; color:#856404; }
.badge-paid      { background:#D1E7DD; color:#0A4D2F; }
.badge-preparing { background:#CFE2FF; color:#084298; }
.badge-shipped   { background:#D1ECF1; color:#0C5460; }
.badge-delivered { background:#D1E7DD; color:#0A4D2F; }
.badge-cancelled { background:#F8D7DA; color:#842029; }
.badge-refunded  { background:#E2E3E5; color:#41464B; }

/* ── 푸터 ── */
.site-footer {
  background: var(--green-dark); color: rgba(255,255,255,.6);
  padding: 40px 20px; margin-top: 80px; font-size: 13px;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-links { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.footer-links a { color: rgba(255,255,255,.6); }
.footer-links a:hover { color: #fff; }

/* ── 로그인/회원가입 ── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  justify-content: center; padding: 40px 20px; background: var(--bg);
}
.auth-box {
  background: #fff; border-radius: 16px; padding: 48px 40px;
  width: 420px; border: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo .brand { font-size: 26px; font-weight: 700; color: var(--green); }
.auth-logo .sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.auth-divider { position: relative; text-align: center; margin: 24px 0 16px; }
.auth-divider::before { content: ''; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid #e8e8e8; }
.auth-divider span { position: relative; background: #fff; padding: 0 12px; font-size: 12px; color: #aaa; }
.btn-sns {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px 16px; border-radius: 10px; font-size: 14px;
  font-weight: 600; text-decoration: none; margin-bottom: 10px;
  border: none; cursor: pointer; transition: opacity .15s;
}
.btn-sns:hover { opacity: .88; text-decoration: none; }
.btn-kakao { background: #FEE500; color: #3A1D1D; }
.btn-naver { background: #03C75A; color: #fff; }
.btn-sns-primary { padding: 14px 16px; font-size: 15px; font-weight: 700; box-shadow: 0 4px 14px rgba(254,229,0,.35); }

/* ── 검색 오버레이 ── */
.header-search-trigger {
  flex: 1; max-width: 480px; display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; border: 1px solid var(--border); border-radius: 8px;
  background: #f8faf8; cursor: pointer; font-size: 14px; color: #999;
  font-family: inherit; transition: all .15s;
}
.header-search-trigger:hover { border-color: var(--green-light); background: #fff; color: #666; }
.header-search-trigger i { font-size: 15px; color: var(--green); flex-shrink: 0; transition: transform .25s ease, opacity .25s ease; }
.header-search-trigger span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .25s ease; }
.header-search-trigger.search-active i { transform: translateX(10px); opacity: .35; }
.header-search-trigger.search-active span { opacity: .35; }

.search-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0);
  visibility: hidden; pointer-events: none;
  transition: background .28s, visibility 0s linear .32s;
}
.search-overlay.active {
  visibility: visible; pointer-events: auto;
  background: rgba(0,0,0,0.45);
  transition: background .2s;
}

.search-panel {
  background: #fff; position: relative; z-index: 501;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  transform: translateY(-28px); opacity: 0;
  transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
  max-height: 85vh; overflow-y: auto;
}
.search-overlay.active .search-panel { transform: translateY(0); opacity: 1; }

.search-panel-header {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 0 20px; height: 72px; border-bottom: 1px solid var(--border);
}
.search-panel-form {
  flex: 1; display: flex; max-width: 640px;
}
.search-panel-form input {
  flex: 1; border: 2px solid var(--green); border-right: none;
  border-radius: 8px 0 0 8px; padding: 10px 18px; font-size: 15px;
  outline: none; font-family: inherit; background: #fff;
}
.search-panel-form button {
  background: var(--green); color: #fff; border: none;
  border-radius: 0 8px 8px 0; padding: 0 20px; cursor: pointer;
  font-size: 17px; transition: background .15s;
}
.search-panel-form button:hover { background: var(--green-dark); }
.search-close {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: #999; padding: 8px; margin-left: auto; flex-shrink: 0;
  line-height: 1; transition: color .15s; border-radius: 6px;
}
.search-close:hover { color: #333; background: #f0f0f0; }

.search-panel-body {
  max-width: 1200px; margin: 0 auto; padding: 28px 20px 36px;
}
.search-section { margin-bottom: 28px; }
.search-section:last-child { margin-bottom: 0; }
.search-section-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: #aaa;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.search-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.search-chip {
  padding: 6px 15px; border: 1px solid var(--border);
  border-radius: 50px; background: #f5f8f5;
  font-size: 13px; color: #444; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.search-chip:hover { background: var(--green); border-color: var(--green); color: #fff; }
.search-chip-wrap { display: flex; align-items: center; gap: 0; }
.search-chip-del {
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: #ccc; font-size: 13px; padding: 2px 5px; margin-left: -6px;
  line-height: 1; transition: color .15s;
}
.search-chip-del:hover { color: #888; }
.btn-clear-all {
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 11px; color: #bbb; padding: 0; transition: color .15s;
}
.btn-clear-all:hover { color: var(--green); }

/* 최근 본 상품 */
.search-recent-products {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none;
}
.search-recent-products::-webkit-scrollbar { display: none; }
.recent-product-card {
  flex-shrink: 0; width: 88px; text-decoration: none; color: inherit;
  transition: transform .15s;
}
.recent-product-card:hover { transform: translateY(-2px); }
.recent-product-img {
  width: 88px; height: 88px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--border); background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 7px; font-size: 22px; color: #ccc;
}
.recent-product-img img { width: 100%; height: 100%; object-fit: cover; }
.recent-product-name {
  font-size: 11px; color: #444; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 3px;
}
.recent-product-price { font-size: 12px; font-weight: 700; color: var(--green-dark); }

/* ── 페이지네이션 ── */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 32px; }
.page-link-item {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: #fff; font-size: 14px;
  color: #555; transition: all .15s;
}
.page-link-item:hover { border-color: var(--green); color: var(--green); }
.page-link-item.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ── 태그 칩 (상품 상세) ── */
.product-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.product-tag-chip {
  display: inline-block; padding: 4px 12px; border-radius: 50px;
  background: #f0f7f0; border: 1px solid #c8dfc8; color: var(--green-dark);
  font-size: 12px; font-weight: 600; text-decoration: none;
  transition: all .15s;
}
.product-tag-chip:hover { background: var(--green); border-color: var(--green); color: #fff; }

/* ── 태그 찾아보기 (메인) ── */
.tag-browse-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.tag-browse-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 50px;
  border: 1px solid var(--border); background: #fff;
  font-size: 13px; color: #444; text-decoration: none;
  transition: all .15s;
}
.tag-browse-chip:hover { background: var(--green); border-color: var(--green); color: #fff; }
.tag-browse-cnt {
  background: #e8ede8; color: #666; font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 10px; transition: inherit;
}
.tag-browse-chip:hover .tag-browse-cnt { background: rgba(255,255,255,.3); color: #fff; }

/* ── 최근 본 상품 플로팅 위젯 ── */
.recent-float {
  position: fixed; right: 0; bottom: 120px; z-index: 300;
  display: none; /* JS로 visible 클래스 추가 시 노출 */
}
.recent-float.visible { display: block; }

.recent-float-widget {
  background: #fff;
  border: 1px solid #dde6dd; border-right: none;
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 20px rgba(0,0,0,0.10);
  overflow: hidden;
  width: 68px;
}

.recent-float-head {
  background: var(--green-dark); color: #fff;
  text-align: center; padding: 8px 4px 7px;
  font-size: 10px; font-weight: 700; line-height: 1.45;
  position: relative; letter-spacing: 0.2px;
}
.recent-float-head-close {
  position: absolute; top: 3px; right: 3px;
  background: none; border: none; cursor: pointer;
  color: rgba(255,255,255,.65); font-size: 13px;
  line-height: 1; padding: 1px 2px;
  transition: color .12s;
}
.recent-float-head-close:hover { color: #fff; }

.recent-float-items { max-height: 380px; overflow-y: auto; scrollbar-width: none; }
.recent-float-items::-webkit-scrollbar { display: none; }

.recent-float-item {
  display: block; border-bottom: 1px solid #f3f3f3;
  position: relative; overflow: visible;
  transition: opacity .15s;
}
.recent-float-item:last-child { border-bottom: none; }
.recent-float-item:hover { opacity: .88; }

.recent-float-item img {
  width: 68px; height: 68px; object-fit: cover; display: block;
}
.recent-float-item-placeholder {
  width: 68px; height: 68px; background: #f5f5f5;
  display: flex; align-items: center; justify-content: center;
  color: #ddd; font-size: 20px;
}

/* 호버 시 왼쪽으로 튀어나오는 말풍선 */
.recent-float-tooltip {
  position: absolute; right: calc(100% + 8px); top: 50%;
  transform: translateY(-50%);
  background: rgba(30,30,30,.92); color: #fff;
  padding: 7px 10px; border-radius: 8px;
  font-size: 11px; line-height: 1.45; width: 130px;
  pointer-events: none; white-space: normal;
  opacity: 0; visibility: hidden;
  transition: opacity .15s, visibility .15s;
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.recent-float-tooltip::after {
  content: ''; position: absolute; right: -5px; top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent; border-right: none;
  border-left-color: rgba(30,30,30,.92);
}
.recent-float-item:hover .recent-float-tooltip {
  opacity: 1; visibility: visible;
}
.recent-float-tooltip-name {
  font-weight: 600; margin-bottom: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.recent-float-tooltip-price { color: #a8e6c0; font-weight: 700; }

/* 모바일: 하단 고정 가로 스크롤로 변환 */
@media (max-width: 768px) {
  .recent-float {
    bottom: 0; right: 0; left: 0; width: 100%;
    display: none !important; /* 모바일에선 숨김 — 검색 오버레이로 대체 */
  }
}

/* ── 빈 상태 ── */
.empty-state {
  text-align: center; padding: 80px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 48px; display: block; margin-bottom: 16px; color: var(--accent); }
.empty-state p { font-size: 15px; margin-bottom: 20px; }

/* ── 할인가 표시 ── */
.price-original {
  font-size: 13px; color: #bbb; text-decoration: line-through;
  margin-right: 4px;
}
.price-sale {
  font-weight: 700; color: var(--text);
}
.discount-badge {
  display: inline-block; background: #e74c3c; color: #fff;
  font-size: 11px; font-weight: 700; border-radius: 4px;
  padding: 1px 6px; vertical-align: middle; margin-left: 4px;
}

/* ── 공지사항 ── */
.notice-list {
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  background: #fff;
}
.notice-row {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text);
  transition: background .12s;
}
.notice-row:last-child { border-bottom: none; }
.notice-row:hover { background: #F4FAF6; }
.notice-row--pinned { background: #FAFFF8; }
.notice-row--pinned:hover { background: #F0F9F0; }
.notice-row-left { flex-shrink: 0; width: 52px; text-align: center; }
.notice-num { font-size: 13px; color: #bbb; }
.notice-pin-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; color: var(--green);
  background: #EAF7EF; padding: 2px 8px; border-radius: 50px;
}
.notice-row-title {
  flex: 1; font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notice-row--pinned .notice-row-title { font-weight: 600; color: var(--green-dark); }
.notice-row-date { flex-shrink: 0; font-size: 12px; color: var(--text-muted); }

/* 공지 상세 */
.notice-view-header {
  border-bottom: 2px solid var(--green-dark); padding-bottom: 20px; margin-bottom: 32px;
}
.notice-view-title {
  font-size: 22px; font-weight: 700; color: var(--green-dark);
  line-height: 1.4; margin: 8px 0 12px;
}
.notice-view-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
}
.notice-view-body {
  font-size: 15px; line-height: 1.9; color: #333;
  min-height: 200px; padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.notice-view-body img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

/* 이전/다음 */
.notice-nav {
  border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; margin-top: 24px;
}
.notice-nav-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: var(--text); transition: background .12s;
}
.notice-nav-item:last-child { border-bottom: none; }
.notice-nav-item:hover { background: #F4FAF6; }
.notice-nav-label {
  flex-shrink: 0; font-size: 12px; color: var(--text-muted); width: 64px;
}
.notice-nav-title {
  flex: 1; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .notice-row { padding: 14px 16px; gap: 12px; }
  .notice-row-left { width: 40px; }
  .notice-view-title { font-size: 18px; }
  .notice-view-body { font-size: 14px; }
}

/* ── 모바일 반응형 ── */
@media (max-width: 768px) {
  /* 헤더 */
  .header-inner { padding: 0 16px; gap: 12px; height: 56px; }
  .header-search-trigger { max-width: none; }
  .icon-label { display: none; }
  .header-actions { gap: 12px; }

  /* GNB 가로 스크롤 */
  .gnb-inner { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .gnb-inner::-webkit-scrollbar { display: none; }
  .gnb a { white-space: nowrap; padding: 9px 12px; }

  /* 컨테이너 */
  .container { padding: 0 12px; }
  .section { padding: 24px 0; }
  .section-title { font-size: 18px; }

  /* 로그인/회원가입 */
  .auth-box { width: calc(100% - 32px); padding: 32px 20px; }
  .auth-page { padding: 24px 0; }

  /* 장바구니 */
  .cart-summary { position: static; }
  .cart-item { padding: 14px; gap: 12px; }
  .cart-item-img { width: 72px; height: 72px; }
  .cart-item-info { min-width: 0; }

  /* 결제/체크아웃 */
  .checkout-section { padding: 16px; }

  /* 마이페이지 아코디언 nav */
  .mypage-nav-wrap {
    border: 1px solid var(--border); border-radius: 12px;
    overflow: hidden; margin-bottom: 16px; background: #fff;
  }
  .mypage-nav-toggle {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; font-size: 14px; font-weight: 600;
    color: var(--green-dark); background: #fff; cursor: pointer;
    border: none; width: 100%; font-family: inherit; text-align: left;
  }
  .mypage-nav-toggle-label { display: flex; align-items: center; gap: 8px; }
  .mypage-nav-toggle .toggle-arrow { transition: transform .2s; font-size: 16px; color: #aaa; }
  .mypage-nav-wrap.open .mypage-nav-toggle .toggle-arrow { transform: rotate(180deg); }
  .mypage-nav-wrap .mypage-nav {
    display: none; border-top: 1px solid var(--border);
    border-radius: 0; border: none;
  }
  .mypage-nav-wrap.open .mypage-nav { display: block; }

  /* 푸터 */
  .site-footer { margin-top: 40px; padding: 28px 16px; }
}

/* 장바구니 아이템: 가격 아래로 분리 */
@media (max-width: 576px) {
  .cart-item { flex-wrap: wrap; align-items: flex-start; }
  .cart-item-price {
    width: 100%;
    min-width: 0 !important;
    padding-left: 84px; /* 이미지(72px) + gap(12px) */
    margin-top: 4px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .header-inner { padding: 0 10px; height: 52px; }
  .site-logo { font-size: 19px; }
  .site-logo img { height: 34px; }
  .hero-banner h1 { font-size: 26px; }
  .hero-banner p { font-size: 14px; }
  .section-title { font-size: 16px; }
  .auth-box { padding: 28px 16px; }
}

/* ── 채팅 UI ─────────────────────────────────────────────────── */
.btn-chat-inquiry {
  display: flex; align-items: center; justify-content: center;
  padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--green); color: var(--green);
  background: #fff; cursor: pointer; transition: background .15s, color .15s;
}
.btn-chat-inquiry:hover { background: var(--green); color: #fff; }

/* 채팅방 목록 아이템 */
.chat-room-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  color: inherit; transition: background .1s;
}
.chat-room-item:hover { background: #f7faf7; }
.chat-room-img {
  width: 52px; height: 52px; border-radius: 10px; flex-shrink: 0;
  background: #f0f0f0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.chat-room-img img { width: 100%; height: 100%; object-fit: cover; }
.chat-room-body { flex: 1; min-width: 0; }
.chat-room-name { font-size: 14px; font-weight: 600; color: var(--text); }
.chat-room-product { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-preview { font-size: 13px; color: #888; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-room-time { font-size: 11px; color: #bbb; }
.chat-unread-badge {
  background: var(--green); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 20px; padding: 2px 7px; min-width: 20px; text-align: center;
}

/* 상품 카드 (채팅 상단) */
.chat-product-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; margin-bottom: 12px; color: inherit;
  transition: border-color .15s;
}
.chat-product-card:hover { border-color: var(--green); }
.chat-product-card img {
  width: 56px; height: 56px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.chat-product-img-placeholder {
  width: 56px; height: 56px; border-radius: 8px; background: #f0f0f0;
  display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 20px; flex-shrink: 0;
}
.chat-product-info { flex: 1; min-width: 0; }
.chat-product-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-product-price { font-size: 14px; font-weight: 700; color: var(--green); margin-top: 3px; }

/* 채팅 창 */
.chat-window {
  background: #f4f6f4; border-radius: 14px;
  padding: 16px; min-height: 360px; max-height: 480px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 12px;
}
.chat-empty { text-align: center; color: #bbb; font-size: 13px; margin: auto; }
.chat-msg { display: flex; flex-direction: column; max-width: 72%; }
.chat-msg--me { align-self: flex-end; align-items: flex-end; }
.chat-msg--them { align-self: flex-start; align-items: flex-start; }
.chat-bubble {
  padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.6; word-break: break-word;
}
.chat-msg--me .chat-bubble { background: var(--green); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg--them .chat-bubble { background: #fff; color: var(--text); border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.chat-time { font-size: 11px; color: #bbb; margin-top: 4px; }

/* 입력창 */
.chat-input-wrap {
  display: flex; gap: 8px; align-items: flex-end;
  background: #fff; border: 1.5px solid var(--border); border-radius: 14px; padding: 8px 10px;
}
.chat-input {
  flex: 1; border: none; outline: none; resize: none;
  font-family: inherit; font-size: 14px; line-height: 1.5;
  max-height: 120px; overflow-y: auto; background: transparent;
}
.chat-send-btn {
  width: 36px; height: 36px; border-radius: 10px; border: none;
  background: var(--green); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.chat-send-btn:hover { background: var(--green-dark); }
