/* ============================================
   LIST PANEL - Mobile First + 자동 반응형
   ============================================ */

/* ============ 모바일 기본 (가장 작은 화면) ============ */

.list-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    /* ✅ 자동 반응형: 화면에 따라 80vh~85vh */
    height: clamp(70vh, 83vh, 90vh);
    background: white;
    /* ✅ 자동 반응형: 화면에 따라 16px~24px */
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
    border: 0.5px solid #bbbbbb;
    box-shadow: 0 0px 10px rgba(0, 0, 0, 0.3);
    z-index: 1500;
    /* ✅ 초기 위치: 50px만 보임 */
    transform: translateY(calc(100% - 50px));
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    visibility: visible;
    pointer-events: auto;
}

/* 활성화 상태 */
.list-panel.active {
    transform: translateY(0);
}

/* 목록 헤더 */
.list-header {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    /* ✅ 헤더 하단에 고정 구분선 추가 */
    position: relative;
}

/* 헤더 하단 구분선 (스크롤해도 고정) */
.list-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: clamp(8px, 2vw, 20px);
    right: clamp(8px, 2vw, 20px);
    height: 2px;
    background: rgb(230, 230, 230);
}

/* 드래그 핸들 */
.panel-drag-handle {
    /* ✅ 자동 반응형: 36px~44px */
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    /* ✅ 자동 반응형: 6px~12px */
    margin: 0 auto 6px auto;
    cursor: grab;
    transition: background-color 0.2s ease;
}

.panel-drag-handle:hover {
    background: #bbb;
}

.panel-drag-handle:active {
    cursor: grabbing;
    background: #999;
}

/* 헤더 상단 */
.list-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 4px;
}

/* 타이틀 */
.list-title {
    /* ✅ 자동 반응형: 14px~18px */
    font-size: 15px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: clamp(2px, 1vw, 6px);
}

.list-count {
    color: rgb(0, 0, 0);
    /* ✅ 자동 반응형: 14px~18px */
    font-size: 15px;
    font-weight: 600;
}

/* 닫기 버튼 */
.list-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-round);
    transition: all var(--transition-fast);
    /* ✅ 자동 반응형: 28px~36px */
    width: clamp(28px, 8vw, 36px);
    height: clamp(28px, 8vw, 36px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-close-btn:hover {
    background: var(--background-gray);
    color: var(--text-primary);
}

/* 검색/필터 */
.list-filters {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
    flex-wrap: wrap;
}

.list-search {
    flex: 1;
    min-width: 200px;
    /* ✅ 자동 반응형: 8px~12px */
    padding: clamp(8px, 2.5vw, 12px) clamp(10px, 3vw, 14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    /* ✅ 자동 반응형: 13px~15px */
    font-size: clamp(13px, 3.5vw, 15px);
    background: var(--background-white);
}

.list-sort {
    padding: clamp(8px, 2.5vw, 12px) var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: clamp(13px, 3.5vw, 15px);
    background: var(--background-white);
    cursor: pointer;
}

/* 목록 내용 */
.list-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 clamp(8px, 2vw, 20px) clamp(8px, 2vw, 20px);
    scrollbar-width: none;
    /* Firefox 기본 숨김 */
}

/* 매물 카드 */
.property-card {
    background: transparent;
    /* ✅ 배경 투명 */
    border: none;
    /* ✅ 테두리 제거 */
    overflow: visible;
    /* ✅ overflow visible */
    cursor: pointer;
    transition: all var(--transition-normal);
    /* ✅ 가로 배치 */
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 20px 0;
    /* ✅ 좌우 패딩 제거 */
}

.property-card:active {
    transform: scale(0.98);
}

.property-card.active {
    background: rgba(76, 175, 80, 0.05);
    /* ✅ 선택시만 배경색 */
}

/* ✅ 매물 카드 사이 구분선 (원래대로 복원) */
.property-card+.property-card {
    border-top: 1px solid rgb(240, 240, 240);
    padding-top: 20px;
}

/* ✅ 매물 이미지 - 고정 크기 */
.property-image {
    width: 47%;
    aspect-ratio: 3 / 2;
    /* 171:114 = 3:2 비율 */
    flex-shrink: 0;
    align-self: center;
    /* 추가: 높이가 텍스트에 맞춰 늘어나지 않도록 */
    background: var(--background-gray);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.property-image::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: clamp(12px, 3.5vw, 14px);
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

/* ✅ 매물 카드 내용 */
.property-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.property-card-number {
    font-size: clamp(12px, 3vw, 13px);
    font-weight: 550;
    color: rgb(140, 140, 140);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    /* background-color: #ececec; */
    /* padding: 1px 8px; */
    /* border-radius: 4px; */
}

.property-card-title {
    font-size: clamp(12px, 3vw, 12px);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.property-card-address {
    font-size: clamp(12px, 3vw, 13px);
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.property-card-details {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4px;
    font-size: clamp(11px, 3vw, 12px);
    color: var(--text-secondary);
    gap: 8px;
}

.property-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.property-card-info span {
    display: flex;
    align-items: center;
    gap: 2px;
}

.property-card-price {
    font-size: clamp(15px, 4vw, 17px);
    font-weight: 700;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}

.property-card-price .price-main {
    white-space: nowrap;
}

.property-card-price .price-management {
    font-size: clamp(11px, 2.8vw, 12px);
    color: rgb(140, 140, 140);
    font-weight: 450;
    white-space: nowrap;
}

.property-card-price .deposit {
    font-size: clamp(12px, 3.2vw, 13px);
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
}

/* 매물 태그 */
.property-tags {
    display: flex;
    gap: clamp(4px, 1.5vw, 6px);
    flex-wrap: wrap;
    margin-top: 4px;
}

.property-tag {
    background: var(--primary-color);
    color: white;
    padding: clamp(2px, 0.5vw, 3px) clamp(6px, 2vw, 8px);
    border-radius: clamp(8px, 2.5vw, 10px);
    font-size: clamp(9px, 2.5vw, 10px);
    font-weight: 500;
}

.property-tag.secondary {
    background: var(--secondary-color);
}

.property-tag.warning {
    background: var(--warning-color);
}

/* 로딩/빈 상태/에러 */
.list-loading,
.list-empty,
.list-error {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(30px, 10vw, 60px);
    color: var(--text-muted);
}

.list-empty-icon {
    font-size: clamp(36px, 12vw, 56px);
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.list-empty-title {
    font-size: clamp(16px, 4.5vw, 20px);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.list-empty-message {
    font-size: clamp(13px, 3.5vw, 15px);
    line-height: 1.5;
    text-align: center;
}

.list-error-icon {
    font-size: clamp(30px, 9vw, 42px);
    margin-bottom: var(--spacing-sm);
}

.list-error-message {
    font-size: clamp(13px, 3.5vw, 15px);
    margin-bottom: var(--spacing-md);
    text-align: center;
}

.list-error-retry {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: clamp(13px, 3.5vw, 15px);
}

/* 하단 여백 */
.list-content::after {
    content: '';
    display: block;
    height: var(--spacing-lg);
}