/* Top announce strip + cart + buy box */

:root {
  --strip-h: 32px;
  --bar-h: 68px;
}

html.has-announce-strip {
  --nav-h: calc(var(--bar-h) + var(--strip-h));
}

html.has-announce-strip .site-header,
html.has-announce-strip header.site-header {
  top: var(--strip-h) !important;
  height: var(--bar-h) !important;
  min-height: var(--bar-h) !important;
}

.announce-strip {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5100;
  height: var(--strip-h);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0 2.5rem 0 1rem;
  background: #0b1f33;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
}

.announce-strip strong {
  color: #7ee0e0;
  font-weight: 800;
}

.announce-strip a {
  color: #7ee0e0;
  text-decoration: underline;
}

.announce-strip__close {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  z-index: 2;
  overflow: visible;
  position: relative;
}

.nav-search,
.site-header .nav-search,
.header-tools .nav-search,
.nav-search.nav-cta,
.site-header .nav-search.nav-cta,
.header-tools .nav-search.nav-cta {
  position: relative;
  display: flex !important;
  align-items: center;
  padding: 0 !important;
  margin: 0;
  background: transparent !important;
  border: none !important;
  min-width: 168px !important;
  width: 210px !important;
  max-width: 240px !important;
  height: auto !important;
  line-height: 1 !important;
  box-shadow: none;
  flex: 0 1 210px !important;
  white-space: normal !important;
}

.site-header a.btn.nav-cta,
.header-tools a.btn.nav-cta,
.site-header a.nav-cta.btn-primary {
  display: none !important;
}

.nav-search-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #dce5ec;
  border-radius: 8px;
  background: #fff;
  color: #0b1f33;
  cursor: pointer;
  padding: 0;
}

.nav-search-toggle:hover,
.nav-search.is-open .nav-search-toggle {
  border-color: #00a6a6;
  color: #00a6a6;
}

.nav-search-toggle svg,
.nav-search-go svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-search-form {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  background: #f5f8fa;
  border: 1px solid #dce5ec;
  border-radius: 8px;
  overflow: visible;
}

.nav-search-form input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 38px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 8px 0 0 8px;
  font-family: inherit;
  font-size: 0.85rem;
  color: #0b1f33;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.nav-search-form input[type="search"]:focus {
  outline: none;
}

.nav-search-form:focus-within {
  border-color: #00a6a6;
  background: #fff;
}

.nav-search-go {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0 7px 7px 0;
  background: #00a6a6;
  color: #fff;
  cursor: pointer;
}

.nav-search-go:hover {
  background: #008080;
}

.nav-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 5300;
  width: 100%;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-height: 260px;
  overflow: auto;
  padding: 0.4rem;
  background: #fff;
  border: 1px solid #dce5ec;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(11, 31, 51, 0.14);
}

.nav-search-results[hidden] {
  display: none !important;
}

.nav-search-hit {
  display: flex !important;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.4rem;
  border-radius: 8px;
  color: #0b1f33 !important;
  font-size: 0.86rem !important;
  font-weight: 600;
  text-decoration: none;
  min-height: 0 !important;
  justify-content: flex-start !important;
}

.nav-search-hit:hover {
  background: #f5f8fa;
  color: #00a6a6 !important;
}

.nav-search-hit img {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  background: #f5f8fa;
}

.nav-search-empty {
  margin: 0;
  padding: 0.4rem;
  font-size: 0.84rem;
  color: #6b7280;
}

@media (max-width: 760px) {
  .nav-search,
  .site-header .nav-search,
  .header-tools .nav-search {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    flex: 0 0 40px !important;
  }

  .nav-search-toggle {
    display: inline-flex;
  }

  .nav-search-form {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 5200;
    width: min(340px, calc(100vw - 2rem));
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #dce5ec;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(11, 31, 51, 0.14);
  }

  .nav-search.is-open .nav-search-form {
    display: flex;
  }

  .nav-search-form input[type="search"] {
    background: #f5f8fa;
    border-radius: 8px;
  }

  .nav-search-go {
    border-radius: 8px;
  }
}

/* Desktop: cart stays in the nav; header-tools stays visible for language */
@media (min-width: 1121px) {
  .header-tools {
    display: flex !important;
    flex-shrink: 0;
    margin-left: 0.35rem;
    order: 3;
  }

  .header-tools .nav-cart {
    display: none !important;
  }

  .site-header .nav-inner {
    gap: 0.75rem;
  }

  .site-header .brand {
    order: 1;
  }

  .site-header .nav-links {
    order: 2;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 1.15rem;
    min-width: 0;
  }

  .site-header a.btn.nav-cta,
  .header-tools a.btn.nav-cta {
    display: none !important;
  }

  .header-tools {
    flex-wrap: nowrap !important;
    gap: 0.45rem;
  }
}

.nav-cart {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-weight: 700 !important;
  color: #0b1f33 !important;
  white-space: nowrap;
}

.nav-cart svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.nav-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #0f5d73;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
}

.product-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 1.25rem;
}

.product-price {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0b1f33;
  letter-spacing: -0.03em;
}

.product-price s {
  margin-left: 0.45rem;
  font-size: 1rem;
  font-weight: 600;
  color: #9ca3af;
}

.product-qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #dce5ec;
  border-radius: 8px;
  overflow: hidden;
  height: 46px;
}

.product-qty button {
  width: 42px;
  height: 46px;
  border: 0;
  background: #f5f8fa;
  cursor: pointer;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0b1f33;
}

.product-qty input {
  width: 52px;
  height: 46px;
  border: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
}

.btn-cart {
  min-height: 46px;
  padding: 0.75rem 1.4rem;
  border: 0;
  border-radius: 8px;
  background: #0f5d73;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.btn-cart:hover {
  background: #00a6a6;
}

.btn-cart.is-added {
  background: #0b1f33;
}

.card-cart-btn {
  margin: 0 1.1rem 1.1rem;
  width: calc(100% - 2.2rem);
  min-height: 42px;
  border: 1.5px solid #0f5d73;
  background: #fff;
  color: #0f5d73;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.card-cart-btn:hover,
.card-cart-btn.is-added {
  background: #0f5d73;
  color: #fff;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%) translateY(12px);
  background: #0b1f33;
  color: #fff;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 6000;
  transition: opacity 0.25s, transform 0.25s;
}

.cart-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #dce5ec;
  border-radius: 12px;
  overflow: hidden;
}

.cart-table th,
.cart-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid #eef2f5;
  vertical-align: middle;
}

.cart-table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f5f8fa;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.cart-item img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  background: #f5f8fa;
}

.cart-remove {
  border: 0;
  background: none;
  color: #b42318;
  font-weight: 700;
  cursor: pointer;
}

.cart-empty {
  padding: 2rem 0;
  color: #6b7280;
}

.cart-totals {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cart-totals strong {
  font-size: 1.25rem;
}

.trust-strip--global {
  margin-top: 0;
}

.related-products {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5edf2;
}

.related-products h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: #0b1f33;
}

.cart-toast a {
  color: #7ee0e0;
  margin-left: 0.45rem;
}

.checkout-retail {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 2rem;
  align-items: start;
}

.checkout-order h2,
.checkout-pay h2 {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: #0b1f33;
}

.checkout-edit {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 700;
  color: #0f5d73;
}

.checkout-pay {
  background: #fff;
  border: 1px solid #dce5ec;
  border-radius: 12px;
  padding: 1.35rem 1.4rem 1.5rem;
  box-shadow: 0 10px 28px rgba(11, 31, 51, 0.06);
}

.checkout-totals {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.checkout-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}

.checkout-grand {
  padding-top: 0.65rem;
  border-top: 1px solid #e5edf2;
  font-size: 1.05rem;
}

.checkout-pay-note {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.checkout-pay-btn {
  display: flex;
  width: 100%;
  justify-content: center;
}

.checkout-pay-meta {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: #6b7280;
}

@media (max-width: 860px) {
  .checkout-retail {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  :root {
    --bar-h: 72px;
  }

  .header-tools {
    order: 2;
  }

  .nav-toggle {
    margin-left: 0;
  }

  .nav-links .nav-cart {
    display: none !important;
  }

  .header-tools .steelence-lang-switch--compact {
    display: inline-flex;
  }
}

@media (max-width: 760px) {
  :root {
    --bar-h: 62px;
    --strip-h: 40px;
  }

  .announce-strip {
    font-size: 0.72rem;
    padding-inline: 0.75rem 2.2rem;
    letter-spacing: 0.02em;
  }

  .product-buy {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-cart,
  .product-qty {
    width: 100%;
    justify-content: center;
  }

  .cart-table th:nth-child(2),
  .cart-table td:nth-child(2) {
    display: none;
  }
}
