/* 공식홈 마켓 화면 (공통 UI 는 theme/boardfactory/css/skin.css 의 .bfk) */
/* 칸이 내용(탭 줄 등) 폭만큼 늘어나 휴대폰에서 옆으로 넘치지 않게 minmax(0, 1fr) */
.bfs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.bfs .bfk-tabs { overflow-x: auto; scrollbar-width: none; }
.bfs .bfk-tabs::-webkit-scrollbar { display: none; }
.bfs-nav { margin-bottom: 0; }
.bfs-lead { margin: 0; }

.bfs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 18px; }
.bfs-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bfk-border); border-radius: calc(var(--bfk-radius) * 1.5); background: var(--bfk-bg); transition: box-shadow .15s, transform .15s; }
.bfs-card:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, .08); transform: translateY(-2px); }
.bfs-card__thumb { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--bfk-soft); color: var(--bfk-muted); font-size: 40px; }
.bfs-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.bfs-card__body { flex: 1; display: grid; align-content: start; gap: 6px; padding: 14px 16px 16px; }
.bfs-card__title { font-size: 1.02rem; font-weight: 800; }
.bfs-card__desc { color: var(--bfk-muted); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bfs-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.bfs-price { font-weight: 800; color: var(--bfk-primary); }
.bfs-price.is-free { color: var(--bfk-success); }

.bfs-detail { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.bfs-detail__image { overflow: hidden; border-radius: calc(var(--bfk-radius) * 1.5); background: var(--bfk-soft); aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; color: var(--bfk-muted); font-size: 56px; }
.bfs-detail__image img { width: 100%; height: 100%; object-fit: cover; }
.bfs-buy { position: sticky; top: 90px; display: grid; gap: 14px; padding: 20px; border: 1px solid var(--bfk-border); border-radius: calc(var(--bfk-radius) * 1.5); background: var(--bfk-bg); }
.bfs-buy__price { font-size: 1.6rem; font-weight: 800; }
.bfs-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .9rem; }
.bfs-dl dt { color: var(--bfk-muted); }
.bfs-dl dd { margin: 0; }

.bfs-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.bfs-table th, .bfs-table td { padding: 11px 10px; border-bottom: 1px solid var(--bfk-border); text-align: left; vertical-align: middle; }
.bfs-table thead th { color: var(--bfk-muted); font-size: .84rem; font-weight: 600; border-top: 2px solid var(--bfk-text); }
.bfs-table .is-num { text-align: right; white-space: nowrap; }
.bfs-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .02em; }
.bfs-stat { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.bfs-stat__item { padding: 16px; border-radius: var(--bfk-radius); background: var(--bfk-soft); }
.bfs-stat__item strong { display: block; margin-top: 4px; font-size: 1.3rem; }

@media (max-width: 768px) {
    .bfs-detail { grid-template-columns: minmax(0, 1fr); }
    .bfs-buy { position: static; }
    .bfs-table thead { display: none; }
    .bfs-table tr { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--bfk-border); }
    .bfs-table td { padding: 0; border: 0; }
    .bfs-table .is-num { text-align: left; }
}
