/* v1.0.3 — one header component, independent of page and device name.
 * Scoped overrides isolate the header from legacy .shell/.brand/span rules.
 * Keep layout changes here instead of appending device-specific patches.
 */
body.idpr-redesign-page .idpr-shared-header {
  box-sizing: border-box;
  position: relative;
  z-index: 30;
  background: #fffef9;
}
body.idpr-redesign-page .idpr-shared-header .idpr-shared-brand {
  display: grid !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  column-gap: 10px !important;
  min-width: 0 !important;
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  text-decoration: none !important;
}
body.idpr-redesign-page .idpr-shared-header .idpr-shared-brand::before {
  display: block !important;
  width: 40px !important;
  height: 40px !important;
  grid-column: 1;
  grid-row: 1;
  background-size: contain !important;
}
body.idpr-redesign-page .idpr-shared-header .idpr-brand-copy {
  display: block;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: auto;
}
body.idpr-redesign-page .idpr-shared-header .idpr-brand-copy > strong {
  display: block;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  color: #173d2a !important;
  font-family: Georgia, 'Times New Roman', serif !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
}
body.idpr-redesign-page .idpr-shared-header .idpr-brand-copy > small {
  display: block;
  width: auto;
  margin: 5px 0 0;
  white-space: normal;
}
body.idpr-redesign-page .idpr-shared-header .idpr-store-cart {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}
body.idpr-redesign-page .idpr-shared-header .idpr-cart-icon {
  display: none;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
body.idpr-redesign-page .idpr-shared-header .idpr-cart-label {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  flex: 0 0 auto !important;
  border-radius: 0;
  background: none;
  color: inherit;
}
body.idpr-redesign-page .idpr-shared-header .idpr-cart-count {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 5px !important;
  border-radius: 999px;
  background: #236444;
  color: #fff !important;
  font: 700 12px/1 Arial, sans-serif !important;
}
body.idpr-redesign-page .idpr-shared-header a:focus-visible,
body.idpr-redesign-page .idpr-shared-header button:focus-visible {
  outline: 2px solid #236444;
  outline-offset: 3px;
}

/* Martfury draws this arrow with ElegantIcons. On a first Android visit the
 * font may not be available yet, leaving a missing-character box. This caret
 * uses the existing button and click behavior without any font dependency. */
body.idpr-redesign-page #scroll-top.backtotop > i.arrow_carrot_up_alt {
  display: grid !important;
  width: 100% !important;
  height: 100% !important;
  place-items: center;
  font-family: inherit !important;
  font-size: 0 !important;
  line-height: 1 !important;
}
body.idpr-redesign-page #scroll-top.backtotop > i.arrow_carrot_up_alt::before {
  content: "" !important;
  display: block !important;
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  border-top: 3px solid currentColor;
  border-left: 3px solid currentColor;
  transform: translateY(3px) rotate(45deg);
  font-family: inherit !important;
}

/* Collapse navigation before it competes with the full brand name. */
@media (max-width: 1000px) {
  body.idpr-redesign-page .idpr-home .sober-header-inner,
  body.idpr-redesign-page header.idpr-shop-header,
  body.idpr-redesign-page header.idpr-product-header,
  body.idpr-redesign-page header.idpr-commerce-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 76px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 12px 20px !important;
    padding-left: max(20px, env(safe-area-inset-left)) !important;
    padding-right: max(20px, env(safe-area-inset-right)) !important;
    gap: 8px !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-shared-brand {
    flex: 1 1 auto !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    column-gap: 8px !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-shared-brand::before {
    width: 28px !important;
    height: 28px !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-brand-copy > strong {
    font-size: 16px !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-brand-copy > small {
    display: none !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-store-header-actions {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    gap: 8px !important;
    margin: 0 !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-store-menu-toggle,
  body.idpr-redesign-page .idpr-shared-header .idpr-store-cart {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    box-sizing: border-box;
    min-width: 44px !important;
    min-height: 44px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 8px !important;
    color: #173d2a !important;
    font: 600 14px/1.2 Arial, sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    gap: 5px !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-store-menu-toggle {
    border: 1px solid #d8ded5 !important;
    border-radius: 999px;
    background: #fffef9 !important;
    cursor: pointer;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-store-cart {
    padding: 0 !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-cart-label {
    display: none !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-cart-icon {
    display: inline-block !important;
    margin: 0 !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-store-nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 20px !important;
    right: 20px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 12px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 4px !important;
    box-sizing: border-box;
    z-index: 50;
    background: #fffef9;
    border: 1px solid #d8ded5;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 30px rgba(23,61,42,.12);
  }
  body.idpr-redesign-page .idpr-shared-header.idpr-menu-open .idpr-store-nav {
    display: flex !important;
  }
  body.idpr-redesign-page .idpr-shared-header .idpr-store-nav a {
    display: flex !important;
    align-items: center;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px !important;
    white-space: normal;
    font: 600 15px/1.4 Arial, sans-serif !important;
  }
}
