/* Merkliste / Favoriten – t276 (consent-neutral, localStorage only) */
:root {
  --ml-orange: #E8730C;
  --ml-orange-soft: color-mix(in srgb, #E8730C 18%, #fff);
}

/* Absolute badge: no layout shift on Mein Hausprojekt button */
.nav-project {
  position: relative !important;
}
.nav-project [data-merkliste-count] {
  position: absolute !important;
  top: -0.4rem;
  right: -0.45rem;
  display: none;
  min-width: 1.15rem;
  height: 1.15rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--ml-orange, var(--color-primary, #e77600));
  color: #111;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 !important;
  padding: 0 0.28rem;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
  z-index: 2;
}
.nav-project [data-merkliste-count]:not([hidden]) {
  display: inline-flex !important;
}

/* Heart toggle */
.ml-heart {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ml-orange, #E8730C);
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
  z-index: 5;
  padding: 0;
  line-height: 1;
}
.ml-heart:hover {
  transform: scale(1.06);
  background: #fff;
}
.ml-heart:focus-visible {
  outline: 2px solid var(--ml-orange, #E8730C);
  outline-offset: 2px;
}
.ml-heart__svg {
  display: block;
}
.ml-heart__path {
  fill: none;
  stroke: var(--ml-orange, #E8730C);
  stroke-width: 1.7;
  stroke-linejoin: round;
  transition: fill 0.15s ease;
}
.ml-heart.is-active .ml-heart__path {
  fill: var(--ml-orange, #E8730C);
  stroke: var(--ml-orange, #E8730C);
}
.ml-heart--pop {
  animation: ml-heart-pop 0.38s ease;
}
@keyframes ml-heart-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.22); }
  100% { transform: scale(1); }
}

.ml-heart--card {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
}
.house-band__card {
  position: relative;
}

.ml-heart-detail {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.ml-heart-detail__label {
  font-size: 0.92rem;
  font-weight: 600;
  color: inherit;
  opacity: 0.9;
}
.ml-heart--detail {
  background: rgba(255, 255, 255, 0.95);
}

/* Dashboard tabs */
.mh-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1.1rem 0 1.25rem;
}
.mh-tab {
  appearance: none;
  border: 1px solid var(--color-border, #d8dad9);
  background: #fff;
  color: var(--color-navy, #002337);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.mh-tab.is-active,
.mh-tab[aria-selected="true"] {
  background: var(--ml-orange-soft, #fae4cc);
  border-color: var(--ml-orange, #E8730C);
  color: var(--color-navy, #002337);
}
.mh-tab:focus-visible {
  outline: 2px solid var(--ml-orange, #E8730C);
  outline-offset: 2px;
}
.mh-panel[hidden] { display: none !important; }

.mh-fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1rem;
}
.mh-fav-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border, #d8dad9);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 35, 55, 0.05);
  position: relative;
}
.mh-fav-card__media {
  aspect-ratio: 4 / 3;
  background: var(--color-sand, #f3efe8);
  overflow: hidden;
}
.mh-fav-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mh-fav-card__body {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.mh-fav-card__name {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-navy, #002337);
}
.mh-fav-card__price {
  margin: 0;
  font-weight: 700;
  color: var(--ml-orange, #E8730C);
}
.mh-fav-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.mh-fav-card__remove {
  appearance: none;
  border: 1px solid var(--color-border, #d8dad9);
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-navy, #002337);
}
.mh-fav-card__remove:hover {
  border-color: var(--ml-orange, #E8730C);
}

.mh-tools {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.mh-tool {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--color-border, #d8dad9);
  background: #fff;
  text-decoration: none;
  color: inherit;
  min-height: 7.5rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mh-tool:hover {
  border-color: var(--ml-orange, #E8730C);
  box-shadow: 0 8px 22px rgba(232, 115, 12, 0.12);
}
.mh-tool__title {
  margin: 0;
  font-size: 1.02rem;
  color: var(--color-navy, #002337);
}
.mh-tool__sum {
  margin: 0;
  font-weight: 700;
  color: var(--ml-orange, #E8730C);
  font-size: 0.95rem;
}
.mh-tool__hint {
  margin: 0;
  font-size: 0.86rem;
  color: var(--color-text-light, #5a6570);
  flex: 1;
}
.mh-tool__cta {
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--color-navy, #002337);
}

.mh-note {
  margin: 1rem 0 0;
  font-size: 0.86rem;
  color: var(--color-text-light, #5a6570);
}

@media (max-width: 480px) {
  .ml-heart-detail__label { display: none; }
  .mh-tabs { gap: 0.35rem; }
  .mh-tab { padding: 0.4rem 0.75rem; font-size: 0.86rem; }
}


/* t481: filled pulsing heart, a tick smaller than t477 */
.site-header,
.site-header__inner,
.header-actions,
.header-project,
.nav-project {
  overflow: visible !important;
}
.header-project,
.nav-project {
  position: relative !important;
}
.fmh-hausakte-pulse {
  display: none;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
  position: absolute;
  top: -1.05rem;
  right: -0.9rem;
  width: 2.85rem;
  height: 2.85rem;
  max-width: 2.85rem;
  max-height: 2.85rem;
  align-items: center;
  justify-content: center;
  color: #e04520;
  pointer-events: none;
  z-index: 8;
  filter: drop-shadow(0 0 0 3px #fff) drop-shadow(0 2px 6px rgba(0, 35, 55, 0.28));
  transform-origin: center center;
}
.fmh-hausakte-pulse svg {
  display: block;
  width: 100%;
  height: 100%;
}
html.fmh-has-fav .fmh-hausakte-pulse,
.fmh-hausakte--has-fav .fmh-hausakte-pulse {
  display: flex;
  animation: fmh-hausakte-pulse 1.4s ease-in-out infinite;
}
.fmh-hausakte--has-fav .header-project__icon,
.fmh-hausakte--has-fav .nav-project__icon {
  color: #e04520;
  font-size: 1.22rem;
}
.nav-project.fmh-hausakte--has-fav [data-merkliste-count] {
  display: none !important;
}
@keyframes fmh-hausakte-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.18); opacity: 0.9; }
}
@media (prefers-reduced-motion: reduce) {
  .fmh-hausakte--has-fav .fmh-hausakte-pulse {
    animation: none;
  }
}
