/* Category Page Styles */
:root {
	--primary-color: #000;
	--secondary-color: #333;
	--accent-color: #666;
	--text-color: #333;
	--light-color: #fff;
	--light-gray: #f8f8f8;
	--border-color: #eee;
	--border-dark: #ddd;
	--transition: all 0.3s ease;
	--shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
	--radius: 4px;
}

.products-wrapper {
	max-width: 1200px;
	margin: 120px auto 80px;
	padding: 0 20px;
	font-family: 'Noto Sans JP', 'Poppins', sans-serif;
	color: var(--text-color);
}

.products-wrapper a {
	text-decoration: none;
	color: var(--text-color);
	transition: var(--transition);
}

/* Category Title */
.products-title {
	text-align: center;
	margin-bottom: 40px;
	position: relative;
}

.products-title h1 {
	font-size: 32px;
	font-weight: 400;
	letter-spacing: 1px;
	margin: 0;
	padding-bottom: 15px;
	position: relative;
	display: inline-block;
}

.products-title h1::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 2px;
	background-color: var(--primary-color);
}

/* Filter Section */
.product-filter-section {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 40px;
	padding: 20px;
	background-color: var(--light-gray);
	border-radius: var(--radius);
}

.filter-button {
	background-color: var(--light-color);
	border: 1px solid var(--border-dark);
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	border-radius: var(--radius);
	transition: var(--transition);
}

.filter-button:hover {
	background-color: var(--primary-color);
	color: var(--light-color);
	border-color: var(--primary-color);
}

.sort-select {
	padding: 10px 15px;
	border: 1px solid var(--border-dark);
	border-radius: var(--radius);
	font-size: 14px;
	background-color: var(--light-color);
	cursor: pointer;
}

/* 商品一覧スタイル */
.cat-il {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.cat-il article {
	background-color: var(--light-color);
	border-radius: 8px;
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cat-il article:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.cat-il article a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.itemimg, .itemimg-soldout {
	position: relative;
	height: 280px;
	overflow: hidden;
	background-color: #f7f7f7;
}

.itemimg img, .itemimg-soldout img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.itemimg:hover img, .itemimg-soldout:hover img {
	transform: scale(1.05);
}

/* 画像エラー処理 */
.itemimg img[src="undefined"],
.itemimg-soldout img[src="undefined"],
.itemimg img[src*="undefined"],
.itemimg-soldout img[src*="undefined"] {
	display: none;
}

.itemimg.image-error::before,
.itemimg-soldout.image-error::before {
	content: "画像を読み込めませんでした";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 12px;
	color: #999;
}

.item-info {
	padding: 15px;
}

.itemname h3, .itemname-soldout h3 {
	font-size: 16px;
	margin: 0 0 10px;
	line-height: 1.4;
	font-weight: 500;
	height: 45px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.itemprice p, .itemprice-soldout p {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 15px;
	color: var(--primary-color);
}

.item-sizes {
	margin-top: 10px;
}

.item-sizes p {
	font-size: 12px;
	margin: 0 0 5px;
	color: #777;
}

.size-list {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.size-list li {
	font-size: 11px;
	padding: 4px 8px;
	background-color: #f0f0f0;
	border-radius: 4px;
}

.size-list li.sold-out {
	text-decoration: line-through;
	opacity: 0.5;
}

/* 売り切れ商品 */
.product-soldout .itemimg-soldout img {
	opacity: 0.7;
}

.product-soldout .itemname-soldout h3,
.product-soldout .itemprice-soldout p {
	opacity: 0.7;
}

/* ページネーション */
.pagination_wrapper ul {
	display: flex;
	justify-content: center;
	padding: 0;
	list-style: none;
	margin: 40px 0;
}

.pagination_wrapper li {
	margin: 0 5px;
}

.pagination_wrapper a,
.pagination_wrapper span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid var(--border-color);
	border-radius: 50%;
	color: var(--text-color);
	text-decoration: none;
	transition: var(--transition);
}

.pagination_wrapper a:hover,
.pagination_wrapper span.current {
	background-color: var(--primary-color);
	color: var(--light-color);
	border-color: var(--primary-color);
}

/* パンくずリスト */
.breadcrumbs {
	margin: 30px 0;
}

.breadcrumbs ul {
	display: flex;
	padding: 0;
	list-style: none;
	flex-wrap: wrap;
}

.breadcrumbs li {
	position: relative;
	padding-right: 20px;
	margin-right: 10px;
	font-size: 14px;
	color: var(--accent-color);
}

.breadcrumbs li:not(:last-child)::after {
	content: '/';
	position: absolute;
	right: 0;
	top: 0;
}

.breadcrumbs a {
	color: var(--accent-color);
	text-decoration: none;
}

.breadcrumbs a:hover {
	color: var(--primary-color);
}

.breadcrumbs li:last-child {
	color: var(--primary-color);
	font-weight: 500;
}

/* もっと読み込むボタン */
.load-more {
	text-align: center;
	margin: 40px 0;
}

.load-more-button {
	padding: 12px 25px;
	background-color: var(--light-color);
	border: 1px solid var(--primary-color);
	color: var(--primary-color);
	border-radius: 30px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: var(--transition);
}

.load-more-button:hover {
	background-color: var(--primary-color);
	color: var(--light-color);
}

/* 商品数表示 */
.product-count {
	text-align: center;
	margin-bottom: 30px;
	font-size: 14px;
	color: var(--accent-color);
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
	.products-wrapper {
		margin: 80px auto 60px;
	}
	
	.products-title h1 {
		font-size: 28px;
	}
}

@media (max-width: 768px) {
	.products-wrapper {
		margin: 60px auto 40px;
		padding: 0 15px;
	}
	
	.products-title h1 {
		font-size: 24px;
	}
	
	.product-filter-section {
		flex-direction: column;
		gap: 15px;
		padding: 15px;
	}
	
	.sort-options {
		width: 100%;
	}
	
	.sort-select {
		width: 100%;
	}
	
	.cat-il {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		gap: 20px;
	}
	
	.itemimg, 
	.itemimg-soldout {
		height: 220px;
	}
	
	.itemname h3, 
	.itemname-soldout h3 {
		font-size: 14px;
		height: 40px;
	}
	
	.itemprice p, 
	.itemprice-soldout p {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.products-wrapper {
		margin: 40px auto 30px;
		padding: 0 10px;
	}
	
	.products-title h1 {
		font-size: 20px;
	}
	
	.cat-il {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: 15px;
	}
	
	.itemimg, 
	.itemimg-soldout {
		height: 180px;
	}
	
	.item-info {
		padding: 10px;
	}
	
	.itemname h3, 
	.itemname-soldout h3 {
		font-size: 13px;
		height: 36px;
		margin-bottom: 5px;
	}
	
	.itemprice p, 
	.itemprice-soldout p {
		font-size: 14px;
		margin-bottom: 8px;
	}
	
	.size-list li {
		font-size: 10px;
		padding: 3px 6px;
	}
	
	.load-more-button {
		padding: 10px 20px;
		font-size: 13px;
	}
}