/* StoreCraft Pro – shared header utilities */

:root {
  --bsp-text-dark: #1a1a1a;
  --bsp-text-muted: #6b7280;
  --bsp-border: #e5e7eb;
  --bsp-container: 1320px;
}

.bsp-container {
  width: min(100% - 32px, var(--bsp-container));
  margin-inline: auto;
}

.bsp-topbar {
  font-size: 13px;
  line-height: 1.4;
}

.bsp-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
}

.bsp-topbar__message {
  margin: 0;
  font-weight: 500;
}

body.bsp-sticky-header.bsp-header-stuck .bsp-header-sticky-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 500;
}

body.admin-bar.bsp-sticky-header.bsp-header-stuck .bsp-header-sticky-wrap {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar.bsp-sticky-header.bsp-header-stuck .bsp-header-sticky-wrap {
    top: 46px;
  }
}

.bsp-header-sticky-spacer {
  display: block;
  height: 0;
  pointer-events: none;
}

@media (max-width: 992px) {
  body.bsp-sticky-header.bsp-header-stuck .bsp-header-sticky-wrap {
    position: static;
    width: auto;
    z-index: auto;
  }
}

.bsp-search-form {
  display: flex;
  align-items: stretch;
  width: 100%;
  position: relative;
  z-index: 20;
}

.bsp-search-form__input {
  flex: 1;
  border: 0;
  padding: 0 16px;
  font-size: 14px;
  min-width: 0;
  outline: none;
  color: var(--bsp-search-text, var(--bsp-text-dark));
}

.bsp-search-form__input::placeholder {
  color: var(--bsp-search-placeholder, #9ca3af);
}

.bsp-search-form__submit {
  flex-shrink: 0;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bsp-live-search {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: #fff;
  border: 1px solid #e8e6e3;
  border-radius: 10px;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.16);
  z-index: 50;
  overflow: hidden;
  display: none;
}

.bsp-live-search.is-open {
  display: block;
  animation: bspLiveSearchFade 0.2s ease;
}

@keyframes bspLiveSearchFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bsp-live-search__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.bsp-live-search__item a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  text-decoration: none;
}

.bsp-live-search__item a:hover {
  background: #f5f3f0;
}

.bsp-live-search__thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f3f4f6;
}

.bsp-live-search__name {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  line-height: 1.35;
}

.bsp-live-search__price {
  font-size: 12px;
  color: #1a1a1a;
  font-weight: 600;
}

.bsp-live-search__empty,
.bsp-live-search__all {
  display: block;
  padding: 12px 14px;
  font-size: 13px;
  text-decoration: none;
}

.bsp-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid var(--bsp-border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.bsp-mobile-toggle span {
  display: block;
  height: 2px;
  background: var(--bsp-text-dark);
  border-radius: 1px;
}

.bsp-header-placeholder {
  padding: 24px 0;
  text-align: center;
  background: #f6f2ec;
  border-bottom: 1px solid #e5e2dd;
}

.bsp-header-placeholder__inner {
  width: min(100% - 32px, var(--bsp-container));
  margin-inline: auto;
}

.bsp-header-placeholder__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.bsp-footer-placeholder {
  padding: 48px 0;
  text-align: center;
  background: #f6f2ec;
  border-top: 1px solid #e5e2dd;
}

.bsp-footer-placeholder__inner {
  width: min(100% - 32px, var(--bsp-container));
  margin-inline: auto;
}

.bsp-footer-placeholder__title {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.bsp-footer-placeholder__text {
  margin: 0;
  color: #6b6b6b;
}
