/* Charity Champagner – Stylesheet
   Farben werden aus config.php als CSS-Variablen im <head> gesetzt. */

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

/* Muss vor allen display-Regeln stehen: [hidden] soll immer gewinnen. */
[hidden] { display: none !important; }

:root {
  --blue:    #134484;
  --blue-d:  #0C2C56;
  --gold:    #F0BF20;
  --gold-d:  #AD8810;
  --cream:   #FAF8F3;
  --paper:   #FFFFFF;
  --ink:     #1B1B1B;
  --muted:   #6B6B6B;
  --line:    #E3E0D8;
  --ok:      #2E7D46;
  --warn:    #B4761B;
  --bad:     #A33030;
  --radius:  10px;
  --shadow:  0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,32,64,.06);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 28px; }

a { color: var(--blue); }

/* ---------- Header ---------- */

.site-header { background: var(--paper); margin-bottom: 26px; }

.swoosh-band {
  height: 180px;
  background-color: #fff;
  background-image: url("swoosh.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;
}

.brand-band { background: var(--paper); color: var(--blue); padding: 18px 0 65px; }
.brand-row {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: 18px;
}
.brand-band .brand { display: flex; align-items: center; gap: 16px; }
.brand-band .mark {
  width: 54px; height: 54px; flex: 0 0 54px;
  border: 2px solid var(--gold); border-radius: 50%;
  display: grid; place-items: center; color: var(--blue);
}
.brand-band .mark svg { width: 15px; height: 28px; }
.brand-band h1 { margin: 0; font-size: 1.65rem; letter-spacing: .5px; color: var(--blue); }
.brand-band .claim { color: var(--blue); opacity: .7; font-size: .95rem; margin-top: 2px; }
.brand-band .lead { margin: 14px 0 0; max-width: 62ch; color: var(--blue); }
.club-logo { height: 210px; width: auto; justify-self: end; align-self: center; }

.story {
  margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px 40px;
}
.story-item h2 {
  margin: 0 0 8px; font-size: 1.1rem; letter-spacing: .2px; color: var(--blue);
  position: relative; padding-bottom: 8px;
}
.story-item h2::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 34px; height: 3px; background: var(--gold); border-radius: 2px;
}
.story-item p { margin: 0; color: var(--ink); font-size: .93rem; line-height: 1.6; }
.story-item a { color: var(--blue); font-weight: 600; }
.artist-row { display: flex; gap: 14px; align-items: flex-start; }
.artist-photo {
  width: 96px; height: 96px; flex: 0 0 96px; border-radius: 50%;
  border: 2px solid var(--gold); object-fit: cover; background: var(--cream);
}

/* ---------- Kacheln / Karten ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin: 22px 0;
}
.card > h2 { margin-top: 0; }

h2 { font-size: 1.25rem; letter-spacing: .2px; }
h2 .step {
  display: inline-grid; place-items: center;
  width: 26px; height: 26px; margin-right: 9px;
  background: var(--blue); color: #fff; border-radius: 50%;
  font-size: .85rem; font-weight: 700; vertical-align: 2px;
}

.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.facts li {
  background: #fff; border: 1px solid var(--blue); color: var(--blue);
  border-radius: 999px; padding: 5px 14px; font-size: .88rem;
}

/* ---------- Lieferart ---------- */

.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .modes { grid-template-columns: 1fr; } }

.mode {
  display: block; cursor: pointer; overflow: hidden;
  border: 2px solid var(--line); border-radius: var(--radius);
  background: #fff; transition: .15s;
}
.mode:hover { border-color: var(--gold); }
.mode-img { display: block; width: 100%; height: auto; }
.mode-body { position: relative; padding: 16px 18px 16px 52px; }
.mode-body input { position: absolute; left: 18px; top: 21px; accent-color: var(--blue); }
.mode strong { display: block; font-size: 1.02rem; }
.mode span { color: var(--muted); font-size: .9rem; }
.mode.is-active { border-color: var(--blue); background: #F7FAFD; }

/* ---------- Legende ---------- */

.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 4px 0 18px; font-size: .87rem; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block;
            margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.15); }
.legend .l-free     i { background: #fff; border-color: var(--blue); }
.legend .l-selected i { background: var(--gold); border-color: var(--gold-d); }
.legend .l-res      i { background: #F2E4C4; border-color: #D8B76A; }
.legend .l-sold     i { background: #E4E2DD; border-color: #C8C5BE; }

/* ---------- Kartonraster ---------- */

.tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 16px; }
.tools input[type="search"] {
  border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font-size: .95rem;
  min-width: 220px;
}

.cartons { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }

.carton {
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  padding: 8px 9px 10px; transition: .15s;
}
.carton-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .74rem; color: var(--muted); margin-bottom: 6px; letter-spacing: .3px;
}
.carton-head b { color: var(--blue); font-size: .8rem; }
.carton.is-locked { background: #F4F3F0; opacity: .78; }
.carton.is-active { border-color: var(--gold); background: var(--gold); }

.bottles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }

.b {
  appearance: none; border: 1px solid var(--blue); background: #fff; color: var(--blue);
  border-radius: 6px; padding: 5px 0 4px; cursor: pointer;
  font: 600 .72rem/1 inherit; text-align: center; transition: .12s;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.b svg { width: 11px; height: 18px; opacity: .55; }
.b:hover:not([disabled]):not(.sel) { background: #EAF2FA; }
.b.sel { background: var(--gold); border-color: var(--gold-d); color: #3A2A05; }
.b.sel svg { opacity: .85; }
.b[disabled] { cursor: not-allowed; }
.b.st-reserved { background: #F7EDD8; border-color: #D8B76A; color: #7A5A12; }
.b.st-sold     { background: #E9E7E2; border-color: #CFCCC5; color: #918D85;
                 text-decoration: line-through; }
.b.hit { outline: 3px solid var(--blue); outline-offset: 1px; }

/* ---------- Abholung ---------- */

.qty { display: flex; align-items: center; gap: 10px; margin: 8px 0 4px; }
.qty button {
  width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1;
}
.qty output { font-size: 1.4rem; font-weight: 700; min-width: 2.5ch; text-align: center; }
.qty-row { margin: 10px 0 4px; }
.qty-row + .qty-row { margin-top: 16px; }
.qty-title { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 2px; }

/* ---------- Formular ---------- */

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }
.span2 { grid-column: 1 / -1; }
.f-street { grid-template-columns: 3fr 1fr; }

label.field { display: block; }
label.field > span { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
label.field .req { color: var(--bad); }

input[type=text], input[type=email], input[type=tel], textarea, select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,48,91,.12);
}
textarea { min-height: 92px; resize: vertical; }

.err-msg { color: var(--bad); font-size: .84rem; margin-top: 4px; }
.has-err input, .has-err textarea { border-color: var(--bad); }

.pay { display: grid; gap: 10px; }
.pay label {
  border: 2px solid var(--line); border-radius: 9px; padding: 12px 14px 12px 44px;
  position: relative; cursor: pointer;
}
.pay label input { position: absolute; left: 15px; top: 16px; accent-color: var(--blue); }
.pay label.is-active { border-color: var(--blue); background: #F7FAFD; }
.pay small { color: var(--muted); display: block; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; accent-color: var(--blue); }

/* ---------- Summenleiste ---------- */

.summary {
  position: sticky; bottom: 0; z-index: 20;
  background: var(--blue); color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 14px 20px; margin-top: 24px;
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  box-shadow: 0 -6px 24px rgba(0,32,64,.18);
}
.summary .sum-txt { font-size: .93rem; }
.summary .sum-total { font-size: 1.25rem; font-weight: 700; color: var(--gold); }

.btn {
  display: inline-block; border: 0; border-radius: 8px; cursor: pointer;
  background: var(--gold); color: #2B1F04; font: 700 .98rem/1 inherit;
  padding: 14px 24px; transition: .15s; text-decoration: none;
}
.btn:hover { background: #F0BF54; }
.btn[disabled] { background: #8F9AA6; color: #E8ECF0; cursor: not-allowed; }
.btn-ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); }

/* ---------- Hinweise ---------- */

.note {
  border-left: 4px solid var(--gold); background: #FDF7E9;
  padding: 12px 16px; border-radius: 0 8px 8px 0; font-size: .92rem;
}
.note.bad  { border-color: var(--bad); background: #FBEDED; }
.note.good { border-color: var(--ok);  background: #EDF7F0; }

/* ---------- Danke-Seite ---------- */

.pay-box { border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; background: #fff; }
.pay-box dt { color: var(--muted); font-size: .84rem; }
.pay-box dd { margin: 0 0 10px; font-weight: 600; }
.numlist { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.numlist li {
  background: var(--blue); color: #fff; border-radius: 6px;
  padding: 3px 9px; font-size: .82rem; font-weight: 600;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 40px; padding: 26px 0 34px;
  background: var(--blue); color: rgba(255,255,255,.75); font-size: .88rem;
}
.site-footer a { color: var(--gold); text-decoration: none; margin-right: 18px; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Tabellen (Admin) ---------- */

table.data { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
table.data th { background: #F3F1EC; font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; }
table.data tr:hover td { background: #FAFAF7; }

.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: .78rem; font-weight: 600; }
.badge.reserved  { background: #F7EDD8; color: #7A5A12; }
.badge.paid      { background: #E4F2E8; color: #1F6435; }
.badge.shipped   { background: #E2ECF7; color: #1B4A79; }
.badge.cancelled { background: #EFEDEA; color: #7A7770; }

/* ---------- Mobil ---------- */

@media (max-width: 560px) {
  body { font-size: 15px; }
  .wrap { padding: 0 14px; }
  .swoosh-band { height: 110px; }
  .site-header { margin-bottom: 18px; }
  main.wrap { padding-top: 18px; }
  .brand-band { padding: 14px 0 28px; }
  .brand-band .mark { width: 42px; height: 42px; flex-basis: 42px; }
  .brand-band .mark svg { width: 11px; height: 20px; }
  .brand-band h1 { font-size: 1.25rem; }
  .brand-band .claim { font-size: .84rem; }
  .brand-band .lead { font-size: .92rem; margin-top: 14px; }
  .club-logo { height: 150px; width: auto; }
  .story { grid-template-columns: 1fr; gap: 34px; margin-top: 20px; padding-top: 18px; }
  .artist-row { flex-direction: column; align-items: flex-start; }
  .facts { gap: 6px; }
  .facts li { font-size: .78rem; padding: 4px 10px; }

  .card { padding: 16px 15px; margin: 16px 0; }
  h2 { font-size: 1.06rem; }

  .mode-body { padding: 13px 14px 13px 44px; }
  .mode-body input { left: 15px; top: 18px; }

  .cartons { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
  .b { font-size: .66rem; padding: 4px 0 3px; }
  .b svg { width: 9px; height: 14px; }

  .tools input[type="search"] { min-width: 0; flex: 1 1 140px; }

  .summary { padding: 11px 14px; gap: 8px; }
  .summary > div:last-child { display: flex; align-items: center;
                              justify-content: space-between; width: 100%; gap: 12px; }
  .summary .sum-txt { width: 100%; font-size: .85rem; }
  .summary .sum-total { font-size: 1.1rem; }
  .summary .btn { margin-left: 0 !important; padding: 12px 18px; font-size: .9rem; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
