/* MRAA Kleiderbestellung – Design angelehnt an mraa.ch und den Kleiderkatalog */
/* Open Sans selbst gehostet (Latin, SIL OFL 1.1) – keine Anfragen an Google */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/open-sans-400-800.woff2) format('woff2');
}
:root {
  --red: #ff3333;
  --red-dark: #d61f1f;
  --ink: #141414;
  --text: #222;
  --muted: #6b6b7a;
  --line: #e6e6ea;
  --bg: #f6f6f7;
  --card: #fff;
  --accent-text: #55538f; /* Lila-Grau aus dem Katalog */
  --radius: 10px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--red-dark); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Kopfbereich ---------- */
.hero {
  position: relative;
  color: #fff;
  background: #111 url("/img/hero.webp") center 40% / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.7) 100%);
}
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 14px 16px 34px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; }
.brand img { width: 44px; height: 44px; }
.brand span { line-height: 1.2; font-size: 15px; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35);
  color: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.icon-btn:hover { background: rgba(255,255,255,.22); }
.icon-btn svg { width: 18px; height: 18px; }
.badge {
  min-width: 20px; height: 20px; border-radius: 10px; background: var(--red); color: #fff;
  font-size: 12px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}
.hero h1 {
  margin: 34px 0 4px; font-size: clamp(34px, 7vw, 64px); line-height: 1; font-weight: 800; letter-spacing: -.5px;
  text-transform: uppercase;
}
.hero h1 b { color: var(--red); }
.hero p.lead { margin: 6px 0 0; font-size: 17px; opacity: .92; max-width: 640px; }

/* ---------- Hinweis ---------- */
.notice {
  max-width: 1180px; margin: -18px auto 0; position: relative; padding: 0 16px;
}
.notice-box {
  background: #fff; border-left: 5px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap;
}
.notice-box p { margin: 0; flex: 1 1 320px; }
.notice-box .deadline { font-weight: 700; color: var(--red-dark); }
.link-btn { background: none; border: 0; color: var(--red-dark); font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------- Produkte ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 26px 16px 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 22px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 14px;
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  display: flex; flex-direction: column; cursor: pointer; border: 1px solid transparent; transition: box-shadow .15s, transform .15s;
  text-align: left; padding: 0;
}
.card:hover, .card:focus-visible { box-shadow: var(--shadow); transform: translateY(-2px); outline: none; border-color: var(--line); }
.card-img { position: relative; background: #fff; aspect-ratio: 1; border-bottom: 6px solid var(--red); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.price-tag {
  position: absolute; right: 0; bottom: 14px; background: #fff; color: #1d1b4f; font-weight: 600;
  padding: 6px 14px; box-shadow: -2px 2px 8px rgba(0,0,0,.08); font-size: 15px;
}
.new-badge {
  position: absolute; left: 10px; top: 10px; background: var(--ink); color: #fff; font-weight: 800;
  font-size: 12px; letter-spacing: 1px; padding: 3px 8px; border-radius: 3px;
}
.card-body { padding: 12px 14px 16px; border-left: 4px solid var(--red); margin: 12px 0 0 12px; }
.card-body h3 { margin: 0; font-size: 16px; line-height: 1.3; color: var(--ink); }
.card-body .meta { color: var(--accent-text); font-size: 13px; margin-top: 3px; }
.swatches { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #000; }

/* ---------- Dialoge ---------- */
dialog {
  border: 0; padding: 0; border-radius: 14px; width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 24px);
  box-shadow: 0 20px 60px rgba(0,0,0,.35); background: #fff; color: var(--text);
}
dialog::backdrop { background: rgba(10,10,10,.55); }
.dlg-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2;
}
.dlg-head h2 { margin: 0; font-size: 19px; }
.close-btn { border: 0; background: var(--bg); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.dlg-body { padding: 18px; }
.dlg-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: 0; background: #fff; }

.product-detail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; }
.gallery-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.thumbs button { width: 64px; height: 64px; border: 2px solid var(--line); border-radius: 8px; padding: 2px; background: #fff; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--red); }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h3 { margin: 0 0 4px; font-size: 24px; color: var(--ink); line-height: 1.2; }
.pd-price { font-size: 26px; font-weight: 800; color: var(--red-dark); margin: 6px 0 10px; }
.pd-meta { color: var(--accent-text); font-size: 14px; }
.print-note { background: #fff4f4; border-left: 4px solid var(--red); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 14px; }
.print-note > span:first-child { display: inline-block; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; border-radius: 3px; padding: 0 6px; margin-right: 8px; }
.field { margin: 14px 0; }
.field > label, .field > .label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 14px; }
.color-options, .size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.opt {
  border: 2px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 14px;
}
.opt[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); font-weight: 700; }
.opt .swatch-dot { width: 18px; height: 18px; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 40px; height: 40px; border: 0; background: var(--bg); cursor: pointer; font-size: 18px; }
.qty input { width: 52px; text-align: center; border: 0; height: 40px; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 8px; padding: 10px 18px;
  font-weight: 700; cursor: pointer; text-decoration: none; font-size: 15px;
}
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #333; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-small { padding: 6px 10px; font-size: 13px; border-width: 1px; }
.danger { color: #b00020; border-color: #b00020; }

/* ---------- Warenkorb ---------- */
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cart-line .t { font-weight: 700; line-height: 1.25; }
.cart-line .s { color: var(--muted); font-size: 13px; }
.cart-line .r { text-align: right; }
.cart-line .remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; padding: 0; }
.qty.small button { width: 30px; height: 30px; font-size: 16px; }
.qty.small input { width: 36px; height: 30px; }
.total-row { display: flex; justify-content: space-between; font-size: 18px; font-weight: 800; padding: 14px 0 4px; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- Formulare ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date], textarea, select {
  width: 100%; border: 1px solid #cfcfd6; border-radius: 8px; padding: 10px 12px; background: #fff; font-size: 16px;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--red); outline-offset: 0; border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }
.radio-row { display: flex; gap: 18px; flex-wrap: wrap; }
.radio-row label { font-weight: 400; display: inline-flex; gap: 6px; align-items: center; font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.error { color: #b00020; font-weight: 600; margin: 8px 0 0; }
.success { color: #11652d; font-weight: 600; }
.box { background: var(--bg); border-radius: var(--radius); padding: 14px 16px; }
.summary-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.summary-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.summary-table td:last-child { text-align: right; white-space: nowrap; }
pre.order-text {
  white-space: pre-wrap; background: var(--bg); border-radius: 8px; padding: 12px; font-size: 13px;
  max-height: 260px; overflow: auto; font-family: ui-monospace, Consolas, monospace;
}

/* ---------- Konto ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { border-color: var(--red); color: var(--ink); }
.order-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.order-card .oc-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.order-card ul { margin: 8px 0; padding-left: 18px; font-size: 14px; }
.order-card .oc-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Grössentabelle ---------- */
.size-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.size-table th, .size-table td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.size-table th:first-child, .size-table td:first-child { text-align: left; background: var(--bg); font-weight: 700; }
.size-table thead th { background: #d9d9de; }
.table-scroll { overflow-x: auto; }

/* ---------- Fuss ---------- */
footer { background: var(--ink); color: #ddd; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 26px 16px; display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; font-size: 14px; }
footer a { color: #fff; }
footer strong { color: #fff; }
.fenno { font-weight: 800; letter-spacing: .5px; color: #fff; }
.fenno span { color: #1f8be0; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow); z-index: 1000; font-weight: 600; font-size: 14px;
}

@media (max-width: 720px) {
  .product-detail { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { margin: 8px 0 0 8px; padding: 8px 10px 12px; }
  .card-body h3 { font-size: 14px; }
  .price-tag { font-size: 13px; padding: 4px 10px; }
  .brand span { display: none; }
  .icon-btn .lbl { display: none; }
  dialog { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
}
