@charset "utf-8";

/**
 * 全ページ共通の基本スタイル、ヘッダー、フッター、共通UI。
 */

:root {
	--jy-color-text: #333;
	--jy-color-text-strong: #404040;
	--jy-color-muted: #777;
	--jy-color-border: #bbb;
	--jy-color-surface: #fff;
	--jy-color-accent: #b68240;
	--jy-control-radius: 5px;
	--jy-handheld-footer-height: 64px;
}

/* 基本文字サイズ */
h1 {
	font-size: 1.8em;
}

h2 {
	font-size: 1.5em;
}

h3 {
	font-size: 1.2em;
}

select,
mark {
	color: var(--jy-color-text);
}

/* ヘッダーとパンくずの基本余白 */
.site-header {
	padding-top: 1em;
	padding-bottom: 1em;
}

.storefront-breadcrumb {
	margin: 0 0 1em;
	padding: 1em 0;
}

/* キーボード操作時にフォーカス位置を見失わないための共通表示 */
.main-navigation ul li a {
	margin-top: 2px;
	padding-left: 3px;
}

a:focus,
input:focus,
textarea:focus,
button:focus {
	outline: 1px solid #98aca1;
	outline-offset: -1px;
}

html {
	scroll-behavior: smooth;
}

/* ページ上部へ戻るボタン */
.back-to-top {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 999;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--jy-color-accent);
	color: var(--jy-color-surface);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.2s ease;
}

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

.back-to-top:hover {
	background-color: #c48f45;
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.22);
}

@media (max-width: 767px) {
	.back-to-top {
		right: 16px;
		bottom: 88px;
	}
}

/* コピーライト */
.site-footer .site-info {
	text-align: center;
}

/* --------------------------------------------------------------------------
 * ヘッダー
 * ----------------------------------------------------------------------- */

.site-header .col-full {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.site-branding {
	flex-grow: 1;
	margin-bottom: 0;
}

.secondary-navigation {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	margin-bottom: 0;
}

/* Storefrontのカラム用右余白を解除し、ロゴ・メニュー・検索欄の幅を保つ */
.storefront-secondary-navigation.woocommerce-active .site-header .secondary-navigation {
	margin-right: 0;
}

.secondary-navigation .menu {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.secondary-navigation .menu-item {
	display: flex;
	align-items: center;
}

/* PHPで付与するクラスを使い、WordPress固有のメニューIDにCSSを依存させない */
.secondary-navigation .jy-account-menu-item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	margin-right: 20px;
	font-size: 12px;
}

.secondary-navigation .jy-account-menu-item > a {
	position: relative;
	top: -20px;
	padding-top: 0;
	padding-bottom: 0;
}

.secondary-navigation .jy-account-menu-item > a::before {
	position: relative;
	top: 13px;
	display: block;
	content: "\f007";
	cursor: pointer;
	font-family: "Font Awesome 6 Free";
	font-size: 1.8em;
	font-style: normal;
	font-variant: normal;
	font-weight: 900;
	line-height: 2.618046972;
	text-align: center;
	text-indent: 0;
	-moz-osx-font-smoothing: grayscale;
}

.secondary-navigation .menu-item-login > a::before {
	content: "";
}

.storefront-primary-navigation {
	line-height: 1;
}

.main-navigation ul.menu > li.menu-item-has-children > a::after {
	margin-left: 0.5em;
}

/*
 * WeChatプラグインが要素へサイズを直接指定するため、この範囲だけ
 * !importantで上書きする。
 */
.secondary-navigation .xh-social-item {
	position: relative;
	top: -15px !important;
	left: -15px !important;
	width: 35px !important;
	height: 35px !important;
	margin-right: 0 !important;
	padding-top: 14px !important;
	padding-bottom: 14px !important;
	background-size: 35px 35px !important;
	cursor: pointer;
	zoom: 1;
}

.secondary-navigation .xh-social-item::after {
	position: relative;
	top: 26px;
	left: -17px;
	display: block;
	width: 100%;
	content: "微信登录";
	color: var(--jy-color-text-strong);
	font-size: 12px;
	text-align: center;
	white-space: nowrap;
}

@media (min-width: 768px) {
	.storefront-secondary-navigation.woocommerce-active .site-header .site-branding {
		min-width: 180px;
	}
}

@media (max-width: 767px) {
	.site-header .col-full {
		display: block;
	}

	.secondary-navigation {
		display: none;
	}
}

/* --------------------------------------------------------------------------
 * モバイルドロワーメニュー
 * ----------------------------------------------------------------------- */

@media screen and (max-width: 782px) {
	html #wpadminbar {
		position: fixed;
	}
}

@media (max-width: 767px) {
	:root {
		--jy-handheld-footer-height: 64px;
	}

	#masthead {
		position: fixed;
		top: 0;
		right: 0;
		left: 0;
		z-index: 9999;
		width: 100%;
	}

	body {
		padding-top: 81px;
		padding-bottom: var(--jy-handheld-footer-height);
	}

	.storefront-breadcrumb,
	.site-content,
	.site-footer {
		position: static;
		top: auto;
	}

	body.admin-bar #masthead {
		top: 46px;
	}

	#masthead a:focus,
	#masthead button:focus {
		outline: none;
	}

	#site-navigation {
		position: static;
		z-index: auto;
	}

	#site-navigation.toggled {
		z-index: 100000;
	}

	/* Storefrontの通常メニューを画面右側のドロワーへ変更する */
	#site-navigation .handheld-navigation {
		position: fixed;
		top: 0;
		right: 0;
		bottom: var(--jy-handheld-footer-height);
		z-index: 100001;
		display: block;
		width: 75vw;
		max-width: 340px;
		height: calc(100dvh - var(--jy-handheld-footer-height));
		max-height: none;
		padding-top: 64px;
		padding-bottom: calc(var(--jy-handheld-footer-height) + env(safe-area-inset-bottom, 0px) + 16px);
		padding-left: 1em;
		overflow-y: auto;
		background: var(--jy-color-surface);
		box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
		opacity: 0;
		visibility: hidden;
		transform: translateX(105%);
		transition:
			transform 0.25s ease,
			opacity 0.25s ease,
			visibility 0s linear 0.25s;
		-webkit-overflow-scrolling: touch;
	}

	#site-navigation #site-navigation-menu-toggle {
		padding-right: 0;
		border: 0;
	}

	#site-navigation.toggled .handheld-navigation {
		opacity: 1;
		visibility: visible;
		transform: translateX(0);
		transition:
			transform 0.25s ease,
			opacity 0.25s ease,
			visibility 0s;
	}

	#site-navigation.toggled #site-navigation-menu-toggle {
		position: fixed;
		top: 16px;
		right: calc(1.41575em + 2px);
		z-index: 100003;
	}

	body.admin-bar #site-navigation .handheld-navigation {
		top: 46px;
		bottom: var(--jy-handheld-footer-height);
		height: calc(100dvh - 46px - var(--jy-handheld-footer-height));
	}

	body.admin-bar #site-navigation.toggled #site-navigation-menu-toggle {
		top: calc(46px + 16px);
	}

	#site-navigation .mobile-menu-overlay {
		position: fixed;
		inset: 0;
		z-index: 100000;
		background: rgba(0, 0, 0, 0.45);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity 0.2s ease, visibility 0s linear 0.2s;
	}

	#site-navigation.toggled .mobile-menu-overlay {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transition: opacity 0.2s ease, visibility 0s;
	}

	body.mobile-menu-open {
		overflow: hidden;
		touch-action: none;
	}
}

/* --------------------------------------------------------------------------
 * 商品と投稿の共通検索フォーム
 * ----------------------------------------------------------------------- */

@media (min-width: 768px) {
	.woocommerce-active .site-header .site-search {
		width: 27%;
		min-width: 220px;
	}
}

.widget_product_search form.jy-product-post-search {
	display: flex;
	align-items: center;
	gap: 8px;
}

.widget_product_search form.jy-product-post-search::before {
	display: none;
}

.widget_product_search form:not(.wp-block-search) input[type="search"] {
	padding-left: 1em;
}

.widget_product_search form.jy-product-post-search .search-field {
	box-sizing: border-box;
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 40px;
	padding: 0 14px;
	border: 1px solid #ddd;
	border-radius: var(--jy-control-radius);
	font-size: 14px;
}

/*
 * Storefrontが検索ボタンへ視覚的非表示スタイルを適用するため、
 * 位置とクリップを明示的に通常表示へ戻す。
 */
.widget_product_search form.jy-product-post-search button[type="submit"] {
	position: static;
	clip: auto;
	clip-path: none;
	overflow: visible;
	width: auto;
	height: 38px;
	min-width: 56px;
	margin: 0;
	padding: 0 12px;
	border: 0;
	border-radius: var(--jy-control-radius);
	background: var(--jy-color-text-strong);
	color: var(--jy-color-surface);
	cursor: pointer;
	font-size: 14px;
	font-weight: 400;
	line-height: 1;
	white-space: nowrap;
}

.widget_product_search form.jy-product-post-search button[type="submit"]:hover {
	background: #595959;
}

@media (max-width: 767px) {
	.widget_product_search form.jy-product-post-search .search-field {
		height: 44px;
	}

	.widget_product_search form.jy-product-post-search button[type="submit"] {
		height: 42px;
	}
}

/* --------------------------------------------------------------------------
 * フッター
 * ----------------------------------------------------------------------- */

@media (min-width: 768px) {
	.site-footer {
		padding-bottom: 0;
	}

	.site-footer .footer-widgets {
		padding-top: 1em;
	}
}

.site-footer .widget {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.site-footer .footer-widget-2 h4,
	.site-footer .footer-widget-3 h4 {
		margin-top: 2em;
	}
}

/*
 * 次のIDはWordPressブロック設定に由来するため、置換時に確認しやすいよう
 * フッター専用の範囲へまとめる。
 */
.site-footer .widget#block-28 .cat-item {
	padding-left: 0;
}

.site-footer .widget#block-28 .cat-item::before {
	content: "";
}

.site-footer .widget .wp-block-categories-list li,
.site-footer .widget .wc-block-product-categories-list-item,
.site-footer .widget .wp-block-list li {
	margin-bottom: 5px;
}

.site-footer .widget#block-26 p,
.site-footer .widget#block-24 p {
	margin-bottom: 1em;
}

.site-footer .widget h4 {
	font-size: 1.2em;
}

.site-footer .widget h5 {
	margin-bottom: 0;
	font-size: 1em;
}

/* サイト共通の客服ボタン */
.cs-link-btn {
	margin-bottom: 1.5em;
}

.cs-link-btn a {
	padding-top: 10px;
	padding-bottom: 10px;
	font-weight: 400;
}

.fab.fa-weixin {
	margin-right: 5px;
}

.pc-cs-link-notice {
	margin-bottom: 0.5em;
}

/* 未ログイン時のモバイルフッターバー */
.storefront-handheld-footer-bar .xh-social {
	position: relative;
	z-index: 999;
	display: block;
	height: 4.235801032em;
	overflow: hidden;
	border-right: 1px solid rgba(255, 255, 255, 0.2);
	background-color: var(--jy-color-surface);
}

.storefront-handheld-footer-bar .xh-social-item {
	position: relative;
	top: 10px;
	left: 50px;
	width: 35px;
	height: 35px;
	background-size: 35px 35px;
}

.storefront-handheld-footer-bar .xh-social-item::after {
	position: absolute;
	top: 32px;
	left: 20%;
	display: block;
	width: 100%;
	content: "微信登录";
	color: var(--jy-color-text);
	font-size: 14px;
	text-align: center;
	white-space: nowrap;
	transform: translateX(-50%);
}
