/* Mobile cart as a native-feeling bottom sheet. Desktop keeps the lateral
 * commerce drawer; only the presentation changes below the phone breakpoint. */
@media (max-width: 767px) {
	/* Keep the bag in the familiar top-right position: a crisp outline, a
	 * generous thumb target, and a live quantity badge for instant feedback. */
	[data-ekcs-cart-open] {
		-webkit-tap-highlight-color: transparent;
	}
	.ekcs-cart[data-ekcs-cart-open] {
		width: 46px;
		min-width: 46px;
		height: 46px;
		min-height: 46px;
		border-radius: 999px;
	}
	.ekcs-cart[data-ekcs-cart-open] > svg {
		width: 23px !important;
		height: 23px !important;
		stroke-width: 1.55 !important;
		transition: transform .28s cubic-bezier(.22,1,.36,1);
	}
	.ekcs-cart[data-ekcs-cart-open][aria-expanded="true"] {
		background: rgba(139,118,88,.1);
		color: var(--ekcs-accent);
	}
	.ekcs-cart[data-ekcs-cart-open][aria-expanded="true"] > svg {
		transform: translateY(-1px);
	}
	.ekcs-cart[data-ekcs-cart-open] .ekcs-cart-count {
		top: 1px;
		right: -1px;
		min-width: 19px;
		height: 19px;
		padding: 0 5px;
		border-width: 2px;
		box-shadow: 0 2px 7px rgba(35,31,27,.18);
		font-size: 9px;
		font-variant-numeric: tabular-nums;
	}

	.ekcs-cart-drawer {
		overflow: hidden;
		transition: visibility 0s linear .42s;
	}
	.ekcs-cart-drawer.is-open {
		transition-delay: 0s;
	}
	.ekcs-cart-drawer__backdrop {
		background: rgba(24,20,17,.36);
		backdrop-filter: blur(2px);
		-webkit-backdrop-filter: blur(2px);
		cursor: pointer;
		transition: opacity .3s ease;
	}
	.ekcs-cart-drawer__panel {
		inset: auto 7px 0;
		width: auto;
		height: min(92dvh, 780px);
		max-height: calc(100dvh - 12px);
		border: 1px solid rgba(35,31,27,.1);
		border-bottom: 0;
		border-radius: 24px 24px 0 0;
		background: #fffdf9;
		box-shadow: 0 -22px 70px rgba(31,25,20,.2);
		transform: translate3d(0,calc(100% + 24px),0);
		transform-origin: center bottom;
		transition: transform .42s cubic-bezier(.22,1,.36,1);
		will-change: transform;
	}
	.ekcs-cart-drawer.is-open .ekcs-cart-drawer__panel {
		transform: translate3d(0,0,0);
	}
	.ekcs-cart-drawer__panel::before {
		position: absolute;
		top: 10px;
		left: 50%;
		z-index: 4;
		width: 38px;
		height: 3px;
		border-radius: 99px;
		background: #c9c0b6;
		content: "";
		transform: translateX(-50%);
		pointer-events: none;
	}
	.ekcs-cart-drawer__head {
		min-height: 88px;
		padding: 25px 16px 12px 22px;
		background: rgba(255,253,249,.96);
	}
	.ekcs-cart-drawer__head > div > span {
		color: #9a8063;
		letter-spacing: .18em;
	}
	.ekcs-cart-drawer__head h2 {
		letter-spacing: -.025em;
	}
	.ekcs-cart-drawer__head .ekcs-icon {
		width: 44px;
		min-width: 44px;
		height: 44px;
		min-height: 44px;
	}
	.ekcs-cart-items,
	.ekcs-cart-empty-wrap {
		overscroll-behavior: contain;
	}
	.ekcs-cart-drawer .aibt-cart-upsell__name {
		display: block !important;
		max-height: none !important;
		overflow: visible !important;
		-webkit-box-orient: initial !important;
		-webkit-line-clamp: unset !important;
		line-clamp: unset !important;
		white-space: normal !important;
	}
	body.ekcs-cart-open,
	html.ekcs-cart-open-root {
		overflow: hidden !important;
	}

	/* StyleMZ shares the motion but keeps its sharper artist-studio identity. */
	body.ekcs-site-smz .smzz-action--bag {
		min-width: 56px;
		min-height: 56px;
	}
	body.ekcs-site-smz .smzz-action--bag > svg {
		width: 22px;
		height: 22px;
		transition: transform .24s cubic-bezier(.22,1,.36,1);
	}
	body.ekcs-site-smz .smzz-action--bag[aria-expanded="true"] {
		background: var(--smzz-blue);
		color: var(--smzz-white);
	}
	body.ekcs-site-smz .smzz-action--bag[aria-expanded="true"] > svg {
		transform: translateY(-1px);
	}
	body.ekcs-site-smz .smzz-action--bag .ekcs-cart-count {
		top: 6px;
		right: 5px;
		min-width: 19px;
		height: 19px;
		padding: 0 4px;
		border-width: 1px;
		border-radius: 999px;
		box-shadow: 2px 2px 0 var(--smzz-ink);
		font-variant-numeric: tabular-nums;
	}
	body.ekcs-site-smz .ekcs-cart-drawer__backdrop {
		background: rgba(0,0,0,.43);
		backdrop-filter: blur(1px);
		-webkit-backdrop-filter: blur(1px);
	}
	body.ekcs-site-smz .ekcs-cart-drawer__panel {
		right: 6px;
		left: 6px;
		height: min(93dvh, 790px);
		max-height: calc(100dvh - 10px);
		border: 2px solid #111;
		border-bottom: 0;
		border-radius: 12px 12px 0 0 !important;
		background: #f7f6f1;
		box-shadow: 0 -14px 0 rgba(0,0,0,.1);
	}
	html body.ekcs-site-smz.ekcs-active .ekcs-cart-drawer > .ekcs-cart-drawer__panel {
		border-radius: 12px 12px 0 0 !important;
	}
	html body.ekcs-site-smz.ekcs-active .ekcs-cart-drawer .aibt-cart-upsell__name {
		display: block !important;
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
		-webkit-box-orient: initial !important;
		-webkit-line-clamp: unset !important;
		line-clamp: unset !important;
		white-space: normal !important;
	}
	body.ekcs-site-smz .ekcs-cart-drawer__panel::before {
		top: 11px;
		width: 44px;
		height: 2px;
		border-radius: 0;
		background: #111;
	}
	body.ekcs-site-smz .ekcs-cart-drawer__head {
		min-height: 90px;
		padding: 26px 14px 12px 20px;
		border-bottom: 2px solid #111;
		background: #f7f6f1;
	}
	body.ekcs-site-smz .ekcs-cart-drawer__head > div > span {
		color: #111;
		font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
		letter-spacing: .16em;
	}
	body.ekcs-site-smz .ekcs-cart-drawer__head h2 {
		font-family: Arial,Helvetica,sans-serif;
		font-weight: 800;
		letter-spacing: -.045em;
		text-transform: uppercase;
	}
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	.ekcs-cart-drawer,
	.ekcs-cart-drawer__backdrop,
	.ekcs-cart-drawer__panel {
		transition-duration: .01ms !important;
		transition-delay: 0s !important;
	}
}
