/* === Allgemeines Styling für Swatches === */
.lunor-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.lunor-swatch-button {
  position: relative;
  width: 26px;
  height: 26px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
}

.lunor-swatch-button.active {
  border-color: #000;
}

.lunor-swatch-button img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.lunor-swatch-label {
  display: none;
  font-size: 12px;
  text-align: center;
  margin-top: 4px;
  line-height: 1.2;
}

/* Nur auf Mobile anzeigen */
@media (max-width: 768px) {
  .lunor-swatch-label {
    display: block;
  }
}

/* === Tooltip Styling === */
.lunor-swatch-button[title]:hover::after {
  content: attr(title);
  position: absolute;
  background: #000;
  color: #fff;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 4px;
  white-space: nowrap;
  z-index: 999;
  top: -40px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s;
}

/* Tooltip-Pfeil */
.lunor-swatch-button[title]:hover::before {
  content: "";
  position: absolute;
  top: -10px;
  border: 5px solid transparent;
  border-bottom-color: #000;
  z-index: 998;
}

/* Zentriert */
.lunor-swatch-button[title]:hover::after {
  left: 50%;
  transform: translateX(-50%);
}
.lunor-swatch-button[title]:hover::before {
  left: 50%;
  transform: translateX(-50%);
}

/* Tooltip am linken Rand → nach rechts zeigen */
.lunor-swatch-button[data-tooltip-position="left"][title]:hover::after {
  left: auto;
  right: 0;
  transform: none;
}
.lunor-swatch-button[data-tooltip-position="left"][title]:hover::before {
  left: auto;
  right: 10px;
  transform: none;
}

/* Tooltip am rechten Rand → nach links zeigen */
.lunor-swatch-button[data-tooltip-position="right"][title]:hover::after {
  left: 0;
  transform: none;
}
.lunor-swatch-button[data-tooltip-position="right"][title]:hover::before {
  left: 10px;
  transform: none;
}

.lunor-active-color-name {
  font-size: 14px;
  margin-top: 12px;
  font-weight: 500;
  text-align: left;
  display: none; /* Standard: nur auf Detailseite anzeigen */
}

.single-product .lunor-active-color-name {
  display: block;
}

@media (max-width: 768px) {
  .lunor-swatches {
    display: flex;
    flex-wrap: wrap; /* <- geändert */
    gap: 10px;
    padding: 0.5rem 0;
  }

  .lunor-swatches::-webkit-scrollbar {
    display: none; /* Safari, Chrome */
  }

  .lunor-swatch-button {
    flex: 0 0 auto;
  }
}

.single-product .single_add_to_cart_button,
.single-product form.cart {
    display: none !important;
}

@media (max-width: 768px) {
  .archive .lunor-active-color-name {
    display: none !important;
  }
}

.single-product .lunor-swatches {
  flex-wrap: wrap;
  align-items: flex-start;
}

.single-product .lunor-active-color-name {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.95rem;
	text-align:center;
}