.ljpc-catalog,
.ljpc-catalog * {
	box-sizing: border-box;
}

.ljpc-catalog {
	--ljpc-primary: #005d73;
	--ljpc-heading: #173e46;
	--ljpc-text: #52696e;
	--ljpc-soft: #f3f7f7;
	--ljpc-white: #ffffff;
	--ljpc-border: #d5e0e2;
	--ljpc-shadow: 0 8px 22px rgba(23, 62, 70, 0.08);

	display: grid;
	grid-template-columns: 190px minmax(0, 1fr);
	gap: 32px;
	width: min(100%, 1200px);
	max-width: 1200px;
	margin: 0 auto;
	padding: 64px 24px 80px;
	font-family: "Noto Sans TC", sans-serif;
	color: var(--ljpc-text);
}

.ljpc-catalog a {
	text-decoration: none;
}

.ljpc-catalog__sidebar,
.ljpc-catalog__content {
	min-width: 0;
}

.ljpc-category-panel {
	position: sticky;
	top: 112px;
	width: 100%;
	overflow: hidden;
	border: 1px solid var(--ljpc-border);
	background: var(--ljpc-white);
}

.ljpc-category-panel__title {
	padding: 16px 14px;
	background: var(--ljpc-heading);
	color: var(--ljpc-white);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
}

.ljpc-category-nav {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.ljpc-category-nav__link {
	display: flex;
	align-items: center;
	min-height: 46px;
	padding: 11px 14px;
	border-bottom: 1px solid var(--ljpc-border);
	color: var(--ljpc-heading);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	transition:
		background-color 0.2s ease,
		color 0.2s ease;
}

.ljpc-category-nav__link:last-child {
	border-bottom: 0;
}

.ljpc-category-nav__link:hover,
.ljpc-category-nav__link:focus-visible,
.ljpc-category-nav__link.is-active {
	background: var(--ljpc-primary);
	color: var(--ljpc-white);
	outline: none;
}


.ljpc-brand-filter {
	display: block;
	padding: 14px;
	border-top: 1px solid var(--ljpc-border);
	background: var(--ljpc-soft);
}

.ljpc-brand-filter__select-wrap {
	position: relative;
}

.ljpc-brand-filter__select-wrap::after {
	position: absolute;
	top: 50%;
	right: 14px;
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--ljpc-primary);
	border-bottom: 2px solid var(--ljpc-primary);
	content: "";
	pointer-events: none;
	transform: translateY(-70%) rotate(45deg);
}

.ljpc-brand-filter__select {
	display: block;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 9px 38px 9px 12px;
	border: 1px solid var(--ljpc-border);
	border-radius: 0;
	background: var(--ljpc-white);
	color: var(--ljpc-heading);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	appearance: none;
	cursor: pointer;
}

.ljpc-brand-filter__select:hover,
.ljpc-brand-filter__select:focus {
	border-color: var(--ljpc-primary);
	outline: 2px solid rgba(0, 93, 115, 0.14);
	outline-offset: 0;
}


.ljpc-product-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 22px;
	align-items: stretch;
}

.ljpc-product-card {
	min-width: 0;
	height: 100%;
	margin: 0;
	overflow: hidden;
	border: 1px solid var(--ljpc-border);
	background: var(--ljpc-white);
	transition:
		transform 0.22s ease,
		border-color 0.22s ease,
		box-shadow 0.22s ease;
}

.ljpc-product-card:hover,
.ljpc-product-card:focus-within {
	transform: translateY(-3px);
	border-color: var(--ljpc-primary);
	box-shadow: var(--ljpc-shadow);
}

.ljpc-product-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
}

.ljpc-product-card__link:focus-visible {
	outline: 3px solid rgba(0, 93, 115, 0.28);
	outline-offset: -3px;
}

.ljpc-product-card__media {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 190px;
	min-height: 0;
	padding: 14px;
	overflow: hidden;
	background: var(--ljpc-soft);
	border-bottom: 1px solid var(--ljpc-border);
}

.ljpc-product-card__image {
	display: block;
	width: 100%;
	height: 100% !important;
	max-width: 100%;
	margin: 0;
	object-fit: contain;
	object-position: center;
}

.ljpc-product-card__title {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	min-height: 64px;
	margin: 0;
	padding: 14px 13px;
	color: var(--ljpc-heading);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.55;
	overflow-wrap: anywhere;
	transition: color 0.22s ease;
}

.ljpc-product-card:hover .ljpc-product-card__title,
.ljpc-product-card:focus-within .ljpc-product-card__title {
	color: var(--ljpc-primary);
}

.ljpc-empty {
	padding: 36px 24px;
	border: 1px solid var(--ljpc-border);
	background: var(--ljpc-soft);
	color: var(--ljpc-text);
	font-size: 15px;
	line-height: 1.8;
	text-align: center;
}

.ljpc-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 34px;
}

.ljpc-pagination__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border: 1px solid var(--ljpc-border);
	background: var(--ljpc-white);
	color: var(--ljpc-heading);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease;
}

.ljpc-pagination__link:hover,
.ljpc-pagination__link:focus-visible,
.ljpc-pagination__link.is-current {
	border-color: var(--ljpc-primary);
	background: var(--ljpc-primary);
	color: var(--ljpc-white);
	outline: none;
}

.ljpc-pagination__link.is-disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.ljpc-pagination__ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 42px;
	color: var(--ljpc-text);
}

/* Astra 桌面版：922px 以上。 */
@media (min-width: 922px) {
	.ljpc-catalog {
		grid-template-columns: 190px minmax(0, 1fr);
		gap: 32px;
		padding: 64px 24px 80px;
	}

	.ljpc-category-panel {
		position: sticky;
		top: 112px;
	}

	.ljpc-product-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 22px;
	}

	.ljpc-product-card__media {
		height: 190px;
	}
}

/* Astra 平板版：545px～921px。 */
@media (min-width: 545px) and (max-width: 921px) {
	.ljpc-catalog {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
		width: 100%;
		padding: 46px 24px 68px;
	}

	.ljpc-category-panel {
		position: static;
		top: auto;
	}

	.ljpc-category-nav {
		display: flex;
		flex-direction: row;
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px;
	}

	.ljpc-category-nav__link {
		flex: 0 0 auto;
		min-height: 44px;
		padding: 10px 16px;
		border: 1px solid var(--ljpc-border);
	}

	.ljpc-category-nav__link:last-child {
		border-bottom: 1px solid var(--ljpc-border);
	}

	.ljpc-brand-filter {
		padding: 12px;
	}

	.ljpc-product-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}

	.ljpc-product-card__media {
		height: clamp(210px, 32vw, 270px);
	}

	.ljpc-product-card__title {
		min-height: 64px;
		font-size: 15px;
	}
}

/* Astra 手機版：544px 以下。 */
@media (max-width: 544px) {
	.ljpc-catalog {
		display: block;
		width: 100%;
		max-width: none;
		padding: 34px 16px 54px;
		overflow: hidden;
	}

	.ljpc-catalog__sidebar {
		width: 100%;
		margin-bottom: 22px;
	}

	.ljpc-category-panel {
		position: static;
		top: auto;
		width: 100%;
		overflow: hidden;
	}

	.ljpc-category-panel__title {
		padding: 14px 12px;
	}

	.ljpc-category-nav {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		gap: 8px;
		width: 100%;
		padding: 10px 12px 12px;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x proximity;
		scroll-padding-inline: 12px;
		scrollbar-width: thin;
		overscroll-behavior-inline: contain;
		-webkit-overflow-scrolling: touch;
	}

	.ljpc-category-nav__link {
		flex: 0 0 auto;
		min-height: 44px;
		padding: 10px 14px;
		border: 1px solid var(--ljpc-border);
		font-size: 14px;
		white-space: nowrap;
		scroll-snap-align: start;
	}

	.ljpc-category-nav__link:last-child {
		margin-right: 12px;
		border-bottom: 1px solid var(--ljpc-border);
	}

	.ljpc-brand-filter {
		padding: 12px;
	}

	.ljpc-product-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 18px;
		width: 100%;
	}

	.ljpc-product-card {
		width: 100%;
	}

	.ljpc-product-card__media {
		height: clamp(205px, 62vw, 285px);
		padding: 16px;
	}

	.ljpc-product-card__title {
		min-height: 60px;
		padding: 14px 12px;
		font-size: 15px;
	}

	.ljpc-pagination {
		gap: 6px;
		margin-top: 28px;
	}

	.ljpc-pagination__link {
		min-width: 44px;
		height: 44px;
		padding: 0 10px;
	}
}


/* =========================================
   商品列表 - 回到頂部
========================================= */
.ljpc-catalog-back-to-top {
	position: fixed;
	right: 28px;
	bottom: 28px;
	z-index: 50;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(0, 93, 115, 0.18);
	border-radius: 50%;
	background: #005d73;
	box-shadow: 0 10px 26px rgba(23, 62, 70, 0.18);
	color: #ffffff;
	font-size: 0;
	line-height: 0;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(12px);
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease,
		transform 0.2s ease,
		background-color 0.2s ease,
		box-shadow 0.2s ease;
}

.ljpc-catalog-back-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
}

.ljpc-catalog-back-to-top:hover,
.ljpc-catalog-back-to-top:focus-visible {
	background: #173e46;
	box-shadow: 0 12px 30px rgba(23, 62, 70, 0.24);
	outline: none;
	transform: translateY(-2px);
}

.ljpc-catalog-back-to-top__icon {
	display: block;
	width: 20px;
	height: 20px;
	margin: 0;
	flex: 0 0 20px;
	pointer-events: none;
}

@media (min-width: 545px) and (max-width: 921px) {
	.ljpc-catalog-back-to-top {
		right: 22px;
		bottom: 22px;
		width: 46px;
		height: 46px;
	}
}

@media (max-width: 544px) {
	.ljpc-catalog-back-to-top {
		right: 16px;
		bottom: 16px;
		width: 44px;
		height: 44px;
	}

	.ljpc-catalog-back-to-top__icon {
		width: 18px;
		height: 18px;
		flex-basis: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ljpc-product-card,
	.ljpc-category-nav__link,
	.ljpc-pagination__link,
	.ljpc-catalog-back-to-top {
		transition: none;
	}

	.ljpc-product-card:hover,
	.ljpc-product-card:focus-within {
		transform: none;
	}
}
