/*
 * Stündenglass header menus, design pass (Oct 2026). Markup: inc/sg-nav.php + inc/sg-nav-walkers.php.
 * Its own file so the many open design branches that touch the nav rules in sg.css keep merging cleanly.
 */

/* ---------------------------------------------------------------- desktop menu (1240px and up) */
/* no arrows on the nav items: the dropdowns open on hover, and the first tap opens them on touch screens */
.site-nav__link .icon--chevron { display: none; }

/* every dropdown opens from the header itself: the header's grey, no line between them, the page not dimmed.
   The nav item ends 10px above the header's bottom edge, so the panel starts 10px lower; ::before bridges that
   gap so the pointer can move down into the panel without it closing. */
.site-nav__dropdown.sg-dd { top: calc(100% + 10px); background: var(--gpen-header-bg, #f9f9f9); border-radius: 0 0 15px 15px; box-shadow: 0 18px 28px -18px rgb(0 0 0 / 18%); }
.site-nav__dropdown.sg-dd::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.sg-dd .site-nav__dropdown-link { font-family: var(--sg-font-montserrat); color: #000; }
.sg-dd .site-nav__dropdown-link:hover { text-decoration: none; }

/* Shop: the items as a large list on the left, the lifestyle cards on the right, across the full header width
   (the item is static, so the panel is placed against the header bar) */
.site-nav__item:has(> details > .sg-dd--feature) { position: static; }
.site-nav__dropdown.sg-dd--feature { left: 0; right: 0; top: 100%; width: 100%; padding: 32px 0 40px; border-radius: 0; }
.sg-dd--feature .sg-dd__inner { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; max-width: 1170px; margin: 0 auto; text-align: left; }
.sg-dd--feature .site-nav__dropdown-list { display: flex; flex-direction: column; gap: 4px; }
.sg-dd--feature .site-nav__dropdown-link { padding: 6px 0; font-size: 22px; font-weight: 400; letter-spacing: 0.01em; white-space: normal; }
.sg-dd--feature .site-nav__dropdown-link:hover .sg-dd__name { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.sg-dd--feature .sg-dd__thumb { display: none; } /* the cards carry the photos here */
.sg-dd--feature .site-nav__dropdown-list > li:has(> .site-nav__dropdown-link--all) { order: 9; margin-top: 12px; padding-top: 16px; border-top: 1px solid #e8e8e8; }
.sg-dd--feature .site-nav__dropdown-link--all { font-size: 14px; }
.sg-dd__cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sg-dd__card { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 15px; background: #e9e9e9; color: #fff; }
.sg-dd__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.sg-dd__card:hover img { transform: scale(1.03); }
.sg-dd__card::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgb(0 0 0 / 55%)); }
.sg-dd__card-text { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-family: var(--sg-font-montserrat); }
.sg-dd__card-name { font-size: 20px; font-weight: 500; line-height: 1.2; }
.sg-dd__card-shop { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* Accessories, Support, Wholesale: a panel hanging from the nav item, a row per link (round product photo where one
   is set in the config, text only otherwise), "Shop all" under a hairline */
.site-nav__dropdown.sg-dd--list { min-width: 240px; padding: 12px 8px 14px; }
.sg-dd--list .site-nav__dropdown-list { display: flex; flex-direction: column; }
.sg-dd--list .site-nav__dropdown-link { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 10px; font-size: 15px; font-weight: 500; letter-spacing: 0.01em; }
.sg-dd--list .site-nav__dropdown-link:hover { background: #fff; }
.sg-dd--list:has(.sg-dd__thumb) .site-nav__dropdown-link { padding-top: 6px; padding-bottom: 6px; }
.sg-dd__thumb { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: #fff; }
.sg-dd__thumb img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.sg-dd--list .site-nav__dropdown-link:hover .sg-dd__thumb { background: #f1f1f1; }
/* "Shop all" as in the Shop dropdown: sentence case, 14px, left-aligned with the names, under a hairline */
.sg-dd--list .site-nav__dropdown-list > li:has(> .site-nav__dropdown-link--all) { order: 9; margin-top: 8px; padding-top: 8px; border-top: 1px solid #e8e8e8; }
.sg-dd--list .site-nav__dropdown-link--all { font-size: 14px; font-weight: 400; }
.sg-dd--list:has(.sg-dd__thumb) .site-nav__dropdown-link--all { padding-left: 84px; } /* 14px + the 56px photo + 14px gap */
.sg-dd--list .site-nav__dropdown-link--all:hover { background: none; }
.sg-dd .site-nav__dropdown-link--all:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------------------------------------------------------------- menu drawer (below 1240px) */
.slide-nav__link > .sg-mnav__tile, .slide-nav__link > .sg-mnav__card { display: none; } /* outranks the parent's .slide-nav__link > span */

/* first level (Shop, Accessories, Rewards, Support, Wholesale) and the plain rows a level down (FAQs, Contact Us,
   Become a Retailer, Store Locator): white pills with the light grey line of the sort menu and
   quantity stepper, instead of the grey fill (an inset shadow, so the rows keep their height) */
.slide-nav__wrapper > .slide-nav > .slide-nav__item > .slide-nav__link,
.slide-nav__wrapper > .slide-nav > .slide-nav__item > .slide-nav__button > .slide-nav__link,
.sg-mnav > .slide-nav__item:not(.sg-mnav__item--media) > .slide-nav__link:not(.slide-nav__link--back, .slide-nav__link--all) { background: #fff; box-shadow: inset 0 0 0 1px var(--sg-rule, #d0d0d0); }
/* the parent lays out a level with a Store Locator link as a flex row (G Pen pairs it with another link); SG stacks it, so
   a plain list keeps the same 10px gaps as Support */
.slide-nav__dropdown.sg-mnav:has(> .slide-nav__item > a.slide-nav__link[href*="store-locator"]) { display: block; }

/* less space around the store selector: the panel starts closer to the header, and one level down the flag shares the
   row with "< Shop" (empty on the right) instead of taking a row of its own */
.site-header__mobile-nav { padding-top: 4px; }
.site-header__drawer-animate > .locale-switcher--mobile { margin: 0; }
.site-header__drawer-animate:has(> .slide-nav__wrapper:not([data-level="1"])) > .locale-switcher--mobile { position: absolute; top: 25px; right: 20px; z-index: 2; }
.site-header__drawer-animate:has(> .slide-nav__wrapper:not([data-level="1"])) > .locale-switcher--mobile .locale-switcher__panel { position: absolute; top: 100%; right: 0; width: 220px; box-shadow: 0 12px 28px rgb(0 0 0 / 12%); }
@media only screen and (min-width: 768px) {
  .site-header__drawer-animate:has(> .slide-nav__wrapper:not([data-level="1"])) > .locale-switcher--mobile { right: 40px; } /* the drawer's tablet padding */
}
/* the parent also opens the selector on hover and focus (for desktop); on a phone the hover sticks after a tap, so a second
   tap couldn't close it. In the menu it follows the toggle only. */
.locale-switcher.locale-switcher--mobile:not(.is-open) .locale-switcher__panel { display: none; }

/* Accessories (and any level with product photos): rows with a round photo, divided by hairlines */
.slide-nav__dropdown.sg-mnav:not(.sg-mnav--feature):has(.sg-mnav__item--media) { display: flex; flex-direction: column; }
.sg-mnav > .slide-nav__item:has(> .slide-nav__link--all) { order: 9; }
.sg-mnav > .sg-mnav__item--media { margin: 0; }
.sg-mnav > .sg-mnav__item--media > .slide-nav__link { justify-content: flex-start; gap: 14px; min-height: 0; padding: 10px 4px !important; border-bottom: 1px solid #eee; border-radius: 0 !important; background: none !important; font-family: var(--sg-font-montserrat); font-weight: 500; }
.sg-mnav > .sg-mnav__item--media > .slide-nav__link > span:not([class]) { flex: 1 1 auto; }
.sg-mnav .slide-nav__link > .sg-mnav__tile { display: grid; place-items: center; flex: 0 0 56px; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: var(--sg-tile, #f5f4f2); }
.sg-mnav .sg-mnav__tile img { width: 82%; height: 82%; object-fit: contain; mix-blend-mode: multiply; }
.sg-mnav > .slide-nav__item:has(> .slide-nav__link--all) { margin-top: 16px; }

/* Shop on phones: a 2 x 2 grid of product tiles, name under each, then "Shop all" */
@media only screen and (max-width: 767px) {
  .slide-nav__dropdown.sg-mnav--feature { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; align-content: start; }
  .sg-mnav--feature > .slide-nav__item:not(.sg-mnav__item--media) { grid-column: 1 / -1; }
  .sg-mnav--feature > .sg-mnav__item--media { margin: 6px 0 10px; }
  .sg-mnav--feature > .sg-mnav__item--media > .slide-nav__link { flex-direction: column; align-items: stretch; gap: 8px; padding: 0 !important; border-bottom: 0; font-size: 14px; line-height: 1.3; }
  .sg-mnav--feature .slide-nav__link > .sg-mnav__tile { width: 100%; height: auto; aspect-ratio: 1; flex: 0 0 auto; border-radius: 12px; }
  .sg-mnav--feature .slide-nav__link > .sg-mnav__tile img { width: 84%; height: 84%; }
  /* first level: Shop and Accessories as two photo tiles side by side (like the Shop level and the shop grid), the
     other items as pills under them */
  /* (a grid doesn't collapse margins, so the rows are spaced by the gap: 10px as before) */
  .slide-nav__wrapper > .slide-nav:has(> .sg-mnav__top--tile) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; align-content: start; margin: 10px 0; } /* a margin, not padding: the next levels hang from the list's top edge */
  .slide-nav__wrapper > .slide-nav:has(> .sg-mnav__top--tile) > .slide-nav__item { grid-column: 1 / -1; margin: 0; }
  .slide-nav__wrapper > .slide-nav > .slide-nav__item.sg-mnav__top--tile { grid-column: auto; margin-bottom: 6px; }
  .slide-nav__wrapper > .slide-nav > .sg-mnav__top--tile > .slide-nav__button > .slide-nav__link { flex-direction: column; align-items: stretch; gap: 8px; min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none; font-family: var(--sg-font-montserrat); font-size: 15px; font-weight: 500; letter-spacing: 0.01em; line-height: 1.3; }
  .sg-mnav__top--tile > .slide-nav__button > .slide-nav__link > .sg-mnav__tile { display: grid; place-items: center; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--sg-tile, #f5f4f2); }
  .sg-mnav__top--tile > .slide-nav__button > .slide-nav__link > .sg-mnav__tile img { width: 84%; height: 84%; object-fit: contain; mix-blend-mode: multiply; }
  .sg-mnav__top--tile > .slide-nav__button > .slide-nav__link > .icon { display: none; }

  /* "Shop all" (Shop and Accessories) as the site's black button, the main action at the end of the level */
  .sg-mnav > .slide-nav__item:has(> .slide-nav__link--all) { margin-top: 20px; }
  .slide-nav__dropdown.sg-mnav > .slide-nav__item > .slide-nav__link--all { justify-content: center; min-height: 50px; padding: 13px 24px; border-radius: 50px; background: #000; color: #fff; font-family: var(--sg-font-montserrat); font-size: 14px; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase; text-align: center; transition: background-color 0.2s; }
  .slide-nav__dropdown.sg-mnav > .slide-nav__item > .slide-nav__link--all > span { flex: 0 1 auto; }
  .slide-nav__dropdown.sg-mnav > .slide-nav__item > .slide-nav__link--all:active { background: #333; }
}

/* Shop on tablets (768 to 1239px, the drawer): the lifestyle cards in a row of three, then rows for the rest */
@media only screen and (min-width: 768px) {
  .slide-nav__dropdown.sg-mnav--feature { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 14px; align-content: start; }
  .sg-mnav--feature > .slide-nav__item:not(.sg-mnav__item--card) { grid-column: 1 / -1; }
  .sg-mnav--feature > .sg-mnav__item--card { margin: 6px 0 12px; }
  .sg-mnav--feature > .sg-mnav__item--card > .slide-nav__link { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; padding: 0 !important; border: 0; border-radius: 15px !important; background: #e9e9e9 !important; color: #fff; }
  .sg-mnav--feature .sg-mnav__item--card .slide-nav__link > .sg-mnav__tile { display: none; }
  .sg-mnav--feature .slide-nav__link > .sg-mnav__card { display: block; position: absolute; inset: 0; }
  .sg-mnav--feature .sg-mnav__card img { width: 100%; height: 100%; object-fit: cover; }
  .sg-mnav--feature > .sg-mnav__item--card > .slide-nav__link::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgb(0 0 0 / 55%)); }
  .sg-mnav--feature > .sg-mnav__item--card > .slide-nav__link > span:not([class]) { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; font-size: 18px; font-weight: 500; line-height: 1.2; }
  /* the item without a card (Food & Beverage) is a row with its round photo, like Accessories */
  .sg-mnav--feature > .sg-mnav__item--media:not(.sg-mnav__item--card) { order: 8; }
}
