/**
 * Congatec Search: Layout/Typografie wie file:///…/Downloads/ai-search/index_v17.html (Harley-James-Prototyp).
 * Globale Vorlagen-Widgets: widgets-hero.css, widgets-harley-james.css; Schriften: Montserrat/Inter via base.html.
 */

.congatec-search-page {
  padding: 0;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.search-form-autosuggest-wrapper {
  width: 100%;
  position: relative;
}

a.suggestion-chip,
button.suggestion-chip {
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-sizing: border-box;
}

button.suggestion-chip {
  font: inherit;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

/* Prototyp: H2 ohne Browser-Default-Margin */
.congatec-search-page h2.section-title {
  margin: 0;
}

.product-image a {
  display: block;
  height: 100%;
  color: inherit;
}

/**
 * Produktkarten unter „Related Products“ / Suchergebnis: Typografie und Abstände 1:1 wie
 * htdocs/css/app/theme1/base/widgets-harley-james.css (.product-info, .product-name, .product-desc, .product-link).
 * Höhere Spezifität unter .congatec-search-page; Container nutzt base-results-section / base-results-section-active (eine Klasse pro Zustand, 011-ui-html.mdc Regel 021).
 */
.congatec-search-page .base-results-section .product-info,
.congatec-search-page .base-results-section-active .product-info {
  padding: 24px;
}

.congatec-search-page .base-results-section .product-name,
.congatec-search-page .base-results-section-active .product-name {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-anthracite);
  margin: 0 0 8px;
  line-height: 1.3;
}

.congatec-search-page .base-results-section .product-name a,
.congatec-search-page .base-results-section-active .product-name a {
  color: inherit;
  text-decoration: none;
  font-size: inherit;
  font-weight: 700;
  font-family: inherit;
  line-height: inherit;
}

.congatec-search-page .base-results-section .product-name a:hover,
.congatec-search-page .base-results-section-active .product-name a:hover {
  color: var(--color-orange);
}

.congatec-search-page .base-results-section .product-desc,
.congatec-search-page .base-results-section-active .product-desc {
  font-family: var(--font-secondary);
  font-size: 14px;
  color: var(--color-gray-50);
  margin: 0 0 16px;
  line-height: 1.5;
}

.congatec-search-page .base-results-section .product-link,
.congatec-search-page .base-results-section-active .product-link {
  font-family: var(--font-primary);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-orange);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.congatec-search-page .base-results-section .product-link:hover,
.congatec-search-page .base-results-section-active .product-link:hover {
  gap: 10px;
}

/**
 * AI-Summary-Karte 1:1 wie briefing/vorlage/harley-james/index_v17.html (widgets-harley-james.css),
 * mit hoeherer Spezifitaet unter .congatec-search-page .base-results-section(|-active).
 */
.congatec-search-page .base-results-section .ai-summary,
.congatec-search-page .base-results-section-active .ai-summary {
  background: var(--color-white);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.congatec-search-page .base-results-section .ai-summary-header,
.congatec-search-page .base-results-section-active .ai-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.congatec-search-page .base-results-section .ai-icon,
.congatec-search-page .base-results-section-active .ai-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-orange), var(--color-orange-gradient-end));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.congatec-search-page .base-results-section .ai-icon svg,
.congatec-search-page .base-results-section-active .ai-icon svg {
  width: 22px;
  height: 22px;
}

.congatec-search-page .base-results-section .ai-summary-title,
.congatec-search-page .base-results-section-active .ai-summary-title {
  font-family: var(--font-headings);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-anthracite);
}

.congatec-search-page .base-results-section .ai-summary-text,
.congatec-search-page .base-results-section-active .ai-summary-text {
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-anthracite);
  padding-left: 52px;
}

.congatec-search-page .base-results-section .ai-summary-text strong,
.congatec-search-page .base-results-section-active .ai-summary-text strong {
  color: var(--color-orange);
  font-weight: 600;
}

.congatec-search-page .base-results-section .ai-summary-text .base-content-text-search-ai-overview-paragraph,
.congatec-search-page .base-results-section-active .ai-summary-text .base-content-text-search-ai-overview-paragraph {
  margin: 0 0 12px 0;
}

.congatec-search-page .base-results-section .ai-summary-text .base-content-text-search-ai-overview-paragraph:last-child,
.congatec-search-page .base-results-section-active .ai-summary-text .base-content-text-search-ai-overview-paragraph:last-child {
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .congatec-search-page .base-results-section .ai-summary,
  .congatec-search-page .base-results-section-active .ai-summary {
    padding: 24px;
  }

  .congatec-search-page .base-results-section .ai-summary-text,
  .congatec-search-page .base-results-section-active .ai-summary-text {
    padding-left: 0;
    margin-top: 16px;
  }
}

.ai-summary-text .loading-dots {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.congatec-search-page .products-carousel-wrapper {
  position: relative;
  margin-bottom: 48px;
}

.congatec-search-page #search-results-wrapper {
  overflow-x: visible;
}

.congatec-search-page .products-carousel-viewport {
  overflow-x: auto;
  overflow-y: visible;
  border-radius: 20px;
  width: 100%;
  scroll-behavior: smooth;
}

.congatec-search-page .products-carousel-track {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.congatec-search-page .products-carousel-track .product-card,
.congatec-search-page .product-card-carousel-item {
  flex: 0 0 calc(25% - 16px);
  margin: 0 8px;
  scroll-snap-align: start;
  cursor: pointer;
}

.congatec-search-page .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(252, 76, 2, 0.15);
  background: rgba(252, 76, 2, 0.1);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
  color: var(--color-anthracite);
}

.congatec-search-page .carousel-arrow:hover {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
  transform: translateY(-50%) scale(1.08);
}

.congatec-search-page .carousel-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.congatec-search-page .carousel-arrow.prev {
  left: -56px;
}

.congatec-search-page .carousel-arrow.next {
  right: -56px;
}

.congatec-search-page .carousel-arrow-prev {
  left: -56px;
}

.congatec-search-page .carousel-arrow-next {
  right: -56px;
}

.congatec-search-page .carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.congatec-search-page .carousel-arrow:disabled:hover {
  background: rgba(252, 76, 2, 0.1);
  border-color: rgba(252, 76, 2, 0.15);
  color: var(--color-anthracite);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%) scale(1);
}

.congatec-search-page .carousel-arrow svg {
  width: 20px;
  height: 20px;
}

.congatec-search-page .carousel-arrow-icon {
  width: 20px;
  height: 20px;
}

.congatec-search-page .carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.congatec-search-page .carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-gray-20);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.congatec-search-page .carousel-dot.active {
  background: var(--color-orange);
  transform: scale(1.2);
}

.congatec-search-page .carousel-dot-active {
  background: var(--color-orange);
  transform: scale(1.2);
}

.congatec-search-page .carousel-dot:hover:not(.active) {
  background: var(--color-gray-50);
}

@media (max-width: 1024px) {
  .congatec-search-page .products-carousel-track .product-card,
  .congatec-search-page .product-card-carousel-item {
    flex: 0 0 calc(50% - 16px);
  }
}

@media (max-width: 768px) {
  .congatec-search-page .products-carousel-track .product-card,
  .congatec-search-page .product-card-carousel-item {
    flex: 0 0 calc(100% - 16px);
  }

  .congatec-search-page .carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .congatec-search-page .carousel-arrow.prev {
    left: -48px;
  }

  .congatec-search-page .carousel-arrow.next {
    right: -48px;
  }

  .congatec-search-page .carousel-arrow-prev {
    left: -48px;
  }

  .congatec-search-page .carousel-arrow-next {
    right: -48px;
  }

  .congatec-search-page .carousel-arrow-icon {
    width: 16px;
    height: 16px;
  }
}
