@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:wght@400;500;600;700&family=Caveat:wght@600;700&display=swap');

:root {
  --honey:   #d68f1e;
  --honey-d: #a9670c;
  --amber:   #e6a92b;
  --paper:   #f3e7cd;
  --cream:   #f7efdb;
  --cream-2: #efe3c6;
  --brown:   #43301b;
  --brown-2: #6b4f2f;
  --line:    #cdb488;
  --line-d:  #a98a52;
  --green:   #5c7a34;
  --red:     #a8432a;
  --serif: 'Zilla Slab', Georgia, 'Times New Roman', serif;
  --hand: 'Caveat', 'Zilla Slab', cursive;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--brown);
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 50% 0, rgba(214,143,30,.06), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  line-height: 1.6;
}
h1, h2 { font-family: var(--serif); font-weight: 700; line-height: 1.15; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--amber);
  background-image:
    radial-gradient(130% 80% at 50% -20%, #f2c65b 0%, rgba(242,198,91,0) 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%2343301b' fill-opacity='0.07' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/svg%3E");
  color: var(--brown);
  padding: 70px 24px 96px;
  text-align: center;
  overflow: hidden;
}
.bee-field { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.bee {
  position: absolute; top: 0; left: 0; width: 30px; height: 21px;
  background-repeat: no-repeat; background-size: contain;
  will-change: transform;
}
.hero-inner {
  position: relative; z-index: 2; max-width: 660px; margin: 0 auto;
  padding: 30px 26px 34px;
  border: 2px solid var(--brown);
  outline: 2px solid var(--brown);
  outline-offset: 4px;
  background: rgba(247,239,219,.28);
}
.comb-mark { color: var(--brown-2); margin-bottom: 4px; }
.hero h1 {
  font-size: clamp(2.7rem, 7vw, 4rem);
  margin: .05em 0 .05em; letter-spacing: .5px; text-transform: uppercase;
}
.subtitle {
  font-family: var(--hand);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  font-weight: 700; margin: 0 0 .5em; color: var(--honey-d);
  transform: rotate(-2deg);
}
.hero-text { font-size: 1.12rem; max-width: 520px; margin: 0 auto 1.5em; color: var(--brown); }

.status-row {
  display: flex; flex-wrap: wrap; gap: 16px 26px;
  justify-content: center; align-items: center;
  padding-top: 12px; border-top: 1px dashed var(--brown-2);
}
.badge {
  font-family: var(--serif); font-weight: 700; font-size: 1rem;
  padding: 7px 16px; background: var(--cream);
  border: 2px solid currentColor; border-radius: 4px;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-yes { color: var(--green); }
.badge-no  { color: var(--red); }
.price {
  font-family: var(--serif);
  font-size: 2rem; font-weight: 700; color: var(--brown);
  line-height: 1.1;
}
.price small { font-family: var(--hand); font-size: 1.15rem; font-weight: 700; color: var(--honey-d); }
.price .unit-price {
  display: block; font-family: var(--serif); font-style: normal;
  font-size: .82rem; font-weight: 600; letter-spacing: .3px; color: var(--brown-2);
}

/* ---------- Knöpfe (öffentliche Seite) ---------- */
.btn {
  display: inline-block; font-family: var(--serif); font-weight: 700;
  font-size: 1.02rem; letter-spacing: .5px; text-decoration: none; cursor: pointer;
  background: var(--brown); color: var(--cream);
  border: 2px solid var(--brown); border-radius: 3px;
  padding: 11px 22px; box-shadow: 3px 3px 0 var(--honey-d);
  transition: transform .08s ease, box-shadow .08s ease, background .12s ease;
}
.btn:hover { background: var(--brown-2); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--honey-d); }
.btn:focus-visible { outline: 3px solid var(--honey-d); outline-offset: 3px; }
.btn-quiet {
  background: var(--cream); color: var(--brown);
  box-shadow: 3px 3px 0 var(--brown-2);
}
.btn-quiet:hover { background: #fff; }
.btn-quiet:active { box-shadow: 0 0 0 var(--brown-2); }

.btn.is-copied {
  background: var(--green); color: var(--cream); border-color: var(--green);
  box-shadow: 3px 3px 0 var(--brown);
  animation: pop .28s ease;
}
@keyframes pop {
  0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .btn.is-copied { animation: none; } }

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; margin-top: 20px;
}
.hero-actions:empty { display: none; }

/* scalloped label edge */
.hero-wave {
  position: absolute; left: 0; right: 0; bottom: 0; height: 16px; z-index: 3;
  background: radial-gradient(circle at 13px 16px, var(--cream) 12px, transparent 13px);
  background-size: 26px 16px; background-repeat: repeat-x;
}

/* ---------- Main sections ---------- */
main { max-width: 940px; margin: 0 auto; padding: 20px 24px 30px; }
section { margin: 60px 0; }
section h2 {
  font-size: 2.1rem; text-align: center; margin: 0 0 .2em;
  text-transform: uppercase; letter-spacing: 1px;
}
.comb-divider {
  display: block; width: 84px; height: 22px; margin: 6px auto 26px;
  color: var(--honey);
}
.about p, .contact p { max-width: 620px; margin: 0 auto 1em; text-align: center; font-size: 1.14rem; color: var(--brown-2); }

.contact-card {
  display: flex; flex-direction: column; gap: 2px;
  font-style: normal; text-align: center; font-size: 1.14rem;
  color: var(--brown); margin: 0 auto 22px; max-width: 620px;
}
.contact-card strong { font-size: 1.2rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Gallery (gerahmte Fotos) ---------- */
.gallery {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.gallery-item {
  margin: 0; background: var(--cream);
  padding: 12px 12px 6px;
  border: 1px solid var(--line-d);
  box-shadow: 3px 4px 0 rgba(67,48,27,.18);
}
.gallery-item img {
  width: 100%; height: 210px; object-fit: cover; display: block;
  border: 2px solid var(--brown);
}
.gallery-item figcaption {
  padding: 8px 4px 4px; font-family: var(--hand); font-weight: 700;
  font-size: 1.35rem; color: var(--brown); text-align: center;
}

/* ---------- Blütenwiese ---------- */
.meadow {
  position: relative; height: 210px; line-height: 0;
  overflow: hidden; pointer-events: none;
  background: linear-gradient(to top,
    rgba(124,148,80,.26), rgba(124,148,80,.06) 55%, rgba(124,148,80,0));
}
.meadow svg.field { display: block; width: 100%; height: 100%; }
.flyer { position: absolute; z-index: 3; }
.flyer svg { display: block; }

@keyframes sway { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
.stalk {
  transform-box: fill-box; transform-origin: bottom center;
  animation: sway var(--dur, 5s) ease-in-out var(--del, 0s) infinite alternate;
}
@keyframes flit {
  0%   { transform: translate(0, 0) rotate(-6deg); }
  25%  { transform: translate(70px, -30px) rotate(8deg); }
  50%  { transform: translate(140px, 6px) rotate(-4deg); }
  75%  { transform: translate(66px, -20px) rotate(10deg); }
  100% { transform: translate(0, 0) rotate(-6deg); }
}
.flyer { animation: flit var(--dur, 13s) ease-in-out var(--del, 0s) infinite; }
@media (prefers-reduced-motion: reduce) {
  .stalk, .flyer { animation: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brown); color: var(--cream);
  text-align: center; padding: 28px 20px;
  border-top: 4px solid var(--honey);
}
.site-footer p { margin: 0; font-family: var(--hand); font-size: 1.4rem; }

/* ---------- Flash ---------- */
.flash {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 50; display: flex; flex-direction: column; gap: 6px;
}
.flash div {
  background: var(--brown); color: var(--cream); padding: 10px 18px;
  border: 2px solid var(--honey); border-radius: 4px; font-weight: 600;
}

/* ================= ADMIN ================= */
.admin-bg { background-color: var(--paper); }

.login-card {
  max-width: 360px; margin: 11vh auto; background: var(--cream);
  padding: 38px 32px; text-align: center;
  border: 2px solid var(--brown); outline: 2px solid var(--brown); outline-offset: 4px;
  box-shadow: 4px 5px 0 rgba(67,48,27,.2);
}
.login-card .comb-mark { color: var(--honey); }
.login-card h1 { font-size: 1.7rem; margin: 6px 0 0; text-transform: uppercase; }
.muted { color: var(--brown-2); margin: 2px 0 22px; font-family: var(--hand); font-size: 1.3rem; }

.admin-wrap { max-width: 820px; margin: 0 auto; padding: 32px 20px 64px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.admin-top h1 { margin: 0; font-size: 2rem; text-transform: uppercase; }
.admin-top-actions { display: flex; gap: 18px; }
.link { color: var(--honey-d); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

.card {
  background: var(--cream); border: 2px solid var(--line-d);
  padding: 24px 24px 26px; margin: 0 0 22px;
  box-shadow: 3px 4px 0 rgba(67,48,27,.12);
}
.card h2 { font-size: 1.3rem; margin: 0 0 16px; text-align: left; text-transform: uppercase; letter-spacing: .5px; }

label { display: block; font-weight: 600; color: var(--brown); margin-bottom: 16px; font-size: .98rem; }
input[type=text], input[type=password], textarea {
  display: block; width: 100%; margin-top: 6px;
  padding: 11px 13px; border: 2px solid var(--line-d); border-radius: 3px;
  font: inherit; font-weight: 400; color: var(--brown); background: var(--paper);
}
input:focus, textarea:focus { outline: 2px solid var(--honey); border-color: var(--honey); }
textarea { resize: vertical; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.check { display: flex; align-items: center; gap: 10px; align-self: end; }
.check input { width: 20px; height: 20px; accent-color: var(--honey); margin: 0; }
.check span { font-weight: 700; }

.hint { color: var(--brown-2); font-size: .9rem; margin: 4px 0 0; font-weight: 400; font-style: italic; }

.save-bar { position: sticky; bottom: 0; padding: 14px 0; }
button {
  font-family: var(--serif); font-weight: 700; cursor: pointer;
  background: var(--honey); color: #fff2d8; border: 2px solid var(--brown);
  padding: 11px 26px; border-radius: 3px; letter-spacing: .5px;
  box-shadow: 3px 3px 0 var(--brown); transition: transform .08s ease, box-shadow .08s ease;
}
button:hover { background: var(--honey-d); }
button:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--brown); }
.small-btn { padding: 8px 14px; font-size: .9rem; box-shadow: 2px 2px 0 var(--brown); }
.small-btn.danger { background: var(--cream); color: var(--red); border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.small-btn.danger:hover { background: var(--red); color: #fff; }

.img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 18px; }
.img-slot { display: flex; flex-direction: column; gap: 8px; }
.img-preview {
  aspect-ratio: 4/3; overflow: hidden;
  background: var(--paper); border: 2px dashed var(--line-d);
  display: flex; align-items: center; justify-content: center;
}
.img-preview { position: relative; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }

.drag-handle {
  position: absolute; top: 6px; left: 6px;
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; line-height: 1; letter-spacing: -2px;
  background: rgba(247,239,219,.92); color: var(--brown-2);
  border: 2px solid var(--line-d); border-radius: 3px; box-shadow: none;
  cursor: grab; touch-action: none;
}
.drag-handle:hover { background: var(--cream); border-color: var(--honey); color: var(--brown); }
.drag-handle:active { cursor: grabbing; transform: none; }

.img-slot.is-dragging {
  position: fixed; z-index: 40; margin: 0; pointer-events: none;
  opacity: .92; transform: rotate(-1.5deg);
  box-shadow: 6px 8px 0 rgba(67,48,27,.22);
}
.img-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.as-label {
  display: inline-block; margin: 0; cursor: pointer;
  background: var(--honey); color: #fff2d8; border: 2px solid var(--brown);
  padding: 8px 14px; border-radius: 3px; font-weight: 700; font-size: .9rem;
  box-shadow: 2px 2px 0 var(--brown);
}
.as-label:hover { background: var(--honey-d); }
.order-note { margin-top: 12px; font-style: normal; font-weight: 700; color: var(--green); }
.order-note.is-error { color: var(--red); }
.img-empty { color: var(--line-d); font-weight: 700; text-align: center; font-size: .9rem; }
.img-form { display: flex; flex-direction: column; gap: 6px; }
.img-form input[type=file] { font-size: .82rem; }
.img-cap-form { display: flex; flex-direction: column; gap: 6px; }
.img-cap-form input { width: 100%; margin: 0; }
.img-cap-form button { align-self: flex-start; }
.add-tile {
  align-items: center; justify-content: center; text-align: center;
  border: 2px dashed var(--line-d); background: var(--paper); cursor: pointer;
  padding: 10px; transition: border-color .15s ease, background .15s ease;
}
.add-tile:hover { border-color: var(--honey); background: #fbf3df; }
.add-plus {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 4/3; margin: 0;
  font-size: 3.4rem; font-weight: 700; line-height: 1;
  color: var(--honey-d); cursor: pointer;
}
.add-tile .hint { font-style: normal; font-weight: 700; }
.pw-form { display: flex; gap: 10px; flex-wrap: wrap; }
.pw-form input { flex: 1; min-width: 200px; margin: 0; }

@media (max-width: 560px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero { padding: 54px 18px 84px; }
  .hero-inner { padding: 24px 18px 28px; }
}
