/* Header country/currency switcher and the "Where should we deliver?" popup (store/markets_web.py). Mobile first
   (390 px), no inline styles (CSP). */
.mkt-switch { position: relative; }
.mkt-switch-btn { display: inline-flex; align-items: center; gap: 3px; height: 44px; padding: 0 6px; list-style: none; cursor: pointer; color: var(--text); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.mkt-switch-btn::-webkit-details-marker { display: none; }
.mkt-switch-btn .nav-caret { width: 10px; height: 10px; }
.mkt-switch[open] .nav-caret { transform: rotate(180deg); }
.mkt-switch-list { position: absolute; right: 0; top: 100%; z-index: 60; min-width: 200px; margin: 0; padding: 8px 0; list-style: none; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mkt-switch-list a { display: flex; align-items: baseline; gap: 8px; min-height: 44px; align-items: center; padding: 0 18px; color: var(--text); text-decoration: none; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.mkt-switch-list a span { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); }
.mkt-switch-list a:hover, .mkt-switch-list a:focus-visible { background: var(--panel); }
.mkt-switch-list a[aria-current] { box-shadow: inset 2px 0 0 var(--wine); }
/* In the menu drawer the list opens in place, under the button. */
.mkt-switch-menu .mkt-switch-btn { height: 40px; padding: 0; color: var(--muted); }
.mkt-switch-menu .mkt-switch-list { position: static; box-shadow: none; border: 0; padding: 0; min-width: 0; background: transparent; }
.mkt-switch-menu .mkt-switch-list a { padding: 0; color: var(--text); }
/* Phones and tablets (header grid "menu brand tools"): the right cell is full with search and bag, so the switcher sits
   in the left cell next to the menu button and its list opens to the right. */
@media (max-width: 999px) {
  .bar { position: relative; }
  .mkt-switch-head { position: absolute; left: 52px; top: 50%; transform: translateY(-50%); }
  .mkt-switch-head .mkt-switch-list { left: 0; right: auto; }
}

/* Popup: a centred sheet over a dimmed page. Links work without JS; markets.js adds focus trap and Escape. */
.mkt-pop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(23, 19, 26, 0.55); }
.mkt-pop[hidden] { display: none; }
html.mkt-pop-open, html:has(.mkt-pop:not([hidden])) { overflow: hidden; }   /* scroll lock (the :has() form without JS) */
.mkt-pop-x[hidden] { display: none; }
.mkt-pop-box { position: relative; width: 100%; max-width: 380px; padding: 28px 20px 20px; background: var(--bg); color: var(--text); box-shadow: var(--shadow); }
.mkt-pop-title { margin: 0 0 6px; font-family: var(--head); font-weight: 400; font-size: 1.5rem; line-height: 1.2; }
.mkt-pop-text { margin: 0 0 18px; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.mkt-pop-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mkt-pop-go { display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 16px; border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; }
.mkt-pop-go:hover, .mkt-pop-go:focus-visible { border-color: var(--wine); background: var(--wine-soft); }
.mkt-pop-cur { color: var(--muted); font-weight: 400; font-size: 0.86rem; }
.mkt-pop-x { position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; background: none; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; }
