:root {
  --navy: #0b1f3a;
  --navy-2: #102a4d;
  --blue: #1d6fd8;
  --blue-d: #1558ad;
  --red: #d8232a;
  --ink: #0e1726;
  --paper: #f4f6fa;
  --card: #ffffff;
  --muted: #6b7a90;
  --line: #e2e8f2;
  --ok: #1f9d57;
  --shadow: 0 6px 24px rgba(11, 31, 58, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- Header ---------- */
.site-header {
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.site-header .bar {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
}
.site-header img.logo { width: 46px; height: 46px; }
.site-header .brand { display: flex; flex-direction: column; line-height: 1.1; }
.site-header .brand b { font-size: 19px; letter-spacing: .2px; }
.site-header .brand span { font-size: 12px; color: #9db8df; text-transform: uppercase; letter-spacing: 1.5px; }
.site-header .spacer { flex: 1; }

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 15px;
}
.cart-btn:hover { background: var(--blue-d); }
.cart-btn .count {
  background: var(--red);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1320px;
  margin: 26px auto 6px;
  padding: 0 20px;
}
.hero h1 { margin: 0 0 6px; font-size: 30px; color: var(--navy); }
.hero p { margin: 0; color: var(--muted); }

/* ---------- Grid ---------- */
.grid {
  max-width: 1320px;
  margin: 22px auto 60px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr;     /* Mobil: 1 Artikel */
  gap: 22px;
}
@media (min-width: 600px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px)  { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1240px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.gallery { background: #fff; }
.gallery .main {
  aspect-ratio: 1 / 1;
  width: 100%;
  object-fit: contain;
  background: #fff;
  display: block;
  border-bottom: 1px solid var(--line);
}
.thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
}
.thumbs img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
}
.thumbs img.active { border-color: var(--blue); }

.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.card-body h3 { margin: 2px 0 0; font-size: 18px; color: var(--navy); }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
select, input, textarea {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
select:focus, input:focus, textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.rows-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Optionen immer einspaltig -> Auswahl ist nie abgeschnitten (z. B. Sporttasche/Vereinslogo) */
.opts { display: grid; grid-template-columns: 1fr; gap: 10px; }
.field { min-width: 0; }
select { width: 100%; max-width: 100%; }
.opt-note { color: var(--muted); font-size: 11px; line-height: 1.3; }
.toggle-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toggle-row .radio { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; cursor: pointer; padding: 6px 0; }
.toggle-row .radio input { width: auto; }
.toggle-row .tt-input { flex: 1; min-width: 70px; padding: 7px 9px; }
.toggle-row .tt-input:disabled { background: #eef2f8; color: var(--muted); }
.art-note { margin: 0; font-size: 12px; color: var(--muted); font-style: italic; }

.prod-info { border-top: 1px solid var(--line); padding-top: 8px; }
.prod-info summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: 14px; }
.prod-info .prod-body { font-size: 13px; color: #33425a; margin-top: 8px; }
.prod-info .prod-body p { margin: 6px 0; }
.prod-info .prod-body ul { margin: 6px 0; padding-left: 18px; }
.prod-info .prod-body li { margin: 3px 0; }

.price-row { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.price { font-size: 24px; font-weight: 800; color: var(--navy); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 16px; }
.badge-disc { background: var(--red); color: #fff; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 700; }

.add-btn {
  margin-top: 6px;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.add-btn:hover { background: var(--navy-2); }
.add-btn.added { background: var(--ok); }

/* ---------- Password gate ---------- */
.gate {
  position: fixed;
  inset: 0;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-2) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.gate-box {
  background: #fff;
  border-radius: 18px;
  padding: 34px 30px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.gate-box img { width: 70px; height: 70px; margin-bottom: 8px; }
.gate-box h2 { margin: 6px 0 4px; color: var(--navy); }
.gate-box p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.gate-box input { width: 100%; text-align: center; margin-bottom: 12px; }
.gate-box button {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.gate-box button:hover { background: var(--blue-d); }
.gate-error { color: var(--red); font-size: 14px; min-height: 20px; margin-bottom: 6px; }

/* ---------- Cart page ---------- */
.wrap { max-width: 920px; margin: 26px auto 70px; padding: 0 20px; }
.cart-item {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 14px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.cart-item img { width: 84px; height: 84px; object-fit: contain; background:#fff; border:1px solid var(--line); border-radius: 10px; }
.cart-item .meta b { color: var(--navy); font-size: 16px; }
.cart-item .meta small { display:block; color: var(--muted); margin-top: 3px; }
.cart-item .right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { border: none; background: #eef2f8; width: 30px; height: 30px; font-size: 18px; cursor: pointer; color: var(--navy); }
.qty span { min-width: 34px; text-align: center; font-weight: 700; }
.del { background: none; border: none; color: var(--red); cursor: pointer; font-size: 13px; }

.summary { background:#fff; border:1px solid var(--line); border-radius:14px; padding: 18px; box-shadow: var(--shadow); }
.summary .total { display:flex; justify-content: space-between; font-size: 22px; font-weight: 800; color: var(--navy); margin-top: 6px; }

.form-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding: 18px; box-shadow: var(--shadow); margin: 18px 0; }
.form-card h3 { margin-top: 0; color: var(--navy); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-card textarea { width: 100%; resize: vertical; min-height: 110px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }

.order-btn {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  margin-top: 16px;
}
.order-btn:hover { filter: brightness(1.07); }
.order-btn:disabled { background: var(--muted); cursor: not-allowed; }

.empty { text-align:center; color: var(--muted); padding: 60px 20px; }
.empty a { font-weight: 700; }

.back-link { display:inline-block; margin-bottom: 14px; color: var(--blue); text-decoration: none; font-weight: 600; }

h2.section { color: var(--navy); }

@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 64px 1fr; }
  .cart-item .right { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .cart-item img { width: 64px; height: 64px; }
}
