@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Jost:wght@400&family=Playfair+Display:wght@400;500;600;700&display=swap");

:root {
  --jj-header-h: 72px;
}

/* One storefront header shared by Home, Shop, and Product. */
.jj-site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding-top: env(safe-area-inset-top, 0px);
  background: #ffffff;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.jj-site-header__inner {
  position: relative;
  max-width: 1536px;
  height: 72px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.jj-brand {
  justify-self: start;
  grid-column: 1;
  position: relative;
  z-index: 2;
  color: #1f1c18;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.jj-nav {
  position: static;
  grid-column: 2;
  justify-self: center;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: max-content;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  transform: none;
  pointer-events: auto;
}

.jj-nav__link {
  width: auto;
  padding: 0;
  color: #1f1c18;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.75px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.jj-nav__link:hover,
.jj-nav__link.is-active {
  color: #a98b5f;
}

.jj-header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  grid-column: 3;
  position: relative;
  z-index: 2;
  gap: 8px;
}

#jj-bag-btn,
#jj-wishlist-btn,
#jj-header-notify-btn,
#jj-profile-link,
#jj-menu-btn {
  order: initial;
}

@media (min-width: 901px) {
  /* Desktop: Get Notified, then heart beside bag, then profile */
  #jj-header-notify-btn {
    order: 1;
  }

  #jj-wishlist-btn {
    order: 2;
  }

  #jj-bag-btn {
    order: 3;
  }

  #jj-profile-link {
    order: 4;
  }

  #jj-menu-btn {
    order: 5;
  }
}

#jj-bag-btn {
  position: relative;
}

.jj-bag-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #1f1c18;
  color: #fff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 9px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

.jj-icon-btn,
.jj-menu-btn {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f1c18;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.jj-icon-btn:hover,
.jj-menu-btn:hover {
  color: #a98b5f;
}

.jj-icon-btn svg {
  width: 16px;
  height: 16px;
}

.jj-menu-btn svg {
  width: 20px;
  height: 20px;
}

.jj-notify-btn {
  display: inline-flex;
  height: 36px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid #1f1c18;
  border-radius: 0;
  background: transparent;
  color: #1f1c18;
  box-sizing: border-box;
  font-family: Jost, system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.28em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.jj-notify-btn:hover {
  background: #1f1c18;
  color: #ffffff;
}

.jj-menu-btn {
  display: none;
}

@media (max-width: 1100px) {
  .jj-icon-btn--desktop {
    display: none;
  }
}

@media (max-width: 900px) {
  .jj-site-header__inner {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding: 0 16px;
  }

  .jj-brand {
    grid-column: 1;
    min-width: 0;
    font-size: clamp(15px, 3.8vw, 22px);
    letter-spacing: -0.5px;
  }

  .jj-nav,
  .jj-nav.is-open {
    position: static;
    grid-column: 2;
    justify-self: center;
    left: auto;
    top: auto;
    transform: none !important;
    display: flex !important;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2.8vw, 28px);
    width: max-content;
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .jj-nav__link {
    pointer-events: auto !important;
    width: auto;
    padding: 0;
    font-size: clamp(9px, 2.4vw, 12px);
    letter-spacing: clamp(0.8px, 0.35vw, 1.75px);
    text-align: center;
  }

  .jj-header-actions {
    grid-column: 3;
    justify-self: end;
    /* Tight icon cluster — device.css 48px tap mins made glyphs look far apart */
    gap: 0;
    align-self: center;
    /* Let the notify CTA position against __inner (full header bar), not this icon row. */
    position: static;
  }

  .jj-icon-btn--desktop {
    display: none;
  }

  /* Keep a usable tap size, but pack heart / bag / profile as one group */
  .jj-header-actions > .jj-icon-btn,
  #jj-wishlist-btn,
  #jj-bag-btn,
  #jj-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    flex-shrink: 0;
  }

  .jj-header-actions > .jj-icon-btn svg {
    width: 18px;
    height: 18px;
  }

  #jj-menu-btn,
  .jj-menu-btn {
    display: none !important;
  }

  /* Mobile scrolled CTA: anchored to the header bar bottom (not the icon row).
     top: 100% clears the white bar; +12px is a clear, even gap under the icons. */
  .jj-notify-btn,
  #jj-header-notify-btn {
    position: absolute;
    top: calc(100% + 12px);
    right: 16px;
    left: auto;
    z-index: 1;
    display: inline-flex;
    height: 34px;
    min-height: 34px;
    padding: 0 14px;
    font-size: 10px;
    letter-spacing: 0.2em;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(31, 28, 24, 0.08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition:
      opacity 0.28s ease,
      transform 0.28s ease,
      visibility 0.28s ease;
  }

  .jj-site-header.is-scrolled .jj-notify-btn,
  .jj-site-header.is-scrolled #jj-header-notify-btn {
    display: inline-flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* Product page: keep notify transparent over the gallery. */
  body.jj-product-page .jj-site-header,
  body.jj-product-page .jj-site-header.is-scrolled {
    background: transparent;
    border-bottom-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  body.jj-product-page .jj-notify-btn {
    background: transparent;
  }
}

@media (max-width: 420px) {
  .jj-site-header__inner {
    padding: 0 14px;
  }

  .jj-notify-btn {
    right: 14px;
    top: calc(100% + 10px);
    height: 32px;
    min-height: 32px;
    padding: 0 10px;
    font-size: 9px;
    letter-spacing: 0.14em;
  }
}

/* Storefront only — block long-press / drag image save (admin excluded) */
body:not(.admin-body) img,
body:not(.admin-body) picture,
body:not(.admin-body) .jj-image-frame__fill {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
