/* ==========================================================================
   BAIN-BLEU Shop – Frontend
   Farben aus dem bisherigen Auftritt: Nachtblau, Gold, Hellblau
   ========================================================================== */

@font-face { font-family: "Roboto Condensed"; src: url("../fonts/roboto-condensed.woff") format("woff"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Roboto Condensed"; src: url("../fonts/roboto-condensed-italic.woff") format("woff"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("../fonts/crimson-text.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("../fonts/crimson-text-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Crimson Text"; src: url("../fonts/crimson-text-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --night: #050416;
  --night-2: #0a1533;
  --navy: #002e5f;
  --navy-2: #003d7e;
  --sky: #a4dcff;
  --pale: #dbe6fd;
  --paper: #f5f8fe;
  --gold: #e4c055;
  --gold-2: #bfa24b;
  --text: #eef3fb;
  --muted: #a7b5cc;
  --ink: #0d2240;
  --ink-muted: #5a6b85;
  --line: rgba(164, 220, 255, .16);
  --ok: #6f9a35;
  --danger: #c0392b;
  --radius: 13px;
  --radius-sm: 7px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  --font: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --serif: "Crimson Text", Georgia, "Times New Roman", serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font: 400 1.0625rem/1.55 var(--font);
  color: var(--text);
  background-color: var(--night);
  background-image:
    radial-gradient(1100px 620px at 8% -8%, rgba(0, 92, 170, .38), transparent 62%),
    radial-gradient(900px 520px at 105% 6%, rgba(164, 220, 255, .10), transparent 60%),
    linear-gradient(180deg, #071737 0%, var(--night) 70%);
  background-attachment: fixed;
}
body.has-bg {
  background-image:
    linear-gradient(180deg, rgba(5, 4, 22, .55) 0%, rgba(5, 4, 22, .88) 55%, var(--night) 100%),
    url("../img/background.jpg");
  background-size: cover;
  background-position: center top;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sky); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--night); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 10px; top: 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(5, 4, 22, .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; color: #fff; text-decoration: none; }
.brand img { width: 128px; height: auto; }
.brand-text { font-family: var(--serif); font-size: 1.6rem; letter-spacing: .08em; }
.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a { color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: .95rem; }
.header-nav a:hover { background: rgba(164, 220, 255, .1); }
.header-nav .lang { border: 1px solid var(--line); text-transform: uppercase; letter-spacing: .05em; font-size: .85rem; }
.cart-link { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: var(--night) !important; font-weight: 600; }
.cart-link:hover { background: #f0d27a !important; }
.cart-link svg { width: 20px; height: 20px; }
.cart-count { min-width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--night); color: var(--gold); font-size: .78rem; padding: 0 6px; }

/* --- Schritte ----------------------------------------------------------- */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 28px 0 8px; counter-reset: step; flex-wrap: wrap; }
.steps li { flex: 1 1 0; min-width: 120px; counter-increment: step; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.steps li::before { content: counter(step); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 1px solid currentColor; font-size: .82rem; flex: none; }
.steps li.done { color: var(--sky); }
.steps li.done::before { content: "✓"; background: var(--sky); color: var(--night); border-color: var(--sky); }
.steps li.current { color: var(--night); background: var(--gold); border-color: var(--gold); font-weight: 600; }
.steps li.current::before { border-color: var(--night); }

main { flex: 1; padding-bottom: 60px; }

/* --- Meldungen ---------------------------------------------------------- */
.alert { border-radius: var(--radius-sm); padding: 14px 18px; margin: 20px 0; border: 1px solid; }
.alert p:last-child { margin: 0; }
.alert-success { background: rgba(111, 154, 53, .14); border-color: rgba(111, 154, 53, .5); color: #dcefc4; }
.alert-error { background: rgba(192, 57, 43, .16); border-color: rgba(229, 83, 75, .55); color: #ffd7d3; }
.alert-info { background: rgba(228, 192, 85, .12); border-color: rgba(228, 192, 85, .45); color: #f8e7b0; }
.paper .alert-error { background: #fdecea; color: #8a1c13; border-color: #f2b8b2; }
.paper .alert-info { background: #fff7df; color: #6b5310; border-color: #f0dc9c; }

/* --- Hero --------------------------------------------------------------- */
.hero { padding: 54px 0 26px; text-align: center; }
.hero .kicker { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2.4vw, 1.75rem); color: var(--gold); margin-bottom: .2em; }
.hero h1 { margin-bottom: .35em; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto; font-size: 1.12rem; }
.divider { width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); margin: 22px auto 0; }

.tabs { display: flex; justify-content: center; gap: 8px; margin: 26px 0 8px; flex-wrap: wrap; }
.tabs a { padding: 9px 20px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { background: var(--sky); color: var(--night); border-color: var(--sky); font-weight: 600; }
.category-intro { max-width: 760px; margin: 18px auto 0; text-align: center; color: var(--muted); }

/* --- Produktkarten ------------------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; margin-top: 34px; }
.card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 46, 95, .55), rgba(5, 4, 22, .85));
  border: 1px solid var(--line); box-shadow: var(--shadow); scroll-margin-top: 100px;
  transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(228, 192, 85, .45); }
.card-media { aspect-ratio: 16 / 10; background: rgba(0, 0, 0, .25); display: grid; place-items: center; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .placeholder { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 1.6rem; opacity: .7; }
.card-body { padding: 20px 22px 6px; flex: 1; }
.card-title { color: var(--gold); margin: 0 0 4px; font-size: 1.45rem; }
.badge { display: inline-block; font-size: .8rem; letter-spacing: .03em; padding: 2px 10px; border-radius: 999px; background: rgba(164, 220, 255, .14); color: var(--sky); margin-bottom: 8px; }
.card-subtitle { font-style: italic; color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.desc { font-size: .98rem; color: #d5deec; }
.desc ul { padding-left: 1.1em; margin: .4em 0 .8em; }
.desc li { margin: .15em 0; }
.desc li::marker { color: var(--gold); }
.desc p { margin: 0 0 .6em; }
.desc .orange { color: var(--gold); font-weight: 600; }
.desc > .orange { display: block; margin: .2em 0 .3em; }
.card-buy { padding: 16px 22px 22px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-size: 1.45rem; font-weight: 700; color: #fff; white-space: nowrap; }
.price small { display: block; font-size: .78rem; font-weight: 400; color: var(--muted); }
.add-form { display: flex; align-items: center; gap: 8px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: rgba(0, 0, 0, .25); }
.qty button { width: 34px; height: 40px; border: 0; background: transparent; color: var(--text); font-size: 1.2rem; cursor: pointer; }
.qty button:hover { background: rgba(164, 220, 255, .12); }
.qty input { width: 48px; height: 40px; border: 0; background: transparent; color: #fff; text-align: center; font: inherit; -moz-appearance: textfield; }
.qty input.wide { width: 88px; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sold-out { color: #ff9b91; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 22px; border-radius: 999px; border: 1px solid transparent; font: 600 1rem/1.2 var(--font); letter-spacing: .02em; cursor: pointer; text-decoration: none; transition: background .15s, color .15s, border-color .15s; }
.btn-gold { background: var(--gold); color: var(--night); }
.btn-gold:hover { background: #f0d27a; color: var(--night); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--sky); color: #fff; }
.paper .btn-ghost { border-color: #c5d2e8; color: var(--ink); }
.paper .btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-lg { min-height: 54px; padding: 14px 30px; font-size: 1.1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; min-height: 36px; width: 36px; border-radius: 50%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

/* --- Sticky Mini-Warenkorb --------------------------------------------- */
.mini-cart { position: sticky; bottom: 16px; z-index: 30; margin-top: 30px; }
.mini-cart a { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--gold); color: var(--night); text-decoration: none; padding: 14px 22px; border-radius: 999px; font-weight: 600; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .7); }
.mini-cart a:hover { background: #f0d27a; }

/* --- Helle Inhaltsflächen (Warenkorb, Formular, Prüfen) ----------------- */
.paper { background: var(--paper); color: var(--ink); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow); }
.paper a { color: var(--navy-2); }
.paper h1, .paper h2, .paper h3 { color: var(--navy); }
.page-title { margin: 30px 0 18px; }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; margin-top: 22px; }
.layout-2 > aside { position: sticky; top: 100px; }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid #dde5f2; }
.line:first-child { padding-top: 0; }
.line-img { width: 76px; height: 76px; border-radius: 7px; overflow: hidden; background: var(--pale); display: grid; place-items: center; }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line-name { font-weight: 700; color: var(--navy); }
.line-sub { font-style: italic; color: var(--ink-muted); font-size: .92rem; }
.line-info { margin-top: 6px; font-size: .9rem; background: #fff7df; color: #6b5310; border-radius: 5px; padding: 6px 10px; }
.line-meta { font-size: .9rem; color: var(--ink-muted); margin-top: 4px; }
.line-actions { display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.line-total { font-weight: 700; min-width: 100px; text-align: right; color: var(--ink); }
.paper .qty { border-color: #c5d2e8; background: #fff; }
.paper .qty input, .paper .qty button { color: var(--ink); }
.remove-btn { border: 0; background: none; color: var(--ink-muted); cursor: pointer; padding: 6px; border-radius: 50%; display: inline-grid; }
.remove-btn:hover { color: var(--danger); background: #fdecea; }
.remove-btn svg { width: 18px; height: 18px; }

.totals { width: 100%; border-collapse: collapse; font-size: 1rem; }
.totals td { padding: 7px 0; vertical-align: top; }
.totals td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.totals .grand td { border-top: 2px solid var(--navy); padding-top: 12px; font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.totals .note td { font-size: .82rem; color: var(--ink-muted); padding-top: 2px; }
.summary-box h2 { font-size: 1.35rem; }
.summary-actions { display: grid; gap: 10px; margin-top: 18px; }
.hint { font-size: .9rem; color: var(--ink-muted); }
.pay-logos { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.pay-logos span { font-size: .78rem; font-weight: 600; letter-spacing: .04em; border: 1px solid #c5d2e8; color: var(--ink-muted); border-radius: 3px; padding: 3px 8px; background: #fff; }

/* --- Formular ----------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px 18px; }
.field { grid-column: span 6; display: flex; flex-direction: column; gap: 6px; }
.span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; } .span-4 { grid-column: span 4; }
.field label { font-weight: 600; font-size: .95rem; color: var(--navy); }
.field .req { color: var(--danger); }
.field .opt { font-weight: 400; color: var(--ink-muted); font-size: .85rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #c5d2e8;
  border-radius: var(--radius-sm); padding: 11px 13px; min-height: 46px;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--navy-2); outline: 3px solid rgba(0, 61, 126, .18); outline-offset: 0; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); background: #fffafa; }
.field .error { color: var(--danger); font-size: .88rem; }
.field .help { color: var(--ink-muted); font-size: .86rem; }
.counter { align-self: flex-end; font-size: .8rem; color: var(--ink-muted); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid #dde5f2; }
.form-section > h2 { font-size: 1.3rem; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 14px 16px; border-radius: var(--radius-sm); background: #fff; border: 1px solid #c5d2e8; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.check.has-error { border-color: var(--danger); background: #fffafa; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
[hidden] { display: none !important; }

/* --- Prüfen ------------------------------------------------------------- */
.address-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 22px; }
.address-card { background: #fff; border: 1px solid #dde5f2; border-radius: var(--radius-sm); padding: 16px 18px; }
.address-card h3 { font-family: var(--font); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gold-2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.address-card h3 a { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: .85rem; }
.address-card p { margin: 0; }

/* --- Ergebnis ----------------------------------------------------------- */
.result { max-width: 760px; margin: 34px auto 0; }
.result-head { text-align: center; margin-bottom: 22px; }
.result-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; }
.result-icon.ok { background: #e6f2d6; color: var(--ok); }
.result-icon.fail { background: #fdecea; color: var(--danger); }
.result-icon.wait { background: var(--pale); color: var(--navy); }
.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 18px 0; }
.meta-list dt { color: var(--ink-muted); }
.meta-list dd { margin: 0; font-weight: 600; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--pale); border-top-color: var(--navy); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Lieferbedingungen -------------------------------------------------- */
.terms { margin-top: 50px; }
.terms details { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .03); }
.terms summary { cursor: pointer; padding: 18px 22px; font-family: var(--serif); font-size: 1.35rem; color: var(--gold); list-style: none; display: flex; justify-content: space-between; align-items: center; }
.terms summary::-webkit-details-marker { display: none; }
.terms summary::after { content: "+"; font-family: var(--font); color: var(--sky); font-size: 1.5rem; }
.terms details[open] summary::after { content: "–"; }
.terms .terms-body { padding: 0 22px 18px; color: #cdd7e7; font-size: .98rem; }

.closed-box { max-width: 680px; margin: 60px auto; text-align: center; }

/* --- Footer ------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(5, 4, 22, .9); color: var(--muted); font-size: .95rem; padding: 34px 0 26px; text-align: center; }
.site-footer a { color: var(--pale); }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 18px; }
.social { display: flex; justify-content: center; gap: 12px; margin-bottom: 16px; }
.social a { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); color: var(--pale); }
.social a:hover { border-color: var(--gold); color: var(--gold); }
.social svg { width: 18px; height: 18px; }
.footer-small { margin-top: 14px; font-size: .85rem; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 980px) {
  .layout-2 { grid-template-columns: 1fr; }
  .layout-2 > aside { position: static; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .header-inner { min-height: 64px; }
  .brand img { width: 104px; }
  .header-nav .home-link { display: none; }
  .cart-link .cart-label { display: none; }
  .steps li { min-width: 0; padding: 8px; justify-content: center; }
  .steps li span { display: none; }
  .steps li.current span { display: inline; }
  .grid { grid-template-columns: 1fr; gap: 20px; }
  .line { grid-template-columns: 56px minmax(0, 1fr); }
  .line-img { width: 56px; height: 56px; }
  .line-actions { grid-column: 1 / -1; justify-content: space-between; }
  .span-3, .span-2, .span-4 { grid-column: span 6; }
  .form-actions .btn { flex: 1 1 100%; }
  .form-actions { flex-direction: column-reverse; }
}

@media print {
  .site-header, .site-footer, .steps, .no-print, .mini-cart { display: none !important; }
  body { background: #fff; color: #000; }
  .paper { box-shadow: none; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Buttons auf hellen Flächen behalten ihre Farben */
.paper a.btn-primary, .paper a.btn-primary:hover { color: #fff; }
.paper a.btn-gold, .paper a.btn-gold:hover { color: var(--night); }
.address-card p + h3 { margin-top: 14px; }
@media (max-width: 640px) {
  .steps { gap: 4px; }
  .steps li.current { flex: 2.4 1 0; }
}
