/* ============================================================
   KSV-Produkte – Frontend Styles
   Modern, clean, UIkit-kompatibel
   ============================================================ */

.ksv-products {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.ksv-filter {
    margin-bottom: 16px;
}

.ksv-search {
    margin-top: 12px;
}

.ksv-search-input-wrap {
    flex: 1 1 auto;
    margin-right: 8px;
}

.ksv-search-reset-wrap {
    flex: 0 0 auto;
}

.ksv-reset-button {
    font-size: 0.8rem;
    padding: 4px 10px;
}

@media (max-width: 639px) {
    .ksv-search .uk-flex {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .ksv-search-input-wrap {
        margin-right: 0;
    }

    .ksv-search-reset-wrap {
        align-self: flex-start;
    }
}

.ksv-results-info {
    margin-top: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
    opacity: 0.75;
}

@media (max-width: 639px) {
    .ksv-results-info {
        margin-bottom: 8px;
    }
}

/* ============================================================
   GRID – Kartenaufteilung
   ============================================================ */

#ksv-results,
.ksv-results {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4-spaltig */
    column-gap: 16px;
    row-gap: 18px;
}

/* Tablet */
@media (max-width: 959px) {
    #ksv-results,
    .ksv-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 14px;
        row-gap: 16px;
    }
}

/* Mobile */
@media (max-width: 639px) {
    #ksv-results,
    .ksv-results {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 14px;
    }
}

/* ============================================================
   Bilder in KEINEM Grid anzeigen
   (falls irgendwo noch Markup existiert)
   ============================================================ */

.ksv-product-image-wrap,
.ksv-product-image-inner,
.ksv-fallback-image,
.ksv-fallback-logo {
    display: none !important;
}

/* ============================================================
   Produktkarte
   ============================================================ */

.ksv-product-item {
    opacity: 0;
    transform: translateY(6px);
    animation: ksvFadeIn 0.25s ease-out forwards;
    animation-delay: calc(0.02s * var(--ksv-index, 0));
    border-radius: 8px;
    overflow: hidden;
}

.ksv-product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

.ksv-product-item .uk-card-body {
    padding: 16px 18px 14px 18px;
}

.ksv-product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.35;
}

.ksv-product-title + .ksv-product-meta {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 8px;
}

.ksv-product-meta {
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 4px;
    color: inherit;
}

.ksv-product-meta-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    margin-bottom: 4px;
}

.ksv-product-label {
    font-weight: 600;
    opacity: 0.7;
    min-width: 7.5rem;
}

.ksv-product-value {
    opacity: 0.96;
}

.ksv-product-notes {
    margin-top: 10px;
    font-size: 0.82rem;
    opacity: 0.86;
}

.ksv-product-notes + .ksv-product-locations,
.ksv-product-meta + .ksv-product-locations {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    margin-top: 10px;
    padding-top: 8px;
}

.ksv-product-locations {
    margin-top: 10px;
    font-size: 0.82rem;
}

.ksv-product-locations-label {
    display: block;
    margin-bottom: 4px;
    opacity: 0.75;
    font-weight: 600;
}

.ksv-product-location-list {
    display: block;
}

.ksv-product-location-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.95;
    margin-bottom: 3px;
}

.ksv-product-location-link:last-child {
    margin-bottom: 0;
}

.ksv-product-location-link:hover {
    text-decoration: underline;
}

.ksv-product-location-link--nolink {
    cursor: default;
}

.ksv-location-arrow {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.9em;
    opacity: 0.7;
}

/* ============================================================
   Pagination – sticky, Chip-Style
   ============================================================ */

.ksv-pagination {
    margin-top: 48px;
    padding: 12px 0 8px;
    display: flex;
    justify-content: center;
    position: sticky;
    bottom: 0;
    z-index: 20;

    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.98),
        rgba(255, 255, 255, 0.94),
        rgba(255, 255, 255, 0.0)
    );
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
}

.ksv-pagination-inner {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.ksv-pagination-button {
    border: none;
    background: transparent;
    font-size: 0.85rem;
    padding: 6px 14px;
    border-radius: 999px;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
    outline: none;
}

.ksv-pagination-button:not([disabled]):hover {
    background-color: #1e87f0;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.ksv-pagination-button[disabled] {
    opacity: 0.35;
    cursor: default;
}

.ksv-pagination-info {
    font-size: 0.85rem;
    opacity: 0.75;
}

@keyframes ksvFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 639px) {
    .ksv-filter {
        margin-bottom: 12px;
    }

    .ksv-product-item .uk-card-body {
        padding: 14px 14px 12px 14px;
    }

    .ksv-pagination-inner {
        padding: 6px 12px;
        gap: 8px;
    }

    .ksv-pagination-button {
        padding: 5px 10px;
    }
}

/* Trenner wie im Concept */
.ksv-product-divider{
  border-top: 1px solid rgba(0,0,0,.12);
  margin: 14px 0;
}

/* Anwendungsgebiete: Block untereinander */
.ksv-product-areas{
      font-size: 0.875rem;
  margin: 0;
}

.ksv-product-areas-label{
  font-weight: 700;
  margin-bottom: 4px;
}

.ksv-product-areas-value{
  line-height: 1.4;
}

/* Werke: Label + Liste wie im Concept */
.ksv-product-locations-label{
  font-weight: 700;
  margin-bottom: 6px;
}

/* Damit wirklich pro Zeile ein Werk steht */
.ksv-product-location-list{
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Sticky Filter optisch sauber */
.ksv-filter.ksv-filter-is-sticky{
    top: 100px; 
  z-index: 20;
}

/* Falls der sticky Zustand Schatten bekommen soll (subtil) */
.ksv-filter.ksv-filter-is-sticky{
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* Sticky-Filter: unter der Navbar andocken + etwas Luft */
.ksv-filter.ksv-filter-is-sticky{
  /* optisch */
  padding-top: 14px;
  padding-bottom: 14px;

  /* damit es nicht von Headern überdeckt wird */
  z-index: 999;
}

/* Optional: wenn deine Navbar fixed/sticky ist und transparent überlappt,
   kannst du zusätzlich eine "Sicherheitskante" schaffen */
.ksv-filter.ksv-filter-is-sticky::before{
  content: "";
  display: block;
  height: 0; /* bei Bedarf auf z.B. 8px setzen */
}