/* PartyPär public — dark, pink, mobile-first. Same palette family as admin
   but its own identity: bigger type, card grid built around the 560×360
   transparent-PNG image contract (SPEC §7). */
:root {
  --bg: #16121a;
  --panel: #201a27;
  --panel-2: #2a2233;
  --text: #f2ecf6;
  --muted: #9c8fa8;
  --pink: #ff5ca8;
  --pink-dim: #b53f78;
  --ok: #5cd08a;
  --warn: #ffb454;
  --danger: #ff6b6b;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--pink); text-decoration: none; }
.pink { color: var(--pink); }

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.2rem;
  background: var(--panel);
  border-bottom: 2px solid var(--pink-dim);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-weight: 800; font-size: 1.25rem; color: var(--text); }
.brand span { color: var(--pink); }
.topbar nav { display: flex; gap: .4rem; margin-left: auto; }
.topbar nav a {
  padding: .35rem .8rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 600;
}
.topbar nav a:hover { background: var(--panel-2); color: var(--pink); }

/* The sticky topbar must not cover a field the browser scrolls to
   (native validation focuses the first invalid input). */
input, select, textarea { scroll-margin-top: 5rem; }

main { padding: 1rem 1.2rem 3rem; max-width: 1100px; margin: 0 auto; }

.hero { text-align: center; padding: 2.5rem 0 1.5rem; }
.hero h1 { font-size: 2.6rem; margin: 0; font-weight: 800; }
.hero h1 span { color: var(--pink); }
.hero .tagline { color: var(--muted); font-size: 1.15rem; margin: .5rem 0 0; }

/* ------------------------------------------------------------- date bar */
.datebar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: center;
  background: var(--panel);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 0 auto 1rem;
  max-width: 700px;
}
.datebar-label { font-weight: 700; color: var(--pink); }
.datebar .dash { color: var(--muted); }
.datebar input[type="date"] {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #3a3044;
  border-radius: var(--radius);
  padding: .45rem .6rem;
  font-size: 1rem;
  color-scheme: dark;
}
.datebar button {
  background: var(--pink);
  color: #1c0f18;
  border: 0;
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.datebar .clear { color: var(--muted); font-size: .9rem; }
.date-hint { text-align: center; color: var(--danger); margin: 0 0 1rem; }
.date-hint.ok { color: var(--muted); }

/* ---------------------------------------------------------------- cards */
h2 { font-size: 1.3rem; margin: 1.6rem 0 .8rem; color: var(--pink); }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  display: block;
  background: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: transform .1s ease;
}
a.card:hover { transform: translateY(-2px); background: var(--panel-2); }
.card .img {
  aspect-ratio: 560 / 360;
  background: radial-gradient(ellipse at center, #2a2233 0%, #201a27 75%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .img img { width: 100%; height: 100%; object-fit: contain; }
.card .noimg { font-size: 3rem; opacity: .5; }
.card-body { padding: .7rem .9rem .9rem; }
.card h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.card-meta { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.price { font-weight: 700; color: var(--text); }
.price small { color: var(--muted); font-weight: 400; }
.badge {
  font-size: .8rem;
  font-weight: 700;
  padding: .1rem .55rem;
  border-radius: 99px;
}
.badge.free { background: rgba(92, 208, 138, .15); color: var(--ok); }
.badge.taken { background: rgba(255, 107, 107, .15); color: var(--danger); }

.empty { color: var(--muted); text-align: center; padding: 2rem 0; }

/* ------------------------------------------------------------- item page */
.crumbs { margin: .6rem 0 1rem; }
.item-top {
  display: grid;
  grid-template-columns: minmax(260px, 560px) 1fr;
  gap: 1.4rem;
  align-items: start;
}
@media (max-width: 700px) { .item-top { grid-template-columns: 1fr; } }
.item-img {
  aspect-ratio: 560 / 360;
  background: radial-gradient(ellipse at center, #2a2233 0%, #201a27 75%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-img img { width: 100%; height: 100%; object-fit: contain; }
.item-img .noimg { font-size: 5rem; opacity: .5; }
.item-info h1 { margin: 0 0 .2rem; font-size: 1.8rem; }
.item-price { font-size: 1.3rem; margin: .6rem 0 .2rem; }
.item-price strong { color: var(--pink); }
.item-desc { white-space: pre-line; }
.small { font-size: .85rem; }
.btn {
  display: inline-block;
  background: var(--pink);
  color: #1c0f18;
  border-radius: var(--radius);
  padding: .5rem 1rem;
  font-weight: 700;
}

/* -------------------------------------------------------------- calendar */
.calendar-section { margin-top: 2rem; }
.cal-months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.cal-month h3 { margin: 0 0 .4rem; font-size: 1rem; color: var(--muted); text-transform: capitalize; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-head { font-size: .7rem; color: var(--muted); text-align: center; }
.cal-day {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: .85rem;
  background: var(--panel);
}
.cal-day.past { color: #554a60; }
.cal-day.free { background: rgba(92, 208, 138, .16); color: var(--ok); cursor: pointer; }
.cal-day.free:hover { background: rgba(92, 208, 138, .35); }
.cal-day.full { background: rgba(255, 107, 107, .16); color: var(--danger); }
.cal-day small {
  position: absolute;
  bottom: 1px;
  right: 3px;
  font-size: .6rem;
  opacity: .8;
}
.legend { color: var(--muted); font-size: .9rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.dot { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }
.dot.free { background: rgba(92, 208, 138, .5); }
.dot.full { background: rgba(255, 107, 107, .5); }

/* -------------------------------------------------------------- checkout */
.page-title { font-size: 1.8rem; margin: .8rem 0 1rem; }
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.panel h2 { margin: 0 0 .7rem; font-size: 1.1rem; }
.panel label { display: block; margin: .6rem 0; font-weight: 600; }
.panel input[type="text"], .panel input[type="tel"], .panel input[type="email"],
.panel input[type="date"], .panel input[type="number"], .panel textarea {
  display: block;
  width: 100%;
  max-width: 420px;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #3a3044;
  border-radius: var(--radius);
  padding: .5rem .7rem;
  font-size: 1rem;
  margin-top: .25rem;
  color-scheme: dark;
}
.panel .radio { font-weight: 400; }
.panel .radio input { margin-right: .4rem; }
.date-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.quote { font-weight: 700; color: var(--pink); }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-list li {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--panel-2);
}
.cart-list li:last-child { border-bottom: 0; }
.cart-list .item-status { margin-left: auto; font-size: .85rem; color: var(--ok); }
.cart-list .item-status.bad { color: var(--danger); }
.cart-list .remove {
  background: none;
  color: var(--muted);
  padding: .1rem .4rem;
  font-size: 1rem;
}
button.big, .btn.big {
  background: var(--pink);
  color: #1c0f18;
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  font-size: 1.1rem;
  padding: .7rem 1.6rem;
}
.add-to-cart { margin-top: 1rem; }
.add-to-cart input[type="number"] {
  width: 5rem;
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid #3a3044;
  border-radius: var(--radius);
  padding: .4rem .5rem;
  margin: .25rem 0 .6rem;
}
.add-to-cart button {
  background: var(--pink);
  color: #1c0f18;
  border: 0;
  border-radius: var(--radius);
  padding: .6rem 1.3rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.added-note { color: var(--ok); font-weight: 600; }
/* honeypot: visually gone, still in the DOM for bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { text-align: center; padding: 2rem; }
button:disabled { opacity: .5; cursor: default; }

/* ------------------------------------------------------------ magic page */
.status-line .badge { font-size: 1rem; padding: .25rem .9rem; }
.badge.status-pending { background: rgba(255, 180, 84, .18); color: var(--warn); }
.badge.status-confirmed, .badge.status-active { background: rgba(92, 208, 138, .15); color: var(--ok); }
.badge.status-returned, .badge.status-closed { background: var(--panel-2); color: var(--muted); }
.badge.status-declined, .badge.status-cancelled { background: rgba(255, 107, 107, .15); color: var(--danger); }
.paid { color: var(--ok); font-weight: 700; }
button.danger {
  background: var(--danger);
  color: #1c0f18;
  border: 0;
  border-radius: var(--radius);
  padding: .55rem 1.2rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}

/* ----------------------------------------------------------------- media */
.media-section { margin-top: 2rem; }
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery img { width: 100%; border-radius: var(--radius); }
.gallery .video { aspect-ratio: 16 / 9; }
.gallery iframe { width: 100%; height: 100%; border: 0; border-radius: var(--radius); }

footer {
  border-top: 1px solid var(--panel-2);
  color: var(--muted);
  text-align: center;
  padding: 1.2rem;
  font-size: .9rem;
}
