/* 기본 레이아웃 설정 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: #fff;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    background-color: #fff;
}

.main-content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 40px;
}

/* --- 사이드바 및 필터 --- */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
    padding-right: 20px;
}

.filter-title {
    font-size: 16px;
    font-weight: bold;
    color: #212529;
    margin: 30px 0 15px 5px;
}

.filter-title:first-child {
    margin-top: 0;
}

.city-name {
    font-size: 14px;
    color: #868e96;
    margin-bottom: 15px;
    padding-left: 12px;
}

.town-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.town-list li {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 15px;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 2px;
}

/* 불렛 포인트 아이콘 (○ -> ●) */
.town-list li::before {
    content: "○";
    margin-right: 10px;
    font-size: 12px;
    color: #adb5bd;
    flex-shrink: 0;
}

.town-list li.active {
    color: #218838 !important;
    font-weight: bold !important;
    background-color: #f1f8f3;
}

.town-list li.active::before {
    content: "●";
    color: #218838;
}

.town-list li:hover {
    background-color: #f8f9fa;
    color: #218838;
}

/* --- 검색바 섹션 --- */
.search-box {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 8px 10px 8px 25px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 0 auto;
}

.category-select {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    cursor: pointer;
    white-space: nowrap;
}

.divider {
    width: 1px;
    height: 20px;
    background-color: #dee2e6;
    margin: 0 20px;
}

#searchInput {
    flex-grow: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: #212529;
}

#searchBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #343a40;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-left: 10px;
}

#searchBtn:hover {
    background-color: #212529;
}

#clearBtn {
    display: none; /* JS에서 제어 */
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #adb5bd;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    margin-right: 10px;
}

/* --- 상품 그리드 및 카드 (리스트 형태) --- */
.product-grid-container {
    flex-grow: 1;
}

.product-grid {
    display: flex;
    flex-direction: column; /* 세로로 쌓이는 리스트 형태 */
}

.product-card {
    display: flex;
    padding: 25px 0;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

.product-card:hover {
    background-color: #fafafa;
}

.product-img-box {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px solid #f1f3f5;
}

.product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    flex-grow: 1;
    padding-left: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    font-size: 18px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 8px;
}

.product-meta {
    font-size: 14px;
    color: #868e96;
    margin-bottom: 10px;
}

.product-price-row {
    font-size: 17px;
    color: #212529;
    margin-bottom: 12px;
}

.progress-container {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin-bottom: 8px;
}

.progress-bar {
    height: 100%;
    background: #218838;
    border-radius: 3px;
}

/* 상태 제어 클래스 */
.hidden-card,
.product-card.hidden-by-limit {
    display: none !important;
}

/* --- 더보기 버튼 --- */
.load-more-container {
    margin-top: 30px;
    width: 100%;
}

.load-more-btn {
    width: 100%;
    height: 54px;
    background-color: #f1f3f5; 
    border: none;
    border-radius: 8px;
    color: #495057;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background-color: #e9ecef;
    color: #212529;
}