/* Search Autocomplete Dropdown (Header Popup, Offcanvas & Search Page) */
.search-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
  overflow: hidden;
  z-index: 999999;
  text-align: left;
}

.search-autocomplete-dropdown .search-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none;
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.18s ease;
  color: #1e293b;
}

.search-autocomplete-dropdown .search-suggest-item:last-of-type {
  border-bottom: none;
}

.search-autocomplete-dropdown .search-suggest-item:hover,
.search-autocomplete-dropdown .search-suggest-item.active-suggest {
  background-color: #f0f6ff;
  color: var(--tj-color-theme-primary);
  text-decoration: none;
}

.search-autocomplete-dropdown .search-suggest-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.search-autocomplete-dropdown .search-suggest-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.search-autocomplete-dropdown .search-suggest-title {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.search-autocomplete-dropdown .search-suggest-item:hover .search-suggest-title,
.search-autocomplete-dropdown .search-suggest-item.active-suggest .search-suggest-title {
  color: var(--tj-color-theme-primary);
}

.search-autocomplete-dropdown .search-suggest-title mark {
  background: #fef08a;
  color: #0f172a;
  padding: 0 2px;
  border-radius: 2px;
  font-weight: 700;
}

.search-autocomplete-dropdown .search-suggest-type {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--tj-color-theme-primary, #25509a);
  letter-spacing: 0.6px;
  margin-top: 2px;
}

.search-autocomplete-dropdown .search-suggest-status {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  font-style: italic;
}

.search-autocomplete-dropdown .search-view-all-btn {
  display: block;
  text-align: center;
  padding: 11px 16px;
  background: #f8fafc;
  color: var(--tj-color-theme-primary);
  font-weight: 600;
  font-size: 13px;
  border-top: 1px solid #e2e8f0;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.search-autocomplete-dropdown .search-view-all-btn:hover {
  background: var(--tj-color-theme-primary);
  color: #ffffff;
  text-decoration: none;
}

/* Validation Error Alerts & Shake Animation */
.search-field-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #991b1b;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  text-align: left;
  animation: searchShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.search-field-error i {
  font-size: 15px;
  color: #dc2626;
  flex-shrink: 0;
}

.search-page-box input.is-invalid,
.tj-search-field.is-invalid,
.header-search-input.is-invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

.search-shake-active {
  animation: searchShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes searchShake {

  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }

  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }

  30%,
  50%,
  70% {
    transform: translate3d(-3px, 0, 0);
  }

  40%,
  60% {
    transform: translate3d(3px, 0, 0);
  }
}

/* Search Results Page Container & Hero Form */
.tj-search-result-section {
  background-color: #fafbfd;
}

.tj-search-page-form {
  max-width: 740px;
  margin: 0 auto;
}

.tj-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  padding: 5px 6px 5px 22px;
  box-shadow: 0 10px 30px rgba(37, 80, 154, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.tj-search-input-wrap:focus-within {
  border-color: var(--tj-color-theme-primary, #25509a);
  box-shadow: 0 12px 34px rgba(37, 80, 154, 0.16);
}

.tj-search-icon-left {
  font-size: 18px;
  color: var(--tj-color-theme-primary, #25509a);
  margin-right: 12px;
  flex-shrink: 0;
}

.tj-search-field {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  height: 52px;
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 15.5px;
  color: #1e293b;
  padding: 0 12px 0 0;
}

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

.tj-search-input-wrap .tj-primary-btn {
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

/* Filter Pills (All, Products, Categories, Blogs, Services) */
.search-filters-wrap {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.search-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.search-filter-pill .badge {
  font-size: 11px;
  padding: 3px 8px;
  background-color: #e2e8f0;
  color: #334155;
  transition: all 0.2s ease;
}

.search-filter-pill:hover {
  color: var(--tj-color-theme-primary, #25509a);
  border-color: var(--tj-color-theme-primary, #25509a);
  background: #f8fafc;
  text-decoration: none;
}

.search-filter-pill.active {
  background: var(--tj-color-theme-primary, #25509a);
  color: #ffffff;
  border-color: var(--tj-color-theme-primary, #25509a);
  box-shadow: 0 4px 14px rgba(37, 80, 154, 0.28);
}

.search-filter-pill.active .badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Search Result Cards */
.tj-search-card {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.tj-search-card:hover {
  transform: translateY(-5px);
  border-color: #cbd5e1;
  box-shadow: 0 16px 32px rgba(37, 80, 154, 0.12);
}

.tj-search-thumb {
  position: relative;
  overflow: hidden;
  background-color: #f1f5f9;
  display: block;
}

.tj-search-thumb-link {
  display: block;
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
}

.tj-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tj-search-card:hover .tj-search-thumb img {
  transform: scale(1.06);
}

.tj-search-type-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  z-index: 2;
}

.tj-search-type-badge.badge-products,
.tj-search-type-badge.badge-product {
  background: rgba(37, 80, 154, 0.92);
  color: #ffffff;
}

.tj-search-type-badge.badge-category {
  background: rgba(30, 41, 59, 0.92);
  color: #ffffff;
}

.tj-search-type-badge.badge-blogs,
.tj-search-type-badge.badge-blog {
  background: rgba(22, 101, 52, 0.92);
  color: #ffffff;
}

.tj-search-type-badge.badge-expertise,
.tj-search-type-badge.badge-service {
  background: rgba(122, 179, 48, 0.95);
  color: #ffffff;
}

.tj-search-type-badge.badge-default {
  background: rgba(51, 65, 85, 0.9);
  color: #ffffff;
}

.tj-search-body {
  padding: 20px 22px 22px;
}

.tj-search-title {
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
  color: #1e293b;
}

.tj-search-title a {
  color: #1e293b;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tj-search-title a:hover {
  color: var(--tj-color-theme-primary, #25509a);
  text-decoration: none;
}

.tj-search-meta {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.55;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tj-search-meta-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.tj-search-footer {
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.tj-search-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tj-color-theme-primary, #25509a);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: color 0.2s ease, gap 0.2s ease;
}

.tj-search-link i {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.tj-search-card:hover .tj-search-link {
  color: var(--secondary-color, #7ab330);
  gap: 12px;
  text-decoration: none;
}

.tj-search-card:hover .tj-search-link i {
  transform: translateX(4px);
}

/* Empty State Card */
.tj-search-empty-box {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.tj-search-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #f1f5f9;
  color: var(--tj-color-theme-primary, #25509a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: 20px;
}

.tj-search-quick-tags {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tj-search-quick-tag {
  font-size: 12.5px;
  padding: 5px 12px;
  border-radius: 16px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s ease;
}

.tj-search-quick-tag:hover {
  background: var(--tj-color-theme-primary, #25509a);
  color: #ffffff;
  border-color: var(--tj-color-theme-primary, #25509a);
  text-decoration: none;
}

/* Mobile & Responsive Refinements */
@media (max-width: 991.98px) {
  .tj-search-result-section {
    padding-top: 50px;
    padding-bottom: 70px;
  }
}

@media (max-width: 767.98px) {
  .tj-search-result-section {
    padding-top: 36px;
    padding-bottom: 50px;
  }

  .tj-search-input-wrap {
    padding: 4px 5px 4px 14px;
    border-radius: 40px;
  }

  .tj-search-icon-left {
    font-size: 16px;
    margin-right: 8px;
  }

  .tj-search-field {
    height: 44px;
    font-size: 14px;
    padding-right: 8px;
  }

  .tj-search-input-wrap .tj-primary-btn {
    padding: 3px 3px 3px 16px;
    font-size: 14px;
    gap: 8px;
  }

  .tj-search-input-wrap .tj-primary-btn .btn-icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .tj-search-thumb-link {
    height: 190px;
  }

  .tj-search-title {
    font-size: 16px;
  }

  .search-filter-pill {
    padding: 6px 12px;
    font-size: 12px;
  }

  .search-filter-pill .badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .tj-search-empty-box {
    padding: 32px 16px;
  }
}