/* Sidhuvud 3 – e-handel i Storecraft-stil */

.bsp-h3 {
  --bsp-container: 1600px;
  --bsp-h3-topbar-bg: #000000;
  --bsp-h3-topbar-text: #ffffff;
  --bsp-h3-bg: #ffffff;
  --bsp-h3-text: #111111;
  --bsp-h3-muted: #6b7280;
  --bsp-h3-border: #e5e7eb;
  --bsp-h3-primary: #1a1a2e;
  --bsp-h3-primary-text: #ffffff;
  --bsp-h3-badge-bg: #111111;
  --bsp-h3-badge-text: #ffffff;
  --bsp-h3-promo-icon: #e52727;
  --bsp-h3-help-bg: #f3f4f6;
  --bsp-h3-brand-icon-bg: #1a1a2e;
  --bsp-h3-brand-icon-text: #ffffff;

  background: var(--bsp-h3-bg);
  font-family: inherit;
}

/* ============ Övre fält ============ */

.bsp-h3-topbar {
  --bsp-topbar-link: var(--bsp-h3-topbar-text);
  background: var(--bsp-h3-topbar-bg);
  color: var(--bsp-h3-topbar-text);
}

.bsp-h3-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  padding: 6px 0;
}

.bsp-h3-topbar__announcement {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--bsp-h3-topbar-text);
}

.bsp-h3-topbar__meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.bsp-h3-topbar__socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bsp-h3-topbar__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--bsp-h3-topbar-text);
  text-decoration: none;
  font-size: 13px;
  opacity: 0.92;
  transition: opacity 0.2s ease;
}

.bsp-h3-topbar__socials a:hover {
  opacity: 1;
}

.bsp-h3-topbar__currency {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--bsp-h3-topbar-text);
}

.bsp-h3-topbar__currency select,
.bsp-h3-topbar__currency button,
.bsp-h3-topbar__currency a {
  color: inherit;
  font-size: inherit;
}

/* ============ Huvudrad ============ */

.bsp-h3-main {
  background: var(--bsp-h3-bg);
  border-bottom: 1px solid var(--bsp-h3-border);
}

.bsp-h3-main__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 78px;
  padding: 12px 0;
}

.bsp-h3-mobile-toggle {
  display: none;
}

.bsp-h3-brand {
  flex-shrink: 0;
}

.bsp-h3-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.bsp-h3-logo__icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bsp-h3-brand-icon-bg);
  color: var(--bsp-h3-brand-icon-text);
  border-radius: 6px;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
}

.bsp-h3-logo__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bsp-h3-logo__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--bsp-h3-text);
  line-height: 1;
}

.bsp-h3-logo__image img {
  max-height: 44px;
  width: auto;
  display: block;
}

/* ---- Sökning ---- */

.bsp-h3-search {
  flex: 1;
  min-width: 280px;
  position: relative;
  z-index: 30;
}

.bsp-h3-search__form {
  display: flex;
  align-items: stretch;
  height: 50px;
  box-sizing: border-box;
  border: 1px solid #dedede;
  border-radius: 6px;
  overflow: visible;
  background: #fcfcfc;
}

.bsp-h3-search .bsp-live-search {
  top: calc(100% + 10px);
  z-index: 80;
}

.bsp-h3-search__form .bsp-h3-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0 12px;
  border-radius: 5px 0 0 5px;
  box-shadow: none;
  font-size: 14px;
  color: var(--bsp-h3-text);
}

.bsp-h3-search__input::placeholder {
  color: #8a8a8a;
  opacity: 1;
}

.bsp-h3-search__form:focus-within {
  border-color: #8797a5;
}

.bsp-h3-search__form .bsp-h3-search__input:focus,
.bsp-h3-search__submit:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.bsp-h3-search__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 82px;
  margin: -1px -1px -1px 0;
  padding: 0 16px;
  border: 0;
  border-radius: 0 6px 6px 0;
  background: var(--bsp-h3-primary);
  color: var(--bsp-h3-primary-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.bsp-h3-search__submit:hover {
  opacity: 0.92;
}

.bsp-h3-search__submit:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -4px;
}

.bsp-h3-search__submit i {
  font-size: 14px;
}

/* ---- Kampanjruta ---- */

.bsp-h3-promo-wrap {
  position: relative;
  flex-shrink: 0;
  width: max-content;
  max-width: 100%;
}

.bsp-h3-promo {
  display: inline-flex;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  padding: 10px 14px;
  border: 1px solid var(--bsp-h3-border);
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
}

.bsp-h3-promo__icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--bsp-h3-promo-icon) 14%, #ffffff);
  color: var(--bsp-h3-promo-icon);
  font-size: 14px;
  flex-shrink: 0;
}

.bsp-h3-promo__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.bsp-h3-promo__text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--bsp-h3-text);
}

.bsp-h3-promo__text small {
  font-size: 12px;
  color: var(--bsp-h3-muted);
}

.bsp-h3-promo__caret {
  font-size: 10px;
  color: var(--bsp-h3-muted);
  flex-shrink: 0;
  margin-left: 4px;
}

.bsp-h3-promo:focus:not(:focus-visible),
.bsp-h3-promo__dropdown a:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.bsp-h3-promo:focus-visible {
  outline: 2px solid #52677a;
  outline-offset: 3px;
}

.bsp-h3-promo-wrap.is-open .bsp-h3-promo {
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
}

.bsp-h3-promo-wrap.is-open .bsp-h3-promo__caret {
  transform: rotate(180deg);
}

.bsp-h3-promo__dropdown {
  position: absolute;
  top: calc(100% - 1px);
  right: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--bsp-h3-border);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 24px rgba(17, 24, 39, 0.10);
  padding: 0;
  overflow: hidden;
  z-index: 70;
}

.bsp-h3-promo__dropdown-list {
  display: grid;
  gap: 4px;
  margin: 0 14px;
  padding: 10px 0;
  border-top: 1px solid var(--bsp-h3-border);
  list-style: none;
}

.bsp-h3-promo__dropdown-list li {
  position: relative;
  padding-left: 0;
  color: var(--bsp-h3-muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.bsp-h3-promo__dropdown-list li:first-child {
  color: var(--bsp-h3-text);
  font-size: 12.5px;
  font-weight: 700;
}

.bsp-h3-promo__dropdown-list li::before {
  display: none;
}

.bsp-h3-promo__dropdown a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  box-sizing: border-box;
  padding: 9px 14px;
  border-top: 1px solid var(--bsp-h3-border);
  font-size: 12px;
  font-weight: 700;
  color: var(--bsp-h3-text);
  text-decoration: none;
}

.bsp-h3-promo__dropdown a::after {
  content: "";
  width: 16px;
  height: 16px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9M8.5 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8h9M8.5 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  flex-shrink: 0;
}

.bsp-h3-promo__dropdown a:hover,
.bsp-h3-promo__dropdown a:focus-visible {
  background: #f8f9fb;
}

.bsp-h3-promo__dropdown a:focus-visible {
  outline: 2px solid #52677a;
  outline-offset: -3px;
}

/* ============ Navigeringsfält ============ */

.bsp-h3-navbar {
  background: var(--bsp-h3-bg);
  border-bottom: 1px solid var(--bsp-h3-border);
}

.bsp-h3-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
}

.bsp-h3-nav {
  flex: 1;
  min-width: 0;
}

.bsp-h3-nav__menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Placera menygenvägen tydligt i navigeringens övre vänstra hörn i Anpassaren. */
@media (min-width: 993px) {
  .bsp-h3-nav__menu {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .bsp-h3-nav__menu > li {
    min-width: 0;
    max-width: 100%;
  }

  .bsp-h3-nav__menu > li > a,
  .bsp-h3-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .bsp-h3-nav__menu > .customize-partial-edit-shortcut button {
    left: -5px;
    top: -30px;
  }
}

.bsp-h3-nav__menu > li > a,
.bsp-h3-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bsp-h3-text);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.bsp-h3-nav__menu > li > a:hover {
  color: var(--bsp-h3-primary);
}

.bsp-h3-nav__menu > li,
.bsp-h3-nav .bsp-nav-menu > li {
  position: relative;
  display: flex;
  align-items: stretch;
}

.bsp-h3-nav .bsp-has-dropdown > a::after,
.bsp-h3-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 9px;
  color: var(--bsp-h3-muted);
  margin-left: 4px;
  line-height: 1;
}

.bsp-h3-nav .bsp-submenu-toggle {
  display: none;
}

/* WordPress-meny i sidhuvud 3 */
.bsp-h3-nav .bsp-nav-menu > li {
  position: relative;
}

.bsp-h3-nav .bsp-nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  list-style: none;
  margin: 0;
  padding: 8px 0;
  background: #ffffff;
  border: 1px solid var(--bsp-h3-border);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 30px rgba(17, 24, 39, 0.1);
  z-index: 80;
}

@media (min-width: 993px) {
  .bsp-h3-nav .bsp-nav-menu > .menu-item-has-children:not(.bsp-mega-menu-parent):hover > .sub-menu,
  .bsp-h3-nav .bsp-nav-menu > .menu-item-has-children:not(.bsp-mega-menu-parent):focus-within > .sub-menu {
    display: block;
  }
}

.bsp-h3-nav .bsp-nav-menu .sub-menu a {
  display: block;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--bsp-h3-text);
  text-decoration: none;
}

.bsp-h3-nav .bsp-nav-menu .sub-menu a:hover {
  background: #f8f9fb;
  color: var(--bsp-h3-primary);
}

/* ---- Hjälpfunktioner ---- */

.bsp-h3-utilities {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}

.bsp-h3-utilities--mobile {
  display: none;
}

.bsp-h3-help {
  position: relative;
}

.bsp-h3-help__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--bsp-h3-border);
  border-radius: 999px;
  background: var(--bsp-h3-help-bg);
  color: var(--bsp-h3-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.bsp-h3-help__caret {
  font-size: 9px;
  color: var(--bsp-h3-muted);
  transition: transform 0.2s ease;
}

.bsp-h3-help.is-open .bsp-h3-help__caret {
  transform: rotate(180deg);
}

.bsp-h3-help__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 284px;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--bsp-h3-border);
  border-radius: 12px;
  box-shadow: none;
  padding: 8px;
  z-index: 70;
}

.bsp-h3-help__dropdown a {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--bsp-h3-text);
  text-decoration: none;
}

.bsp-h3-help__dropdown a:hover,
.bsp-h3-help__dropdown a:focus-visible {
  background: #f4f5f7;
}

.bsp-h3-help__dropdown a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: -2px;
}

.bsp-h3-help__dropdown svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.bsp-h3-utility {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--bsp-h3-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.bsp-h3-utility i {
  font-size: 16px;
}

.bsp-h3-utility__count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bsp-h3-badge-bg);
  color: var(--bsp-h3-badge-text);
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.bsp-h3-utility:focus:not(:focus-visible) {
  outline: none;
  box-shadow: none;
}

.bsp-h3-utility:focus-visible {
  outline: 2px solid var(--bsp-h3-primary);
  outline-offset: 3px;
}

.bsp-h3-utility--wishlist,
.bsp-h3-utility--cart {
  padding-right: 6px;
}

/* ============ Mobil och surfplatta ============ */

@media (max-width: 992px) {
  .bsp-h3-topbar {
    display: none;
  }

  body.bsp-show-topbar-mobile .bsp-h3-topbar {
    display: block;
  }

  .bsp-h3-topbar-slot.is-pinned {
    min-height: var(--bsp-h3-topbar-height);
  }

  .bsp-h3-topbar-slot.is-pinned > .bsp-h3-topbar {
    position: fixed;
    top: var(--bsp-h3-topbar-offset, 0px);
    inset-inline: 0;
    z-index: 500;
  }

  body.bsp-show-topbar-mobile .bsp-h3-topbar__inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .bsp-h3-mobile-toggle {
    display: flex;
    order: 1;
  }

  .bsp-h3-brand {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
  }

  .bsp-h3-utilities--mobile {
    display: flex;
    order: 3;
    margin-left: auto;
    gap: 12px;
  }

  .bsp-h3-utilities--desktop {
    display: none;
  }

  .bsp-h3-promo-wrap {
    order: 4;
  }

  .bsp-h3-search {
    order: 5;
    flex: 0 0 100%;
    min-width: 0;
  }

  .bsp-h3-main__inner {
    flex-wrap: wrap;
    gap: 14px;
    min-height: 0;
    padding: 12px 0 10px;
  }

  .bsp-h3-promo {
    min-width: 0;
    padding: 8px 10px;
  }

  .bsp-h3-promo__text strong {
    font-size: 12px;
  }

  .bsp-h3-promo__text small {
    display: none;
  }

  .bsp-h3-navbar__inner {
    flex-wrap: wrap;
    min-height: 0;
  }

  .bsp-h3-navbar:not(:has(.bsp-h3-nav.is-open)) {
    border-bottom: 0;
  }

  .bsp-h3-navbar:not(:has(.bsp-h3-nav.is-open)) .bsp-h3-navbar__inner {
    min-height: 0;
    padding: 0;
  }

  .bsp-h3-utilities {
    gap: 12px;
  }

  .bsp-h3-help__toggle span,
  .bsp-h3-utility span:not(.screen-reader-text):not(.bsp-h3-utility__count) {
    display: none;
  }

  .bsp-h3-help__caret {
    display: none;
  }

  .bsp-h3-nav {
    order: 2;
    flex: 0 0 100%;
  }

  .bsp-h3-nav:not(.is-open) {
    display: none;
  }

  .bsp-h3-nav.is-open {
    display: block;
    position: fixed;
    top: var(--bsp-mobile-nav-top, 60px);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--bsp-mobile-nav-top, 60px));
    overflow-y: auto;
    background: #ffffff;
    border-bottom: 1px solid var(--bsp-h3-border);
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.1);
    z-index: 499;
    padding: 8px 16px 16px;
  }

  .bsp-h3-nav__menu {
    display: block;
  }

  .bsp-h3-nav__menu > li > a {
    display: flex;
    width: 100%;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
  }

  .bsp-h3-nav .bsp-has-dropdown {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }

  .bsp-h3-nav .bsp-has-dropdown > a {
    flex: 1;
    min-width: 0;
  }

  .bsp-h3-nav .bsp-has-dropdown > a::after,
  .bsp-h3-nav .bsp-mega-menu-parent > .bsp-mega-menu-trigger::after {
    display: none;
  }

  .bsp-h3-nav .bsp-submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--bsp-h3-text);
    appearance: none;
    -webkit-appearance: none;
  }

  .bsp-h3-nav .bsp-submenu-toggle__icon {
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    transition: transform 0.2s ease;
  }

  .bsp-h3-nav .bsp-submenu-toggle[aria-expanded="true"] .bsp-submenu-toggle__icon {
    transform: rotate(180deg);
  }

  .bsp-h3-nav .bsp-nav-menu .sub-menu {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    padding-left: 14px;
  }

  .bsp-h3-nav .bsp-has-dropdown.is-submenu-open > .sub-menu,
  .bsp-h3-nav .bsp-mega-menu-parent.is-open > .bsp-mega-menu {
    display: block;
    flex: 0 0 100%;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .bsp-h3-logo__title {
    font-size: 20px;
  }

  .bsp-h3-search__submit-text {
    display: none;
  }

  .bsp-h3-search__submit {
    padding: 0 16px;
  }

  .bsp-h3-promo-wrap {
    display: none;
  }
}
