/* Search/history only: leave account, wishlist, cart and chatbot styling alone. */
body.mg-site .mg-header-control[data-open-search],
body.mg-site .mg-header-control[data-open-recent] { background: transparent; color: var(--mg-espresso); border-radius: 0; box-shadow: none; transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
 body.mg-site .mg-header-control[data-open-search]:hover,
 body.mg-site .mg-header-control[data-open-recent]:hover { color: var(--mg-taupe); }
}
body.mg-site .mg-header-control[data-open-search]:focus-visible,
body.mg-site .mg-header-control[data-open-recent]:focus-visible { outline: 2px solid var(--mg-taupe-dark); outline-offset: 3px; }
body.mg-overlay-open { overflow: hidden; }
body.mg-overlay-open .mg-overlay { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.mg-discovery-drawer { background: var(--mg-ivory); box-shadow: -12px 0 64px rgba(48,37,31,.14); position: fixed; inset: 0 0 0 auto; width: min(100%, 410px); height: 100vh; height: 100dvh; z-index: 1000001; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s var(--mg-ease); overscroll-behavior: contain; color: var(--mg-espresso); }
.mg-discovery-drawer[hidden] { display: none; }
.mg-discovery-drawer.is-open { transform: translateX(0); }
body.mg-overlay-open:has(.mg-discovery-drawer.is-open) .mg-overlay { z-index: 1000000; }
.mg-discovery-heading { align-items: center; border-bottom: 1px solid var(--mg-border); display: flex; justify-content: space-between; flex-shrink: 0; padding: max(20px, env(safe-area-inset-top)) 22px 18px 28px; gap: 12px; }
body.mg-site .mg-discovery-heading h2 { font-family: var(--mg-serif); font-size: 26px; font-weight: 500; letter-spacing: .055em; text-transform: uppercase; margin: 0; }
body.mg-site .mg-discovery-heading .mg-icon-button { background: transparent; color: var(--mg-taupe-dark); border-radius: 50%; min-width: 44px; min-height: 44px; }
body.mg-site .mg-discovery-heading .mg-icon-button:hover,
body.mg-site .mg-discovery-heading .mg-icon-button:focus { background: var(--mg-warm); color: var(--mg-taupe-dark); }
body.mg-site .mg-discovery-drawer :focus-visible { outline: 2px solid var(--mg-taupe-dark); outline-offset: 3px; }
.mg-discovery-content { overflow-y: auto; min-height: 0; padding: 26px 28px max(28px, env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.mg-discovery-form { display: flex; align-items: center; gap: 10px; margin: 0 0 28px; border: 1px solid var(--mg-border); background: var(--mg-surface); padding: 2px 14px; border-radius: 2px; }
.mg-discovery-form > .mg-icon { width: 18px; height: 18px; flex: 0 0 auto; color: var(--mg-taupe-dark); }
body.mg-site .mg-discovery-form input[type="search"] { width: 100%; min-width: 0; min-height: 46px; border: 0; border-radius: 0; background: transparent; padding: 8px 0; color: var(--mg-espresso); font-family: var(--mg-sans); font-size: 16px; box-shadow: none; }
.mg-discovery-form:focus-within { border-color: var(--mg-taupe-dark); outline: 1px solid var(--mg-taupe-dark); }
body.mg-site .mg-discovery-form input[type="search"]:focus { outline: none; }
.mg-discovery-empty { color: var(--mg-muted); font-size: 14px; line-height: 1.7; margin: 32px 0; text-align: center; }
.mg-discovery-note { color: var(--mg-muted); font-size: 13px; line-height: 1.7; margin: 0 0 22px; }
body.mg-site .mg-discovery-card { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--mg-border-light); text-decoration: none; color: var(--mg-espresso); }
.mg-discovery-card img { display: block; width: 90px; height: 120px; object-fit: cover; border-radius: 2px; background: var(--mg-warm); }
.mg-discovery-card-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mg-discovery-name { font-family: var(--mg-serif); font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.mg-discovery-price { font-size: 13px; font-weight: 500; }
.mg-discovery-action { color: var(--mg-taupe-dark); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; }
.mg-discovery-card:hover .mg-discovery-action { text-decoration: underline; text-underline-offset: 4px; }
/* Existing mobile header hid history. Keep its original slots and put history
 * before the bag, with no extra row or overlap across the centred brand. */
@media (max-width: 820px) {
 .mg-header-left { width: calc(100% - 124px); justify-content: space-between; gap: 0; pointer-events: none; }
 .mg-header-left [data-open-search], .mg-header-left [data-open-recent] { display: inline-flex; pointer-events: auto; }
}
@media (max-width: 430px) { .mg-discovery-drawer { width: min(100%, 390px); } .mg-discovery-heading { padding-inline: 20px 14px; } .mg-discovery-content { padding-inline: 20px; } }
@media (prefers-reduced-motion: reduce) { .mg-discovery-drawer, body.mg-site .mg-header-control[data-open-search], body.mg-site .mg-header-control[data-open-recent] { transition: none; } }
