/* ═════════════════════════════════════════════════════════════════════
   PRARAS & AIRBLISS INTERACTIVE INSTANT PRODUCT SEARCH MATRIX
   ═════════════════════════════════════════════════════════════════════ */

/* Header Search Trigger Button */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-muted, #78695E);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 0.5rem;
}
.nav-search-btn:hover {
  background: var(--c-primary-bg, #FDF4F4);
  border-color: var(--c-primary, #9A1D1E);
  color: var(--c-primary, #9A1D1E);
  transform: translateY(-1px);
}
.nav-search-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}
.nav-search-kbd {
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.06);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: monospace;
  letter-spacing: 0.05em;
}

body.ab .nav-search-btn:hover {
  background: rgba(31, 79, 51, 0.1);
  border-color: #1F4F33;
  color: #1F4F33;
}

/* Modal Backdrop */
.site-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 11, 10, 0.75);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  box-sizing: border-box;
}
.site-search-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Search Modal Container */
.site-search-modal {
  background: #FFFFFF;
  width: 100%;
  max-width: 720px;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 8rem);
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-search-overlay.is-active .site-search-modal {
  transform: translateY(0) scale(1);
}

/* Search Input Bar */
.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #FAFAF9;
  gap: 12px;
  position: relative;
}
.search-input-wrap svg.search-icon {
  width: 22px;
  height: 22px;
  stroke: var(--c-primary, #9A1D1E);
  fill: none;
  stroke-width: 2.2;
  flex-shrink: 0;
}
body.ab .search-input-wrap svg.search-icon {
  stroke: #1F4F33;
}
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1.15rem;
  font-weight: 600;
  color: #181412;
  outline: none;
}
.search-input::placeholder {
  color: #9C938C;
  font-weight: 500;
}
.search-clear-btn {
  background: rgba(0, 0, 0, 0.06);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6D6B6B;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.search-clear-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  color: #000;
}
.search-close-badge {
  background: #E8E5E1;
  color: #5C554E;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 6px;
  font-family: monospace;
}

/* Category Filter Chips */
.search-filter-bar {
  display: flex;
  gap: 8px;
  padding: 0.85rem 1.75rem;
  background: #F4F1ED;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.search-filter-bar::-webkit-scrollbar { display: none; }
.search-chip {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6E6259;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.search-chip:hover, .search-chip.is-active {
  background: var(--c-primary, #9A1D1E);
  color: #FFFFFF;
  border-color: var(--c-primary, #9A1D1E);
}
body.ab .search-chip:hover, body.ab .search-chip.is-active {
  background: #1F4F33;
  border-color: #1F4F33;
}

/* Search Results List */
.search-results-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
}
.search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
}
.search-item:hover, .search-item.is-selected {
  background: #FBF8F4;
  border-color: rgba(154, 29, 30, 0.15);
  transform: translateX(4px);
}
body.ab .search-item:hover, body.ab .search-item.is-selected {
  background: #F4F8F4;
  border-color: rgba(31, 79, 51, 0.2);
}
.search-item-info {
  flex: 1;
  min-width: 0;
}
.search-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.search-item-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #181412;
}
.search-item-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(154, 29, 30, 0.08);
  color: var(--c-primary, #9A1D1E);
}
body.ab .search-item-badge {
  background: rgba(31, 79, 51, 0.1);
  color: #1F4F33;
}
.search-item-sub {
  font-size: 0.82rem;
  color: #6E6259;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-item-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--c-primary, #9A1D1E);
  flex-shrink: 0;
  margin-left: 1rem;
}
body.ab .search-item-action {
  color: #1F4F33;
}
.search-item-action svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
}

/* Empty State */
.search-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #78695E;
}
.search-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  opacity: 0.6;
}
.search-empty h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #181412;
  margin-bottom: 0.35rem;
}
.search-empty p {
  font-size: 0.85rem;
  max-width: 360px;
  margin: 0 auto;
}

/* Footer Instructions */
.search-footer {
  padding: 0.75rem 1.75rem;
  background: #FAFAF9;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: #78695E;
}
.search-shortcuts {
  display: flex;
  gap: 12px;
}
.search-shortcuts kbd {
  background: #E8E5E1;
  color: #4A403A;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.65rem;
}

@media (max-width: 768px) {
  .site-search-overlay { padding: 1.5rem 1rem; }
  .site-search-modal { max-height: calc(100vh - 3rem); border-radius: 20px; }
  .search-footer { display: none; }
  .search-input-wrap { padding: 1rem 1.25rem; }
  .search-filter-bar { padding: 0.6rem 1rem; }
}
