/* The cart drawer (inc/cart-drawer.php + woocommerce/cart/mini-cart.php) and the instant search results. */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); }
.drawer__backdrop { position: absolute; inset: 0; background: rgb(0 0 0 / 0.42); opacity: 0; transition: opacity var(--dur-3) var(--ease-out); }
.drawer__panel {
	position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
	display: flex; flex-direction: column;
	background: var(--paper); color: var(--ink); box-shadow: var(--shadow-pop);
	transform: translateX(104%); transition: transform var(--dur-3) var(--ease-in);
}
.drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; transition: transform var(--dur-4) var(--ease-out-expo); }
.has-drawer, .has-drawer body { overflow: hidden; }
/* Complianz's consent banner (z-index 99999) would cover the drawer's total and buttons: it waits beneath until the
   drawer closes. */
html.has-drawer .cmplz-cookiebanner { z-index: calc(var(--z-drawer) - 1) !important; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--hairline); min-height: 72px; }
.drawer__head h2 { font-size: var(--text-xl); }
.drawer__close { width: 44px; height: 44px; margin-right: -6px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); cursor: pointer; transition: background-color var(--dur-1) var(--ease-out), transform var(--dur-2) var(--ease-spring); }
.drawer__close:hover { background: var(--mist-2); }
.drawer__close:active { transform: scale(0.92); }
.drawer__close .icon { width: 20px; height: 20px; }
.twomag-drawer-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.drawer__lines { list-style: none; margin: 0; padding: 0 var(--s-5); overflow-y: auto; overscroll-behavior: contain; flex: 1; }
.drawer__line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 44px; gap: var(--s-3); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--hairline); }
.drawer__line:last-child { border-bottom: 0; }
.drawer__thumb { width: 72px; height: 72px; display: grid; place-items: center; background: var(--mist); border-radius: var(--r-sm); overflow: hidden; }
.drawer__thumb img { max-width: 82%; max-height: 82%; object-fit: contain; }
.drawer__info { min-width: 0; display: grid; gap: 2px; }
.drawer__info a { font: 500 0.9375rem/1.3 var(--font-display); color: var(--ink); text-decoration: none; }
.drawer__info a:hover { color: var(--action); }
.drawer__info small { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
/* The maker line keeps to one line, as on the plinth cards: the "·" never ends a line. */
.drawer__maker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The same maker line under the short name on cart rows, checkout and order lines (inc/checkout.php). width 0 + min-width
   100%: it fills the name cell without widening the table, so a long Kablo SKU ends in an ellipsis instead of overflowing. */
.product-maker { display: block; width: 0; min-width: 100%; margin-top: 2px; color: var(--muted); font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer__sum { margin: 0; font: 600 0.9375rem/1 var(--font-display); white-space: nowrap; }
.drawer__remove { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); transition: background-color var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out); }
.drawer__remove:hover { background: var(--mist); color: var(--danger); }
.drawer__remove .icon { width: 18px; height: 18px; }
.drawer__foot { padding: var(--s-5) var(--s-5) calc(var(--s-5) + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline); display: grid; gap: var(--s-3); background: var(--paper); }
.drawer__total { margin: 0; display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.drawer__total strong { font: 600 var(--text-xl)/1 var(--font-display); }
.drawer__note { margin: 0 0 var(--s-2); color: var(--muted); font-size: var(--text-sm); font-weight: 600; }
.drawer__cart-link { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; font-size: var(--text-sm); }
.drawer__empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: var(--s-4); padding: var(--s-7); text-align: center; color: var(--ink-2); }
.drawer__empty p { margin: 0; font-size: var(--text-md); }
.drawer__empty .icon { width: 48px; height: 48px; color: var(--hairline-strong); }
.drawer .blockUI.blockOverlay { background: rgb(255 255 255 / 0.6) !important; }

/* Instant search results under the search field. */
.search-drop {
	position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: var(--z-search);
	min-width: min(440px, calc(100vw - 2 * var(--gutter)));
	padding: 6px; max-height: min(70vh, 560px); overflow-y: auto; overscroll-behavior: contain;
	background: var(--paper); color: var(--ink);
	border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
}
@media (min-width: 1360px) { .lintel__search .search-drop { left: auto; right: 0; width: 440px; } }
@media (max-width: 1359px) { .lintel__search .search-drop { position: relative; top: auto; margin-top: var(--s-2); min-width: 0; box-shadow: none; } }
.search-drop__item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: var(--s-3); align-items: center; min-height: 64px; padding: 6px 10px 6px 6px; border-radius: var(--r-sm); text-decoration: none; color: var(--ink); transition: background-color var(--dur-1) var(--ease-out); }
.search-drop__item img { width: 52px; height: 52px; object-fit: contain; background: var(--mist); border-radius: var(--r-xs); }
.search-drop__item strong { font: 500 0.9375rem/1.3 var(--font-display); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.search-drop__item small { color: var(--muted); font-size: 0.8125rem; font-weight: 600; }
.search-drop__text { min-width: 0; display: grid; gap: 2px; }
/* The maker line under the short name keeps to one line, as in the drawer. */
.search-drop__maker { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-drop__price { font: 600 0.9375rem/1 var(--font-display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.search-drop__item:hover, .search-drop__item.is-active { background: var(--mist); }
.search-drop__empty { margin: 0; padding: var(--s-4); color: var(--ink-2); }
.search-drop__all { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; margin-top: 4px; border-top: 1px solid var(--hairline); color: var(--action); font-weight: 700; font-size: var(--text-sm); text-decoration: none; }
.search-drop__all:hover { color: var(--action-hover); }
