/* PETKO Photography – Fotoverkauf (gleiche Farben/Schrift wie petkophoto.at und die Kundengalerie) */
@font-face {
  font-family: "Manrope"; src: url("manrope-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope"; src: url("manrope-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #111214; --surface: #1d1e22; --surface-2: #26272c; --line: #2e3035; --line-strong: #4a4c52;
  --text: #ececec; --text-soft: #b9b9bd; --muted: #8e8f95;
  --accent: #009ee2; --accent-hover: #2fb4ec; --on-accent: #06141c; --error: #ff8a80; --ok: #4cc38a;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f6f6f7; --surface: #ffffff; --surface-2: #e6e6e9; --line: #d9d9de; --line-strong: #a9aab1;
  --text: #141416; --text-soft: #45464c; --muted: #6a6b72; --error: #b3261e; --ok: #1d7a4f;
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f6f7; --surface: #ffffff; --surface-2: #e6e6e9; --line: #d9d9de; --line-strong: #a9aab1;
    --text: #141416; --text-soft: #45464c; --muted: #6a6b72; --error: #b3261e; --ok: #1d7a4f;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 400 1rem/1.55 var(--font);
}
a { color: inherit; }
h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .6rem; font-weight: 700; }
h2 { font-size: 1.25rem; margin: 0; font-weight: 700; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* Kopf / Fuß */
.s-header { display: flex; align-items: center; justify-content: space-between; padding: .9rem var(--gutter); }
.logo { display: inline-block; }
.logo img { width: 74px; height: auto; display: block; }
.logo-light { display: none !important; }
:root[data-theme="light"] .logo-dark { display: none !important; }
:root[data-theme="light"] .logo-light { display: block !important; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo-dark { display: none !important; }
  :root:not([data-theme="dark"]) .logo-light { display: block !important; }
}
.s-sprachen { display: flex; gap: .2rem; font-size: .85rem; font-weight: 700; }
.s-sprachen a, .s-sprachen b { padding: .45rem .55rem; border-radius: 8px; text-decoration: none; }
.s-sprachen a { color: var(--muted); }
.s-sprachen a:hover { color: var(--text); background: var(--surface); }
.s-sprachen b { color: var(--text); }
.s-footer {
  margin-top: auto; padding: 2rem var(--gutter); display: flex; flex-wrap: wrap; gap: .5rem 2rem;
  justify-content: space-between; color: var(--muted); font-size: .85rem;
}
.s-footer p { margin: 0; }
.s-footer a { text-decoration: none; color: var(--text-soft); }
.s-footer a:hover { color: var(--accent); }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  font: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none;
  transition: background-color .2s, opacity .2s;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--text-soft); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1.02rem; }
.btn svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.s-link { font: inherit; font-weight: 700; font-size: .92rem; color: var(--accent); background: none; border: 0; padding: .4rem 0; cursor: pointer; }

/* Einfache Seiten (Start, 404, Login, Testzahlung) */
.s-mitte .s-box { flex: 1; width: 100%; max-width: 30rem; margin: 0 auto; padding: 2.5rem var(--gutter) 4rem; display: flex; flex-direction: column; justify-content: center; }
.s-lead { color: var(--text-soft); font-size: 1.05rem; margin: 0 0 1.4rem; }
.s-eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; font-weight: 700; color: var(--accent); margin: 0 0 .6rem; }
.s-form { display: grid; gap: .8rem; }
.s-form label { display: grid; gap: .35rem; color: var(--text-soft); font-size: .92rem; }
.s-form input[type="email"], .s-form input[type="password"] {
  font: inherit; font-size: 1.05rem; padding: .85rem 1.1rem; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
.s-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.s-fehler { color: var(--error); font-weight: 600; margin: 0; }
.s-summe { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1rem 0; margin: 0 0 .5rem; border-block: 1px solid var(--line); font-size: 1.05rem; }
.s-summe b { font-size: 1.35rem; }

/* Kundenseite */
.s-testband { margin: 0; padding: .45rem var(--gutter); background: #ffcc4d; color: #2a2000; font-size: .8rem; font-weight: 700; text-align: center; }
.s-kopf { padding: .5rem var(--gutter) 1.25rem; max-width: 1400px; width: 100%; margin: 0 auto; }
.s-kopf .s-lead { max-width: 40rem; margin-bottom: 0; }
.s-hinweis { margin: 0 0 1rem; padding: .85rem 1.1rem; border-radius: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); }
.s-hinweis-danke { border-color: var(--ok); color: var(--ok); }
.s-warten { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.5rem; padding: 1.4rem 1.25rem; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.s-warten b { font-size: 1.1rem; }
.s-warten p { margin: .25rem 0 0; color: var(--text-soft); font-size: .95rem; }
.s-puls { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); animation: puls 1.6s ease-in-out infinite; }
@keyframes puls { 0%, 100% { transform: scale(.7); opacity: .5; } 50% { transform: scale(1.15); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .s-puls { animation: none; } }

.s-gekauft, .s-angebot { max-width: 1400px; width: 100%; margin: 0 auto; padding: 0 var(--gutter); }
.s-gekauft { margin-bottom: 2rem; }
.s-gekauft-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .9rem 1.5rem; margin-bottom: .6rem; }
.s-gk-zahl { color: var(--muted); font-weight: 600; }
.s-gekauft-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem .8rem; }
.s-rechnungen { display: contents; }
.s-tipp { color: var(--muted); font-size: .86rem; margin: .5rem 0 .9rem; }
.s-werkzeug { display: flex; justify-content: flex-end; margin-bottom: .3rem; }
.s-gueltig { color: var(--muted); font-size: .85rem; text-align: center; padding: 1.5rem var(--gutter) 0; margin: 0; }

/* Raster: 2 Spalten am Handy, mehr auf größeren Schirmen */
.s-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
@media (min-width: 700px) { .s-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; } }
.s-item { position: relative; aspect-ratio: 4 / 5; background: var(--surface); border-radius: 8px; overflow: hidden; }
.s-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; transition: opacity .2s, transform .2s; }
.s-item.neu { animation: rein .5s ease-out; }
@keyframes rein { from { opacity: 0; transform: scale(.94); } }
.s-wahl {
  position: absolute; top: 0; right: 0; width: 56px; height: 56px; border: 0; padding: 0; background: none; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: flex-end; -webkit-tap-highlight-color: transparent;
}
.s-wahl span {
  margin: .5rem; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: rgba(0, 0, 0, .3);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); transition: background-color .15s, transform .15s;
}
.s-wahl svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.s-item.an .s-wahl span { background: var(--accent); border-color: var(--accent); transform: scale(1.06); }
.s-item.an .s-wahl svg { opacity: 1; }
.s-item.an { outline: 3px solid var(--accent); outline-offset: -3px; }
.s-badge {
  position: absolute; left: .5rem; bottom: .5rem; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700;
  background: rgba(0, 0, 0, .6); color: #fff;
}

/* Leiste unten: Auswahl + Kaufen */
.s-kunde { padding-bottom: 6.5rem; }
.s-leiste {
  position: fixed; z-index: 50; left: .75rem; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
  max-width: 34rem; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .6rem .6rem 1.25rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.s-leiste-text { display: flex; flex-direction: column; line-height: 1.25; }
.s-anzahl { font-size: 1rem; }
.s-betrag { color: var(--text-soft); font-size: .92rem; font-weight: 600; }
.s-leiste .btn { padding-inline: 2rem; }

/* Bezahl-Dialog */
.s-dialog {
  width: min(30rem, calc(100vw - 1.5rem)); border: 1px solid var(--line); border-radius: 20px; padding: 1.5rem;
  background: var(--bg); color: var(--text);
}
.s-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.s-dialog h2 { margin-bottom: .25rem; }
.s-check { display: flex !important; grid-template-columns: none; gap: .75rem !important; align-items: flex-start; font-size: .9rem; color: var(--text) !important; cursor: pointer; }
.s-check input { width: 22px; height: 22px; flex: none; margin: .1rem 0 0; accent-color: var(--accent); }
.s-dialog .s-tipp { text-align: center; margin: 0; }

/* Großansicht */
.lb { position: fixed; inset: 0; z-index: 100; background: #0b0b0c; display: flex; align-items: center; justify-content: center; touch-action: pan-y pinch-zoom; }
.lb-img { max-width: calc(100vw - 2rem); max-height: calc(100dvh - 8rem); object-fit: contain; display: block; user-select: none; -webkit-user-select: none; }
.lb-btn {
  position: absolute; width: 52px; height: 52px; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .08); color: #fff; font: 300 2rem/1 var(--font);
  display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover { background: rgba(255, 255, 255, .18); }
.lb-close { top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; justify-content: space-between; color: #b9b9bd; font-size: .9rem;
}
.lb-bar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.lb-bar .btn.an { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (max-width: 700px) {
  .lb-prev, .lb-next { display: none; }
  .lb-img { max-width: 100vw; }
}

/* Hell/Dunkel-Schalter */
.theme-toggle {
  position: fixed; z-index: 40;
  left: calc(1rem + env(safe-area-inset-left, 0px)); bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); color: var(--text); border: 1px solid var(--line);
  opacity: .85; transition: border-color .2s, opacity .2s;
}
.theme-toggle:hover { opacity: 1; border-color: var(--line-strong); }
.theme-toggle svg { width: 19px; height: 19px; }
.theme-toggle .icon-sun { display: none; }
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
}
.s-kunde .theme-toggle { display: none; }   /* Kundenseite: unten ist die Kaufleiste – Gerät entscheidet */
@media (min-width: 701px) { .s-footer { padding-left: calc(1rem + 40px + 1.25rem); } }
@media (max-width: 700px) {
  .theme-toggle { width: 36px; height: 36px; left: calc(.6rem + env(safe-area-inset-left, 0px)); bottom: calc(.6rem + env(safe-area-inset-bottom, 0px)); }
  .s-mitte .s-footer { padding-left: calc(.6rem + 36px + .9rem); }
}

/* =========================================================== iPad-Kasse */
.k-kasse { --gutter: 1.25rem; user-select: none; -webkit-user-select: none; }
.k-kasse .s-header { padding-block: .6rem; }
.k-kasse .theme-toggle { display: none; }
.k-app { flex: 1; display: flex; flex-direction: column; padding: 0 var(--gutter) var(--gutter); gap: 1rem; }
.k-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.k-leiste .k-platz { flex: 1; }
.k-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 700; }
.k-pill i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.k-pill.k-warn { border-color: var(--error); color: var(--error); }
.k-pill.k-warn i { background: var(--error); }
.k-pill.k-test { background: #ffcc4d; color: #2a2000; border-color: #ffcc4d; }
.k-haupt { flex: 1; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 1.25rem; min-height: 0; }
@media (max-width: 900px) and (orientation: portrait) { .k-haupt { grid-template-columns: 1fr; } }
.k-karte { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.25rem; }
.k-links { display: flex; flex-direction: column; gap: 1rem; }
.k-qr { background: #fff; border-radius: 14px; padding: 14px; display: flex; align-items: center; justify-content: center; }
.k-qr svg { width: 100%; height: auto; display: block; }
.k-url { font-size: .82rem; color: var(--muted); word-break: break-all; text-align: center; margin: .2rem 0 0; }
.k-kunde-info { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.k-kunde-info b { font-size: 1.15rem; }
.k-kunde-info span { color: var(--muted); font-size: .9rem; }
.k-knoepfe { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.k-knoepfe .btn { width: 100%; }
.k-gross { width: 100%; padding: 1.4rem; font-size: 1.25rem; border-radius: 18px; }
.k-leer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem; text-align: center; color: var(--text-soft); }
.k-leer .k-gross { max-width: 26rem; }
.k-rechts { display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.k-fotos { flex: 1; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start; overflow-y: auto; min-height: 220px; }
.k-fotos .s-item { aspect-ratio: 3 / 4; }
.k-fotos .s-item.aus img { opacity: .25; }
.k-aus {
  position: absolute; left: .4rem; top: .4rem; height: 34px; padding: 0 .7rem; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(0, 0, 0, .55); color: #fff; font: 700 .75rem var(--font);
}
.k-fotos .s-item.aus .k-aus { background: var(--error); color: #2a0000; }
.k-hinweis-leer { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 3rem 1rem; }
.k-summe { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 1.25rem; }
.k-summe b { font-size: 1.3rem; }
.k-summe .k-bezahlt { color: var(--ok); font-weight: 700; }
.k-letzte h2 { font-size: 1rem; margin-bottom: .6rem; }
.k-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; }
.k-liste button {
  display: flex; justify-content: space-between; gap: .6rem; text-align: left; padding: .7rem .9rem; border-radius: 12px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); font: inherit; font-size: .88rem;
}
.k-liste button.ist-aktiv { border-color: var(--accent); }
.k-liste small { color: var(--muted); }
.k-liste .k-geld { color: var(--ok); font-weight: 700; }
.k-meldung { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 90; padding: .8rem 1.3rem; border-radius: 12px; background: var(--error); color: #2a0000; font-weight: 700; }

/* AGB und andere Textseiten */
.s-text { width: 100%; max-width: 44rem; margin: 0 auto; padding: 1rem var(--gutter) 3rem; }
.s-text h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
.s-text p { color: var(--text-soft); margin: 0 0 1rem; }
.s-text a { color: var(--accent); }
.s-check a { color: var(--accent); }
.s-band-box { border-radius: 12px; margin: 0 0 .25rem; padding: .7rem 1rem; text-align: left; }
/* Demo: auffälliger Warnkasten (Testzahlung) */
.s-warnung { margin: 0 0 1.75rem; padding: 1.2rem 1.25rem; border-radius: 16px; background: #ffcc4d; color: #2a2000; border: 3px solid #e0a800; }
.s-warnung p { margin: 0 0 .5rem; }
.s-warnung p:last-child { margin: 0; }
.s-warnung-titel { font-size: 1.3rem; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.s-warnung b { font-size: 1.05rem; }
