/* 1. 더보기 버튼 스타일 */
.j-more-wrap { display: block; visibility: visible; opacity: 1; text-align: center; width: 100%; clear: both; margin: 35px auto; }
.j-more-wrap .j-more-btn { display: inline-flex; align-items: center; justify-content: center; background: #ffffff; border: 1px solid #ced4da; color: #495057; cursor: pointer; transition: all 0.15s ease; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); padding: 10px 24px; font-size: 13px; font-weight: 600; border-radius: 30px; width: auto; min-width: 130px; }
.j-more-wrap .j-more-btn:hover, .j-more-wrap .j-more-btn:active { background: #f8f9fa; border-color: #adb5bd; color: #212529; }

/* 2. 필터 바 스타일 */
.market-filter-bar { display: flex; justify-content: flex-end; align-items: center; gap: 6px 12px; background: transparent; padding: 0; margin: 0 1% 14px 0; font-family: "Noto Sans KR", sans-serif; width: 100%; box-sizing: border-box; }
.market-filter-bar .filter-group { display: flex; align-items: center; gap: 5px; }
.market-filter-bar .market-filter-right-group { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.market-filter-bar .view-switcher-container { display: inline-flex; justify-content: flex-start; width: auto; margin: 0; position: static; }
.market-filter-bar .view-switcher__link { height: 32px; box-sizing: border-box; display: flex; align-items: center; padding: 6px 12px; margin-left: -1px; }
.market-filter-bar .view-switcher__icon { width: 14px; height: 14px; }

.market-filter-bar .radio-toggle-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; background: #ffffff; border: 1px solid #e2e5e8; border-radius: 6px; padding: 6px 14px; font-size: 13px; color: #666666; cursor: pointer; user-select: none; transition: all 0.15s ease; text-decoration: none; line-height: 1; height: 32px; box-sizing: border-box; }
.market-filter-bar .radio-toggle-btn i { font-size: 14px; margin-left: 2px; }
.market-filter-bar .radio-toggle-btn:hover { background: #f8f9fa; border-color: #ced4da; color: #333333; }
.market-filter-bar .radio-toggle-btn.is-active { background: #f1f3f5; border-color: #ced4da; color: #111111; font-weight: 600; }

/* 3. 그리드 리스트 레이아웃 */
ol.bd_lst.bd_tmb_lst { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px 10px; padding: 16px 1%; list-style: none; margin: 0 0 20px 0; clear: both; height: auto; width: 100%; box-sizing: border-box; }
ol.bd_lst.bd_tmb_lst::after { content: ""; display: block; clear: both; }
ol.bd_lst.bd_tmb_lst > li { display: flex; flex-direction: column; width: 100%; height: auto; background: #ffffff; border: 1px solid #e2e5e8; border-radius: 12px; padding: 0; box-sizing: border-box; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); overflow: hidden; }
ol.bd_lst.bd_tmb_lst > li:hover { transform: none; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); }

/* 4. 썸네일 영역 및 이미지 비율 완벽 고정 */
ol.bd_lst.bd_tmb_lst .tmb_wrp { width: 100%; height: 200px; position: relative; margin: 0; background: #f5f5f5; overflow: hidden; flex-shrink: 0; }
ol.bd_lst.bd_tmb_lst .no_img.tmb { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #f1f3f5; color: #adb5bd; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }
ol.bd_lst.bd_tmb_lst img.tmb { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform 0.4s ease, filter 0.4s ease; }
ol.bd_lst.bd_tmb_lst > li:hover img.tmb { transform: scale(1.06); filter: brightness(0.93); }

/* 5. 수정 버튼 및 배지 그룹 */
ol.bd_lst.bd_tmb_lst .tmb-edit-btn { position: absolute; top: 8px; left: 8px; z-index: 6; display: flex; align-items: center; justify-content: center; width: 52px; height: 19px; padding: 0; font-size: 11px; color: #ffffff; background: #000000; border-radius: 4px; line-height: 1; text-decoration: none; }
ol.bd_lst.bd_tmb_lst .tmb-badge-group { position: absolute; bottom: 8px; right: 8px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; z-index: 5; max-width: 90%; }

/* 💡 개발자 도구 78번 줄 기본 오리지널 속성 고정 */
ol.bd_lst.bd_tmb_lst .tmb-badge { display: inline-block; padding: 2px 6px; font-size: 10px; color: #ffffff; border-radius: 4px; line-height: 1.3; white-space: nowrap; }

/* 💡 [원상복구] 원래 제작하셨던 이쁜 고유 색상 코드로 완벽 대치 */
ol.bd_lst.bd_tmb_lst .tmb-badge.bg-location { background: rgba(33, 37, 41, 0.85); }
ol.bd_lst.bd_tmb_lst .tmb-badge.bg-method-direct { background: rgba(241, 243, 245, 0.95); color: #495057; }
ol.bd_lst.bd_tmb_lst .tmb-badge.bg-method-free { background: #e74c3c; }
ol.bd_lst.bd_tmb_lst .tmb-badge.bg-method-safety { background: #667972; }
ol.bd_lst.bd_tmb_lst .tmb-badge.bg-method-parcel { background: rgba(227, 250, 252, 0.95); color: #0b7285; }
ol.bd_lst.bd_tmb_lst .tmb-badge.bg-method-all { background: rgba(243, 240, 255, 0.95); color: #5f3dc4; }

/* 6. 수정 버튼 및 배지 그룹 */
ol.bd_lst.bd_tmb_lst .tmb-edit-btn { position: absolute; top: 8px; left: 8px; z-index: 6; display: flex; align-items: center; justify-content: center; width: 52px; height: 19px; padding: 0; font-size: 11px; color: #ffffff; background: #000000; border-radius: 4px; line-height: 1; text-decoration: none; }
ol.bd_lst.bd_tmb_lst .tmb-badge-group { position: absolute; bottom: 8px; right: 8px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; z-index: 5; max-width: 90%; }
ol.bd_lst.bd_tmb_lst .tmb-badge { display: inline-block; padding: 2px 6px; font-size: 10px; color: #ffffff; border-radius: 4px; line-height: 1.3; white-space: nowrap; }

/* 7. 카드 본문 및 텍스트 요소 */
ol.bd_lst.bd_tmb_lst .card-body-content { padding: 12px; display: flex; flex-direction: column; justify-content: flex-start; gap: 3px; box-sizing: border-box; width: 100%; position: relative; overflow: hidden; }
ol.bd_lst.bd_tmb_lst .market-jj1-box { display: block; margin: 0; width: 100%; min-height: auto; }
ol.bd_lst.bd_tmb_lst .jjj5-flex { display: flex; align-items: center; justify-content: space-between; width: 100%; }
ol.bd_lst.bd_tmb_lst .price-num { font-weight: 700; font-size: 15px; color: #1a1a1a; line-height: 1.2; }
ol.bd_lst.bd_tmb_lst .jung3 { font-size: 13px; font-weight: 600; color: #1a1a1a; margin-left: 1px; }
ol.bd_lst.bd_tmb_lst .jung4 { font-size: 11px; color: #a0a0a0; line-height: 1.2; }
ol.bd_lst.bd_tmb_lst .notice-label { font-size: 11px; font-weight: bold; color: #e74c3c; background: #feeeed; padding: 2px 6px; border-radius: 4px; }
div#board_list ol.bd_lst.bd_tmb_lst li .gall-title-link { display: -webkit-box !important; -webkit-box-orient: vertical !important; -webkit-line-clamp: 2 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: normal !important; word-break: break-all; font-size: 13px; color: #2e2e2e; font-weight: 500 ; text-decoration: none ; margin: 0; line-height: 1.35; min-height: 35px; padding: 0; width: 100%; }

/* 8. 거래 상태 표시 */
ol.bd_lst.bd_tmb_lst .status-badge { inline-block; padding: 2px 6px; font-size: 11px; font-weight: bold; border-radius: 4px; line-height: 1.3; }
ol.bd_lst.bd_tmb_lst .status-badge.booking { background: #feeeed; color: #f44336; }
ol.bd_lst.bd_tmb_lst .status-badge.completed { background: none; padding: 0; font-size: 15px; font-weight: 700; color: #888; text-decoration: line-through; }

/* 9. 품절/종료 예외 및 이미지 중앙 레이어 처리 */
div#board_list ol.bd_lst.bd_tmb_lst li.is-soldout:hover img.tmb { transform: none; }
div#board_list ol.bd_lst.bd_tmb_lst li.is-soldout .tmb-edit-btn { display: none; }
div#board_list ol.bd_lst.bd_tmb_lst li.is-soldout .tmb-badge-group { display: none; }
ol.bd_lst.bd_tmb_lst .soldout-overlay { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.45); z-index: 4; align-items: center; justify-content: center; pointer-events: none; }
ol.bd_lst.bd_tmb_lst .soldout-overlay span { color: #ffffff; font-size: 14px; font-weight: 700; border: 1.5px solid #ffffff; padding: 4px 10px; border-radius: 4px; letter-spacing: 0.5px; }
div#board_list ol.bd_lst.bd_tmb_lst li.is-soldout .soldout-overlay { display: flex; }

/* 10. 제목 아래 카테고리+상세스펙 통합형 박스 */
ol.bd_lst.bd_tmb_lst .market-spec-box { display: flex !important; justify-content: flex-end !important; align-items: center !important; width: 100% !important; margin-top: 4px !important; clear: both !important; overflow: hidden !important; border: none !important; padding: 0 !important; background: transparent !important; min-height: 18px !important; }
ol.bd_lst.bd_tmb_lst .spec-car-group { display: flex !important; align-items: center !important; justify-content: flex-end !important; gap: 3px !important; width: 100% !important; max-width: 100% !important; flex-wrap: nowrap !important; }
ol.bd_lst.bd_tmb_lst .meta-item.spec-item { display: inline-flex !important; align-items: center !important; justify-content: center !important; font-size: 10px !important; color: #495057 !important; font-weight: 500 !important; background: #f1f3f5 !important; padding: 2px 5px !important; border-radius: 3px !important; line-height: 1 !important; white-space: nowrap !important; margin: 0 !important; border: none !important; height: 16px !important; box-sizing: border-box !important; }
div#board_list ol.bd_lst.bd_tmb_lst li.is-soldout .meta-item.spec-item { background: #e9ecef !important; color: #adb5bd !important; }

/* 11. 모바일 반응형 최종 (★가로 2열 그리드 및 배지 색상 절대 사수 가드 보강★) */
@media screen and (max-width: 767px) {
    /* 상단 필터 바 가로 패킹 (절대 줄바꿈 없이 한 줄 홀딩) */
    .market-filter-bar { display: flex !important; justify-content: flex-end !important; gap: 0 !important; margin: 0 2px 14px 0 !important; width: 100% !important; visibility: visible !important; opacity: 1 !important; }
    .market-filter-bar .market-filter-right-group { display: flex !important; gap: 4px !important; justify-content: flex-end !important; width: 100% !important; flex-wrap: nowrap !important; }
    .market-filter-bar .filter-group { display: flex !important; gap: 4px !important; flex-shrink: 0 !important; }
    
    .market-filter-bar .radio-toggle-btn { padding: 4px 6px !important; font-size: 10.5px !important; height: 28px !important; border-radius: 5px !important; letter-spacing: -0.4px !important; white-space: nowrap !important; }
    .market-filter-bar .radio-toggle-btn i { font-size: 11px !important; margin-left: 1px !important; }

    /* 모바일용 목록전환 스위처 매칭 */
    .market-filter-bar .view-switcher-container,
    .market-filter-bar .view-switcher-container--compact .view-switcher--compact-hidden { display: inline-flex !important; flex-shrink: 0 !important; }
    .market-filter-bar .view-switcher__list { gap: 4px !important; display: inline-flex !important; }
    .market-filter-bar .view-switcher__link { height: 28px !important; padding: 4px 6px !important; border-radius: 5px !important; }
    .market-filter-bar .view-switcher__icon { width: 12px !important; height: 12px !important; }

    /* 💡 [긴급 긴급 복구] 망가진 모바일 가로 2열 그리드 강제 구조 고정 (가로 폭 100% 보장) */
    ol.bd_lst.bd_tmb_lst { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 14px 10px !important; padding: 12px 4px !important; width: 100% !important; box-sizing: border-box !important; }
    ol.bd_lst.bd_tmb_lst > li { display: flex !important; flex-direction: column !important; width: 100% !important; padding: 0 !important; }
    ol.bd_lst.bd_tmb_lst .tmb_wrp { width: 100% !important; height: auto !important; aspect-ratio: 1 / 1 !important; }

    /* 썸네일 내부 배지 및 고유 오리지널 색상 유지 홀더 */
    ol.bd_lst.bd_tmb_lst .tmb-badge-group { display: flex !important; flex-wrap: nowrap !important; gap: 4px !important; max-width: 90% !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge { padding: 2px 5px !important; font-size: 10px !important; line-height: 1.3 !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge-group .bg-location { background: rgba(33, 37, 41, 0.85) !important; color: #ffffff !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge-group .bg-method-direct { background: rgba(241, 243, 245, 0.95) !important; color: #495057 !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge-group .bg-method-free { background: #e74c3c !important; color: #ffffff !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge-group .bg-method-safety { background: #667972 !important; color: #ffffff !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge-group .bg-method-parcel { background: rgba(227, 250, 252, 0.95) !important; color: #0b7285 !important; }
    ol.bd_lst.bd_tmb_lst .tmb-badge-group .bg-method-all { background: rgba(243, 240, 255, 0.95) !important; color: #5f3dc4 !important; }

    /* 하단 스펙 칩 가독성 제어 */
    ol.bd_lst.bd_tmb_lst .meta-item.spec-item { font-size: 9.5px !important; padding: 1.5px 3.5px !important; letter-spacing: -0.4px !important; height: 14px !important; }
    ol.bd_lst.bd_tmb_lst .meta-item.spec-item.m-hide { display: inline-flex !important; }
}
