/* ==========================================================================
   Bäckerei Eichholz – Stylesheet
   ========================================================================== */

:root {
  --color-bg: #faf3e6;
  --color-bg-alt: #f2e4cd;
  --color-card: #fffdf8;
  --color-text: #3f2c1e;
  --color-text-light: #6b5744;
  --color-accent: #c6893a;
  --color-accent-dark: #a06b26;
  --color-brown: #5c3a22;
  --color-brown-dark: #3a2414;
  --color-border: #e6d5b8;
  --color-rust: #a8462e;
  --color-rust-dark: #832f1c;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Nunito Sans', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --container-width: 1140px;
  --radius: 16px;
  --shadow-soft: 0 6px 20px rgba(60, 40, 20, 0.1);
  --shadow-strong: 0 10px 30px rgba(60, 40, 20, 0.18);
  --header-h: 80px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background:
    repeating-linear-gradient(45deg, rgba(92, 58, 34, 0.05) 0px, rgba(92, 58, 34, 0.05) 1px, transparent 1px, transparent 8px),
    repeating-linear-gradient(-45deg, rgba(92, 58, 34, 0.035) 0px, rgba(92, 58, 34, 0.035) 1px, transparent 1px, transparent 8px),
    var(--color-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

.is-hidden {
  display: none !important;
}

a {
  color: var(--color-accent-dark);
  text-decoration: none;
}

a:hover {
  color: var(--color-brown);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-brown-dark);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

ul { margin: 0; padding: 0; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5.5rem 0;
}

.section--alt {
  background: linear-gradient(180deg, var(--color-bg-alt), #ecdcbb);
  border-radius: 32px;
  max-width: calc(var(--container-width) + 4rem);
  margin: 2.5rem auto;
  box-shadow: var(--shadow-soft);
}

.section-heading {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.section-heading::before {
  content: '';
  display: block;
  width: 90px;
  height: 12px;
  margin: 0 auto 1.1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 12'%3E%3Cline x1='0' y1='6' x2='34' y2='6' stroke='%23a06b26' stroke-width='1'/%3E%3Crect x='40.5' y='1.5' width='9' height='9' fill='none' stroke='%23a06b26' stroke-width='1' transform='rotate(45 45 6)'/%3E%3Cline x1='56' y1='6' x2='90' y2='6' stroke='%23a06b26' stroke-width='1'/%3E%3C/svg%3E")
    no-repeat center;
}

.section-heading .eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--color-accent-dark);
  margin-bottom: 0.5rem;
}

.section-heading p {
  color: var(--color-text-light);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn--outline {
  border-color: var(--color-accent);
  color: var(--color-brown-dark);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(250, 243, 230, 0.98);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 18px rgba(60, 40, 20, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.5rem;
  max-width: var(--container-width);
  margin: 0 auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  transition: color 0.3s ease;
}

.brand img {
  height: 56px;
  width: auto;
}

.brand span small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f3ddb0;
  transition: color 0.3s ease;
}

.site-header.is-scrolled .brand {
  color: var(--color-brown-dark);
}

.site-header.is-scrolled .brand span small {
  color: var(--color-accent-dark);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  content: '';
  display: block;
  width: 26px;
  height: 3px;
  background: #fff;
  margin: 5px 0;
  border-radius: 2px;
  transition: 0.2s ease;
}

.site-header.is-scrolled .nav-toggle span,
.site-header.is-scrolled .nav-toggle::before,
.site-header.is-scrolled .nav-toggle::after {
  background: var(--color-brown-dark);
}

/* ---------- Warenkorb-Icon (Header, alle Seiten) ---------- */
.cart-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, color 0.3s ease;
}

.cart-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
}

.site-header.is-scrolled .cart-toggle {
  color: var(--color-brown-dark);
}

.site-header.is-scrolled .cart-toggle:hover {
  background: rgba(60, 40, 20, 0.08);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-rust);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.cart-badge.is-hidden {
  display: none;
}

.main-nav ul {
  display: flex;
  gap: 1.9rem;
  list-style: none;
}

.main-nav a {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease;
}

.site-header.is-scrolled .main-nav a {
  color: var(--color-brown-dark);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--color-accent-dark);
  border-bottom-color: var(--color-accent);
}

/* ---------- Hero (full-bleed) ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 88vh;
  margin-top: calc(-1 * var(--header-h));
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.12);
  will-change: transform;
}

/* Decorative scroll cue, purely visual */
.hero::after {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 28px;
  width: 20px;
  height: 20px;
  border-right: 3px solid rgba(255, 255, 255, 0.75);
  border-bottom: 3px solid rgba(255, 255, 255, 0.75);
  transform: translateX(-50%) rotate(45deg);
  animation: heroChevronBounce 2.2s ease-in-out infinite;
}

@keyframes heroChevronBounce {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(45deg); opacity: 0.55; }
  50% { transform: translateX(-50%) translateY(8px) rotate(45deg); opacity: 1; }
}

@media (max-width: 640px) {
  .hero::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after {
    animation: none;
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(58, 36, 20, 0.55) 0%, rgba(58, 36, 20, 0.35) 45%, rgba(58, 36, 20, 0.78) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-top: calc(var(--header-h) + 2rem);
}

.hero-text {
  max-width: 640px;
}

.hero-text .eyebrow {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero-text h1 {
  color: #fff;
}

.hero-text p {
  font-size: 1.1rem;
  color: #f3e9d8;
  max-width: 46ch;
}

.hero-text .btn--outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.8);
}

.hero-text .btn--outline:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.6rem;
  flex-wrap: wrap;
}

/* Entrance animation for hero content (plays once on load) */
.hero-text > * {
  animation: heroFadeIn 0.8s ease both;
}

.hero-text .eyebrow { animation-delay: 0.05s; }
.hero-text h1 { animation-delay: 0.15s; }
.hero-text p { animation-delay: 0.25s; }
.hero-text .hero-actions { animation-delay: 0.35s; }

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

@media (prefers-reduced-motion: reduce) {
  .hero-text > * {
    animation: none;
  }
}

.hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

/* ---------- Highlight cards ---------- */
.grid {
  display: grid;
  gap: 1.8rem;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  position: relative;
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2.2rem 1.7rem 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  transition: transform 0.15s ease-out, box-shadow 0.25s ease;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-rust));
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--color-text-light);
  margin-bottom: 0;
}

.card--icon {
  display: block;
  text-align: center;
  color: inherit;
  text-decoration: none;
}

.card-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(160, 107, 38, 0.25);
}

/* ---------- Photo gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery img {
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.04);
  box-shadow: var(--shadow-strong);
}

/* ---------- Instagram feed ---------- */
.instagram-feed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* ---------- Lightbox (full-size image viewer) ---------- */
.gallery img,
.torte-grid img,
.hero-image img {
  cursor: zoom-in;
}

body.lightbox-open,
body.filiale-modal-open,
body.cart-drawer-open {
  overflow: hidden;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  background: rgba(58, 36, 20, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: var(--shadow-strong);
  background: var(--color-card);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.lightbox-overlay.is-open img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 640px) {
  .lightbox-overlay {
    padding: 1.2rem;
  }

  .lightbox-close {
    top: 0.7rem;
    right: 0.7rem;
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-overlay,
  .lightbox-overlay img {
    transition: none;
  }
}

/* ---------- Timeline (Über uns) ---------- */
.timeline {
  border-left: 3px solid var(--color-accent);
  margin-left: 1rem;
  padding-left: 2rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 2.2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 0.3rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 3px solid var(--color-bg);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline-item .year {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent-dark);
  font-size: 1.15rem;
}

/* ---------- Product sortiment (accordion) ---------- */
.sortiment-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.sortiment-accordion details {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.sortiment-accordion summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-brown-dark);
}

.sortiment-accordion summary::-webkit-details-marker {
  display: none;
}

.sortiment-accordion summary::before {
  content: '🥖';
  margin-right: 0.5rem;
}

.sortiment-accordion .accordion-caret {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-accent-dark);
  border-bottom: 2px solid var(--color-accent-dark);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.sortiment-accordion details[open] .accordion-caret {
  transform: rotate(-135deg);
}

.sortiment-accordion summary:hover,
.sortiment-accordion summary:focus-visible {
  color: var(--color-accent-dark);
}

.accordion-products {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.2rem 2rem;
  margin: 0;
  padding: 0 1.4rem 1.3rem;
}

.accordion-products li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.accordion-products li:nth-last-child(-n+2) {
  border-bottom: none;
}

.accordion-products .product-name {
  color: var(--color-text);
}

.accordion-products .product-no {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-light);
}

@media (max-width: 640px) {
  .accordion-products {
    grid-template-columns: 1fr;
  }

  .accordion-products li:nth-last-child(-n+2) {
    border-bottom: 1px dashed var(--color-border);
  }

  .accordion-products li:last-child {
    border-bottom: none;
  }
}

.torte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.6rem;
}

.torte-grid figure {
  margin: 0;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
  transition: transform 0.15s ease-out, box-shadow 0.25s ease;
}

.torte-grid figure:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
}

.torte-grid img {
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.torte-grid figure:hover img {
  transform: scale(1.06);
}

.torte-grid figcaption {
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  color: var(--color-text-light);
}

/* ---------- Öffnungszeiten table ---------- */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.hours-table th,
.hours-table td {
  padding: 1rem 1.4rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.hours-table th {
  background: var(--color-brown-dark);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
}

.hours-table tr:last-child td {
  border-bottom: none;
}

.placeholder {
  color: var(--color-accent-dark);
  font-style: italic;
  background: #fdf1de;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

.notice-box {
  margin-top: 2rem;
  padding: 1.2rem 1.5rem;
  background: #fdf1de;
  border-left: 4px solid var(--color-accent);
  border-radius: 8px;
  color: var(--color-text-light);
}

/* ---------- Filialen ---------- */
.filiale-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.filiale-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  cursor: pointer;
  transition: transform 0.15s ease-out, box-shadow 0.25s ease, border-color 0.25s ease;
}

.filiale-card:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: var(--color-accent);
}

.filiale-card:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.filiale-card .tag,
.filiale-card-name,
.filiale-card-address {
  display: block;
}

.filiale-card .tag,
.filiale-modal-body .tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-dark);
  margin-bottom: 0.3rem;
}

.filiale-card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-brown-dark);
}

.filiale-card-address {
  margin-top: 0.15rem;
  color: var(--color-text-light);
  font-size: 0.92rem;
}

@media (prefers-reduced-motion: reduce) {
  .filiale-card {
    transition: none;
  }
}

/* ---------- Filiale-Detailansicht (Modal) ---------- */
.filiale-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(58, 36, 20, 0.88);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.filiale-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.filiale-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--color-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.filiale-modal-overlay.is-open .filiale-modal {
  transform: scale(1);
}

.filiale-modal:focus {
  outline: none;
}

.filiale-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(58, 36, 20, 0.55);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.filiale-modal-close:hover {
  background: var(--color-accent);
}

.filiale-modal-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-border));
}

/* Filialfotos unbeschnitten zeigen (contain) - viele sind hochkant. Die
   freien Ränder füllt eine unscharfe, abgedunkelte Kopie desselben Fotos. */
.filiale-modal-backdrop {
  position: absolute;
  inset: -24px;
  background-position: center;
  background-size: cover;
  filter: blur(20px) brightness(0.75);
}

.filiale-modal-media img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.filiale-modal-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -70%);
  font-size: 2.4rem;
}

.filiale-modal-placeholder-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, 40%);
  color: var(--color-text-light);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filiale-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(58, 36, 20, 0.55);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.filiale-modal-nav:hover {
  background: var(--color-accent);
}

.filiale-modal-nav--prev { left: 0.7rem; }
.filiale-modal-nav--next { right: 0.7rem; }

.filiale-modal-counter {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(58, 36, 20, 0.55);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.filiale-modal-body {
  padding: 1.6rem 1.8rem 1.9rem;
}

.filiale-modal-body h3 {
  margin: 0.2rem 0 0.6rem;
}

.filiale-modal-address {
  color: var(--color-text-light);
  margin-bottom: 1.2rem;
}

.filiale-modal-body .hours-table--compact {
  margin-bottom: 1.4rem;
  box-shadow: none;
  border: 1px solid var(--color-border);
}

.filiale-modal-body .hours-table--compact td {
  padding: 0.8rem 1.1rem;
}

.notice-box--compact {
  margin-top: 0;
}

.filiale-modal-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .filiale-modal-overlay {
    padding: 1rem;
  }

  .filiale-modal {
    max-height: 94vh;
  }

  /* Quadratisch statt 4:3, damit Hochkant-Fotos auf dem Handy nicht zu
     schmal werden. */
  .filiale-modal-media {
    aspect-ratio: 1 / 1;
  }

  .filiale-modal-body {
    padding: 1.3rem 1.2rem 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filiale-modal-overlay,
  .filiale-modal {
    transition: none;
  }
}

/* ---------- Warenkorb (Slide-in-Drawer, alle Seiten) ---------- */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  background: rgba(58, 36, 20, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cart-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  width: 100%;
  max-width: 420px;
  height: 100%;
  overflow-y: auto;
  background: var(--color-card);
  box-shadow: var(--shadow-strong);
  padding: 1.8rem 1.6rem 2rem;
  position: relative;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer-overlay.is-open .cart-drawer {
  transform: translateX(0);
}

.cart-drawer:focus {
  outline: none;
}

.cart-drawer h3 {
  margin-bottom: 1.4rem;
  padding-right: 2.4rem;
}

.cart-drawer-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-brown-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.cart-drawer-close:hover {
  background: var(--color-border);
}

.cart-drawer-empty {
  color: var(--color-text-light);
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.8rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item-info {
  display: flex;
  flex-direction: column;
  grid-column: 1 / -1;
}

.cart-item-name {
  font-weight: 700;
  color: var(--color-brown-dark);
}

.cart-item-unit {
  font-size: 0.82rem;
  color: var(--color-text-light);
}

.cart-item-price {
  font-weight: 700;
  color: var(--color-brown-dark);
}

.cart-item-remove {
  justify-self: end;
  border: none;
  background: none;
  color: var(--color-text-light);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.cart-item-remove:hover {
  color: var(--color-rust);
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}

.qty-btn {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: var(--color-bg-alt);
  color: var(--color-brown-dark);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.qty-btn:hover {
  background: var(--color-accent);
  color: #fff;
}

.qty-value {
  min-width: 1.2em;
  text-align: center;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cart-drawer-footer {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--color-border);
}

.cart-drawer-subtotal {
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-bottom: 1rem;
}

.cart-drawer-error.is-hidden {
  display: none;
}

.cart-drawer-checkout {
  width: 100%;
  text-align: center;
  border: none;
  cursor: pointer;
}

.cart-drawer-checkout:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 640px) {
  .cart-drawer {
    max-width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cart-drawer-overlay,
  .cart-drawer {
    transition: none;
  }
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.contact-card dl {
  margin: 0;
}

.contact-card dt {
  font-weight: 700;
  color: var(--color-brown-dark);
  margin-top: 1.1rem;
}

.contact-card dt:first-child {
  margin-top: 0;
}

.contact-card dd {
  margin: 0.15rem 0 0;
  color: var(--color-text-light);
}

.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border);
}

.map-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-brown-dark);
  color: #ecdfc9;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-inner h4 {
  color: #fff;
  font-size: 1.05rem;
}

.footer-inner a {
  color: #ecdfc9;
}

.footer-inner a:hover {
  color: var(--color-accent);
}

.footer-inner ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.2rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #cdbc9c;
}

.footer-bottom a {
  color: #cdbc9c;
  text-decoration: underline;
}

/* ---------- Page header (Unterseiten) ---------- */
.page-hero {
  position: relative;
  background:
    radial-gradient(circle at 12% -20%, rgba(198, 137, 58, 0.35), transparent 55%),
    radial-gradient(circle at 88% 130%, rgba(168, 70, 46, 0.3), transparent 50%),
    var(--color-brown-dark);
  color: #f6ead4;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(var(--header-h) + 3.2rem) 0 3.2rem;
  text-align: center;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.4px);
  background-size: 28px 28px;
  opacity: 0.35;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: 0.4rem;
}

.page-hero p {
  color: #d9c6a3;
  margin: 0;
}

/* ---------- Scroll reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Torten-/Galeriebilder: skalieren + drehen sanft ein */
.reveal--pop {
  transform: translateY(24px) scale(0.9) rotate(-3deg);
}

.reveal--pop.is-visible {
  transform: translateY(0) scale(1) rotate(0deg);
}

/* Karten/Zeitstrahl: kippen leicht aus der Tiefe herein */
.reveal--tilt {
  transform: perspective(800px) rotateX(14deg) translateY(20px);
  transform-origin: bottom center;
}

.reveal--tilt.is-visible {
  transform: perspective(800px) rotateX(0deg) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--pop,
  .reveal--tilt {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero {
    min-height: 80vh;
  }

  .hero-image {
    order: -1;
  }

  .section--alt {
    border-radius: 24px;
    margin: 1.75rem 1rem;
  }

  .grid--3,
  .torte-grid,
  .filiale-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 70vh;
  }

  .hero-inner {
    padding-top: calc(var(--header-h) + 1.2rem);
    padding-bottom: 3rem;
  }

  .section--alt {
    border-radius: 18px;
    margin: 1.25rem 0.75rem;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  /* Rahmen erst im geöffneten Zustand: max-height:0 begrenzt nur die
     Inhaltsbox, ein Rahmen bliebe als 1px hoher Streifen samt Hintergrund
     unter dem Header sichtbar. */
  .main-nav.is-open {
    max-height: 400px;
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.5rem 1.2rem;
  }

  .main-nav li {
    border-bottom: 1px solid var(--color-border);
  }

  .main-nav a {
    display: block;
    padding: 0.9rem 0;
    color: var(--color-brown-dark);
  }

  .grid--3,
  .grid--2,
  .torte-grid,
  .filiale-list,
  .product-list {
    grid-template-columns: 1fr;
  }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .section {
    padding: 3rem 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

/* ==========================================================================
   Hochzeitstorten: Torten-Konfigurator (Anfrageformular)
   Alle Regeln sind unter .torten-konfigurator eingehängt (Klassen-Präfix
   "tk-"), damit die eigene Farb-/Font-Umgebung ausschließlich diese Seite
   betrifft und Header, Footer sowie alle anderen Seiten unangetastet lässt.
   ========================================================================== */
.torten-konfigurator {
  --tk-ivory: #f7f2e7;
  --tk-gold: #c6a55c;
  --tk-ink: #2b241c;
  --tk-ink-soft: #5b5346;
  font-family: "Cormorant Garamond", "Georgia", "Times New Roman", serif;
  color: var(--tk-ink);
  overflow-x: clip;
}

.tk-contact {
  position: relative;
  /* transparent statt --tk-ivory: die Schraffur liegt auf <body> und wurde
     von einer deckenden Flaeche verdeckt - so traegt diese Seite denselben
     Hintergrund wie alle uebrigen. --tk-ivory bleibt fuer Flaechen, die
     sich bewusst vom Hintergrund abheben sollen (z. B. .tk-summary). */
  background: transparent;
  padding: 84px 8vw 96px;
}

.tk-contact-inner {
  max-width: 960px;
  margin: 0 auto;
}

.tk-contact-head {
  text-align: center;
  margin-bottom: 64px;
}

.tk-contact-head .tk-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--tk-gold);
  font-family: var(--font-body);
  margin-bottom: 14px;
}

.tk-contact-head h2 {
  font-family: inherit;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  margin: 0 0 16px;
  color: var(--tk-ink);
}

.tk-contact-head p {
  color: var(--tk-ink-soft);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.tk-order-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 30px;
}

.tk-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tk-field.tk-full {
  grid-column: 1 / -1;
}

.tk-field label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tk-ink-soft);
  font-family: var(--font-body);
}

.tk-field input,
.tk-field select,
.tk-field textarea {
  border: none;
  border-bottom: 1px solid rgba(43, 36, 28, 0.3);
  background: transparent;
  padding: 10px 2px;
  font-size: 1.05rem;
  font-family: inherit;
  color: var(--tk-ink);
  outline: none;
  transition: border-color .25s ease;
  width: 100%;
}

.tk-field input:focus,
.tk-field select:focus,
.tk-field textarea:focus {
  border-color: var(--tk-gold);
}

.tk-field textarea {
  resize: vertical;
  min-height: 90px;
}

.tk-req {
  color: #b04a3a;
}

.tk-form-section {
  grid-column: 1 / -1;
  margin: 34px 0 4px;
  border-top: 1px solid rgba(43, 36, 28, 0.14);
  padding-top: 34px;
}

.tk-form-section-title {
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--tk-ink);
  display: inline-block;
  position: relative;
  padding-bottom: 4px;
}

.tk-form-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 46px;
  height: 2px;
  background: var(--tk-gold);
}

.tk-choice-row {
  display: flex;
  gap: 34px;
  padding-top: 6px;
}

.tk-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: inherit;
  font-size: 1.05rem;
  color: var(--tk-ink);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.tk-choice input {
  accent-color: var(--tk-gold);
  width: 16px;
  height: 16px;
}

.tk-tiers-block {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 40px;
  align-items: start;
  margin-top: 6px;
}

.tk-tier-diagram {
  position: sticky;
  top: 40px;
}

.tk-tier-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.tk-tiers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 30px;
}

.tk-submit-row {
  grid-column: 1 / -1;
  margin-top: 10px;
  text-align: center;
}

.tk-submit-row button {
  border: none;
  background: var(--tk-ink);
  color: var(--tk-ivory);
  padding: 17px 54px;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all .3s ease;
}

.tk-submit-row button:hover {
  background: var(--tk-gold);
  color: var(--tk-ink);
}

/* Zweitrangige Aktion neben "Verbindlich bestellen" - gleiche Form, aber
   nur Kontur, damit die kostenpflichtige Bestellung optisch fuehrt. */
.tk-secondary {
  background: transparent !important;
  color: var(--tk-ink) !important;
  border: 1px solid var(--tk-ink) !important;
  margin-left: 12px;
}

.tk-secondary:hover {
  background: var(--tk-ink) !important;
  color: var(--tk-ivory) !important;
}

.tk-submit-row button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tk-submit-error {
  margin: 18px auto 0;
  max-width: 560px;
  text-align: left;
}

@media (max-width: 600px) {
  .tk-submit-row button {
    display: block;
    width: 100%;
    padding-left: 18px;
    padding-right: 18px;
  }
  .tk-secondary {
    margin-left: 0;
    margin-top: 12px;
  }
}

.tk-submit-note {
  font-size: 0.8rem;
  color: var(--tk-ink-soft);
  margin-top: 14px;
  opacity: 0.75;
  font-family: var(--font-body);
}

@media (max-width: 820px) {
  .tk-order-form {
    grid-template-columns: 1fr;
  }

  .tk-tiers-block {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tk-tier-diagram {
    position: static;
    max-width: 200px;
    margin: 0 auto;
  }

  .tk-tiers-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   Rechtstexte (Impressum, Datenschutz, AGB)
   Laengere Fliesstexte mit vielen Abschnitten - .contact-card allein gibt
   ihnen keine Gliederung. Nur unter .legal-doc eingehaengt, damit die
   Typografie der uebrigen Seiten unveraendert bleibt.
   ========================================================================== */
.legal-doc {
  font-size: 0.98rem;
}

.legal-doc > section + section {
  margin-top: 2.4rem;
  padding-top: 2.4rem;
  border-top: 1px solid var(--color-border);
}

.legal-doc h2 {
  font-size: 1.32rem;
  margin: 0 0 0.9rem;
}

.legal-doc h3 {
  font-size: 1.05rem;
  margin: 1.6rem 0 0.5rem;
}

.legal-doc p,
.legal-doc ul {
  margin: 0 0 0.9rem;
}

.legal-doc ul {
  padding-left: 1.2rem;
}

.legal-doc li {
  margin-bottom: 0.4rem;
}

.legal-doc address {
  font-style: normal;
  margin-bottom: 0.9rem;
}

/* Kleingedruckte Randnotiz, z. B. Stand der Fassung. */
.legal-meta {
  font-size: 0.86rem;
  color: var(--color-text-light);
}
