/*
 * Category menu by type of business (layouts/header/mc-category-menu.blade.php): the prototype's
 * mega-menu.css from the approved product page handoff, then the fitting for the Velocity green bar.
 */
.category-menu.full-category-menu {
  position: static;
  margin: 0;
  padding: 0;
  border: 0;
  flex-shrink: 0;
  font-family: var(--font-ui);
}

.full-category-menu > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  list-style: none;
  font-weight: 600;
  white-space: nowrap;
}

.full-category-menu > summary::-webkit-details-marker { display: none; }
.full-menu-chevron { margin-left: auto; }
.full-category-menu[open] .full-menu-chevron { transform: rotate(180deg); }

.shop-personalization {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 8px 14px;
  color: #163a23;
  font: 700 1rem/1.4 var(--font-ui);
  white-space: nowrap;
}

.shop-personalization:hover { text-decoration: underline; }
.full-menu-panel {
  position: absolute;
  z-index: 40;
  top: 100%;
  left: 5vw;
  right: 5vw;
  display: flex;
  flex-direction: column;
  max-height: min(74dvh, var(--full-menu-available, 74dvh));
  overflow: hidden;
  border: 1px solid #d8e2d3;
  border-radius: 0 0 14px 14px;
  background: #fff;
  color: #25352b;
  box-shadow: 0 18px 38px #203d2424;
}

.full-category-menu:not([open]) .full-menu-panel { display: none; }
.full-menu-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-bottom: 1px solid #e3eae0;
  background: #fbfcfa;
}

.menu-group-buttons {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.menu-group-button, .full-menu-close, .menu-branch-toggle {
  cursor: pointer;
  border: 1px solid #dce6d8;
  border-radius: 8px;
  background: #fff;
  color: #25352b;
  font-family: inherit;
}

.menu-group-button {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  min-height: 44px;
  padding: 8px 10px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  font-size: .9375rem;
  line-height: 1.25;
  font-weight: 600;
}

.menu-group-button[aria-pressed="true"] {
  background: #e8f0e3;
  border-color: transparent;
  color: #17472a;
}

.menu-group-button:hover, .full-menu-close:hover, .menu-branch-toggle:hover { background: #edf4e8; }
.menu-all-button { color: #245b38; border-color: #d8e4d6; }
.full-menu-close { width: 44px; min-height: 44px; flex: 0 0 44px; border-color: transparent; background: transparent; font-size: 1.5rem; }
.menu-category-icon { flex: 0 0 auto; width: 23px; height: 23px; object-fit: contain; }
.full-menu-body { overflow: auto; overscroll-behavior: contain; }
.menu-view { padding: 15px 24px 17px; }
.menu-jumps { display: none; }
.menu-view[hidden], .menu-children[hidden] { display: none; }
.menu-view--4, .menu-view--2, .menu-view--catalog { display: grid; align-items: start; gap: 24px; }
.menu-view--4 { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, 1.17fr) minmax(0, .84fr); }
.menu-view--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu-view--catalog { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.menu-section, .menu-view--catalog > div { min-width: 0; }
.menu-section h3 {
  margin: 0 0 5px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e1e9de;
  color: #287340;
  font: 700 1.05rem/1.4 var(--font-ui);
}

.menu-family { min-width: 0; }
.menu-family-title { display: flex; align-items: center; gap: 4px; }
.menu-family-title > a {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  min-height: 34px;
  padding: 5px 0;
  color: #25352b;
  font: 600 1rem/1.35 var(--font-ui);
  overflow-wrap: anywhere;
}

.menu-children {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 9px;
  margin: 0 0 7px;
  padding: 0;
  list-style: none;
}

.menu-children a {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 3px 0;
  color: #4b5e50;
  font: 400 .9rem/1.35 var(--font-ui);
  overflow-wrap: anywhere;
}

.menu-view--4 .menu-children a {
  padding-inline: 5px;
}

.menu-direct-children {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0 16px;
  margin: 4px 0 12px;
}

.menu-direct-children a { display: flex; min-height: 38px; height: 100%; padding: 7px 0; }
.menu-branch-toggle { flex: 0 0 36px; width: 36px; min-height: 34px; border-color: transparent; background: transparent; font-size: 1.125rem; }
.menu-view--catalog .menu-family + .menu-family { border-top: 1px solid #edf0ea; }
.menu-branch-toggle[aria-expanded="true"] > span { display: inline-block; transform: rotate(180deg); }
.menu-family a:hover { color: #1d6035; opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.full-menu-panel :focus-visible { outline: 3px solid #287340; outline-offset: 2px; }

@media (max-width: 1050px) {
  .menu-group-buttons { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .menu-view--4, .menu-view--catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-personalization { padding-inline: 8px; }
}

@media (max-width: 740px) {
  .shop-nav { display: flex; align-items: stretch; flex-wrap: wrap; gap: 0 8px; }
  .category-menu.full-category-menu { width: auto; flex: 1; }
  .full-category-menu > summary { width: 100%; min-height: 50px; padding: 9px 10px; gap: 7px; }
  .shop-personalization { min-height: 50px; padding: 6px 4px; gap: 5px; }
  .full-menu-panel { left: 0; right: 0; border-inline: 0; }
  .full-menu-controls { gap: 7px; padding: 10px 12px; }
  .menu-group-buttons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .menu-group-button { min-height: 44px; padding: 6px 7px; }
  .menu-group-button .menu-category-icon { width: 21px; height: 21px; }
  .full-menu-close { align-self: flex-start; width: 40px; min-width: 40px; flex-basis: 40px; }
  .menu-view { padding: 14px 16px 20px; }
  .menu-view--4, .menu-view--2, .menu-view--catalog { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .menu-view--catalog { gap: 0; }
  .menu-view--4:not([hidden]) { display: block; }
  .menu-view--4 .menu-section + .menu-section { margin-top: 18px; }
  .menu-jumps {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    overflow-x: auto;
    gap: 0 14px;
    margin: -14px -16px 10px;
    padding: 0 16px;
    background: #fff;
    border-bottom: 1px solid #e3eae0;
  }
  .menu-jump {
    flex: 0 0 auto;
    padding: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #245b38;
    font: 600 .875rem/1.3 var(--font-ui);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .menu-family-title > a, .menu-children a, .menu-branch-toggle { min-height: 44px; }
  .menu-branch-toggle { width: 44px; flex-basis: 44px; }
  .menu-children { gap: 0 17px; }
  .menu-view--4 .menu-children a { padding-inline: 0; }
  .menu-view--4 .menu-children a span { padding: 4px 6px; }
  .menu-direct-children { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 741px) and (max-width: 960px) {
  .shop-nav { gap: 8px; }
  .full-category-menu > summary { padding-inline: 12px; }
  .shop-personalization { padding-inline: 6px; }
  .shop-nav #nav { flex: 1; flex-wrap: wrap; gap: 4px 12px; }
}

@media (min-width: 1051px) and (max-height: 800px) {
  .full-menu-controls { padding-block: 6px; }
  .menu-view--4 { padding-block: 12px; }
  .menu-view--4 .menu-family-title > a { min-height: 31px; padding-block: 4px; }
  .menu-view--4 .menu-children { margin-bottom: 4px; }
  .menu-view--4 .menu-children a { min-height: 24px; padding-block: 2px; }
}

/* ---- Fitting into the shop's green bar (desktop) and the phone green bar ---- */
.mc-shop-nav { --font-ui: var(--mc-font, 'DM Sans', Arial, sans-serif); display: flex; align-items: stretch; flex: 0 0 auto; align-self: stretch; }
.main-content-wrapper > header.vc-header { position: relative; }
.mc-shop-nav .full-category-menu > summary {
    height: 100%;
    min-height: 56px;
    min-width: 200px;
    padding: 0 20px;
    background: var(--mc-green-dark, #1f5f35);
    color: #fff;
    font: 600 16px/24px var(--font-ui);
    cursor: pointer;
    user-select: none;
}
.mc-shop-nav .full-category-menu > summary:hover { background: #17472a; }
.mc-shop-nav .full-menu-symbol { font-size: 18px; line-height: 1; }
.mc-shop-nav .full-menu-chevron { line-height: 1; transform: translateY(-3px); }
.mc-shop-nav .full-category-menu[open] .full-menu-chevron { transform: translateY(2px) rotate(180deg); }
.mc-shop-nav .shop-personalization { color: #163a23 !important; text-decoration: none; }
.mc-shop-nav .shop-personalization:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Velocity's own button, list and heading rules stay out of the panel */
.mc-shop-nav .full-menu-panel { font: 400 16px/1.4 var(--font-ui); text-align: left; cursor: default; }
.mc-shop-nav .full-menu-panel button { box-shadow: none; text-transform: none; letter-spacing: normal; }
.mc-shop-nav .full-menu-panel ul, .mc-shop-nav .full-menu-panel li { margin: 0; padding: 0; list-style: none; }
.mc-shop-nav .full-menu-panel .menu-children { margin: 0 0 7px; }
.mc-shop-nav .full-menu-panel .menu-family-title > a { color: #25352b !important; text-decoration: none; }
.mc-shop-nav .full-menu-panel .menu-children a { color: #4b5e50 !important; text-decoration: none; }
.mc-shop-nav .full-menu-panel .menu-family a:hover { color: #1d6035 !important; text-decoration: underline; }
.mc-shop-nav .full-menu-panel .menu-section h3 { color: #287340; }
.mc-shop-nav .menu-group-button img { margin: 0; }

/* Phones: the green bar under the white header */
.mc-mobile-nav { position: relative; }
.mc-mobile-nav .mc-shop-nav { width: 100%; gap: 8px; }
.mc-mobile-nav .full-category-menu { flex: 1; }
.mc-mobile-nav .full-category-menu > summary { width: 100%; min-height: 50px; min-width: 0; padding: 9px 16px; }
.mc-mobile-nav .full-menu-panel { left: 0; right: 0; border-inline: 0; }
@media (min-width: 741px) {
    .mc-mobile-nav .full-menu-panel { left: 16px; right: 16px; border-inline: 1px solid #d8e2d3; }
}

/* While the green bar is fixed to the top, the panel opens under it as before */
@media (min-width: 993px) and (max-width: 1240px) {
    .mc-shop-nav .full-category-menu > summary { min-width: 0; padding: 0 16px; }
    .mc-shop-nav .shop-personalization { font-size: 15px; padding-inline: 6px; }
}

/* The open panel sits above the page content (the product page buttons have their own layers) */
.main-content-wrapper > header.vc-header, .mc-mobile-nav { z-index: 60; }
.mc-shop-nav .full-menu-panel { z-index: 1000; }
.mc-shop-nav button:focus:not(:focus-visible), .mc-shop-nav summary:focus:not(:focus-visible) { outline: none; box-shadow: none; }
.mc-shop-nav, .mc-shop-nav *, .mc-shop-nav *::before, .mc-shop-nav *::after { box-sizing: border-box; }
