/* BANAKANA Package Designer — デザイン確認ビューア (v1.15.0)
   カート・チェックアウト・注文確認ページで、注文デザインをタップ→拡大表示 */

/* --- サムネに「タップで拡大できる」ことを示す --- */
img[src*="/bkpd/"] { cursor: zoom-in; }

:where(.wc-block-cart-item__image,
	.wc-block-components-order-summary-item__image,
	td.product-thumbnail):has(img[src*="/bkpd/"]) {
	position: relative;
	cursor: zoom-in;
}
:where(.wc-block-cart-item__image,
	.wc-block-components-order-summary-item__image,
	td.product-thumbnail):has(img[src*="/bkpd/"])::after {
	content: '';
	position: absolute;
	right: -7px;
	bottom: -7px;
	width: 24px;
	height: 24px;
	background: #2d3d2b url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5.2 5.2'/%3E%3C/svg%3E") center / 13px 13px no-repeat;
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
	pointer-events: none;
}

/* --- 拡大ビューア --- */
.bkpd-viewer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 18px;
}
.bkpd-viewer[hidden] { display: none; }
.bkpd-viewer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(30, 28, 22, .82);
}
.bkpd-viewer__panel {
	position: relative;
	margin: 0;
	padding: 16px 16px 14px;
	background: #f7f4ee;
	border-radius: 10px;
	box-shadow: 0 14px 44px rgba(0, 0, 0, .38);
	max-width: min(560px, calc(100vw - 36px));
}
.bkpd-viewer__img {
	display: block;
	margin: 0 auto;
	/* 親(flexアイテム)幅基準の100%だと相互依存で潰れるため、ビューポート基準で確定させる */
	max-width: min(520px, calc(100vw - 68px));
	max-height: 70vh;
	width: auto;
	height: auto;
	background: #fff;
	border: 1px solid #e3ddd0;
	border-radius: 4px;
}
.bkpd-viewer__cap {
	margin: 10px 0 0;
	text-align: center;
	font-size: 13px;
	color: #55503f;
	line-height: 1.5;
}
.bkpd-viewer__cap small { font-size: 11px; color: #8a8577; }
.bkpd-viewer__close {
	position: absolute;
	top: -12px;
	right: -12px;
	width: 34px;
	height: 34px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #2d3d2b;
	color: #fff;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
html.bkpd-viewer-open,
html.bkpd-viewer-open body { overflow: hidden; }
