/* ───────── 공통 레이아웃 ───────── */
.sub-layout{
  position: relative;
  width:1280px !important;
  max-width:100%;
  min-height:1200px;
}
.division{
	display:flex;
	gap:20px;
}
.filter_zone{width:220px;}
/* 헤더 + 필터 토글 버튼 정렬 */
.equip-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

/* 기본: 데스크탑에서는 필터 토글 버튼 숨김 */
.filters-toggle{
  display:none;
  border:1px solid #d7dbe2;
  border-radius:999px;
  padding:6px 12px;
  background:#fff;
  font-size:14px;
  color:#111827;
  cursor:pointer;
}

/* 필터 기본 스타일 (데스크탑 기준) */
.filters{
  margin:0;
  padding:10px;
  border:1px solid #e5e7eb;
  background:#fff;
  width:240px;

}
.filters__row{
  display:grid;
  gap:10px;
}
.filters__field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.filters__field input,
.filters__field select{
  width:100%;
  padding:8px 10px;
  border:1px solid #d7dbe2;
  border-radius:10px;
  font-size:14px;
}
.filters__label{
  font-size:12px;
  color:#4b5563;
  font-weight:bold;
}
.filter_button{
	margin-top:20px;
	text-align:center;
	width:100%;
	background:#810202;
	color:#fff;
}
.filter_btn_color{
	background:#01064f !important;
	color:#fff !important;
}
.filters__field--range{
  display:flex;
  align-items:flex-end;
  gap:6px;
}
.filters__field--range .dash{
  padding:0 2px;
  color:#6b7280;
}

.btn--ghost{
  background:#fff;
  color:#374151;
  border:1px solid #d7dbe2;
}

.filters__chips{
  margin-top:10px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid #d7dbe2;
  border-radius:999px;
  font-size:12px;
  color:#0f172a;
  text-decoration:none;
  background:#f8fafc;
}
.card__meta{
	display:flex;
	flex-direction:column;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
	min-height:65px;
	min-height:105px;
}
.meta__item{
	margin-right:0;
}
/* 필터 오버레이(기본은 숨김) */
.filters-backdrop{
  display:none;
}
.paging--equip{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:4px;
  flex-wrap:nowrap;
}

.paging--equip .page{
  display: inline-flex;              /* 핵심 */
  align-items: center;               /* 세로 중앙 */
  justify-content: center;           /* 가로 중앙 */

  min-width: 40px;
  height: 40px;                      /* 고정 높이 */
  padding: 0 10px;

  border: 1px solid #e5e7eb;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 500;
  line-height: 1;                    /* 중요 */
  background: #fff;
  color: #111827;

  box-sizing: border-box;
}


.paging--equip .page.is-active{
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.page--edge{
  font-weight:600;
}

.page--ellipsis{
  border:none;
  color:#9ca3af;
  pointer-events:none;
}

@media (max-width:768px){
  .paging--equip .page:not(.is-active):not(.page--edge){
    display:none;
  }
}

.card{border-radius:0;}
.card__body{
	min-height:100px;
	padding:8px;
}
/* ───────── Range 공통 스타일 ───────── */
.range-wrap {
  position: relative;
  padding: 4px 0 2px;
}
.range-wrap input[type="range"]{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 8px 0;
  background: transparent;
  pointer-events: auto;
}
.range-wrap input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width:16px;
  height:16px;
  border-radius:50%;
  background:#111827;
  cursor:pointer;
  border:2px solid #fff;
  box-shadow: 0 0 0 1px #111827;
}
.range-wrap input[type="range"]::-webkit-slider-runnable-track{
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
}
.range-labels{
  display:flex;
  gap:6px;
  font-size:12px;
  color:#4b5563;
  align-items:center;
}
.filter-hint{
  color:#9ca3af;
  font-size:12px;
  margin-top:4px;
}
.range-wrap.is-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  border:1px dashed #e5e7eb;
  border-radius:10px;
  background:#f9fafb;
}
.range-placeholder{
  font-size:12px;
  color:#6b7280;
  padding:6px 8px;
}


@media (max-width: 768px){

  .filters__row{
    grid-template-columns:1fr;
  }

  /* 필터 패널: 상단 60px 아래에서 시작 + 세로 스크롤 + 왼쪽 슬라이드 */
  .filters{
    position:fixed;
    top:60px;                        /* 상단에서 60px */
    left:0;
    right:auto;
    bottom:0;                        /* ← bottom:0 추가 */
    width:80%;
    max-width:340px;
    max-height:calc(100vh - 60px);   /* 여유: 혹시 브라우저 높이 꼬일 때 */
    margin:0;
    border-radius:0;
    border-right:1px solid #e5e7eb;
    box-shadow:2px 0 8px rgba(0,0,0,.08);
    transform:translateX(-100%);
    transition:transform .25s ease-out;
    z-index:1001;

    display:block;
    overflow-y:auto;                 /* ✅ 세로 스크롤 */
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch; /* iOS 관성 스크롤 */
  }

  .filters.filters--open{
    transform:translateX(0);
  }

  /* 필터 열렸을 때 배경 어둡게 */
  .filters-backdrop{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(15,23,42,0.35);
    z-index:1000;
  }
  .filters-backdrop.is-active{
    display:block;
  }

  /* 필터 열릴 때 바디/문서 스크롤 막기 */
  .no-scroll-filters{
    overflow:hidden;
  }
	.card__title{font-size:1rem;}
	.card{
		min-width:100%;
	}
	.card.card--equip, .card, .card--equip{
		border-radius:0;
	}
	.cards.cards--equip {
		gap: 50px 10px;
		grid-template-columns: repeat(2, 1fr);
	}
	.card__body{
		padding:10px 5px;
		min-height:50px;
	}
	/*.card__meta{
		display:none;
	}*/
	.card__meta span{
		display:block;
	}
	.card__price{
		border-top:none;
		background:#fff;
	}
}
/* ====== FIX: Filters aside layout ====== */

.division {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-top: 10px;
}

.filters {
    width: 220px;
    flex-shrink: 0;
}
.filters__row p{
	margin:0;
	margin-bottom:10px;
}
.searching{
	padding: 10px 14px;
    text-align: center;
    background: #b72f2f;
	color:#fff;
	font-weight:900;
}
.cards--equip {
    flex: 1;
}

/* ====== Mobile ====== */
@media (max-width: 768px) {
    .division {
        display: block;
    }

    .filters {
		padding-top:0;
        width: 100%;
    }
}
/* 데스크탑에서 filters를 sticky로 고정 */
@media (min-width: 769px){
  .filters{
    position: sticky;
    top: 20px;        /* 헤더와 간격 */
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto; /* 세로 스크롤 */
  }
}
@media (max-width: 560px){
	.cards.cards--equip {
		gap: 50px 10px;
		grid-template-columns: repeat(1, 1fr);
	}
}

/* 모바일 전용 필터 헤더 */
.filters-mobile-header{
  display: none;
}

@media (max-width: 768px){
  .filters-mobile-header{
    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;

    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 2;
  }

	/* ================================
	   Filter panel close button
	================================ */
	.filter-panel__close{
	  border:0;
	  background:none;
	  font-size:22px;
	  line-height:1;
	  cursor:pointer;
	  color:#111827;
	  padding:4px;
	}
	.filter-panel__close:hover{
	  opacity:.65;
	}

}

/* ================================
   Mobile Filter Edge Hint
================================ */
.filter-edge-hint{
  display:none;
}

@media (max-width:768px){
	.filter-edge-hint{
		display: block;
		position: fixed;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 7px;
		height: 100px;
		border-radius: 0 10px 10px 0;
		background: linear-gradient(to right, rgba(1, 6, 79, 1), rgba(1, 6, 79, .55));
		z-index: 999;
		pointer-events: none;
		animation: edgeHint 2.4s ease-in-out infinite;
	}
}

@keyframes edgeHint{
  0%   { opacity:.25; }
  50%  { opacity:.6; }
  100% { opacity:.25; }
}
.filters.filters--open ~ .filter-edge-hint{
  display:none;
}
