.hff-search-panel,
.hff-search-panel *,
.hff-results,
.hff-results * {
  box-sizing: border-box;
}

.hff-search-panel {
  --hff-red: #ed1b2f;
  --hff-dark: #181818;
  width: 100%;
  padding: clamp(28px, 5vw, 64px);
  background: #fff;
  box-shadow: 0 16px 60px rgba(15, 23, 42, 0.08);
}

.hff-search-copy {
  max-width: 760px;
}

.hff-search-title {
  margin: 0 0 5px !important;
  color: var(--hff-dark) !important;
  font-size: clamp(34px, 4vw, 58px) !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  letter-spacing: -1.6px;
  text-transform: uppercase;
}

.hff-search-subtitle {
  margin: 0 0 22px !important;
  color: #777;
  font-size: 16px;
}

.hff-search-field-wrap {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 58px;
  background: #f5f5f5;
}

.hff-search-input {
  flex: 1;
  width: 100%;
  height: 58px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border: 1px solid transparent !important;
  border-radius: 0 !important;
  outline: none !important;
  background: #f5f5f5 !important;
  color: #1f2937 !important;
  font-size: 16px !important;
  box-shadow: none !important;
}

.hff-search-input:focus {
  border-color: var(--hff-red) !important;
  background: #fff !important;
}

.hff-search-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 126px;
  height: 58px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--hff-red) !important;
  color: #fff !important;
  font-weight: 800;
  cursor: pointer;
}

.hff-search-button:hover {
  background: #c81024 !important;
}

.hff-search-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.hff-suggestions {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}

.hff-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 14px 17px;
  border: 0;
  border-bottom: 1px solid #eee;
  background: #fff;
  color: #202020;
  text-align: left;
  cursor: pointer;
}

.hff-suggestion-item:hover {
  background: #f8f8f8;
}

.hff-suggestion-item strong {
  color: var(--hff-red);
  white-space: nowrap;
}

.hff-suggestion-empty {
  padding: 14px 17px;
  color: #666;
}

.hff-results-intro,
.hff-results {
  max-width: 1180px;
  margin: 45px auto 0;
}

.hff-results-header {
  margin-bottom: 28px;
}

.hff-results-kicker,
.hff-result-type {
  margin: 0 0 5px;
  color: #ed1b2f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.hff-results-header h1 {
  margin: 0 0 7px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.05;
  text-transform: uppercase;
}

.hff-results-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.hff-result-card {
  overflow: hidden;
  border: 1px solid #ebebeb;
  background: #fff;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.hff-result-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  padding: 22px;
  background: #fafafa;
}

.hff-result-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 230px;
  object-fit: contain;
}

.hff-product-placeholder {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  border: 10px solid #ed1b2f;
  border-radius: 50%;
  color: #ed1b2f;
  font-size: 36px;
  font-weight: 900;
}

.hff-result-content {
  padding: 24px;
}

.hff-result-content h2 {
  margin: 0 0 14px;
  font-size: 23px;
  line-height: 1.2;
}

.hff-result-reference {
  margin: 0 0 14px;
}

.hff-result-reference span {
  color: #777;
}

.hff-crossrefs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 18px;
}

.hff-crossrefs > span {
  width: 100%;
  color: #777;
  font-size: 13px;
}

.hff-crossrefs small {
  padding: 5px 8px;
  background: #f2f2f2;
  color: #333;
}

.hff-result-price {
  margin: 0 0 18px;
  font-size: 23px;
  font-weight: 800;
}

.hff-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hff-primary-button,
.hff-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 18px;
  border: 2px solid #ed1b2f;
  text-decoration: none !important;
  font-weight: 800;
}

.hff-primary-button {
  background: #ed1b2f;
  color: #fff !important;
}

.hff-secondary-button {
  background: transparent;
  color: #ed1b2f !important;
}

.hff-primary-button:hover,
.hff-secondary-button:hover {
  background: #c81024;
  border-color: #c81024;
  color: #fff !important;
}

.hff-empty-state {
  padding: clamp(28px, 5vw, 60px);
  border-left: 5px solid #ed1b2f;
  background: #f7f7f7;
}

.hff-empty-state h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .hff-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .hff-search-panel { padding: 28px 20px; }
  .hff-search-field-wrap { display: block; background: transparent; }
  .hff-search-button { width: 100%; margin-top: 10px !important; }
  .hff-suggestions { top: 58px; }
  .hff-results-grid { grid-template-columns: 1fr; }
}

/* Linked search result cards and HIFI FILTER WooCommerce product pages. */
.hff-result-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 210px;
}

.hff-result-content h2 a {
  color: inherit !important;
  text-decoration: none !important;
}

.hff-result-content h2 a:hover {
  color: #ed1b2f !important;
}

.hff-product-unavailable {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  padding: 0 14px;
  border-left: 4px solid #ed1b2f;
  background: #f4f4f4;
  color: #555;
  font-weight: 700;
}

.hff-product-identity {
  margin: 0 0 18px;
  padding: 12px 0;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}

.hff-product-identity p {
  margin: 3px 0 !important;
}

.hff-product-identity span {
  color: #777;
}

.hff-specification-table {
  width: 100%;
  border-collapse: collapse;
}

.hff-specification-table th,
.hff-specification-table td {
  padding: 12px 14px;
  border: 1px solid #e2e2e2;
  text-align: left;
  vertical-align: top;
}

.hff-specification-table th {
  width: 34%;
  background: #f4f4f4;
  font-weight: 700;
}

.hff-applications-list {
  columns: 2;
  column-gap: 32px;
}

@media (max-width: 620px) {
  .hff-applications-list { columns: 1; }
}
