/* ==========================================================
   BT WooCommerce Product Loop CSS
   Zweck:
   - Produktkarten in Shop, Archiven und Related Products
   - CTA, Preisinfos, Heliumhinweis und Kartenlayout
   - keine mehrfach konkurrierenden Button-Regeln
   ========================================================== */


/* ==========================================================
   LOOP CTA
   Desktop:
   - „Produkt ansehen“
   - erst bei Hover oder Tastaturfokus sichtbar

   Mobile/Touch:
   - „Details“
   - dauerhaft sichtbar
   ========================================================== */

.woocommerce ul.products li.product a.button.bt-loop-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;

  width: 100%;
  margin-top: auto;

  white-space: nowrap;
}

.woocommerce ul.products li.product a.button.bt-loop-cta::after {
  content: "→";
  display: inline-block;

  margin-left: 4px;

  font-size: 16px;
  font-weight: 400;
  line-height: 1;

  transform: rotate(-45deg);
  transition: transform 0.18s ease;
}

.woocommerce ul.products li.product:hover a.button.bt-loop-cta::after,
.woocommerce ul.products li.product:focus-within a.button.bt-loop-cta::after {
  transform: rotate(-45deg) translateX(2px) translateY(-1px);
}

.bt-loop-cta__label--mobile {
  display: none;
}

@media (min-width: 768px) {
  .woocommerce ul.products li.product a.button.bt-loop-cta {
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);

    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0.18s ease;
  }

  .woocommerce ul.products li.product:hover a.button.bt-loop-cta,
  .woocommerce ul.products li.product:focus-within a.button.bt-loop-cta {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  .bt-loop-cta__label--desktop {
    display: none;
  }

  .bt-loop-cta__label--mobile {
    display: inline;
  }

  .woocommerce ul.products li.product a.button.bt-loop-cta {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}


/* ==========================================================
   FALLBACK FÜR ÄLTERE „PRODUKT ANSEHEN“-LINKS

   Greift nur, falls ein bestehender Loop-Link noch keine
   Klasse .bt-loop-cta besitzt, aber bt_pool in der URL trägt.
   ========================================================== */

@media (hover: hover) and (pointer: fine) {
  .woocommerce
    ul.products
    li.product
    a.button[href*="bt_pool="]:not(.bt-loop-cta) {
    width: 90% !important;

    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);

    text-align: center !important;

    transition:
      opacity 0.15s ease,
      transform 0.15s ease,
      visibility 0.15s ease;
  }

  .woocommerce
    ul.products
    li.product:hover
    a.button[href*="bt_pool="]:not(.bt-loop-cta),
  .woocommerce
    ul.products
    li.product:focus-within
    a.button[href*="bt_pool="]:not(.bt-loop-cta) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

@media (hover: none), (pointer: coarse) {
  .woocommerce
    ul.products
    li.product
    a.button[href*="bt_pool="]:not(.bt-loop-cta) {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}


/* ==========================================================
   PRODUKTTAGS UND TITEL
   ========================================================== */

.bt-loop-tag {
  margin-bottom: 4px;

  font-size: 0.85rem;
  font-weight: 400;
}

.bt-loop-tag__link {
  color: #414544;

  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.bt-loop-tag__link:hover {
  color: #cb0e70;
}

.bt-loop-title-link {
  color: #414544;
  text-decoration: none;
}

.bt-loop-title-link:hover {
  color: #cb0e70;
  text-decoration: underline;
}


/* ==========================================================
   PRODUKTTITEL: HÖHE UND CLAMP
   ========================================================== */

.woocommerce-loop-product__title {
  display: -webkit-box;
  overflow: hidden;

  min-height: 68px;
  margin-bottom: 10px;

  color: #414544;

  font-family:
    Monaco,
    "Lucida Sans Typewriter",
    "Lucida Typewriter",
    "Courier New",
    Courier,
    monospace;
  font-size: 17px !important;
  font-weight: 400;
  line-height: 1.3;

  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

@media (max-width: 1247px) {
  .woocommerce-loop-product__title {
    min-height: 85px;
  }
}

@media (max-width: 768px) {
  .woocommerce-loop-product__title {
    min-height: 70px !important;
  }
}


/* ==========================================================
   PREIS, MWST. UND VERSAND
   ========================================================== */

.woocommerce ul.products li.product .price {
  display: inline;

  margin-bottom: 0;

  color: #414544;
  font-size: 20px;
}

.woocommerce ul.products li.product .wc-gzd-additional-info.tax-info,
.wc-gzd-additional-info.wc-gzd-additional-info-loop.tax-info {
  display: inline;

  margin: 0;

  font-size: 0.7em;
  opacity: 0.75;
}

.wc-gzd-additional-info.wc-gzd-additional-info-loop.shipping-costs-info {
  margin-top: 0;

  font-size: 0.8em;
  opacity: 0.75;
}

.wc-gzd-additional-info.wc-gzd-additional-info-loop.shipping-costs-info a {
  margin-top: 0;

  color: #414544;

  font-size: inherit;
  text-decoration: underline !important;
}

.wc-gzd-price-info,
.woocommerce-price-suffix {
  color: #777;

  font-size: 0.75rem;
}


/* ==========================================================
   HELIUMHINWEIS
   ========================================================== */

.wc-helium-note {
  display: flex;
  align-items: center;
  gap: 10px;

  box-sizing: border-box;
  width: 100%;

  margin-top: 12px;
  margin-bottom: 14px;
  padding: 9px 12px;

  border-left: 3px solid rgba(228, 44, 140, 0.65);
  border-radius: 10px;

  background: rgba(228, 44, 140, 0.06);

  font-size: 0.83rem;
  line-height: 1.25;

  cursor: default !important;
}

.wc-helium-note::before {
  content: "✓";

  flex: 0 0 auto;

  color: var(--bt-accent);

  font-size: 1rem;
  line-height: 1;
}

.wc-helium-note__link {
  position: relative;

  color: #414544;

  font-weight: 600;
  text-decoration: none !important;
}

.wc-helium-note__link:hover,
.wc-helium-note__link:focus {
  color: #414544;
  text-decoration: none !important;
}

@media (max-width: 767px) {
  .wc-helium-note {
    gap: 8px;

    padding: 7px 10px;

    border-left-width: 2px;
    border-radius: 8px;

    font-size: 0.78rem;
    line-height: 1.15;
  }

  .wc-helium-note::before {
    font-size: 0.92rem;
  }

  .wc-helium-note__link {
    font-weight: 500;
  }
}


/* ==========================================================
   PRODUKTKARTE
   ========================================================== */

.woocommerce ul.products.columns-3 li.product,
.woocommerce-page ul.products.columns-3 li.product {
  display: flex;
  flex-direction: column;

  box-sizing: border-box;
  height: 100%;

  padding: 18px;

  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}


/* ==========================================================
   PRODUKTKARTE: DESKTOP-HOVER
   ========================================================== */

@media (hover: hover) and (pointer: fine) {
  .woocommerce ul.products li.product {
    transition:
      transform 0.18s ease,
      box-shadow 0.18s ease;
  }

  .woocommerce ul.products li.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  }
}