@charset "utf-8";

/* ============================== 토큰 (product-list.css 와 동일 값) */
:root {
	--pd-navy: #1e3a5f;
	--pd-text: #1f2937;
	--pd-muted: #6b7280;
	--pd-light: #9aa4b2;
	--pd-line: #e5e9ef;
	--pd-accent: #2f6fb5;
	--pd-thumb-bg: #ffffff;
	--pd-max: 1280px;
	--pd-pad: 24px;
}

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

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

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

/* sh_common.css 의 h1~h6 요소 지정이 상속을 덮으므로 되돌린다 */
.pd-page h1,
.pd-page h2 {
	font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
}

/* ============================== 브레드크럼 */
.pd-crumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	color: var(--pd-light);
}

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

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

/* ============================== 갤러리 + 제품 정보 */
.pd-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 56px;
	align-items: start;
	padding: 40px 0 64px;
}

.pd-gallery {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
}

/* 썸네일 세로 스트립 */
.pd-gallery__thumbs {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 520px;
	overflow-y: auto;
	scrollbar-width: thin;
}

.pd-gallery__thumbs > .nav-detail-product {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* JS 가 문자열로 생성하는 썸네일 */
.pd-gallery__thumbs .img-detail-product {
	width: 100%;
	aspect-ratio: 1 / 1;
	padding: 8px;
	object-fit: contain;
	background: var(--pd-thumb-bg);
	border: 1px solid var(--pd-line);
	border-radius: 8px;
	cursor: pointer;
	mix-blend-mode: multiply;
	opacity: 0.55;
	transition: opacity 0.2s ease, border-color 0.2s ease;
}

.pd-gallery__thumbs .img-detail-product:hover {
	opacity: 0.85;
	border-color: #b9d3ee;
}

/* 선택된 썸네일: 네이비 2px 테두리 + 선명하게. outline 은 이미지 내용 위에 그려져 가려지지 않는다 */
.pd-gallery__thumbs .img-detail-product.isActiveImage {
	opacity: 1;
	border-color: var(--pd-navy);
	outline: 2px solid var(--pd-navy);
	outline-offset: -2px;
}

/* 이전/다음 버튼: 썸네일 목록 바로 위(이전 ▲)와 아래(다음 ▼)에 붙인다 (이미지가 3장 미만이면 기존 JS 가 숨긴다).
   #btn-top-slide = 이전, #btn-bottom-slide = 다음. 클릭 동작은 detail-product.html 스크립트 영역 */
.pd-gallery__thumbs .btn-img-slide {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 30px;
	font-size: 0;   /* 다국어 문구(❮)는 숨기고 아래 ::before 로 그린다 */
	color: var(--pd-muted);
	background: #ffffff;
	border: 1px solid var(--pd-line);
	border-radius: 8px;
	text-decoration: none !important;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.pd-gallery__thumbs .btn-img-slide::before {
	content: "";
	width: 8px;
	height: 8px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
}

/* 썸네일 목록 위로 올린다 (마크업상 목록 뒤에 있음) */
#btn-top-slide {
	order: -1;
}

#btn-top-slide::before {
	transform: translateY(2px) rotate(135deg);
}

#btn-bottom-slide::before {
	transform: translateY(-2px) rotate(-45deg);
}

.pd-gallery__thumbs .btn-img-slide:hover {
	color: var(--pd-navy);
	border-color: var(--pd-navy);
}

/* 메인 이미지. JS 가 .img-slide 를 show/hide 하므로 display 는 건드리지 않는다 */
.pd-gallery__main {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 4 / 3;
	padding: 32px;
	background: var(--pd-thumb-bg);
	border: 1px solid #dde4ec;
	border-radius: 10px;
	overflow: hidden;
}

.pd-gallery__main .img-slide {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	cursor: zoom-in;
	mix-blend-mode: multiply;
}

/* ============================== 제품 정보 */
.pd-info__name {
	margin: 0 0 12px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.03em;
	color: #111827;
	word-break: keep-all;
}

.pd-info__desc {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.9;
	color: var(--pd-muted);
	word-break: keep-all;
}

.pd-summary {
	margin: 0 0 32px;
	padding: 4px 0 0;
	list-style: none;
	border-top: 1px solid var(--pd-line);
}

.pd-summary__row {
	display: grid;
	grid-template-columns: 116px minmax(0, 1fr);
	gap: 16px;
	padding: 13px 0;
	font-size: 14px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-summary__key {
	font-weight: 600;
	color: var(--pd-navy);
}

.pd-summary__val {
	color: var(--pd-muted);
	word-break: break-word;
}

/* ============================== 버튼 */
.pd-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 54px;
	padding: 0 20px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	border-radius: 8px;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.pd-btn--primary {
	color: #ffffff;
	background: var(--pd-navy);
	border: 1px solid var(--pd-navy);
	text-decoration: none !important;
}

.pd-btn--primary:hover {
	color: #ffffff;
	background: var(--pd-accent);
	border-color: var(--pd-accent);
}

.pd-btn--ghost {
	width: auto;
	min-height: 46px;
	color: var(--pd-navy);
	background: #ffffff;
	border: 1px solid var(--pd-navy);
}

.pd-btn--ghost:hover {
	color: #ffffff;
	background: var(--pd-navy);
}

/* ============================== 탭 */
.pd-tabs {
	position: sticky;
	top: 0;
	z-index: 5;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	background: #ffffff;
	border-top: 1px solid var(--pd-line);
	border-bottom: 1px solid var(--pd-line);
}

.pd-tab {
	padding: 18px 8px;
	font-size: 15px;
	font-weight: 600;
	color: var(--pd-muted);
	text-align: center;
	cursor: pointer;
	transition: color 0.2s ease, box-shadow 0.2s ease;
}

.pd-tab:hover {
	color: var(--pd-text);
}

.pd-tab.isActiveTab {
	color: var(--pd-navy);
	box-shadow: inset 0 -2px 0 var(--pd-navy);
}

/* ============================== 섹션 */
.pd-section {
	padding: 64px 0 0;
	scroll-margin-top: 70px;
}

.pd-section__title {
	margin: 0 0 24px;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #111827;
}

/* ============================== 전체 사양 */
.pd-spec {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--pd-line);
}

.pd-spec__row {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 20px;
	padding: 15px 4px;
	font-size: 14px;
	border-bottom: 1px solid var(--pd-line);
}

.pd-spec__row:nth-child(odd) {
	background: #fafbfc;
}

.pd-spec__key {
	font-weight: 600;
	color: var(--pd-navy);
}

.pd-spec__val {
	color: var(--pd-muted);
	word-break: break-word;
}

/* ============================== 에디터 본문 */
.pd-editor {
	padding: 48px 0 0;
	font-size: 15px;
	line-height: 1.85;
	color: var(--pd-text);
}

.pd-editor img {
	max-width: 100%;
	height: auto;
}

/* ============================== 가격표 */
.pd-tablewrap {
	overflow-x: auto;
}

.pd-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.pd-table th,
.pd-table td {
	padding: 14px 16px;
	text-align: left;
	border: 1px solid var(--pd-line);
}

.pd-table th {
	font-weight: 600;
	color: var(--pd-navy);
	background: #f7f9fc;
	white-space: nowrap;
}

.pd-table td {
	color: var(--pd-muted);
}

/* ============================== 카탈로그 */
.pd-catalog {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 64px;
	padding: 48px 24px;
	text-align: center;
	background: #f7f9fc;
	border: 1px solid var(--pd-line);
	border-radius: 10px;
	scroll-margin-top: 70px;
}

.pd-catalog__title {
	font-size: 20px;
	font-weight: 700;
	color: #111827;
}

.pd-catalog__note {
	margin-bottom: 12px;
	font-size: 13px;
	color: var(--pd-muted);
}

/* ============================== 원본 크기 이미지 모달 */
.img_modal {
	position: fixed;
	z-index: 1100;
	inset: 0;
	display: none;
	padding: 40px;
	background: rgba(17, 24, 39, 0.82);
}

.img_modal .modal_content {
	display: block;
	max-width: 92%;
	max-height: 92%;
	margin: auto;
	position: absolute;
	inset: 0;
	object-fit: contain;
	cursor: zoom-out;
}

.img_modal .close {
	position: absolute;
	top: 18px;
	right: 26px;
	font-size: 38px;
	font-weight: 300;
	line-height: 1;
	color: #ffffff;
	cursor: pointer;
}

/* ============================== 반응형 */
@media (max-width: 1024px) {
	.pd-hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 36px;
		padding: 28px 0 48px;
	}

	.pd-spec__row {
		grid-template-columns: 160px minmax(0, 1fr);
	}
}

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

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

	.pd-gallery {
		grid-template-columns: 64px minmax(0, 1fr);
		gap: 10px;
	}

	.pd-gallery__thumbs .btn-img-slide {
		height: 26px;
	}

	.pd-gallery__main {
		padding: 20px;
	}

	.pd-info__name {
		font-size: 23px;
	}

	.pd-tab {
		padding: 14px 4px;
		font-size: 13px;
	}

	.pd-section {
		padding-top: 44px;
	}

	.pd-section__title {
		font-size: 18px;
	}

	.pd-summary__row,
	.pd-spec__row {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
	}

	.pd-catalog {
		margin-top: 44px;
		padding: 36px 20px;
	}

	.pd-catalog__title {
		font-size: 17px;
	}

	.img_modal {
		padding: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pd-btn,
	.pd-tab,
	.pd-gallery__thumbs .img-detail-product {
		transition: none;
	}
}
