/* ./assets/css/produkt-archiv.css */

.product-category,
.product_cat,
li.product-category,
ul.products li.product-category {
  display: none !important;
}

/* Product title link styling */
.woocommerce-loop-product__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.woocommerce-loop-product__title a:hover {
  color: #000000;
  text-decoration: underline;
}

.product-image-container {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  transition: border-color 0.3s ease;
}

.product-image-container:hover {
  border-color: #000000;
}

.product-image-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.product-image-container:hover .product-image-wrapper img {
  opacity: 0.6;
}

.product-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
}

.product-image-container:hover .product-hover-overlay {
  opacity: 1;
  visibility: visible;
}

.overlay-inner {
  text-align: center;
  padding: 30px;
  width: 100%;
  max-width: 280px;
}

.quantity-section {
  margin-bottom: 20px;
}

.quantity-label {
  display: block;
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.quantity-input {
  width: 80px;
  padding: 10px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid #ffffff;
  background: #ffffff;
  color: #000000;
  text-align: center;
  transition: all 0.2s ease;
}

.quantity-input:hover {
  border-color: #f3f4f6;
}

.quantity-input:focus {
  outline: none;
  border-color: #d1d5db;
}

.add-to-cart-btn {
  width: 100%;
  padding: 14px 24px;
  background: #ffffff;
  color: #000000;
  border: 1px solid #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.add-to-cart-btn:hover {
  background: #000000;
  color: #ffffff;
}

.add-to-cart-btn:active {
  transform: scale(0.98);
}

.add-to-cart-btn.loading {
  pointer-events: none;
}

.add-to-cart-btn.loading .btn-text {
  opacity: 0;
}

.btn-text {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.btn-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid #000000;
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.add-to-cart-btn.loading .btn-spinner {
  opacity: 1;
  animation: spin 0.6s linear infinite;
}

.add-to-cart-btn:hover .btn-spinner {
  border-color: #ffffff;
  border-top-color: transparent;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

#toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
}

.toast {
  background: #000000;
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #1f2937;
  transform: translateX(450px);
  opacity: 0;
  transition: all 0.3s ease;
  min-width: 350px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  border-color: #ffffff;
}

.toast-error {
  background: #1f2937;
  border-color: #ef4444;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-message {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

.toast-close {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-close:hover {
  color: #ffffff;
}

@media (max-width: 768px) {
  .overlay-inner {
    padding: 20px;
    max-width: 240px;
  }

  .quantity-input {
    width: 70px;
    padding: 8px;
    font-size: 14px;
  }

  .add-to-cart-btn {
    padding: 12px 20px;
    font-size: 12px;
  }

  #toast-container {
    bottom: 20px;
    right: 20px;
    left: 20px;
    max-width: none;
  }

  .toast {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .quantity-label {
    font-size: 11px;
  }

  .add-to-cart-btn {
    font-size: 11px;
    padding: 10px 16px;
  }

  #toast-container {
    bottom: 15px;
    right: 15px;
    left: 15px;
  }
}

.quantity-input:focus-visible,
.add-to-cart-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .product-image-wrapper img,
  .product-hover-overlay,
  .toast,
  .add-to-cart-btn,
  .btn-spinner {
    transition: none;
    animation: none;
  }
}
