/* =========================================================
 * 2026-10-13 追加のご相談への対応（inc/shop-adjustments.php とセット）
 * ========================================================= */

/* ---------- 熨斗の追加料金をカートに入れる前に表示 ---------- */
.wj-noshi-addon .wj-opt__price {
	display: inline-flex !important;
	height: 30px;
	padding: 0 10px;
	font-size: 14px !important;
}
.wj-noshi-addon .wj-opt__price::before { content: "+"; }
.wj-noshi-addon .wj-opt__box { gap: 10px; }

/* ---------- 「必須」バッジ ---------- */
.wj-options__label {
	display: flex;
	align-items: center;
	gap: 10px;
}
.wj-options__required {
	display: inline-flex !important;
	align-items: center;
	height: auto !important;
	margin-left: 0 !important;
	padding: 3px 8px 2px !important;
	border-radius: 2px;
	background: #9e5236;
	color: #fff;
	font-family: "Noto Sans JP", sans-serif !important;
	font-size: 12px !important;
	font-weight: 500;
	line-height: 1.4 !important;
	letter-spacing: .12em !important;
}

/* ---------- 合計金額（お買い物カゴに追加の上） ---------- */
.wj-buy-total {
	margin-top: 24px;
	padding: 16px 20px;
	background: var(--wj-paper, #f4f1e8);
	border: 1px solid var(--wj-line-2, #d9d4c3);
}
.wj-buy-total__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
}
.wj-buy-total__label {
	font-size: 16px;
	font-weight: 500;
	letter-spacing: .08em;
	color: var(--wj-ink-2, #26261f);
}
.wj-buy-total__value {
	font-family: var(--wj-serif, serif);
	font-size: 28px;
	font-weight: 500;
	letter-spacing: .02em;
	color: var(--wj-ink-2, #26261f);
	white-space: nowrap;
}
.wj-buy-total__detail {
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.7;
	text-align: right;
	color: var(--wj-muted-2, #6b6656);
}
.wj-buy-total__detail:empty { display: none; }
.wj-buy-total.is-empty .wj-buy-total__value { color: var(--wj-muted-2, #6b6656); }
.wj-buy-total.is-empty .wj-buy-total__detail { text-align: left; }
.wj-buy-total + .woocommerce-variation,
.wj-buy-total ~ .wj-buy { margin-top: 16px; }

@media (max-width: 767px) {
	.wj-buy-total { padding: 14px 16px; }
	.wj-buy-total__value { font-size: 24px; }
}

/* ---------- 商品説明内の h2：上に40pxの余白（商品ページのみ） ---------- */
.single-product .wj-spec__val--long h2 { margin-top: 40px; }
.single-product .wj-spec__val--long > h2:first-child { margin-top: 0; }

/* ---------- 商品説明内のリンクを目立たせる ---------- */
.single-product .wj-spec__val--long a {
	color: var(--wj-forest, #3f5a2b);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
	transition: opacity .2s ease;
}
.single-product .wj-spec__val--long a::after {
	content: "›";
	display: inline-block;
	margin-left: .3em;
	text-decoration: none;
}
.single-product .wj-spec__val--long a:hover { opacity: .7; }
/* 段落の中にリンクだけがある場合はボタン風に */
.single-product .wj-spec__val--long p > a:only-child {
	display: inline-flex;
	align-items: center;
	margin-top: 4px;
	padding: 10px 18px;
	border: 1px solid var(--wj-forest, #3f5a2b);
	text-decoration: none;
	line-height: 1.5;
}
.single-product .wj-spec__val--long p > a:only-child:hover {
	background: var(--wj-forest, #3f5a2b);
	color: #fff;
	opacity: 1;
}

/* ---------- アップセル（購入ボタンの下） ---------- */
.wj-upsell {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--wj-line-2, #d9d4c3);
}
.wj-upsell__title {
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: .08em;
	color: var(--wj-forest, #3f5a2b);
}
.wj-upsell__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.wj-upsell__link {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 14px 10px 10px;
	background: #fff;
	border: 1px solid var(--wj-line-3, #c9c3ae);
	color: var(--wj-ink-2, #26261f);
	text-decoration: none;
	transition: border-color .2s ease, background .2s ease;
}
.wj-upsell__link:hover { border-color: var(--wj-forest, #3f5a2b); background: var(--wj-paper, #f4f1e8); }
.wj-upsell__thumb { flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden; }
.wj-upsell__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wj-upsell__body { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.wj-upsell__name { font-size: 15px; line-height: 1.5; }
.wj-upsell__price { font-size: 14px; color: var(--wj-muted-2, #6b6656); }
.wj-upsell__price .amount { font-size: inherit; }
.wj-upsell__arrow { flex: 0 0 auto; font-size: 22px; color: var(--wj-forest, #3f5a2b); }

/* ---------- 商品一覧の絞り込み：子カテゴリを字下げ ---------- */
.wj-filter__item.is-parent .wj-check__text { font-weight: 600; }
.wj-filter__item.is-child { position: relative; padding-left: 1.6em; }
.wj-filter__item.is-child::before {
	content: "";
	position: absolute;
	left: .55em;
	top: 0;
	height: 50%;
	width: .7em;
	border-left: 1px solid var(--wj-line-3, #c9c3ae);
	border-bottom: 1px solid var(--wj-line-3, #c9c3ae);
}
.wj-filter__item.is-depth-2 { padding-left: 3.2em; }
.wj-filter__item.is-depth-2::before { left: 2.15em; }

/* ---------- TOP「商品カテゴリから探す」：長いカテゴリ名だけボックスを横に伸ばす ----------
 * 既定の幅（6列／4列／3列の1マス分）は変えず、名前が収まらないときだけ広がる。 */
.wj-tab__ja,
.wj-tab__en { white-space: nowrap; }
@media (min-width: 768px) {
	.wj-tabs { display: flex; flex-wrap: wrap; justify-content: flex-start; }
	.wj-tabs > .wj-tab {
		flex: 0 0 auto;
		width: auto;
		min-width: calc((100% - 29px * 5) / 6);
		padding-inline: 20px;
	}
}
@media (min-width: 768px) and (max-width: 1200px) {
	.wj-tabs > .wj-tab { min-width: calc((100% - 16px * 3) / 4); }
}
@media (min-width: 768px) and (max-width: 900px) {
	.wj-tabs > .wj-tab { min-width: calc((100% - 12px * 2) / 3); }
}

/* ---------- バリエーションの差額（+¥◯）／熨斗の追加料金：共通のチップ ---------- */
.wj-opt__diff {
	display: inline-flex;
	align-items: center;
	height: 30px;
	padding: 0 10px;
	border: 1px solid var(--wj-line-3, #c9c3ae);
	background: #fff;
	font-family: var(--wj-serif, serif);
	font-style: normal;
	font-weight: 500;
	font-size: 14px;
	letter-spacing: .39px;
	color: var(--wj-muted-2, #6b6656);
	white-space: nowrap;
	transition: border-color .25s ease, color .25s ease, background .25s ease;
}
.wj-opt__box:has(.wj-opt__diff) { gap: 10px; }
.wj-opt input:checked + .wj-opt__box .wj-opt__diff {
	background: transparent;
	border-color: rgba(244, 241, 232, .45);
	color: rgba(244, 241, 232, .85);
}

/* ---------- 購入ボタン上の案内（金額・カートに追加済み・在庫の注意） ---------- */
.wj-buy-status { margin-top: 24px; display: grid; gap: 12px; }
.wj-buy-status:empty { display: none; }
.wj-buy-status .wj-buy-total { margin-top: 0; }
.wj-buy-status .wj-buy-total__detail { text-align: right; }

.wj-in-cart {
	padding: 12px 16px;
	border: 1px dashed var(--wj-line-3, #c9c3ae);
	background: #fff;
	font-size: 14px;
	line-height: 1.7;
	color: var(--wj-ink-2, #26261f);
}
.wj-in-cart__title { margin: 0 0 4px; font-weight: 600; letter-spacing: .06em; color: var(--wj-forest, #3f5a2b); }
.wj-in-cart__list { margin: 0; padding: 0; list-style: none; }
.wj-in-cart__list li { display: flex; justify-content: space-between; gap: 12px; }
.wj-in-cart__list li span { white-space: nowrap; color: var(--wj-muted-2, #6b6656); }

.wj-stock-alert {
	margin: 0;
	padding: 10px 14px;
	border-left: 3px solid #b3261e;
	background: #fbeeee;
	color: #b3261e;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
}
.wj-stock-alert[hidden] { display: none !important; }

.single_add_to_cart_button[disabled],
.single_add_to_cart_button.is-stock-limit {
	opacity: .45;
	cursor: not-allowed;
}

/* ---------- 送料無料の案内（最短お届け日と同じデザイン） ---------- */
.wj-single__shipping { margin-top: 10px; }
.wj-single__delivery[hidden] + .wj-single__shipping { margin-top: 20px; }
.wj-single__shipping::before {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5 12 3l9 4.5v9L12 21l-9-4.5z'/%3E%3Cpath d='M3 7.5 12 12l9-4.5M12 12v9'/%3E%3Cpath d='m7.5 5.25 9 4.5'/%3E%3C/svg%3E");
	        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7.5 12 3l9 4.5v9L12 21l-9-4.5z'/%3E%3Cpath d='M3 7.5 12 12l9-4.5M12 12v9'/%3E%3Cpath d='m7.5 5.25 9 4.5'/%3E%3C/svg%3E");
}

/* ---------- 在庫切れ ---------- */
.single_add_to_cart_button.is-soldout {
	opacity: 1;
	background: #8a8a80 !important;
	border-color: #8a8a80 !important;
	color: #fff !important;
	cursor: not-allowed;
}
.single_add_to_cart_button.is-soldout::after { display: none !important; }
[data-sticky-add].is-soldout,
[data-sticky-buy-now].is-soldout { opacity: .45; cursor: not-allowed; }
.wj-opt.is-soldout .wj-opt__name { color: #9a968a; }
.wj-opt__soldout {
	display: inline-flex;
	align-items: center;
	margin-left: 8px;
	padding: 1px 6px;
	border: 1px solid #b3261e;
	color: #b3261e;
	font-size: 11px;
	line-height: 1.5;
	letter-spacing: .06em;
	white-space: nowrap;
	background: #fff;
}
