/* ===========================
   ULTRA-MODERN DARK SEARCH v3.6
   =========================== */


.suggestion-text {
    flex: 1;
    color: #fff !important;
    font-size: 14px;
}

#modern-search-overlay > div > div.modern-search-header > div > svg {
    display: none;
}

@media (max-width:750px){

.modern-search-smart-suggestions {
    display: none !important;
}}



/* ===========================
   ULTRA-MODERN DARK SEARCH v3.6
   =========================== */

/* Body Lock */
body.search-overlay-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

/* Search Trigger */
.modern-search-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
  color: #fff;
}

.modern-search-trigger:hover {
  transform: scale(1.1);
}

/* DARK OVERLAY - Glasmorphism */
.modern-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
  backdrop-filter: blur(20px);
  z-index: 999999;
  display: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Added background image with 30% opacity and fixed positioning */
.modern-search-overlay::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("/wp-content/uploads/2021/06/guede-messer-fertigung-1-2.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0.3;
  z-index: -1;
  pointer-events: none;
}

.modern-search-overlay.active {
  display: flex;
  opacity: 1;
}

/* Container */
.modern-search-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 60px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (max-width: 768px) {
  .modern-search-container {
    padding: 20px;
  }
}

/* HEADER - Modern Dark */
.modern-search-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.modern-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0 20px;
  transition: all 0.3s ease;
}

.modern-search-input-wrapper:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

#modern-search-input,
[id^="modern-search-"][id$="-input"] {
  border: none;
  font-size: 18px;
  font-weight: 300;
  width: 100%;
  padding: 14px 0;
  outline: none;
  color: #fff !important;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#modern-search-input::placeholder,
[id^="modern-search-"][id$="-input"]::placeholder {
  color: rgba(255, 255, 255, 0.4) !important;
}

.modern-search-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.modern-search-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modern-search-close svg {
  color: #fff !important;
}

/* Auto-Suggestions - Dark */
.modern-search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background: rgba(20, 20, 20, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.modern-search-suggestions.active {
  display: block;
  animation: slideDown 0.3s ease;
}

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

.suggestion-item {
  padding: 16px 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.suggestion-text {
  flex: 1;
  color: #fff;
  font-size: 14px;
}

.suggestion-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
}

/* Smart Tags - Modern Dark mit Tabs */
.modern-search-smart-suggestions {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 30px;
  flex-shrink: 0;
}

/* Tab Navigation */
.smart-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.smart-tabs::-webkit-scrollbar {
  height: 3px;
}

.smart-tabs::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.smart-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
}

.smart-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  color: rgba(255, 255, 255, 0.5) !important;
}

.smart-tab:hover {
  color: rgba(255, 255, 255, 0.8) !important;
  background: rgba(255, 255, 255, 0.05);
}

.smart-tab.active {
  color: #fff !important;
  border-bottom-color: #fff;
}

.smart-tab .tab-label {
  font-size: 14px;
  font-weight: 500;
}

/* Tab Content */
.smart-tab-content {
  display: none;
  animation: fadeInTab 0.3s ease;
}

.smart-tab-content.active {
  display: block;
}

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

.smart-suggestion-group h4 {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  margin: 0 0 12px 0 !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.smart-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.smart-tag {
  display: inline-block;
  padding: 10px 20px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 25px !important;
  font-size: 13px !important;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff !important;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

/* Serien-Gruppe */
.serien-group {
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.serien-group h4 {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(255, 255, 255, 0.6) !important;
  margin: 0 0 12px 0 !important;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.smart-tags-serien {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.smart-tags-serien::-webkit-scrollbar {
  width: 6px;
}

.smart-tags-serien::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.smart-tags-serien::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.smart-tag:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #000 !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

.smart-tag-serie {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.smart-tag-serie:hover {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 0.95) !important;
  color: #000 !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.2);
}

/* Results Container */
.modern-search-results {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 10px;
  min-height: 0;
}

/* Custom Scrollbar - Dark */
.modern-search-results::-webkit-scrollbar {
  width: 8px;
}

.modern-search-results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.modern-search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

.modern-search-results::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Category Tabs - Dark */
.modern-search-categories-wrapper {
  position: relative;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modern-search-categories {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  flex-shrink: 0;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar completely for cleaner look with arrows */
.modern-search-categories::-webkit-scrollbar {
  display: none;
}

/* Scroll arrows for category navigation */
.category-scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.category-scroll-arrow.visible {
  opacity: 1;
  pointer-events: auto;
}

.category-scroll-arrow:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.95);
}

.category-scroll-arrow:hover svg {
  color: #000 !important;
}

.category-scroll-arrow svg {
  width: 20px;
  height: 20px;
  color: #fff !important;
  transition: color 0.3s ease;
}

.category-scroll-arrow.left {
  left: -18px;
}

.category-scroll-arrow.right {
  right: -18px;
}

/* Fade indicators on edges */
.modern-search-categories-wrapper::before,
.modern-search-categories-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 15px;
  width: 60px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modern-search-categories-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(10, 10, 10, 1) 0%, rgba(10, 10, 10, 0) 100%);
}

.modern-search-categories-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(10, 10, 10, 1) 0%, rgba(10, 10, 10, 0) 100%);
}

.modern-search-categories-wrapper.show-left-fade::before {
  opacity: 1;
}

.modern-search-categories-wrapper.show-right-fade::after {
  opacity: 1;
}

.modern-search-category {
  padding: 10px 0;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modern-search-category:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

.modern-search-category.active {
  color: #fff !important;
}

.modern-search-category.active:after {
  content: "";
  position: absolute;
  bottom: -16px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.5) 100%);
}

/* Results Info */
.modern-search-results-info {
  margin-bottom: 25px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.6) !important;
  font-weight: 400;
  flex-shrink: 0;
}

.modern-search-results-info strong {
  color: #fff !important;
  font-weight: 600;
}

/* PRODUCT GRID - PERFEKT! */
.modern-search-products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 1200px) {
  .modern-search-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .modern-search-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .modern-search-products {
    grid-template-columns: 1fr;
  }
}

/* PRODUCT CARD - Ultra Modern Dark */
.modern-search-product {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
}

.modern-search-product:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* PRODUCT IMAGE - PERFEKT & SCHARF! */
.modern-search-product-image {
  position: relative;
  width: 100%;
  aspect-ratio: 2;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  overflow: hidden;
}

.modern-search-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(1.1) contrast(1.05);
}

.modern-search-product:hover .modern-search-product-image img {
  transform: scale(1.08);
  filter: brightness(1.2) contrast(1.1);
}

/* Badge */
.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
}

.product-badge.out-of-stock {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  display: none;
}

/* Product Info */
.modern-search-product-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}

.modern-search-product-title {
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #fff !important;
  margin: 0 !important;
  line-height: 1.4 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modern-search-product:hover .modern-search-product-title {
  color: rgba(255, 255, 255, 0.9) !important;
}

.modern-search-product-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.modern-search-product-sku,
.modern-search-product-category {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.5) !important;
  line-height: 1.4 !important;
}

.modern-search-product-sku strong,
.modern-search-product-category strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7) !important;
}

.modern-search-product-price {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #fff !important;
  margin-top: 8px !important;
}

.modern-search-product-price * {
  font-size: 17px !important;
  color: #fff !important;
}

.modern-search-product-price ins {
  text-decoration: none;
  font-weight: 700;
}

.modern-search-product-price del {
  color: rgba(255, 255, 255, 0.4) !important;
  font-weight: 400;
  margin-right: 8px;
}

/* No Results - Dark */
.modern-search-no-results {
  text-align: center;
  padding: 80px 20px;
}

.modern-search-no-results svg {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.3) !important;
}

.modern-search-no-results h3 {
  margin-bottom: 10px;
  color: #fff !important;
  font-size: 24px !important;
  font-weight: 600 !important;
}

.modern-search-no-results p {
  color: rgba(255, 255, 255, 0.5) !important;
  margin-bottom: 30px;
  font-size: 16px;
}

.modern-search-clear-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.modern-search-clear-button:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #000 !important;
  border-color: rgba(255, 255, 255, 0.95);
}

/* Loading - Dark */
.modern-search-loading {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.6) !important;
  font-size: 16px;
}

.modern-search-loading:before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Load More - Dark */
.modern-search-load-more-container {
  text-align: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.modern-search-load-more-button {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 14px 32px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s ease;
}

.modern-search-load-more-button:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #000 !important;
  border-color: rgba(255, 255, 255, 0.95);
}

.modern-search-view-all-link {
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: underline !important;
  font-size: 14px;
  transition: color 0.2s;
}

.modern-search-view-all-link:hover {
  color: #fff !important;
}

/* Error - Dark */
.modern-search-error {
  text-align: center;
  padding: 60px 20px;
  color: rgba(239, 68, 68, 0.9) !important;
  font-size: 16px;
}

/* Exact Match Badge - Dark */
.exact-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 20px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modern-search-product {
  animation: fadeIn 0.4s ease-out backwards;
}

.modern-search-product:nth-child(1) {
  animation-delay: 0.05s;
}
.modern-search-product:nth-child(2) {
  animation-delay: 0.1s;
}
.modern-search-product:nth-child(3) {
  animation-delay: 0.15s;
}
.modern-search-product:nth-child(4) {
  animation-delay: 0.2s;
}
.modern-search-product:nth-child(5) {
  animation-delay: 0.25s;
}
.modern-search-product:nth-child(6) {
  animation-delay: 0.3s;
}
.modern-search-product:nth-child(7) {
  animation-delay: 0.35s;
}
.modern-search-product:nth-child(8) {
  animation-delay: 0.4s;
}

/* Accessibility */
.modern-search-product:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
}

.smart-tag:focus,
.modern-search-category:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .modern-search-header {
    margin-bottom: 25px;
  }

  #modern-search-input,
  [id^="modern-search-"][id$="-input"] {
    font-size: 16px;
    padding: 12px 0;
  }

  .modern-search-smart-suggestions {
    margin-bottom: 20px;
  }

  .smart-tag {
    padding: 8px 14px !important;
    font-size: 12px !important;
  }

  .modern-search-product-image {
    padding: 20px;
  }

  .category-scroll-arrow.left {
    left: -10px;
  }

  .category-scroll-arrow.right {
    right: -10px;
  }
}

/* Ensure text is white */
.modern-search-overlay *:not(svg):not(path):not(circle):not(line) {
  color: inherit;
}
