@charset "UTF-8";
/* 기본 폰트 설정 */
html {
    font-family: 'Pretendard Variable', sans-serif;
}

/* 폼 요소에 명시적으로 폰트 적용 */
input,
button,
select,
textarea,
option {
    font-family: 'Pretendard Variable', sans-serif;
}

/* 전체 검색 컨테이너 — 공용 .container 패턴 활용 */
.search-container {
    max-width: var(--container-max, 1440px);
    margin: 0 auto;
    padding: 28px var(--container-px, 24px);
}

/* 플로팅 버튼 자리 — 본문이 1440px까지 차는 구간에서는 모서리 고정 버튼(48px, 우 24px)이 맨 오른쪽 카드 열을 덮으므로
   오른쪽 패딩을 24 + 48 + 24로 벌린다. 1560px 이상은 가운데 정렬 여백만으로 비켜난다(사용자 결정 2026-11-09, 검색 페이지만).
   하한 1080px: 그 아래에서는 72px을 내주면 결과 그리드(minmax 300px)가 2열에서 1열로 떨어져 겹침보다 손해가 크다(1060px에서 실측). */
@media (min-width: 1080px) and (max-width: 1560px) {
    .search-container {
        padding-right: 96px;
    }
}

/* 탭 스타일 — Apple 세그먼트 컨트롤 */
.search-tabs {
    margin-bottom: 0;
    border-bottom: 0;
}

.tab-list {
    position: relative;
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    padding: 3px;
    border-radius: 10px;
    border: solid 1px rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 슬라이딩 인디케이터 */
.tab-list::before {
    content: '';
    position: absolute;
    top: 3px;
    bottom: 3px;
    left: 3px;
    width: calc(50% - 3px);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 0;
}

/* 두 번째 탭 활성 → 오른쪽으로 슬라이드 */
.tab-list:has(.tab-item:nth-child(2).active)::before {
    transform: translateX(100%);
}

.tab-item {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 0;
    text-align: center;
}

.tab-item a {
    display: block;
    width: 100%;
    text-decoration: none;
    color: #888;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    transition: color 0.3s;
}

/* active 탭: 배경/보더는 인디케이터가 담당, 텍스트만 변경 */
.tab-item.active a {
    color: #1a1a1a;
    font-weight: 700;
    background: transparent;
    border-color: transparent;
}

/* 검색 배너 — 통합 카드 */
.search-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f4ff 0%, #fef9ec 100%);
    border: 1px solid rgba(7, 68, 145, 0.1);
}

/* 아이콘 */
.search-banner__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(7, 68, 145, 0.08);
    color: #074491;
    font-size: 16px;
    flex-shrink: 0;
}

/* 메시지 */
.search-banner__message {
    flex: 1;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.search-banner__message b {
    color: #074491;
}

/* CTA 버튼 */
.search-banner__cta {
    gap: 6px;
    padding: 9px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: box-shadow var(--ease-default), transform var(--ease-default);
}

.search-banner__cta:hover {
    box-shadow: var(--cta-hover-shadow);
    transform: var(--cta-hover-lift);
}

.search-banner__cta i {
    font-size: 11px;
    transition: transform 0.2s;
}

.search-banner__cta:hover i {
    transform: translateX(2px);
}

/* ---- 자동 교정 배너 (소프트 디바이더) ---- */
.auto-correction-banner {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

/* 좌측 하단 AI 액센트 그라데이션 라인 */
.auto-correction-banner::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, var(--ai-accent, #3B82F6), transparent);
}

.auto-correction-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-correction-icon {
    color: var(--ai-accent, #3B82F6);
    font-size: 15px;
    animation: auto-correction-pulse 2.5s infinite alternate;
}

@keyframes auto-correction-pulse {
    0%   { text-shadow: 0 0 4px rgba(59, 130, 246, 0.2); opacity: 0.8; }
    100% { text-shadow: 0 0 12px rgba(59, 130, 246, 0.6); opacity: 1; }
}

.auto-correction-text {
    font-size: 15px;
    color: var(--text-main, #1A1A1A);
}

.auto-correction-highlight {
    font-weight: 800;
    color: var(--ai-accent, #3B82F6);
    margin-right: 2px;
}

.auto-correction-revert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sub, #666);
    background: rgba(0, 0, 0, 0.03);
    border: none;
    border-radius: var(--radius-full, 9999px);
    padding: 6px 12px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--ease-default, 0.2s ease);
}

.auto-correction-revert i {
    font-size: 11px;
}

.auto-correction-revert:hover {
    color: var(--text-main, #1A1A1A);
    background: rgba(0, 0, 0, 0.07);
}

/* 검색 콘텐츠 레이아웃 */
.search-content {
    display: flex;
    gap: 40px;
}

/* 사이드바 필터 */
.search-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    --search-filter-option-font-size: 14px;
    --search-filter-option-font-weight: 400;
    --search-filter-option-color: #777;
    --search-filter-option-color-active: #074491;
}

.search-filter-drawer {
    display: contents;
}

.search-filter-drawer__head,
.search-filter-drawer__foot,
.search-filter-selected__open {
    display: none;
}

/* 선택된 필터 */
.search-filter-selected {
    margin-bottom: 0;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1);
}

.search-filter-selected__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 6px 8px 12px;
}

.search-filter-selected__meta {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.search-filter-selected__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.search-filter-selected__toggle {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.search-filter-selected__title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.search-filter-selected__count {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 5px;
    background: #074491;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-filter-selected__chevron {
    margin-left: auto;
    width: 18px;
    height: 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    transform: rotate(180deg);
    transition: transform 0.2s ease;
}

.search-filter-selected.is-collapsed .search-filter-selected__chevron {
    transform: rotate(0deg);
}

.search-filter-selected__reset {
    display: none;
    border: 0;
    background: #eaedef;
    color: #777;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    padding: 1px 4px 1px 2px;
    border-radius: 5px;
    align-items: center;
    gap: 6px;
}

.search-filter-selected:not(.is-empty) .search-filter-selected__reset {
    display: inline-flex;
}

.search-filter-selected__reset:hover {
    color: #333;
}

.search-filter-selected__reset-icon {
    transform: rotate(75deg);
    display: inline-block;
}

.search-filter-selected__body {
    padding: 10px 12px 12px;
    border-top: 1px solid #f0f0f0;
}

.search-filter-selected.is-collapsed .search-filter-selected__body {
    display: none;
}

.search-filter-selected.is-empty .search-filter-selected__body {
    display: none;
}

.search-filter-selected__group + .search-filter-selected__group {
    margin-top: 10px;
}

.search-filter-selected__group-title {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    margin-bottom: 6px;
}

.search-filter-selected__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f3f5;
    color: #555;
    font-size: 13px;
    font-weight: 600;
    max-width: 100%;
}

.search-filter-chip__text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 220px;
}

.search-filter-chip__separator {
    font-size: 8px;
    line-height: 1;
    opacity: 0.5;
    flex-shrink: 0;
}

.search-filter-chip__remove {
    border: 0;
    background: transparent;
    color: #888;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    font-size: 16px;
}

.search-filter-chip__remove:hover {
    color: #333;
}

.filter-group {
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background-color: #fff;
    padding: 14px 16px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.1);
}

.filter-group--cluster {
    gap: 24px;
}

.filter-group--cluster-item {
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
}

.filter-section + .filter-group {
    padding-bottom: 12px;
}

.filter-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group h4 {
    margin: 0;
    color: #444;
}

.filter-group .help-icon {
    position: relative;
    cursor: pointer;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #777777;
    color: #777777;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    user-select: none;
    transition: background-color 0.2s;
}

.filter-group .help-icon .tooltip {
    visibility: hidden;
    opacity: 0;
    width: auto;
    white-space: nowrap;
    background-color: #fff;
    color: #777;
    padding: 10px 12px;
    border-radius: 6px;
    border: solid 1px #777;
    font-size: 14px;
    font-weight: normal;
    text-align: left;
    position: absolute;
    z-index: 10;
    bottom: 150%;
    left: 115px;
    transform: translateX(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.filter-group .help-icon:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* 체크박스 커스터마이징 */
.filter-option {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-option input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.filter-option label {
    color: var(--search-filter-option-color);
    padding-left: 24px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    font-size: var(--search-filter-option-font-size);
    font-weight: var(--search-filter-option-font-weight);
}

.filter-option label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 15.2px;
    height: 15.2px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: #fff;
}

.filter-option input[type="checkbox"]:checked + label:before {
    background-color: #074491;
    border-color: #074491;
}

.filter-option input[type="checkbox"] + label:after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #cccccc;
    font-size: 12px;
}

.filter-option input[type="checkbox"]:checked + label:after {
    color: white;
}

.filter-option input[type="checkbox"]:checked + label,
.filter-option input[type="radio"]:checked + label {
    color: var(--search-filter-option-color-active);
    font-weight: 700;
}

.region-select {
    margin-bottom: 4px;
}

.filter-group select {
    width: 100%;
    padding: 7px 10px 7px 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    margin-bottom: 4px;
    font-size: 14px;
    color: #777777;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px; /* 아이콘을 위한 여백 확보 */
}

/* 장르 계층 구조 스타일 */
.genre-hierarchy {
    margin-top: 0;
}

.genre-category {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    overflow: visible;
}

.genre-category + .genre-category {
    border-top: 1px solid rgba(204, 204, 204, 0.4);
    padding-top: 3px;
    margin-top: 4px;
}

.genre-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
    background-color: transparent;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: none;
}

.genre-header:hover {
    background-color: transparent;
}

.genre-header.collapsed {
    border-bottom: none;
}

.genre-toggle {
    margin-left: auto;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 16px;
    transition: transform 0.3s ease;
    display: inline-block;
    transform: rotate(180deg);
}

.genre-header.collapsed .genre-toggle {
    transform: rotate(0deg);
}

.genre-name {
    font-weight: 700;
    color: #777;
    font-size: 14px;
}

.genre-header.active .genre-name {
    color: #074491;
    font-weight: 700;
}

.genre-subcategories {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.genre-subcategories.expanded {
    max-height: var(--genre-content-height, 400px);
}

.genre-option {
    position: relative;
    display: flex;
    align-items: center;
    margin-top: 4px;
    padding: 0;
    border-bottom: none;
    transition: background-color 0.2s ease;
}

.genre-option:last-child {
    border-bottom: none;
    margin-bottom: 4px;
}

.genre-option:hover {
    background-color: transparent;
}

.genre-option input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.genre-option label {
    color: var(--search-filter-option-color);
    padding-left: 24px;
    cursor: pointer;
    position: relative;
    display: inline-block;
    font-size: var(--search-filter-option-font-size);
    font-weight: var(--search-filter-option-font-weight);
}

.genre-option label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 15.2px;
    height: 15.2px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: #fff;
}

.genre-option input[type="checkbox"]:checked + label:before {
    background-color: #074491;
    border-color: #074491;
}

.genre-option input[type="checkbox"] + label:after {
    content: '✓';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: #cccccc;
    font-size: 12px;
}

.genre-option input[type="checkbox"]:checked + label:after {
    color: white;
}

.genre-option input[type="checkbox"]:checked + label {
    color: var(--search-filter-option-color-active);
    font-weight: 700;
}

.genre-option input[type="checkbox"]:indeterminate + label:before {
    background-color: #074491;
    border-color: #074491;
}

.genre-option input[type="checkbox"]:indeterminate + label:after {
    content: '━';
    color: white;
    font-size: 10px;
    font-weight: 700;
    left: 3px;
}

.genre-option input[type="checkbox"]:indeterminate + label {
    color: var(--search-filter-option-color-active);
    font-weight: 600;
}

/* 슬라이더 스타일 */
.time-slider {
    margin-top: 0;
    margin-bottom: 0;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 5px;
    margin: 14px 0;
}

.slider {
    position: absolute;
    width: 100%;
    height: 2px;
    background: transparent;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    pointer-events: none;
    z-index: 30;
    margin: 0;
    padding: 0;
}

/* 최소값 슬라이더가 최대값 슬라이더보다 위에 오도록 z-index 조정 */
#minTimeSlider, #minPriceSlider {
    z-index: 31;
}

.slider-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    z-index: 10;
    pointer-events: none;
}

.slider-range {
    position: absolute;
    top: 0;
    height: 2px;
    background-color: #074491;
    z-index: 20;
    pointer-events: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #eaedef;
    cursor: pointer;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    position: relative;
    z-index: 40;
}

.slider::-moz-range-thumb {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #eaedef;
    cursor: pointer;
    box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
    pointer-events: auto;
    position: relative;
    z-index: 40;
}

.time-range, .price-range {
    /* display: flex; */
    display: none;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* 공연시간 범위 입력 스타일 */
.time-range-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
}

.time-input-container {
    position: relative;
    width: 45%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 12px;
    background-color: white;
}

.time-input {
    width: 70%;
    border: none;
    outline: none;
    font-size: 14px;
    padding: 0;
}

.time-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

.price-range-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
}

.price-input-container {
    position: relative;
    width: 50%;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px 12px;
}

.price-input {
    width: 70%;
    border: none;
    outline: none;
    font-size: 12px;
    color: #074491;
    padding: 0;
}

.price-unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 14px;
}

.range-separator {
    font-size: 16px;
    color: #666;
    margin: 0 4px 0 5px;
}

/* 포커스 상태 스타일 */
.time-input-container:focus-within {
    border-color: #0066FF;
    box-shadow: 0 0 0 2px rgba(0, 102, 255, 0.1);
}

/* 검색 결과 */
.search-results {
    flex: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.results-title-section {
    display: flex;
    flex-direction: column;
    align-items: baseline;
    gap: 4px;
}

.results-actions {
    align-self: flex-end;
    cursor: pointer;
}

/* 기존 기본 셀렉트 스타일은 커스텀 드롭다운으로 대체 */

/* 정렬 드롭다운 (커스텀) */
.search-sort {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-sort__button {
    position: relative;
    padding: 0 22px 0 0;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: normal;
    color: #444;
    cursor: pointer;
    line-height: normal;
}

.search-sort__label {
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
}

.search-sort__chevron {
    position: absolute;
    right: 2px;
    top: 50%;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 0 6px;
    border-color: #444 transparent transparent transparent;
    transform: translateY(-35%) rotate(0deg);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.search-sort.is-open .search-sort__chevron {
    transform: translateY(-35%) rotate(180deg);
}

.search-sort__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 100px;
    padding: 6px 0px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #ffffff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
    z-index: 10;
    display: none;
}

.search-sort.is-open .search-sort__menu {
    display: block;
}

.search-sort__option {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 4px 11px;
    font-size: 14px;
    font-weight: normal;
    color: #444;
    cursor: pointer;
}

.search-sort__option:hover,
.search-sort__option--active {
    background-color: #ececec;
    color: #2f2f2f;
}


.project-select-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #ffd95a;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
}

.project-select-btn i {
    font-size: 12px;
}

.results-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

.results-header h3 > i {
    font-size: 12px;
}

.results-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px 24px;
    margin-bottom: 50px;
}

/* ---- 조건 완화 추천 영역 (기본 결과·빈 결과 아래) ---- */
/* margin-top은 앞 .results-grid의 margin-bottom(50px)과 겹쳐 50px — 빈 결과 뒤 간격은 아래 인접 규칙이 정한다 */
.search-supplement {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--gray-200);
}

/* 빈 결과 안내(.search-empty--with-supplement, 하단 여백 36px) 뒤에서는 여백이 겹치지 않아 추가 margin을 뺀다 */
.search-empty--with-supplement + .search-supplement {
    margin-top: 0;
}

.search-shelf__tools {
    display: flex;
    gap: 6px;
}

/* .pp-nav-btn--sm(partner-detail.css)과 같은 모양 — 그 파일은 검색 페이지에 실리지 않는다 */
.search-shelf__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    background: #FFFFFF;
    font-size: 11px;
    color: var(--gray-600);
    transition: border-color var(--ease-default);
}

.search-shelf__nav:hover { border-color: var(--gray-400); }
.search-shelf__nav:disabled { opacity: 0.4; pointer-events: none; }

/* 4.5장이 보이게 — 반쯤 걸친 카드가 옆으로 넘길 수 있다는 표시다.
   overflow-x: auto가 세로도 잘라서, 패딩으로 호버 리프트·그림자 자리를 두고 좌우 패딩만큼 음수 margin으로 카드 x를 결과 그리드에 맞춘다.
   contain: inline-size가 없으면 카드 폭(%)이 .search-results(flex 아이템)의 최소 폭으로 번져 결과 열이 화면 밖까지 늘어난다 */
.search-shelf {
    --search-shelf-gap: 16px;
    contain: inline-size;
    display: flex;
    gap: var(--search-shelf-gap);
    margin-inline: -12px;
    padding: 8px 12px 20px;
    scroll-padding-inline: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.search-shelf > * {
    flex: 0 0 calc((100% - 4 * var(--search-shelf-gap)) / 4.5);
    min-width: 0;
    scroll-snap-align: start;
}

/* 결과 열이 좁아지면 장수를 줄여 카드가 190px 아래로 줄지 않게 한다 (768px 이하는 아래 모바일 규칙) */
@media (max-width: 1280px) {
    .search-shelf > * { flex-basis: calc((100% - 3 * var(--search-shelf-gap)) / 3.5); }
}

@media (max-width: 1080px) {
    .search-shelf > * { flex-basis: calc((100% - 2 * var(--search-shelf-gap)) / 2.5); }
}

@media (max-width: 880px) {
    .search-shelf > * { flex-basis: calc((100% - var(--search-shelf-gap)) / 1.5); }
}

.search-rec {
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    transition: transform var(--ease-default), box-shadow var(--ease-default);
}

.search-rec:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-card);
}

.search-rec__thumb {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--gray-100);
}

.search-rec__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-rec__flag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 10px;
    border-radius: var(--radius-md);
    background: var(--accent-orange-soft);
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-orange);
}

.search-rec__body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
    padding: 14px;
}

.search-rec__lead {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-rec__name,
.search-rec__tagline {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.search-rec__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
}

.search-rec__tagline {
    font-size: 13px;
    color: var(--text-desc);
}

.search-rec__meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.search-rec__price {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
}

.search-rec__price small {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
}

.search-rec__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.search-rec__rating {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-main);
}

.search-rec__rating i { color: var(--accent-star); }
.search-rec__rating strong { font-weight: 700; }
.search-rec__count { font-size: 13px; color: var(--text-desc); }

.search-rec__go,
.search-shelf__all-go {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--on-primary);
}

.search-rec__go {
    width: 28px;
    height: 28px;
    font-size: 11px;
}

/* 줄 끝 타일 — 푼 조건을 실제 필터에서 빼고 전체 결과로 간다 */
.search-shelf__all {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-main);
    text-align: center;
    word-break: keep-all;
    transition: border-color var(--ease-default), color var(--ease-default);
}

.search-shelf__all:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.search-shelf__all-go {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

/* ---- 결과 카드 (공용 .card 확장) ---- */
.result-item {
    border-radius: var(--radius-xl); /* 12px — 검색 카드는 좀 더 둥글게 */
    cursor: pointer;
    text-align: left;
}

/* 이미지 하단 그라데이션 — 배지 가독성 확보 */
.result-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.18) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.match-reason-badges {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 2;
    pointer-events: none;
}

.match-reason-badge {
    padding: 4px 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 12px;
    font-weight: 600;
    color: #444;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* 이미지 슬라이더 — 검색 전용 */
.image-slider {
    width: 100%;
    height: 100%;
}

.image-slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item:hover .image-slider img {
    transform: scale(1.04);
}

/* 좋아요 카운트 — 검색 전용 장식 */
.like-count {
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    margin: 0;
    line-height: 1;
}

.show-img-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    cursor: pointer;
    z-index: 2;
    background: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    padding: 0;
}

.show-img-btn img {
    display: block;
    width: auto;
    height: auto;
}

.show-img-btn.left {
    left: 10px;
}

.show-img-btn.right {
    right: 10px;
}

.result-image:hover .show-img-btn {
    opacity: 1;
    pointer-events: auto;
}

/* 타이포그래피 오버라이드 — 검색 카드는 약간 큰 사이즈 */
.result-category {
    color: #828c94;
    font-size: 13px;
    font-weight: 500;
}

.result-title {
    font-size: 16px;
    color: #333;
}

.result-description {
    color: #777;
}

.result-rating {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
    gap: 2px;
    position: relative;
}

.star-image {
    width: 18px;
    height: 18px;
}

.show-star-text {
    color: #444;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.review-count {
    color: #999;
    font-size: 13px;
    margin-left: 6px;
}

.result-price {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-weight: 700;
    color: var(--action-blue);
    white-space: nowrap;
    font-size: 15px;
}

.result-price-config {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-desc);
}

.result-price small {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-desc);
}

/* 프로젝트 기반 가격 표시 스타일 */
.price-breakdown {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    font-weight: normal;
}

.adjusted-price {
    color: #e74c3c;
    font-weight: bold;
    margin-top: 2px;
}

.base-price {
    color: #333;
    font-weight: bold;
}

/* 적용된 옵션 표시 스타일 */
.applied-options {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid #eee;
    max-width: 200px;
}

.applied-option {
    font-size: 0.75em;
    color: #666;
    display: block;
    margin-bottom: 2px;
    text-align: right;
    line-height: 1.2;
}

.applied-option:last-child {
    margin-bottom: 0;
}

/* 태그는 공용 .card__tag 사용, 검색 전용 오버라이드만 남김 */

.no-results {
    margin-bottom: 50px;
    text-align: center;
}

/* ---- 로딩 상태 ---- */
/* Keeps the footer below the fold until results replace the spinner; otherwise it paints in view and is shoved out (CLS). */
.search-results:has(> .search-loading) {
    min-height: 100svh;
}

.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 20px;
    gap: 20px;
}

.search-loading__spinner {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-loading__ring {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: #074491;
    border-radius: 50%;
    animation: search-spin 0.8s linear infinite;
}

@keyframes search-spin {
    to { transform: rotate(360deg); }
}

.search-loading__text {
    margin: 0;
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

/* ---- 스크롤 로딩 표지 (결과 그리드 아래) ---- */
.search-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
}

.search-more--done {
    min-height: 0;
}

.search-loading__spinner--sm {
    width: 28px;
    height: 28px;
}

.search-loading__spinner--sm .search-loading__ring {
    width: 22px;
    height: 22px;
    border-width: 2px;
}

.search-more__retry {
    padding: 10px 20px;
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-xl);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    transition: border-color var(--ease-default), color var(--ease-default);
}

.search-more__retry:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ---- 빈 결과 상태 ---- */
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 72px 20px;
    gap: 4px;
}

.search-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.04);
    color: #bbb;
    font-size: 22px;
    margin-bottom: 12px;
}

.search-empty__primary {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #444;
}

.search-empty__secondary {
    margin: 0;
    font-size: 14px;
    color: #888;
}

/* 아래 조건 완화 추천의 첫 카드가 1440×900 첫 화면에 들어오도록 줄인 안내 */
.search-empty--with-supplement {
    padding: 36px 20px;
}

.search-empty--with-supplement .search-empty__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 8px;
}

/* ================================================
   다크모드
   body.theme-dark 셀렉터, artisthub-base.css 토큰 활용
   ================================================ */

/* ---- 탭 ---- */
body.theme-dark .tab-list {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.theme-dark .tab-list::before {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25),
                inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
}

body.theme-dark .tab-item a {
    color: var(--text-sub);
}

body.theme-dark .tab-item.active a {
    color: #60A5FA;
    background: transparent;
    border-color: transparent;
}

/* ---- 사이드바 ---- */
body.theme-dark .search-sidebar {
    --search-filter-option-color: #B4C0CF;
    --search-filter-option-color-active: #60A5FA;
}

/* ---- 선택된 필터 영역 ---- */
body.theme-dark .search-filter-selected {
    background: var(--surface-1);
    border-color: var(--border-default);
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
}

body.theme-dark .search-filter-selected__title {
    color: var(--text-main);
}

body.theme-dark .search-filter-selected__count {
    background: #3B82F6;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.3);
}

body.theme-dark .search-filter-selected__body {
    border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .search-filter-selected__reset {
    background: var(--surface-3);
    color: var(--text-sub);
}

body.theme-dark .search-filter-selected__reset:hover {
    color: var(--text-main);
}

body.theme-dark .search-filter-selected__group-title {
    color: var(--text-sub);
}

body.theme-dark .search-filter-selected__chevron {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238A9DB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ---- 필터 칩 ---- */
body.theme-dark .search-filter-chip {
    background: var(--surface-3);
    color: var(--text-muted);
}

body.theme-dark .search-filter-chip__remove {
    color: var(--text-sub);
}

body.theme-dark .search-filter-chip__remove:hover {
    color: var(--text-main);
}

/* ---- 필터 그룹 ---- */
body.theme-dark .filter-group {
    background-color: var(--surface-1);
    border-color: var(--border-default);
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
}

body.theme-dark .filter-group h4 {
    color: var(--text-main);
}

body.theme-dark .filter-group .help-icon {
    border-color: var(--text-sub);
    color: var(--text-sub);
}

body.theme-dark .filter-group .help-icon .tooltip {
    background-color: var(--surface-2);
    color: var(--text-sub);
    border-color: var(--border-default);
}

/* ---- 체크박스 (filter-option / genre-option) ---- */
body.theme-dark .filter-option label:before,
body.theme-dark .genre-option label:before {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}

body.theme-dark .filter-option input[type="checkbox"]:checked + label:before,
body.theme-dark .genre-option input[type="checkbox"]:checked + label:before {
    background-color: #3B82F6;
    border-color: #60A5FA;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.35);
}

/* 미체크 상태: 체크 아이콘 숨김 */
body.theme-dark .filter-option input[type="checkbox"] + label:after,
body.theme-dark .genre-option input[type="checkbox"] + label:after {
    color: transparent;
}

/* 체크 상태: 밝은 흰색 체크 아이콘 */
body.theme-dark .filter-option input[type="checkbox"]:checked + label:after,
body.theme-dark .genre-option input[type="checkbox"]:checked + label:after {
    content: '✔';
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    left: 3px;
}

/* indeterminate 상태: 반투명 활성 + 대시 아이콘 */
body.theme-dark .genre-option input[type="checkbox"]:indeterminate + label:before {
    background-color: #3B82F6;
    border-color: #60A5FA;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.35);
}

body.theme-dark .genre-option input[type="checkbox"]:indeterminate + label:after {
    content: '━';
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    left: 3px;
}

body.theme-dark .genre-option input[type="checkbox"]:indeterminate + label {
    color: var(--text-sub);
    font-weight: 600;
}

/* ---- 셀렉트 ---- */
body.theme-dark .filter-group select {
    background-color: var(--surface-2);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-sub);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A9DB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ---- 장르 계층 구조 ---- */
body.theme-dark .genre-category + .genre-category {
    border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .genre-name {
    color: var(--text-sub);
}

body.theme-dark .genre-header.active .genre-name {
    color: #60A5FA;
}

body.theme-dark .genre-toggle {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A9DB8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ---- 슬라이더 ---- */
body.theme-dark .slider-track {
    background-color: rgba(255, 255, 255, 0.15);
    height: 3px;
}

body.theme-dark .slider-range {
    background-color: #60A5FA;
    height: 3px;
    box-shadow: 0 0 4px rgba(96, 165, 250, 0.3);
}

body.theme-dark .slider::-webkit-slider-thumb {
    background: #60A5FA;
    width: 12px;
    height: 12px;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.4);
}

body.theme-dark .slider::-moz-range-thumb {
    background: #60A5FA;
    width: 12px;
    height: 12px;
    box-shadow: 0 0 6px rgba(96, 165, 250, 0.4);
}

/* ---- 시간/가격 입력 ---- */
body.theme-dark .time-input-container,
body.theme-dark .price-input-container {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
}

body.theme-dark .time-input,
body.theme-dark .price-input {
    background: transparent;
    color: #93C5FD;
}

body.theme-dark .time-unit,
body.theme-dark .price-unit {
    color: #B4C0CF;
}

body.theme-dark .range-separator {
    color: #B4C0CF;
}

body.theme-dark .time-input-container:focus-within,
body.theme-dark .price-input-container:focus-within {
    border-color: #60A5FA;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.25);
}

/* ---- 검색 배너 ---- */
body.theme-dark .search-banner {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    border-color: rgba(96, 165, 250, 0.15);
}

body.theme-dark .search-banner__icon {
    background: rgba(96, 165, 250, 0.12);
    color: #60A5FA;
}

body.theme-dark .search-banner__message {
    color: var(--text-main);
}

body.theme-dark .search-banner__message b {
    color: #60A5FA;
}

body.theme-dark .search-banner__cta {
}

/* 다크모드 호버는 --cta-hover-shadow 토큰이 자동 적용 */

/* ---- 자동 교정 배너 ---- */
body.theme-dark .auto-correction-banner {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

body.theme-dark .auto-correction-banner::after {
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

body.theme-dark .auto-correction-highlight {
    background: linear-gradient(135deg, #60A5FA, #3B82F6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.theme-dark .auto-correction-revert {
    color: var(--text-sub);
    background: rgba(255, 255, 255, 0.03);
}

body.theme-dark .auto-correction-revert:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

/* ---- 결과 헤더 ---- */
body.theme-dark .results-header h3 {
    color: var(--text-main);
}

body.theme-dark .results-header p {
    color: var(--text-sub);
}

/* ---- 정렬 드롭다운 ---- */
body.theme-dark .search-sort__button {
    color: var(--text-sub);
}

body.theme-dark .search-sort__chevron {
    border-color: var(--text-sub) transparent transparent transparent;
}

body.theme-dark .search-sort__menu {
    background-color: var(--surface-2);
    border-color: var(--border-default);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body.theme-dark .search-sort__option {
    color: var(--text-sub);
}

body.theme-dark .search-sort__option:hover,
body.theme-dark .search-sort__option--active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}

/* ---- 결과 카드 다크모드 (공용 .card 다크모드 외 오버라이드만) ---- */
body.theme-dark .result-image::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.35) 0%, transparent 100%);
}

body.theme-dark .result-price {
    color: var(--action-blue-text);
}

body.theme-dark .base-price {
    color: var(--text-main);
}

body.theme-dark .show-star-text {
    color: var(--text-main);
}

body.theme-dark .review-count {
    color: var(--text-sub);
}

body.theme-dark .adjusted-price {
    color: #f87171;
}

body.theme-dark .original-price {
    color: var(--text-desc);
}

body.theme-dark .applied-options {
    border-color: rgba(255, 255, 255, 0.06);
}

body.theme-dark .applied-option {
    color: var(--text-sub);
}

/* 좋아요 다크모드 → 공용 .card__like가 처리 */

/* ---- 매칭 배지 ---- */
body.theme-dark .match-reason-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-main);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* 태그 다크모드 → 공용 .card__tag가 처리 */

/* ---- 로딩 상태 ---- */
body.theme-dark .search-loading__ring {
    border-color: rgba(255, 255, 255, 0.08);
    border-top-color: #60A5FA;
}

body.theme-dark .search-loading__text {
    color: var(--text-sub);
}

/* ---- 빈 결과 ---- */
body.theme-dark .no-results {
    color: var(--text-sub);
}

body.theme-dark .search-empty__icon {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-desc);
}

body.theme-dark .search-empty__primary {
    color: var(--text-main);
}

body.theme-dark .search-empty__secondary {
    color: var(--text-sub);
}

body.theme-dark .search-supplement {
    border-top-color: var(--border-default);
}

body.theme-dark .search-shelf__nav,
body.theme-dark .search-rec {
    background: var(--surface-1);
    border-color: var(--border-default);
}

body.theme-dark .search-shelf__all,
body.theme-dark .search-more__retry {
    border-color: var(--border-default);
}

/* ---- 검색 페이지 전용: 헤더 검색바 확대 ---- */
.header-search .search-bar {
    max-width: 600px;
}

/* 검색 결과 — 출장비 옵션 포함 태그 */
.region-option-tag {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 2px;
    background: rgba(59, 130, 246, 0.12);
    color: var(--ai-accent);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 600;
    white-space: nowrap;
}

/* 폰 — 탭과 선택된 필터 바는 본문에 남고, 필터 그룹만 전체 화면 서랍(sidebar/filter-drawer.js)으로 연다 */
@media (max-width: 768px) {
    .search-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 16px 16px 48px;
    }

    .search-page-search:not(:has(*)) {
        display: none;
    }

    .search-page-search :is(.header-search, .search-bar) {
        max-width: none;
    }

    .search-content {
        flex-direction: column;
        gap: 16px;
    }

    .search-sidebar {
        width: 100%;
    }

    .search-filter-selected__header {
        padding: 8px 8px 8px 12px;
    }

    .search-filter-selected__open {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 32px;
        padding: 0 12px;
        border: 1px solid #074491;
        border-radius: 16px;
        background: #fff;
        color: #074491;
        font-size: 13px;
        font-weight: 600;
    }

    .search-filter-drawer {
        position: fixed;
        inset: 0;
        z-index: var(--z-modal);
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 0 16px;
        overflow-y: auto;
        overscroll-behavior: contain;
        background: #f5f6f8;
        visibility: hidden;
        transform: translateX(100%);
        transition: transform 0.25s ease, visibility 0s linear 0.25s;
    }

    .search-sidebar[data-filters="open"] .search-filter-drawer {
        visibility: visible;
        transform: none;
        transition: transform 0.25s ease;
    }

    body:has(.search-sidebar[data-filters="open"]) {
        overflow: hidden;
    }

    .search-filter-drawer__head {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin: 0 -16px;
        padding: 12px 16px;
        border-bottom: 1px solid #ebebeb;
        background: #fff;
        font-size: 17px;
    }

    .search-filter-drawer__close {
        padding: 0 4px;
        border: 0;
        background: none;
        color: #555;
        font-size: 28px;
        line-height: 1;
    }

    .search-filter-drawer__foot {
        position: sticky;
        bottom: 0;
        z-index: 1;
        display: block;
        flex: none;
        margin: 0 -16px;
        padding: 10px 16px 12px;
        border-top: 1px solid #ebebeb;
        background: #fff;
    }

    .search-filter-drawer__done {
        width: 100%;
        height: 48px;
        border-radius: 10px;
        font-size: 15px;
    }

    :is(.filter-option, .genre-option) label {
        flex: 1;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .search-banner {
        flex-wrap: wrap;
    }

    .search-banner__cta {
        flex: 1 1 100%;
        justify-content: center;
    }

    .auto-correction-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .search-supplement {
        margin-top: 40px;
        padding-top: 24px;
    }

    .search-shelf__tools {
        display: none;
    }

    /* 줄이 .search-container 좌우 패딩(16px)까지 번져 나간다 — 그 패딩과 같은 값 */
    .search-shelf {
        --search-shelf-gap: 12px;
        margin: 0 -16px;
        padding-inline: 16px;
        scroll-padding-inline: 16px;
    }

    .search-shelf > * {
        flex-basis: 78%;
    }
}

/* header-menu.js moves the header search into this slot at <=640px only after first paint; hold its 48px (.search-bar input) so the page does not jump. */
@media (max-width: 640px) {
    .search-page-search:not(:has(*)) {
        display: block;
        min-height: 48px;
    }
}
