/* 앱 스타일로 변경된 검색 페이지 */

/* 전체 레이아웃 구조 */
#vendor_map {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 60px);
    position: relative;
    background: #fff;
}

/* 지도 영역 */
#map {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    /* 지도 스크롤 방지 */
}

/* 줌 컨트롤러 */
#zoom_controller {
    position: absolute;
    z-index: 2;
    right: 15px;
    top: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#zoom_controller>div {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#zoom_controller hr {
    margin: 0;
    padding: 0;
    border: none;
    height: 1px;
    background-color: #eee;
}

/* 지도 모드 버튼 */
.map-toggle {
    position: absolute;
    top: 20px;
    right: 70px;
    z-index: 2;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    overflow: hidden;
}

.map-toggle button {
    padding: 8px 12px;
    border: none;
    background: #fff;
    font-size: 12px;
    color: #666;
}

.map-toggle button.active {
    background: #f5f5f5;
    color: #333;
    font-weight: 500;
}

/* 목록 보기 버튼 */
.view-list-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 6px 18px;
    font-size: 13px;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 780px;
    width: auto;
}

.view-list-button i {
    font-size: 12px;
}

/* 검색 오버레이 */
#vendor_side {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 780px;
    margin: 0 auto;
    right: 0;
    background: #fff;
    z-index: 100;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 20px);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease-in-out;
}

#vendor_side.collapsed {
    transform: translateY(calc(100% - 55px));
}

/* 드래그 핸들 -> 클릭 핸들로 변경 */
.mobile-handle {
    width: 100%;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.mobile-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 4px;
}

/* 검색 영역 */
.search-wrap {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.search-basic {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 0 10px;
    height: 44px;
}

.search-basic select {
    width: 80px;
    border: none;
    background: transparent;
    font-size: 14px;
    padding: 0 5px;
    color: #333;
}

.search-basic input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 10px;
    font-size: 14px;
    color: #333;
}

.search-btn-wrap {
    margin-top: 10px;
}

#searchVendors {
    width: 100%;
    background: var(--gray-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    font-weight: 500;
}

.search-options-container {
    background: #f9f9f9;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.option-group label {
    display: block;
    font-size: 13px;
    margin-bottom: 5px;
    color: #666;
}

.option-group select {
    width: 100%;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 14px;
    background: #fff;
}

.btn-toggle-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: none;
    background: none;
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.btn-toggle-options img {
    width: 14px;
    height: 14px;
    transition: transform 0.3s;
}

.btn-toggle-options.active img {
    transform: rotate(180deg);
}

/* 목록 영역 */
.vendor_list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.sort-controls {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #f5f5f5;
}

.sort-controls button {
    background: none;
    border: none;
    color: #666;
    font-size: 13px;
    padding: 5px 10px;
    margin-right: 10px;
}

.sort-controls button.active {
    color: var(--primary-color);
    font-weight: 500;
    position: relative;
}

.sort-controls button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* 업체 목록 */
.vendor-grid {
    padding: 0 15px;
}

.vendor-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
}

.vendor-image {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.vendor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendor-info {
    flex: 1;
    padding-left: 15px;
    position: relative;
}

.vendor-info h4 {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 5px;
    color: #333;
}

.vendor-info .category-badge {
    display: inline-block;
    font-size: 11px;
    color: #fff;
    background: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.vendor-info .addr {
    font-size: 13px;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vendor-info .stats {
    position: absolute;
    right: 0;
    bottom: 0;
    font-size: 12px;
}

.vendor-info .stats .likes {
    color: #ff5252;
    display: flex;
    align-items: center;
}

.vendor-info .stats .likes i {
    margin-right: 3px;
}

/* 더보기 버튼 */
.load-more-container {
    padding: 15px;
    text-align: center;
}

#loadMoreBtn {
    background-color: #f5f5f5;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    color: #666;
    width: 100%;
}

/* 빈 결과 메시지 */
.empty-wrap {
    padding: 40px 20px;
    text-align: center;
}

.empty-wrap img {
    width: 60px;
    margin-bottom: 15px;
}

.empty-wrap p {
    font-size: 15px;
    color: #888;
    line-height: 1.5;
}

/* 마커 스타일 */
/* .marker {
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
    transition: transform 0.2s ease;
} */

.marker.small {
    transform: scale(0.8);
}

.marker.liked {
    /* background-color: #ff5252; */
}

.marker.liked.small {
    transform: scale(0.6);
}

.marker.active {
    transform: scale(1.2);
    z-index: 10;
}

/* 로딩 인디케이터 */
.loading-indicator {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.loading-indicator i {
    margin-right: 5px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* 하단 네비게이션 바 여백 */
.vendor_list {
    padding-bottom: 60px;
    /* 하단 네비게이션 바 높이만큼 여백 추가 */
}