/*
 * enitan hope: B-06 Added-to-basket drawer (canvas BasketDrawerV2 / Mobile; inc/drawer.php).
 * Right-hand panel (460px) on desktop and tablet, bottom sheet (max 92%) under 690px. Tokens only.
 */

html.eh-drw-lock { overflow: hidden; }
.eh-drw { position: fixed; inset: 0; z-index: 9993; }
.eh-drw[hidden] { display: none; }
.eh-drw__scrim { position: absolute; inset: 0; background: rgba(26, 26, 26, .45); opacity: 0; transition: opacity var(--wp--custom--eh--motion); }
.eh-drw__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: 460px; max-width: 100%; box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain;
	padding: 28px 32px; background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink);
	display: flex; flex-direction: column; gap: var(--wp--preset--spacing--m);
	box-shadow: -12px 0 32px rgba(26, 26, 26, .18); transform: translateX(100%); transition: transform var(--wp--custom--eh--motion);
}
.eh-drw.is-open .eh-drw__scrim { opacity: 1; }
.eh-drw.is-open .eh-drw__panel { transform: none; }
.eh-drw__panel > * { margin: 0; flex: none; }
.eh-drw__grip { display: none; }

.eh-drw__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.eh-drw__h { margin: 0; display: flex; align-items: center; gap: 10px; font-family: var(--wp--preset--font-family--sans); font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: 0; }
.eh-drw__h:focus { outline: none; }
.eh-drw__h:focus-visible { outline: var(--wp--custom--eh--focus); outline-offset: 4px; }
.eh-drw__ok { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; background: var(--wp--preset--color--blue); color: var(--wp--preset--color--white); }
.eh-drw__x { flex: none; width: 44px; height: 44px; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; border: var(--wp--custom--eh--border); border-radius: 0; background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink); cursor: pointer; transition: background var(--wp--custom--eh--motion); }
@media (hover: hover) and (pointer: fine) { .eh-drw__x:hover { background: var(--wp--preset--color--studio-grey); color: var(--wp--preset--color--ink); } }
.eh-drw__x:active { background: var(--wp--preset--color--line); }
.eh-drw__x:focus-visible { outline: var(--wp--custom--eh--focus); outline-offset: 2px; }

.eh-drw__item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: start; padding-bottom: 20px; border-bottom: var(--wp--custom--eh--border); }
.eh-drw__img, .eh-drw__gimg { display: flex; align-items: center; justify-content: center; aspect-ratio: var(--wp--custom--eh--media--product); background: var(--wp--preset--color--studio-grey); }
.eh-drw__img img { width: 58%; height: auto; display: block; box-shadow: var(--wp--preset--shadow--card); }
.eh-drw__txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.eh-drw__name { font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--wp--preset--color--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .eh-drw__name:hover { text-decoration: underline; text-underline-offset: 4px; } }
.eh-drw__sub { font-size: var(--wp--preset--font-size--meta); color: var(--wp--preset--color--stone); }
.eh-drw__price { font-size: 15px; font-weight: 500; text-align: right; }
.eh-drw__price .eh-sale { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }

.eh-drw__free { background: var(--wp--preset--color--paper); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.5; }
.eh-drw__free > * { margin: 0; }
.eh-drw__free strong { font-weight: 600; }
.eh-drw__bar { height: 4px; background: var(--wp--preset--color--paper-line); }
.eh-drw__bar span { display: block; height: 4px; background: var(--wp--preset--color--ink); }
.eh-drw__pts { color: var(--wp--preset--color--stone); }

.eh-drw__acts { display: flex; flex-direction: column; gap: 10px; }
.eh-drw__go { min-height: 56px; }

.eh-drw__goes { display: flex; flex-direction: column; gap: 14px; }
.eh-drw__cap { margin: 0; font-family: var(--wp--preset--font-family--sans); font-size: var(--wp--preset--font-size--label); font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--wp--preset--color--stone); }
.eh-drw__goes ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.eh-drw__goes li { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.eh-drw__gimg img { width: 56%; height: auto; display: block; box-shadow: var(--wp--preset--shadow--card); }
.eh-drw__gname { font-size: 12px; font-weight: 500; line-height: 1.35; color: var(--wp--preset--color--ink); text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .eh-drw__gname:hover { text-decoration: underline; text-underline-offset: 3px; } }
.eh-drw__gprice { font-size: 12px; }
.eh-drw__gprice .eh-sale { display: flex; flex-wrap: wrap; gap: 2px 6px; }
.eh-drw__add { min-height: 40px; width: 100%; padding: 0 8px; font-size: 11px; margin-top: auto; }

.is-busy { opacity: .6; pointer-events: none; cursor: progress; }

/* Mobile: bottom sheet. */
@media (max-width: 689.98px) {
	.eh-drw__panel {
		top: auto; left: 0; width: auto; max-height: 92%; padding: 20px 20px 28px; gap: 20px;
		box-shadow: 0 -12px 32px rgba(26, 26, 26, .18); transform: translateY(100%);
	}
	.eh-drw__grip { display: block; width: 40px; height: 4px; margin: -8px auto 0 !important; background: var(--wp--preset--color--paper-line); }
}

@media (prefers-reduced-motion: reduce) {
	.eh-drw__scrim, .eh-drw__panel { transition: none; }
}
