/* ============================================================
   shop.css — Operix Webshop · Redesign 2026-07-19 "Modern Boutique"
   Self-hosted · keine externen Abhängigkeiten (CSP-safe)
   Design-Tokens zentral; Mandantenfarbe via --shop-primary/--shop-accent
   ============================================================ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Mandanten-Akzent (aus DB), mit elegantem Fallback */
  --primary: var(--shop-primary, #4f46e5);
  --primary-dark: var(--shop-accent, #4338ca);
  --primary-light: #eef2ff;
  --primary-rgb: 79, 70, 229;

  /* Neutrale — warmes, modernes Grau */
  --ink: #0f1117;
  --text: #1c1e26;
  --text-soft: #4b5563;
  --text-muted: #868b96;
  --line: #ececf1;
  --line-soft: #f3f3f7;
  --bg: #fbfbfd;
  --surface: #ffffff;
  --surface-2: #f7f7fa;

  /* Akzente */
  --price: #111318;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --sale: #e11d48;

  /* Form */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Elevation — weich, mehrschichtig */
  --shadow-xs: 0 1px 2px rgba(16, 18, 30, 0.05);
  --shadow-sm: 0 2px 8px rgba(16, 18, 30, 0.06);
  --shadow: 0 8px 24px -8px rgba(16, 18, 30, 0.14);
  --shadow-lg: 0 24px 50px -18px rgba(16, 18, 30, 0.28);
  --ring: 0 0 0 4px rgba(var(--primary-rgb), 0.14);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.22s;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: rgba(var(--primary-rgb), 0.18); }

/* Subtiler Seiten-Farbverlauf im Hintergrund */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 100% -10%, rgba(var(--primary-rgb), 0.06), transparent 60%),
    radial-gradient(50rem 40rem at -10% 0%, rgba(var(--primary-rgb), 0.05), transparent 55%);
  pointer-events: none;
}

/* ── Container ─────────────────────────────────────────────── */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ── Announcement Bar ──────────────────────────────────────── */
.announce-bar {
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  color: #fff;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 16px;
}
.announce-bar span { opacity: 0.95; }

/* ── Header ────────────────────────────────────────────────── */
.shop-header {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.shop-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 74px;
}

/* Logo */
.shop-logo {
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.shop-logo::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: var(--ring);
}
.shop-logo img { max-height: 42px; width: auto; }
.shop-logo img + * { display: none; }
.shop-logo:has(img)::before { display: none; }

/* Desktop Nav */
.nav-links { display: flex; gap: 6px; list-style: none; }
.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--primary); background: var(--primary-light); }

/* Nav Actions */
.nav-actions { display: flex; gap: 10px; align-items: center; }

/* Cart Button */
.btn-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-cart:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-cart:active { transform: translateY(0); }

.cart-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--sale);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
}

/* Language Selector */
.lang-select { position: relative; }
.lang-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.lang-btn:hover { border-color: var(--primary); box-shadow: var(--shadow-xs); }

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 10px;
  min-width: 170px;
  z-index: 200;
  display: none;
}
.lang-dropdown.open { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.lang-option {
  text-decoration: none;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-option:hover { background: var(--surface-2); color: var(--text); }
.lang-option.active { background: var(--primary-light); color: var(--primary); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 74px; left: 0; right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 12px 16px;
  z-index: 99;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 13px 8px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.95rem;
  font-weight: 600;
}
.mobile-menu a:last-child { border-bottom: none; }

/* ── Flash Messages ────────────────────────────────────────── */
.flash {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash.success { background: var(--success-bg); color: #065f46; border-color: #a7f3d0; }
.flash.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash.info { background: var(--primary-light); color: var(--primary-dark); border-color: rgba(var(--primary-rgb), 0.2); }

/* ── Main ──────────────────────────────────────────────────── */
main.shop-main { min-height: 62vh; padding: 40px 0 56px; }

/* ── Hero ──────────────────────────────────────────────────── */
.shop-hero {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 84px 40px;
  text-align: center;
  margin-bottom: 56px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.shop-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(30rem 20rem at 15% 0%, rgba(255,255,255,0.22), transparent 60%),
    radial-gradient(26rem 20rem at 100% 100%, rgba(0,0,0,0.18), transparent 55%);
  pointer-events: none;
}
.shop-hero > * { position: relative; z-index: 1; }
.shop-hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.14);
}
.shop-hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.94;
  margin: 0 auto 32px;
  max-width: 42ch;
}
.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 32px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* ── Trust-Badges (optional in Templates) ──────────────────── */
.trust-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.trust-item .ti-ico { font-size: 1.5rem; }
.trust-item .ti-t { font-weight: 700; font-size: 0.9rem; }
.trust-item .ti-s { font-size: 0.78rem; color: var(--text-muted); }

/* ── Section Headers ───────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 16px;
}
.section-title {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.section-link {
  font-size: 0.88rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
  transition: gap var(--dur) var(--ease);
}
.section-link:hover { text-decoration: underline; }

/* ── Category Grid ─────────────────────────────────────────── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.category-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.category-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}
.category-card:hover::before { transform: scaleX(1); }
.category-icon {
  font-size: 1.8rem;
  width: 58px; height: 58px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-light);
  border-radius: var(--radius);
}
.category-name { font-weight: 700; font-size: 0.9rem; }

/* ── Product Grid ──────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 24px;
}
.product-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
  border-color: transparent;
}
.product-card > a:first-child {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}
.product-img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-img-placeholder {
  width: 100%;
  height: 230px;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}
.product-info {
  padding: 16px 16px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
  text-decoration: none;
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--dur) var(--ease);
}
.product-title:hover { color: var(--primary); }
.product-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}
.product-price {
  font-weight: 800;
  font-size: 1.22rem;
  color: var(--price);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.product-badge-oos {
  font-size: 0.78rem;
  color: var(--danger);
  font-weight: 700;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px -6px rgba(var(--primary-rgb), 0.6); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(var(--primary-rgb), 0.7); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow-xs); }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }
.btn-full { width: 100%; }

/* Quick-Add (+ Knopf in Karten) rund */
.product-footer .btn-sm {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color var(--dur) var(--ease); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--line); }

/* ── Product Detail ────────────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-images { position: sticky; top: 94px; }
.product-main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}
.product-thumbnails { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-btn {
  width: 70px; height: 70px;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.thumb-btn:hover { transform: translateY(-2px); }
.thumb-btn.active { border-color: var(--primary); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }
.product-name { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 14px; }
.product-price-lg { font-size: 2.1rem; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 8px; color: var(--price); }
.price-note { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 18px; }
.stock-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 0.88rem; font-weight: 600; margin-bottom: 22px; }
.stock-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,0.18); }
.stock-dot.oos { background: var(--danger); box-shadow: 0 0 0 4px rgba(239,68,68,0.16); }

.qty-selector { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-pill); overflow: hidden; width: fit-content; background: var(--surface); }
.qty-btn { background: transparent; border: none; padding: 10px 16px; cursor: pointer; font-size: 1.1rem; font-weight: 700; color: var(--text); transition: background var(--dur) var(--ease); }
.qty-btn:hover { background: var(--surface-2); }
.qty-input { border: none; text-align: center; width: 48px; font-size: 0.95rem; font-weight: 700; padding: 10px 0; outline: none; background: transparent; }

.product-meta { border-top: 1px solid var(--line); padding-top: 18px; display: flex; flex-direction: column; gap: 7px; }
.meta-row { display: flex; gap: 8px; font-size: 0.88rem; }
.meta-label { color: var(--text-muted); min-width: 90px; }

.description-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; margin-top: 36px; box-shadow: var(--shadow-xs); }
.description-box h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 18px; letter-spacing: -0.02em; }
.description-content { color: var(--text-soft); line-height: 1.75; font-size: 0.96rem; }

/* ── Sidebar / Shop-Layout ─────────────────────────────────── */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 32px; align-items: start; }
.shop-sidebar { position: sticky; top: 94px; }
.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: 94px;
}
.sidebar-title { font-weight: 800; font-size: 1rem; margin-bottom: 18px; letter-spacing: -0.02em; }
.sidebar-section { margin-bottom: 22px; }
.sidebar-section:last-child { margin-bottom: 0; }
.sidebar-section-title { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.06em; margin-bottom: 10px; }
.filter-link {
  display: block;
  padding: 7px 12px;
  font-size: 0.88rem;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.filter-link:hover { color: var(--primary); background: var(--primary-light); }
.filter-link.active { color: var(--primary); font-weight: 700; background: var(--primary-light); }
.sort-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  cursor: pointer;
  font-weight: 600;
  transition: border-color var(--dur) var(--ease);
}
.sort-select:focus { border-color: var(--primary); box-shadow: var(--ring); }

/* ── Search ────────────────────────────────────────────────── */
.search-form { display: flex; gap: 10px; margin-bottom: 24px; }
.search-input {
  flex: 1;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  background: var(--surface);
}
.search-input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.search-form .btn { border-radius: var(--radius-pill); }
.results-info { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 22px; font-weight: 500; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 44px; }
.page-link {
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-soft);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.page-current { padding: 10px 18px; font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }

/* ── Cart ──────────────────────────────────────────────────── */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
}
.cart-row { border-bottom: 1px solid var(--line-soft); }
.cart-row td { padding: 18px 0; vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 16px; }
.cart-img { width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); }
.cart-name { font-weight: 700; font-size: 0.92rem; text-decoration: none; color: var(--text); transition: color var(--dur) var(--ease); }
.cart-name:hover { color: var(--primary); }
.cart-sku { font-size: 0.76rem; color: var(--text-muted); margin-top: 3px; }
.cart-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 94px;
}
.summary-row { display: flex; justify-content: space-between; font-size: 0.92rem; padding: 8px 0; color: var(--text-soft); }
.summary-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 10px; letter-spacing: -0.02em; }

/* ── Checkout Form ─────────────────────────────────────────── */
.checkout-form { display: flex; flex-direction: column; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 7px; }
.form-label { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.form-input {
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  background: var(--surface);
  color: var(--text);
  width: 100%;
}
.form-input:focus { border-color: var(--primary); box-shadow: var(--ring); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-textarea { resize: vertical; min-height: 90px; }
.payment-info { background: var(--primary-light); border: 1px solid rgba(var(--primary-rgb), 0.2); border-radius: var(--radius); padding: 18px; }
.payment-info p { font-size: 0.88rem; color: var(--primary-dark); }

/* ── Order Pages ───────────────────────────────────────────── */
.order-page { text-align: center; padding: 72px 20px; }
.order-icon { font-size: 5rem; margin-bottom: 22px; }
.order-page h1 { font-size: 2.1rem; font-weight: 900; letter-spacing: -0.03em; margin-bottom: 14px; }
.order-page p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 32px; }
.order-details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: left;
  max-width: 520px;
  margin: 0 auto 32px;
  box-shadow: var(--shadow-sm);
}

/* ── Footer ────────────────────────────────────────────────── */
.shop-footer { background: var(--ink); color: #cbd0da; margin-top: 72px; }
.shop-footer .container { padding-top: 4px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 18px; color: #fff; letter-spacing: -0.01em; }
.footer-main > div:first-child .footer-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.03em; }
.footer-main p { color: #9ba1ad; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-links a { text-decoration: none; font-size: 0.88rem; color: #9ba1ad; transition: color var(--dur) var(--ease); }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-copy { font-size: 0.8rem; color: #7a808c; }
.footer-lang { display: flex; flex-wrap: wrap; gap: 7px; }
.footer-lang a {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 11px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: #9ba1ad;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.footer-lang a:hover { border-color: transparent; color: #fff; background: rgba(255,255,255,0.1); }
.footer-lang a.active { color: #fff; border-color: transparent; background: var(--primary); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .shop-sidebar, .sidebar-card { position: static; }
  .cart-summary { position: static; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
  .shop-nav { height: 66px; }
  .mobile-menu { top: 66px; }
  .product-detail { grid-template-columns: 1fr; }
  .product-images { position: static; }
  .footer-main { grid-template-columns: 1fr; gap: 30px; padding: 42px 0 32px; }
  .form-row { grid-template-columns: 1fr; }
  .shop-hero { padding: 56px 26px; }
  .cart-table th:nth-child(2), .cart-row td:nth-child(2) { display: none; }
  .product-detail-grid { grid-template-columns: 1fr !important; gap: 28px !important; }
  .info-cards-grid { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 16px; }
  .product-img, .product-img-placeholder { height: 175px; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .btn-cart span:not(.cart-badge) { display: none; }
  .btn-cart { padding: 10px 14px; }
}

/* ── Motion-Preferences ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}


/* ── Startseite: Werkbank-Raster · Katalog statt Karten ── eigene Klassen hp-*, übrige Seiten unverändert */
.hp {
  --hp-paper: #eef1f4; --hp-raster: #dbe2e8; --hp-ink: #111c27; --hp-linie: #c4ced7; --hp-leise: #566472; --hp-flaeche: #ffffff;
  --hp-kopf: "Bahnschrift", "DIN Alternate", "Franklin Gothic Medium", "Arial Narrow", "Roboto Condensed", sans-serif;
  color: var(--hp-ink);
}
.hp a { text-decoration: none; }
.hp :focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.hp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-h { font-family: var(--hp-kopf); font-weight: 600; font-size: 1.7rem; line-height: 1.1; letter-spacing: 0; color: var(--hp-ink); }

/* Einstieg: Rasterpapier */
.hp-hero {
  position: relative; display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center;
  padding: 28px 20px; margin-top: -16px;
  background-color: var(--hp-paper);
  background-image: linear-gradient(var(--hp-raster) 1px, transparent 1px), linear-gradient(90deg, var(--hp-raster) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px;
  border: 1px solid var(--hp-linie); border-top: 6px solid var(--primary);
}
.hp-hero-text h1 { font-family: var(--hp-kopf); font-weight: 700; font-size: clamp(2.4rem, 8vw, 4.6rem); line-height: 1; letter-spacing: -0.01em; color: var(--hp-ink); overflow-wrap: anywhere; }
.hp-lead { margin-top: 14px; font-size: 1.05rem; line-height: 1.5; color: var(--hp-leise); max-width: 32em; }
.hp-suche { display: flex; margin-top: 26px; max-width: 520px; background: var(--hp-flaeche); border: 2px solid var(--hp-ink); }
.hp-suche input { flex: 1; min-width: 0; padding: 14px 14px; border: 0; background: transparent; font: inherit; font-size: 1rem; color: var(--hp-ink); border-radius: 0; }
.hp-suche input:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.hp-suche button { padding: 0 22px; border: 0; background: var(--hp-ink); color: #fff; font: inherit; font-weight: 700; cursor: pointer; border-radius: 0; }
.hp-suche button:hover { background: var(--primary); }
.hp-count { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-top: 16px; font-size: .92rem; }
.hp-count a { color: var(--hp-ink); font-weight: 600; border-bottom: 2px solid var(--primary); padding-bottom: 1px; }
.hp-count a:hover { color: var(--primary); }
.hp-hero-solo { padding: 40px 20px 44px; }

.hp-hero-bilder { display: flex; gap: 10px; aspect-ratio: 4 / 3; }
.hp-hero-bild { flex: 1 1 0; min-width: 0; background: var(--hp-flaeche); border: 1px solid var(--hp-ink); overflow: hidden; }
.hp-hero-bild:first-child { flex-grow: 1.5; }
.hp-hero-bild img { width: 100%; height: 100%; object-fit: contain; padding: 7%; }

/* Angaben */
.hp-infos { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 44px; border: 1px solid var(--hp-linie); border-top: 0; background: var(--hp-flaeche); overflow: hidden; }
.hp-infos li { flex: 1 1 200px; padding: 12px 16px; border-left: 1px solid var(--hp-linie); font-size: .88rem; line-height: 1.35; margin-left: -1px; }
.hp-infos b { display: block; font-weight: 700; color: var(--hp-ink); }
.hp-infos span { color: var(--hp-leise); font-size: .82rem; }
.hp-infos a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.hp-section { margin-bottom: 56px; }
.hp-section > .hp-h { margin-bottom: 18px; }

/* Katalograster: Zellen teilen sich Linien */
.hp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--hp-linie); border-left: 1px solid var(--hp-linie); background: var(--hp-flaeche); }
.hp-card { position: relative; display: flex; flex-direction: column; background: var(--hp-flaeche); border-right: 1px solid var(--hp-linie); border-bottom: 1px solid var(--hp-linie); min-width: 0; }
.hp-card-bild { display: block; aspect-ratio: 1 / 1; background: var(--hp-paper); }
.hp-card-bild img { width: 100%; height: 100%; object-fit: contain; padding: 6%; mix-blend-mode: multiply; }
.hp-leer { display: block; width: 100%; height: 100%; background: var(--hp-paper); }
.hp-card-text { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 14px; flex: 1; }
.hp-card-titel { font-size: .88rem; line-height: 1.35; color: var(--hp-ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.6em; }
.hp-card-titel:hover { color: var(--primary); text-decoration: underline; }
.hp-zeile { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.hp-zeile form { margin: 0; }
.hp-preis { font-family: var(--hp-kopf); font-size: 1.45rem; font-weight: 700; line-height: 1; color: var(--hp-ink); }
.hp-btn { display: inline-block; padding: 8px 14px; border: 2px solid var(--hp-ink); background: transparent; color: var(--hp-ink); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; border-radius: 0; }
.hp-btn:hover, .hp-card:hover .hp-btn { background: var(--hp-ink); color: #fff; }
.hp-klein { font-size: .72rem; line-height: 1.4; color: var(--hp-leise); }
.hp-klein a { color: inherit; text-decoration: underline; }
.hp-frei { color: #0b7a4b; font-weight: 700; }
.hp-alle { align-items: center; justify-content: center; min-height: 140px; background: var(--hp-ink); color: #fff; font-family: var(--hp-kopf); font-size: 1.3rem; font-weight: 600; text-align: center; padding: 16px; }
.hp-alle:hover { background: var(--primary); }
.hp-nichts { text-align: center; padding: 56px 16px; color: var(--hp-leise); border: 1px dashed var(--hp-linie); }

/* Kategorien als Register */
.hp-kat-liste { list-style: none; display: grid; grid-template-columns: 1fr; border-top: 2px solid var(--hp-ink); }
.hp-kat { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--hp-linie); color: var(--hp-ink); }
.hp-kat:hover { background: var(--hp-paper); }
.hp-kat:hover .hp-kat-name { color: var(--primary); }
.hp-kat-bild { display: block; width: 52px; height: 52px; background: var(--hp-paper); }
.hp-kat-bild img { width: 100%; height: 100%; object-fit: cover; }
.hp-kat-name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.hp-kat-zahl { font-family: var(--hp-kopf); font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--hp-leise); padding-right: 6px; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.hp-chip { padding: 6px 12px; border: 1px solid var(--hp-linie); background: var(--hp-flaeche); font-size: .84rem; color: var(--hp-ink); }
.hp-chip span { color: var(--hp-leise); margin-left: 4px; }
.hp-chip:hover { border-color: var(--primary); color: var(--primary); }

.hp-about { display: grid; grid-template-columns: 1fr; gap: 14px; border-top: 2px solid var(--hp-ink); padding-top: 18px; }
.hp-about > .hp-h { margin: 0; }
.hp-about p { color: var(--hp-leise); white-space: pre-line; max-width: 62ch; }
.hp-kontakt { margin-top: 14px; }
.hp-kontakt a { color: var(--hp-ink); border-bottom: 2px solid var(--primary); }

@media (min-width: 640px) {
  .hp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-card-text { padding: 14px 16px 16px; }
  .hp-kat-liste { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .hp-hero { padding: 36px 32px; }
}
@media (min-width: 960px) {
  .hp-hero { grid-template-columns: 1.05fr 1fr; gap: 48px; padding: 52px 48px; }
  .hp-hero-solo { grid-template-columns: 1fr; padding: 72px 48px 76px; }
  .hp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hp-card-gross { grid-column: span 2; grid-row: span 2; }
  .hp-card-gross .hp-card-text { flex: none; }
  .hp-card-gross .hp-card-bild { flex: 1; aspect-ratio: auto; min-height: 0; }
  .hp-card-gross .hp-card-titel { font-size: 1.15rem; -webkit-line-clamp: 2; min-height: 0; }
  .hp-card-gross .hp-preis { font-size: 2rem; }
  .hp-kat-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hp-about { grid-template-columns: 1fr 2fr; gap: 48px; }
}
