/* Johanna Shop Enhancer — mini-cart drawer + floating cart button */

html.jnse-lock, html.jnse-lock body { overflow: hidden; }

html body .jnse-fab {
	all: unset; box-sizing: border-box; cursor: pointer;
	position: fixed; right: 20px; bottom: 20px; z-index: 99990;
	width: 60px; height: 60px; border-radius: 50%;
	display: grid; place-items: center;
	color: var(--jn-on-primary); background: var(--jn-primary);
	box-shadow: 0 12px 30px -10px rgba(0,0,0,.45);
	transition: transform .2s, background .2s;
}
html body .jnse-fab:hover { background: var(--jn-primary-hover); transform: translateY(-2px); }
html body .jnse-fab:focus-visible { outline: 3px solid var(--jn-accent); outline-offset: 3px; }
html body .jnse-fab svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
html body .jnse-fab .jnse-cart-count {
	position: absolute; top: -2px; right: -2px;
	min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
	display: grid; place-items: center;
	font: 700 12px/1 var(--jn-font-body), system-ui, sans-serif;
	color: var(--jn-on-primary); background: var(--jn-accent);
	border: 2px solid var(--jn-bg);
}
html body .jnse-fab .jnse-cart-count[data-count="0"] { display: none; }
html body .jnse-fab.is-bump { animation: jnse-bump .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes jnse-bump { 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

html body .jnse-overlay {
	position: fixed; inset: 0; z-index: 99998;
	background: rgba(15, 12, 10, .45);
	backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
	opacity: 0; transition: opacity .3s;
}
html body .jnse-overlay[hidden] { display: none; }
html body .jnse-overlay.is-open { opacity: 1; }

html body .jnse-drawer {
	position: fixed; top: 0; right: 0; bottom: 0; z-index: 99999;
	width: min(440px, 100vw);
	display: flex; flex-direction: column;
	color: var(--jn-text); background: var(--jn-bg);
	font-family: var(--jn-font-body);
	box-shadow: -20px 0 60px -20px rgba(0,0,0,.35);
	transform: translateX(105%); visibility: hidden;
	transition: transform .38s cubic-bezier(.2,.7,.2,1), visibility 0s linear .38s;
	outline: none;
}
html body .jnse-drawer.is-open { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2,.7,.2,1), visibility 0s; }
html body .jnse-drawer *, html body .jnse-drawer *::before, html body .jnse-drawer *::after { box-sizing: border-box; }
html body .jnse-drawer svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

html body .jnse-drawer .jnse-drawer__head {
	display: flex; align-items: center; justify-content: space-between;
	padding: 20px 22px; border-bottom: 1px solid var(--jn-border);
}
html body .jnse-drawer .jnse-drawer__head h2 { margin: 0; padding: 0; font-family: var(--jn-font-heading); font-size: 20px; font-weight: 600; color: var(--jn-text); line-height: 1.2; }
html body .jnse-drawer .jnse-drawer__close {
	all: unset; cursor: pointer; width: 38px; height: 38px; border-radius: 50%;
	display: grid; place-items: center; font-size: 28px; line-height: 1; color: var(--jn-text);
	transition: background .2s;
}
html body .jnse-drawer .jnse-drawer__close:hover { background: var(--jn-surface); }

html body .jnse-drawer .jnse-drawer__body { flex: 1; display: flex; flex-direction: column; min-height: 0; }

html body .jnse-drawer .jnse-items { list-style: none; margin: 0; padding: 6px 22px; flex: 1; overflow-y: auto; overscroll-behavior: contain; }
html body .jnse-drawer .jnse-item {
	position: relative; display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: start;
	margin: 0; padding: 16px 0; border-bottom: 1px solid var(--jn-border);
	transition: opacity .2s;
}
html body .jnse-drawer .jnse-item::before { content: none; }
html body .jnse-drawer .jnse-item.is-busy { opacity: .55; pointer-events: none; }
html body .jnse-drawer .jnse-item.is-removing { opacity: .25; }
html body .jnse-drawer .jnse-item__img { display: block; width: 76px; aspect-ratio: 1; border-radius: calc(var(--jn-radius) * .7); overflow: hidden; background: var(--jn-surface); }
html body .jnse-drawer .jnse-item__img img { width: 100%; height: 100%; object-fit: cover; margin: 0; display: block; }
html body .jnse-drawer .jnse-item__info { min-width: 0; }
html body .jnse-drawer .jnse-item__name { display: block; margin: 0 0 4px; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--jn-text); text-decoration: none; }
html body .jnse-drawer .jnse-item__name:hover { color: var(--jn-primary); text-decoration: underline; }
html body .jnse-drawer dl.variation { margin: 0 0 6px; font-size: 12.5px; color: var(--jn-muted); }
html body .jnse-drawer dl.variation dt, html body .jnse-drawer dl.variation dd { display: inline; margin: 0; float: none; }
html body .jnse-drawer dl.variation dd p { display: inline; margin: 0; }
html body .jnse-drawer .jnse-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
html body .jnse-drawer .jnse-item__price { font-weight: 700; font-size: 14.5px; white-space: nowrap; }

html body .jnse-drawer .jnse-qty {
	display: inline-flex; align-items: center; height: 36px;
	border: 1px solid var(--jn-border); border-radius: 999px; overflow: hidden;
}
html body .jnse-drawer .jnse-qty button {
	all: unset; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center;
	font-size: 17px; color: var(--jn-text); transition: background .15s;
}
html body .jnse-drawer .jnse-qty button:hover { background: var(--jn-surface); }
html body .jnse-drawer .jnse-qty button[disabled] { opacity: .3; cursor: default; }
html body .jnse-drawer .jnse-qty span { min-width: 26px; text-align: center; font-size: 14px; font-weight: 600; }

html body .jnse-drawer .jnse-item__remove {
	all: unset; cursor: pointer; width: 32px; height: 32px; border-radius: 50%;
	display: grid; place-items: center; font-size: 17px; color: var(--jn-muted); transition: color .15s, background .15s;
}
html body .jnse-drawer .jnse-item__remove:hover { color: var(--jn-sale); background: var(--jn-surface); }

html body .jnse-drawer .jnse-drawer__foot { padding: 18px 22px 22px; border-top: 1px solid var(--jn-border); background: var(--jn-bg); }
html body .jnse-drawer .jnse-subtotal { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
html body .jnse-drawer .jnse-subtotal strong { font-size: 19px; }
html body .jnse-drawer .jnse-drawer__note { margin: 4px 0 16px; font-size: 12.5px; color: var(--jn-muted); }

html body .jnse-drawer .jnse-dbtn,
.jnse-dbtn {
	display: flex; align-items: center; justify-content: center;
	width: 100%; min-height: 52px; margin: 0 0 10px; padding: 0 20px;
	font-family: var(--jn-font-body); font-size: 15px; font-weight: 600; letter-spacing: .01em;
	text-decoration: none; text-transform: none;
	color: var(--jn-on-primary); background: var(--jn-primary);
	border: 1px solid var(--jn-primary); border-radius: 999px;
	transition: background .2s, color .2s, border-color .2s;
}
html body .jnse-drawer .jnse-dbtn:hover { color: var(--jn-on-primary); background: var(--jn-primary-hover); border-color: var(--jn-primary-hover); }
html body .jnse-drawer .jnse-dbtn--ghost { color: var(--jn-text); background: transparent; border-color: var(--jn-border); margin-bottom: 0; }
html body .jnse-drawer .jnse-dbtn--ghost:hover { color: var(--jn-text); background: var(--jn-surface); border-color: var(--jn-text); }

html body .jnse-drawer .jnse-drawer__empty { margin: auto; padding: 40px 30px; text-align: center; color: var(--jn-muted); }
html body .jnse-drawer .jnse-drawer__empty svg { width: 46px; height: 46px; margin-bottom: 10px; }
html body .jnse-drawer .jnse-drawer__empty p { margin: 0 0 18px; font-size: 16px; color: var(--jn-text); }

/* Free-shipping progress (drawer + cart page) */
html body .jnse-freeship { margin: 14px 22px 4px; padding: 12px 14px; border-radius: calc(var(--jn-radius) * .7); background: var(--jn-surface); font-size: 13.5px; }
html body .jnse-freeship p { margin: 0 0 8px; color: var(--jn-text); }
html body .jnse-freeship__bar { height: 6px; border-radius: 99px; background: var(--jn-border); overflow: hidden; }
html body .jnse-freeship__bar span { display: block; height: 100%; border-radius: 99px; background: var(--jn-accent); transition: width .5s; }
html body .jnse-freeship.is-done .jnse-freeship__bar span { background: var(--jn-primary); }

@media (max-width: 480px) {
	html body .jnse-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
	html body .jnse-drawer .jnse-items, html body .jnse-drawer .jnse-drawer__head, html body .jnse-drawer .jnse-drawer__foot { padding-left: 16px; padding-right: 16px; }
	html body .jnse-freeship { margin-left: 16px; margin-right: 16px; }
}
