.lfd-search-shell {
  position: relative;
  z-index: 80;
  flex: 1 1 420px;
  width: min(100%, 620px);
  min-width: 0;
}

.lfd-search-shell > .site-search,
.lfd-search-shell > .lfd-site-search {
  width: 100%;
  max-width: none;
}

.lfd-search-panel[hidden] {
  display: none !important;
}

.lfd-search-panel {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 3200;
  overflow: hidden auto;
  max-height: min(72vh, 535px);
  border: 1px solid rgba(13, 77, 89, 0.2);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(7, 31, 39, 0.2), 0 3px 10px rgba(7, 31, 39, 0.09);
  color: #102a32;
  text-align: left;
}

.lfd-search-status {
  min-height: 35px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #e1eceb;
  color: #526b71;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.lfd-search-content {
  padding: 6px;
}

.lfd-search-results {
  display: grid;
}

.lfd-search-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 66px;
  padding: 7px 8px;
  border-radius: 8px;
  color: #102a32;
  text-decoration: none;
}

.lfd-search-result:hover,
.lfd-search-result:focus-visible,
.lfd-search-result.is-active {
  outline: none;
  background: #eef7f5;
}

.lfd-search-result-image {
  display: grid;
  overflow: hidden;
  width: 72px;
  height: 52px;
  place-items: center;
  border-radius: 7px;
  background: #e8f0ef;
}

.lfd-search-result-image:empty::before {
  content: "Fish";
  color: #6f8488;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lfd-search-result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lfd-search-result-details,
.lfd-search-result-purchase {
  display: grid;
  min-width: 0;
}

.lfd-search-result-name {
  overflow: hidden;
  color: #102a32;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lfd-search-result-identity {
  overflow: hidden;
  margin-top: 3px;
  color: #60777c;
  font-size: 11px;
  font-style: italic;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lfd-search-result-purchase {
  justify-items: end;
  max-width: 145px;
  text-align: right;
}

.lfd-search-result-purchase strong {
  color: #007a83;
  font-size: 13px;
  font-weight: 900;
}

.lfd-search-result-purchase span {
  overflow: hidden;
  max-width: 145px;
  margin-top: 3px;
  color: #60777c;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lfd-search-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 5px 2px 1px;
  padding: 8px 14px;
  border-top: 1px solid #dce9e8;
  border-radius: 0 0 8px 8px;
  color: #006f78;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.lfd-search-view-all:hover,
.lfd-search-view-all:focus-visible,
.lfd-search-view-all.is-active {
  outline: none;
  background: #eef7f5;
  color: #004e57;
}

.lfd-search-section-label {
  display: block;
  padding: 7px 8px 8px;
  color: #526b71;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.lfd-search-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.lfd-search-category-grid a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 7px;
  color: #173039;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
}

.lfd-search-category-grid a:hover,
.lfd-search-category-grid a:focus-visible,
.lfd-search-category-grid a.is-active {
  outline: none;
  background: #eef7f5;
  color: #006f78;
}

.lfd-search-loading {
  display: grid;
  gap: 6px;
  padding: 4px 2px;
}

.lfd-search-loading span {
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eef3f2 20%, #f8faf9 50%, #eef3f2 80%);
  background-size: 220% 100%;
  animation: lfd-search-shimmer 1.1s linear infinite;
}

@keyframes lfd-search-shimmer {
  to { background-position: -220% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lfd-search-loading span { animation: none; }
}

@media (max-width: 680px) {
  .lfd-search-shell {
    position: static;
    flex-basis: auto;
    width: 100%;
  }

  .mobile-shop-tools > .lfd-search-shell,
  .lfd-mobile-shop-tools > .lfd-search-shell {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .lfd-search-panel {
    position: fixed;
    top: var(--lfd-search-panel-top, 150px);
    right: 8px;
    left: 8px;
    width: auto;
    max-height: min(68vh, 505px);
    border-radius: 10px;
  }

  .lfd-search-result {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 61px;
    padding: 6px;
  }

  .lfd-search-result-image {
    width: 64px;
    height: 48px;
  }

  .lfd-search-result-name { font-size: 13px; }
  .lfd-search-result-purchase { max-width: 92px; }
  .lfd-search-result-purchase span {
    max-width: 92px;
    font-size: 9px;
  }
}

@media (max-width: 390px) {
  .lfd-search-result-purchase span { display: none; }
  .lfd-search-result-purchase { max-width: 78px; }
  .lfd-search-result-purchase strong { font-size: 12px; }
  .lfd-search-category-grid { grid-template-columns: 1fr; }
}
