/* SG Bike Market Topbar Clean Layout */
#topbar,
.site-header #topbar {
  min-height: 42px;
  background: #F7F7F7 !important;
  overflow: visible !important;
}

#topbar .razzi-container-fluid,
#topbar .topbar-items,
#topbar .topbar-right-items {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
  overflow: visible !important;
}


/* SG Bike Market Topbar Menu Reset */
#topbar ul,
#topbar .menu {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#topbar li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

#topbar a {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* SG Bike Market Topbar SVG Size Fix */

#topbar svg,
#topbar img {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  display: inline-block !important;
}



/* SG Bike Market Automatic Topbar Container */
#topbar .topbar-right-items:has(.sgbm-auto-topbar-actions),
.topbar-right-items:has(.sgbm-auto-topbar-actions) {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* SG Bike Market Automatic Topbar Actions */
.sgbm-auto-topbar-actions {
  display: inline-flex !important;

align-items: center !important;
  justify-content: flex-end !important;
  gap: 9px !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #111827 !important;
  white-space: nowrap !important;
}

/* SG Bike Market Automatic Topbar Text Reset */
.sgbm-auto-topbar-actions,
.sgbm-auto-topbar-actions * {
  text-transform: none !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
}

/* SG Bike Market Automatic Topbar Account */
.sgbm-auto-topbar-account {
  display: inline-flex !important;
  height: 34px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: #FFFFFF !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

/* SG Bike Market Automatic Topbar Account Hover */
.sgbm-auto-topbar-account:hover {
  background: #EFF6FF !important;
  color: #2563EB !important;
  transform: translateY(-1px) !important;
}

/* SG Bike Market Automatic Topbar Name */
.sgbm-auto-topbar-name {
  color: inherit !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

/* SG Bike Market Automatic Topbar Action */
.sgbm-auto-topbar-action {
  position: relative !important;
  display: inline-flex !important;
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: #FFFFFF !important;
  color: #111827 !important;
  line-height: 1 !important;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease !important;
}

/* SG Bike Market Automatic Topbar Action Hover */
.sgbm-auto-topbar-action:hover {
  background: #EFF6FF !important;
  color: #2563EB !important;
  transform: translateY(-1px) !important;
}

/* SG Bike Market Automatic Topbar SVG */
.sgbm-auto-topbar-icon,
.sgbm-auto-topbar-icon svg {
  display: block !important;
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
}

/* SG Bike Market Automatic Topbar Bike SVG */
.sgbm-auto-topbar-bike-icon,
.sgbm-auto-topbar-bike-icon svg {
  width: 21px !important;
  height: 21px !important;
  flex-basis: 21px !important;
}

/* SG Bike Market Automatic Topbar SVG Color */
.sgbm-auto-topbar-icon svg {
  fill: currentColor !important;
}

/* SG Bike Market Automatic Topbar Count */
.sgbm-auto-topbar-count {
  position: absolute !important;
  top: -2px !important;
  right: -2px !important;
  display: inline-flex !important;
  min-width: 16px !important;
  height: 16px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  background: #2563EB !important;
  color: #FFFFFF !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 16px !important;
}

/* SG Bike Market Automatic Topbar Hide Empty Count */
.sgbm-auto-topbar-count.is-empty {
  display: none !important;
}

/* SG Bike Market Hide Duplicate Main Header Actions */
.site-header .header-right-items .sgbm-header-account-link,
.site-header .header-right-items .sgbm-header-bike-shortlist,
.site-header .header-right-items .header-wishlist,
.site-header .header-right-items .wishlist-item,
.site-header .header-right-items .header-compare,
.site-header .header-right-items .compare-item,
.site-header .header-right-items .header-cart,
.site-header .header-right-items .cart-item {
  display: none !important;
}

/* SG Bike Market Automatic Topbar Mobile */
@media (max-width: 767px) {
  .sgbm-auto-topbar-actions {
    gap: 4px !important;
  }

  .sgbm-auto-topbar-name {
    display: none !important;
  }

  .sgbm-auto-topbar-account,
  .sgbm-auto-topbar-action {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px !important;
    padding: 0 !important;
  }
}

/* SG Bike Market Automatic Topbar Account Dropdown Shell */
.sgbm-auto-topbar-account-wrap {
  position: relative !important;
  display: inline-flex !important;

  align-items: center !important;
}

/* SG Bike Market Automatic Topbar Account Dropdown */
.sgbm-auto-account-dropdown {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: 0 !important;
  z-index: 99999 !important;
  display: grid !important;
  min-width: 220px !important;
  padding: 10px !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
  background: #FFFFFF !important;
  border: 1px solid #E5E7EB !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14) !important;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease !important;
}

/* SG Bike Market Automatic Topbar Account Dropdown Arrow */
.sgbm-auto-account-dropdown::before {
  position: absolute !important;

  top: -6px !important;
  right: 24px !important;
  width: 12px !important;
  height: 12px !important;
  content: "" !important;
  background: #FFFFFF !important;
  border-top: 1px solid #E5E7EB !important;
  border-left: 1px solid #E5E7EB !important;
  transform: rotate(45deg) !important;
}

/* SG Bike Market Automatic Topbar Account Dropdown Open */

.sgbm-auto-topbar-account-wrap:hover .sgbm-auto-account-dropdown,
.sgbm-auto-topbar-account-wrap:focus-within .sgbm-auto-account-dropdown,
.sgbm-auto-topbar-account-wrap.is-open .sgbm-auto-account-dropdown {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* SG Bike Market Automatic Topbar Account 
Dropdown Links */
.sgbm-auto-account-dropdown a {
  display: flex !important;
  align-items: center !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 10px !important;
  color: #111827 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

/* SG Bike Market Automatic Topbar Account Dropdown Link Hover */
.sgbm-auto-account-dropdown a:hover {
  background: #EFF6FF !important;
  color: #2563EB !important;
}

/* SG Bike Market Automatic Topbar Account Dropdown Mobile */
@media (max-width: 767px) {
  .sgbm-auto-account-dropdown {
    right: -96px !important;
    min-width: 210px !important;
  }

  .sgbm-auto-account-dropdown::before {
    right: 112px !important;
  }
}

/* SG Bike Market Account Dropdown Hover Bridge */
.sgbm-auto-topbar-account-wrap::after {
  position: absolute !important;
  right: 0 !important;
  bottom: -16px !important;
  z-index: 99998 !important;
  display: none !important;
  width: 100% !important;
  min-width: 220px !important;
  height: 18px !important;
  content: "" !important;
  background: transparent !important;
}

/* SG Bike Market Account Dropdown Hover Bridge Active */
.sgbm-auto-topbar-account-wrap:hover::after,
.sgbm-auto-topbar-account-wrap:focus-within::after,
.sgbm-auto-topbar-account-wrap.is-open::after {
  display: block !important;
}

/* SG Bike Market Account Dropdown Stable Position */
.sgbm-auto-account-dropdown {
  top: calc(100% + 8px) !important;
  pointer-events: none !important;
}

/* SG Bike Market Account Dropdown Stay Open */
.sgbm-auto-topbar-account-wrap:hover .sgbm-auto-account-dropdown,
.sgbm-auto-topbar-account-wrap:focus-within .sgbm-auto-account-dropdown,
.sgbm-auto-topbar-account-wrap.is-open .sgbm-auto-account-dropdown,
.sgbm-auto-account-dropdown:hover {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* SG Bike Market Account Dropdown Arrow Position */
.sgbm-auto-account-dropdown::before {
  top: -6px !important;
}

/* Bike and Shop actions use clear, separate text labels on desktop. */
#topbar .sgbm-auto-topbar-action {
  width: auto !important;
  min-width: 34px !important;
  flex: 0 0 auto !important;
  gap: 7px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}

#topbar .sgbm-auto-topbar-label {
  display: inline-block !important;
  color: inherit !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

#topbar .sgbm-auto-topbar-bike-action {
  background: #EFF6FF !important;
  color: #1D4ED8 !important;
}

#topbar .sgbm-auto-topbar-shop-action {
  background: #FFFFFF !important;
  color: #111827 !important;
}

/* Extra specificity prevents Razzi's menu CSS from flattening the dropdown. */
#topbar .sgbm-auto-account-dropdown {
  display: grid !important;
  grid-auto-flow: row !important;
  grid-template-columns: 1fr !important;
  width: 220px !important;
  min-width: 220px !important;
  margin: 0 !important;
  list-style: none !important;
}

#topbar .sgbm-auto-account-dropdown a {
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 1024px) {
  #topbar .sgbm-auto-topbar-actions {
    gap: 5px !important;
  }

  #topbar .sgbm-auto-topbar-action {
    width: 34px !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  #topbar .sgbm-auto-topbar-label {
    display: none !important;
  }
}
