/* ======================================================================= */
/* ✅ SEARCH COMPONENTS CSS - High Performance & Mobile Optimized         */
/* ======================================================================= */

/* ======================================================================= */
/* SLIDESHOW & IMAGE WRAPPER                                               */
/* ======================================================================= */

/* Wrapper für alle Bilder */
.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 12px;
  /* Runde Ecken auch mobil wichtig */
  isolation: isolate;
  transform: translateZ(0);
  /* GPU Beschleunigung für Mobile */
}

/* Das Hauptbild bestimmt die Größe */
.product-image.main-img {
  position: relative;
  z-index: 1;
}

/* Alle Bilder generell */
.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
  /* Performance: Nur Opacity animieren */
  transition: opacity 0.4s ease-in-out;
  display: block;
  will-change: opacity;
}

/* Wenn ein Bild aktiv ist */
.product-image.active {
  opacity: 1;
  z-index: 3;
}

/* GALLERY BADGE - Auf Mobile etwas dezenter */
.gallery-indicator {
  position: absolute;
  bottom: 12px;
  right: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 20;
  pointer-events: none;
  opacity: 0.85;
  transform: translateY(0);
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.gallery-indicator svg {
  opacity: 0.9;
}

/* Hover-Effekt nur auf Geräten, die Hover unterstützen (Desktop) */
@media (hover: hover) {
  .product-card:hover .gallery-indicator {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
  }
}

/* PROGRESS BAR - Nur Desktop */
.hover-progress-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.2);
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.hover-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary, #c77dff);
  box-shadow: 0 0 10px rgba(199, 125, 255, 0.7);
  transition: none;
  will-change: width;
}

@media (hover: hover) {
  .product-card:hover .hover-progress-container {
    opacity: 1;
  }
}

/* ======================================================================= */
/* PRODUCT CARD OPTIMIZATIONS                                              */
/* ======================================================================= */

.product-card {
  contain: content;
  /* Wichtig für Scroll-Performance */
  background: var(--bg-card, #fff);
  border-radius: 12px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backface-visibility: hidden;
}

/* ======================================================================= */
/* INPUTS & SELECTS (Touch Friendly)                                       */
/* ======================================================================= */

/* Basis-Style für alle Selects */
select,
.standard-select,
.sort-select-simple {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 12px 40px 12px 16px;

  background-color: var(--surface, #1e1e1e);
  color: var(--text, #fff);

  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 12px;

  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;

  outline: none;
  cursor: pointer;

  /* Custom Arrow SVG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c77dff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;

  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
}

/* Hover State - Nur Desktop */
@media (hover: hover) {

  select:hover,
  .standard-select:hover,
  .sort-select-simple:hover {
    border-color: var(--primary, #c77dff);
    background-color: var(--bg-card-hover, #2a2a2a);
    transform: translateY(-1px);
  }
}

select:focus,
.standard-select:focus,
.sort-select-simple:focus {
  border-color: var(--primary, #c77dff);
  box-shadow: 0 0 0 3px rgba(199, 125, 255, 0.25);
  /* Pfeil drehen bei Fokus */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23c77dff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='18 15 12 9 6 15'%3E%3C/polyline%3E%3C/svg%3E");
}

/* Optionen Hintergrund dunkel erzwingen */
select option,
.standard-select option {
  background-color: #1e1e1e;
  color: #fff;
  padding: 12px;
}

/* Input Fields */
.price-input-simple {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  background: var(--surface, #1e1e1e);
  color: var(--text, #fff);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.25s ease;
}

.price-input-simple:focus {
  border-color: var(--primary, #c77dff);
  box-shadow: 0 0 0 3px rgba(199, 125, 255, 0.2);
}

.price-inputs-simple {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-inputs-simple span {
  color: var(--text-secondary, #aaa);
  font-weight: 600;
}

/* Controls Bar Layout */
.results-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 0 2%;
  min-height: 40px;
  flex-wrap: wrap;
  gap: 15px;
}

/* ======================================================================= */
/* FILTER CHIPS (Modern & Touch Friendly)                                  */
/* ======================================================================= */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary, #3b82f6), var(--accent, #8b5cf6));
  color: white;
  padding: 8px 16px;
  /* Größer für Touch */
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  user-select: none;
}

.filter-chip:active {
  transform: scale(0.95);
}

.chip-remove {
  font-weight: bold;
  font-size: 1.1em;
  opacity: 0.8;
}

/* ======================================================================= */
/* FILTER ACTIONS                                                          */
/* ======================================================================= */
.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.clear-filters-btn,
.apply-filters-btn {
  padding: 0.85rem 2rem;
  /* Größere Touch-Target */
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease;
  font-size: 0.95rem;
}

.clear-filters-btn {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.apply-filters-btn {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  box-shadow: 0 4px 15px rgba(199, 125, 255, 0.3);
}

.apply-filters-btn:active {
  transform: scale(0.96);
}

/* ======================================================================= */
/* LIKES CART BUTTON (Floating)                                            */
/* ======================================================================= */
.likes-cart-container {
  position: relative;
  display: flex;
  align-items: center;
  /* FIX: Ensure visibility of overflowing children (like the badge) */
  overflow: visible !important;
}

.likes-cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(199, 125, 255, 0.3);
  border: none;
  backdrop-filter: blur(10px);
  z-index: 1100 !important;
  transition: transform 0.2s ease;
  /* FIX: Explicitly allow overflow for badge */
  overflow: visible !important;
}

/* MOBILE OPTIMIZATION: Floating FAB for Likes Cart */
/* This styling applies when JS moves the element into .floating-actions */
.floating-actions .likes-cart-container {
  position: relative !important;
  /* Reset fixed */
  width: 44px !important;
  /* Reduced from 56px */
  height: 44px !important;
  background: transparent !important;
  margin: 0 !important;
  z-index: auto;
  /* Container handles z-index */
  display: flex !important;
  /* Ensure visible */
  align-items: center;
  justify-content: center;
  order: -1;
  /* Ensure it is at the top of the flex stack visually */
}

.floating-actions .likes-cart-btn {
  width: 44px !important;
  /* Reduced from 56px */
  height: 44px !important;
  border-radius: 50% !important;
  box-shadow: 0 4px 15px rgba(199, 125, 255, 0.4) !important;
  /* Match other floating btns */
  background: linear-gradient(45deg, var(--primary), var(--accent)) !important;
  /* 45deg to match others */
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Ensure Icon Size Matches exactly */
.floating-actions .likes-cart-btn svg {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
}

.likes-cart-btn:active {
  transform: scale(0.95);
}

.likes-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.likes-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ff4757, #ff6b9d);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-dark);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  /* FIX: High Z-Index to prevent clipping or hiding */
  z-index: 2000 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.likes-count.show {
  opacity: 1;
  transform: scale(1);
}

/* ======================================================================= */
/* PRODUCT ACTION BUTTONS - WICHTIG FÜR MOBILE                             */
/* ======================================================================= */
.product-actions {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  z-index: 10;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* DESKTOP: Verstecken und bei Hover zeigen */
@media (hover: hover) {
  .product-actions {
    opacity: 0;
    transform: translateY(-10px);
  }

  .product-card:hover .product-actions {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MOBILE / TOUCH: Immer sichtbar, aber leicht transparent wenn inaktiv */
@media (hover: none) {
  .product-actions {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .product-action-btn {
    background: rgba(0, 0, 0, 0.35) !important;
    /* Dunklerer Hintergrund für Kontrast */
    backdrop-filter: blur(8px);
    width: 38px !important;
    height: 38px !important;
  }

  /* Aktiver Status (Liked) muss leuchten */
  .like-btn.liked {
    background: linear-gradient(135deg, #ff4757, #ff6b9d) !important;
    opacity: 1;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
  }
}

.product-action-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  /* Circular shape */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(15px);
  position: relative;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  flex-shrink: 0;
  /* Prevent squashing */
}

.product-action-btn:active {
  transform: scale(0.9);
}

.like-btn {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  opacity: 0.9;
}

.like-btn.liked {
  background: linear-gradient(135deg, #ff4757, #ff6b9d);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

.report-btn {
  background: linear-gradient(135deg, var(--warning), #ffb347);
  opacity: 0.9;
}



.action-icon {
  font-size: 1.2rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.action-icon svg {
  width: 20px;
  height: 20px;
}

/* ======================================================================= */
/* SEARCH SUGGESTIONS                                                      */
/* ======================================================================= */
.search-glow {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  border-radius: 25px;
  opacity: 0;
  z-index: -1;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.search-input:focus+.search-glow {
  opacity: 1;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 50;
  display: none;
  overflow: hidden;
}

.search-suggestions.show {
  display: block;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(42, 42, 42, 0.3);
}

.suggestion-item:active {
  background: rgba(199, 125, 255, 0.1);
}

.suggestion-icon {
  font-size: 1.5rem;
}

.suggestion-title {
  font-weight: 600;
  color: var(--text);
}

.suggestion-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ======================================================================= */
/* FILTERS CONTAINER                                                       */
/* ======================================================================= */
.filters-container {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  margin-bottom: 2rem;
}

.filters-container.show {
  max-height: 1200px;
  /* Genug Platz für Mobile Stacking */
  opacity: 1;
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* ======================================================================= */
/* COLOR SWATCHES STYLES (NEW)                                             */
/* ======================================================================= */
.color-options-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 5px 0;
}

.color-option {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.color-option:hover {
  transform: scale(1.15);
  border-color: rgba(255, 255, 255, 0.6);
  z-index: 2;
}

.color-option.active {
  transform: scale(1.1);
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--primary, #c77dff), 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Tooltip for color name */
.color-option::after {
  content: attr(data-name);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(20, 20, 25, 0.9);
  color: white;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  margin-bottom: 5px;
  z-index: 10;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-option:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* "All Colors" option special styling */
.color-option.all-colors {
  background: linear-gradient(135deg, #333 0%, #555 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.color-option.all-colors::before {
  content: "✕";
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: bold;
}

.color-option.all-colors:hover::before {
  color: #fff;
}

/* ======================================================================= */
/* PAGINATION                                                              */
/* ======================================================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(199, 125, 255, 0.1) 0%, rgba(156, 39, 176, 0.08) 50%, rgba(255, 107, 157, 0.1) 100%);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  border: 1px solid rgba(199, 125, 255, 0.3);
  flex-wrap: wrap;
  /* Umbruch auf Mobile erlauben */
}

.page-btn {
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(199, 125, 255, 0.4);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 44px;
  /* Mindestgröße für Touch */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:active {
  transform: scale(0.95);
}

.page-btn.active {
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  border-color: var(--primary);
}

.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ======================================================================= */
/* SEARCH RESULTS INFO                                                     */
/* ======================================================================= */
.search-results-info {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
}

.results-count {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1rem;
}

.category-display {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
}


/* ======================================================================= */
/* RANKING FEATURE                                                         */
/* ======================================================================= */

/* Button Style */
.ranking-btn {
  background: linear-gradient(135deg, #ffd700, #ffa500);
  /* Gold/Orange */
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
  color: #fff;
}

.ranking-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

/* Modal Overlay */
#rankingModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#rankingModal.show {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Content */
.ranking-modal-content {
  background: #1a1a1a;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.ranking-header {
  padding: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ranking-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.close-ranking-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.ranking-list {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
}

/* Ranking Items */
.ranking-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 10px;
}

.ranking-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.rank-number {
  font-size: 1.2rem;
  font-weight: bold;
  width: 30px;
  text-align: center;
  color: #888;
}

.rank-1 {
  color: #ffd700;
  font-size: 1.5rem;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.rank-2 {
  color: #c0c0c0;
  font-size: 1.4rem;
}

.rank-3 {
  color: #cd7f32;
  font-size: 1.3rem;
}

.rank-img-container {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.rank-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info {
  flex: 1;
}

.rank-title {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 4px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-likes {
  font-size: 0.85rem;
  color: #ff4757;
  font-weight: 600;
}

.category-highlight {
  color: var(--accent);
  font-weight: 600;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-tag {
  background: var(--primary);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 15px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ======================================================================= */
/* LOADING SPINNER                                                         */
/* ======================================================================= */
.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 50;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px;
  border-radius: 15px;
}

.loading-spinner.show {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ======================================================================= */
/* ACTION BUTTONS (Shuffle/Random)                                         */
/* ======================================================================= */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(199, 125, 255, 0.3);
  transition: transform 0.2s ease;
}

.action-btn:active {
  transform: scale(0.96);
}

.shuffle-btn {
  background: linear-gradient(45deg, #ff6b9d, #c77dff);
}

.random-btn {
  background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

/* ======================================================================= */
/* HEADER SEARCH BAR                                                       */
/* ======================================================================= */
.header-search-container {
  flex: 1;
  max-width: 500px;
  margin: 0 2rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}

.header-search-container.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.header-search-box {
  position: relative;
  width: 100%;
}

.header-search-input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
}

.header-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ======================================================================= */
/* RESPONSIVE ENHANCEMENTS                                                 */
/* ======================================================================= */
@media (max-width: 768px) {
  .header-search-container {
    display: none;
    /* Oft zu wenig Platz im Header */
  }

  .filters-grid {
    grid-template-columns: 1fr;
    /* Filter untereinander */
    padding: 1.2rem;
  }

  .pagination {
    background: transparent;
    border: none;
    padding: 0;
    gap: 0.5rem;
  }

  .page-btn {
    padding: 0.6rem 1rem;
    min-width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {

  /* Buttons untereinander */
  .action-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .action-btn {
    justify-content: center;
  }

  /* Filter Buttons größer */
  .filter-toggle {
    padding: 12px;
  }

  /* Suggestion Text kleiner */
  .suggestion-title {
    font-size: 0.95rem;
  }

  /* PAGINATION STYLES */
  .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    padding: 20px;
    width: 100%;
  }

  .page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(20, 20, 25, 0.6);
    color: var(--text-secondary, #a1a1aa);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
  }

  .page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .page-btn.active {
    background: var(--primary, #6366f1);
    /* Fallback Farbe */
    color: white;
    border-color: transparent;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
    font-weight: 700;
  }

  .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    border-color: transparent;
  }

  .pagination-dots {
    color: var(--text-secondary, #a1a1aa);
    font-size: 14px;
    padding: 0 4px;
  }

  /* Prev/Next Buttons etwas hervorheben */
  .page-btn.prev,
  .page-btn.next {
    font-size: 16px;
    background: rgba(255, 255, 255, 0.05);
  }
}