/* ==========================================================
   pages/basket.css — 장바구니 전용
   ========================================================== */

/* 소비 유형 고르기: 모바일 가로 스크롤 → 데스크톱 그리드 */
.bk-presets { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px 6px; scroll-snap-type: x proximity; }
.bk-presets::-webkit-scrollbar { display: none; }
.bk-preset {
  flex: none; width: 188px; display: flex; align-items: center; gap: 10px; padding: 12px; scroll-snap-align: start;
  border-radius: var(--r-md); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); text-align: left; transition: box-shadow .15s, background .15s;
}
.bk-preset:hover { box-shadow: inset 0 0 0 1.5px #D5DAE3; }
.bk-preset-txt { display: grid; min-width: 0; line-height: 1.35; }
.bk-preset-txt b { font-size: 15px; font-weight: 800; }
.bk-preset-txt span { font-size: 11.5px; color: var(--ink-3); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bk-preset[aria-pressed="true"] { background: var(--navy); box-shadow: 0 12px 24px -14px rgba(22, 33, 62, .7); }
.bk-preset[aria-pressed="true"] b { color: #fff; }
.bk-preset[aria-pressed="true"] .bk-preset-txt span { color: rgba(255, 255, 255, .7); }
.bk-preset[aria-pressed="true"] .ctile { background: rgba(255, 255, 255, .14); color: #fff; }

/* 요약 */
.bk-summary { display: grid; gap: 20px; padding: 20px; }
.bks-head { display: flex; align-items: center; gap: 12px; }
.bks-kicker { font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 4px; }
.bks-head .pick { height: 38px; font-size: 16px; }
.bks-total { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; }
.bks-total > b { font-size: 40px; font-weight: 900; letter-spacing: -.05em; line-height: 1.1; color: var(--navy); }
.bks-sentence { margin-top: 6px; font-size: 15px; color: var(--ink-2); }
.bks-sentence b { font-weight: 800; color: var(--ink); }
.bks-ranks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.bks-side { padding: 16px; border-radius: var(--r-md); background: var(--surface-2); align-self: start; }
.bks-side-t { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.bks-side .wstack { background: #E6E9EF; }

/* 순위 · 품목 */
.bk-layout { display: grid; gap: 16px; }
.bk-rank { padding: 16px 10px; min-width: 0; }
.bk-rank .card-head { padding: 0 8px; }
.bk-items { min-width: 0; }
.bk-table td:first-child, .bk-table th:first-child { width: 34px; padding-right: 0; }
.bk-table tfoot td { font-weight: 900; border-bottom: 0; background: var(--surface-2); }
.bk-table tfoot td:first-child { border-radius: 10px 0 0 10px; }
.bk-table tfoot td:last-child { border-radius: 0 10px 10px 0; }
.bk-table .dpill { height: 22px; font-size: 12px; }
.bk-actions { display: grid; gap: 8px; margin-top: 16px; }

@media (min-width: 768px) {
  .bk-presets { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; }
  .bk-preset { width: auto; }
  .bk-summary { grid-template-columns: minmax(0, 1fr) 360px; padding: 26px; align-items: center; }
  .bks-total > b { font-size: 48px; }
}
@media (min-width: 1024px) {
  .bk-presets { grid-template-columns: repeat(7, 1fr); }
  .bk-preset { flex-direction: column; align-items: flex-start; }
  .bk-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
}
