:root {
    --rot: #B30C0C; /* global scope */
    --blau: #1E4370;
}


/* Basic styles for WP Leaflet Entries */
.wple-map {
  width: 100%;
  min-height: 300px;
}
.wple-popup { font-size: 14px; line-height: 1.4; }
.wple-popup .wple-title { margin: 0 0 6px; font-size: 16px; }
.wple-popup .wple-desc { margin: 6px 0 8px; }
.wple-popup .wple-meta div { margin: 2px 0; }

/* Filter UI */

.wple-filter .wple-field { display: flex; flex-direction: column; }
.wple-filter label { font-size: 13px; color: #374151; margin-bottom: 4px; }
.wple-filter select,
.wple-filter input[type="text"] {
  min-width: 180px;
  padding: 6px 8px;
  font-size: 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}
.wple-filter .wple-field-ort .wple-ort-input {
  /* Absichern, dass das Eingabefeld fokussier- und klickbar bleibt */
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}
/* Gleiches für die neuen freien Eingabefelder */
.wple-filter .wple-field-location .wple-loc-input,
.wple-filter .wple-field-search .wple-search-input {
  position: relative;
  z-index: 1001;
  pointer-events: auto;
}
.wple-filter select:focus,
.wple-filter input[type="text"]:focus {
  outline: none;
  border-color: #1d4ed8;
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
}
.wple-filter .wple-field-reset button {
  font-size: 14px;
    border: none;
  background: #fff;
  cursor: pointer;
    width: fit-content;
    text-decoration: underline;
    color: var(--blau);
    font-weight: 400;
}
.wple-filter .wple-field-reset button:hover,
.wple-filter .wple-field-reset button:focus {
  background: #f3f4f6;
  outline: none;
}


.wple-filter .wple-field.wple-field-location{
    flex: 2;
}

.wple-filter .wple-field.wple-field-radius{
    flex: 1;
}

/* Karte dezent abrunden, ohne starkes Design aufzuzwingen */
.wple-map {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

/* Colored pins (by Produktkategorie) */
/* The pin color is set inline by JS using HSL derived from the primary category slug. */
.leaflet-marker-icon.wple-pin,
.leaflet-marker-icon.wple-pin img { background: transparent; border: none; }
.wple-pin { border: none; background: transparent; }
.wple-pin .wple-pin-dot {
  width: var(--wple-pin-size, 18px);
  height: var(--wple-pin-size, 18px);
  display: inline-block;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.25);
}

.leaflet-control-attribution a svg {
    display: none !important;
}

/* List under the map */
.wple-list {
  display: flex;
  gap: 60px;
  margin-top: 14px;
  flex-wrap: wrap;
}

/* Actions below list (e.g., Load More) */
.wple-list-actions {
  display: flex;
  justify-content: center;
}
.wple-load-more {
  padding: 8px 14px;
  font-size: 18px;
  border: none;
    background-color: #fff;
  color: var(--blau);
  cursor: pointer;
  margin-top: 75px;
  text-decoration: underline;
}

/* Cards (Liste unter der Karte) */

.wple-card-thumb-link { display: block; }
.wple-card-thumb {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e5e7eb;
  object-fit: cover;
    max-height: 230px;
    border-radius: 0;
}

.wple-card {
  background: #fff;
  border: 1px solid #e5e7eb; /* light gray */
    border-radius: 25px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  flex-basis: calc(33.3% - 60px);
}

.wple-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.wple-card-image img,
.wple-card-thumb {
  width: 100%;
  height: auto;
  display: block;
}

.wple-card-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
    color: var(--blau);
}

.wple-card-content p {
    display: none;
}

.wple-card-more {
    color: white;
    font-size: 18px;
    display: flex;
}

.wple-card-content br {
    display: none;
}

.wple-card-content .wple-card-value br {
    display: block;
}

.wple-card-textcontent {
    padding: 40px;
}

.wple-card-title {
    margin: 0;
}

.wple-card-title a{
    color: var(--rot);
    font-weight: 600;
    text-decoration: none;
    font-size: 28px;
    margin-top: 15px;
}

.wple-card-avatars {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}
.wple-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 70px;
}
.wple-avatar img,
.wple-avatar .wple-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.wple-avatar-more {
  background: #e5e7eb;
  color: #374151;
  font-weight: 700;
  line-height: 1;
  font-size: 42px;
}
.wple-card-excerpt { font-size: 14px; color: #444; }
.wple-card-meta { font-size: 16px;}
.wple-card-line { margin: 2px 0; }
.wple-card-label { font-weight: 600; margin-right: 6px; }

/* Button style for card links */
.wple-card a.wple-more-link {
    background-color: #1E4370;
    color: white;
    padding: 20px 40px;
  border-radius: 25px;
  text-decoration: none !important;
  font-size: 14px;
    margin-top: 30px;
}


.wple-card .wple-more-link:hover {
  background: #1d4ed8;
  color: #fff;
}

/* Categories list above filter/map */

.wple-cats-title {
    margin: 0 0 50px;
    color: var(--rot);
  font-weight: 600;
    font-size: 28px;
    text-align: center;
}


.wple-cats-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 14px;
}

.wple-cats-list-box {
    margin: 0 auto;
    width: 75%;
}


.wple-cats-item {
  display: flex;
  gap: 8px;
  align-items: center;
}
.wple-cats-name {
  font-weight: 600;
}
.wple-cats-sep { color: #6b7280; }
.wple-cats-text { color: #374151; }

/* Kategorie-Bild (optional) */
.wple-cats-thumb {
  width: 75px;
  height: 75px;
  flex: 0 0 75px;
}
.wple-cats-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* No-results hint */
.wple-empty {
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: #fff8e1; /* soft amber */
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 6px;
  font-size: 14px;
}

/* ========================= */
/* Single Entry (wple_entry) */
/* ========================= */
.wple-standalone {
  /* Neutral container independent from theme */
  max-width: var(--theme-normal-container-max-width);
  margin: 0 auto;
  padding: 24px 20px;
  font-size: 16px;
    font-weight: 400    ;
  color: var(--blau); /* gray-900 */
}

/* Content-only mode: hide theme chrome while keeping assets loaded */
body.wple-standalone-content-only header,
body.wple-standalone-content-only .site-header,
body.wple-standalone-content-only footer,
body.wple-standalone-content-only .site-footer,
body.wple-standalone-content-only .wp-block-template-part,
body.wple-standalone-content-only .page-header,
body.wple-standalone-content-only .entry-header,
body.wple-standalone-content-only .site-navigation,
body.wple-standalone-content-only nav[role="navigation"] {
  display: none !important;
}

body.wple-standalone-content-only .site,
body.wple-standalone-content-only .wp-site-blocks {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

.wple-single {
  margin: 24px auto;
}
/* Header section with featured image (left) and gallery (right) above h1 */
.wple-single-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  margin-bottom: 24px;
}
.wple-single-header-left,
.wple-single-header-right {
  display: flex;
  flex-direction: column;
}
.wple-single-featured-link {
  display: block;
  cursor: pointer;
}
.wple-single-featured-link:hover .wple-single-featured {
  opacity: 0.9;
  transition: opacity 0.2s;
}
.wple-single-inner {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Links Text, rechts Produktkategorien */
  gap: 50px;
}
.wple-single-title {
  margin: 20px 0 12px;
  font-size: 36px;
        color: var(--rot);
    font-weight: 600;
}
/* Kontaktblock unter dem Titel */
.wple-single-contact {
    border-radius: 6px;
  color: var(--blau);
  font-size: 16px;
    margin: 8px 0 50px;
}
.wple-single-contact .wple-contact-address {
  margin: 0 0 8px;
  line-height: 1.5;
}
.wple-single-contact .wple-contact-meta {
  display: grid;
  gap: 6px;
}
.wple-single-contact .wple-contact-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.wple-single-contact a {
  color: var(--blau);
  text-decoration: underline;
}
.wple-single-contact a:hover,
.wple-single-contact a:focus {
  text-decoration: none;
}
.wple-single-contact .wple-contact-opening-text {
  white-space: pre-wrap;
}
.wple-single-content {
  font-size: 16px;
  line-height: 1.6;
}
.wple-single-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wple-single-right .wple-cats-title {
    text-align: left;
    margin-bottom: 30px;
}

.wple-single-right .wple-cats-list{
    display: flex;
    flex-direction: column;

}

.wple-single-right .wple-cats-item{
 flex: 1;
 align-items: center !important;
    font-size: 16px;
    gap: 30px !important;
}

.wple-single-right .wple-cats-note{
    margin-top: 30px;
}


.wple-single-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  display: block;
  max-width: 65%;
}
/* Interactive gallery with main image and thumbnails */
.wple-interactive-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Main large image container */
.wple-gallery-main {
  width: 100%;
}
.wple-gallery-main-link {
  display: block;
  cursor: pointer;
}
.wple-gallery-main-link:hover .wple-gallery-main-image {
  opacity: 0.95;
  transition: opacity 0.2s;
}
.wple-gallery-main-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  object-fit: cover;
  max-height: 400px;
}

/* Thumbnails row below main image */
.wple-gallery-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wple-gallery-thumb-link {
  display: block;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
  flex: 0 0 auto;
  width: 80px;
  height: 80px;
  border: 2px solid transparent;
  transition: border-color 0.2s, opacity 0.2s;
}
.wple-gallery-thumb-link:hover {
  opacity: 0.8;
}
.wple-gallery-thumb-link.wple-thumb-active {
  border-color: var(--rot, #B30C0C);
}
.wple-gallery-thumb-link .wple-single-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

/* Legacy gallery styles (for non-interactive galleries if any) */
.wple-single-gallery:not(.wple-interactive-gallery) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}
.wple-gallery-link {
  display: block;
  cursor: pointer;
  border-radius: 4px;
  overflow: hidden;
}
.wple-gallery-link:hover .wple-single-thumb {
  opacity: 0.9;
  transition: opacity 0.2s;
}
.wple-single-thumb {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}
/* Simple lightbox overlay */
.wple-lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.wple-lightbox.active {
  display: flex;
}
.wple-lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wple-lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}
.wple-lightbox-close,
.wple-lightbox-prev,
.wple-lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #333;
  font-size: 32px;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 4px;
  transition: background 0.2s;
}
.wple-lightbox-close:hover,
.wple-lightbox-prev:hover,
.wple-lightbox-next:hover {
  background: #fff;
}
.wple-lightbox-close {
  top: 20px;
  right: 20px;
}
.wple-lightbox-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.wple-lightbox-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.wple-single-cats {
  margin-top: 24px;
}

/* Limit category images (Produktkategorien) on single view */
.wple-single .wple-cats-thumb {
  max-width: 75px;
  max-height: 75px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: inline-block;
    flex: 0 0 75px;
}

/* Produktkategorien in der Einzelansicht: Thumb + Text (Name + Beschreibung) nebeneinander */
.wple-single .wple-cats-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.wple-single .wple-cats-item .wple-cats-item-text {
  display: flex;
  flex-direction: column;
}
.wple-single .wple-cats-item .wple-cats-desc {
  font-size: 14px;
  line-height: 1.4;
  margin-top: 2px;
}

/* Awards & Memberships (Auszeichnungen) on single view */
.wple-awards {
  margin: 16px 0 20px;
}
.wple-awards-title {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--blau);
  font-weight: 600;
}
.wple-awards-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  gap: 10px;
}
.wple-awards-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wple-awards-thumb {
  max-width: 75px;
  max-height: 75px;
  width: 75px;
  height: 75px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 75px;
}
.wple-awards-thumb img.wple-awards-img {
  max-width: 75px;
  max-height: 75px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.wple-awards-name {
  line-height: 1.3;
}


/* Map Anpassungen */
.envision-map section {
    margin: 0 auto;
    max-width: 1500px;
}

.envision-map .wple-cats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px 50px;
    margin: 0 auto;
    justify-content: center;
}

.envision-map .wple-cats-item {
    flex-basis: calc(33% - 40px);
    display: flex;
    gap: 15px;
}

.envision-map .wple-cats-item .wple-cats-item-text {
    display: flex;
    flex-direction: column;
    color: var(--blau);
}

.envision-map .wple-cats-item .wple-cats-item-text .wple-cats-desc{
    font-size: 16px;
    font-weight: 400;
}

    /* Falls ein Builder/wpautop <br> zwischen Inline-Elemente einfügt, neutralisieren */
.envision-map .wple-cats-item br {
    display: none !important;
}

/* Verhindere von Editoren/wpautop eingefügte leere <p> zwischen Thumb und Text */
.envision-map .wple-cats-item > p {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.envision-map .wple-filter-title {
    color: var(--rot);
    font-weight: 600;
    font-size: 28px;
}

.envision-map .wple-filter label {
    color: var(--blau);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 15px;
}

.envision-map .wple-filter input, .envision-map .wple-filter select {
    background-color: #D9D9D9;
    margin-bottom: 30px;
}

.envision-map .wple-filter input{
    height: 50px;
    padding: 10px 20px;
}

.envision-map .wple-filter select{
    height: 50px;
    padding: 10px 20px;
}

.wple-map-section {
    display: flex;
    gap: 100px;
    margin-top: 150px !important;
    margin-bottom: 100px !important;
}

.wple-map-section .wple-filter br{
    display: none;
}

.wple-map-section .wple-filter, .wple-map-section .wple-map {
   flex: 1;
}

.wple-map-section .wple-filter .ort-umkreis {
    display: flex;
    gap: 30px;
}

.wple-map-section .wple-filter .ort-umkreis p {
    display: none !important;
}


/* Responsive */
@media (max-width: 900px) {

    .wple-map-section {
    margin-top: 75px !important;
        margin-bottom: 30px !important;
    }

  .wple-single-inner {
    grid-template-columns: 1fr;
  }
    .wple-list .wple-card{
        flex-basis: 100%;
    }

    .wple-wrap.envision-map {
        padding: 0 20px;
    }

    .wple-filter {
        max-width: 100%;
    }

    .ort-umkreis, .wple-map-section {
        flex-direction: column;
    }

    .wple-map-section {
        gap: 20px;
    }

    .wple-map-section .wple-filter .ort-umkreis {
        gap: 0;
    }

    .envision-map .wple-cats-item {
        gap: 20px;
        flex-direction: column;
        flex-basis: 40%;
        text-align: center;
    }

    .envision-map .wple-cats-thumb {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .envision-map .wple-cats-list {
        justify-content: center;
    }

    .wple-card-avatars .wple-avatar{
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .wple-cats-list-box {
        width: 100%;
    }


}

.hidden {
    display: none;
}