/* Search Modal Overlay */
.search-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
}

.search-modal-overlay.active {
  display: flex;
}

/* Modal Content Card */
.search-modal {
  width: 90%;
  max-width: 640px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: searchSlideDown 0.2s ease-out forwards;
}

@keyframes searchSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Search Bar Input Container */
.search-input-wrapper {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.search-input-wrapper i {
  color: #64748b;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 0 12px;
  font-family: inherit;
  color: #0f172a;
}

.search-input::placeholder {
  color: #94a3b8;
}

.search-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748b;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.search-close-btn:hover {
  background-color: #f1f5f9;
  color: #0f172a;
}

/* Results Dropdown */
.search-results-container {
  max-height: 400px;
  overflow-y: auto;
  padding: 8px 0;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  text-decoration: none;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f8fafc;
}

.search-item:hover, .search-item.highlighted {
  background-color: #f1f5f9;
}

.search-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  object-fit: contain;
  padding: 4px;
  flex-shrink: 0;
}

.search-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.search-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.search-item-category {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.search-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #0077c8;
  white-space: nowrap;
}

/* Status States */
.search-status {
  padding: 24px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.search-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top-color: #0077c8;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1080px) {
  .search-modal-overlay {
    padding-top: 20px;
  }
  .search-modal {
    width: 95%;
  }
}
/* ==========================================================================
   Global Omni-Search Modal & Live Results Styler
   ========================================================================== */

.global-search-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(8, 29, 56, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 80px 20px 20px !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-search-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.global-search-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(-20px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-search-modal-backdrop.is-open .global-search-card {
  transform: translateY(0) scale(1);
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1.5px solid #f1f5f9;
}

.search-input-icon {
  width: 22px;
  height: 22px;
  color: #0077c8;
  flex-shrink: 0;
}

#globalOmniSearchInput {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16.5px;
  font-weight: 600;
  color: #081d38;
  outline: none;
  font-family: inherit;
}

#globalOmniSearchInput::placeholder {
  color: #94a3b8;
}

.search-clear-btn {
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
}

.search-clear-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* Results Dropdown */
.search-dropdown-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 10px 0;
}

.search-helper-hint {
  padding: 30px 24px;
  text-align: center;
  color: #64748b;
  font-size: 13.5px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
  border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
  background: #f0f9ff;
  border-left-color: #0077c8;
}

.result-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.result-img-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  object-fit: contain;
  padding: 2px;
  flex-shrink: 0;
}

.result-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #e0f2fe;
  color: #0077c8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #081d38;
  display: block;
}

.result-desc {
  font-size: 12.5px;
  color: #64748b;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
}

.result-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-product { background: #e0f2fe; color: #0077c8; }
.badge-category { background: #fef3c7; color: #b45309; }
.badge-page { background: #dcfce7; color: #15803d; }
.badge-casestudy { background: #f3e8ff; color: #7e22ce; }

/* Modal Footer */
.search-modal-footer {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11.5px;
  color: #64748b;
}

.search-modal-footer kbd {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  font-weight: 700;
  color: #0f172a;
}