/* ShopFluxx — header 1688 import control */

.sf1688-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  min-height: 38px;
  border-radius: 4px;
  background: #00246b;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.18s ease, transform 0.18s ease;
  box-sizing: border-box;
}

.sf1688-header-cta:hover,
.sf1688-header-cta:focus {
  background: #001a4f;
  color: #fff !important;
  transform: translateY(-1px);
}

.sf1688-header-cta__icon {
  display: inline-flex;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
}

.sf1688-header-cta__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

/* Desktop: sit beside search (flex only on wide screens) */
@media (min-width: 1025px) {
  .wd-header-search-form:not(.wd-header-search-form-mobile),
  .whb-1yjd6g8pvqgh79uo6oce {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
  }

  .wd-header-search-form:not(.wd-header-search-form-mobile) > form,
  .whb-1yjd6g8pvqgh79uo6oce > form {
    flex: 1 1 auto;
    min-width: 0;
  }

  .wd-header-search-form:not(.wd-header-search-form-mobile) .sf1688-header-cta,
  .whb-1yjd6g8pvqgh79uo6oce .sf1688-header-cta {
    margin-left: 0.65rem;
    flex: 0 0 auto;
  }

  .sf1688-header-cta--mobile {
    display: none !important;
  }
}

/*
 * Mobile: button always directly under the search box.
 * Woodmart's .whb-col-mobile is flex-row/nowrap, so we switch that
 * column to a column stack when our CTA is present. Search keeps full
 * width on its own row — CTA does not sit beside it or squeeze it.
 */
@media (max-width: 1024px) {
  .sf1688-header-cta:not(.sf1688-header-cta--mobile) {
    display: none !important;
  }

  .whb-column.sf1688-has-mobile-cta {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    height: auto !important;
    max-height: none !important;
  }

  /* Let the sticky bottom row grow downward for the under-search button */
  .whb-header-bottom.sf1688-mobile-cta-row,
  .whb-header-bottom.sf1688-mobile-cta-row .whb-header-bottom-inner,
  .whb-header-bottom.sf1688-mobile-cta-row .container {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }

  .whb-column.sf1688-has-mobile-cta .wd-header-search-form-mobile,
  .whb-column.sf1688-has-mobile-cta .whb-kv1cizir1p1hjpwwydal {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
  }

  .sf1688-header-cta--mobile {
    display: inline-flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0.45rem 0 0.35rem !important;
    flex: 0 0 auto !important;
  }
}
