/* Shared customer navigation. Studio geometry and preview materials stay in styles.css. */
.commerce-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
  margin-left: auto;
}
.commerce-top-actions .commerce-language {
  min-width: 58px;
  min-height: 44px;
  padding: 8px;
  font-size: 12px;
  border-color: var(--line);
}
.commerce-top-actions .commerce-language option {
  background: var(--panel);
  color: var(--ink);
}
.commerce-header-bag,
.commerce-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  gap: 7px;
  line-height: 1;
}
.commerce-header-bag:hover,
.commerce-menu-toggle:hover {
  background: var(--panel2);
  border-color: #60694f;
}
.commerce-header-bag svg,
.commerce-menu-toggle svg,
.commerce-editor-controls .icon-only-save svg {
  display: block;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}
#commerce-bag-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 20px;
  background: var(--lime);
  color: #20251a;
  font-size: 11px;
  font-weight: 700;
}
.commerce-header > nav,
.commerce-customer .site-header > nav {
  flex: 1;
  align-items: center;
  gap: 24px;
}
.commerce-header > nav a,
.commerce-customer .site-header > nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.commerce-customer .site-header .wordmark,
.commerce-header .wordmark {
  flex-shrink: 0;
}

/* Native modal dialog supplies focus containment and an inert background. */
dialog.commerce-menu-drawer {
  position: fixed;
  inset: 0;
  width: 390px;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0 0 0 auto;
  padding: 26px 24px max(24px, env(safe-area-inset-bottom));
  border: 0;
  border-left: 1px solid #424b36;
  border-radius: 0;
  color: var(--ink);
  background: #1b1f17;
  box-shadow: -20px 0 80px #0005;
  overflow-y: auto;
  overscroll-behavior: contain;
}
dialog.commerce-menu-drawer[open] {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.commerce-menu-drawer::backdrop {
  background: #080b08b8;
  backdrop-filter: blur(4px);
}
body:has(#commerce-menu[open]) {
  overflow: hidden;
}
.commerce-menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.commerce-menu-heading h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
}
.commerce-menu-heading [data-action='close-menu'] {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid #47523a;
  border-radius: 50%;
  color: var(--ink);
  font-size: 25px;
  line-height: 1;
}
.commerce-menu-heading [data-action='close-menu']:hover {
  background: #2c3424;
}
.commerce-menu-identity {
  color: #c0c6b5;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.commerce-menu-identity p {
  margin: 0;
}
.commerce-menu-identity strong {
  color: var(--ink);
}
.commerce-menu-links {
  display: grid;
  gap: 3px;
  padding: 14px 0;
  border-top: 1px solid #39412f;
  border-bottom: 1px solid #39412f;
}
.commerce-menu-links a,
.commerce-menu-links button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 47px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #e2e7d7;
  text-align: left;
  font-size: 15px;
  line-height: 1.4;
}
.commerce-menu-links a:hover,
.commerce-menu-links button:hover {
  background: #2a3123;
  color: var(--lime);
}
.commerce-menu-links a[aria-current='page'] {
  background: #2a3420;
  color: var(--lime);
}
.commerce-menu-auth {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.commerce-menu-auth .commerce-customer-name {
  display: block;
  width: 100%;
  color: #bbc4af;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.commerce-menu-auth .commerce-btn {
  min-height: 44px;
  flex: 1 1 auto;
}
.commerce-menu-drawer .commerce-menu-help,
.commerce-menu-drawer .commerce-menu-footer {
  margin-top: auto;
  padding-top: 14px;
  color: #b1bba6;
  font-size: 12px;
  line-height: 1.65;
}
.commerce-menu-drawer .commerce-menu-help a,
.commerce-menu-drawer .commerce-menu-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 0;
  margin-right: 18px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* The customer enters the studio directly; collection content lives in the shop. */
.commerce-customer #top > .hero,
.commerce-customer #top > .ticker,
.commerce-customer #inspiration,
.commerce-customer #top > .closing-cta {
  display: none;
}
.commerce-customer .v-preview-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.commerce-customer .commerce-top-actions #open-cart {
  display: inline-flex !important;
}
.commerce-customer .commerce-editor-bar {
  margin-bottom: 12px;
  padding: 9px 0;
  gap: 8px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.commerce-customer .commerce-editor-bar .commerce-save-state {
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}
.commerce-customer .commerce-editor-bar .save-error {
  color: #efb1a8;
}
.commerce-editor-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.commerce-editor-controls .icon-only-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid #64734e;
  border-radius: 8px;
  color: var(--lime);
  background: transparent;
}
.commerce-editor-controls .icon-only-save:hover:not(:disabled) {
  background: #2c3721;
  border-color: var(--lime);
}
.commerce-editor-controls #add-cart {
  min-height: 44px;
  margin: 0;
  white-space: normal;
}
.commerce-top-actions :focus-visible,
.commerce-menu-drawer :focus-visible,
.commerce-editor-controls :focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .commerce-header {
    flex-wrap: nowrap;
  }
  .commerce-header > nav {
    order: 0;
    flex-basis: auto;
    gap: 18px;
  }
}
@media (max-width: 820px) {
  .commerce-header > nav,
  .commerce-customer .site-header > nav {
    display: none;
  }
  .commerce-header,
  .commerce-customer .site-header {
    gap: 14px;
    min-height: 76px;
  }
}
@media (max-width: 480px) {
  .commerce-header,
  .commerce-customer .site-header {
    padding: 12px 16px;
    gap: 8px;
    height: auto;
    min-height: 72px;
  }
  .commerce-header .wordmark,
  .commerce-customer .site-header .wordmark {
    font-size: 27px;
  }
  .commerce-header .logo-asterisk,
  .commerce-customer .site-header .logo-asterisk {
    font-size: 30px;
    margin-left: 5px;
  }
  .commerce-customer .site-header .wordmark sup {
    display: none;
  }
  .commerce-top-actions {
    gap: 6px;
  }
  .commerce-top-actions .commerce-language {
    min-width: 51px;
    width: 51px;
    padding: 5px;
    font-size: 11px;
  }
  .commerce-header-bag {
    gap: 5px;
    padding: 9px;
  }
  .commerce-customer .v-preview-footer > :first-child {
    min-width: 0;
  }
  .commerce-editor-controls {
    flex-wrap: wrap;
  }
  dialog.commerce-menu-drawer {
    padding-left: 20px;
    padding-right: 20px;
  }
}
@media (max-width: 360px) {
  .commerce-header,
  .commerce-customer .site-header {
    padding-left: 10px;
    padding-right: 10px;
  }
  .commerce-header .wordmark,
  .commerce-customer .site-header .wordmark {
    font-size: 24px;
  }
  .commerce-top-actions {
    gap: 4px;
  }
  .commerce-header-bag {
    padding: 8px;
  }
}
