/*
 * Shop mega menu (views/components/store_nav.php · .shm) — loaded after dova.css by the store nav.
 * Content comes from nav_menu_items (ShopMenuManager board). Dark mode: html[data-theme=dark] / #theme-dark rules
 * below use the --dk-* tokens; store logos sit on a light pill in both themes. Behaviour: assets/js/shop_menu.js.
 */

/* ---- panel: centred under the header row, never wider than the window ---------------------------------- */
@media (min-width: 1181px) {
  .dv-hd .dv-in { position: relative }
  .dv-hd .shm-dd { position: static }
  .dv-hd .dv-m.shm {
    left: 0; right: 0; margin: 0 auto; top: calc(100% - 4px);
    width: min(1060px, calc(100% - 32px)); max-height: calc(100vh - 90px); overflow: auto; overscroll-behavior: contain;
    border-radius: 20px; border: 1px solid #E4E8F0;
    transform: translateY(10px) scale(.99); transform-origin: 50% 0;
    box-shadow: 0 2px 4px rgba(10, 23, 55, .05), 0 32px 70px -24px rgba(10, 23, 55, .42);
  }
  .dv-hd .dv-m.shm:before { top: -14px; height: 14px }
}
.dv-hd .shm-dd.open > .dv-m.shm, .dv-hd .shm-dd:hover > .dv-m.shm, .dv-hd .shm-dd:focus-within > .dv-m.shm { transform: none }
/* Esc closes the menu even while the trigger keeps focus / the mouse stays over it */
.dv-hd .shm-dd.shm-x > .dv-m.shm { opacity: 0 !important; visibility: hidden !important; pointer-events: none }
.dv-hd .shm-dd.shm-x > .dv-l svg { transform: none !important }

/* ---- top row ------------------------------------------------------------------------------------------- */
.dv-hd .shm .shm-top { padding: 14px 20px; gap: 12px }
.dv-hd .shm .shm-q { height: 44px; border-radius: 13px }
.dv-hd .shm .shm-pill { height: 34px }

/* ---- grid ---------------------------------------------------------------------------------------------- */
.dv-hd .shm .shm-g { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.18fr) minmax(250px, .9fr); gap: 22px; padding: 18px 20px 20px; align-items: stretch }
.dv-hd .shm .shm-col { padding: 0; margin: 0; display: flex; flex-direction: column; min-width: 0 }
.dv-hd .shm .shm-h { height: 22px; margin: 0 2px 10px; font: 800 10.5px Mulish, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #5B6682 }
.dv-hd .shm .shm-h a { text-transform: none; letter-spacing: 0; border-radius: 6px; padding: 2px 4px; margin-right: -4px }
.dv-hd .shm .shm-h a:hover { background: #EEF3FF }
.dv-hd .shm .shm-h2 { margin-top: 16px }

/* ---- categories: soft tinted icon tiles, fixed-height rows, 2-line names --------------------------------- */
.dv-hd .shm .shm-cg { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 72px; align-content: start; gap: 6px }
.dv-hd .shm .shm-c { height: 72px; min-height: 0; padding: 8px 10px; gap: 11px; border-radius: 14px; border: 1px solid transparent; box-sizing: border-box; overflow: hidden }
.dv-hd .shm .shm-ci {
  width: 42px; height: 42px; border-radius: 13px; flex: none; color: var(--c);
  background: linear-gradient(145deg, color-mix(in srgb, var(--c) 16%, #fff), color-mix(in srgb, var(--c) 7%, #fff));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 16%, transparent), 0 6px 14px -10px color-mix(in srgb, var(--c) 80%, transparent);
  transition: background .2s, color .2s, box-shadow .2s, transform .25s cubic-bezier(.34, 1.56, .64, 1);
}
.dv-hd .shm .shm-ci img { width: 22px; height: 22px; object-fit: contain; display: block }
.dv-hd .shm .shm-ct { gap: 2px; min-width: 0; flex: 1 }
.dv-hd .shm .shm-ct b { font: 700 13.5px/1.22 Mulish, sans-serif; color: #0A1737; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: normal; word-break: normal; hyphens: manual }
.dv-hd .shm .shm-ct small { font: 600 11.5px/1.3 Mulish, sans-serif; color: #5B6682; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.dv-hd .shm .shm-nw { white-space: nowrap }
.dv-hd .shm .shm-call { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; border-radius: 12px; border: 1px dashed #CBD5E6; color: #2457D6; font: 700 12.5px Mulish, sans-serif; text-decoration: none; transition: background .15s, border-color .15s }
.dv-hd .shm .shm-call:hover, .dv-hd .shm .shm-call:focus-visible { background: #F3F7FF; border-color: #2F6FF2; border-style: solid }
html[data-theme=dark] .dv-hd .shm .shm-call { border-color: var(--dk-border-2); color: var(--dk-accent) }
html[data-theme=dark] .dv-hd .shm .shm-call:hover { background: var(--dk-raised); border-color: var(--dk-accent) }
.dv-hd .shm .shm-ca { display: none }
.dv-hd .shm .shm-c:hover, .dv-hd .shm .shm-c:focus-visible { background: color-mix(in srgb, var(--c) 6%, #fff) !important; border-color: color-mix(in srgb, var(--c) 24%, #fff) !important }
.dv-hd .shm .shm-c:hover .shm-ci, .dv-hd .shm .shm-c:focus-visible .shm-ci { background: var(--c); color: #fff; transform: translateY(-1px) !important; box-shadow: 0 8px 16px -8px color-mix(in srgb, var(--c) 90%, transparent) }
.dv-hd .shm .shm-c:hover .shm-ci img { filter: brightness(0) invert(1) }

/* ---- popular stores: real logos on clean white tiles ------------------------------------------------------ */
.dv-hd .shm .shm-sg { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px }
.dv-hd .shm .shm-s { height: 52px; padding: 0 8px; border-radius: 13px; border: 1px solid #E6EAF2; background: #fff; box-sizing: border-box; box-shadow: 0 1px 2px rgba(10, 23, 55, .04) }
.dv-hd .shm .shm-s.dk-keep .shm-sp { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: 30px; padding: 0; border-radius: 9px; background: #fff; font: 800 11.5px Mulish, sans-serif; color: #0A1737; white-space: nowrap; min-width: 0 }
.dv-hd .shm .shm-s.dk-keep .shm-logo { display: block; width: 100%; max-width: 104px; height: 26px; object-fit: contain }
.dv-hd .shm .shm-s.dk-keep .shm-mark { width: 20px; height: 20px; object-fit: contain; border-radius: 5px; flex: none }
.dv-hd .shm .shm-s.dk-keep .shm-sp b { overflow: hidden; text-overflow: ellipsis; min-width: 0 }
.dv-hd .shm .shm-s.dk-keep .shm-sp i { width: 20px; height: 20px; border-radius: 6px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--b); color: #fff; font: 800 11px Figtree, sans-serif; font-style: normal }
.dv-hd .shm-dd .shm .shm-s:hover, .dv-hd .shm-dd .shm .shm-s:focus-visible { transform: translateY(-2px) !important; border-color: #CBD5E6 !important; background: #fff !important; box-shadow: 0 12px 22px -14px rgba(10, 23, 55, .5) !important }

/* ---- trending ------------------------------------------------------------------------------------------ */
.dv-hd .shm .shm-tl { gap: 2px }
.dv-hd .shm .shm-t { min-height: 50px; padding: 6px 8px; gap: 11px; border-radius: 12px; box-sizing: border-box }
.dv-hd .shm .shm-ti { width: 38px; height: 38px; border-radius: 11px; overflow: hidden; color: var(--c); background: linear-gradient(145deg, color-mix(in srgb, var(--c) 14%, #fff), color-mix(in srgb, var(--c) 6%, #fff)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 14%, transparent) }
.dv-hd .shm .shm-ti img { width: 100%; height: 100%; object-fit: cover; display: block }
.dv-hd .shm .shm-te { font-size: 21px; line-height: 1 }
.dv-hd .shm .shm-tt b { font: 700 12.5px/1.3 Mulish, sans-serif; color: #0A1737 }
.dv-hd .shm .shm-tt small { font: 600 11px/1.35 Mulish, sans-serif; color: #5B6682 }
.dv-hd .shm .shm-t em { flex: none }

/* ---- Buy-for-me card: blurred rolling background + sharp image ------------------------------------------- */
.dv-hd .shm .shm-promo.dk-keep { padding: 0; gap: 0; border-radius: 18px; min-height: 380px; isolation: isolate; background: linear-gradient(160deg, #2F6FF2, #1B3FB8 60%, #0A1737); background-size: 140% 140% }
.dv-hd .shm .shm-promo.dk-keep.has-car { animation: none; background: #0A1737 }
.shm-promo.dk-keep .shm-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden }
.shm-promo.dk-keep .shm-bg i { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(24px) saturate(1.35) brightness(.72); transform: scale(1.08); opacity: 0; transition: opacity .9s ease }
.shm-promo.dk-keep .shm-bg i.on { opacity: 1 }
.shm-promo.dk-keep .shm-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 12, 32, .5) 0%, rgba(6, 12, 32, .62) 45%, rgba(6, 12, 32, .82) 100%) }
.dv-hd .shm-promo.dk-keep.has-car .shm-orb { opacity: .45; z-index: -1 }
.shm-promo.dk-keep .shm-pc { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px 18px 16px; flex: 1; min-height: 0 }
.dv-hd .shm-promo.dk-keep .shm-pt { color: #DCE6FF; text-shadow: 0 1px 2px rgba(0, 0, 0, .3) }
.dv-hd .shm-promo.dk-keep .shm-ptl { position: relative; font: 700 21px/1.15 Figtree, sans-serif; letter-spacing: -.02em; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35) }
.dv-hd .shm-promo.dk-keep .shm-pd { color: #EEF2FF; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden }
.shm-promo.dk-keep .shm-pics { position: relative; margin-top: 4px; flex: 1; min-height: 132px; max-height: 200px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .08); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .22) }
.shm-promo.dk-keep .shm-pic { position: absolute; inset: 0; display: block; opacity: 0; transition: opacity .7s ease; text-decoration: none; color: #fff }
.shm-promo.dk-keep .shm-pic.on { opacity: 1; z-index: 1 }
.shm-promo.dk-keep .shm-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.06); transition: transform 5s ease-out }
.shm-promo.dk-keep .shm-pic.on img { transform: scale(1) }
.shm-promo.dk-keep .shm-pic:focus-visible { outline: 3px solid #fff; outline-offset: -3px }
.shm-promo.dk-keep .shm-cap { position: absolute; left: 8px; bottom: 8px; right: 8px; display: flex; flex-direction: column; gap: 1px; width: max-content; max-width: calc(100% - 16px); box-sizing: border-box; padding: 6px 10px; border-radius: 10px; background: rgba(8, 14, 34, .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff }
.shm-promo.dk-keep .shm-cap b { font: 700 12px/1.25 Mulish, sans-serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.shm-promo.dk-keep .shm-cap small { font: 600 10.5px/1.3 Mulish, sans-serif; color: #E3E9F8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.shm-promo.dk-keep .shm-pf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px }
.shm-promo.dk-keep .shm-pl { font: 700 12.5px Mulish, sans-serif; color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .5); white-space: nowrap; padding: 6px 2px }
.shm-promo.dk-keep .shm-pl:hover { text-decoration-color: #fff }
.dv-hd .shm-promo.dk-keep .shm-pb { white-space: nowrap; flex: none; background: #fff; color: #0A1737; margin-top: 0; position: static; height: 36px; padding: 0 15px; border-radius: 11px; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6) }
.dv-hd .shm-promo.dk-keep .shm-pb:focus-visible { outline: 3px solid #8FB2F7; outline-offset: 2px }
.dv-hd .shm-promo.dk-keep .shm-pb:hover { gap: 10px }
.shm-promo.dk-keep .shm-dots { position: absolute; z-index: 2; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 0; padding: 0 4px; height: 26px; border-radius: 999px; background: rgba(8, 14, 34, .55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px) }
.shm-promo.dk-keep .shm-dots button { width: 14px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px }
.shm-promo.dk-keep .shm-dots button:before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .5); transition: width .3s, background .3s }
.shm-promo.dk-keep .shm-dots button.on:before { width: 16px; background: #fff }
.shm-promo.dk-keep .shm-dots button.on { width: 24px }
.shm-promo.dk-keep .shm-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 1px }
.shm-promo.dk-keep .shm-dots .shm-pp { width: 20px; color: #fff; margin-left: 2px; opacity: .9; border-left: 1px solid rgba(255, 255, 255, .25); border-radius: 0 }
.shm-promo.dk-keep .shm-dots .shm-pp:before { display: none }
.shm-promo.dk-keep .shm-pp .r, .shm-promo.dk-keep.paused .shm-pp .p { display: none }
.shm-promo.dk-keep.paused .shm-pp .r { display: inline }

/* ---- footer -------------------------------------------------------------------------------------------- */
.dv-hd .shm .shm-ft { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)) }
.dv-hd .shm .shm-ft a { padding: 13px 20px; min-height: 48px; box-sizing: border-box }
.dv-hd .shm .shm-ft a > span:last-child { min-width: 0; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden }
.dv-hd .shm .shm-fi { width: 28px; height: 28px; border-radius: 9px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #EAF1FF; color: #2F6FF2 }

/* entrance stagger also when the menu is opened by tap / keyboard (.open) */
.shm-dd.open .shm .shm-c, .shm-dd.open .shm .shm-s, .shm-dd.open .shm .shm-t { opacity: 1; transform: none; transition: opacity .3s ease calc(var(--i) * 30ms + 60ms), transform .3s cubic-bezier(.22, 1, .36, 1) calc(var(--i) * 30ms + 60ms), background .18s, border-color .18s, box-shadow .18s }

/* ---- ≤1180 px: the header folds into the menu button and the Shop panel opens inside it (tap / click) ------ */
@media (max-width: 1180px) {
  .dv-hd .dv-nav .dv-m.shm { padding: 0 0 10px; border-radius: 0; overflow: visible; max-height: none }
  .dv-hd .shm .shm-top { padding: 8px 0 12px; background: transparent; border: 0 }
  .dv-hd .shm .shm-g { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; padding: 4px 0 14px }
  .dv-hd .shm .shm-cg { grid-auto-rows: 62px }
  .dv-hd .shm .shm-call { margin-top: 8px }
  .dv-hd .shm .shm-c { height: 62px; padding: 7px 8px; gap: 10px; background: #F7F9FC }
  .dv-hd .shm .shm-ci { width: 38px; height: 38px; border-radius: 12px }
  .dv-hd .shm .shm-promo.dk-keep { display: flex; grid-column: 1 / -1; min-height: 0 }
  .dv-hd .shm-promo.dk-keep .shm-pc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: 18px; row-gap: 8px; align-content: start }
  .dv-hd .shm-promo.dk-keep .shm-pc > * { grid-column: 1 }
  .dv-hd .shm-promo.dk-keep .shm-pics { grid-column: 2; grid-row: 1 / span 6; margin: 0; height: 190px; max-height: none }
  .dv-hd .shm .shm-ft { border-radius: 12px; overflow: hidden; border: 1px solid #EEF1F7 }
}
/* ---- phones ------------------------------------------------------------------------------------------ */
@media (max-width: 700px) {
  .dv-hd .shm .shm-pill, .dv-hd .shm .shm-q kbd { display: none }
  .dv-hd .shm .shm-g { grid-template-columns: 1fr; gap: 16px }
  .dv-hd .shm .shm-cg { grid-auto-rows: 58px; gap: 6px }
  .dv-hd .shm .shm-c { height: 58px; gap: 9px }
  .dv-hd .shm .shm-ci { width: 36px; height: 36px; border-radius: 11px }
  .dv-hd .shm .shm-ct b { font-size: 13px }
  .dv-hd .shm .shm-ct small { display: none }
  .dv-hd .shm .shm-s { height: 48px }
  .dv-hd .shm-promo.dk-keep .shm-pc { display: flex }
  .dv-hd .shm-promo.dk-keep .shm-pics { height: 160px; flex: none }
  .dv-hd .shm-promo.dk-keep .shm-ptl { font-size: 19px }
  .dv-hd .shm .shm-ft { grid-template-columns: 1fr }
  .dv-hd .shm .shm-ft a + a { border-left: 0; border-top: 1px solid #EEF1F7 }
}

/* ---- reduced motion ------------------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .shm-promo.dk-keep .shm-bg i, .shm-promo.dk-keep .shm-pic, .shm-promo.dk-keep .shm-pic img, .dv-hd .shm .shm-ci, .dv-hd .shm .shm-s { transition: none !important }
  .shm-promo.dk-keep .shm-pic img { transform: none !important }
}

/* ---- dark --------------------------------------------------------------------------------------------- */
html[data-theme=dark] .dv-hd .dv-m.shm { border-color: var(--dk-border) }
html[data-theme=dark] .dv-hd .shm .shm-h { color: var(--dk-muted) }
html[data-theme=dark] .dv-hd .shm .shm-h a:hover { background: var(--dk-raised) }
html[data-theme=dark] .dv-hd .shm .shm-ct b, html[data-theme=dark] .dv-hd .shm .shm-tt b { color: var(--dk-text) }
html[data-theme=dark] .dv-hd .shm .shm-ct small, html[data-theme=dark] .dv-hd .shm .shm-tt small { color: var(--dk-muted) }
html[data-theme=dark] .dv-hd .shm .shm-ci, html[data-theme=dark] .dv-hd .shm .shm-ti { background: color-mix(in srgb, var(--c) 22%, var(--dk-surface)) !important; color: color-mix(in srgb, var(--c) 45%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent) }
html[data-theme=dark] .dv-hd .shm .shm-c:hover, html[data-theme=dark] .dv-hd .shm .shm-c:focus-visible { background: color-mix(in srgb, var(--c) 12%, var(--dk-surface)) !important; border-color: color-mix(in srgb, var(--c) 35%, var(--dk-border)) !important }
html[data-theme=dark] .dv-hd .shm .shm-c:hover .shm-ci { background: var(--c) !important; color: #fff }
html[data-theme=dark] .dv-hd .shm .shm-s { background: var(--dk-raised); border-color: var(--dk-border); box-shadow: none }
html[data-theme=dark] .dv-hd .shm-dd .shm .shm-s:hover, html[data-theme=dark] .dv-hd .shm-dd .shm .shm-s:focus-visible { background: var(--dk-hover) !important; border-color: var(--dk-border-2) !important; box-shadow: 0 12px 22px -14px rgba(0, 0, 0, .8) !important }
html[data-theme=dark] .dv-hd .shm .shm-s.dk-keep .shm-sp { padding: 0 8px; box-sizing: border-box }
html[data-theme=dark] .dv-hd .shm .shm-t:hover, html[data-theme=dark] .dv-hd .shm .shm-ft a:hover { background: var(--dk-raised) !important }
html[data-theme=dark] .dv-hd .shm .shm-fi { background: var(--dk-blue-bg); color: var(--dk-blue-fg) }
html[data-theme=dark] .dv-hd .shm .shm-ft a + a { border-color: var(--dk-border) }
@media (max-width: 1180px) { html[data-theme=dark] .dv-hd .shm .shm-c { background: var(--dk-surface) } html[data-theme=dark] .dv-hd .shm .shm-ft { border-color: var(--dk-border) } }
/* the dark theme recolours every link and <b> through #theme-dark rules; text on the light logo pill and on the
   photo card keeps its colours */
#theme-dark:checked ~ div .shm-s.dk-keep .shm-sp b { color: #0A1737 !important }
#theme-dark:checked ~ div .shm-promo.dk-keep .shm-pb { color: #0A1737 }
#theme-dark:checked ~ div .shm-promo.dk-keep .shm-ptl, #theme-dark:checked ~ div .shm-promo.dk-keep .shm-cap b { color: #fff !important }
#theme-dark:checked ~ div .shm-promo.dk-keep .shm-pl, #theme-dark:checked ~ div .shm-promo.dk-keep .shm-pic { color: #fff }
#theme-dark:checked ~ div .dv-hd .shm .shm-call { color: var(--dk-accent) }
