/* =============================================================================
   Shared shopping tools — cart, wishlist and search. They sit above every
   template without changing the page layout underneath.
   ============================================================================= */

.ec-store[hidden],
.ec-search[hidden] { display: none; }
html.ec-store-open,
html.ec-store-open body { overflow: hidden; }
.ec-store,
.ec-search { position: fixed; z-index: 300; inset: 0; }
.ec-store__scrim,
.ec-search__scrim { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(20, 12, 10, .48); opacity: 0; transition: opacity .34s ease; }
.ec-store__drawer { position: absolute; top: 0; right: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(100%, 510px); height: 100%; background: var(--ec-page); color: var(--ec-ink); box-shadow: -18px 0 48px rgba(20, 12, 10, .16); transform: translateX(100%); transition: transform .48s cubic-bezier(.22, 1, .36, 1); }
.ec-store.is-open .ec-store__scrim,
.ec-search.is-open .ec-search__scrim { opacity: 1; }
.ec-store.is-open .ec-store__drawer { transform: translateX(0); }
.ec-store__head,
.ec-search__head { display: flex; align-items: center; justify-content: space-between; min-height: 77px; padding: 0 clamp(22px, 3vw, 38px); border-bottom: 1px solid var(--ec-hairline); }
.ec-store__head p,
.ec-search__head p { margin: 0; font: 400 11px / 1 var(--ec-font-text); letter-spacing: var(--ec-track-label); text-transform: uppercase; }
.ec-store__close { display: grid; width: 42px; height: 42px; margin-right: -12px; padding: 0; border: 0; place-items: center; background: transparent; color: inherit; cursor: pointer; font: 300 26px / 1 var(--ec-font-text); transition: opacity .25s ease, transform .25s ease; }
.ec-store__close:hover,
.ec-store__close:focus-visible { opacity: .62; transform: rotate(4deg); }
.ec-store__close:focus-visible,
.ec-store button:focus-visible,
.ec-search button:focus-visible,
.ec-search a:focus-visible { outline: 2px solid var(--ec-plum); outline-offset: -2px; }
.ec-store__content { overflow: auto; padding: 8px clamp(22px, 3vw, 38px) 30px; }
.ec-store__foot { padding: 21px clamp(22px, 3vw, 38px) 26px; border-top: 1px solid var(--ec-hairline); }
.ec-store__empty { display: grid; min-height: 42vh; place-items: center; text-align: center; }
.ec-store__empty p { max-width: 26ch; margin: 0; color: var(--ec-ink-muted); font: 400 17px / 1.5 var(--ec-font-display); }
.ec-store__continue { display: inline-flex; align-items: center; gap: 10px; margin-top: 21px; padding-bottom: 7px; border-bottom: 1px solid currentColor; color: var(--ec-ink); font: 500 10px / 1 var(--ec-font-text); letter-spacing: .15em; text-decoration: none; text-transform: uppercase; transition: gap .3s ease, color .3s ease; }
.ec-store__continue:hover,
.ec-store__continue:focus-visible { gap: 15px; color: var(--ec-plum); }
.ec-store__items { display: grid; margin: 0; padding: 0; list-style: none; }
.ec-store__item { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--ec-hairline); }
.ec-store__item img { width: 104px; height: 132px; object-fit: cover; background: var(--ec-hairline); }
.ec-store__itemcopy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.ec-store__itemcopy h3 { margin: 0; font: 400 20px / 1.02 var(--ec-font-display); letter-spacing: -.025em; }
.ec-store__itemcopy h3 a { color: inherit; text-decoration: none; }
.ec-store__itemcopy p { margin: 7px 0 0; color: var(--ec-ink-muted); font: 400 12px / 1.45 var(--ec-font-text); }
.ec-store__itemcopy .ec-store__price { margin-top: 6px; color: var(--ec-ink); }
.ec-store__itemactions { display: flex; width: 100%; align-items: end; justify-content: space-between; gap: 10px; margin-top: auto; }
.ec-store__quantity { display: inline-flex; align-items: center; border: 1px solid var(--ec-hairline); }
.ec-store__quantity button { display: grid; width: 28px; height: 28px; padding: 0; border: 0; place-items: center; background: transparent; color: inherit; cursor: pointer; font-size: 16px; }
.ec-store__quantity span { min-width: 24px; text-align: center; font: 400 11px / 1 var(--ec-font-text); }
.ec-store__remove { padding: 5px 0; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--ec-ink-muted); cursor: pointer; font: 500 9px / 1 var(--ec-font-text); letter-spacing: .13em; text-transform: uppercase; transition: color .25s ease, border-color .25s ease; }
.ec-store__remove:hover,
.ec-store__remove:focus-visible { color: var(--ec-ink); border-bottom-color: currentColor; }
.ec-store__summary { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; font: 400 12px / 1 var(--ec-font-text); letter-spacing: .12em; text-transform: uppercase; }
.ec-store__summary strong { font-weight: 400; }
.ec-store__checkout { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 18px; background: var(--ec-ink); color: var(--ec-cream); font: 500 10px / 1 var(--ec-font-text); letter-spacing: .16em; text-decoration: none; text-transform: uppercase; transition: color .3s ease, background .3s ease; }
.ec-store__checkout:hover,
.ec-store__checkout:focus-visible { color: var(--ec-cream); background: var(--ec-plum); }

.ec-search { position: fixed; z-index: 300; top: 90px; right: clamp(18px, 4vw, 58px); bottom: auto; left: auto; display: block; width: min(calc(100vw - 36px), 480px); padding: 0; pointer-events: none; }
.ec-search__scrim { display: none; }
.ec-search__dialog { position: relative; width: 100%; max-height: min(50svh, 410px); overflow: auto; border: 1px solid var(--ec-hairline); background: var(--ec-page); box-shadow: 0 14px 30px rgba(20, 12, 10, .13); opacity: 0; pointer-events: auto; transform: translateY(-8px); transition: opacity .22s ease, transform .28s cubic-bezier(.22, 1, .36, 1); }
.ec-search.is-open .ec-search__dialog { opacity: 1; transform: translateY(0); }
.ec-search__head { position: absolute; z-index: 1; top: 0; right: 0; min-height: 54px; padding: 0; border: 0; }
.ec-search__head p { display: none; }
.ec-search__head .ec-store__close { width: 54px; height: 54px; margin: 0; font-size: 22px; }
.ec-search__form { display: flex; align-items: center; min-height: 54px; margin: 0; padding: 0 54px 0 17px; border: 0; }
.ec-search__form input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ec-ink); font: 400 14px / 1 var(--ec-font-text); letter-spacing: .01em; }
.ec-search__form input::placeholder { color: rgba(33, 25, 21, .45); }
.ec-search__form span { display: none; }
.ec-search__results { max-height: min(40svh, 330px); padding: 0 17px 12px; overflow: auto; border-top: 1px solid var(--ec-hairline); }
.ec-search__hint { display: none; }
.ec-search__none { margin: 0; padding: 15px 0 4px; color: var(--ec-ink-muted); font: 400 12px / 1.5 var(--ec-font-text); }
.ec-search__result { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--ec-hairline); color: var(--ec-ink); text-decoration: none; }
.ec-search__result img { width: 44px; height: 54px; object-fit: cover; background: var(--ec-hairline); }
.ec-search__result strong { display: block; font: 400 15px / 1.1 var(--ec-font-display); letter-spacing: -.015em; }
.ec-search__result small { display: block; margin-top: 4px; color: var(--ec-ink-muted); font: 400 9px / 1 var(--ec-font-text); letter-spacing: .11em; text-transform: uppercase; }
.ec-search__result span { color: var(--ec-ink-muted); font: 400 11px / 1 var(--ec-font-text); }
.ec-search__result:hover strong,
.ec-search__result:focus-visible strong { color: var(--ec-plum); }
.ec-action { position: relative; }
.ec-action__badge { position: absolute; top: 2px; right: 1px; display: grid; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 999px; place-items: center; background: var(--ec-plum); color: var(--ec-cream); font: 500 8px / 1 var(--ec-font-text); }
.ec-action__badge[hidden] { display: none; }

@media (max-width: 640px) {
	.ec-store__drawer { width: min(100%, 480px); }
	.ec-store__item { grid-template-columns: 82px minmax(0, 1fr); }
	.ec-store__item img { width: 82px; height: 112px; }
	.ec-search { top: 72px; right: 12px; width: calc(100vw - 24px); }
	.ec-search__dialog { max-height: min(56svh, 390px); }
	.ec-search__result { grid-template-columns: 44px minmax(0, 1fr); }
	.ec-search__result img { width: 44px; height: 54px; }
	.ec-search__result span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.ec-store__scrim,
	.ec-search__scrim,
	.ec-store__drawer,
	.ec-search__dialog,
	.ec-store__close,
	.ec-store__continue,
	.ec-store__checkout { transition-duration: .01ms; }
}
