@charset "utf-8";

/* ============================== 토큰 */
:root {
	--pl-navy: #1e3a5f;
	--pl-text: #1f2937;
	--pl-muted: #6b7280;
	--pl-light: #9aa4b2;
	--pl-line: #e5e9ef;
	--pl-accent: #2f6fb5;
	--pl-thumb-bg: #f2f4f7;
	--pl-max: 1280px;
	--pl-pad: 24px;
}

.content-wrapper {
	margin-bottom: 0 !important;
}

/* ============================== 레이아웃 */
.pl-page {
	padding: 28px 0 100px;
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	color: var(--pl-text);
	background: #ffffff;
}

.pl-inner {
	max-width: var(--pl-max);
	margin: 0 auto;
	padding: 0 var(--pl-pad);
}

.pl-crumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--pl-light);
}

.pl-crumb a {
	color: inherit;
	text-decoration: none !important;
}

.pl-crumb strong {
	font-weight: 600;
	color: var(--pl-muted);
}

.pl-head {
	padding: 44px 0 64px;
	text-align: center;
}

.pl-head__title {
	margin: 0 0 24px;
	font-size: 36px;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: #111827;
}

.pl-head__desc {
	margin: 0 auto;
	max-width: 720px;
	font-size: 14px;
	line-height: 1.9;
	color: var(--pl-muted);
	word-break: keep-all;
}

.pl-body {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

/* ============================== 좌측 필터 */
.pl-side__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 22px;
}

.pl-side__title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: #111827;
}

.pl-side__reset {
	padding: 0;
	font-size: 12px;
	color: var(--pl-light);
	background: none;
	border: 0;
	cursor: pointer;
}

.pl-side__reset:hover {
	color: var(--pl-accent);
	text-decoration: underline;
}

.pl-group {
	border-top: 1px solid var(--pl-line);
}

.pl-group__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 16px 0 14px;
	font-size: 13px;
	font-weight: 700;
	color: #111827;
	text-align: left;
	background: none;
	border: 0;
	cursor: pointer;
}

.pl-group__btn svg {
	flex: none;
	color: var(--pl-light);
	transition: transform 0.2s ease;
}

.pl-group.is-closed .pl-group__btn svg {
	transform: rotate(180deg);
}

.pl-group__body {
	padding-bottom: 14px;
}

.pl-group.is-closed .pl-group__body {
	display: none;
}

.pl-opt {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 8px 8px;
	margin: 0 -8px;
	font-size: 13px;
	color: var(--pl-muted);
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.pl-opt:hover {
	color: var(--pl-text);
	background: #f7f9fc;
}

/* 브라우저 기본 체크박스 대신 직접 그린다: 선택 전 흰 사각 + 회색 테두리, 선택 시 네이비 채움 + 흰 체크 */
.pl-opt input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	background: #ffffff;
	border: 1px solid #c9d1db;
	border-radius: 3px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pl-opt:hover input {
	border-color: #9fb0c4;
}

.pl-opt input:checked {
	background: var(--pl-navy) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.5 8.5 6.5 11.5 12.5 4.5'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
	border-color: var(--pl-navy);
}

.pl-opt input:focus-visible {
	outline: 2px solid var(--pl-accent);
	outline-offset: 2px;
}

.pl-opt.is-on {
	color: var(--pl-text);
	background: #edf4fd;
}

.pl-opt__count {
	margin-left: auto;
	font-size: 11px;
	color: var(--pl-light);
}

/* ============================== 툴바 */
.pl-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.pl-count {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 13px;
	color: var(--pl-muted);
}

.pl-count svg {
	flex: none;
	color: var(--pl-light);
}

.pl-count b {
	font-weight: 700;
	color: var(--pl-text);
}

.pl-sort select {
	min-width: 130px;
	padding: 10px 34px 10px 14px;
	font-size: 13px;
	color: var(--pl-text);
	background: #ffffff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa4b2' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
	border: 1px solid var(--pl-line);
	border-radius: 6px;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

/* 선택된 필터 칩 */
.pl-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
}

.pl-chips:empty {
	display: none;
}

.pl-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	font-size: 12px;
	color: var(--pl-navy);
	background: #eef2f7;
	border: 1px solid #dde5ee;
	border-radius: 999px;
	cursor: pointer;
}

.pl-chip span {
	font-size: 13px;
	line-height: 1;
	color: var(--pl-light);
}

/* ============================== 제품 카드 */
.pl-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.pl-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid var(--pl-line);
	border-radius: 10px;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pl-card:hover {
	border-color: #b9d3ee;
	box-shadow: 0 12px 28px rgba(20, 40, 63, 0.08);
}

.pl-card__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 22px;
	background: var(--pl-thumb-bg);
	overflow: hidden;
}

.pl-card__thumb img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.pl-card__badges {
	position: absolute;
	top: 12px;
	left: 12px;
	display: flex;
	gap: 6px;
}

.pl-badge {
	padding: 3px 8px;
	font-size: 11px;
	font-weight: 700;
	color: #ffffff;
	background: var(--pl-accent);
	border-radius: 4px;
}

.pl-badge--new {
	background: #16a34a;
}

.pl-card__body {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	flex: 1;
	padding: 18px 18px 20px;
}

.pl-card__info {
	flex: 1;
	min-width: 0;
}

.pl-card__name {
	display: block;
	margin: 0 0 8px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	color: #111827;
	text-decoration: none !important;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.pl-card__spec {
	margin: 0;
	font-size: 12px;
	color: var(--pl-light);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pl-card__cart {
	position: relative;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: var(--pl-navy);
	background: #ffffff;
	border: 1px solid var(--pl-navy);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* cart-ic.svg 는 흰 채움 위에 검은 선이 겹쳐 있어 그대로 쓰면 어두운 배경에서 뭉개진다.
   파일의 모양만 마스크로 가져오고 색은 currentColor 로 칠한다. */
.pl-card__cart-ic {
	display: block;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url('/img/cart-ic.svg') center / contain no-repeat;
	mask: url('/img/cart-ic.svg') center / contain no-repeat;
	pointer-events: none;
}

/* 담긴 상태 표시용 체크 배지.
   흰 원 + 버튼색 체크, 바깥에 버튼색 테두리를 둘러 카트 선과 겹치는 부분을 끊는다.
   체크 모양은 img/free-icon-font-check-circle.svg 의 path 를 그대로 쓴다. */
.pl-card__cart-check {
	position: absolute;
	top: 7px;
	right: 7px;
	width: 12px;
	height: 12px;
	display: none;
	color: #3a4658;
	border-radius: 50%;
	box-shadow: 0 0 0 2px #3a4658;
	pointer-events: none;
}

.pl-card__cart-check svg {
	display: block;
	width: 100%;
	height: 100%;
}

.pl-card__cart:hover {
	background: #f3f6fa;
}

.pl-card__cart.is-on {
	color: #ffffff;
	background: #3a4658;
	border-color: #3a4658;
}

/* 담긴 상태에서는 카트를 살짝 왼쪽 아래로 옮겨 체크가 들어갈 자리를 만든다 */
.pl-card__cart.is-on .pl-card__cart-ic {
	transform: translate(-2px, 1px);
}

.pl-card__cart.is-on .pl-card__cart-check {
	display: block;
}

/* ============================== 견적함 담기 알림 */
/* left:50% + translate 로 가운데 두면 쓸 수 있는 폭이 화면 절반으로 줄어 문구가 접힌다.
   좌우 0 + margin auto + width:max-content 로 가운데 정렬한다 */
.pl-toast {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 40px;
	width: max-content;
	margin: 0 auto;
	z-index: 1100;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100% - 32px);
	padding: 12px 14px 12px 14px;
	background: #ffffff;
	border: 1px solid #e3e8ef;
	border-radius: 12px;
	box-shadow: 0 12px 32px rgba(15, 30, 50, 0.14);
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.pl-toast.is-show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.pl-toast__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	color: #ffffff;
	background: var(--pl-navy);
	border-radius: 50%;
}

.pl-toast__icon svg {
	width: 13px;
	height: 13px;
}

.pl-toast__msg {
	margin: 0;
	font-size: 13px;
	color: var(--pl-text);
	white-space: nowrap;
}

.pl-toast__link {
	position: relative;
	flex: none;
	margin-left: 4px;
	padding-left: 16px;
	font-size: 13px;
	font-weight: 600;
	color: var(--pl-accent);
	text-decoration: none !important;
	white-space: nowrap;
}

/* 문구와 링크 사이 세로 구분선 */
.pl-toast__link::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: 14px;
	background: #d7dfe9;
	transform: translateY(-50%);
}

.pl-toast__link:hover {
	text-decoration: underline !important;
}

.pl-toast__close {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	color: #6b7280;
	background: none;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.pl-toast__close:hover {
	background: #f2f5f9;
	color: var(--pl-text);
}

.pl-toast__close svg {
	width: 16px;
	height: 16px;
}

@media (max-width: 768px) {
	.pl-toast {
		bottom: 20px;
	}

	.pl-toast {
		gap: 10px;
		padding: 10px 10px 10px 12px;
	}

	/* 좁은 화면에서는 문구가 줄어들 수 있게 해 토스트가 화면 밖으로 나가지 않게 한다 */
	.pl-toast__msg {
		min-width: 0;
		white-space: normal;
		word-break: keep-all;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pl-toast,
	.pl-toast.is-show {
		transition: none;
	}
}

.pl-empty {
	padding: 80px 0;
	font-size: 14px;
	color: var(--pl-light);
	text-align: center;
}

/* ============================== 페이징 */
.pl-paging {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 48px;
}

.pl-paging:empty {
	display: none;
}

.pl-paging button {
	min-width: 34px;
	height: 34px;
	padding: 0 8px;
	font-size: 13px;
	color: var(--pl-muted);
	background: #ffffff;
	border: 1px solid var(--pl-line);
	border-radius: 6px;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pl-paging button:hover:not(:disabled) {
	border-color: #b9d3ee;
	color: var(--pl-navy);
}

.pl-paging button.is-on {
	font-weight: 700;
	color: #ffffff;
	background: var(--pl-navy);
	border-color: var(--pl-navy);
}

.pl-paging button:disabled {
	color: #d3d9e2;
	cursor: default;
}

/* ============================== 추천 제품 */
.pl-recommend {
	margin-top: 90px;
	padding-top: 48px;
	border-top: 1px solid var(--pl-line);
}

.pl-recommend__title {
	margin: 0 0 24px;
	font-size: 20px;
	font-weight: 700;
	color: #111827;
}

.pl-grid--recommend {
	grid-template-columns: repeat(4, 1fr);
}

/* ============================== 반응형 */
@media (max-width: 1100px) {
	.pl-body {
		grid-template-columns: 180px minmax(0, 1fr);
		gap: 32px;
	}

	.pl-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.pl-grid--recommend {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 768px) {
	:root {
		--pl-pad: 16px;
	}

	.pl-page {
		padding-bottom: 64px;
	}

	.pl-head {
		padding: 28px 0 36px;
	}

	.pl-head__title {
		font-size: 26px;
		margin-bottom: 16px;
	}

	.pl-head__desc {
		font-size: 13px;
	}

	.pl-body {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	/* 모바일에서는 필터를 접어 두고 필요할 때만 펼친다 */
	.pl-side {
		padding: 16px;
		border: 1px solid var(--pl-line);
		border-radius: 10px;
	}

	.pl-side__head {
		margin-bottom: 8px;
	}

	.pl-grid,
	.pl-grid--recommend {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.pl-card__body {
		padding: 14px;
	}

	.pl-recommend {
		margin-top: 56px;
		padding-top: 32px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pl-card,
	.pl-card__cart,
	.pl-paging button,
	.pl-group__btn svg {
		transition: none;
	}
}
