/* HüPfa Shop – Stylesheet (ohne Build-Schritt).
   Schrift: keine externen Google Fonts (DSGVO). Eigene Schrift → Dateien nach assets/fonts und hier per @font-face einbinden. */

:root {
  --sand: #efece6; --sand-dark: #e2ddd3; --ink: #2d2a26; --muted: #6f6a62;
  --plum: #7d2a55; --plum-dark: #5f1f41; --plum-light: #f4e8ee; --line: #ddd7cc; --white: #fff;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Work Sans", system-ui, -apple-system, Segoe UI, sans-serif; background: var(--sand); color: var(--ink);
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0; }
.container { width: 100%; max-width: 1152px; margin: 0 auto; padding: 0 16px; }
main.container { padding-top: 32px; padding-bottom: 32px; flex: 1; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.xs { font-size: .75rem; }
.strong { font-weight: 600; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-line; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-between { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 20px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } .cards-4 { grid-template-columns: repeat(4, 1fr); } }
.layout-side { display: grid; gap: 32px; }
@media (min-width: 1024px) { .layout-side { grid-template-columns: 1fr 360px; } .layout-side-wide { grid-template-columns: 1fr 400px; } }

/* Buttons & Formulare */
.btn, .btn-outline, .btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px;
  padding: 8px 16px; font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; transition: .15s; border: 1px solid transparent; line-height: 1.4; }
.btn { background: var(--plum); color: #fff; }
.btn:hover { background: var(--plum-dark); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--plum); color: var(--plum); }
.btn-danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 5px 10px; font-size: .75rem; }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; font-size: .8rem; }
.linkbtn:hover { color: #b91c1c; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px;
  font: inherit; font-size: .875rem; color: var(--ink); outline: none; transition: .15s; }
.input:focus { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(125, 42, 85, .15); }
.input-sm { padding: 4px 8px; }
.w-20 { width: 80px; } .w-24 { width: 96px; } .w-auto { width: auto; }
label.field { display: block; }
.label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 4px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: .875rem; }
.check input { margin-top: 3px; }
.link { color: var(--plum); }
.link:hover { text-decoration: underline; }
code { background: var(--sand); padding: 1px 5px; border-radius: 4px; font-size: .85em; }

/* Karten, Hinweise, Badges */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 24px; } .pad-sm { padding: 16px; }
.notice { border: 1px solid; border-radius: 12px; padding: 12px 16px; font-size: .875rem; margin-bottom: 16px; }
.notice-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.notice-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice a { text-decoration: underline; font-weight: 500; }
.badge { display: inline-flex; border-radius: 999px; padding: 2px 10px; font-size: .75rem; font-weight: 500; box-shadow: inset 0 0 0 1px; white-space: nowrap; }
.badge-blue { background: #f0f9ff; color: #075985; box-shadow: inset 0 0 0 1px #bae6fd; }
.badge-amber { background: #fffbeb; color: #92400e; box-shadow: inset 0 0 0 1px #fde68a; }
.badge-violet { background: #f5f3ff; color: #5b21b6; box-shadow: inset 0 0 0 1px #ddd6fe; }
.badge-green { background: #ecfdf5; color: #065f46; box-shadow: inset 0 0 0 1px #a7f3d0; }
.badge-gray { background: #f5f5f4; color: #44403c; box-shadow: inset 0 0 0 1px #e7e5e4; }
.badge-red { background: #fef2f2; color: #b91c1c; box-shadow: inset 0 0 0 1px #fecaca; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 48px 24px; text-align: center; color: var(--muted); }
.page-title { margin-bottom: 24px; }
.page-title .back { display: inline-block; font-size: .875rem; color: var(--muted); margin-bottom: 8px; }
.page-title .back:hover { color: var(--plum); }
.page-title p { color: var(--muted); margin-top: 4px; }

/* Header & Footer */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(239, 236, 230, .95); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.site-header .top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.logo span { color: var(--plum); }
.search { order: 9; width: 100%; }
.search .input { max-width: 380px; }
@media (min-width: 640px) { .search { order: 0; width: auto; flex: 1; } }
.nav { margin-left: auto; display: flex; align-items: center; gap: 16px; font-size: .875rem; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--plum); }
.cart-count { background: rgba(255, 255, 255, .22); border-radius: 999px; padding: 0 8px; font-size: .75rem; }
.catnav { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 12px; font-size: .875rem; }
.catnav a { color: var(--muted); white-space: nowrap; }
.catnav a:hover { color: var(--plum); }
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: rgba(226, 221, 211, .6); }
.site-footer .cols { display: grid; gap: 32px; padding: 40px 16px; font-size: .875rem; }
@media (min-width: 640px) { .site-footer .cols { grid-template-columns: repeat(3, 1fr); } }
.site-footer a { color: var(--muted); display: block; margin-top: 6px; }
.site-footer a:hover { color: var(--plum); }

/* Produktbilder & Karten */
.pimg { object-fit: cover; width: 100%; }
.pimg-ph { display: flex; align-items: center; justify-content: center; }
.pimg-ph span { color: rgba(255, 255, 255, .9); font-size: 1.8rem; font-weight: 600; letter-spacing: .05em; }
.ratio-43 { aspect-ratio: 4 / 3; } .ratio-1 { aspect-ratio: 1; }
.rounded { border-radius: 24px; overflow: hidden; } .rounded-sm { border-radius: 12px; overflow: hidden; }
.thumb { width: 80px; height: 80px; flex-shrink: 0; border-radius: 12px; overflow: hidden; }
.thumb .pimg-ph span, .thumb-sm .pimg-ph span { font-size: .9rem; }
.thumb-sm { width: 56px; height: 56px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.pcard { overflow: hidden; transition: .15s; display: block; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(0, 0, 0, .08); }
.pcard:hover h3 { color: var(--plum); }
.pcard .media { position: relative; }
.pcard .tag { position: absolute; top: 12px; left: 12px; background: var(--plum); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: .75rem; font-weight: 500; }
.pcard .tag-r { left: auto; right: 12px; background: rgba(45, 42, 38, .8); }
.pcard .body { padding: 16px; }
.pcard h3 { font-size: 1rem; font-weight: 600; margin-top: 4px; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.hero { display: grid; gap: 32px; align-items: center; padding: 32px; overflow: hidden; }
@media (min-width: 640px) { .hero { grid-template-columns: 1fr 1fr; padding: 48px; } }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-top: 12px; }
.hero .kicker { font-size: .875rem; font-weight: 500; text-transform: uppercase; letter-spacing: .15em; color: var(--plum); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { aspect-ratio: 1; border-radius: var(--radius); padding: 16px; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; transition: .15s; }
.tile:hover { transform: scale(1.02); }
.tile strong { font-size: 1.1rem; } .tile span { font-size: .75rem; opacity: .85; }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; background: rgba(255, 255, 255, .6); border-radius: var(--radius); padding: 16px; margin-bottom: 24px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: .875rem; cursor: pointer; transition: .15s; }
.pill input:checked + span { border-color: var(--plum); background: var(--plum-light); color: var(--plum); }
.pill input:disabled + span { opacity: .4; cursor: not-allowed; }
.pill span:hover { border-color: var(--plum); }
.price-big { font-size: 1.9rem; font-weight: 600; }
details.card summary { cursor: pointer; font-weight: 600; }
.prose p { margin-bottom: 12px; }
.choice { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: .875rem; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--plum); background: var(--plum-light); }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; text-align: center; font-size: .75rem; }
.steps .bar { height: 6px; border-radius: 999px; background: var(--line); margin-bottom: 4px; }
.steps .on .bar { background: var(--plum); }
.steps li { list-style: none; color: var(--muted); } .steps .on { color: var(--ink); }
.steps { padding: 0; margin: 0; }
.list-divided > * + * { border-top: 1px solid var(--line); }
.totals > div { display: flex; justify-content: space-between; font-size: .875rem; padding: 2px 0; }
.totals .sum { font-size: 1.1rem; font-weight: 600; border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.bubble { max-width: 85%; border-radius: var(--radius); padding: 16px; font-size: .875rem; }
.bubble.me { margin-left: auto; background: var(--plum-light); }
.bubble.shop { background: #fff; border: 1px solid var(--line); }
.bubble.intern { margin-left: auto; background: #fffbeb; border: 1px solid #fde68a; }
.bubble.customer { background: #fff; border: 1px solid var(--line); margin-right: 48px; }
.bubble.reply { margin-left: 48px; background: var(--plum-light); }
.bubble .meta { font-size: .75rem; color: var(--muted); margin-bottom: 4px; }
.msgs { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px; font-weight: 500; }
.table td { padding: 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr:hover td { background: rgba(239, 236, 230, .5); }
.table-min { min-width: 760px; }
.tag-soft { border-radius: 4px; padding: 0 6px; font-size: .75rem; margin-left: 4px; }
.tag-amber { background: #fef3c7; color: #92400e; } .tag-sky { background: #e0f2fe; color: #075985; }

/* Admin */
.admin { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 768px) { .admin { flex-direction: row; } }
.sidebar { background: #fff; border-bottom: 1px solid var(--line); }
@media (min-width: 768px) { .sidebar { width: 224px; flex-shrink: 0; border-bottom: 0; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; } }
.sidebar .brand { padding: 16px; }
.sidebar nav { display: flex; gap: 4px; overflow-x: auto; padding: 0 12px 12px; }
@media (min-width: 768px) { .sidebar nav { flex-direction: column; overflow: visible; } }
.sidebar nav a { display: flex; justify-content: space-between; align-items: center; border-radius: 10px; padding: 8px 12px; font-size: .875rem; white-space: nowrap; }
.sidebar nav a:hover { background: var(--sand-dark); }
.sidebar nav a.active { background: var(--plum); color: #fff; }
.sidebar .count { background: var(--plum); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .75rem; margin-left: 8px; }
.sidebar nav a.active .count { background: rgba(255, 255, 255, .25); }
.admin-main { flex: 1; min-width: 0; padding: 16px; }
@media (min-width: 640px) { .admin-main { padding: 32px; } }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 1024px) { .kpis { grid-template-columns: repeat(5, 1fr); } }
.kpi { padding: 16px; display: block; transition: .15s; }
.kpi:hover { border-color: var(--plum); }
.kpi strong { display: block; font-size: 1.5rem; font-weight: 600; margin-top: 4px; }
.subbox { background: rgba(239, 236, 230, .6); border-radius: 12px; padding: 12px; }
.adding { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; }
.adding summary { color: var(--plum); font-weight: 500; font-size: .875rem; cursor: pointer; }
.grid-form { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; font-size: .75rem; }
.grid-form .full { grid-column: 1 / -1; }
.grid-form .label { font-size: .75rem; font-weight: 400; margin-bottom: 2px; }
.form-2 { display: grid; gap: 16px; }
@media (min-width: 768px) { .form-2 { grid-template-columns: 1fr 1fr; } .form-2 .full { grid-column: 1 / -1; } }
.events { list-style: none; padding: 0; margin: 0; font-size: .875rem; }
.events li { display: flex; gap: 12px; padding: 4px 0; }
.events li.note { background: #fffbeb; border-radius: 8px; padding: 8px; }
.stockform { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-size: .75rem; }
.stockform input { width: 56px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 4px; font: inherit; }
.stockform input.low { border-color: #fcd34d; } .stockform input.zero { border-color: #fca5a5; color: #b91c1c; }
.stockform button { background: none; border: 0; color: var(--plum); cursor: pointer; }
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px; }

/* Druck */
.print { background: #fff; min-height: 100vh; }
.print .sheet { max-width: 768px; margin: 0 auto; padding: 40px; font-size: .875rem; }
.invoice th { border-bottom: 2px solid var(--ink); padding: 8px 0; text-align: left; }
.invoice td { border-bottom: 1px solid var(--line); padding: 8px 0; vertical-align: top; }
.label-box { border: 2px dashed var(--ink); border-radius: var(--radius); padding: 32px; }
@media print { .no-print { display: none !important; } body { background: #fff; } }
.inline { display: inline; }
