/*
Theme Name: Candy Refined (Naschsalon)
Theme URI: https://dernaschsalon.de
Description: Verfeinertes Child-Theme fuer den Naschsalon auf Basis des Candy-Themes.
Author: Der Naschsalon
Author URI: https://dernaschsalon.de
Template: candy
Version: 1.7.46
Text Domain: candy-refined
*/

:root {
  --ns-surface: rgba(255, 250, 234, 0.8);
  --ns-surface-strong: rgba(255, 247, 221, 0.94);
  --ns-surface-head: rgba(255, 249, 232, 0.96);
  --ns-outline: rgba(4, 39, 23, 0.2);
  --ns-shadow: 0 12px 28px rgba(3, 25, 14, 0.16);
  --ns-shadow-soft: 0 8px 18px rgba(3, 25, 14, 0.12);
  --ns-card-radius: 1.45rem;
  --ns-candy-rain-color: var(--green-500, #0b3a2a);
  --ns-candy-rain-opacity: 0.92;
  --ns-page-backdrop: #f4d88d;
  --ns-footer-backdrop:
    radial-gradient(circle at 20% -120%, rgba(208, 170, 222, 0.18), transparent 38%),
    linear-gradient(to bottom, rgba(4, 39, 23, 0.98), rgba(3, 22, 13, 0.98));
  --ns-box-pattern-url: url("assets/ns-box-pattern.png");
  --ns-box-pattern-opacity: 0.08;
  --ns-box-pattern-size: 520px;
  --ns-prose-max: 74ch;
  --ns-prose-size: clamp(1.03rem, 0.96rem + 0.35vw, 1.18rem);
  --ns-prose-leading: 1.78;
  --ns-h1-size: clamp(2.35rem, 1.72rem + 2.25vw, 3.35rem);
  --ns-h2-size: clamp(1.75rem, 1.34rem + 1.35vw, 2.45rem);
  --ns-h3-size: clamp(1.35rem, 1.18rem + 0.7vw, 1.7rem);
  --ns-h4-size: clamp(1.15rem, 1.06rem + 0.4vw, 1.3rem);
}

html {
  background: var(--ns-footer-backdrop);
}

body.wp-theme-candy {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  background: var(--ns-footer-backdrop);
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body.wp-theme-candy #wrapper {
  background: var(--ns-page-backdrop);
  min-height: 100dvh;
  width: 100%;
}

/* Copy/select protection (allow form fields) */
body.wp-theme-candy,
body.wp-theme-candy * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

body.wp-theme-candy input,
body.wp-theme-candy textarea,
body.wp-theme-candy [contenteditable] {
  -webkit-touch-callout: default;
  -webkit-user-select: text;
  user-select: text;
}

body.wp-theme-candy #container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

/* Candy rain (decorative background) */
body.wp-theme-candy .ns-candy-rain {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  contain: layout paint style;
  transform: translateZ(0);
}

body.wp-theme-candy .ns-candy-rain__candy {
  position: absolute;
  display: block;
  top: -20vh;
  left: var(--x, 50vw);
  width: var(--w, 10px);
  height: var(--h, 10px);
  color: var(--ns-candy-rain-color);
  opacity: var(--ns-candy-rain-opacity);
  transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  animation: ns-candy-fall var(--dur, 12s) linear var(--delay, 0s) infinite;
  will-change: transform;
  backface-visibility: hidden;
}

body.wp-theme-candy .ns-candy-rain--paused .ns-candy-rain__candy {
  animation-play-state: paused;
}

body.wp-theme-candy .ns-candy-rain--static .ns-candy-rain__candy {
  top: var(--y, 30vh);
  transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg));
  animation: none;
  opacity: calc(var(--ns-candy-rain-opacity) * 0.42);
}

body.wp-theme-candy .ns-candy-rain__candy svg {
  width: 100%;
  height: 100%;
  display: block;
}

@keyframes ns-candy-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(var(--rot, 0deg));
  }
  100% {
    transform: translate3d(var(--drift, 0px), 115vh, 0) rotate(var(--rot, 0deg));
  }
}

/* Reduce decorative animation on legal pages for readability. */
body.wp-theme-candy.page-impressum,
body.wp-theme-candy.page-datenschutzerklaerung,
body.wp-theme-candy.page-allgemeine-geschaeftsbedingungen,
body.wp-theme-candy.page-agb,
body.wp-theme-candy.privacy-policy {
  --ns-candy-rain-count: 0;
}

/* Header refinement */
body.wp-theme-candy .header {
  background: linear-gradient(to bottom, rgba(4, 39, 23, 0.2), rgba(4, 39, 23, 0));
}

body.wp-theme-candy .header.scrolled,
body.wp-theme-candy:not(.home) .header {
  background: rgb(244, 216, 141);
  border-bottom: 1px solid rgba(4, 39, 23, 0.14);
}

body.wp-theme-candy .header__main-menu ul li a,
body.wp-theme-candy .header__social-menu ul li a {
  position: relative;
}

body.wp-theme-candy .header__main-menu ul li a::after,
body.wp-theme-candy .header__social-menu ul li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
  background: currentColor;
}

body.wp-theme-candy .header__main-menu ul li a:hover::after,
body.wp-theme-candy .header__main-menu ul li a:focus-visible::after,
body.wp-theme-candy .header__social-menu ul li a:hover::after,
body.wp-theme-candy .header__social-menu ul li a:focus-visible::after {
  transform: scaleX(1);
}

body.wp-theme-candy .header__main-menu ul li.current-menu-item > a::after,
body.wp-theme-candy .header__main-menu ul li.current_page_item > a::after,
body.wp-theme-candy .header__main-menu ul li a[aria-current="page"]::after {
  transform: scaleX(1);
  opacity: 0.75;
}

body.wp-theme-candy .header__main-menu ul li.current-menu-item > a,
body.wp-theme-candy .header__main-menu ul li.current_page_item > a,
body.wp-theme-candy .header__main-menu ul li a[aria-current="page"] {
  font-weight: 700;
}

/* Page card framing */
body.wp-theme-candy:not(.home) .page__content {
  --ns-page-pad: clamp(1.1rem, 2.4vw, 2.3rem);
  margin-top: clamp(7rem, 14vh, 9rem);
  margin-bottom: 5rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  border: 1px solid var(--ns-outline);
  border-radius: var(--ns-card-radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.5), transparent 58%),
    linear-gradient(to bottom, var(--ns-surface-head), var(--ns-surface-strong));
  box-shadow: var(--ns-shadow);
  padding: calc(var(--ns-page-pad) + 0.35rem) var(--ns-page-pad) calc(var(--ns-page-pad) + 0.2rem);
  overflow: hidden;
}

/* Pattern overlay for light content boxes (pattern only at 70% opacity; text stays solid). */
body.wp-theme-candy:not(.home) .page__content::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--ns-box-pattern-url);
  background-repeat: repeat;
  background-size: var(--ns-box-pattern-size);
  background-position: 0 0;
  opacity: var(--ns-box-pattern-opacity);
  pointer-events: none;
  z-index: 0;
}

body.wp-theme-candy:not(.home) .page__content > * {
  position: relative;
  z-index: 1;
}

body.wp-theme-candy:not(.home) .page__title {
  margin: 0 0 clamp(0.95rem, 2.1vw, 1.4rem);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: var(--ns-h1-size);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

body.wp-theme-candy:not(.home) .page__content > :not(.page__title) {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
}

body.wp-theme-candy:not(.home) .page__title + * {
  margin-top: 0.45rem;
}

body.wp-theme-candy .page__content > .wp-block-columns,
body.wp-theme-candy .page__content > .wp-block-media-text,
body.wp-theme-candy .page__content > .wp-block-quote,
body.wp-theme-candy .page__content > .wp-block-group {
  margin-top: 1.4rem;
  margin-bottom: 1.4rem;
}

/* Prose: better reading width + consistent rhythm */
body.wp-theme-candy .page__content p,
body.wp-theme-candy .page__content li,
body.wp-theme-candy.home .home__content p,
body.wp-theme-candy.home .home__content li {
  font-size: var(--ns-prose-size);
  line-height: var(--ns-prose-leading);
}

body.wp-theme-candy .page__content h2.wp-block-heading,
body.wp-theme-candy.home .home__content h2.wp-block-heading {
  font-size: var(--ns-h2-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

body.wp-theme-candy .page__content h3.wp-block-heading,
body.wp-theme-candy.home .home__content h3.wp-block-heading {
  font-size: var(--ns-h3-size);
  line-height: 1.16;
}

body.wp-theme-candy .page__content h4.wp-block-heading,
body.wp-theme-candy.home .home__content h4.wp-block-heading {
  font-size: var(--ns-h4-size);
  line-height: 1.22;
}

body.wp-theme-candy:not(.home) .page__content > :where(p, ul, ol, blockquote, .wp-block-list, h2.wp-block-heading, h3.wp-block-heading, h4.wp-block-heading),
body.wp-theme-candy:not(.home) .page__content > .wp-block-group > :where(p, ul, ol, blockquote, .wp-block-list, h2.wp-block-heading, h3.wp-block-heading, h4.wp-block-heading) {
  max-width: var(--ns-prose-max);
}

/* Home page polish */
body.wp-theme-candy.home .home__content .wp-block-cover.ns-hero-cover,
body.wp-theme-candy.home .home__content > .wp-block-cover {
  /* Keep the hero cover flush on top so the background doesn't peek through. */
  border-radius: 0 0 2rem 2rem;
  overflow: hidden;
  box-shadow: 0 14px 26px rgba(2, 17, 10, 0.22);
}

@media (min-width: 741px) {
  body.wp-theme-candy.home .home__content .wp-block-cover.ns-hero-cover,
  body.wp-theme-candy.home .home__content > .wp-block-cover {
    position: relative;
  }
}

body.wp-theme-candy.home .home__content > .wp-block-media-text,
body.wp-theme-candy.home .home__content > .wp-block-columns,
body.wp-theme-candy.home .home__content > h2.wp-block-heading {
  border: 1px solid var(--ns-outline);
  border-radius: var(--ns-card-radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.42), transparent 58%),
    var(--ns-surface);
  box-shadow: var(--ns-shadow);
  padding: clamp(1rem, 2.2vw, 1.9rem);
}

body.wp-theme-candy.home .home__content > .wp-block-media-text,
body.wp-theme-candy.home .home__content > .wp-block-columns {
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
}

/* Truly unified home cards (wrapped via assets/unified-cards.js) */
body.wp-theme-candy.home .home__content > .ns-home-unified-card {
  border: 1px solid var(--ns-outline);
  border-radius: var(--ns-card-radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.42), transparent 58%),
    var(--ns-surface);
  box-shadow: var(--ns-shadow);
  margin-top: 1.8rem;
  margin-bottom: 1.8rem;
  position: relative;
  overflow: hidden;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--ns-box-pattern-url);
  background-repeat: repeat;
  background-size: var(--ns-box-pattern-size);
  background-position: 0 0;
  opacity: var(--ns-box-pattern-opacity);
  pointer-events: none;
  z-index: 0;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card > * {
  position: relative;
  z-index: 1;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-columns,
body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-media-text,
body.wp-theme-candy.home .home__content > .ns-home-unified-card > h2.wp-block-heading {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
  width: 100%;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card > h2.wp-block-heading {
  display: block;
  padding: clamp(1rem, 1.9vw, 1.45rem) clamp(1rem, 2.3vw, 1.9rem) clamp(0.35rem, 1vw, 0.55rem);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-columns,
body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-media-text {
  padding: clamp(1rem, 2.2vw, 1.9rem);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-media-text {
  padding-top: clamp(0.55rem, 1.5vw, 0.9rem);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-spacer,
body.wp-theme-candy.home .home__content > .ns-home-unified-card > .ns-unified-hidden-spacer {
  display: none !important;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--intro > .wp-block-columns .wp-block-column {
  flex-basis: 100% !important;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--intro > .wp-block-columns .wp-block-spacer {
  display: none !important;
}

/* Start page: first text block + gallery unified box */
body.wp-theme-candy.home .home__content > .ns-home-unified-card--text-gallery {
  padding: clamp(1rem, 2.2vw, 1.9rem);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--text,
body.wp-theme-candy.home .home__content > .ns-home-unified-card--gallery {
  padding: clamp(1rem, 2.2vw, 1.9rem);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--gallery > .ns-gallery,
body.wp-theme-candy.home .home__content > .ns-home-unified-card--gallery .ns-gallery {
  margin: 0;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--text-gallery > :where(p, ul, ol, blockquote, .wp-block-list, .wp-block-quote, .wp-block-group) {
  max-width: var(--ns-prose-max);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--text > :where(p, ul, ol, blockquote, .wp-block-list, .wp-block-quote, .wp-block-group, h2.wp-block-heading, h3.wp-block-heading, h4.wp-block-heading) {
  max-width: var(--ns-prose-max);
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--text-gallery > .ns-gallery {
  margin: clamp(1rem, 2vw, 1.35rem) 0 0;
}

/* Sweet of day sticker (home only) */
body.wp-theme-candy.home .ns-sweet-of-day {
  /* Hidden until JS places it into the hero/below-hero position (prevents footer flash). */
  opacity: 0;
  pointer-events: none;
  position: relative;
  z-index: 15;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.85rem;
  max-width: min(380px, calc(100vw - 2rem));
  padding: 0.95rem 1.05rem;
  border: 1px solid var(--ns-outline);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.42), transparent 58%),
    var(--ns-surface-strong);
  box-shadow: var(--ns-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: opacity 160ms ease, transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--placed {
  opacity: 1;
  pointer-events: auto;
}

body.wp-theme-candy.home .ns-sweet-of-day::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--ns-box-pattern-url);
  background-repeat: repeat;
  background-size: var(--ns-box-pattern-size);
  background-position: 0 0;
  opacity: calc(var(--ns-box-pattern-opacity) * 1.25);
  pointer-events: none;
  z-index: 0;
}

body.wp-theme-candy.home .ns-sweet-of-day > * {
  position: relative;
  z-index: 1;
}

body.wp-theme-candy.home .ns-sweet-of-day:hover,
body.wp-theme-candy.home .ns-sweet-of-day:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(3, 25, 14, 0.22);
  border-color: rgba(4, 39, 23, 0.3);
  outline: none;
}

/* Desktop placement: inside the hero cover (set via assets/unified-cards.js). */
body.wp-theme-candy.home .home__content .wp-block-cover .ns-sweet-of-day:not(.ns-sweet-of-day--below-hero) {
  position: absolute;
  bottom: calc(clamp(1.1rem, 3.2vw, 2rem) + env(safe-area-inset-bottom, 0px));
  right: calc(clamp(1.1rem, 3.2vw, 2.4rem) + env(safe-area-inset-right, 0px));
  max-width: min(420px, calc(100% - 2.2rem));
}

body.wp-theme-candy.home .ns-sweet-of-day__thumb {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(4, 39, 23, 0.18);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 10px 18px rgba(3, 25, 14, 0.12);
  flex: none;
}

body.wp-theme-candy.home .ns-sweet-of-day__thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

body.wp-theme-candy.home .ns-sweet-of-day__body {
  display: grid;
  gap: 0.16rem;
}

body.wp-theme-candy.home .ns-sweet-of-day__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

body.wp-theme-candy.home .ns-sweet-of-day__kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 58, 42, 0.18);
  background: rgba(11, 58, 42, 0.08);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 900;
  color: rgba(11, 58, 42, 0.9);
}

body.wp-theme-candy.home .ns-sweet-of-day__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(11, 58, 42, 0.18);
  background: rgba(255, 250, 234, 0.72);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  font-weight: 900;
  color: rgba(11, 58, 42, 0.88);
}

body.wp-theme-candy.home .ns-sweet-of-day__title {
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 800;
  color: rgba(6, 33, 22, 0.95);
}

body.wp-theme-candy.home .ns-sweet-of-day__hint {
  font-size: 0.88rem;
  font-weight: 750;
  color: rgba(11, 58, 42, 0.88);
  opacity: 0.92;
}

@media (max-width: 740px) {
  body.wp-theme-candy.home .home__content .wp-block-cover.ns-hero-cover,
  body.wp-theme-candy.home .home__content > .wp-block-cover {
    border-radius: 0 0 1.45rem 1.45rem;
    box-shadow: none;
  }

  body.wp-theme-candy.home .ns-sweet-of-day {
    padding: 0.85rem 0.95rem;
    max-width: min(360px, calc(100vw - 1.7rem));
  }

  /* Mobile placement: smaller, less prominent badge below the hero (moved via JS). */
  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero {
    position: relative;
    inset: auto;
    /* Pull it visibly into the hero edge on mobile so it does not read as a separate random block. */
    margin: -1.65rem auto 0.85rem;
    top: 0;
    max-width: min(320px, calc(100vw - 2rem));
    padding: 0.62rem 0.8rem;
    border-radius: 1.1rem;
    box-shadow: var(--ns-shadow-soft);
    transform: none;
  }

  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero::before {
    opacity: calc(var(--ns-box-pattern-opacity) * 0.95);
  }

  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero:hover,
  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero:focus-visible {
    transform: none;
  }

  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero .ns-sweet-of-day__thumb {
    width: 42px;
    height: 42px;
    box-shadow: 0 8px 14px rgba(3, 25, 14, 0.11);
  }

  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero .ns-sweet-of-day__kicker {
    font-size: 0.62rem;
    padding: 0.18rem 0.45rem;
  }

  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero .ns-sweet-of-day__title {
    font-size: 0.96rem;
  }

  body.wp-theme-candy.home .ns-sweet-of-day.ns-sweet-of-day--below-hero .ns-sweet-of-day__hint {
    display: none;
  }

  body.wp-theme-candy.home .home__content .wp-block-cover .ns-sweet-of-day:not(.ns-sweet-of-day--below-hero) {
    left: calc(1rem + env(safe-area-inset-left, 0px));
    right: calc(1rem + env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    max-width: none;
  }

  body.wp-theme-candy.home .ns-sweet-of-day__thumb {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 740px) {
  body.wp-theme-candy.home {
    --ns-candy-rain-count: 2;
  }

  body.wp-theme-candy.home .ns-candy-rain__candy {
    opacity: calc(var(--ns-candy-rain-opacity) * 0.72);
  }
}

@supports (content-visibility: auto) {
  body.wp-theme-candy.home .home__content > :not(.wp-block-cover):not(.ns-sweet-of-day) {
    content-visibility: auto;
    contain-intrinsic-size: 1px 960px;
  }
}

/* Unified media frames: rounded container + clipped image (prevents background corners). */
body.wp-theme-candy .page__content .wp-block-media-text__media,
body.wp-theme-candy.home .home__content .wp-block-media-text__media,
body.wp-theme-candy .page__content figure.wp-block-image,
body.wp-theme-candy.home .home__content figure.wp-block-image {
  border-radius: 1.05rem;
  overflow: hidden;
  border: 1px solid rgba(4, 39, 23, 0.18);
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 10px 22px rgba(3, 25, 14, 0.12);
}

body.wp-theme-candy .page__content .wp-block-media-text__media img,
body.wp-theme-candy.home .home__content .wp-block-media-text__media img,
body.wp-theme-candy .page__content figure.wp-block-image img,
body.wp-theme-candy.home .home__content figure.wp-block-image img {
  border-radius: 0 !important;
  display: block;
}

/* Contact page readability */
body.wp-theme-candy.ns-page-kontakt .page__content > .wp-block-columns {
  gap: clamp(1.2rem, 3vw, 2.6rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

body.wp-theme-candy.ns-page-kontakt .page__content > .wp-block-spacer {
  /* Remove the huge editor spacer between the first contact block and hours. */
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
}

body.wp-theme-candy.ns-page-kontakt .page__content > .wp-block-separator {
  opacity: 0.35;
}

body.wp-theme-candy.ns-page-kontakt .page__content > .wp-block-columns,
body.wp-theme-candy.ns-page-kontakt .page__content > .wp-block-quote {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
}

body.wp-theme-candy.ns-page-kontakt .page__content > .wp-block-quote {
  margin-top: clamp(1.8rem, 3.5vw, 3rem);
}

body.wp-theme-candy.ns-page-kontakt .page__content .wp-block-quote {
  width: min(720px, 100%);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  position: relative;
  border: 1px solid rgba(4, 39, 23, 0.16);
  border-radius: 1.2rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.38), transparent 60%),
    var(--ns-surface-head);
  box-shadow: var(--ns-shadow-soft);
  padding: clamp(1rem, 2.2vw, 1.5rem);
  overflow: hidden;
}

body.wp-theme-candy.ns-page-kontakt .page__content .wp-block-quote p {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  margin-left: auto;
  margin-right: auto;
}

body.wp-theme-candy.ns-page-kontakt .page__content .wp-block-quote strong {
  letter-spacing: 0.03em;
}

body.wp-theme-candy.ns-page-kontakt .page__content .wp-block-quote :where(ul, ol, .wp-block-list) {
  display: inline-block;
  text-align: left;
  margin: 0.75rem auto 0;
  padding-left: 1.35rem;
}

/* Sortiment page: make the menu look like a curated "Konfiserie-Karte" instead of a generic list. */
body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu {
  display: grid;
  gap: clamp(0.9rem, 1.6vw, 1.2rem);
  max-width: 60ch;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-start;
  margin: 0 0 clamp(0.9rem, 1.6vw, 1.2rem);
}

@media (max-width: 760px) {
  body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tabs {
    justify-content: center;
  }
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tab {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(4, 39, 23, 0.18);
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, 0.45), transparent 56%),
    rgba(255, 250, 234, 0.55);
  color: rgba(4, 39, 23, 0.92);
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(3, 25, 14, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tab:hover,
body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tab:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(3, 25, 14, 0.14);
  border-color: rgba(4, 39, 23, 0.26);
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tab[aria-selected="true"] {
  background:
    radial-gradient(circle at 24% 25%, rgba(255, 255, 255, 0.28), transparent 60%),
    linear-gradient(150deg, rgba(4, 39, 23, 0.92), rgba(3, 22, 13, 0.92));
  color: rgba(255, 250, 234, 0.96);
  border-color: rgba(4, 39, 23, 0.35);
  transform: none;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__category__headline {
  display: none;
}

@media (min-width: 980px) {
  body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem 0.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .ns-sortiment-tab {
    transition: none !important;
  }
}

/* Keep the category "card" height stable across tabs (cap = first category). */
body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__category[hidden] {
  display: none !important;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__category:not([hidden]) {
  height: var(--ns-sortiment-card-h, auto);
  display: flex;
  flex-direction: column;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__products {
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 0.25rem;
  scrollbar-width: thin;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__products::-webkit-scrollbar {
  width: 10px;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__products::-webkit-scrollbar-thumb {
  background: rgba(4, 39, 23, 0.25);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu.ns-sortiment-has-tabs .wp-block-menu__products::-webkit-scrollbar-track {
  background: transparent;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__category {
  position: relative;
  border-radius: 1.35rem;
  border: 1px solid rgba(4, 39, 23, 0.16);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.44), transparent 62%),
    radial-gradient(circle at 92% 78%, rgba(54, 82, 69, 0.1), transparent 58%),
    var(--ns-surface-head);
  box-shadow: var(--ns-shadow-soft);
  padding: clamp(0.95rem, 1.7vw, 1.25rem);
  overflow: hidden;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__category::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 70%, rgba(244, 216, 141, 0.22), transparent 42%),
    radial-gradient(circle at 84% 16%, rgba(208, 170, 222, 0.16), transparent 46%);
  pointer-events: none;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__category > * {
  position: relative;
  z-index: 1;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__category__headline {
  margin: 0 0 0.75rem;
  padding: 0;
  font-size: var(--ns-h3-size);
  line-height: 1.1;
  letter-spacing: -0.01em;
  position: relative;
  display: inline-block;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__category__headline::before {
  content: "";
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  margin-right: 0.55rem;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(4, 39, 23, 0.18), rgba(4, 39, 23, 0.34)),
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.55), transparent 55%);
  box-shadow: 0 6px 12px rgba(3, 25, 14, 0.16);
  vertical-align: middle;
  transform: translateY(-1px);
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__category__headline::after {
  content: "";
  display: block;
  width: 72%;
  max-width: 260px;
  min-width: 120px;
  height: 2px;
  margin-top: 0.28rem;
  background: linear-gradient(90deg, var(--green-500), transparent);
  opacity: 0.9;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(4, 39, 23, 0.14);
  background: rgba(255, 250, 234, 0.35);
  padding: 0.78rem 0.85rem 0.82rem 1.25rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product::before {
  content: "";
  position: absolute;
  left: 0.62rem;
  top: 1.05rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(4, 39, 23, 0.2), rgba(4, 39, 23, 0.42));
  opacity: 0.9;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product:hover,
body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product:focus-within {
  transform: translateY(-1px);
  border-color: rgba(4, 39, 23, 0.22);
  box-shadow: 0 14px 26px rgba(3, 25, 14, 0.14);
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product p {
  margin: 0;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(4, 39, 23, 0.92);
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product p br {
  display: none;
}

body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product p em {
  display: block;
  margin-top: 0.18rem;
  font-style: normal;
  font-weight: 500;
  color: rgba(4, 39, 23, 0.74);
}

@media (max-width: 980px) {
  body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.wp-theme-candy.ns-page-suesswaren-sortiment .page__content .wp-block-menu__product {
    transition: none !important;
  }
}

/* Legal page readability */
body.wp-theme-candy.page-id-23 .page__content p,
body.wp-theme-candy.page-id-3 .page__content p,
body.wp-theme-candy.page-id-26 .page__content p,
body.wp-theme-candy.privacy-policy .page__content p,
body.wp-theme-candy.page-id-23 .page__content li,
body.wp-theme-candy.page-id-3 .page__content li,
body.wp-theme-candy.page-id-26 .page__content li,
body.wp-theme-candy.privacy-policy .page__content li {
  line-height: 1.72;
}

body.wp-theme-candy.page-id-23 .page__content ul,
body.wp-theme-candy.page-id-3 .page__content ul,
body.wp-theme-candy.page-id-26 .page__content ul,
body.wp-theme-candy.privacy-policy .page__content ul {
  margin-left: 0;
  padding-left: 1.35rem;
}

/* Ensure bullet/number markers are visible (some parent styles remove them). */
body.wp-theme-candy .page__content ul.wp-block-list {
  list-style: disc;
  list-style-position: outside;
  margin-left: 0;
  padding-left: 1.35rem;
}

body.wp-theme-candy .page__content ol.wp-block-list {
  list-style: decimal;
  list-style-position: outside;
  margin-left: 0;
  padding-left: 1.35rem;
}

body.wp-theme-candy .page__content ul.wp-block-list > li {
  list-style: disc;
}

body.wp-theme-candy .page__content ol.wp-block-list > li {
  list-style: decimal;
}

body.wp-theme-candy .page__content ul.wp-block-list li::marker,
body.wp-theme-candy .page__content ol.wp-block-list li::marker {
  color: var(--green-500);
  font-weight: 700;
}

/* Selected headline accents only */
body.wp-theme-candy.home .home__content > .ns-home-unified-card--intro .wp-block-heading,
body.wp-theme-candy.home .home__content > .ns-home-unified-card--section > h2.wp-block-heading,
body.wp-theme-candy:not(.home) .page__title {
  position: relative;
  display: inline-block;
}

body.wp-theme-candy.home .home__content > .ns-home-unified-card--intro .wp-block-heading::after,
body.wp-theme-candy.home .home__content > .ns-home-unified-card--section > h2.wp-block-heading::after,
body.wp-theme-candy:not(.home) .page__title::after {
  content: "";
  display: block;
  width: 68%;
  max-width: 320px;
  min-width: 130px;
  height: 2px;
  margin-top: 0.28rem;
  background: linear-gradient(90deg, var(--green-500), transparent);
}

/* Button refinement */
body.wp-theme-candy .wp-block-buttons .wp-block-button__link,
body.wp-theme-candy .wp-element-button,
body.wp-theme-candy button[type="submit"],
body.wp-theme-candy input[type="submit"],
body.wp-theme-candy .gform_button {
  border-radius: 999px;
  letter-spacing: 0.05em;
  font-weight: 700;
  box-shadow: 0 6px 0 var(--green-300);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.wp-theme-candy .wp-block-buttons .wp-block-button__link:hover,
body.wp-theme-candy .wp-block-buttons .wp-block-button__link:focus-visible,
body.wp-theme-candy .wp-element-button:hover,
body.wp-theme-candy .wp-element-button:focus-visible,
body.wp-theme-candy button[type="submit"]:hover,
body.wp-theme-candy button[type="submit"]:focus-visible,
body.wp-theme-candy input[type="submit"]:hover,
body.wp-theme-candy input[type="submit"]:focus-visible,
body.wp-theme-candy .gform_button:hover,
body.wp-theme-candy .gform_button:focus-visible {
  transform: translateY(1px);
  box-shadow: 0 4px 0 var(--green-300);
}

/* Trustindex block cleanup */
body.wp-theme-candy .ti-widget {
  white-space: normal;
  background: transparent;
  border: 0;
  padding: 0;
  font-family: inherit;
}

/* Footer polish */
body.wp-theme-candy .footer {
  position: relative;
  z-index: 2;
  margin: clamp(3rem, 6vh, 4.5rem) 0 0 !important;
  padding: 0;
  width: 100% !important;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  border-top: 1px solid rgba(244, 216, 141, 0.28);
  background: var(--ns-footer-backdrop);
}

body.wp-theme-candy .footer__blocks {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 1rem 2rem;
  margin: 0;
  padding: clamp(0.95rem, 2vw, 1.35rem) clamp(1.15rem, 2.8vw, 2.25rem) calc(clamp(0.95rem, 2vw, 1.35rem) + env(safe-area-inset-bottom, 0px));
}

body.wp-theme-candy .footer__block {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 0.6rem;
  min-width: 0;
}

body.wp-theme-candy .footer__block:first-child {
  align-items: flex-start;
}

body.wp-theme-candy .footer__block:last-child {
  align-items: flex-end;
}

body.wp-theme-candy .footer__copyright {
  margin: 0;
  line-height: 1.2;
}

body.wp-theme-candy .footer__menu,
body.wp-theme-candy .footer__menu .menu-footer-menu-container,
body.wp-theme-candy .footer__menu .menu {
  width: 100%;
}

body.wp-theme-candy .footer__menu ul li a,
body.wp-theme-candy .footer__social-menu ul li a {
  opacity: 0.94;
}

body.wp-theme-candy .footer__menu ul {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 0.6rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.wp-theme-candy .footer__menu ul li {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

body.wp-theme-candy .footer__menu ul li a,
body.wp-theme-candy .footer__menu ul li .footer-cookie-settings-btn {
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
}

body.wp-theme-candy .footer__menu ul li a:hover,
body.wp-theme-candy .footer__social-menu ul li a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Mobile nav readability */
@media (max-width: 1280px) {
  body.wp-theme-candy .header__main-menu {
    background: rgba(244, 216, 141, 0.98);
  }

  body.wp-theme-candy .header__main-menu::before {
    background: var(--green-500);
  }

  body.wp-theme-candy .header__main-menu ul {
    gap: 1.35rem;
  }

  body.wp-theme-candy .header__main-menu a {
    font-size: clamp(1rem, 4vw, 1.35rem) !important;
    letter-spacing: 0.04em;
  }
}

/* Mobile spacing */
@media (max-width: 767px) {
  body.wp-theme-candy .footer__blocks {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    gap: 0.75rem;
    padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  body.wp-theme-candy .footer__block,
  body.wp-theme-candy .footer__block:first-child,
  body.wp-theme-candy .footer__block:last-child {
    width: 100%;
    margin: 0;
    align-items: center !important;
    text-align: center !important;
  }

  body.wp-theme-candy .footer__copyright {
    width: 100%;
    text-align: center !important;
  }

  body.wp-theme-candy .footer__menu ul {
    justify-content: center !important;
    gap: 0.6rem 1rem;
  }

  body.wp-theme-candy .footer__menu,
  body.wp-theme-candy .footer__menu .menu-footer-menu-container,
  body.wp-theme-candy .footer__menu .menu {
    width: 100%;
  }

  body.wp-theme-candy:not(.home) .page__content {
    --ns-page-pad: 0.95rem;
    margin-top: 6.2rem;
    border-radius: 1.05rem;
  }

  body.wp-theme-candy:not(.home) .page__title {
    margin-bottom: 0.85rem;
    padding: 0;
  }

  body.wp-theme-candy.home .home__content > .wp-block-media-text,
  body.wp-theme-candy.home .home__content > .wp-block-columns,
  body.wp-theme-candy.home .home__content > h2.wp-block-heading {
    border-radius: 1.05rem;
    padding: 0.9rem;
  }

  body.wp-theme-candy.home .home__content > .ns-home-unified-card {
    border-radius: 1.05rem;
  }

  body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-media-text,
  body.wp-theme-candy.home .home__content > .ns-home-unified-card > .wp-block-columns,
  body.wp-theme-candy.home .home__content > .ns-home-unified-card > h2.wp-block-heading {
    padding: 0.9rem;
  }

  body.wp-theme-candy.home .home__content > .ns-home-unified-card > h2.wp-block-heading {
    padding-bottom: 0.4rem;
  }
}

/* Focus visibility */
body.wp-theme-candy a:focus-visible,
body.wp-theme-candy button:focus-visible,
body.wp-theme-candy input:focus-visible,
body.wp-theme-candy textarea:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.wp-theme-candy .ns-candy-rain {
    display: none !important;
  }

  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
