/**
 * widgets-cards.css - AI-Summary, Produktkarten (V2-Vorlage index_v17)
 */

.base-card {
  padding: 24px;
  background: var(--color-white);
  border: 1px solid var(--color-table-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.base-card-body {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.base-section-card {
  margin-bottom: 24px;
  padding: 24px;
  background: var(--color-white);
  border: 1px solid var(--color-table-border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.base-ai-summary {
  background: var(--color-white);
  border-radius: 24px;
  padding: 32px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.base-ai-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.base-ai-icon {
  width: 40px;
  height: 40px;
  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);
}

.base-ai-icon-graphic {
  width: 22px;
  height: 22px;
}

.base-ai-summary-text {
  font-family: var(--font-secondary);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-anthracite);
  padding-left: 52px;
}

.base-ai-summary-text strong {
  color: var(--color-orange);
  font-weight: 600;
}

.base-ai-summary-title {
  font-family: var(--font-headings);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-anthracite);
}

.base-ai-summary-highlight {
  color: var(--color-orange);
  font-weight: 600;
}

.base-ai-summary-segment {
  font-weight: 400;
}

/* AI-Overview-Absaetze: eine Klasse pro p (011-ui-html Regel 021); Typografie erbt von .base-ai-summary-text */
.base-content-text-search-ai-overview-paragraph {
  margin: 0 0 12px 0;
}

.base-content-text-search-ai-overview-paragraph:last-child {
  margin-bottom: 0;
}

.base-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--color-gray-10);
}

/* 011-ui-css-tiles Regel 018: Headline vor Bild; ein Klassenname pro Element */
.base-product-card-headline {
  padding: 24px 24px 12px;
  box-sizing: border-box;
  flex-shrink: 0;
  width: 100%;
}

.base-product-info-showcase-after-headline {
  padding-top: 16px;
}

.base-product-card:hover {
  will-change: transform;
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-product-card-hover);
}

.base-product-image {
  height: 160px;
  background: linear-gradient(135deg, var(--color-product-image-gradient-start) 0%, var(--color-product-image-gradient-end) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.base-product-image-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.base-hexagon-product-image {
  --hexagon-size: 80px;
  opacity: 0.8;
}

.base-hexagon-svg-product-image {
  width: 40px;
  height: 40px;
  color: var(--color-white);
}

.base-product-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: var(--color-orange);
  color: var(--color-white);
  font-family: var(--font-primary);
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.base-product-info {
  flex: 1;
  min-height: 0;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.base-product-desc {
  font-family: var(--font-secondary);
  font-size: 14px;
  color: var(--color-gray-50);
  margin-bottom: 16px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 3);
}

.base-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);
  margin-top: auto;
}

.base-product-link:hover {
  gap: 10px;
}

/* Kompakte Such-Ergebnis-Karte: Zeile mit 80px-Thumbnail links, Text rechts (wie fruehere search-product-item) */
.base-product-card-search {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-background);
  border: 1px solid var(--color-table-border);
  border-left: 4px solid var(--color-accent);
  border-radius: 6px;
  box-shadow: var(--shadow-product-card-search-rest);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.base-product-card-search:hover {
  border-left-color: var(--color-accent-hover);
  box-shadow: var(--shadow-product-card-search-hover);
}

.base-product-image-search {
  width: 80px;
  height: 80px;
  min-width: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--color-table-border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-10);
}

.base-product-image-img-search {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.base-product-info-search {
  flex: 1;
  min-width: 0;
  padding: 0;
}

.base-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.base-products-carousel-wrapper {
  position: relative;
  margin-bottom: 48px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: 56px;
  padding-right: 56px;
  overflow-x: hidden;
}

.base-products-carousel-viewport {
  overflow-x: hidden;
  overflow-y: visible;
  border-radius: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
}

.base-products-carousel-track {
  display: flex;
  gap: 0;
  margin-bottom: 0;
}

.base-product-card-carousel-item {
  flex: 0 0 calc(25% - 16px);
  margin: 0 8px;
  scroll-snap-align: start;
  cursor: pointer;
}

.base-carousel-arrow-prev,
.base-carousel-arrow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--color-carousel-arrow-border);
  background: var(--color-carousel-arrow-bg);
  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);
}

/* Änderungsprotokoll: 2026-06-16 | agent | @skill-css-rules, @skill-change-provenance | Pfeil-Position nur fuer .base-products-carousel-wrapper, nicht Search-Slot */
.base-products-carousel-wrapper > .base-carousel-arrow-prev {
  left: 8px;
}

.base-products-carousel-wrapper > .base-carousel-arrow-next {
  right: 8px;
}

.base-carousel-arrow-prev:hover,
.base-carousel-arrow-next: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);
}

.base-carousel-arrow-prev:active,
.base-carousel-arrow-next:active {
  transform: translateY(-50%) scale(0.95);
}

.base-carousel-arrow-prev:disabled,
.base-carousel-arrow-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.base-carousel-arrow-icon {
  width: 20px;
  height: 20px;
}

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

.base-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;
}

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

@media (max-width: 1024px) {
  .base-product-card-carousel-item {
    flex: 0 0 calc(50% - 16px);
  }
}

@media (max-width: 575px) {
  .base-products-carousel-wrapper {
    padding-left: 48px;
    padding-right: 48px;
  }
  /* 011-ui-mobile Regel 003: horizontaler Innenabstand Kachel/Karten-Text max. 20px */
  .base-ai-summary {
    padding: 24px 20px;
  }
  .base-ai-summary-text {
    padding-left: 0;
    margin-top: 16px;
  }
  .base-section-card {
    padding: 20px;
  }
  .base-product-card-headline {
    padding: 20px 20px 12px;
  }
  .base-product-info {
    padding: 20px;
  }
  .base-card {
    padding: 20px;
  }
  .base-product-card-carousel-item {
    flex: 0 0 calc(100% - 16px);
  }
  .base-products-carousel-wrapper > .base-carousel-arrow-prev,
  .base-products-carousel-wrapper > .base-carousel-arrow-next {
    width: 40px;
    height: 40px;
  }
  .base-products-carousel-wrapper > .base-carousel-arrow-prev {
    left: 6px;
  }
  .base-products-carousel-wrapper > .base-carousel-arrow-next {
    right: 6px;
  }
  .base-carousel-arrow-icon {
    width: 16px;
    height: 16px;
  }
}
