/* ===========================================================
   Mitsuneko 装飾スタイル
   theme.json では表現できない見た目（ブロックスタイル）のみ。
   B案「ぬくもり」のテープ・ポラロイド・チケット意匠。
   =========================================================== */

/* --- レイアウト：ヘッダー／コンテンツ／フッターを密着させる ---
   コアの .wp-site-blocks > * + * { margin-block-start } が
   全幅の色帯セクション間に生成り地の縞を作るため打ち消す。 */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* --- ポラロイド（画像ブロック） --- */
.wp-block-image.is-style-polaroid,
.wp-block-image.is-style-polaroid-taped {
	background: #fff;
	padding: 14px 14px 0;
	box-shadow: 0 18px 40px rgba(91, 64, 40, .26);
	transform: rotate(-2deg);
	display: inline-block;
}
.wp-block-image.is-style-polaroid img,
.wp-block-image.is-style-polaroid-taped img {
	display: block;
}
.wp-block-image.is-style-polaroid figcaption,
.wp-block-image.is-style-polaroid-taped figcaption {
	/* コアの aligncenter 用 table-caption を打ち消す（縦1文字折れ防止） */
	display: block;
	font-family: 'Klee One', cursive;
	text-align: center;
	color: #6b5a40;
	font-size: .95rem;
	padding: 12px 6px 16px;
	margin: 0;
}

/* --- ポラロイド（テープ留め・右傾き） ---
   plan-b「story polaroid」準拠：時計回りに傾け、
   上辺に朱の半透明マスキングテープを重ねる。 */
.wp-block-image.is-style-polaroid-taped {
	position: relative;
	transform: rotate(2.2deg);
}
.wp-block-image.is-style-polaroid-taped::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 30%;
	width: 110px;
	height: 30px;
	background: rgba(201, 70, 44, .28);
	transform: rotate(-5deg);
	z-index: 1;
}

/* --- ポラロイド（小・Instagram グリッド用） --- */
.wp-block-image.is-style-polaroid-sm {
	background: #fff;
	padding: 7px;
	box-shadow: 0 6px 16px rgba(91, 64, 40, .16);
	transform: rotate(-1.5deg);
	display: block;
}
.wp-block-image.is-style-polaroid-sm:nth-child(even) {
	transform: rotate(1.5deg);
}

/* --- チケット（ミシン目＝左に破線＋切り欠き） --- */
.wp-block-group.is-style-ticket {
	position: relative;
	border-left: 3px dashed #C9462C;
}
.wp-block-group.is-style-ticket::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 50%;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-green, #3E6B5A);
	transform: translateY(-50%);
}

/* --- テープ留め（上辺にマスキングテープ） --- */
.wp-block-group.is-style-taped {
	position: relative;
}
.wp-block-group.is-style-taped::before {
	content: "";
	position: absolute;
	top: -12px;
	left: 36px;
	width: 110px;
	height: 26px;
	background: rgba(201, 70, 44, .32);
	transform: rotate(-3deg);
}

/* --- プレーンリスト（フッターのリンク列など・マーカーなし） --- */
ul.is-style-plain {
	list-style: none;
	padding-left: 0;
	/* margin はレイアウト（blockGap）側で制御するためここでは触らない */
}
ul.is-style-plain li + li {
	margin-top: 10px;
}
ul.is-style-plain a {
	text-decoration: none;
}
ul.is-style-plain a:hover {
	text-decoration: underline;
}

/* --- 商品カード（ホバーで持ち上げ） --- */
.wp-block-group.is-style-product-card {
	transition: transform .15s ease, box-shadow .15s ease;
}
.wp-block-group.is-style-product-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 18px 40px rgba(91, 64, 40, .2);
}

/* --- ボタン：クラフト枠線（アウトライン） --- */
.wp-block-button.is-style-outline-kraft > .wp-block-button__link {
	background: transparent !important;
	border: 1.5px solid #8a7355;
	color: var(--wp--preset--color--ink, #2B2521) !important;
}
.wp-block-button.is-style-outline-kraft > .wp-block-button__link:hover {
	background: var(--wp--preset--color--kraft-dark, #875327) !important;
	border-color: var(--wp--preset--color--kraft-dark, #875327);
	color: #fff !important;
}

/* --- イベントリスト（カスタムブロックのフロント表示） --- */
.wp-block-mitsuneko-event-list .mitsuneko-event {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	padding: .75rem 0;
	border-top: 1px dashed #d8c8a8;
}
.wp-block-mitsuneko-event-list .mitsuneko-event__date {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 900;
	font-size: 1.25rem;
	color: #C9462C;
	min-width: 7rem;
}

@media (max-width: 600px) {
	.wp-block-mitsuneko-event-list .mitsuneko-event {
		flex-wrap: wrap;
		gap: .25rem;
	}
}

/* ===========================================================
   カスタムブロック（product-grid / guide-cards / instagram-feed / free-shipping-bar）
   =========================================================== */

/* --- 商品グリッド --- */
.mitsuneko-product-grid {
	display: grid;
	grid-template-columns: repeat(var(--mitsuneko-cols, 4), 1fr);
	gap: 1.4rem;
}
.mitsuneko-product {
	display: block;
	text-decoration: none;
	color: inherit;
	background: #fff;
	border-radius: 12px;
	padding: .75rem .75rem 1rem;
	box-shadow: 0 10px 26px rgba(91, 64, 40, .12);
}
.mitsuneko-product__thumb {
	position: relative;
	display: block;
	border-radius: 8px;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}
.mitsuneko-product__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.mitsuneko-product__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #C9462C;
	color: #fff;
	font-size: .7rem;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 6px;
	transform: rotate(-4deg);
}
.mitsuneko-product__name {
	display: block;
	font-size: .82rem;
	line-height: 1.5;
	margin-top: .75rem;
}
.mitsuneko-product__price {
	display: block;
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 700;
	font-size: 1rem;
	margin-top: .25rem;
}
.mitsuneko-product__price del { color: #9a8a72; font-weight: 400; margin-right: .4em; }

/* --- 専門ガイド カード --- */
.mitsuneko-guide-cards {
	display: grid;
	grid-template-columns: repeat(var(--mitsuneko-guide-cols, 3), 1fr);
	gap: 1.25rem;
}
.mitsuneko-guide-card {
	background: var(--wp--preset--color--base, #FBF7EE);
	border-radius: 12px;
	padding: 1.5rem 1.5rem 1.5rem 2rem;
}
.mitsuneko-guide-card__label {
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .16em;
	color: #C9462C;
	margin: 0 0 .5rem;
}
.mitsuneko-guide-card__title {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-size: 1.375rem;
	margin: 0 0 .5rem;
}
.mitsuneko-guide-card__title a { text-decoration: none; color: inherit; }
.mitsuneko-guide-card__excerpt { font-size: .85rem; color: #5A5147; line-height: 1.8; margin: 0; }
.mitsuneko-guide-card__more { font-size: .85rem; font-weight: 700; margin: 1rem 0 0; }
.mitsuneko-guide-card__more a { color: #3E6B5A; text-decoration: none; }

/* --- Instagram フィード --- */
.mitsuneko-instagram__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 1rem;
}
.mitsuneko-instagram__title {
	font-family: 'Zen Maru Gothic', sans-serif;
	font-weight: 700;
	font-size: 1.2rem;
	margin: 0;
}
.mitsuneko-instagram__title a { color: #C9462C; text-decoration: none; font-size: .85em; }
.mitsuneko-instagram__grid {
	display: grid;
	grid-template-columns: repeat(var(--mitsuneko-ig-cols, 6), 1fr);
	gap: 1rem;
}
.mitsuneko-instagram__item { display: block; }
.mitsuneko-instagram__item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

/* --- 送料無料プログレスバー --- */
.mitsuneko-shipbar {
	background: var(--wp--preset--color--kraft-dark, #875327);
	color: #F4E7D2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: .5rem 1.25rem;
	flex-wrap: wrap;
}
.mitsuneko-shipbar.is-reached { background: var(--wp--preset--color--accent-green, #3E6B5A); }
.mitsuneko-shipbar__text {
	margin: 0;
	font-size: .8125rem;
	font-weight: 700;
}
.mitsuneko-shipbar__track {
	display: block;
	width: min(220px, 40vw);
	height: 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .28);
	overflow: hidden;
}
.mitsuneko-shipbar__fill {
	display: block;
	height: 100%;
	background: #F2E9D8;
	border-radius: 999px;
	transition: width .4s ease;
}
.mitsuneko-shipbar.is-reached .mitsuneko-shipbar__fill { background: #F4E7D2; }

@media (max-width: 782px) {
	.mitsuneko-product-grid { grid-template-columns: repeat(2, 1fr); }
	.mitsuneko-guide-cards { grid-template-columns: 1fr; }
	.mitsuneko-instagram__grid { grid-template-columns: repeat(3, 1fr); }
}
