/* Home product - category button */
.home-product .category-list .btn-category {
  appearance: none;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  padding: 0;
}

.home-product.is-loading .category-list .btn-category {
  pointer-events: none;
  opacity: 0.6;
}

/* Home product - AJAX loading */
.home-product .block-home-product-slide {
  position: relative;
  transition: opacity 0.25s ease;
}

.home-product .block-home-product-slide.is-loading {
  pointer-events: none;
}

.home-product .block-home-product-slide.is-loading .marquee {
  opacity: 0.35;
  filter: blur(1px);
  transition:
    opacity 0.25s ease,
    filter 0.25s ease;
}

.home-product .block-home-product-slide.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.35);
}

.home-product .block-home-product-slide.is-loading::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: canhcam-home-product-spin 0.7s linear infinite;
}

@keyframes canhcam-home-product-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Taxonomy product catalog - AJAX loading */
#product-result-container {
  position: relative;
  transition: opacity 0.25s ease;
}

#product-result-container.is-loading {
  pointer-events: none;
  min-height: 240px;
}

#product-result-container.is-loading #product-grid,
#product-result-container.is-loading #product-pagination {
  opacity: 0.35;
  filter: blur(1px);
  transition:
    opacity 0.25s ease,
    filter 0.25s ease;
}

#product-result-container.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 8px;
}

#product-result-container.is-loading::before {
  content: "";
  position: absolute;
  top: 120px;
  left: 50%;
  z-index: 6;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--color-primary-1, currentColor);
  border-radius: 50%;
  animation: canhcam-home-product-spin 0.7s linear infinite;
}

.section-product-catalog:has(#product-result-container.is-loading) .js-taxonomy-parent-filter {
  pointer-events: none;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .section-factory-tour iframe {
    display: none;
  }
}
