/* Top utility bar */
#top {
  padding: 8px 0;
  margin-bottom: 14px;
  position: relative;
  z-index: 1100;
  overflow: visible;
}

#top .container,
#top .maskez-top-bar {
  overflow: visible;
}

#top .maskez-top-right .dropdown-menu {
  z-index: 1101;
}

#top .maskez-top-right .dropdown-toggle::after {
  display: none;
}

#top .maskez-top-right .maskez-account-caret {
  font-size: 0.75em;
  margin-left: 2px;
}

#top .maskez-top-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#top .maskez-top-left,
#top .maskez-top-right {
  float: none !important;
}

#top .maskez-top-left {
  flex: 1 1 auto;
  min-width: 0;
}

#top .maskez-top-right {
  flex: 0 0 auto;
}

#top .maskez-top-left .list-inline,
#top .maskez-top-right .list-inline {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 0;
}

#top .maskez-top-right a,
#top .maskez-top-right .dropdown > a {
  color: #888 !important;
  text-shadow: 0 1px 0 #fff;
}

#top .maskez-top-right a:hover,
#top .maskez-top-right .dropdown > a:hover {
  color: #444 !important;
}

#top .maskez-shipping-notice {
  max-width: 100%;
}

#top .maskez-shipping-notice-inner {
  max-width: 100%;
}

#top .maskez-shipping-notice-text {
  white-space: normal;
}

/* Main header */
.maskez-main-header {
  margin-bottom: 8px;
}

.maskez-main-header .maskez-header-row {
  align-items: center;
}

.maskez-main-header #logo {
  margin-bottom: 0;
}

.maskez-main-header #logo img,
.maskez-logo-img {
  max-width: 200px;
  height: auto;
  display: block;
}

.maskez-main-header #search,
.maskez-main-header #search.maskez-search {
  width: 100%;
  margin-bottom: 0 !important;
}

.maskez-main-header #search .maskez-search-bar {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

.maskez-main-header #search .maskez-search-input {
  min-width: 0;
  flex: 1 1 auto;
}

.maskez-main-header #search .maskez-search-submit {
  flex: 0 0 auto;
}

.maskez-main-header .maskez-header-row {
  align-items: center;
}

.maskez-main-header .maskez-header-cart #header-cart {
  margin-bottom: 0;
  width: 100%;
}

.maskez-main-header #header-cart .dropdown {
  width: 100%;
}

.maskez-main-header #header-cart .btn-lg {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tablet + desktop: shipping and icons stay on one line */
@media (min-width: 768px) {
  #top .maskez-top-bar {
    flex-wrap: nowrap;
    align-items: center;
  }

  #top .maskez-top-left,
  #top .maskez-top-right {
    width: auto;
    max-width: none;
  }

  #top .maskez-top-right .list-inline {
    justify-content: flex-end;
  }
}

/* Tablet (<992px): samo ikonice u top baru + layout ispod */
@media (max-width: 991.98px) {
  #top .maskez-top-right .list-inline {
    gap: 6px 10px;
  }

  .maskez-main-header #logo {
    text-align: center;
  }

  .maskez-main-header #logo img {
    max-width: 170px;
  }

  .maskez-main-header .maskez-header-logo {
    margin-bottom: 4px;
  }

  .maskez-main-header .maskez-header-search {
    margin-bottom: 8px;
  }

  .maskez-main-header .maskez-header-cart {
    margin-bottom: 4px;
  }
}

/* Mobile: poruka lijevo, ikonice desno — isti red */
@media (max-width: 767.98px) {
  #top {
    padding: 6px 0;
    margin-bottom: 10px;
  }

  #top .maskez-top-bar {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  #top .maskez-top-left {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
  }

  #top .maskez-top-left .list-inline {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  #top .maskez-top-right {
    flex: 0 0 auto;
    width: auto;
  }

  #top .maskez-top-right .list-inline {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  #top .maskez-shipping-notice {
    min-width: 0;
  }

  #top .maskez-shipping-notice-inner {
    font-size: 10px;
    gap: 5px;
    padding: 3px 7px;
    max-width: 100%;
  }

  #top .maskez-shipping-countdown {
    font-size: 9px;
    min-width: 3.8rem;
    padding: 2px 6px;
  }

  #top a {
    font-size: 1rem;
  }

  .maskez-main-header #logo img {
    max-width: 150px;
  }

  #search .form-control-lg,
  #search .btn-lg {
    height: 38px;
    font-size: 14px;
  }

  #search .btn-lg {
    padding: 0 14px;
  }

  #header-cart .btn-lg {
    height: 42px;
    font-size: 14px;
    padding: 0 12px;
  }

  #header-cart .dropdown-menu li {
    min-width: 0;
    width: 100%;
  }

  #header-cart .dropdown-menu {
    width: calc(100vw - 24px);
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  #top .maskez-top-meta {
    display: none !important;
  }
}

/* Uski mobil (≤450px): poruka centrirana, ikonice u redu ispod desno */
@media (max-width: 450px) {
  #top .maskez-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }

  #top .maskez-top-left {
    width: 100%;
    flex: none;
  }

  #top .maskez-top-left .list-inline {
    justify-content: center;
    width: 100%;
  }

  #top .maskez-shipping-notice {
    justify-content: center;
    width: 100%;
  }

  #top .maskez-top-right {
    width: 100%;
    flex: none;
  }

  #top .maskez-top-right .list-inline {
    justify-content: center;
    width: 100%;
    gap: 10px;
  }
}

/* Desktop fine-tuning */
@media (min-width: 992px) {
  .maskez-main-header .maskez-header-row {
    flex-wrap: nowrap;
    align-items: center;
  }

  .maskez-main-header .maskez-header-logo {
    align-self: center;
  }

  .maskez-main-header .maskez-header-logo #logo,
  .maskez-main-header .maskez-header-logo #logo a {
    display: block;
    width: auto;
    max-width: 100%;
  }

  .maskez-main-header .maskez-header-logo #logo img {
    width: auto !important;
    max-width: 200px !important;
    min-width: 120px;
    height: auto !important;
    flex-shrink: 0;
  }

  .maskez-main-header .maskez-header-search {
    display: flex;
    align-items: center;
    padding-left: 8px;
    padding-right: 8px;
  }

  .maskez-main-header .maskez-header-search #search,
  .maskez-main-header .maskez-header-search .maskez-search {
    margin-bottom: 0;
    width: 100%;
  }

  .maskez-main-header .maskez-header-cart {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-left: 4px;
  }

  .maskez-main-header .maskez-header-cart #header-cart {
    width: auto;
    max-width: 100%;
  }

  .maskez-main-header #header-cart .dropdown {
    width: auto;
    display: block;
  }

  .maskez-main-header #header-cart .btn-lg {
    width: auto;
    min-width: 0;
    justify-content: center;
  }
}
