#header .nerz-cart-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px 12px;
  color: #343434;
  border-radius: 8px;
  text-decoration: none;
  line-height: 1.3;
}
#header .nerz-cart-link:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #111;
}
#header .nerz-cart-link:focus-visible {
  outline: 3px solid #343434;
  outline-offset: 2px;
}
.nerz-cart-symbol {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}
.nerz-cart-count {
  position: absolute;
  right: -7px;
  top: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 50%;
  background: #343434;
  color: #fff;
  font:
    700 11px/1 Arial,
    sans-serif;
}
.nerz-cart-label {
  font-weight: 600;
}
.nerz-cart-total {
  padding-left: 12px;
  border-left: 1px solid rgba(52, 52, 52, 0.3);
  white-space: nowrap;
}
@media (max-width: 991px) {
  .nerz-cart-label,
  .nerz-cart-total {
    display: none;
  }
}

#header #userMenu {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: auto;
  min-height: 56px;
  padding: 6px 12px;
}
#header #userMenu > li {
  height: auto;
  margin: 0;
  padding: 0;
  line-height: normal;
  vertical-align: middle;
}
#header .box-search {
  padding: 0;
}
#header .search-box-form {
  margin: 0;
}
#header .search-box-form .input-group {
  display: flex;
  align-items: stretch;
}
#header .search-box-form .keywords {
  float: none;
  width: 1%;
  min-width: 0;
  flex: 1 1 auto;
  height: 44px;
}
#header .search-box-form .input-group-btn {
  display: flex;
  width: auto;
}
#header .search-box-form .submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  line-height: 1;
  background: #343434;
  border-color: #343434;
  color: #fff;
}
#header .search-box-form .submit-button:hover,
#header .search-box-form .submit-button:focus,
#header .search-box-form .submit-button:active {
  background: #191919;
  border-color: #191919;
  color: #fff;
}
#header .search-box-form .submit-button:focus-visible {
  outline: 3px solid #343434;
  outline-offset: 2px;
}
#header .search-box-form .fa-search {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  font-size: 18px;
  line-height: 18px;
}
#nerz-company-fields[hidden] {
  display: none !important;
}
@media (max-width: 991px) {
  #header #userMenu {
    gap: 0;
    padding: 6px 8px;
  }
}

.nerz-field-error {
  color: #a12118;
  font-weight: 600;
  margin: 6px 0 14px;
}
.nerz-field-error[hidden] {
  display: none !important;
}
#checkout-form input[type="checkbox"] {
  scroll-margin-top: 160px;
}
#checkout-form input[type="checkbox"]:focus-visible {
  outline: 3px solid #343434;
  outline-offset: 3px;
}
#nerz-checkout-server-errors {
  scroll-margin-top: 160px;
}

.nerz-coupon-section {
  clear: both;
  display: flow-root;
  margin: 24px 0;
}
.nerz-coupon-section .nerz-coupon-heading {
  display: block;
  float: none;
  position: static;
  width: 100%;
  margin: 0;
  padding: 0;
  font-size: 22px;
  line-height: 1.4;
  background: #ffed00;
}
.nerz-coupon-section .nerz-coupon-heading::before,
.nerz-coupon-section .nerz-coupon-heading::after {
  content: none;
}
.nerz-coupon-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 0;
  border-radius: 0;
  text-align: left;
  font: inherit;
  font-weight: 600;
  color: #343434;
  background: #ffed00;
}
.nerz-coupon-toggle:hover {
  background: #f2dd00;
  color: #111;
}
.nerz-coupon-toggle:focus-visible {
  outline: 3px solid #343434;
  outline-offset: -3px;
}
.nerz-coupon-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(225deg);
  margin-right: 4px;
}
.nerz-coupon-toggle[aria-expanded="false"] .nerz-coupon-chevron {
  transform: rotate(45deg);
}
.nerz-coupon-section .nerz-coupon-heading-static {
  padding: 12px 16px;
}
.nerz-coupon-section .well {
  margin: 0;
  border: 1px solid #eee;
  border-top: 0;
}
.nerz-coupon-section .input-group {
  display: flex;
  width: 100%;
}
.nerz-coupon-section .form-control {
  float: none;
  width: 1%;
  min-width: 0;
  flex: 1 1 auto;
  min-height: 44px;
}
.nerz-coupon-section .input-group-btn {
  display: flex;
  width: auto;
}
.nerz-coupon-section button[type="submit"] {
  min-height: 44px;
}

/* Preserve keyboard focus against legacy theme resets. */
#header .nerz-cart-link:focus-visible,
#header .search-box-form .submit-button:focus-visible,
.nerz-coupon-section .nerz-coupon-toggle:focus-visible {
  outline: 3px solid #343434 !important;
  outline-offset: 2px !important;
}

@media (max-width: 991px) {
  #header { height: auto; min-height: 185px; padding-bottom: 10px; }
  #site { margin-top: 220px; }
}

/* Match the Joomla mobile brand row; keep the shop search on its own row. */
#header .nerz-header-shimano {
  display: none;
}
@media (max-width: 991px) {
  #header {
    height: auto;
    min-height: 0;
    padding: 0;
    background: #fff;
  }
  #header .header-top > .container {
    width: 100%;
    max-width: none;
    padding: 0 15px;
  }
  #header .header-top > .container > .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(76px, 24vw, 94px) 44px 44px;
    grid-template-rows: 44px 44px;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 10px 0;
  }
  #header .header-top > .container > .row::before,
  #header .header-top > .container > .row::after {
    content: none;
  }
  #header .header-top .col-logo {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    min-width: 0;
    padding: 0;
  }
  #header .header-top .col-logo .inner,
  #header .header-top .col-logo .logo {
    padding: 0;
    margin: 0;
  }
  #header .header-top .col-logo img {
    width: 100px !important;
    max-width: 100%;
    height: auto;
    margin: 0;
  }
  #header .navMenus {
    display: contents;
  }
  #header .nerz-header-shimano {
    display: flex;
    align-items: center;
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  #header .nerz-header-shimano img {
    display: block;
    width: 100%;
    height: auto;
  }
  #header #userMenu {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    gap: 0;
  }
  #header #userMenu .box-cart {
    margin: 0;
  }
  #header .nerz-cart-link {
    display: flex;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 0;
  }
  #header .nerz-cart-symbol svg {
    width: 24px;
    height: 24px;
  }
  #header .nerz-cart-count {
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 10px;
    right: -6px;
    top: -5px;
  }
  #header .main-navigation {
    grid-column: 4;
    grid-row: 1;
    position: static;
    width: 44px;
    min-height: 0;
    margin: 0;
    border: 0;
  }
  #header .navbar-header {
    float: none;
    margin: 0;
  }
  #header .navbar-toggleMe {
    position: static;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-height: 44px !important;
    padding: 0 !important;
    margin: 0;
    background: #3c3c3c;
  }
  #header .navbar-collapse {
    position: absolute;
    width: 0;
    padding: 0;
    border: 0;
  }
  #header .boxSearchMobile {
    grid-column: 1 / -1;
    grid-row: 2;
    float: none;
    width: 100%;
    margin: 0;
  }
  #header .boxSearchMobile .box-search {
    max-width: none;
  }
  #header .boxSearchMobile .input-group {
    width: 100%;
  }
  #header .boxSearchMobile .keywords {
    font-size: 16px;
  }
  #header .navbar-toggleMe:focus-visible,
  #header .nerz-header-shimano:focus-visible,
  #header .logo a:focus-visible,
  #header .keywords:focus-visible {
    outline: 3px solid #343434 !important;
    outline-offset: 2px !important;
  }
  body.nav-open #header .navbar-nav {
    top: 64px;
    height: calc(100% - 64px);
    max-width: calc(100vw - 74px);
    padding-top: 10px;
    overflow-y: auto;
  }
  #site #content {
    margin-top: 0 !important;
  }
  #site {
    margin-top: 118px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #header .navbar-toggleMe .icon-bar {
    transition: none;
  }
}

/* Scoped responsive refinements: homepage, category controls and footer. */
#footer.nerz-service-footer nav .nerz-privacy-trigger {
  max-width: 100%;
  padding: 5px 0;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

@media (max-width: 767px) {
  #startpage-content .boxYellow.placeholder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 24px 20px;
    text-align: center;
  }

  #startpage-content .boxYellow.placeholder > p {
    grid-column: 1 / -1;
    width: auto;
    max-width: 350px;
    margin: 0 auto 8px;
    text-align: center;
  }

  #startpage-content .boxYellow.placeholder > br {
    display: none;
  }

  #startpage-content .boxYellow.placeholder > .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    white-space: normal;
  }

  #startpage-content .boxYellow.placeholder > .btn:focus-visible,
  #filterNav #files > .headline:focus-visible,
  .product-listing
    .products-sort
    .bootstrap-select
    > .dropdown-toggle:focus-visible {
    outline: 3px solid #135c9c;
    outline-offset: 3px;
  }

  #bigPic > .container > h2 {
    font-size: 22px;
    line-height: 1.3;
    margin-top: 8px;
  }

  #filterNav #files > .headline,
  .product-listing .products-sort .bootstrap-select > .dropdown-toggle {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
    height: auto;
    padding: 12px 40px 12px 14px !important;
    border: 1px solid #3d3d3d;
    border-radius: 0;
    background-color: #3d3d3d !important;
    color: #fff;
    font-family: neotechregular, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
    line-height: 22px;
    text-align: left;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
  }

  #filterNav #files > .headline {
    position: relative;
    margin: 0 0 16px !important;
  }

  #filterNav #files > .headline::before {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    content: "";
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-bottom: 0;
    border-top-color: #fff;
    margin: 0;
    float: none !important;
  }

  #filterNav #files > .headline::after {
    display: none;
  }

  #filterNav #files > .headline[aria-expanded="true"]::before {
    transform: translateY(-50%) rotate(180deg);
  }

  .product-listing .products-sort .bootstrap-select {
    min-height: 48px;
    height: auto;
  }

  #filterNav #files > .headline:hover,
  .product-listing .products-sort .bootstrap-select > .dropdown-toggle:hover,
  .product-listing .products-sort .bootstrap-select.open > .dropdown-toggle {
    background-color: #252525 !important;
    border-color: #252525;
    color: #fff;
  }
}

@media (max-width: 479px) {
  #startpage-content .boxYellow.placeholder {
    grid-template-columns: minmax(0, 1fr);
  }

  #bigPic > .container > h2 {
    font-size: 20px;
  }

  #footer.nerz-service-footer nav .nerz-privacy-trigger {
    padding: 7px 0;
    font-size: 14px;
  }
}

@media (max-width: 767px) {
  #product .product-manufacturer.image.hidden-lg {
    margin: 8px 0 0;
  }
  #product .product-manufacturer.image.hidden-lg img {
    width: 130px;
    height: auto;
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    padding: 0;
    border: 0;
  }
  #product .product-info {
    margin-top: 12px;
    padding: 16px 0 24px;
  }
  #product #lager {
    margin: 12px 0 16px;
  }
}

@media (max-width: 479px) {
  #product .add-to-cart .form-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }
  #product .add-to-cart .qty-box {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }
  #product .add-to-cart .btn-cart {
    display: flex;
    flex: 1 0 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 14px;
    white-space: normal;
  }
  #product .add-to-cart .btn-cart > span {
    flex: 0 1 auto;
  }
}
@media (max-width: 767px) {
  #xt_cart_popup .modal-dialog {
    width: auto;
    max-width: calc(100% - 20px);
    margin: 10px;
  }
  #xt_cart_popup .modal-header + .modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  #xt_cart_popup .modal-header + .modal-footer::before,
  #xt_cart_popup .modal-header + .modal-footer::after {
    display: none;
  }
  #xt_cart_popup .modal-header + .modal-footer > .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    float: none !important;
    white-space: normal;
  }
}
