/* NOTE: Merkliste */
/* Topbar Styles */
.charminglaces-topbar {
    padding: 0 20px;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.topbar-content {
    max-width: 1200px;
    /* Passe an deine Seitenbreite an */
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
    /* Rechts ausgerichtet */
    gap: 20px;
    align-items: center;
}

.topbar-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: opacity 0.3s ease;
}

.topbar-link:hover {
    opacity: 0.8;
    text-decoration: none;
}

.topbar-link .dashicons {
    font-size: 20px;
    line-height: 1;
}

.page-id-51430 .et_pb_section_0 {
    background-color: var(--cp-color-body) !important;
    max-width: 1248px !important;
    padding: 0;
}

.cp-favorites h1 {
    padding: 0 24px;
    margin: 0;
}

.merkliste-link {
    position: relative;
}

.merkliste-link .merkliste-count {
    padding: 9px;
    font-size: 12px;
    position: absolute;
    top: -5px;
    left: 8px;
    z-index: 1;
    display: inline-block;
}

.merkliste-count .kreis {
    background-color: #fff;
    position: absolute;
}

/*  Doppelt 
#topbar-merkliste-count::after {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  background-color: #fff;
  border-radius: 50%;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: -1;
}
*/
.cp-favorites-link__badge.is-empty {
    display: none;
}

å .merkliste-header-wrapper {
    display: inline-block;
    padding: 10px;
    /* Erhöht die anklickbare Fläche */
    background: transparent;
    /* Optional, um Sichtbarkeit zu vermeiden */
}

.merkliste-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    min-height: 48px;
    /* Mindestgröße für Touch */
    min-width: 48px;
    /* Mindestgröße für Touch */
    margin-bottom: 40px;
}

/* Sicherstellen, dass keine benachbarten Elemente das Touch-Event abfangen */
.merkliste-header * {
    pointer-events: none;
    /* Nur der Container selbst ist anklickbar */
}

.merkliste-header:hover {
    opacity: 0.8;
}

.merkliste-heart-icon.dashicons-heart {
    font-size: 24px;
    line-height: 1;
}

.merkliste-header.favorited .merkliste-heart-icon.dashicons-heart {
    color: var(--cppink);
    /* Rot für gemerkt */
}

.merkliste-header.not-favorited .merkliste-heart-icon.dashicons-heart {
    color: #ccc;
    /* Grau für nicht gemerkt */
}

.merkliste-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stil für das Bildoverlay im Archiv */
/* Sicherstellen, dass das Overlay interaktiv ist */
.merkliste-heart-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0;
    cursor: pointer;
    pointer-events: auto !important;
    /* Erzwingt Interaktivität */
    z-index: 10;
    /* Über anderen Elementen */
    transition: opacity 0.3s ease;
}

.merkliste-heart-wrapper:hover {
    opacity: 0.8;
}

.merkliste-heart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
}

.merkliste-heart:hover {
    transform: scale(1.2);
}

.merkliste-heart.favorited .heart-icon.dashicons-heart {
    color: var(--cppink);
}

.merkliste-heart.not-favorited .heart-icon.dashicons-heart {
    color: #ccc;
}

.merkliste-container {
    margin: 20px 0;
}

.merkliste-items li {
    margin-bottom: 20px;
}

.merkliste-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.merkliste-image {
    flex: 0 0 280px;
}

.merkliste-image img {
    width: 280px;
    height: auto;
    object-fit: cover;
}

.merkliste-content {
    flex: 1;
}

.merkliste-content a {
    text-decoration: none;
}

.merkliste-content>.meta-cat {
    padding-top: 0 !important;
}

.merkliste-excerpt {
    margin: 5px 0 10px;
}

.remove-from-merkliste {
    background: var(--cppink);
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
}

.merkliste-menu-item {
    position: relative;
}

.merkliste-icon {
    font-size: 16px;
    margin-right: 5px;
}

.merkliste-heart-wrapper,
.merkliste-header {
    touch-action: manipulation;
    /* Verbessert Touch-Interaktion und reduziert Verzögerung */
}

/* Merkliste-Seite Layout wie Archiv */
#merkliste-items {
    list-style: none !important;
    padding: 0;
    display: grid;
    gap: 20px;
}

/* Desktop: 3 Spalten */
@media (min-width: 768px) {
    #merkliste-items {
        grid-template-columns: repeat(3, 1fr);
        /* Immer 3 Spalten */
    }

    #merkliste-items .grid-col {
        max-width: 100%;
        /* Verhindert Schrumpfen */
    }

    /* Optional: Leere Grid-Items verhindern */
    #merkliste-items:empty::after {
        content: none;
    }
}

/* Mobile: 1 Spalte */
@media (max-width: 767px) {
    #merkliste-items {
        grid-template-columns: 1fr;
    }
}

/* Sicherstellen, dass die äußeren Container korrekt gestylt sind */
#merkliste-items .grid-col {
    width: 100%;
    box-sizing: border-box;
}

#merkliste-items .grid-item-cont {
    width: 100%;
}

/* Merkliste in der Hauptnavigation */
.cp-favorites-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;

    color: var(--cppink);
    text-decoration: none;

    transition: transform 0.2s ease;
}

.cp-favorites-link:hover {
    transform: scale(1.08);
    text-decoration: none;
}

.cp-favorites-link__icon {
    font-size: 28px;
    line-height: 1;
}

.cp-favorites-link__badge {
    position: absolute;
    top: 6px;
    right: 2px;

    min-width: 20px;
    height: 20px;
    padding: 0 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    background: #ffffff;
    color: var(--cppink);

    font-size: 12px;
    font-weight: 700;

    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

@media (max-width: 767px) {

    .cp-favorites-link {
        width: 40px;
        height: 40px;
    }

    .cp-favorites-link__icon {
        font-size: 24px;
    }

    .cp-favorites-link__badge {
        top: 5px;
        right: 0;

        min-width: 18px;
        height: 18px;

        font-size: 11px;
    }
}

.cp-favorites-link__icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.cp-favorites-link__icon svg path {
    fill: var(--cppink);
}

.cp-favorites-link:hover .cp-favorites-link__icon svg path {
    fill: #101020;
}

/* SVG Icon */
.cp-card__heart svg {
    width: 24px;
    height: 24px;
    display: block;
}

.cp-card__heart svg path {
    fill: transparent;
    stroke: currentColor;
    stroke-width: 2;
    transition: all .2s ease;
}

.cp-card__heart.is-favorited svg path {
    fill: var(--cppink);
    stroke: var(--cppink);
}

/* Button Beitrag / Artikel */
.cp-article-heart {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
    ;
}

.cp-article-heart__text {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 11px;
    color:var(--cp-color-text, #171511);
}