@charset "utf-8";
/* ==========================================================================
   rb.BoardFactory — 부품: 갤러리 카드 (.gallery-list · .gal-* · .db-list)

   메인 '추천 보드'(latest bf.gallery) · 보드DB 목록(board bf.gallery) · 리뷰 카드의 HOT/NEW 표(board bf.review).
   쓰는 곳이 부품을 싣는다 — bf_part('gallery') (rb.theme/theme.lib.php).
   목업 css 에서 옮긴 규칙이다. 모양을 바꿀 때는 목업과 같이 고친다.
   ========================================================================== */

/* --------------------------------------------------------------------------
   6. 보드DB 갤러리 — main.css 에서
   -------------------------------------------------------------------------- */
.gallery-list {
  /* 열 수 · 간격은 리빌더 모듈설정(열 · 간격)이 --md-cols · --md-gap 으로 넘긴다 */
  display: grid; grid-template-columns: repeat(var(--md-cols, 4), minmax(0, 1fr)); gap: 22px var(--md-gap, 20px);
}
.gal-card { display: block; }
.gal-thumb {
  position: relative;
  display: block;
  aspect-ratio: 640 / 448;      /* 이미지 원본 비율 — 교체 시 이 값만 맞추면 됨 */
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--plate);             /* 제품컷 배경과 동일하게 */
  border: 1px solid var(--line);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.gal-thumb img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  transition: transform .45s ease;
}
/* 다크 — 흰 배경 제품 사진을 밝은 판(--plate) 위에 곱셈 합성해 경계를 지운다.
   isolation 은 합성을 판 안으로 가둔다(목업 theme.css 2절) */
:root[data-theme="dark"] .gal-thumb { isolation: isolate; }
:root[data-theme="dark"] .gal-thumb img { mix-blend-mode: var(--plate-blend); }
.gal-card:hover .gal-thumb {
  transform: translateY(-4px);
  box-shadow: var(--sh-md);
  border-color: var(--sky-b1);
}
.gal-card:hover .gal-thumb img { transform: scale(1.05); }
.gal-flag {
  position: absolute; left: 10px; top: 10px; z-index: 3;
  display: inline-flex; align-items: center;
  height: 21px; padding: 0 9px;
  border-radius: var(--r-full);
  font-family: var(--font-en);
  font-size: 10px; font-weight: 700; letter-spacing: .4px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.flag-hot  { background: var(--point); }
.flag-new  { background: var(--mint); }
.flag-best { background: var(--amber); }
.gal-info { display: block; padding-top: 13px; }
.gal-cate { display: block; font-size: 12px; font-weight: 600; color: var(--sky-t1); }
.gal-name {
  display: block; margin-top: 5px;
  font-size: 15px; font-weight: 600; color: var(--ink-900); line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gal-card:hover .gal-name { color: var(--sky-t2); }
.gal-spec {
  display: block; margin-top: 5px;
  font-size: 12.5px; color: var(--ink-400);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gal-bot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.gal-price { font-size: 17px; font-weight: 700; color: var(--ink-900); letter-spacing: -.3px; }
.gal-price i { margin-left: 1px; font-size: 12px; font-weight: 500; color: var(--ink-500); }
.gal-score {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-600);
}
.gal-score .ico { width: 13px; height: 13px; fill: var(--amber); stroke: var(--amber); }
.gal-score i { color: var(--ink-300); font-weight: 400; }

/* --------------------------------------------------------------------------
   16. 반응형 — main.css 에서
   -------------------------------------------------------------------------- */
@media (max-width: 1440px) {
  /* 본문 폭이 좁아지므로 카드 크기 유지를 위해 3열로(모듈 열 수가 더 적으면 그것) */
  .gallery-list { grid-template-columns: repeat(var(--md-cols-mid, 3), minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .gallery-list { grid-template-columns: repeat(var(--md-cols-mid, 3), minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .gallery-list { grid-template-columns: repeat(var(--md-cols-mo, 2), minmax(0, 1fr)); gap: 18px var(--md-gap-mo, 12px); }
  .gal-name { font-size: 14px; }
  .gal-price { font-size: 15.5px; }
}
@media (max-width: 420px) {
  .gallery-list { gap: 16px 10px; }
}

/* --------------------------------------------------------------------------
   12. 보드DB 목록 — sub.css 에서
   -------------------------------------------------------------------------- */
.db-list.is-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 20px; }
.db-list.is-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.db-list.is-row .gal-card {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s, box-shadow .2s;
}
.db-list.is-row .gal-card:hover { border-color: var(--sky-b2); box-shadow: var(--sh-sm); }
.db-list.is-row .gal-thumb { flex: none; width: 150px; }
.db-list.is-row .gal-card:hover .gal-thumb { transform: none; box-shadow: none; }
.db-list.is-row .gal-info { flex: 1 1 auto; min-width: 0; padding-top: 0; }
.db-list.is-row .gal-name { font-size: 16.5px; }
.db-list.is-row .gal-bot {
  margin-top: 8px; padding-top: 0;
  border-top: 0; justify-content: flex-start; gap: 18px;
}

/* --------------------------------------------------------------------------
   24. 반응형 — sub.css 에서
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .db-list.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* 보드DB */
  .db-list.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .db-list.is-row .gal-thumb { width: 104px; }
  .db-list.is-row .gal-card { gap: 12px; padding: 12px; }
  .db-list.is-row .gal-name { font-size: 14.5px; }
}
