/* =====================================================
   searchResult.css - 상품 검색/카테고리 결과 페이지
   ===================================================== */

/* ── 전체 레이아웃 ── */
.srContainer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 0 60px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* =====================================================
   사이드바
   ===================================================== */
.srSidebar {
  width: 210px;
  flex-shrink: 0;
}

.filterBox {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 18px 16px;
  margin-bottom: 14px;
}

.filterBoxTitle {
  font-size: 14px;
  font-weight: bold;
  color: #313030;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #20c997;
}

/* 카테고리 필터 */
.cateFilterList {
  list-style: none;
}

.cateItem {
  margin-bottom: 2px;
}

.cateLink {
  display: block;
  padding: 7px 10px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.cateLink:hover {
  background: #f0fdf9;
  color: #20c997;
}

.cateLink.active {
  background: #e6f9f4;
  color: #20c997;
  font-weight: bold;
}

.mainCate {
  font-weight: 500;
  color: #313030;
}

.subCateList {
  list-style: none;
  padding-left: 10px;
  display: none;
  margin-top: 2px;
}

.subCateList.open {
  display: block;
}

.subCate {
  font-size: 12px;
  color: #777;
  padding: 5px 10px;
}

/* 가격/상태 필터 */
.optionList {
  list-style: none;
}

.optionList li {
  margin-bottom: 8px;
}

.optionLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #555;
  transition: color 0.15s;
}

.optionLabel:hover {
  color: #20c997;
}

.optionLabel input[type="radio"],
.optionLabel input[type="checkbox"] {
  accent-color: #20c997;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* =====================================================
   메인 영역
   ===================================================== */
.srMain {
  flex: 1;
  min-width: 0;
}

/* 검색 정보 바 */
.srInfoBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.srLabel {
  font-size: 15px;
  color: #555;
}

.srKeyword {
  font-size: 20px;
  font-weight: bold;
  color: #313030;
  margin-right: 4px;
}

.srCount {
  font-size: 14px;
  color: #aaa;
  margin-left: 4px;
}

.srCount em {
  color: #20c997;
  font-weight: bold;
  font-style: normal;
}

/* 정렬 버튼 */
.srSortBar {
  display: flex;
  gap: 6px;
}

.srSortBtn {
  padding: 6px 14px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 20px;
  cursor: pointer;
  color: #777;
  transition: all 0.2s;
}

.srSortBtn:hover {
  border-color: #20c997;
  color: #20c997;
}

.srSortBtn.active {
  background: #20c997;
  color: #fff;
  border-color: #20c997;
  font-weight: bold;
}

/* =====================================================
   상품 그리드
   ===================================================== */
.srProductGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.srProductCard {
  width: calc(33.333% - 13px);
  transition: transform 0.2s;
  position: relative;
}

/* 찜 버튼 */
.srWishBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 18px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: color 0.2s, transform 0.15s;
  z-index: 1;
}

.srWishBtn:hover {
  color: #ff4d6d;
  transform: scale(1.1);
}

.srWishBtn--active {
  color: #ff4d6d;
}

.srProductCard:hover {
  transform: translateY(-3px);
}

.srProductLink {
  display: block;
  text-decoration: none;
  color: #313030;
}

/* 이미지 영역 */
.srProductImg {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #f8f8f8;
}

.srProductImg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.srProductCard:hover .srProductImg img {
  transform: scale(1.05);
}

/* 판매중 뱃지 */
.srSaleBadge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #20c997;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 4px;
}

/* 거래완료 딤 오버레이 */
.srSoldDim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  border-radius: 10px;
}

/* 예약중 뱃지 */
.srReservedBadge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #f59e0b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* 거래 상태 필터 뱃지 (사이드바) */
.tradeFilterBadge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.tradeFilterBadge--sale {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

.tradeFilterBadge--reserved {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fcd34d;
}

.tradeFilterBadge--sold {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #d1d5db;
}

/* 상품 정보 */
.srProductInfo {
  padding: 10px 2px 4px;
}

.srProductTitle {
  font-size: 14px;
  color: #313030;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.srPriceRow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.srPrice {
  font-size: 17px;
  font-weight: bold;
  color: #313030;
}

.srStateBadge {
  font-size: 11px;
  color: #20c997;
  border: 1px solid #20c997;
  border-radius: 20px;
  padding: 2px 8px;
  white-space: nowrap;
}

.srPlace {
  font-size: 12px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 2px;
}

.srPlace ion-icon {
  font-size: 13px;
}

/* =====================================================
   검색 결과 없음
   ===================================================== */
.srNoResult {
  width: 100%;
  text-align: center;
  padding: 80px 0 60px;
  color: #ccc;
}

.srNoResult ion-icon {
  font-size: 64px;
  display: block;
  margin: 0 auto 16px;
}

.srNoResult p {
  font-size: 16px;
  color: #aaa;
  margin-bottom: 24px;
}

.srNoResultBtn {
  display: inline-block;
  padding: 10px 28px;
  background: #20c997;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.2s;
}

.srNoResultBtn:hover {
  background: #17a589;
}
