/*
 * 商品カテゴリーページ（parts/item-category.php）
 * 商品カテゴリーページだけで読み込まれる（inc/slowfield-item-category.php）。
 *
 * メイン色 #455765 / サブ色 #6b7b6e / キーカラー #6c848d
 */

/* サイドバーを出さず1カラムに */
.sf-item-cat #main.two-column #content {
	width: 100%;
	float: none;
}

/* =カバー画像（全幅・カテゴリー名を中央に重ねる）
   高さとオーバーレイはカテゴリー編集画面で設定（inc/slowfield-item-category.php）
-------------------------------------------------------------- */

.sf-item-cat {
	overflow-x: clip;
}

.sf-ic-cover {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	width: 100vw;
	/* 高さはカテゴリー編集画面の数値（--sf-cover-h、PC の px）。スマホは約55%（最低 160px） */
	height: max(160px, calc(var(--sf-cover-h, 440px) * .55));
	margin: 0 0 1em calc(50% - 50vw);
	background-color: #455765;
}

.sf-ic-cover-img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* オーバーレイ（色の膜）。濃さは --sf-overlay（0〜0.8） */
.sf-ic-cover::after {
	content: "";
	position: absolute;
	inset: 0;
	background-color: #000;
	opacity: var(--sf-overlay, .3);
}

.sf-ic-overlay--key::after { background-color: #6c848d; }
.sf-ic-overlay--main::after { background-color: #455765; }

/* カバーに重ねる文字 */
.sf-ic-cover .sf-ic-header--on-cover {
	position: relative;
	z-index: 1;
	padding: 0 1.5em;
}

.sf-ic-header--on-cover .sf-ic-title {
	color: #fff;
	text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
}

.sf-ic-header--on-cover .sf-ic-catch {
	color: #fff;
	text-shadow: 0 1px 10px rgba(0, 0, 0, .4);
}

/* =カテゴリー名・キャッチコピー・紹介文
-------------------------------------------------------------- */

.sf-ic-header {
	padding: 2em 0 1em;
	text-align: center;
}

.sf-ic-title {
	margin: 0;
	color: #455765;
	font-family: 'Rozha One', serif !important; /* テーマの見出しフォント（#content h1 等）を打ち消す */
	font-size: 2em;
	font-weight: normal;
	line-height: 1.3;
	letter-spacing: .04em;
}

.sf-ic-catch {
	margin: .8em 0 0;
	color: #6b7b6e;
	font-size: .95em;
	letter-spacing: .12em;
}

/* タイトルと紹介文をつなぐ細い縦線（HOME のメッセージと同じ） */
.sf-ic-desc {
	position: relative;
	max-width: 38em;
	margin: 0 auto;
	padding-top: 3.5em;
	color: #444;
	font-size: .92em;
	line-height: 2.1;
}

.sf-ic-desc::before {
	content: "";
	position: absolute;
	top: .5em;
	left: 50%;
	width: 1px;
	height: 2.2em;
	background-color: #b7c2c7;
}

.sf-ic-desc p {
	margin: 0 0 1.2em;
}

/* =子カテゴリー
-------------------------------------------------------------- */

.sf-ic-children {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .6em;
	margin: 2em 0 0;
	padding: 0;
	list-style: none;
}

.sf-ic-children a {
	display: block;
	padding: .2em 1.2em;
	border: 1px solid #c5ced3;
	border-radius: 2em;
	color: #6c848d;
	font-size: .85em;
	text-decoration: none;
}

.sf-ic-children a:hover {
	background-color: #6c848d;
	color: #fff;
	text-decoration: none;
}

/* =商品一覧
-------------------------------------------------------------- */

.sf-ic-items {
	margin-top: 3em;
	padding: 3em 0 2em;
	border-top: 1px solid #e3e7ea;
}

.sf-ic-heading {
	margin: 0 0 1.8em;
	color: #455765;
	font-family: 'Rozha One', serif;
	font-size: 1.5em;
	font-weight: normal;
	letter-spacing: .04em;
	text-align: center;
}

.sf-ic-heading span {
	display: block;
	margin-top: .3em;
	color: #888;
	font-family: sans-serif;
	font-size: .45em;
	letter-spacing: .1em;
}

.sf-ic-list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2em 1em;
}

.sf-ic-item a {
	display: block;
	color: inherit;
	text-decoration: none;
}

.sf-ic-item-img {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	background-color: #e3e7ea;
}

.sf-ic-item-img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s;
}

.sf-ic-item a:hover .sf-ic-item-img img {
	transform: scale(1.04);
	opacity: 1;
}

.sf-ic-item-img .itemsoldout {
	position: absolute;
	top: .6em;
	left: .6em;
	padding: .1em .7em;
	background-color: rgba(255, 255, 255, .9);
	color: #455765;
	font-size: .75em;
	letter-spacing: .08em;
}

.sf-ic-item-name {
	margin: .8em 0 .2em;
	color: #333;
	font-size: .9em;
	font-weight: normal;
	line-height: 1.6;
}

.sf-ic-item a:hover .sf-ic-item-name {
	color: #6c848d;
}

.sf-ic-item-price {
	color: #888;
	font-size: .8em;
}

.sf-ic-empty {
	padding: 1em 0 2em;
	color: #888;
	text-align: center;
}

.sf-item-cat .pagination_wrapper {
	margin-top: 2.5em;
}

/* =PC
-------------------------------------------------------------- */

@media screen and (min-width: 62.5em) {

	.sf-ic-cover {
		height: var(--sf-cover-h, 440px);
		margin-bottom: 1.5em;
	}

	.sf-ic-header--on-cover .sf-ic-title {
		font-size: 3em;
	}

	.sf-ic-header {
		padding-top: 3em;
	}

	.sf-ic-title {
		font-size: 2.4em;
	}

	.sf-ic-list {
		grid-template-columns: repeat(3, 1fr);
		gap: 3em 2.5em;
	}
}
