/* Casewear desktop header — one-line layout inspired by the supplied reference. */
@font-face {
  font-family: "Neue Einstellung CW";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/neue-einstellung-normal.woff2") format("woff2");
}

/* One crisp wordmark on desktop, tablet and mobile. */
#header .logo-text {
  font-family: "Neue Einstellung CW", "Inter", sans-serif !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: .12px !important;
  text-transform: lowercase !important;
  white-space: nowrap;
  color: #111 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  font-synthesis: weight;
}

@media (min-width: 1200px) {
  #header {
    position: relative;
    height: 76px;
    border-top: 3px solid #111;
    border-bottom: 1px solid #e7e7e7;
    box-shadow: none;
  }

  #header .jms-row.header {
    position: relative;
    z-index: 1002;
    height: 72px;
    background: #fff;
  }

  #header .jms-row.header .container-fluid,
  #header .jms-row.header .container-fluid > .row {
    height: 100%;
  }

  #header .jms-row.header .container-fluid {
    padding-right: 28px;
    padding-left: 28px;
  }

  #header .jms-row.header .container-fluid > .row {
    margin-right: 0;
    margin-left: 0;
  }

  #header .jms-row.header .col-logo {
    z-index: 3;
    width: 124px;
    max-width: 124px;
    padding-right: 0;
    padding-left: 0;
    flex: 0 0 124px;
  }

  #header .logo {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
  }

  #header .logo-text {
    font-family: "Neue Einstellung CW", "Inter", sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .15px;
    color: #111;
  }

  /* The permanent search bar becomes the existing compact search trigger. */
  #header .search-no-popup {
    display: none !important;
  }

  #header .right-module-header {
    z-index: 4;
    display: flex;
    align-items: center;
    width: auto;
    max-width: none;
    margin-left: auto;
    padding: 0;
    flex: 0 0 auto;
    gap: 17px;
  }

  #header .right-module-header > .addon-box,
  #header .right-module-header > .addon-box:first-child {
    display: block !important;
    width: 21px;
    height: 28px;
    margin: 0 !important;
  }

  #header .right-module-header > .addon-box:nth-child(n+5) {
    display: none !important;
  }

  #header .right-module-header .btn-search,
  #header .right-module-header .account,
  #header .right-module-header .wishlist_top.home_page,
  #header .right-module-header .cart-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 28px;
    padding: 0;
    color: #111;
  }

  #header .right-module-header svg {
    width: 20px;
    height: 20px;
  }

  #header .right-module-header .btn-search > span:first-child,
  #header .right-module-header .icon-txt {
    display: none !important;
  }

  #header .right-module-header .ajax_cart_quantity {
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #111;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
  }

  /* Place the brand navigation between the logo and the utility icons. */
  #header .jms-row.menu {
    position: absolute;
    z-index: 1003;
    top: 3px;
    right: 188px;
    left: 150px;
    height: 72px;
    background: transparent;
  }

  #header .jms-row.menu .container-fluid {
    height: 72px;
    padding: 0;
  }

  #header #jms-megamenu-container,
  #header .jms-row.menu .jms-megamenu,
  #header .jms-row.menu .jms-megamenu > ul {
    width: 100%;
    height: 72px;
  }

  #header .jms-row.menu .jms-megamenu > ul {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    white-space: nowrap;
  }

  #header .jms-row.menu .jms-megamenu > ul > li {
    display: block;
    padding: 0;
    flex: 0 0 auto;
  }

  #header .jms-row.menu .jms-megamenu > ul > li > a {
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    line-height: 72px;
    letter-spacing: .05px;
  }

  #header .jms-row.menu .jms-megamenu > ul > li > a::before {
    bottom: 18px;
  }

  /* Every desktop mega-menu uses the same full-viewport canvas as Samsung. */
  #header .jms-row.menu .jms-megamenu > ul > li > .mega-dropdown-menu {
    position: fixed !important;
    top: 76px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 76px);
    margin: 0 !important;
    transform: none !important;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    border-right: 0;
    border-left: 0;
    background: #fff;
  }

  #header .jms-row.menu .jms-megamenu > ul > li > .mega-dropdown-menu > .mega-dropdown-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding-right: 24px;
    padding-left: 24px;
    box-sizing: border-box;
  }

  #header .jms-row.header.fixed {
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 64px;
    border-top: 0;
    border-bottom: 1px solid rgba(17, 17, 17, .08);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 8px 24px rgba(17, 17, 17, .08) !important;
  }

  #header .jms-row.header.fixed .container-fluid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 64px !important;
    max-width: none;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
  }

  #header .jms-row.header.fixed .container-fluid > .row {
    display: flex;
    align-items: center;
    width: 100%;
    height: 64px !important;
  }

  #header .jms-row.header.fixed .col-logo {
    display: flex !important;
    align-items: center;
    height: 64px;
  }

  #header .jms-row.header.fixed + .jms-row.menu {
    position: fixed;
    top: 0;
    height: 64px;
    background: transparent;
    box-shadow: none !important;
  }

  #header .jms-row.header.fixed .logo-text {
    font-size: 24px;
    opacity: 1;
    visibility: visible;
  }

  #header .jms-row.header.fixed .right-module-header,
  #header .jms-row.header.fixed .right-module-header > .addon-box,
  #header .jms-row.header.fixed .right-module-header > .addon-box:first-child,
  #header .jms-row.header.fixed .right-module-header .btn-search,
  #header .jms-row.header.fixed .right-module-header .account,
  #header .jms-row.header.fixed .right-module-header .wishlist_top.home_page,
  #header .jms-row.header.fixed .right-module-header .cart-icon {
    height: 30px;
  }

  #header .jms-row.header.fixed .right-module-header {
    align-self: center;
  }

  #header .jms-row.header.fixed .right-module-header svg {
    width: 19px;
    height: 19px;
  }

  #header .jms-row.header.fixed + .jms-row.menu .container-fluid,
  #header .jms-row.header.fixed + .jms-row.menu #jms-megamenu-container,
  #header .jms-row.header.fixed + .jms-row.menu .jms-megamenu,
  #header .jms-row.header.fixed + .jms-row.menu .jms-megamenu > ul {
    height: 64px;
  }

  #header .jms-row.header.fixed + .jms-row.menu .jms-megamenu > ul > li > a {
    line-height: 64px;
  }

  #header .jms-row.header.fixed + .jms-row.menu .jms-megamenu > ul > li > a::before {
    bottom: 14px;
  }

  #header .jms-row.header.fixed + .jms-row.menu .jms-megamenu > ul > li > .mega-dropdown-menu {
    top: 64px !important;
    max-height: calc(100vh - 64px);
  }
}

@media (max-width: 1199px) {
  #header .jms-row.header {
    min-height: 64px;
    border-bottom: 1px solid rgba(17, 17, 17, .08);
    background: #fff;
    box-shadow: 0 4px 14px rgba(17, 17, 17, .05);
  }

  #header .logo {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  #header .logo-text {
    font-size: 25px !important;
    transform: translateY(-1px);
  }

  #header .right-module-header svg {
    width: 22px;
    height: 22px;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  #header .logo-text {
    font-size: 25px !important;
  }
}

@media (max-width: 767px) {
  #header .logo-text {
    font-size: 24px !important;
  }

  #header .right-module-header svg {
    width: 21px;
    height: 21px;
  }
}

@media (max-width: 374px) {
  #header .logo-text {
    font-size: 22px !important;
  }
}

@media (min-width: 1200px) and (max-width: 1365px) {
  #header .jms-row.header .container-fluid {
    padding-right: 22px;
    padding-left: 22px;
  }

  #header .jms-row.header .col-logo {
    width: 116px;
    max-width: 116px;
    flex-basis: 116px;
  }

  #header .logo-text {
    font-size: 25px;
  }

  #header .right-module-header {
    gap: 14px;
  }

  #header .jms-row.menu {
    right: 152px;
    left: 136px;
  }

  #header .jms-row.menu .jms-megamenu > ul > li > a {
    padding-right: 7px;
    padding-left: 7px;
    font-size: 11px;
  }
}

/* Compact, useful search drawer: prominent input, popular shortcuts, product results. */
body.open-ajax-search {
  overflow: hidden;
}

body.open-ajax-search::before {
  position: fixed;
  z-index: 1000;
  inset: 0;
  content: "";
  background: rgba(17, 17, 17, .34);
  backdrop-filter: blur(1px);
}

#header #search-form {
  box-sizing: border-box;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

body.open-ajax-search #header .jms_ajax_search.cw-search-open #search-form {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

#header #search-form .modal-dialog,
#header #search-form .modal-content.container {
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff;
  box-shadow: none !important;
}

#header #search-form .search-box {
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
}

#header #search-form .label-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
}

#header #search-form .label-form p {
  margin: 0;
  color: #666;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

#header #search-form .label-form i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #555;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}

#header #search-form .label-form i:hover {
  background: #f2f2f2;
  color: #111;
}

#header #search-form .label-form i svg {
  width: 17px;
  height: 17px;
}

#header #search-form form.searchbox {
  position: relative;
  display: block !important;
  width: 100%;
  height: 56px !important;
  margin: 0 !important;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(17, 17, 17, .03);
  transition: border-color .18s ease, box-shadow .18s ease;
}

#header #search-form form.searchbox:focus-within {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, .07);
}

#header #search-form form.searchbox::before,
#header #search-form form.searchbox::after {
  display: none !important;
}

#header #search-form .ajax_search {
  width: 100% !important;
  height: 54px !important;
  margin: 0 !important;
  padding: 0 58px 0 18px !important;
  border: 0 !important;
  border-radius: 8px !important;
  outline: 0 !important;
  background-color: transparent !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='23' height='23' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='1.7' stroke-linecap='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.8'/%3E%3Cpath d='m16 16 4.2 4.2'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 18px center !important;
  box-shadow: none !important;
  color: #111 !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 54px !important;
}

#header #search-form .ajax_search::placeholder {
  color: #8a8a8a;
  opacity: 1;
}

#header #search-form .popular-keywords {
  margin: 13px 0 0 !important;
  color: #555;
}

#header #search-form .popular-keywords-title {
  display: inline-block;
  margin: 0 14px 0 0 !important;
  color: #777;
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  text-transform: none;
}

#header #search-form .popular-keywords ul {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
  gap: 8px;
  list-style: none;
  vertical-align: top;
}

#header #search-form .popular-keywords li {
  margin: 0 !important;
  padding: 0 !important;
}

#header #search-form .popular-keywords a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid #e3e3e3;
  border-radius: 15px;
  background: #fafafa;
  color: #333;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color .18s ease, background-color .18s ease;
}

#header #search-form .popular-keywords a:hover {
  border-color: #111;
  background: #fff;
  color: #111;
}

#header #search_result:empty {
  display: none;
}

#header #search_result .result_div {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #ececec;
}

#header #search_result .results {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

#header #search_result .item {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

#header #search_result .item:hover {
  border-color: #cfcfcf;
  box-shadow: 0 8px 20px rgba(17, 17, 17, .07);
  transform: translateY(-2px);
}

#header #search_result .left-img {
  float: none !important;
  width: 100% !important;
  margin: 0 0 8px !important;
}

#header #search_result .left-img a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 92px;
  overflow: hidden;
  border-radius: 5px;
  background: #f7f7f7;
}

#header #search_result .left-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

#header #search_result .right-info {
  display: flex;
  flex-direction: column;
  float: none !important;
  width: 100% !important;
  min-height: 57px;
  padding: 0 !important;
}

#header #search_result .right-info > a {
  display: -webkit-box;
  overflow: hidden;
  color: #222;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#header #search_result .right-info .price {
  display: block;
  margin-top: auto;
  padding-top: 7px;
  color: #111;
  font-size: 14px;
  font-weight: 700;
}

@media (min-width: 1200px) {
  #header #search-form {
    position: fixed !important;
    z-index: 1105 !important;
    top: 76px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: auto !important;
    max-height: calc(100vh - 76px);
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateY(-12px);
    box-shadow: 0 18px 38px rgba(17, 17, 17, .12) !important;
  }

  body.open-ajax-search #header .jms_ajax_search.cw-search-open #search-form {
    transform: translateY(0) !important;
  }

  #header .jms-row.header.fixed #search-form {
    top: 64px !important;
    max-height: calc(100vh - 64px);
  }

  #header #search-form .modal-content.container {
    padding: 22px 30px 24px !important;
  }
}

@media (max-width: 1199px) {
  #header #search-form {
    position: fixed !important;
    z-index: 1105 !important;
    top: 64px !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 64px) !important;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateY(-10px);
  }

  body.open-ajax-search #header .jms_ajax_search.cw-search-open #search-form {
    transform: translateY(0) !important;
  }

  #header #search-form .modal-content.container {
    padding: 16px !important;
  }

  #header #search-form .search-box {
    max-width: 720px;
  }

  #header #search-form .label-form p {
    font-size: 12px;
  }

  #header #search-form form.searchbox {
    height: 52px !important;
  }

  #header #search-form .ajax_search {
    height: 50px !important;
    padding-right: 52px !important;
    background-position: right 15px center !important;
    font-size: 16px !important;
    line-height: 50px !important;
  }

  #header #search-form .popular-keywords-title {
    display: block;
    margin-right: 0 !important;
    line-height: 24px;
  }

  #header #search-form .popular-keywords ul {
    display: flex;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px !important;
    scrollbar-width: none;
  }

  #header #search-form .popular-keywords ul::-webkit-scrollbar {
    display: none;
  }

  #header #search_result .results {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 7px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  #header #search_result .item {
    width: min(44vw, 190px);
    min-width: min(44vw, 190px);
    scroll-snap-align: start;
  }
}

/* Keep the cart drawer above the mega-menu when it is open. */
body:has(#cart_block .cart-icon.active) #header .jms-row.menu {
  z-index: 999 !important;
}

body:has(#cart_block .cart-icon.active) #header .jms-row.menu .mega-dropdown-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body:has(#cart_block .cart-icon.active) #header .jms-row.menu > * {
  pointer-events: none !important;
}

#header #search_result .cw-search-loading,
#header #search_result .cw-search-empty {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
  color: #666;
  font-size: 14px;
  text-align: center;
}
