/* ColourCoding Wirtschaftsjunioren Hamburg - zentral anpassbar */
:root {
  --wj-navy: #04304f;        /* dunkles WJ-Blau (Header wj-hamburg.de) */
  --wj-blue: #0f5d8f;
  --wj-lightblue: #58b7e6;   /* helles Akzentblau (BuKo 2026) */
  --wj-bg: #f2f6f9;
  --wj-text: #1c2b36;
  --wj-white: #ffffff;
  --wj-danger: #c0392b;
  --wj-success: #1e8e5a;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(4, 48, 79, .12);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--wj-bg); color: var(--wj-text); }
a { color: var(--wj-blue); text-decoration: none; }

header.site {
  background: var(--wj-navy); color: var(--wj-white);
  padding: 14px 20px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
header.site .logo { font-weight: 800; letter-spacing: .5px; font-size: 1.15rem; color: #fff; }
header.site .logo span { color: var(--wj-lightblue); }
header.site .claim { font-size: .8rem; opacity: .8; }
header.site nav { margin-left: auto; display: flex; gap: 14px; align-items: center; }
header.site nav a { color: #fff; font-size: .95rem; }
header.site nav a.btn { background: var(--wj-lightblue); color: var(--wj-navy); padding: 7px 14px; border-radius: 999px; font-weight: 600; }

.hero { background: linear-gradient(135deg, var(--wj-navy), var(--wj-blue)); color: #fff; padding: 34px 20px; text-align: center; }
.hero h1 { margin: 0 0 8px; font-size: 1.7rem; }
.hero p { margin: 0; opacity: .9; }

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 60px; }

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

.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card .imgwrap { position: relative; aspect-ratio: 4/3; background: #dde7ee; }
.card .imgwrap img.main { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .sponsor {
  position: absolute; right: 8px; bottom: 8px; background: rgba(255,255,255,.95);
  border-radius: 8px; padding: 4px 6px; max-width: 42%; box-shadow: 0 1px 6px rgba(0,0,0,.25);
}
.card .sponsor img { max-height: 34px; max-width: 100%; display: block; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { margin: 0; font-size: 1.05rem; color: var(--wj-navy); }
.card .price { font-size: 1.35rem; font-weight: 800; color: var(--wj-blue); }
.card .price small { font-size: .75rem; font-weight: 400; color: #5b6b77; display: block; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--wj-navy); background: #e6f2fa; border-radius: 8px; padding: 6px 10px; display: inline-block; font-size: .92rem; }
.countdown.ending { background: #fdecea; color: var(--wj-danger); }
.countdown.over { background: #eee; color: #666; }

.btn { display: inline-block; border: 0; cursor: pointer; font-size: 1rem; font-weight: 700; border-radius: 999px; padding: 12px 22px; }
.btn-primary { background: var(--wj-lightblue); color: var(--wj-navy); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-dark { background: var(--wj-navy); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Item-Detail */
.carousel { position: relative; border-radius: var(--radius); overflow: hidden; background: #dde7ee; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.carousel img { width: 100%; height: 100%; object-fit: cover; display: none; }
.carousel img.active { display: block; }
.carousel button.nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(4,48,79,.55); color: #fff; border: 0; font-size: 1.4rem; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; }
.carousel .prev { left: 10px; } .carousel .next { right: 10px; }
.carousel .dots { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; }
.carousel .dots i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.55); margin: 0 3px; cursor: pointer; }
.carousel .dots i.active { background: #fff; }
.carousel .sponsor { position: absolute; right: 12px; bottom: 34px; background: rgba(255,255,255,.95); border-radius: 8px; padding: 5px 8px; }
.carousel .sponsor img { max-height: 44px; display: block; }

.bidbox { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.bidbox .amount { font-size: 2rem; font-weight: 800; color: var(--wj-blue); }
.bidbox .amount small { display: block; font-size: .8rem; font-weight: 400; color: #5b6b77; }
.itemtext { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-top: 18px; }
.itemtext h1 { margin-top: 0; color: var(--wj-navy); }

/* Modal / Payment */
.modal-bg { position: fixed; inset: 0; background: rgba(4,48,79,.55); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); max-width: 460px; width: 100%; padding: 24px; max-height: 92vh; overflow: auto; }
.modal h2 { margin-top: 0; color: var(--wj-navy); }
.modal label { display: block; font-weight: 600; margin: 12px 0 4px; }
.modal input[type=number], .modal input[type=email], .modal input[type=text], .modal input[type=tel] {
  width: 100%; padding: 11px; border: 1.5px solid #c6d4de; border-radius: 8px; font-size: 1rem;
}
.notice { background: #fff7e6; border: 1px solid #f0d48a; border-radius: 8px; padding: 10px 12px; font-size: .88rem; margin: 14px 0; }
.error { color: var(--wj-danger); font-size: .9rem; margin-top: 8px; min-height: 1.2em; }
.success { color: var(--wj-success); font-weight: 600; }
#payment-element { margin: 14px 0; }

/* Forms (Login) */
.authcard { background: #fff; max-width: 430px; margin: 40px auto; border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.authcard h1 { color: var(--wj-navy); margin-top: 0; }
.authcard label { display: block; font-weight: 600; margin: 12px 0 4px; }
.authcard input { width: 100%; padding: 11px; border: 1.5px solid #c6d4de; border-radius: 8px; font-size: 1rem; }
.authcard .btn { width: 100%; margin-top: 18px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tabs button { flex: 1; padding: 10px; border: 0; border-radius: 8px; background: #e6f2fa; color: var(--wj-navy); font-weight: 700; cursor: pointer; }
.tabs button.active { background: var(--wj-navy); color: #fff; }

table.bids { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.bids th, table.bids td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #edf2f6; font-size: .95rem; }
table.bids th { background: var(--wj-navy); color: #fff; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.tag.authorized, .tag.won, .tag.captured { background: #e2f5ec; color: var(--wj-success); }
.tag.outbid, .tag.failed, .tag.superseded { background: #fdecea; color: var(--wj-danger); }
.tag.pending { background: #fff7e6; color: #9c6d00; }

footer.site { background: var(--wj-navy); color: #cfe2ef; text-align: center; padding: 26px 16px; font-size: .85rem; margin-top: 40px; }
footer.site a { color: var(--wj-lightblue); }
@media (max-width: 640px) { .bidbox { flex-direction: column; align-items: stretch; text-align: center; } }
