.pps-search-bar {
  --pps-accent: #c8102e;
  --pps-accent-dark: #9f0c23;
  --pps-ink: #111827;
  --pps-muted: #667085;
  --pps-border: #e7e7ea;
  position: relative;
  z-index: 50;
  width: 100%;
  background: linear-gradient(135deg, var(--pps-accent-dark), var(--pps-accent));
  border-top: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(77,0,13,.28);
  box-shadow: 0 8px 28px rgba(34, 10, 14, .08);
}

.pps-auto-mount { visibility: hidden; }
.pps-auto-mount.is-mounted { visibility: visible; }

.pps-search-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
}

.pps-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0;
}


.pps-form .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pps-field-wrap { position: relative; min-width: 0; }

.pps-search-icon {
  position: absolute !important;
  left: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 22px !important;
  height: 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  color: #7a7a85 !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

.pps-search-icon svg {
  position: static !important;
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  margin: 0 !important;
  fill: currentColor !important;
}

.pps-input {
  box-sizing: border-box;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 18px 0 58px;
  border: 2px solid rgba(255,255,255,.72) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--pps-ink) !important;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  outline: 0;
  box-shadow: 0 7px 22px rgba(74, 0, 12, .12);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  -webkit-appearance: none;
}

.pps-input::placeholder { color: #8d9199; opacity: 1; }
.pps-input:focus {
  border-color: #fff !important;
  box-shadow: 0 0 0 4px rgba(255,255,255,.22), 0 9px 26px rgba(74,0,12,.16);
}

.pps-submit {
  box-sizing: border-box;
  min-width: 118px;
  height: 54px;
  margin: 0;
  padding: 0 24px;
  border: 1px solid rgba(0,0,0,.06) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--pps-accent-dark) !important;
  font: inherit;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .01em;
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(74,0,12,.14);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.pps-submit:hover { transform: translateY(-1px); background: #fff7f8 !important; box-shadow: 0 10px 24px rgba(74,0,12,.18); }
.pps-submit:focus-visible { outline: 3px solid rgba(255,255,255,.65); outline-offset: 2px; }

.pps-results {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  right: 128px;
  overflow: hidden auto;
  max-height: min(560px, 70vh);
  background: #fff;
  border: 1px solid var(--pps-border);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(24, 24, 27, .18);
  z-index: 99999;
}

.pps-results[hidden] { display: none !important; }

.pps-result {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  padding: 9px 14px;
  color: var(--pps-ink) !important;
  text-decoration: none !important;
  background: #fff;
  border-bottom: 1px solid #f0f0f2;
  transition: background .12s ease;
}

.pps-result:last-child { border-bottom: 0; }
.pps-result:hover, .pps-result.is-active { background: #fff5f6; }

.pps-thumb {
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 9px;
  background: #f5f5f6;
  border: 1px solid #eeeef0;
}
.pps-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pps-result-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.pps-result-name { font-size: 14px; line-height: 1.35; font-weight: 750; color: #17171b; }
.pps-result-sku { font-size: 11px; line-height: 1.2; color: var(--pps-muted); }
.pps-result-price { white-space: nowrap; font-size: 14px; font-weight: 800; color: var(--pps-accent-dark); text-align: right; }
.pps-result-price del { color: #8b8b93; font-weight: 500; margin-right: 4px; }
.pps-result-price ins { text-decoration: none; }

.pps-state { padding: 18px; text-align: center; color: #555b66; font-size: 14px; }
.pps-state.is-error { color: #9f1239; }
.pps-state.is-loading::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid #ddd;
  border-top-color: var(--pps-accent);
  border-radius: 50%;
  animation: pps-spin .7s linear infinite;
}
@keyframes pps-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .pps-search-inner { width: min(100% - 20px, 1280px); padding: 11px 0; }
  .pps-form { grid-template-columns: minmax(0, 1fr) 92px; gap: 7px; }
  .pps-input { height: 50px; padding-left: 52px; font-size: 15px; border-radius: 10px !important; }
  .pps-search-icon { left: 16px !important; width: 20px !important; height: 20px !important; }
  .pps-search-icon svg { width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important; }
  .pps-submit { min-width: 0; height: 50px; padding: 0 14px; border-radius: 10px !important; }
  .pps-results { right: 0; top: calc(100% + 7px); }
  .pps-result { grid-template-columns: 52px minmax(0, 1fr); gap: 10px; min-height: 70px; padding: 9px 10px; }
  .pps-thumb { width: 52px; height: 52px; }
  .pps-result-price { grid-column: 2; text-align: left; font-size: 13px; margin-top: -2px; }
}

@media (prefers-reduced-motion: reduce) {
  .pps-input, .pps-submit, .pps-result { transition: none; }
  .pps-state.is-loading::before { animation-duration: 1.5s; }
}

/* Strona wyników wyszukiwania uruchamiana przez Patriot Product Search */
.pps-search-page {
  width: 100%;
  background: #fff;
  padding: 52px 0 72px;
}

.pps-search-page__inner {
  width: min(100% - 40px, 1440px);
  margin: 0 auto;
}

.pps-search-page__header {
  margin: 0 0 34px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e7e7e9;
}

.pps-search-page__title {
  margin: 0;
  color: #111217;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  font-weight: 800;
}

.pps-search-page__count {
  margin: 10px 0 0;
  color: #71717a;
  font-size: 15px;
}

.pps-search-page ul.products {
  margin-top: 0;
}

.pps-search-page__pagination {
  margin-top: 42px;
}

.pps-search-page__empty {
  padding: 54px 24px;
  text-align: center;
  border: 1px solid #ececef;
  border-radius: 16px;
  background: #fafafa;
}

.pps-search-page__empty h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.pps-search-page__empty p {
  margin: 0;
  color: #71717a;
}

@media (max-width: 720px) {
  .pps-search-page { padding: 34px 0 48px; }
  .pps-search-page__inner { width: min(100% - 24px, 1440px); }
  .pps-search-page__header { margin-bottom: 24px; }
}
