/* ───────── 공통 레이아웃 ───────── */
.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:#f1830c;
	color:#fff;
}
.filter_btn_color{
	background:#033047 !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 Search Filter Trigger
================================ */
.filter-edge-hint {
  display: none;
}

@media (max-width: 768px) {
  .filter-edge-hint {
    position: fixed;
    right: 16px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    left: 16px;
    z-index: 980;
    min-height: 54px;
    padding: 8px 10px 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--ex-color-navy-900, #0b253a), #123b57);
    color: #fff;
    box-shadow: 0 16px 34px rgba(7, 26, 43, 0.28);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  }

  .filter-edge-hint:active {
    transform: scale(0.98);
  }

  .filter-edge-hint.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
  }

  .filter-edge-hint__icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ex-color-orange-500, #f1692f);
    color: #fff;
    font-size: 15px;
  }

  .filter-edge-hint__label {
    line-height: 1.2;
  }

  .filter-edge-hint__count {
    min-width: 25px;
    height: 25px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--ex-color-navy-900, #0b253a);
    font-size: 12px;
    font-weight: 900;
  }

  .filters {
    top: 64px;
    bottom: 0;
    width: calc(100% - 24px);
    max-width: 380px;
    max-height: calc(100dvh - 64px);
    padding: 0 18px 28px;
    border: 0;
    border-radius: 0 22px 22px 0;
    background: #fff;
    box-shadow: 18px 0 54px rgba(7, 26, 43, 0.22);
  }

  .filters-mobile-header {
    margin: 0 -18px 20px;
    min-height: 60px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--ex-color-border, #dfe5ea);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
  }

  .filters-mobile-header strong {
    color: var(--ex-color-navy-900, #0b253a);
    font-size: 18px;
    font-weight: 800;
  }

  .filter-panel__close {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--ex-color-border, #dfe5ea);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ex-color-surface-soft, #f5f7f9);
    color: var(--ex-color-navy-900, #0b253a);
    font-size: 24px;
  }

  .filters-backdrop {
    inset: 64px 0 0;
    background: rgba(7, 26, 43, 0.58);
    backdrop-filter: blur(2px);
  }

  .paging--equip {
    margin-bottom: 82px;
  }
}
