:root {
  --bg: #f6f0e6;
  --bg2: #fffaf2;
  --ink: #2a241c;
  --muted: #6e6356;
  --accent: #c45c26;
  --accent2: #2f6b4f;
  --card: #fffdf8;
  --line: #e4d8c6;
  --shadow: 0 8px 24px rgba(42, 36, 28, 0.08);
  --radius: 16px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(circle at 10% 0%, #ffe8c9 0%, transparent 40%),
    radial-gradient(circle at 90% 10%, #d9f0e3 0%, transparent 35%),
    var(--bg);
  color: var(--ink);
  min-height: 100vh;
}
a { color: var(--accent); }
.wrap { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 3rem; }
header.hero {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end;
  justify-content: space-between; margin: 0.5rem 0 1.25rem;
}
.badge {
  display: inline-block; background: #2a241c; color: #ffe8c9;
  font-size: 0.75rem; letter-spacing: 0.04em; padding: 0.25rem 0.6rem;
  border-radius: 999px; text-transform: uppercase;
}
h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0.35rem 0 0.2rem;
  line-height: 1.15;
}
.sub { color: var(--muted); margin: 0; max-width: 36rem; }
.tabs {
  display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.4rem;
  margin-bottom: 1rem; -webkit-overflow-scrolling: touch;
}
.tab {
  border: 1.5px solid var(--line); background: var(--card);
  color: var(--ink); border-radius: 999px; padding: 0.55rem 1rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.tab.active {
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.photo-wrap {
  position: relative; aspect-ratio: 4/3; background: #efe6d8; overflow: hidden;
}
.photo-wrap img {
  width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in;
}
.photo-dots {
  position: absolute; bottom: 0.5rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.3rem;
}
.photo-dots button {
  width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.55);
  padding: 0; cursor: pointer;
}
.photo-dots button.on { background: #fff; }
.card-body { padding: 0.9rem 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card h3 { margin: 0; font-size: 1.1rem; }
.desc { margin: 0; color: var(--muted); font-size: 0.92rem; white-space: pre-wrap; }
.bid-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem;
  background: var(--bg2); border-radius: 12px; padding: 0.55rem 0.7rem;
}
.bid-row .label { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.bid-row .amt { font-size: 1.25rem; font-weight: 700; color: var(--accent2); }
.bid-row .anon { font-size: 0.8rem; color: var(--muted); }
.bid-form { display: grid; gap: 0.45rem; margin-top: auto; }
.min-bid-hint { font-size: 0.8rem; color: var(--muted); margin-top: -0.15rem; }
.bid-form input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 0.55rem 0.7rem; font-size: 1rem; background: #fff;
}
.bid-form button, .btn {
  border: 0; border-radius: 10px; padding: 0.65rem 0.8rem; font-weight: 700;
  background: var(--accent); color: #fff; cursor: pointer; font-size: 0.95rem;
}
.bid-form button:disabled { opacity: 0.55; cursor: not-allowed; }
.msg { font-size: 0.85rem; min-height: 1.1em; }
.msg.ok { color: var(--accent2); }
.msg.err { color: #a32020; }
.empty {
  text-align: center; padding: 3rem 1rem; background: var(--card);
  border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted);
}
.empty h2 { margin: 0 0 0.4rem; color: var(--ink); }
.live {
  font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.lightbox {
  position: fixed; inset: 0; background: rgba(20,16,12,0.88); display: none;
  align-items: center; justify-content: center; z-index: 50; padding: 1rem;
  flex-direction: column; gap: 0.75rem;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(960px, 100%); max-height: 82vh; border-radius: 8px;
  touch-action: pan-y;
}
.lb-close {
  position: absolute; top: 1rem; right: 1rem; background: #fff; border: 0;
  border-radius: 999px; width: 2.4rem; height: 2.4rem; font-size: 1.2rem; cursor: pointer;
  z-index: 2;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.92); border: 0; border-radius: 999px;
  width: 2.6rem; height: 2.6rem; font-size: 1.6rem; line-height: 1; cursor: pointer;
  z-index: 2; color: #2a241c;
}
.lb-prev { left: 0.75rem; }
.lb-next { right: 0.75rem; }
.lb-footer {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.lb-dots { display: flex; gap: 0.35rem; justify-content: center; }
.lb-dot {
  width: 9px; height: 9px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,0.45); padding: 0; cursor: pointer;
}
.lb-dot.on { background: #fff; }
.lb-counter { color: #ffe8c9; font-size: 0.85rem; }
.photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(42,36,28,0.55); color: #fff; border: 0;
  width: 2rem; height: 2rem; border-radius: 999px; font-size: 1.25rem;
  cursor: pointer; z-index: 2; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.photo-nav.prev { left: 0.4rem; }
.photo-nav.next { right: 0.4rem; }
.photo-nav:hover { background: rgba(42,36,28,0.8); }
.photo-dots { z-index: 2; }
.photo-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.55);
  padding: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,0.15);
}
.title-input {
  width: min(100%, 18rem); padding: 0.35rem 0.5rem; border-radius: 8px;
  border: 1px solid var(--line); font-size: 0.95rem; font-weight: 600;
}
.admin-field-label {
  display: block; margin: 0.35rem 0 0.15rem;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted);
}
.description-input {
  display: block; width: min(100%, 22rem); min-height: 4.5rem;
  padding: 0.35rem 0.5rem; border-radius: 8px; resize: vertical;
  border: 1px solid var(--line); font: inherit; line-height: 1.35;
}
.mini-label {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.75rem; color: var(--muted); font-weight: 600;
}
.mini-form input[data-qty] { width: 3.5rem; }
.mini-form input[data-min] { width: 5rem; }
footer.note {
  margin-top: 2rem; color: var(--muted); font-size: 0.85rem; text-align: center;
}
/* Admin */
.admin-bar {
  display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center;
  background: #2a241c; color: #ffe8c9; padding: 0.8rem 1rem; border-radius: 12px;
  margin-bottom: 1rem;
}
.admin-bar input {
  border-radius: 8px; border: 0; padding: 0.45rem 0.6rem; font-size: 1rem;
}
.admin-bar .btn { background: var(--accent); }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f3ebe0; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.phone { font-family: ui-monospace, monospace; }
.mini-form { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.mini-form input { width: 5.5rem; padding: 0.35rem 0.45rem; border-radius: 8px; border: 1px solid var(--line); }
.mini-form button { padding: 0.35rem 0.55rem; font-size: 0.8rem; }

/* Quantity selector (folding chairs etc.) */
.qty-badge {
  margin: 0; font-size: 0.82rem; font-weight: 600; color: var(--accent2);
  background: #e8f5ee; display: inline-block; padding: 0.2rem 0.55rem; border-radius: 999px;
}
.qty-row label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.qty-controls {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
}
.qty-controls input[type="number"] {
  width: 4rem; text-align: center; border: 1.5px solid var(--line);
  border-radius: 10px; padding: 0.45rem 0.35rem; font-size: 1rem; background: #fff;
}
.qty-btn {
  width: 2.1rem; height: 2.1rem; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bg2); font-size: 1.1rem; font-weight: 700; cursor: pointer; color: var(--ink);
}
.qty-btn:hover { background: #efe6d8; }
.qty-hint { font-size: 0.8rem; color: var(--muted); }
.per-unit-note { font-size: 0.8rem; color: var(--muted); }
.qty-total { font-size: 0.9rem; font-weight: 600; color: var(--accent2); min-height: 1.2em; }
.qty-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--accent2);
  background: #e8f5ee; padding: 0.1rem 0.4rem; border-radius: 999px; margin-left: 0.25rem;
}

/* Countdown */
.countdown {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start;
  gap: 0.35rem 0.85rem; margin: 0.25rem 0 0.75rem;
  padding: 0.75rem 1rem; border-radius: 14px;
  background: #2a241c; color: #ffe8c9;
  box-shadow: var(--shadow);
}
.countdown-clock {
  font-size: clamp(1.15rem, 3.5vw, 1.55rem); font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
}
.countdown-caption {
  font-size: 0.92rem; color: #cbb89a; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
  line-height: 1.3;
}
.countdown.ended {
  background: #5a2a2a; color: #ffe8e8;
}
.countdown.ended .countdown-caption { color: #e8b4b4; }
.countdown.ended .countdown-clock { font-size: 1.2rem; }

/* Hero facts */
.hero-facts {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0.55rem 0 0.35rem;
  max-width: 38rem;
}
.fact {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.55rem 0.75rem;
  align-items: baseline;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--muted);
}
.fact-label {
  font-weight: 700;
  color: var(--ink, #2a241c);
  letter-spacing: 0.02em;
}
.fact a {
  color: var(--accent2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.fact a:hover { color: var(--accent); }
.fact-body { color: var(--muted); }

@media (max-width: 520px) {
  .fact {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }
}


/* Sold out (public) */
.card.sold {
  opacity: 0.82; filter: grayscale(0.35);
  border-color: #c9b7a2;
}
.card.sold .photo-wrap::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(42, 36, 28, 0.28); pointer-events: none;
}
.sold-badge {
  position: absolute; top: 0.65rem; left: 0.65rem; z-index: 3;
  background: #a32020; color: #fff; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 0.3rem 0.65rem; border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.sold-msg {
  margin-top: auto; padding: 0.7rem 0.8rem; border-radius: 10px;
  background: #f3e4e0; color: #7a2a2a; font-weight: 600; font-size: 0.92rem;
  text-align: center;
}

/* Admin sold */
.sold-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700; color: #fff;
  background: #a32020; padding: 0.1rem 0.45rem; border-radius: 999px; margin-left: 0.25rem;
}
.sold-btn { background: #a32020 !important; color: #fff !important; border: 0; border-radius: 8px; cursor: pointer; }
.sold-btn.on { background: var(--accent2) !important; }
tr.row-sold { background: #faf0ec; }

/* Admin photo editor */
.photo-edit {
  margin-top: 0.55rem;
  padding-top: 0.45rem;
  border-top: 1px dashed var(--line);
  max-width: 22rem;
}
.photo-edit-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.photo-hint { font-weight: 500; text-transform: none; letter-spacing: 0; }
.photo-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}
.photo-thumb {
  position: relative;
  width: 4.6rem;
  background: #efe6d8;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.photo-thumb.is-main { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
.photo-thumb img {
  display: block;
  width: 100%;
  height: 3.4rem;
  object-fit: cover;
}
.main-badge {
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  background: var(--accent2);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.08rem 0.3rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.photo-thumb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  padding: 0.2rem;
  justify-content: center;
}
.photo-btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.28rem;
  cursor: pointer;
  line-height: 1.1;
  color: var(--ink);
}
.photo-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.photo-btn.danger { color: #a32020; }
.photo-name {
  font-size: 0.58rem;
  color: var(--muted);
  padding: 0 0.2rem 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.photo-empty { font-size: 0.8rem; color: var(--muted); }
.photo-add-row select {
  width: 100%;
  max-width: 20rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}


/* Ask a question (public) */
.ask-details {
  margin-top: 0.55rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.45rem;
}
.ask-summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--accent2);
  list-style: none;
}
.ask-summary::-webkit-details-marker { display: none; }
.ask-summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
}
.ask-details[open] > .ask-summary::before { content: "▾ "; }
.ask-hint {
  margin: 0.35rem 0 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.ask-form {
  display: grid;
  gap: 0.45rem;
}
.ask-form input,
.ask-form textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  resize: vertical;
}
.ask-form button {
  border: 0;
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  font-weight: 700;
  background: var(--accent2);
  color: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}
.ask-form button:disabled { opacity: 0.55; cursor: not-allowed; }

/* Admin questions panel */
.questions-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.questions-head h2 {
  margin: 0;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.q-count {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.q-count:empty { display: none; }
.questions-sub {
  margin: 0.25rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.questions-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 28rem;
  overflow-y: auto;
}
.q-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: var(--bg2);
}
.q-card.answered {
  opacity: 0.72;
  background: #f3f0ea;
}
.q-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.q-item {
  font-weight: 700;
  color: var(--ink);
}
.q-body {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  line-height: 1.4;
  white-space: pre-wrap;
}
.q-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.q-actions button {
  border: 0;
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent2);
  color: #fff;
}
.q-actions button.secondary {
  background: #6e6356;
}
.q-note {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}
.questions-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.4rem 0;
}
