/* Моделюга — light glass theme from prototype (Shop2) */
:root {
  color-scheme: light;
  --ink: #252a31;
  --muted: #465d76;
  --blue: #19569a;
  --mg-selection-bg: rgb(255 116 0 / 50%);
  --line: #d5d9de;
  --glass: #ffffffad;
  --wash: #d5e2ef;
  --mg-wrap: min(1240px, calc(100% - 64px));
}

html, body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #ffffff;
  min-height: 100%;
}

body #container { background: transparent; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: #133f7d; }
button, input, select { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #1d65be;
  outline-offset: 3px;
}

/* Hide cluttered OC top bar — account still in footer */
#top { display: none !important; }

/* Sticky header */
body > #container > header,
#container > header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #30343b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 8px 28px rgba(12, 28, 48, 0.18);
  padding: 0 !important;
  margin: 0;
}
header .mg-head,
.mg-head {
  width: var(--mg-wrap);
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
}
.mg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
  font-size: 25px;
  letter-spacing: -0.065em;
  white-space: nowrap;
  color: var(--ink) !important;
  text-decoration: none !important;
}
.mg-brand .mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  letter-spacing: 0;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}
.mg-brand .mark .mg-brand-logo,
.mg-brand .mark video {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  background: transparent;
  pointer-events: none;
}
.mg-brand small {
  font-size: 0.64em;
  color: var(--blue);
  letter-spacing: -0.02em;
}
.mg-btn {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff9;
  padding: 11px 15px;
  min-height: 44px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.mg-btn:hover { background: #e2eeff; color: var(--ink) !important; }
.mg-btn.primary,
.mg-btn.primary:hover {
  background: #19569a;
  color: #fff !important;
  border-color: #19569a;
}
.mg-btn.primary:hover { background: #133f7d; }

.mg-head .mg-search-slot {
  flex: 1;
  min-width: 0;
}
.mg-head .mg-search {
  margin: 0 !important;
}
.mg-head .mg-search.input-group {
  display: flex;
  width: 100%;
}
.mg-head .mg-search .form-control,
.mg-head .mg-search input[type="text"] {
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px 0 0 12px;
  background: #ffffffb8;
  color: var(--ink);
  box-shadow: none;
  font-size: 15px;
}
.mg-head .mg-search .btn {
  height: 44px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #fff9;
  color: var(--ink);
  box-shadow: none;
}
#cart.mg-cart-wrap {
  margin: 0 !important;
  width: auto !important;
  flex: 0 0 auto;
  max-width: none;
}
#cart.mg-cart-wrap .dropdown { display: block; }
#cart.mg-cart-wrap > .dropdown > button,
#cart.mg-cart-wrap .btn {
  border: 1px solid var(--line) !important;
  border-radius: 13px !important;
  background: #fff9 !important;
  color: var(--ink) !important;
  min-height: 44px;
  padding: 11px 15px;
  font-weight: 650;
  box-shadow: none !important;
}
#cart .dropdown-menu {
  border-radius: 16px;
  border: 1px solid #fff;
  background: #f2f7fd;
  box-shadow: 0 20px 90px #182c5940;
}

/* Main shell */
main { padding: 0 !important; }
.mg-wrap,
#common-home.container,
#product-category.container,
#product-search.container,
#product-product.container,
#checkout-cart.container,
#checkout-checkout.container {
  width: var(--mg-wrap) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Hero */
.mg-hero {
  position: relative;
  isolation: isolate;
  min-height: 400px;
  display: flex;
  align-items: center;
  border: 1px solid #fff;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(110deg, #eef8ff, #e0effd 68%, #cce1f5);
  margin: 26px 0 0;
}
.mg-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 51%;
  z-index: -2;
}
.mg-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #edf7ffff 0%, #edf7fff0 26%, #edf7ff38 55%, transparent 75%);
}
.mg-hero-copy {
  max-width: 580px;
  padding: 42px 5.4%;
}
.mg-eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.105em;
  text-transform: uppercase;
  color: #1b528a;
}
.mg-hero h1 {
  font-size: clamp(45px, 6.1vw, 85px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 16px 0;
  color: var(--ink);
  font-weight: 500;
}
.mg-hero p {
  font-size: 18px;
  line-height: 1.5;
  max-width: 330px;
  margin: 0 0 23px;
  color: #2b4764;
}

/* Sections + rails */
.mg-section { margin-top: 35px; }
.mg-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.mg-section-head h2 {
  font-size: clamp(25px, 3.1vw, 37px);
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1.08;
  color: var(--ink);
  font-weight: 800;
}
.mg-controls {
  display: flex;
  gap: 7px;
  flex-shrink: 0;
}
.mg-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff9;
  font-size: 21px;
  line-height: 1;
  color: var(--ink);
}
.mg-controls button:hover { background: #e2eeff; }

.mg-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 42px) / 4);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1px 1px 12px;
  scrollbar-color: #acbfd7 transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.mg-rail > * { scroll-snap-align: start; min-width: 0; }

.mg-group {
  min-height: 186px;
  border-radius: 20px;
  text-align: left;
  padding: 8px 12px 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  gap: 8px;
  background:
    radial-gradient(120% 90% at 50% 28%, #ffffff 0%, transparent 58%),
    linear-gradient(165deg, #ffffff 0%, var(--wash, #e3efff) 52%, #ffffffd9 100%);
  border: 1px solid #ffffff;
  box-shadow: 0 14px 34px #24496d0f;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 750;
  color: var(--ink) !important;
  text-decoration: none !important;
  overflow: hidden;
  position: relative;
}
.mg-group:hover {
  box-shadow: 0 16px 36px #24496d16, inset 0 0 0 1px #8fb4dd;
  transform: translateY(-1px);
}
.mg-group.is-active {
  box-shadow: 0 16px 36px #24496d16, inset 0 0 0 2px #3d7ec0;
}
.mg-group-media {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  min-height: 111px;
  width: 100%;
  pointer-events: none;
}
.mg-group-art {
  width: min(100%, 158px);
  height: 111px;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 8px 14px #1d3f661a);
}
.mg-group-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.mg-group-icon { display: none !important; }
.mg-group-shade { display: none !important; }
.mg-group strong {
  display: block;
  font-size: 16px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-weight: 800;
}
.mg-group small {
  display: block;
  color: #5d738c;
  font-size: 12.5px;
  font-weight: 550;
  line-height: 1.35;
  margin-top: 0;
}

/* Category chip rail (category pages / menu) */
.mg-rail-wrap {
  width: var(--mg-wrap);
  margin: 18px auto 0;
  padding: 0;
  background: transparent !important;
}
#menu.navbar {
  background: transparent !important;
  padding: 0;
  display: block;
}
.mg-cat-chip {
  scroll-snap-align: start;
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--glass);
  border: 1px solid #fff;
  box-shadow: 0 12px 32px #24496d0a;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  color: var(--ink) !important;
  text-decoration: none !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
}
.mg-cat-chip:hover { background: #e2eeff; }
.mg-cat-title { font-weight: 750; font-size: 15px; line-height: 1.2; }
.mg-cat-meta { font-size: 12px; color: var(--muted); }
.mg-dropdown-glass {
  margin-top: 10px;
  padding: 12px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid #fff;
}
.mg-dropdown-glass .btn {
  border: 1px solid var(--line);
  background: #fff9;
  color: var(--ink);
  border-radius: 12px;
}
.mg-dropdown-glass .dropdown-menu {
  background: #f2f7fd;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.mg-dropdown-glass .dropdown-item { color: var(--ink); }
.mg-dropdown-glass .dropdown-item:hover { background: #e2eeff; }

/* Featured / product cards */
.mg-featured-wrap > h3,
#common-home .module h3 {
  font-size: clamp(25px, 3.1vw, 37px);
  letter-spacing: -0.055em;
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--ink);
}
.mg-featured-rail,
#common-home .module .row.row-cols-1,
#common-home .module .row {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 42px) / 4);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1px 1px 12px;
  margin: 0 !important;
  flex-wrap: nowrap !important;
  scrollbar-color: #acbfd7 transparent;
  scrollbar-width: thin;
}
#common-home .module .row > [class*="col"] {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
  scroll-snap-align: start;
}

.product-thumb {
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid #fff;
  box-shadow: 0 12px 32px #24496d0a;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-thumb .image {
  display: grid;
  place-items: center;
  height: 165px;
  background: #f5f8fa;
  margin: 0;
  overflow: hidden;
}
.product-thumb .image img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}
.product-thumb .content {
  padding: 12px 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-thumb .description p { display: none; }
.product-thumb h4 {
  font-size: 17px;
  font-weight: 750;
  margin: 0;
  line-height: 1.25;
}
.product-thumb h4 a { color: var(--ink); }
.product-thumb h4 a:hover { text-decoration: underline; }
.product-thumb .price {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}
.product-thumb .price-old {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 6px;
}
.product-thumb .button {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.product-thumb .button button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff9;
  color: var(--ink);
  min-width: 40px;
  min-height: 40px;
}
.product-thumb .button button:hover { background: #e2eeff; }
.product-thumb .button button[formaction*="cart"] {
  background: #19569a;
  border-color: #19569a;
  color: #fff;
  flex: 1;
}

/* Category / content panels */
.breadcrumb {
  background: transparent;
  padding: 16px 0 0;
  margin: 0;
}
.breadcrumb a { color: var(--muted); }
#content h1, #content h2 {
  color: var(--ink);
  letter-spacing: -0.04em;
}
.card, .form-control, .form-select, .table {
  background: #ffffffb8;
  border-color: var(--line);
  color: var(--ink);
}
.btn-primary {
  background: #19569a;
  border-color: #19569a;
  color: #fff;
  font-weight: 650;
  border-radius: 13px;
}
.btn-primary:hover { background: #133f7d; border-color: #133f7d; }
.btn-light, .btn-outline-secondary, .btn-secondary {
  border: 1px solid var(--line);
  background: #fff9;
  color: var(--ink);
  border-radius: 13px;
}

/* Footer — Shop1 layout + header glass chrome */
footer,
footer.mg-footer {
  display: block !important;
  clear: both;
  position: static !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  z-index: 2;
  margin-top: 38px !important;
  margin-bottom: 0 !important;
  padding: 28px 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: #30343b !important;
  color: #b7c9dc !important;
  font-size: 14px;
  box-shadow: 0 -8px 28px rgba(12, 28, 48, 0.14) !important;
  backdrop-filter: blur(18px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
}
footer.mg-footer .container {
  width: var(--mg-wrap) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
footer.mg-footer .row {
  --bs-gutter-x: 1.25rem;
  --bs-gutter-y: 1.25rem;
  margin-bottom: 0;
  align-items: flex-start !important;
}
footer.mg-footer h2 {
  font-size: 1rem;
  font-weight: 750;
  margin: 0 0 8px;
  letter-spacing: normal;
  color: #e8f1fa;
  line-height: 1.3;
}
footer.mg-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}
footer.mg-footer li {
  margin: 0;
}
footer.mg-footer a {
  color: #b7c9dc;
  text-decoration: none;
}
footer.mg-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.19em;
}
.mg-footer-brand {
  display: inline-block;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.05em;
  color: #f3f8fc !important;
  line-height: 1.1;
  text-decoration: none !important;
}
.mg-footer-brand small {
  font-size: 0.64em;
  color: #8eb6e0;
  letter-spacing: -0.02em;
}
.mg-footer-tag {
  margin: 10px 0 0;
  color: #9db2c7;
  font-size: 13px;
  max-width: 260px;
  line-height: 1.45;
}
.mg-footer-copy {
  margin: 12px 0 0;
  color: #8aa0b6;
  font-size: 12px;
}
.mg-footer-rule { display: none !important; }

@media (max-width: 575.98px) {
  footer.mg-footer {
    margin-top: 24px !important;
    padding: 22px 0 20px !important;
  }
  footer.mg-footer h2 {
    font-size: 0.95rem;
  }
  footer.mg-footer .col-6 {
    min-width: 0;
  }
  footer.mg-footer a {
    word-break: break-word;
  }
}

/* Catalog group chips on home */
.mg-subchips {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 8px;
  margin-top: 12px;
  scrollbar-width: thin;
}
.mg-chip {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff9;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.mg-chip:hover, .mg-chip.active {
  background: var(--mg-selection-bg);
  border-color: #ff7400;
  color: #163d71 !important;
}

@media (max-width: 900px) {
  .mg-rail,
  #common-home .module .row {
    grid-auto-columns: calc((100% - 28px) / 3) !important;
  }
}
@media (max-width: 650px) {
  :root { --mg-wrap: calc(100% - 28px); }
  /* legacy 650 head rules disabled — see Mobile storefront redesign */
  /* .mg-cart-label shown in compact cart */
  .mg-hero {
    align-items: flex-end;
    min-height: 470px;
    border-radius: 22px;
    margin-top: 13px;
  }
  .mg-hero-art {
    height: 64%;
    top: auto;
    object-position: 73% center;
  }
  .mg-hero::after {
    background: linear-gradient(0deg, #edf7ff 32%, #edf7ffeb 40%, transparent 63%);
  }
  .mg-hero-copy { padding: 22px; }
  .mg-hero h1 {
    font-size: clamp(42px, 12vw, 66px);
    margin: 9px 0;
  }
  .mg-hero p { font-size: 16px; margin-bottom: 14px; }
  .mg-rail,
  #common-home .module .row {
    grid-auto-columns: min(70%, 250px) !important;
  }
  .product-thumb .image { height: 116px; }
  .product-thumb .price { font-size: 16px; }
  /* group height from mobile redesign */
  .mg-controls { gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}


/* Catalog drill-down */
button.mg-group{
  border:1px solid #fff;
  cursor:pointer;
  font:inherit;
  color:inherit;
  width:100%;
}
.mg-catalog-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}
.mg-drill{margin-top:4px}
.mg-drill-hint{color:var(--muted);font-size:14px;margin:10px 0 0}
.mg-chip{cursor:pointer}
button.mg-chip{font:inherit}
.mg-chip-all{background:var(--mg-selection-bg);border-color:#ff7400;color:#163d71!important}
.mg-cat-heading{margin:8px 0 14px;font-size:clamp(28px,4vw,44px);letter-spacing:-.05em}
.mg-cat-children{margin:0 0 22px}
.mg-cat-intro{margin-bottom:18px}
#mg-category-menu{display:none!important}

/* === modeluga-browse-ux === */

/* sticky ancestors must not clip */
html, body, #container, main, #common-home, #mg-directions {
  overflow: visible !important;
}


:root {
  --mg-header-h: 78px;
}

/* Sticky catalog strip under header — recommended products scroll beneath */
#mg-directions.mg-directions {
  margin-top: 22px;
  position: relative;
  z-index: 25;
  overflow: visible;
}
#mg-catalog-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: calc(var(--mg-header-h, 78px) + 10px);
  z-index: 35;
  padding: 8px 0 14px;
  margin: 0;
  background: transparent;
  border-bottom: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  align-self: start;
}
.mg-catalog-toolbar { display: none !important; }
.mg-catalog-back {
  margin: 0 0 10px;
}
#common-home.mg-is-browsing .mg-catalog-back {
  display: inline-flex;
}
.mg-catalog-split {
  display: block;
}
.mg-catalog-left {
  min-width: 0;
}

/* Default: 4 cards row */
#mg-groups.mg-rail {
  margin: 0;
}

/* Browsing: selected card left + categories under it; products right */
#common-home.mg-is-browsing .mg-hero {
  display: none !important;
}
#common-home.mg-is-browsing #mg-directions {
  margin-top: 12px;
}
#common-home.mg-is-browsing #mg-catalog-sticky {
  background: transparent;
  padding-bottom: 8px;
}
#common-home.mg-is-browsing .mg-catalog-split {
  display: contents;
}
#common-home.mg-is-browsing #mg-groups.mg-rail {
  display: block;
  overflow: visible;
  grid-auto-flow: row;
  grid-auto-columns: unset;
  padding-bottom: 0;
}
#common-home.mg-is-browsing .mg-group {
  display: none;
  width: 100%;
  min-height: 168px;
  animation: mg-card-in 280ms ease;
}
#common-home.mg-is-browsing .mg-group.is-active {
  display: flex;
}
#common-home.mg-is-browsing .mg-group-media {
  min-height: 100px;
}
#common-home.mg-is-browsing .mg-group-art {
  height: 100px;
}

@keyframes mg-card-in {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}

#mg-subnav.mg-subnav {
  display: none;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 2px;
}
#common-home.mg-is-browsing #mg-subnav.mg-subnav {
  display: flex;
}
.mg-subnav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff9;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}
.mg-subnav-item:hover,
.mg-subnav-item.is-active {
  background: var(--mg-selection-bg);
  border-color: #ff7400;
  color: #163d71;
}
.mg-subnav-up {
  background: #eef4fb;
}
.mg-subnav-name { line-height: 1.25; }
.mg-subnav-caret {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  opacity: 0.7;
}
.mg-subnav-empty {
  margin: 4px 2px;
  color: var(--muted);
  font-size: 14px;
}

.mg-browse-main {
  min-width: 0;
}
.mg-browse-main[hidden] { display: none !important; }
.mg-browse-main-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.mg-browse-main-head h3 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -0.04em;
  color: var(--ink);
  font-weight: 800;
}
.mg-products-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
/* Products grid: 3 columns */
#mg-browse-main .mg-products,
.mg-products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
#mg-browse-main .mg-products .product-thumb,
#mg-browse-main .mg-products .mg-product-card,
.mg-products .product-thumb,
.mg-products .mg-product-card {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
}
@media (max-width: 980px) {
  #mg-browse-main .mg-products,
  .mg-products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  #mg-browse-main .mg-products,
  .mg-products {
    grid-template-columns: 1fr;
  }
}

.mg-product-card {
  margin: 0;
  border-radius: 16px;
  background: var(--glass, #ffffffcc);
  border: 1px solid #fff;
  box-shadow: 0 12px 32px #24496d0a;
  overflow: hidden;
}
.mg-product-card .image {
  height: 165px;
  display: grid;
  place-items: center;
  background: #f5f8fa;
}
.mg-product-card .image img {
  max-height: 150px;
  width: auto;
  object-fit: contain;
}
.mg-product-card .content { padding: 12px 14px 14px; }
.mg-product-card h4 {
  font-size: 15px;
  line-height: 1.25;
  margin: 0 0 6px;
}
.mg-product-card .description p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mg-products-empty,
.mg-products-loading {
  color: var(--muted);
  font-size: 15px;
  margin: 8px 0 0;
}
.mg-products-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.mg-pager-status {
  font-size: 13px;
  color: var(--muted);
}

/* Featured scrolls under sticky catalog */
#mg-featured {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  padding-top: 4px;
}

/* replaced: old 900 browsing mobile */


@media (max-width: 650px) {
  :root { --mg-header-h: 110px; }
}

/* Browse layout: sticky left column, scrolling products on the right */
#common-home.mg-is-browsing #mg-directions {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 12px;
}
#common-home.mg-is-browsing #mg-catalog-sticky {
  grid-column: 1;
  background: transparent;
  border-bottom: 0;
  padding: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#common-home.mg-is-browsing #mg-browse-main {
  grid-column: 2;
  min-width: 0;
}
#common-home.mg-is-browsing #mg-featured,
#common-home.mg-is-browsing #mg-catalog-data {
  grid-column: 1 / -1;
}
@media (max-width: 860px) {
  #common-home.mg-is-browsing #mg-directions {
    grid-template-columns: 1fr;
  }
  #common-home.mg-is-browsing #mg-catalog-sticky,
  #common-home.mg-is-browsing #mg-browse-main {
    grid-column: 1;
  }
}



/* removed uneven 34px search heights */
#container > header .mg-cart-wrap,
#container > header #cart,
header .mg-cart-wrap {
  font-size: 13px;
}
/* Home: minimal gap from products/featured to footer */
#common-home {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
#common-home #mg-directions {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
#common-home #mg-featured.mg-section,
#common-home #mg-featured {
  margin: 8px 0 0 !important;
  padding: 0 0 4px !important;
}
#common-home #mg-featured .row,
#common-home #content {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
#common-home #mg-browse-main {
  margin-bottom: 0 !important;
  padding-bottom: 4px !important;
}
main {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}
/* Bootstrap row gap in footer */
footer.mg-footer .row {
  --bs-gutter-y: 0.75rem;
  margin-bottom: 0;
}

/* Kill OC 300px footer gap */
body,
#container,
main,
#common-home,
#content {
  margin-bottom: 0 !important;
}
main {
  padding-bottom: 0 !important;
}
footer.mg-footer {
  /* margin from Shop1-style block above */
}
#common-home .mb-3 {
  margin-bottom: 0.5rem !important;
}
#common-home #mg-featured .product-thumb {
  margin-bottom: 0.5rem !important;
}


/* Remove OpenCart sticky-footer padding hack */
#content,
#column-left,
#column-right {
  padding-bottom: 0 !important;
}
body > #container {
  position: relative !important;
  margin-bottom: 0 !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  display: flex;
  flex-direction: column;
}

body > #container > main {
  flex-grow: 1;
}


/* Cart button contrast (hover/open must stay readable on light header) */
#cart .btn,
#cart.mg-cart-wrap .btn,
#cart.mg-cart-wrap > .dropdown > button,
header #cart .btn,
#header-cart .btn {
  background: #ffffffeb !important;
  border: 1px solid var(--line, #d5d9de) !important;
  color: var(--ink, #252a31) !important;
}
#cart .btn:hover,
#cart .btn:focus,
#cart .btn:active,
#cart .btn.show,
#cart .btn[aria-expanded="true"],
#cart.mg-cart-wrap .btn:hover,
#cart.mg-cart-wrap .btn:focus,
#cart.mg-cart-wrap .btn.show,
#cart.mg-cart-wrap .btn[aria-expanded="true"],
header #cart .btn:hover,
header #cart .btn:focus,
header #cart .btn.show,
header #cart .btn[aria-expanded="true"] {
  background: #e8f1fb !important;
  border-color: #9eb8d6 !important;
  color: var(--ink, #252a31) !important;
}
#cart .btn *,
#cart .btn:hover *,
#cart .btn.show *,
header #cart .btn *,
header #cart .btn:hover * {
  color: inherit !important;
}


/* Header actions: compact cart + icon buttons */
.mg-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.mg-icon-btn {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line, #d5d9de);
  background: #ffffffeb;
  color: var(--ink, #252a31) !important;
  text-decoration: none !important;
  font-size: 15px;
  line-height: 1;
  transition: background .15s ease, border-color .15s ease;
}
.mg-icon-btn:hover {
  background: #e8f1fb;
  border-color: #9eb8d6;
  color: var(--blue, #19569a) !important;
}
#wishlist-total.mg-icon-btn:hover {
  color: #c43b5a !important;
}
#cart.mg-cart-wrap {
  width: auto !important;
  max-width: none;
}
#cart.mg-cart-wrap .dropdown {
  display: block;
}
#cart .mg-cart-btn,
#cart.mg-cart-wrap .mg-cart-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  min-height: 40px !important;
  height: 40px;
  padding: 0 12px !important;
  border-radius: 12px !important;
  border: 1px solid var(--line, #d5d9de) !important;
  background: #ffffffeb !important;
  color: var(--ink, #252a31) !important;
  font-size: 13px !important;
  font-weight: 650;
  box-shadow: none !important;
  white-space: nowrap;
}
#cart .mg-cart-btn:hover,
#cart .mg-cart-btn:focus,
#cart .mg-cart-btn.show,
#cart .mg-cart-btn[aria-expanded="true"] {
  background: #e8f1fb !important;
  border-color: #9eb8d6 !important;
  color: var(--ink, #252a31) !important;
}
#cart .mg-cart-btn .mg-cart-label {
  display: inline;
  font-size: 13px;
}
#cart .mg-cart-btn .mg-cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue, #19569a);
  color: #fff !important;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
#cart .mg-cart-btn .dropdown-toggle::after {
  margin-left: 2px;
}
@media (max-width: 720px) {
  #cart .mg-cart-btn .mg-cart-label { display: none; }
  .mg-icon-btn { width: 38px; height: 38px; }
}



/* ===== Mobile storefront redesign ===== */

@media (max-width: 900px) {
  :root { --mg-header-h: 102px; }

  /* legacy catalog grid disabled — see Mobile hamburger nav */
  .mg-brand { font-size: 17px !important; gap: 6px !important; }
  .mg-brand .mark,
  .mg-brand .mark video { width: 28px !important; height: 28px !important; }

  #mg-groups.mg-rail {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-columns: unset !important;
    grid-auto-flow: row !important;
    gap: 10px !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
  }
  #mg-groups .mg-group {
    min-height: 160px !important;
    width: 100% !important;
  }
  #mg-groups .mg-group-art { height: 84px !important; object-fit: contain; }
  #mg-groups .mg-group-media { min-height: 84px !important; }
  #mg-groups .mg-group-copy { padding: 8px 10px 10px !important; }
  #mg-groups .mg-group-copy strong {
    font-size: 13px !important;
    line-height: 1.2 !important;
  }
  #mg-groups .mg-group-copy small {
    font-size: 11px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  #common-home.mg-is-browsing #mg-directions {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-top: 6px !important;
  }
  #common-home.mg-is-browsing #mg-catalog-sticky {
    position: static !important;
    top: auto !important;
    width: 100%;
    background: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    backdrop-filter: none !important;
  }
  #common-home.mg-is-browsing #mg-browse-main {
    display: block !important;
    width: 100%;
    min-width: 0;
    order: 3;
  }

  #common-home.mg-is-browsing #mg-groups.mg-rail {
    display: block !important;
    overflow: visible !important;
  }
  #common-home.mg-is-browsing #mg-groups .mg-group {
    display: none !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 132px !important;
  }
  #common-home.mg-is-browsing #mg-groups .mg-group.is-active {
    display: flex !important;
  }
  #common-home.mg-is-browsing #mg-groups .mg-group-art,
  #common-home.mg-is-browsing #mg-groups .mg-group-media {
    height: 90px !important;
    min-height: 90px !important;
  }

  #common-home.mg-is-browsing .mg-catalog-back {
    display: inline-flex !important;
    margin: 0 0 8px !important;
  }

  #common-home.mg-is-browsing #mg-subnav.mg-subnav,
  #mg-subnav.mg-subnav {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    margin: 8px 0 0 !important;
    padding: 0 2px 0 0 !important;
    -webkit-overflow-scrolling: touch;
    grid-template-columns: none !important;
  }
  #common-home.mg-is-browsing #mg-subnav .mg-subnav-item {
    width: 100% !important;
    min-height: 40px;
    padding: 8px 12px !important;
    font-size: 13px !important;
    box-sizing: border-box;
  }

  #common-home.mg-is-browsing .mg-browse-main-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 12px;
    margin: 2px 0 10px !important;
  }
  #common-home.mg-is-browsing #mg-products-title {
    font-size: 22px !important;
    margin: 0 !important;
    letter-spacing: -0.03em;
  }
  #common-home.mg-is-browsing #mg-products-meta {
    font-size: 12px;
  }

  #mg-browse-main .mg-products,
  .mg-products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  #mg-browse-main .mg-product-card .image,
  .mg-product-card .image { height: 118px !important; }
  #mg-browse-main .mg-product-card h4,
  .mg-product-card h4 { font-size: 13px !important; }

  /* Featured / home modules on mobile */
  #common-home #mg-featured .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  #common-home #mg-featured .row > [class*="col"] {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
  }
}

@media (max-width: 560px) {
  :root { --mg-header-h: 110px; }

  .mg-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "brand catalog actions"
      "search search search";
  }
  .mg-head > a.mg-btn {
    padding: 7px 9px !important;
    font-size: 12px !important;
  }

  /* keep 2 category cards per row on phones */
  #mg-groups.mg-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  #mg-groups .mg-group { min-height: 148px !important; }

  #mg-browse-main .mg-products,
  .mg-products,
  #common-home #mg-featured .row {
    grid-template-columns: 1fr !important;
  }

  .mg-hero { min-height: 340px !important; }
  .mg-hero h1 { font-size: clamp(32px, 10vw, 44px) !important; }
  .mg-hero-copy { padding: 18px !important; }

  #common-home.mg-is-browsing #mg-subnav.mg-subnav {
    max-height: 168px !important;
  }
}

@media (max-width: 420px) {
  .mg-head > a.mg-btn {
    font-size: 0 !important;
    line-height: 0 !important;
    padding: 9px 11px !important;
  }
  .mg-head > a.mg-btn::before {
    content: "☰";
    font-size: 16px;
    line-height: 1;
  }
  #cart .mg-cart-btn .mg-cart-label { display: none !important; }
  .mg-brand { font-size: 15px !important; }
}


/* Wishlist buttons: one vertical axis (cart / remove / continue) */
#account-wishlist .table-responsive {
  overflow-x: auto;
}
#account-wishlist table.table {
  margin-bottom: 0;
}
#account-wishlist td.mg-wishlist-actions {
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  padding: 12px !important;
  vertical-align: middle !important;
  text-align: right !important;
}
#account-wishlist .mg-wishlist-actions-stack {
  display: grid !important;
  gap: 8px !important;
  width: 148px !important;
  margin: 0 0 0 auto !important;
  justify-items: stretch !important;
}
#account-wishlist .mg-action-btn,
#account-wishlist .btn.mg-action-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  box-shadow: none !important;
}
#account-wishlist .mg-wishlist-actions-stack .mg-action-btn {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
}
#account-wishlist .mg-wishlist-continue {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: stretch !important;
  margin-top: 12px !important;
  /* same inset as last table cell: 12px padding */
  padding-right: 12px !important;
  padding-left: 12px !important;
  box-sizing: border-box !important;
  text-align: right !important;
}
#account-wishlist .mg-wishlist-continue .mg-wishlist-actions-stack {
  margin: 0 !important;
}
#account-wishlist .btn-primary.mg-action-btn {
  background: #19569a !important;
  border-color: #19569a !important;
  color: #fff !important;
}
#account-wishlist .btn-danger.mg-action-btn {
  background: #c94a4a !important;
  border-color: #c94a4a !important;
  color: #fff !important;
}
#account-wishlist .btn-primary.mg-action-btn:hover {
  background: #133f7d !important;
  border-color: #133f7d !important;
  color: #fff !important;
}
#account-wishlist .btn-danger.mg-action-btn:hover {
  background: #a83a3a !important;
  border-color: #a83a3a !important;
  color: #fff !important;
}


/* Mobile: 2 category cards per row + no sticky overlay */
@media (max-width: 900px) {
  #mg-catalog-sticky,
  #common-home.mg-is-browsing #mg-catalog-sticky,
  .mg-catalog-sticky {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
    border-bottom: 0 !important;
  }

  #mg-groups.mg-rail,
  #common-home:not(.mg-is-browsing) #mg-groups.mg-rail {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: unset !important;
    gap: 10px !important;
    overflow: visible !important;
  }

  /* When browsing on mobile: still only active card full width */
  #common-home.mg-is-browsing #mg-groups.mg-rail {
    display: block !important;
  }
  #common-home.mg-is-browsing #mg-groups .mg-group {
    display: none !important;
  }
  #common-home.mg-is-browsing #mg-groups .mg-group.is-active {
    display: flex !important;
    width: 100% !important;
  }
}


/* Header controls: one height, one axis */
:root {
  --mg-ctrl-h: 40px;
}
header .mg-head,
.mg-head {
  align-items: center !important;
}
.mg-head > a.mg-btn,
.mg-head .mg-btn {
  box-sizing: border-box !important;
  height: var(--mg-ctrl-h) !important;
  min-height: var(--mg-ctrl-h) !important;
  max-height: var(--mg-ctrl-h) !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.mg-head .mg-search-slot,
.mg-head .mg-search,
.mg-head #search {
  display: flex !important;
  align-items: stretch !important;
  height: var(--mg-ctrl-h) !important;
  min-height: var(--mg-ctrl-h) !important;
  margin: 0 !important;
}
.mg-head .mg-search.input-group {
  flex-wrap: nowrap !important;
  width: 100%;
}
.mg-head .mg-search .form-control,
.mg-head #search input.form-control,
.mg-head .mg-search-slot input {
  box-sizing: border-box !important;
  height: var(--mg-ctrl-h) !important;
  min-height: var(--mg-ctrl-h) !important;
  max-height: var(--mg-ctrl-h) !important;
  padding: 0 12px !important;
  margin: 0 !important;
  font-size: 13px !important;
  line-height: var(--mg-ctrl-h) !important;
  border-radius: 12px 0 0 12px !important;
  border: 1px solid var(--line, #d5d9de) !important;
  background: #fff !important;
  box-shadow: none !important;
}
.mg-head .mg-search .btn,
.mg-head #search .btn,
.mg-head .mg-search-slot .btn {
  box-sizing: border-box !important;
  height: var(--mg-ctrl-h) !important;
  min-height: var(--mg-ctrl-h) !important;
  max-height: var(--mg-ctrl-h) !important;
  width: var(--mg-ctrl-h) !important;
  min-width: var(--mg-ctrl-h) !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 0 12px 12px 0 !important;
  border: 1px solid var(--line, #d5d9de) !important;
  border-left: 0 !important;
  background: #fff !important;
  color: var(--ink, #252a31) !important;
  box-shadow: none !important;
  line-height: 1 !important;
}
.mg-head-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: var(--mg-ctrl-h) !important;
}
.mg-head-actions .mg-icon-btn {
  box-sizing: border-box !important;
  width: var(--mg-ctrl-h) !important;
  height: var(--mg-ctrl-h) !important;
  min-width: var(--mg-ctrl-h) !important;
  min-height: var(--mg-ctrl-h) !important;
  border-radius: 12px !important;
}
.mg-head-actions #cart.mg-cart-wrap,
.mg-head-actions #cart .dropdown,
.mg-head-actions #cart .d-grid {
  height: var(--mg-ctrl-h) !important;
  display: flex !important;
  align-items: center !important;
}
.mg-head-actions #cart .mg-cart-btn {
  box-sizing: border-box !important;
  height: var(--mg-ctrl-h) !important;
  min-height: var(--mg-ctrl-h) !important;
  max-height: var(--mg-ctrl-h) !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
}
.mg-head .mg-brand {
  display: inline-flex !important;
  align-items: center !important;
  height: var(--mg-ctrl-h) !important;
  line-height: 1 !important;
}


/* Hide browse products title/meta */
.mg-browse-main-head,
#mg-products-title,
#mg-products-meta {
  display: none !important;
}


/* Dark glass header: light controls on navy glass */
#container > header .mg-brand,
header .mg-brand {
  color: #f4f8fc !important;
}
#container > header .mg-brand small,
header .mg-brand small {
  color: #9ec4ef !important;
}
#container > header .mg-head > a.mg-btn,
header .mg-head > a.mg-btn {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #f5f9ff !important;
}
#container > header .mg-head > a.mg-btn:hover,
header .mg-head > a.mg-btn:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}
#container > header .mg-search .form-control,
#container > header .mg-search-slot input,
header .mg-search .form-control {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: var(--ink, #252a31) !important;
}
#container > header .mg-search .btn,
header .mg-search .btn {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: var(--ink, #252a31) !important;
}
#container > header .mg-icon-btn,
#container > header .mg-cart-btn,
#container > header .mg-burger,
header .mg-icon-btn,
header .mg-cart-btn,
header .mg-burger {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.28) !important;
  color: #f5f9ff !important;
}
#container > header .mg-icon-btn:hover,
#container > header .mg-cart-btn:hover,
#container > header .mg-cart-btn.show,
#container > header .mg-burger:hover,
#container > header .mg-burger.is-open,
header .mg-icon-btn:hover,
header .mg-cart-btn:hover,
header .mg-cart-btn.show,
header .mg-burger:hover,
header .mg-burger.is-open {
  background: rgba(255, 255, 255, 0.24) !important;
  color: #fff !important;
}
#container > header .mg-cart-count {
  background: #4ea1ff !important;
  border-color: transparent;
  color: #fff !important;
}


/* Darker page + 1px card frames */
.mg-group,
button.mg-group {
  border: 1px solid #b7c6d8 !important;
  box-shadow: 0 10px 28px rgba(36, 73, 109, 0.08);
}
.mg-product-card,
#mg-browse-main .mg-product-card,
#mg-featured .product-thumb,
#common-home .product-thumb,
.product-thumb.mg-product-card {
  border: 1px solid #b7c6d8 !important;
  box-shadow: 0 10px 28px rgba(36, 73, 109, 0.07);
}


/* Category strip: transparent under cards */
#mg-catalog-sticky,
#common-home.mg-is-browsing #mg-catalog-sticky,
#mg-directions,
#mg-directions.mg-directions {
  background: transparent !important;
  border-bottom: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
}


/* Unified product cards everywhere */
.product-thumb,
.mg-product-card,
.product-thumb.mg-product-card {
  border-radius: 16px !important;
  overflow: hidden !important;
  background: #f5f8fa !important;
  border: 1px solid #b7c6d8 !important;
  box-shadow: 0 10px 28px rgba(36, 73, 109, 0.07) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  height: 100%;
  display: flex !important;
  flex-direction: column !important;
}
.product-thumb .image,
.mg-product-card .image {
  display: grid !important;
  place-items: center !important;
  height: 165px !important;
  /* same color as card */
  background: #f5f8fa !important;
  margin: 0 !important;
  overflow: hidden !important;
}
.product-thumb .image img,
.mg-product-card .image img {
  max-height: 150px !important;
  width: auto !important;
  object-fit: contain !important;
}
.product-thumb .content,
.mg-product-card .content {
  padding: 12px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  flex: 1 1 auto !important;
  background: #f5f8fa !important;
}
.product-thumb .description p,
.mg-product-card .description p {
  display: none !important;
}
.product-thumb h4,
.mg-product-card h4 {
  font-size: 15px !important;
  font-weight: 750 !important;
  margin: 0 0 6px !important;
  line-height: 1.25 !important;
}
.product-thumb h4 a,
.mg-product-card h4 a {
  color: var(--ink, #252a31) !important;
  text-decoration: none !important;
}
.product-thumb .price,
.mg-product-card .price {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: var(--ink, #252a31) !important;
  margin: 0 !important;
}
.product-thumb .button,
.mg-product-card .button {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  width: 100% !important;
}
.product-thumb .button button,
.mg-product-card .button button {
  border: 1px solid #b7c6d8 !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--ink, #252a31) !important;
  min-width: 40px !important;
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}
.product-thumb .button button:hover,
.mg-product-card .button button:hover {
  background: #e8f1fb !important;
}
.product-thumb .button button[formaction*="cart"],
.mg-product-card .button button[formaction*="cart"] {
  background: #19569a !important;
  border-color: #19569a !important;
  color: #fff !important;
  flex: none !important;
  width: 100% !important;
}


/* Product card buttons: equal width, side/bottom gaps */
.product-thumb .content,
.mg-product-card .content {
  padding: 12px 12px 12px !important;
}
.product-thumb .button,
.mg-product-card .button {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.product-thumb .button button,
.mg-product-card .button button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  flex: none !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid #b7c6d8 !important;
  background: #fff !important;
  color: var(--ink, #252a31) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
.product-thumb .button button:hover,
.mg-product-card .button button:hover {
  background: #e8f1fb !important;
}
.product-thumb .button button[formaction*="cart"],
.mg-product-card .button button[formaction*="cart"] {
  background: #19569a !important;
  border-color: #19569a !important;
  color: #fff !important;
  flex: none !important;
}


/* FINAL: product card actions not absolute; equal buttons + inset */
.product-thumb {
  position: relative !important;
  overflow: hidden !important;
}
.product-thumb .content {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 12px !important;
  gap: 10px !important;
  margin: 0 !important;
}
.product-thumb .description {
  padding: 0 !important;
  margin: 0 0 0 0 !important;
  margin-bottom: 0 !important;
}
.product-thumb form {
  margin: 0 !important;
  margin-top: auto !important;
}
.product-thumb .button,
.mg-product-card .button {
  display: grid !important;
  grid-template-columns: 1fr 1fr 1fr !important;
  gap: 8px !important;
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-left: 0 !important;
  box-sizing: border-box !important;
}
.product-thumb .button button,
.mg-product-card .button button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  min-height: 40px !important;
  line-height: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #b7c6d8 !important;
  border-top: 1px solid #b7c6d8 !important;
  border-left: 1px solid #b7c6d8 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  color: #252a31 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}
.product-thumb .button button[formaction*="cart"],
.mg-product-card .button button[formaction*="cart"] {
  background: #19569a !important;
  border-color: #19569a !important;
  color: #fff !important;
  flex: unset !important;
  width: 100% !important;
}


/* Password field: eye + clear */
.mg-password-field {
  position: relative;
  display: block;
}
.mg-password-field .form-control {
  padding-right: 72px !important;
}
.mg-password-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5d738c;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.mg-password-btn:hover {
  color: var(--blue, #19569a);
  background: rgba(22, 77, 154, 0.08);
}
.mg-password-clear {
  right: 36px;
}
.mg-password-toggle {
  right: 6px;
}
.mg-password-btn[hidden] {
  display: none !important;
}


/* ===== Mobile hamburger nav + hide hero ===== */
.mg-burger {
  display: none;
  flex: 0 0 auto;
  padding: 0 !important;
}
.mg-burger-lines {
  display: grid;
  gap: 4px;
  width: 16px;
}
.mg-burger-lines > span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 1px;
  background: currentColor;
}
.mg-drawer-catalog {
  display: none;
}
.mg-drawer-backdrop {
  display: none !important;
}
/* Desktop: drawer is off-canvas panel, NOT display:contents (nav links must not enter header flow) */
.mg-drawer {
  display: flex !important;
}

/* Desktop header flow with display:contents drawer */
.mg-head > .mg-brand { order: 1; }
.mg-head .mg-search-slot { order: 2; }
.mg-head .mg-head-actions { order: 3; }
.mg-head > .mg-burger { order: 4; }
.mg-head > .mg-drawer-backdrop { order: 0; }


@media (max-width: 900px) {
  .mg-burger {
    display: inline-grid !important;
    place-items: center;
    order: 3;
    margin-left: auto;
    z-index: 70;
  }

  .mg-head {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 8px 0 !important;
    position: relative;
  }
  .mg-head .mg-brand {
    order: 1;
    margin-right: 0 !important;
    flex: 0 1 auto;
    min-width: 0;
  }

  :root { --mg-header-h: 58px; }

  /* Mobile menu bar overlays content — reserve space below it */
  body > #container > header,
  #container > header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 40 !important;
  }
  #container > header .mg-head,
  header .mg-head {
    width: var(--mg-wrap) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #container > main,
  main {
    padding-top: calc(var(--mg-header-h) + 14px) !important;
  }
  #common-home {
    padding-top: 0 !important;
  }
  #mg-directions.mg-directions,
  #common-home #mg-directions,
  #common-home.mg-is-browsing #mg-directions,
  .mg-rail-wrap {
    margin-top: 8px !important;
    padding-top: 0 !important;
  }
  #mg-groups.mg-rail,
  #common-home:not(.mg-is-browsing) #mg-groups.mg-rail {
    margin-top: 0 !important;
  }

  /* Dim page under menu; blocks interaction */
  .mg-drawer-backdrop {
    display: block !important;
    position: fixed !important;
    top: var(--mg-header-h) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 60 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: rgba(8, 18, 32, 0.52) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }
  .mg-drawer-backdrop.is-open:not([hidden]) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mg-drawer-backdrop[hidden],
  .mg-drawer-backdrop[hidden].is-open {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  /* Full-width panel under header, height by content; slides from the right */
  .mg-drawer {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    position: fixed !important;
    top: var(--mg-header-h) !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    max-height: calc(100dvh - var(--mg-header-h)) !important;
    margin: 0 !important;
    padding: 14px 16px 18px !important;
    border: 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 0 0 18px 18px !important;
    box-sizing: border-box !important;
    z-index: 65 !important;
    background: #30343b !important;
    backdrop-filter: blur(18px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(140%) !important;
    box-shadow: 0 16px 36px rgba(8, 18, 32, 0.28) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    visibility: visible;
  }
  .mg-drawer.is-open {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* Burger → X when open */
  .mg-burger.is-open .mg-burger-lines {
    gap: 0;
    position: relative;
    height: 14px;
    width: 16px;
  }
  .mg-burger.is-open .mg-burger-lines > span {
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -1px;
  }
  .mg-burger.is-open .mg-burger-lines > span:nth-child(1) {
    transform: rotate(45deg);
  }
  .mg-burger.is-open .mg-burger-lines > span:nth-child(2) {
    opacity: 0;
  }
  .mg-burger.is-open .mg-burger-lines > span:nth-child(3) {
    transform: rotate(-45deg);
  }
  .mg-burger-lines > span {
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .mg-drawer-catalog {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #f5f9ff !important;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none !important;
    flex: 0 0 auto;
  }
  .mg-drawer-catalog:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff !important;
  }

  .mg-drawer-catalog { order: 1 !important; }
  .mg-drawer .mg-head-actions { order: 2 !important; }
  .mg-drawer .mg-search-slot {
    width: 100% !important;
    min-width: 0;
    order: 3 !important;
    grid-area: unset !important;
    flex: 0 0 auto;
    margin-top: 2px;
    position: relative;
    z-index: 120;
  }
  .mg-drawer .mg-head-actions {
    width: 100%;
    justify-content: stretch !important;
    display: grid !important;
    grid-template-columns: 1fr auto auto;
    gap: 8px !important;
    height: auto !important;
    flex: 0 0 auto;
  }
  .mg-drawer .mg-head-actions #cart.mg-cart-wrap {
    width: 100%;
  }
  .mg-drawer .mg-head-actions #cart .mg-cart-btn {
    width: 100% !important;
    justify-content: center !important;
  }
  .mg-drawer .mg-head-actions #cart .mg-cart-label {
    display: inline !important;
  }

  /* Keep burger above the sliding panel */
  html.mg-drawer-open #container > header,
  html.mg-drawer-open header {
    z-index: 70 !important;
  }
}

/* ===== Live header search ===== */
.mg-search {
  position: relative;
}
.mg-search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: stretch;
}
.mg-search-field .form-control {
  width: 100%;
  padding-right: 36px !important;
  border-radius: 12px 0 0 12px !important;
}
.mg-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5d738c;
  font-size: 22px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}
.mg-search-clear:hover {
  color: var(--blue, #19569a);
  background: rgba(22, 77, 154, 0.08);
}
.mg-search-clear[hidden] {
  display: none !important;
}
#container > header .mg-search-clear,
header .mg-search-clear {
  color: rgba(245, 249, 255, 0.85);
}
#container > header .mg-search-clear:hover,
header .mg-search-clear:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
}
.mg-search {
  position: relative;
  z-index: 1;
  flex-wrap: nowrap !important;
}
.mg-search.is-suggest-open {
  z-index: 120;
}
.mg-search-suggest {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 130 !important;
  max-height: min(60vh, 420px);
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #30343b;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 16px 36px rgba(12, 28, 48, 0.35);
  padding: 8px;
  /* keep out of input-group flex row */
  flex: 0 0 auto;
  order: 99;
}
.mg-search-suggest[hidden] {
  display: none !important;
}
.mg-search-suggest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.mg-search-suggest-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  border-radius: 10px;
  color: #f5f9ff !important;
  text-decoration: none !important;
}
.mg-search-suggest-item:hover {
  background: rgba(255, 255, 255, 0.12);
}
.mg-search-suggest-item img,
.mg-search-suggest-ph {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.1);
}
.mg-search-suggest-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.mg-search-suggest-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mg-search-suggest-price {
  font-size: 12px;
  color: #9ec0e4;
}
.mg-search-suggest-status {
  padding: 12px 10px;
  color: #b7c9dc;
  font-size: 13px;
  text-align: center;
}
.mg-search-suggest-more {
  display: block;
  margin-top: 6px;
  padding: 10px;
  text-align: center;
  border-radius: 10px;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none !important;
}
.mg-search-suggest-more:hover {
  background: rgba(255, 255, 255, 0.18);
}
@media (max-width: 900px) {
  /* Suggest drops under the field, above drawer/page */
  .mg-drawer {
    overflow: visible !important;
  }
  .mg-drawer:has(.mg-search.is-suggest-open) {
    z-index: 125 !important;
  }
  .mg-drawer .mg-search-slot {
    position: relative;
    z-index: 120;
    order: 3 !important;
    margin-top: 4px;
  }
  .mg-drawer-catalog { order: 1 !important; }
  .mg-drawer .mg-head-actions { order: 2 !important; }
  .mg-drawer .mg-search {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
  }
  .mg-drawer .mg-search-suggest {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: min(50vh, 360px);
    z-index: 140 !important;
  }
  .mg-drawer .mg-search-field {
    flex: 1 1 auto;
    min-width: 0;
  }
  .mg-drawer .mg-search > .btn {
    flex: 0 0 auto;
  }
}


/* ===== Profile icon hover tip ===== */
.mg-profile-btn {
  position: relative;
}
.mg-profile-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  max-width: min(220px, 70vw);
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(18, 36, 58, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f5f9ff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 20px rgba(12, 28, 48, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}
.mg-profile-btn:hover .mg-profile-tip,
.mg-profile-btn:focus-visible .mg-profile-tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
@media (max-width: 900px) {
  .mg-drawer .mg-profile-tip {
    right: auto;
    left: 50%;
    transform: translate(-50%, -4px);
  }
  .mg-drawer .mg-profile-btn:hover .mg-profile-tip,
  .mg-drawer .mg-profile-btn:focus-visible .mg-profile-tip {
    transform: translate(-50%, 0);
  }
}

/* ===== Profile tip: no native title ===== */
.mg-profile-btn {
  /* custom .mg-profile-tip only — do not set title attribute */
}

/* ===== PROTO 2026-11-26 ===== */
/* Direction rail: 5 photo tiles (Все товары + 4 groups) */
.mg-direction-rail {
  display: grid !important;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 5);
  gap: 9px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.mg-direction-rail .mg-group {
  display: flex !important;
  align-items: flex-end;
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 112px;
  padding: 10px;
  border: 1px solid var(--line, #d5d9de);
  border-radius: 12px;
  overflow: hidden;
  background: #173554;
  color: #fff !important;
  text-align: left;
  cursor: pointer;
}
.mg-direction-rail .mg-group-media {
  position: absolute !important;
  inset: 0 !important;
  min-height: 0 !important;
  z-index: 0;
  pointer-events: none;
}
.mg-direction-rail .mg-group-art {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.mg-direction-rail .mg-group::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(0deg, #12243af5, #12243a75 40%, transparent 76%);
  pointer-events: none;
}
.mg-direction-rail .mg-group-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
}
.mg-direction-rail .mg-group-copy strong {
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.mg-direction-rail .mg-group-copy small {
  color: #dce8f5 !important;
  font-size: 11px;
  line-height: 1.25;
}
.mg-direction-rail .mg-group.is-active,
.mg-direction-rail .mg-group[aria-current="true"] {
  outline: 2px solid #19569a;
  outline-offset: 1px;
}
@media (max-width: 900px) {
  .mg-direction-rail { grid-auto-columns: min(43%, 185px) !important; }
}
@media (max-width: 650px) {
  .mg-direction-rail { grid-auto-columns: min(46%, 150px) !important; }
  .mg-direction-rail .mg-group { min-height: 100px; }
}

/* Product cards: edge-to-edge photo + frosted caption */
.mg-product-card,
#mg-browse-main .mg-product-card {
  position: relative !important;
  isolation: isolate;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 1px solid #fff !important;
  box-shadow: 0 10px 24px #24496d14 !important;
}
.mg-product-card .image,
#mg-browse-main .mg-product-card .image {
  position: relative !important;
  aspect-ratio: 3 / 4 !important;
  height: auto !important;
  min-height: 0 !important;
  background: #dbe4ee !important;
  overflow: hidden !important;
}
.mg-product-card .image img,
#mg-browse-main .mg-product-card .image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
}
.mg-product-card .content,
#mg-browse-main .mg-product-card .content {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 12px 12px 10px !important;
  background: linear-gradient(0deg, #12243af2 10%, #12243acc 55%, #12243a00) !important;
  color: #f5f9ff !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mg-product-card .content h4,
.mg-product-card .content h4 a,
#mg-browse-main .mg-product-card .content h4,
#mg-browse-main .mg-product-card .content h4 a {
  color: #f5f9ff !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  line-height: 1.32 !important;
  margin: 0 !important;
}
.mg-product-card .price,
#mg-browse-main .mg-product-card .price {
  color: #fff !important;
  font-weight: 700 !important;
  margin: 0 !important;
}
.mg-product-card .button,
#mg-browse-main .mg-product-card .button {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}
.mg-product-card .button button,
#mg-browse-main .mg-product-card .button button {
  min-height: 40px;
  background: #f5f8fad9 !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid #ffffff55 !important;
  color: #12243a !important;
}

/* Mobile header: brand + actions + burger; search second row */
@media (max-width: 900px) {
  .mg-head {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "brand actions menu"
      "search search search" !important;
    gap: 6px 8px !important;
    align-items: center !important;
  }
  .mg-head > .mg-brand { grid-area: brand !important; order: unset !important; margin-right: 0 !important; }
  .mg-head > .mg-head-actions {
    display: flex !important;
    grid-area: actions !important;
    gap: 2px !important;
    align-items: center !important;
    width: auto !important;
  }
  .mg-head > .mg-burger { grid-area: menu !important; order: unset !important; margin-left: 0 !important; }
  .mg-head > .mg-search-slot {
    display: block !important;
    grid-area: search !important;
    width: 100% !important;
    min-width: 0 !important;
    order: unset !important;
  }
  /* drawer only hosts catalog shortcut on mobile */
  .mg-drawer { /* keep existing drawer panel rules */ }
}
/* ===== PROTO V2 2026-11-26 ===== */
/* Hero carousel */
.mg-hero-carousel{
  display:grid; overflow:hidden; isolation:isolate; position:relative;
  margin: 12px 0 18px; border-radius: 22px;
  --hero-inset:0%; --hero-step:100%;
}
.mg-hero-carousel > [data-hero-slide]{
  grid-area:1/1; min-width:0; margin-inline:var(--hero-inset);
  transition: transform .7s ease, opacity .7s ease;
}
.mg-hero-carousel > [data-position="current"]{ transform:translateX(0); opacity:1; z-index:1; }
.mg-hero-carousel > [data-position="next"]{ transform:translateX(var(--hero-step)); opacity:1; }
.mg-hero-carousel > [data-position="previous"]{ transform:translateX(calc(-1 * var(--hero-step))); opacity:1; }
.mg-hero-carousel > [data-position="next"].wrap-slide{ transition:none; }
.mg-hero-carousel > [aria-hidden="true"]{ visibility:hidden; }
.mg-hero-carousel .mg-hero{ margin:0; border-radius:22px; }
.mg-extra-hero h2{
  font-size:clamp(35px,5vw,68px); line-height:.98; letter-spacing:-.04em; margin:14px 0; color:#12243a; font-weight:500;
}
@media (prefers-reduced-motion: reduce){
  .mg-hero-carousel > [data-hero-slide]{ transition:none; }
}
@media (max-width:650px){
  .mg-extra-hero h2{ font-size:clamp(34px,8vw,48px); }
}

/* Catalog: horizontal rail ABOVE products (not left column) */
#common-home.mg-is-browsing .mg-hero-carousel,
#common-home.mg-is-browsing .mg-hero { display:none !important; }
#common-home.mg-is-browsing #mg-directions{
  display:flex !important;
  flex-direction:column !important;
  gap:14px !important;
}
#common-home.mg-is-browsing #mg-catalog-sticky,
#common-home.mg-is-browsing .mg-catalog-top{
  position:relative !important;
  top:auto !important;
  width:100% !important;
  max-width:none !important;
  float:none !important;
  inset:auto !important;
}
#common-home.mg-is-browsing #mg-browse-main{
  display:block !important;
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
  float:none !important;
}
#common-home.mg-is-browsing #mg-groups.mg-rail,
#common-home.mg-is-browsing .mg-direction-rail{
  display:grid !important;
  grid-auto-flow:column !important;
  grid-auto-columns: calc((100% - 36px)/5) !important;
  overflow-x:auto !important;
  gap:9px !important;
  width:100% !important;
}
#common-home.mg-is-browsing #mg-subnav.mg-subnav{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin-top:8px !important;
}
#common-home.mg-is-browsing #mg-featured{ display:none !important; }
@media (max-width:900px){
  #common-home.mg-is-browsing #mg-groups.mg-rail,
  #common-home.mg-is-browsing .mg-direction-rail{
    grid-auto-columns: min(43%,185px) !important;
  }
}
@media (max-width:650px){
  #common-home.mg-is-browsing #mg-groups.mg-rail,
  #common-home.mg-is-browsing .mg-direction-rail{
    grid-auto-columns: min(46%,150px) !important;
  }
}

/* Photo cards 3:4 edge-to-edge */
.photo-card.mg-product-card,
#mg-browse-main .photo-card.mg-product-card,
.product-thumb.mg-product-card,
#mg-browse-main .product-thumb.mg-product-card,
#mg-browse-main .mg-product-card,
.mg-products .mg-product-card,
#common-home #mg-featured .product-thumb,
.product-list .product-thumb,
.product-grid .product-thumb,
#product-search .product-thumb,
#product-category .product-thumb,
#product-special .product-thumb{
  position:relative !important;
  isolation:isolate;
  display:block !important;
  aspect-ratio:3/4 !important;
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
  border-radius:18px !important;
  overflow:hidden !important;
  background:#dbe4ee !important;
  border:1px solid #fff !important;
  box-shadow:0 10px 24px #24496d14 !important;
}
.photo-card .card-photo,
.mg-product-card > .image,
.product-thumb > .image{
  position:absolute !important;
  inset:0 !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
}
.photo-card .card-photo img,
.mg-product-card > .image img,
.product-thumb > .image img{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:center !important;
  display:block !important;
}
.photo-card .favorite-toggle,
.mg-card-wish{
  position:absolute !important;
  top:8px; right:8px; z-index:3;
  margin:0 !important;
}
.mg-card-wish .favorite-toggle{
  min-width:44px; min-height:44px;
  border-radius:10px;
  border:1px solid #ffffff88;
  background:#f5f8fad9;
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  color:#19569a;
  box-shadow:0 2px 10px #12243a26;
}
.photo-card .card-caption,
.mg-product-card > .content,
.product-thumb > .content{
  position:absolute !important;
  left:6px; right:6px; bottom:6px; top:auto !important;
  z-index:2;
  padding:9px 10px 7px !important;
  margin:0 !important;
  background:rgba(18,36,58,.42) !important;
  color:#fff !important;
  backdrop-filter:blur(12px) saturate(135%);
  -webkit-backdrop-filter:blur(12px) saturate(135%);
  border:1px solid #ffffff55;
  border-radius:13px;
  box-shadow:0 3px 12px #12243a28;
  text-shadow:0 1px 3px #12243a;
  height:auto !important;
}
.photo-card .card-caption .name,
.mg-product-card > .content h4,
.mg-product-card > .content h4 a,
.product-thumb > .content h4,
.product-thumb > .content h4 a{
  display:block;
  color:#fff !important;
  font-weight:400 !important;
  font-size:clamp(14px,1.5vw,17px) !important;
  line-height:1.25 !important;
  margin:4px 0 2px !important;
  text-decoration:none !important;
}
.photo-card .price-line{
  display:flex; align-items:center; gap:8px; flex-wrap:nowrap;
}
.photo-card .price,
.photo-card .price-new,
.mg-product-card .price,
.mg-product-card .price-new,
.product-thumb .price,
.product-thumb .price-new{ color:#fff !important; font-weight:700 !important; margin:0 !important; }
.photo-card .price-old,
.mg-product-card .price-old{ color:#d7e3f2 !important; }
.mg-cart-icon-btn{
  min-width:40px; min-height:40px; margin-left:auto;
  border-radius:10px; border:1px solid #ffffff66;
  background:#f5f8fad9; color:#12243a;
}
.mg-products{
  display:grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap:14px !important;
  width:100% !important;
}
@media (max-width:650px){
  .photo-card.mg-product-card, .product-thumb{ border-radius:14px !important; }
  .mg-products{ grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap:10px !important; }
}

/* Product page 3 columns */
.mg-product-layout{
  display:grid;
  grid-template-columns: minmax(0,1.23fr) minmax(0,1fr) minmax(250px,.8fr);
  gap:22px;
  align-items:start;
}
.mg-product-gallery{ display:grid; grid-template-columns:minmax(0,1fr); gap:10px; min-width:0; }
.mg-product-gallery.has-thumbs{ grid-template-columns:50px minmax(0,1fr); }
.mg-product-thumbs{ display:flex; flex-direction:column; gap:8px; }
.mg-product-thumbs img{ width:50px; height:50px; object-fit:cover; border-radius:8px; }
.mg-product-main-image{ margin:0; }
.mg-product-main-img{
  display:block; width:100%; height:auto; max-width:100%;
  object-fit:contain; background:#dbe4ee; border-radius:16px;
  border:0 !important; padding:0 !important;
}
.mg-product-specs h1{ margin-top:0; }
.mg-product-buy{
  background:#fff; border:1px solid var(--line,#d5d9de); border-radius:16px; padding:16px;
}
@media (max-width:950px){
  .mg-product-layout{ grid-template-columns:1fr 1fr; }
  .mg-product-gallery{ grid-column:1; grid-row:1 / span 2; }
}
@media (max-width:650px){
  .mg-product-layout{ display:flex; flex-direction:column; gap:12px; }
  .mg-product-layout > *{ width:100%; }
  .mg-product-gallery.has-thumbs{ grid-template-columns:1fr; }
  .mg-product-thumbs{ flex-direction:row; flex-wrap:wrap; }
}

.mg-learn-lead{ color:var(--muted,#5b6b7c); margin-bottom:16px; }
.mg-learn-item{
  background:#fff; border:1px solid var(--line,#d5d9de); border-radius:14px;
  padding:12px 14px; margin-bottom:10px;
}
.mg-learn-item summary{ cursor:pointer; font-weight:700; }
.mg-learn-item p{ margin:10px 0 0; }
/* ===== PROTO V3 tree 2026-11-26 ===== */
.mg-catalog-layout{
  display:grid;
  grid-template-columns: minmax(200px,238px) minmax(0,1fr);
  gap:16px;
  align-items:start;
  width:100%;
}
.mg-catalog-layout[hidden]{ display:none !important; }
.mg-category-sidebar{
  border-radius:16px;
  padding:10px;
  min-width:0;
  background:#ffffffd9;
  border:1px solid var(--line,#d5d9de);
}
.mg-category-panel > h2{
  margin:0;
  padding:10px 8px;
  font-size:16px;
  font-weight:750;
}
.mg-category-panel nav{ display:grid; gap:4px; }
.mg-category-panel nav details > summary{
  padding:9px 7px;
  font-size:14px;
  font-weight:650;
  cursor:pointer;
  overflow-wrap:anywhere;
}
.mg-branch-children{
  padding-left:8px;
  margin-left:7px;
  border-left:1px solid #c4d5e8;
  display:grid;
  gap:2px;
}
.mg-category-leaf{ min-width:0; }
.mg-cat-chip{
  display:flex;
  justify-content:flex-start;
  width:100%;
  max-width:none;
  min-height:36px;
  padding:7px 8px;
  border:1px solid transparent;
  border-radius:10px;
  background:transparent;
  color:var(--ink,#12243a);
  text-align:left;
  cursor:pointer;
  font-size:13px;
  line-height:1.25;
}
.mg-cat-chip:hover{ background:var(--mg-selection-bg); }
.mg-cat-chip.is-active{
  background:var(--mg-selection-bg);
  border-color:#ff7400;
}

#common-home.mg-is-browsing #mg-catalog-layout{ display:grid !important; }
#common-home.mg-is-browsing #mg-browse-main{
  display:block !important;
  width:100% !important;
  margin:0 !important;
}
#common-home.mg-is-browsing #mg-directions{
  display:flex !important;
  flex-direction:column !important;
  gap:14px !important;
}
#common-home.mg-is-browsing #mg-catalog-sticky{
  position:relative !important;
  width:100% !important;
  max-width:none !important;
}
#common-home.mg-is-browsing #mg-groups.mg-rail,
#common-home.mg-is-browsing .mg-direction-rail{
  display:grid !important;
  grid-auto-flow:column !important;
  grid-auto-columns: calc((100% - 36px)/5) !important;
  overflow-x:auto !important;
  gap:9px !important;
  width:100% !important;
}

@media (max-width:760px){
  .mg-catalog-layout{
    grid-template-columns: minmax(0,1fr);
    gap:12px;
  }
  #common-home.mg-is-browsing #mg-groups.mg-rail,
  #common-home.mg-is-browsing .mg-direction-rail{
    grid-auto-columns: min(46%,150px) !important;
  }
}
@media (max-width:900px) and (min-width:761px){
  #common-home.mg-is-browsing #mg-groups.mg-rail,
  #common-home.mg-is-browsing .mg-direction-rail{
    grid-auto-columns: min(43%,185px) !important;
  }
}
/* ===== PROTO V4 header 2026-11-26 ===== */
@media (max-width: 900px) {
  header .mg-head,
  .mg-head {
    --mg-mobile-action: 44px;
    --mg-mobile-gap: 6px;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto var(--mg-mobile-action) !important;
    grid-template-areas:
      "brand actions menu"
      "search search search" !important;
    column-gap: var(--mg-mobile-gap) !important;
    row-gap: 12px !important;
    align-items: center !important;
    padding-top: 7px !important;
    padding-bottom: 9px !important;
  }

  .mg-head > .mg-brand {
    grid-area: brand !important;
    font-size: 27px !important;
    gap: 4px !important;
    margin: 0 !important;
  }
  .mg-head > .mg-brand > span:last-child {
    transform: scaleX(0.74);
    transform-origin: left center;
    display: inline-block;
  }
  .mg-head > .mg-brand .mark,
  .mg-head > .mg-brand .mark video {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
  }
  .mg-head > .mg-brand small {
    font-size: 0.78em !important;
    display: inline !important;
  }

  .mg-head > .mg-head-actions {
    grid-area: actions !important;
    display: grid !important;
    grid-template-columns: repeat(3, var(--mg-mobile-action)) !important;
    gap: var(--mg-mobile-gap) !important;
    width: auto !important;
    align-items: center !important;
  }
  .mg-head > .mg-head-actions .mg-icon-btn,
  .mg-head > .mg-head-actions #cart .mg-cart-btn {
    width: var(--mg-mobile-action) !important;
    height: var(--mg-mobile-action) !important;
    min-width: var(--mg-mobile-action) !important;
    min-height: var(--mg-mobile-action) !important;
    padding: 0 !important;
    margin: 0 !important;
    justify-self: center;
  }
  .mg-head > .mg-head-actions #cart.mg-cart-wrap,
  .mg-head > .mg-head-actions #cart .dropdown,
  .mg-head > .mg-head-actions #cart .d-grid {
    width: var(--mg-mobile-action) !important;
  }

  .mg-head > .mg-burger {
    grid-area: menu !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border: 1px solid #f4f8fc55 !important;
    border-radius: 8px !important;
    justify-self: center !important;
    margin: 0 !important;
  }

  .mg-head > .mg-search-slot {
    grid-area: search !important;
    width: 100% !important;
    margin: 0 !important;
  }
}

@media (max-width: 440px) {
  .mg-head > .mg-brand { font-size: 24px !important; }
}
@media (max-width: 379px) {
  header .mg-head,
  .mg-head { --mg-mobile-action: 44px; }
  .mg-head > .mg-brand { font-size: 20px !important; }
}
@media (max-width: 355px) {
  .mg-head > .mg-brand { font-size: 19px !important; }
  .mg-head > .mg-brand small { display: none !important; }
  .mg-head > .mg-brand .mark,
  .mg-head > .mg-brand .mark video {
    width: 24px !important;
    height: 24px !important;
    flex-basis: 24px !important;
  }
}

/* Outline heart: closed contour, both top arcs */
.mg-heart-icon {
  display: block;
  width: 21px;
  height: 21px;
}
.mg-icon-btn .mg-heart-icon {
  color: inherit;
}

/* ===== PROTO V5 grid 3-col desktop ===== */
#mg-browse-main .mg-products,
.mg-products,
#common-home.mg-is-browsing #mg-products {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
}
#common-home #mg-featured .row .product-thumb,
#product-category .product-thumb,
#product-search .product-thumb,
#product-special .product-thumb {
  /* when OpenCart wraps thumbs in col-* bootstrap, force 3-up via parent */
}
#product-category .product-list,
#product-search .product-list,
#product-special .product-list,
#common-home #mg-featured .product-list,
#content .product-list {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
}
#product-category .product-list > *,
#product-search .product-list > *,
#product-special .product-list > *,
#common-home #mg-featured .product-list > *,
#content .product-list > * {
  width: 100% !important;
  max-width: none !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
@media (max-width: 900px) {
  #mg-browse-main .mg-products,
  .mg-products,
  #common-home.mg-is-browsing #mg-products,
  #product-category .product-list,
  #product-search .product-list,
  #product-special .product-list,
  #common-home #mg-featured .product-list,
  #content .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}
@media (max-width: 520px) {
  #mg-browse-main .mg-products,
  .mg-products,
  #common-home.mg-is-browsing #mg-products,
  #product-category .product-list,
  #product-search .product-list,
  #product-special .product-list,
  #common-home #mg-featured .product-list,
  #content .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
}

/* ===== PROTO V6 banner text ===== */
/* First banner: keep black title, thinner weight like other slides */
.mg-hero-carousel .mg-hero:not(.mg-extra-hero) .mg-hero-copy,
.mg-hero-carousel .mg-hero:not(.mg-extra-hero) .mg-eyebrow,
.mg-hero-carousel .mg-hero:not(.mg-extra-hero) h1,
.mg-hero-carousel .mg-hero:not(.mg-extra-hero) p {
  color: #12243a !important;
  text-shadow: none !important;
}
.mg-hero-carousel .mg-hero:not(.mg-extra-hero) h1 {
  font-weight: 500 !important;
  letter-spacing: -0.04em !important;
}

/* Extra banners: black copy for readability on light art */
.mg-hero-carousel .mg-extra-hero .mg-hero-copy,
.mg-hero-carousel .mg-extra-hero .mg-eyebrow,
.mg-hero-carousel .mg-extra-hero h2,
.mg-hero-carousel .mg-extra-hero p {
  color: #12243a !important;
  text-shadow: none !important;
}
.mg-hero-carousel .mg-extra-hero h2 {
  color: #12243a !important;
  font-weight: 500 !important;
  letter-spacing: -0.04em !important;
}
.mg-hero-carousel .mg-extra-hero .mg-eyebrow {
  font-weight: 600 !important;
  opacity: 0.85;
}
/* soften bright white overlays that wash/force white text */
.mg-hero-carousel .mg-extra-hero::after {
  background: linear-gradient(90deg, rgba(245,248,252,0.72), rgba(245,248,252,0.18) 55%, transparent) !important;
}
.mg-hero-carousel .mg-hero:not(.mg-extra-hero)::after {
  background: linear-gradient(90deg, rgba(245,248,252,0.55), rgba(245,248,252,0.12) 55%, transparent) !important;
}
/* ===== PROTO V7 product page ===== */
#product-info .mg-product-back {
  display: inline-flex;
  margin: 8px 0 17px;
}
.mg-product-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.23fr) minmax(0, 1fr) minmax(250px, 0.8fr) !important;
  gap: 22px !important;
  align-items: start !important;
}
.mg-product-gallery {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  min-width: 0 !important;
}
.mg-product-gallery.has-thumbs {
  grid-template-columns: 50px minmax(0, 1fr) !important;
}
.mg-product-thumbs {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  max-height: 430px !important;
  overflow: auto !important;
  order: 0 !important;
}
.mg-product-thumbs button {
  display: block !important;
  flex: 0 0 auto !important;
  width: 49px !important;
  height: 49px !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid #d5d9de !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  cursor: pointer !important;
}
.mg-product-thumbs button.is-active,
.mg-product-thumbs button[aria-pressed="true"] {
  border: 2px solid #19569a !important;
}
.mg-product-thumbs img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
.mg-product-image-frame {
  min-width: 0;
  overflow: hidden;
  border-radius: 17px;
  align-self: start;
  background: #f5f8fa;
}
.mg-product-image-frame .mg-product-main {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: 0 !important;
  padding: 0 !important;
}
.mg-product-image-frame.trim-product-gutter .mg-product-main {
  width: 133.333333% !important;
  max-width: none !important;
  margin-inline: -16.666667% !important;
}
.mg-product-copy,
.mg-product-buy {
  padding: 19px !important;
  background: #f5f8fa !important;
  border: 1px solid #fff !important;
  border-radius: 18px !important;
}
.mg-product-copy h1 {
  margin: 0 0 16px !important;
  font-size: clamp(23px, 2.5vw, 35px) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.03em !important;
  font-weight: 650 !important;
  color: #12243a !important;
}
.mg-product-copy h2 {
  font-size: 19px !important;
  margin: 22px 0 10px !important;
  letter-spacing: 0 !important;
  font-weight: 650 !important;
  color: #12243a !important;
}
.mg-product-fields {
  margin: 0 !important;
}
.mg-product-fields > div {
  display: flex !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid #d5d9de !important;
}
.mg-product-fields dt {
  color: #465d76 !important;
  margin: 0 !important;
}
.mg-product-fields dd {
  margin: 0 !important;
  text-align: right !important;
  color: #12243a !important;
}
.mg-product-desc {
  color: #2b4764;
  line-height: 1.45;
  font-size: 15px;
}
.mg-product-desc img { max-width: 100%; height: auto; }
.mg-buy-price-line {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 7px !important;
  margin-bottom: 10px !important;
}
.mg-buy-price {
  font-size: 34px !important;
  font-weight: 700 !important;
  color: #12243a !important;
  line-height: 1.1 !important;
}
.mg-buy-price-old {
  text-decoration: line-through;
  color: #7a8da3;
  font-size: 16px;
}
.mg-favorite-toggle {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  border: 1px solid #d5d9de !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #19569a !important;
  font-size: 22px !important;
  line-height: 1 !important;
}
.mg-product-stock {
  color: #187445 !important;
  font-size: 14px !important;
  margin: 0 0 10px !important;
}
.mg-buy-cart,
.mg-product-buy .mg-btn.primary {
  width: 100% !important;
  margin-top: 8px !important;
  min-height: 48px !important;
}
.mg-product-links {
  display: grid !important;
  gap: 12px !important;
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid #d5d9de !important;
}
.mg-product-links a { color: #19569a !important; }
/* hide duplicate description tab content visually? keep tabs for attrs/reviews */
#product-info #tab-description { display: none !important; }
#product-info .nav-tabs .nav-link[href="#tab-description"] { display: none !important; }

@media (max-width: 950px) {
  .mg-product-layout {
    grid-template-columns: 1fr 1fr !important;
  }
  .mg-product-gallery {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }
  .mg-product-buy { grid-column: 2 !important; }
}
@media (max-width: 650px) {
  .mg-product-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  .mg-product-layout > * { width: 100% !important; }
  .mg-product-gallery.has-thumbs {
    grid-template-columns: 1fr !important;
  }
  .mg-product-thumbs {
    flex-direction: row !important;
    order: 2 !important;
    max-height: none !important;
  }
  .mg-product-image-frame { order: 1 !important; }
  .mg-product-copy,
  .mg-product-buy { padding: 15px !important; }
}


/* ===== PROTO V9 store nav ===== */
/* Desktop top nav */
.mg-store-nav{
  display:none;
  align-items:center;
  gap:2px 12px;
  flex-wrap:nowrap;
  font-size:14px;
  order: 1;
  width:100%;
  padding:0 0 8px;
}
.mg-store-nav > a,
.mg-store-nav summary{
  color:#f4f8fc !important;
  text-decoration:none;
  padding:8px 6px;
  border-radius:8px;
  cursor:pointer;
  list-style:none;
  white-space:nowrap;
}
.mg-store-nav summary::-webkit-details-marker{display:none}
.mg-store-nav > a:hover,
.mg-store-nav summary:hover{ background:#ffffff18; }
.mg-nav-buyers{ position:relative; }
.mg-nav-buyers-panel{
  position:absolute; top:100%; left:0; z-index:80;
  min-width:210px; padding:8px;
  background:#12243a; border:1px solid #ffffff26; border-radius:12px;
  display:grid; gap:4px;
}
.mg-nav-buyers-panel a{
  color:#f4f8fc !important; text-decoration:none; padding:8px 10px; border-radius:8px;
}
.mg-nav-buyers-panel a:hover{ background:#ffffff18; }

/* Drawer MUST be off-canvas unless opened */
#mg-drawer.mg-drawer,
.mg-drawer{
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(320px, 88vw) !important;
  max-width: 320px !important;
  z-index: 120 !important;
  background: #f5f8fa !important;
  box-shadow: -12px 0 30px #12243a33 !important;
  transform: translateX(105%) !important;
  transition: transform .25s ease !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  padding: 72px 16px 24px !important;
  overflow: auto !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
html.mg-drawer-open #mg-drawer.mg-drawer,
html.mg-drawer-open .mg-drawer,
.mg-drawer.is-open,
#mg-drawer.is-open{
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
#mg-drawer-backdrop.mg-drawer-backdrop,
.mg-drawer-backdrop{
  position: fixed !important;
  inset: 0 !important;
  z-index: 110 !important;
  background: #12243a66 !important;
  display: none !important;
}
html.mg-drawer-open #mg-drawer-backdrop,
html.mg-drawer-open .mg-drawer-backdrop,
#mg-drawer-backdrop:not([hidden]){
  display: block !important;
}
.mg-drawer a,
.mg-drawer summary{
  color:#12243a !important;
  text-decoration:none;
  padding:12px 10px;
  border-radius:10px;
  font-weight:650;
  font-size:16px;
  list-style:none;
}
.mg-drawer summary::-webkit-details-marker{display:none}
.mg-drawer a:hover,
.mg-drawer summary:hover{ background:#e2eeff; }
.mg-drawer details > div{ display:grid; gap:2px; padding-left:10px; }
.mg-drawer details > div a{ font-weight:500; font-size:15px; }

/* Desktop header row: brand | search | actions ; nav full width under */
@media (min-width:901px){
  .mg-store-nav{ display:flex !important; }
  .mg-burger{ display:none !important; }
  header .mg-head,
  .mg-head{
    display:grid !important;
    grid-template-columns: auto minmax(180px,1fr) auto !important;
    grid-template-areas:
      "brand search actions"
      "nav nav nav" !important;
    gap: 10px 16px !important;
    align-items: center !important;
  }
  .mg-head > .mg-brand{ grid-area: brand !important; order: unset !important; }
  .mg-head > .mg-search-slot{ grid-area: search !important; order: unset !important; width:100% !important; }
  .mg-head > .mg-head-actions{ grid-area: actions !important; order: unset !important; display:flex !important; }
  .mg-head > .mg-store-nav{ grid-area: nav !important; width:100% !important; padding:0 !important; }
  .mg-head > .mg-drawer,
  .mg-head > .mg-drawer-backdrop,
  .mg-head > .mg-burger{ /* keep out of flow */ }
}

/* Mobile: hide desktop nav; keep drawer off-canvas */
@media (max-width:900px){
  .mg-store-nav{ display:none !important; }
}

/* ===== HEADER EMERGENCY FIX ===== */
/* Drawer never participates in header flex/grid flow */
header .mg-drawer,
#mg-drawer {
  display: flex !important;
  flex-direction: column !important;
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: min(320px, 88vw) !important;
  margin: 0 !important;
  transform: translateX(110%) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 1 !important;
  z-index: 10050 !important;
  background: #f5f8fa !important;
  color: #12243a !important;
}
html.mg-drawer-open header .mg-drawer,
html.mg-drawer-open #mg-drawer,
header .mg-drawer.is-open,
#mg-drawer.is-open {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
header .mg-drawer-backdrop,
#mg-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10040 !important;
  background: rgba(18,36,58,.45) !important;
}
header .mg-drawer-backdrop[hidden],
#mg-drawer-backdrop[hidden] {
  display: none !important;
}
@media (min-width: 901px) {
  header .mg-burger,
  #mg-burger { display: none !important; }
  header .mg-store-nav,
  #mg-store-nav {
    display: flex !important;
    grid-area: nav !important;
  }
  header .mg-head,
  .mg-head {
    display: grid !important;
    grid-template-columns: auto minmax(220px, 1fr) auto !important;
    grid-template-areas:
      "brand search actions"
      "nav nav nav" !important;
    align-items: center !important;
    column-gap: 16px !important;
    row-gap: 8px !important;
  }
  header .mg-brand { grid-area: brand !important; }
  header .mg-search-slot { grid-area: search !important; width: 100% !important; min-width: 0 !important; }
  header .mg-head-actions { grid-area: actions !important; display: flex !important; }
}
@media (max-width: 900px) {
  header .mg-store-nav,
  #mg-store-nav { display: none !important; }
}


/* HARD CLOSE DRAWER DESKTOP+MOBILE */
/* Drawer must never participate in header flex/grid flow */
header .mg-drawer,
#mg-drawer.mg-drawer,
.mg-drawer {
  position: fixed !important;
  display: flex !important;
  flex-direction: column !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: min(320px, 88vw) !important;
  max-width: 320px !important;
  height: 100dvh !important;
  transform: translateX(110%) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  z-index: 10050 !important;
  background: #f5f8fa !important;
  color: #12243a !important;
  box-shadow: -12px 0 30px rgba(18,36,58,.25) !important;
  overflow: auto !important;
  padding: 18px 16px 24px !important;
  gap: 4px !important;
}
html.mg-drawer-open header .mg-drawer,
html.mg-drawer-open #mg-drawer.mg-drawer,
header .mg-drawer.is-open,
#mg-drawer.mg-drawer.is-open {
  transform: translateX(0) !important;
  visibility: visible !important;
  pointer-events: auto !important;
}
@media (min-width: 901px) {
  /* Desktop: only the white horizontal store-nav; drawer stays off-canvas */
  header .mg-store-nav a,
  #mg-store-nav a {
    color: #f5f9ff !important;
  }
}

/* Compact actions in the account wishlist. */
.mg-wishlist-actions .mg-wishlist-icons { display:inline-flex; align-items:center; gap:6px; }
.mg-wishlist-actions .mg-wishlist-icons .mg-wishlist-icon {
  display:inline-grid; place-items:center; width:36px; height:36px; min-width:36px;
  min-height:36px; padding:0; margin:0; border-radius:9px; font-size:14px; line-height:1;
}
.mg-wishlist-actions .mg-wishlist-icon.mg-wishlist-remove { color:#a12832; background:#fff2f3; border:1px solid #edc8cb; }
.mg-wishlist-actions .mg-wishlist-icon.mg-wishlist-remove:hover { background:#fbe0e3; color:#811c25; }
@media(max-width:480px) {
  .mg-wishlist-actions .mg-wishlist-icons .mg-wishlist-icon { width:34px; height:34px; min-width:34px; min-height:34px; }
}

/* Shop2 card icon sizing */
.photo-card .mg-card-wish .favorite-toggle,
.photo-card .mg-cart-icon-btn { container-type:inline-size; }
.photo-card .mg-card-wish .favorite-toggle > i,
.photo-card .mg-cart-icon-btn > i { font-size:80cqi; line-height:1; }

/* Closed drawer must not extend document width. */
html:not(.mg-drawer-open) #mg-drawer.mg-drawer {
  transform:none!important;
  visibility:hidden;
  pointer-events:none;
}


/* Phone: leave the product photo visible above the caption. */
@media (max-width: 520px) {
  #mg-browse-main .mg-products,
  .mg-products,
  #common-home.mg-is-browsing #mg-products,
  #product-category .product-list,
  #product-search .product-list,
  #product-special .product-list,
  #common-home #mg-featured .product-list,
  #content .product-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
}
@media (max-width: 900px) {
  .photo-card .card-caption,
  .product-thumb > .content {
    padding: 7px 9px !important;
  }
  .photo-card .card-caption .name,
  .product-thumb > .content h4 a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 14px !important;
    line-height: 1.25 !important;
    margin: 0 0 4px !important;
  }
  .photo-card .price-line {
    justify-content: space-between;
    min-width: 0;
  }
  .photo-card .price,
  .photo-card .price-new,
  .photo-card .price-old,
  .product-thumb .price {
    white-space: nowrap;
  }
}

.mg-drawer-viewport { display: none; }
@media (max-width: 900px) {
  .mg-drawer-viewport {
    display: block;
    position: absolute;
    inset: 100% 0 auto;
    overflow: hidden;
    pointer-events: none;
    z-index: 3;
  }
  html #mg-drawer-backdrop.mg-drawer-backdrop {
    position: absolute !important;
    inset: 100% 0 auto !important;
    height: calc(100dvh - var(--mg-header-h)) !important;
    z-index: 2 !important;
  }
  html #mg-drawer.mg-drawer,
  html:not(.mg-drawer-open) #mg-drawer.mg-drawer {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: calc(100dvh - var(--mg-header-h)) !important;
    border-radius: 0 0 18px 18px !important;
    transform: translateX(100%) !important;
    visibility: hidden !important;
    transition: transform .6s cubic-bezier(.25,.75,.25,1), visibility 0s .6s !important;
  }
  html.mg-drawer-open #mg-drawer.mg-drawer {
    transform: translateX(0) !important;
    visibility: visible !important;
    transition: transform .6s cubic-bezier(.25,.75,.25,1) !important;
  }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
  html #mg-drawer.mg-drawer,
  html:not(.mg-drawer-open) #mg-drawer.mg-drawer,
  html.mg-drawer-open #mg-drawer.mg-drawer { transition: none !important; }
}

#cart.mg-cart-wrap > .dropdown > .mg-cart-btn {
  position: relative;
  display: inline-grid !important;
  place-items: center;
  width: var(--mg-mobile-action, 44px) !important;
  height: var(--mg-mobile-action, 44px) !important;
  min-width: var(--mg-mobile-action, 44px) !important;
  min-height: var(--mg-mobile-action, 44px) !important;
  padding: 0 !important;
  overflow: visible;
}
#cart.mg-cart-wrap .mg-cart-btn > i {
  font-size: 25px !important;
  line-height: 1;
}
#cart.mg-cart-wrap .mg-cart-btn::after { display: none; }
#cart.mg-cart-wrap .mg-cart-btn > .mg-cart-count {
  position: absolute;
  top: -1px;
  right: -1px;
  transform: translate(35%, -27%);
  width: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #ff7400 !important;
  color: #fff !important;
  z-index: 1;
  pointer-events: none;
}

@media (min-width: 901px) {
  #container > header .mg-head { padding-top: 10px !important; }
}

@media (max-width: 760px) {
  #common-home #mg-directions #mg-groups.mg-rail {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: min(66.666vw, 100%) !important;
    width: 100% !important;
    min-width: 0;
    max-width: 100%;
    gap: 12px !important;
    overflow: auto hidden !important;
    scroll-snap-type: x mandatory;
    padding: 2px 2px 10px !important;
  }
  #common-home #mg-directions #mg-groups .mg-group {
    display: flex !important;
    align-items: flex-end;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 1;
    padding: 0 !important;
    scroll-snap-align: start;
  }
  #common-home #mg-directions #mg-groups .mg-group-media {
    inset: 0 0 26% !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
  }
  #common-home #mg-directions #mg-groups .mg-group-art {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center top !important;
  }
  #common-home #mg-directions #mg-groups .mg-group-copy {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    text-align: left;
  }
}

#common-home.mg-is-browsing #mg-category-panel #mg-subnav.mg-subnav {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-flow: row !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  min-width: 0;
  width: 100%;
  padding: 0 !important;
}
#mg-category-panel #mg-subnav details,
#mg-category-panel #mg-subnav .mg-branch-children {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#mg-category-panel #mg-subnav .mg-cat-chip,
#mg-category-panel #mg-subnav details > summary {
  white-space: normal;
  overflow-wrap: anywhere;
}
#mg-category-panel #mg-subnav .mg-branch-children {
  grid-template-columns: minmax(0, 1fr);
}

.mg-wishlist-layout { display:grid; grid-template-columns:minmax(150px, 210px) minmax(0, 1fr); gap:16px; align-items:start; }
.mg-wishlist-layout.mg-wishlist-no-categories { grid-template-columns:minmax(0, 1fr); }
.mg-wishlist-card { min-width:0; }
.mg-wishlist-card[hidden] { display:none !important; }
.mg-wishlist-categories { padding:12px; border-radius:14px; background:#f5f8fad9; }
.mg-wishlist-categories h2 { font-size:17px; margin:0 0 8px; }
.mg-wishlist-categories button { display:block; width:100%; padding:9px; border:0; border-radius:8px; background:transparent; text-align:left; color:#252a31; overflow-wrap:anywhere; }
.mg-wishlist-categories button[aria-pressed="true"] { background:var(--mg-selection-bg); font-weight:700; }
.mg-wishlist-heart { display:grid; place-items:center; width:44px; height:44px; border-radius:10px; background:#f5f8fad9; color:#bd243b; font-size:24px; text-decoration:none; }
.mg-wishlist-heart:hover { background:#fff; color:#9f1830; }
@media (min-width:901px) {
  #wishlist .mg-products { grid-template-columns:repeat(3,minmax(0,1fr)) !important; }
}
@media (max-width:900px) {
  .mg-wishlist-layout { grid-template-columns:minmax(0,1fr); }
  .mg-wishlist-categories { display:none; }
  #wishlist .mg-products { grid-template-columns:minmax(0,1fr) !important; }
}

#common-home #mg-directions #mg-groups .mg-group {
  background: linear-gradient(118deg, #e9f4ff 12%, #cfe5f5 66%, #add2e7) !important;
}
#common-home #mg-directions #mg-groups .mg-group::before {
  background: linear-gradient(to top, #12243a 0%, #12243ad9 19%, #12243a62 48%, #12243a00 77%) !important;
}
#common-home #mg-directions #mg-groups .mg-group-media {
  inset: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}
#common-home #mg-directions #mg-groups .mg-group-art {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  object-position: center !important;
}
#common-home #mg-directions #mg-groups .mg-group .mg-group-art {
  object-fit: cover !important;
}
#common-home #mg-directions #mg-groups .mg-group-copy {
  text-shadow: 0 1px 4px #12243a;
  inset-inline: 0 !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
  align-items: flex-start !important;
  text-align: left !important;
  margin-inline: 0 !important;
  padding-inline: 8px !important;
}

#common-home #mg-directions #mg-groups .mg-group {
  padding-inline: 0 !important;
}
#common-home #mg-directions #mg-groups .mg-group-copy :is(strong, small) {
  margin-inline: 0 !important;
  text-align: left !important;
}

@media (max-width: 650px) {
  #mg-hero-carousel > .mg-hero { align-items: flex-start !important; }
  #mg-hero-carousel .mg-hero-art {
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  #mg-hero-carousel .mg-hero-copy { padding-top: 14px !important; }
  #mg-hero-carousel .mg-hero-copy :is(h1,h2) {
    font-size: clamp(29px, 8vw, 38px) !important;
    line-height: 1 !important;
    margin: 7px 0 10px !important;
  }
}

@media (max-width: 650px) {
  #mg-hero-carousel .mg-hero-copy {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  #mg-hero-carousel .mg-hero-copy > p { margin-top: auto !important; }
  #mg-hero-carousel > .mg-hero::after {
    background: linear-gradient(90deg, rgb(237 247 255 / 91%) 0%, rgb(237 247 255 / 77%) 34%, rgb(237 247 255 / 36%) 68%, transparent 100%) !important;
  }
}

@media (min-width: 901px) {
  .mg-products.mg-product-recommendations {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }
}

/* Shared registration and contact form styles */
.mg-auth-card { max-width: 32rem; margin-inline: auto; padding: clamp(1rem, 5vw, 2.25rem); border: 1px solid var(--line); border-radius: 1.75rem; background: var(--wash); color: var(--ink); box-shadow: 0 1rem 3rem rgb(20 39 60 / 14%); }
.mg-auth-card .form-control, .mg-auth-card .form-select { min-height: 2.85rem; border-radius: .8rem; background-color: var(--glass); border-color: var(--line); }
.mg-auth-card .mg-auth-submit { width: 100%; margin-top: .65rem; border-radius: 2rem; min-height: 2.85rem; }

/* Product details: let imported content wrap within the available width. */
@media (max-width: 950px) {
  #product-info #content,
  #product-info .mg-product-layout > * {
    min-width: 0;
  }
  #product-info .breadcrumb > li.breadcrumb-item {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #product-info .breadcrumb > li.breadcrumb-item::after {
    display: none;
  }
  #product-info .mg-product-copy,
  #product-info .mg-product-buy {
    overflow-wrap: anywhere;
  }
  #product-info .mg-product-desc :is(img, iframe, video, svg) {
    max-width: 100% !important;
  }
  #product-info .mg-product-desc :is(table, pre) {
    display: block;
    max-width: 100% !important;
    overflow-x: auto;
  }
  #product-info .mg-product-desc [style] {
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* Category cards on the storefront homepage. */
#common-home:not(.mg-is-browsing) #mg-directions {
  display: grid;
  grid-template-columns: minmax(210px, 24%) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 28px);
  align-items: start;
}
#common-home:not(.mg-is-browsing) #mg-catalog-sticky,
#common-home:not(.mg-is-browsing) #mg-featured {
  min-width: 0;
  margin-top: 0;
}
@media (width > 760px) {
  #common-home:not(.mg-is-browsing) #mg-directions #mg-groups.mg-rail {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    grid-auto-columns: auto !important;
    gap: 10px !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  #common-home:not(.mg-is-browsing) #mg-directions #mg-groups .mg-group {
    width: 100% !important;
    min-height: 134px !important;
    aspect-ratio: auto;
  }
}
@media (max-width: 760px) {
  #common-home:not(.mg-is-browsing) #mg-directions {
    grid-template-columns: minmax(0, 1fr);
  }
}

#common-home #mg-featured > .row {
  display: flex !important;
  margin-inline: 0;
}
#common-home #mg-featured > .row > #content {
  flex: 1 1 0 !important;
  min-width: 0;
  padding-inline: 0;
}
#common-home #mg-featured #content > .row-cols-xl-4 {
  --featured-gap: clamp(12px, 1.6vw, 24px);
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, max(240px, (100% - 2 * var(--featured-gap)) / 3)), 1fr)) !important;
  gap: var(--featured-gap) !important;
  margin-inline: 0;
}
#common-home #mg-featured #content > .row-cols-xl-4 > .col {
  width: auto !important;
  min-width: 0;
  padding-inline: 0;
  margin-bottom: 0 !important;
}

@media (max-width: 760px) {
  #common-home #mg-directions #mg-groups.mg-rail {
    grid-auto-columns: min(66.666vw, 300px, 100%) !important;
  }
  #common-home #mg-directions #mg-groups .mg-group {
    min-height: clamp(146px, 28vw, 164px) !important;
    aspect-ratio: auto;
  }
  #common-home #mg-directions #mg-groups .mg-group-copy strong {
    font-size: 17px !important;
    line-height: 1.15;
  }
  #common-home #mg-directions #mg-groups .mg-group-copy small {
    font-size: 14px !important;
    line-height: 1.2;
  }
}

.mg-products-pager[hidden] { display: none !important; }
.mg-products-pager-top { margin-bottom: 12px; }

@media (width > 760px) {
  #common-home #mg-catalog-layout > .mg-category-sidebar {
    --category-offset: calc(var(--mg-header-h, 78px) + 12px);
    position: sticky;
    top: var(--category-offset);
    max-height: calc(100dvh - var(--category-offset) - 12px);
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.mg-category-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line, #d5d9de);
}
.mg-category-group > h3 {
  margin: 0;
  padding: 4px 8px;
  font-size: 15px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

#cart .mg-mini-cart.show {
  display: flex;
  flex-direction: column;
  width: min(600px, calc(100vw - 24px));
  min-width: 0;
  max-height: calc(100dvh - var(--mg-header-h, 112px) - 12px);
}
#cart .mg-mini-cart-items {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 10px;
}
#cart .mg-mini-cart-items .img-thumbnail {
  display: block;
  width: 56px;
  min-width: 0;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}
#cart .mg-mini-cart-items td:nth-last-child(2) { white-space: nowrap; }
#cart .mg-mini-cart-toolbar {
  flex: none;
  display: grid;
  gap: 9px;
  padding: 4px 4px 10px;
}
#cart .mg-mini-cart-actions {
  display: grid;
}
#cart .mg-mini-cart-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px;
  border-radius: 12px;
  font-size: clamp(12px, 3.5vw, 14px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}
#cart .mg-mini-cart-actions .btn-light { border-color: #b5cadd; background: #fff; color: #19569a; }
#cart .mg-mini-cart-actions .btn-light:hover { background: #e1eefb; }

@media (max-width: 480px) {
  #cart .mg-mini-cart-items td { padding: 5px; }
  #cart .mg-mini-cart-items .img-thumbnail { width: 38px; }
  #cart .mg-mini-cart-items button { padding: 5px 8px; }
}

#cart .mg-mini-cart-items { overflow-x: hidden; }
#cart .mg-mini-cart-items .table { width: 100%; table-layout: fixed; }
#cart .mg-mini-cart-items td { min-width: 0; overflow-wrap: anywhere; }
#cart .mg-mini-cart-items td:first-child { width: 72px !important; }
#cart .mg-mini-cart-items td:nth-child(3) { width: 54px; }
#cart .mg-mini-cart-items td:nth-child(4) { width: 102px; }
#cart .mg-mini-cart-items td:nth-child(5) { width: 62px; }
@media (max-width: 480px) {
  #cart .mg-mini-cart-items tr {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1.5fr) auto;
    align-items: center;
    border-bottom: 1px solid #d5e2ee;
  }
  #cart .mg-mini-cart-items td:nth-child(n) { width: auto !important; border: 0; }
  #cart .mg-mini-cart-items td:first-child { grid-row: 1 / span 2; align-self: stretch; }
  #cart .mg-mini-cart-items td:nth-child(2) { grid-column: 2 / -1; }
  #cart .mg-mini-cart-items td:nth-child(3) { text-align: left !important; }
  #cart .mg-mini-cart-items td:nth-child(4) { white-space: normal; }
}

/* Two transparent storefront brand assets. */
.mg-brand,
.mg-footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.mg-brand-mascot,
.mg-brand-lettering {
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}
.mg-brand-mascot { width: 75px; height: 70px; }
.mg-brand-lettering { width: 132px; height: 50px; }

@media (min-width: 901px) {
  header .mg-head {
    grid-template-areas: "brand search actions" "brand nav nav" !important;
  }
  .mg-head > .mg-brand {
    height: auto !important;
  }
  .mg-head > .mg-store-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .mg-brand .mg-brand-mascot { width: 42px; height: 39px; }
  .mg-brand .mg-brand-lettering { width: 90px; height: 34px; }
}

/* Align the mascot to the top and bottom insets of the header grid. */
header .mg-head > .mg-brand {
  position: relative;
  align-self: stretch !important;
  height: auto !important;
  padding-left: 84px;
}
header .mg-brand .mg-brand-mascot {
  position: absolute;
  inset: 10px auto 10px 0;
  width: 76px;
  height: calc(100% - 20px);
  object-fit: contain;
}
header .mg-brand .mg-brand-lettering {
  position: relative;
  z-index: 1;
  transform: translateX(-60px) rotate(-20deg) scale(1.21);
}
@media (max-width: 900px) {
  header .mg-head > .mg-brand { padding-left: 46px; }
  header .mg-brand .mg-brand-mascot { width: 42px; }
}
@media (min-width: 901px) {
  header .mg-head > .mg-brand { padding-left: 104px; }
  header .mg-brand .mg-brand-mascot { width: 96px; }
}

header .mg-brand .mg-brand-mascot-clip {
  position: absolute;
  inset: 0 auto 0 0;
  width: 122px;
  overflow: hidden;
}
header .mg-brand .mg-brand-mascot {
  object-position: center top;
  transform: scale(1.2);
  transform-origin: left top;
}
@media (min-width: 901px) {
  header .mg-head > .mg-brand { padding-left: 137px; }
  header .mg-brand .mg-brand-mascot { width: 114px; }
}

@media (max-width: 900px) {
  header .mg-head > .mg-brand { padding-left: 54px; }
  header .mg-brand .mg-brand-mascot-clip { width: 54px; }
}

header .mg-brand .mg-brand-mascot-clip {
  overflow: visible;
  clip-path: inset(0 -14px 0 -14px);
  pointer-events: none;
}
header .mg-brand .mg-brand-mascot {
  inset: auto auto 0 50%;
  height: calc(100% - 10px);
  width: auto;
  max-width: none;
  transform: translateX(-50%) scale(1.18);
  transform-origin: center bottom;
}

footer.mg-footer .mg-footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
footer.mg-footer .mg-brand-mascot {
  width: auto;
  height: 112px;
}
@media (min-width: 992px) {
  footer.mg-footer .mg-footer-identity {
    align-self: stretch;
    position: relative;
  }
  footer.mg-footer .mg-footer-brand {
    position: absolute;
    inset: -28px 0 -28px;
    padding-inline: calc(var(--bs-gutter-x) / 2);
  }
  footer.mg-footer .mg-brand-mascot {
    height: 100%;
    width: 55%;
    object-fit: contain;
    object-position: left bottom;
  }
  footer.mg-footer .mg-brand-lettering {
    width: min(42%, 132px);
    height: auto;
  }
}

@media (min-width: 901px) {
  /* The wordmark is translated left by 60px. Reclaim most of its empty layout space. */
  header .mg-head > .mg-brand {
    margin-inline-end: -50px !important;
  }
}

footer.mg-footer .mg-footer-brand {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
}
footer.mg-footer .mg-footer-brand .mg-brand-lettering {
  order: -1;
  width: 132px;
  max-width: 85%;
  height: auto;
}
@media (min-width: 992px) {
  footer.mg-footer .mg-footer-brand {
    inset-inline-end: auto;
    width: min(245px, 100%);
    padding-top: 8px;
  }
  footer.mg-footer .mg-footer-brand .mg-brand-mascot {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 0;
    object-position: center bottom;
  }
}

@media (max-width: 900px) {
  header .mg-head > .mg-brand {
    width: 54px;
    min-height: 40px;
  }
  header .mg-brand .mg-brand-lettering {
    display: none;
  }
  footer.mg-footer .mg-footer-brand {
    flex-direction: row;
    gap: 10px;
  }
  footer.mg-footer .mg-footer-brand .mg-brand-lettering {
    order: 0;
    width: clamp(82px, 30vw, 132px);
    max-width: none;
  }
  footer.mg-footer .mg-footer-brand .mg-brand-mascot {
    height: clamp(76px, 24vw, 112px);
  }
}

header .mg-head > .mg-brand {
  width: auto;
  padding-left: 0;
  margin-inline-end: 0 !important;
}
.mg-header-wordmark {
  display: block;
  width: clamp(134.4px, 16.8vw, 216px);
  aspect-ratio: 500 / 191;
  transform: rotate(3deg);
  transform-origin: right center;
  filter: drop-shadow(0 1px 1px #fff);
}
.mg-header-wordmark::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: #ff7400;
  -webkit-mask: url("../../../image/catalog/modeluga/brand-lettering.png") center / contain no-repeat;
  mask: url("../../../image/catalog/modeluga/brand-lettering.png") center / contain no-repeat;
}


#container > header #mg-store-nav a:is(:hover, :focus-visible),
#container > header #mg-store-nav summary:is(:hover, :focus-visible) {
  color: #ff7400 !important;
}

/* Orange actions on the storefront. */
#container .btn-primary,
#container #cart .mg-mini-cart-actions .btn-primary,
#container .mg-btn.primary,
#container .mg-buy-cart,
#container .product-thumb .button button[formaction*="cart"],
#container .mg-product-card .button button[formaction*="cart"],
#account-wishlist .btn-primary.mg-action-btn {
  background: #ff7400 !important;
  border-color: #ff7400 !important;
  color: #fff !important;
  box-shadow: 0 3px 7px rgb(0 0 0 / 38%) !important;
}

#container .btn-primary:is(:hover, :focus-visible):not(:disabled),
#container #cart .mg-mini-cart-actions .btn-primary:is(:hover, :focus-visible),
#container .mg-btn.primary:is(:hover, :focus-visible):not(:disabled),
#container .mg-buy-cart:is(:hover, :focus-visible):not(:disabled),
#container .product-thumb .button button[formaction*="cart"]:is(:hover, :focus-visible):not(:disabled),
#container .mg-product-card .button button[formaction*="cart"]:is(:hover, :focus-visible):not(:disabled),
#account-wishlist .btn-primary.mg-action-btn:is(:hover, :focus-visible):not(:disabled) {
  background: #ff8b26 !important;
  border-color: #ff8b26 !important;
  color: #fff !important;
}


/* Match the depth of the orange buttons across storefront tiles. */
#container .mg-group,
#container .product-thumb,
#container .mg-product-card,
#container .mg-wishlist-card,
#product-info .mg-product-image-frame,
#product-info .mg-product-thumbs button,
#product-info .mg-product-copy,
#product-info .mg-product-buy,
#product-info .mg-product-visual .mg-product-description,
#container .mg-hero-carousel > .mg-hero {
  box-shadow: 0 3px 7px rgb(0 0 0 / 38%) !important;
}
@media (max-width: 900px) {
  #common-home #mg-directions #mg-groups {
    padding-bottom: 11px !important;
  }
}

footer.mg-footer .mg-footer-brand .mg-brand-mascot {
  filter: drop-shadow(0 0 6px rgb(255 116 0 / 75%));
}

footer.mg-footer .mg-footer-brand {
  flex-direction: column;
  gap: 8px;
}
footer.mg-footer .mg-footer-rights {
  flex: 0 0 auto;
  color: #e4e9ef;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-align: center;
}
@media (min-width: 992px) {
  footer.mg-footer .mg-footer-brand {
    padding-bottom: 8px;
  }
}

/* Shared table highlights across the storefront. */
#container table > :is(thead, tfoot) {
  background-color: var(--mg-selection-bg);
}
#container table > :is(thead, tfoot) > tr > :is(th, td) {
  --bs-table-bg: transparent;
}
#container .table-hover > tbody > tr:hover > * {
  --bs-table-bg-state: initial;
  --bs-table-color-state: initial;
}

#container .mg-checkout-items,
#container .mg-delivery-destination,
#container .mg-delivery-card,
#container .mg-checkout-option {
  box-shadow: 0 3px 7px rgb(0 0 0 / 38%) !important;
}

#container .btn-danger {
  box-shadow: 0 3px 7px rgb(0 0 0 / 38%) !important;
}

#container .mg-address-map,
#container .mg-address-map-canvas,
#container .mg-address-back {
  box-shadow: 0 3px 7px rgb(0 0 0 / 38%) !important;
}
#container :is(input.form-control, textarea.form-control, select.form-select),
#container form :is(textarea, select, input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="submit"], [type="reset"], [type="button"], [type="image"])) {
  box-shadow: 0 2px 5px rgb(0 0 0 / 24%) !important;
}

#container #account-address .btn-primary.mg-new-address-btn {
  color: #fff !important;
}

.mg-hero-dots { display: flex; justify-content: center; flex-wrap: wrap; margin: -12px 0 12px; }
.mg-hero-dots[hidden], #common-home.mg-is-browsing .mg-hero-dots { display: none; }
.mg-hero-dots button { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.mg-hero-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #667080; }
.mg-hero-dots button[aria-current="true"]::before { background: #ff7400; width: 12px; height: 12px; }
.mg-hero-dots button:focus-visible { outline: 2px solid #c45100; outline-offset: -3px; border-radius: 50%; }

@font-face {
  font-family: "Modeluga Heart Outline";
  src: url("fonts/fontawesome/webfonts/fa-regular-400.woff2") format("woff2");
  font-display: swap;
}
button[formaction*="account/wishlist.add"],
.mg-wishlist-heart {
  background: transparent !important;
  border: 1px solid #fff !important;
  color: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 5px #0005 !important;
  text-shadow: 0 1px 3px #000a;
}
button[formaction*="account/wishlist.add"]:not(.is-in-wishlist) > .fa-heart {
  color: inherit !important;
  font-family: "Modeluga Heart Outline";
  font-weight: 400;
}
button[formaction*="account/wishlist.add"].is-in-wishlist,
button[formaction*="account/wishlist.add"].is-in-wishlist > .fa-heart,
.mg-wishlist-heart,
.mg-wishlist-heart:hover {
  color: #ff7800 !important;
}

.mg-products-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 12px; }
.mg-products-toolbar .mg-products-pager-top { grid-column: 2; margin: 0; }
.mg-products-options { grid-column: 3; justify-self: end; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mg-products-options .form-select { width: auto; min-height: 42px; }
@media (max-width: 1100px) {
  .mg-products-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; }
  .mg-products-options { margin-left: auto; }
}

.mg-products-filters { position: relative; }
.mg-products-filters summary { display: flex; align-items: center; min-height: 42px; list-style: none; }
.mg-products-filters summary::-webkit-details-marker { display: none; }
.mg-products-filter-fields { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); width: min(260px, 85vw); padding: 12px; display: grid; gap: 10px; background: #fff; border: 1px solid #d5d9de; border-radius: 12px; box-shadow: 0 6px 20px #12243a26; }
.mg-products-filter-fields .form-select { width: 100%; margin-top: 4px; }

.mg-products-filters .mg-products-icon { box-sizing: border-box; justify-content: center; width: 44px; height: 44px; padding: 0; font-size: 18px; cursor: pointer; }

.photo-card .card-photo,
.product-thumb > .image > a {
  touch-action: pan-y pinch-zoom;
}

.mg-product-visual, .mg-product-thumbs-slot { min-width: 0; }
.mg-product-thumbs-slot { position: relative; }
.mg-description-more[hidden] { display: none !important; }
@media (min-width: 651px) {
  .mg-product-gallery.has-thumbs { grid-template-columns: 86px minmax(0, 1fr) !important; }
  .mg-product-thumbs-slot > .mg-product-thumbs {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-gutter: stable;
    padding: 4px 7px 8px;
  }
  .mg-product-visual .mg-product-thumbs button { width: 54px !important; height: 54px !important; }
  .mg-product-visual .mg-product-description { margin-top: 16px; padding: 19px; border-radius: 18px; background: #f5f8fa; }
}
@media (min-width: 651px) and (max-width: 950px) {
  .mg-product-visual { grid-column: 1; grid-row: 1 / span 2; }
}
@media (max-width: 650px) {
  .mg-product-thumbs-slot { order: 2; }
  .mg-product-desc.is-collapsed { max-height: 6lh; overflow: hidden; }
  .mg-description-more { margin-top: 4px; min-width: 44px; min-height: 44px; }
}
