:root {
  /* CI aus Briefbogen / Beleg-Designer */
  --s-oliv: #6B7A3F;
  --s-gold: #C9A961;
  --s-dark: #1A1A1A;
  --s-beige: #F5EFE0;
  --s-champ: #FAF6EC;
  --s-bg: var(--s-beige);
  --s-card: #fff;
  --s-text: var(--s-dark);
  --s-muted: #6b7280;
  --s-border: #e5e0d4;
  --s-font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --s-font-body: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
body.store {
  margin: 0;
  font-family: var(--s-font-body);
  background: var(--s-bg);
  color: var(--s-text);
  line-height: 1.45;
}
.store h1, .store-hero h1, .kat-heading, .artikel-info h1, .store-brand-text strong {
  font-family: var(--s-font-serif);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--s-dark);
}
.store-top {
  background: #fff;
  color: var(--s-text);
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2.5px solid var(--s-gold);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.store-top a { color: var(--s-oliv); text-decoration: none; }
.store-top a:hover { color: #4a5630; text-decoration: underline; }
.store-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
}
.store-logo {
  height: 62px; /* ~20% größer als 52px – besser erkennbar */
  width: auto;
  display: block;
  object-fit: contain;
}
.store-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.store-brand-text strong {
  font-size: 22px;
  color: var(--s-dark);
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.store-slogan {
  font-family: var(--s-font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--s-oliv);
  font-weight: 500;
}
.store-brand-text small {
  font-size: 12px;
  color: var(--s-muted);
  font-weight: 500;
  font-family: var(--s-font-body);
}
.store-nav { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 14px; font-weight: 600; }
.store-nav a strong { color: var(--s-gold); }
.store-wrap { max-width: 1100px; margin: 0 auto; padding: 22px 16px 48px; }
.store-back-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 14px;
}
.store-back-btn {
  min-height: 40px;
  padding: 8px 14px;
  font-weight: 600;
}
.store-back-katalog {
  font-size: 13px;
  font-weight: 600;
  color: var(--s-oliv);
  text-decoration: none;
}
.store-back-katalog:hover { text-decoration: underline; }
.store-flash {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 16px;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 0 0 14px auto;
  max-width: min(520px, 100%);
  background: #eef6e5;
  border: 1px solid #cfe3b8;
  font-size: 14px;
  font-weight: 500;
  color: #3f4a28;
  text-align: right;
}
.store-flash.success {
  background: #f0fdf4;
  border-color: #86efac;
  box-shadow: 0 2px 8px rgba(107, 122, 63, .12);
}
.store-flash.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
  margin-left: 0;
  margin-right: auto;
  justify-content: flex-start;
  text-align: left;
  max-width: 100%;
}
.store-flash-link {
  font-weight: 700;
  color: var(--s-oliv);
  text-decoration: none;
  white-space: nowrap;
}
.store-flash-link:hover { text-decoration: underline; }
.store-hero {
  background: linear-gradient(135deg, var(--s-oliv) 0%, #4a5630 100%);
  color: #fff; border-radius: 14px; padding: 28px 24px; margin-bottom: 22px;
  border-bottom: 3px solid var(--s-gold);
}
.store-hero h1 {
  margin: 0 0 8px; font-size: 30px; color: #fff !important;
  font-family: var(--s-font-serif); font-weight: 600;
}
.store-hero p { margin: 0; opacity: .95; font-family: var(--s-font-body); }
.foot-ci { margin-bottom: 10px; color: var(--s-dark); font-size: 13px; line-height: 1.45; }
.foot-ci strong { font-family: var(--s-font-serif); font-size: 16px; }
.badge-soft {
  display: inline-block; background: rgba(255,255,255,.18); padding: 4px 10px;
  border-radius: 999px; font-size: 12px; margin-top: 10px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--s-card);
  border: 1px solid var(--s-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card h3 { margin: 0 0 8px; font-size: 16px; }
.muted { color: var(--s-muted); font-size: 13px; }
.preis { font-size: 20px; font-weight: 700; color: var(--s-oliv); margin: 10px 0; }
.preis.locked { color: var(--s-muted); font-size: 14px; font-weight: 600; }
.preis-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin: 10px 0; font-size: 13px; align-items: end;
}
.preis-duo-karton strong {
  font-size: 18px; font-weight: 700; color: var(--s-oliv);
}
.preis-duo-stk strong {
  font-size: 12px; font-weight: 400; color: var(--s-muted);
  letter-spacing: 0;
}
.lieferart-bar {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  margin-bottom: 14px; padding: 10px 14px;
}
.lieferart-opt {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border: 1px solid var(--s-border); border-radius: 999px; cursor: pointer;
  font-size: 13px; font-weight: 600;
}
.lieferart-opt.on { border-color: var(--s-oliv); background: #f4f7ec; color: var(--s-oliv); }
.lieferart-opt input { margin: 0; }
.btn {
  display: inline-block; border: none; border-radius: 8px; padding: 9px 14px;
  background: var(--s-gold); color: #1a1a1a; font-weight: 600; cursor: pointer;
  text-decoration: none; font-size: 14px;
}
.btn-oliv { background: var(--s-oliv); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--s-border); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--s-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field textarea, .field select {
  width: 100%; padding: 9px 11px; border: 1px solid #d4cfc3; border-radius: 8px; font-size: 14px;
}
table.cart { width: 100%; border-collapse: collapse; }
table.cart th, table.cart td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--s-border); }
table.cart .num { text-align: right; }
.pay-box {
  display: block;
  border: 2px solid var(--s-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 12px;
  background: #fff;
  clear: both;
  overflow: hidden;
}
.pay-box.active { border-color: var(--s-oliv); background: #f4f7ec; }
.pay-box-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 0;
}
.pay-box-head input[type="radio"] {
  flex: 0 0 auto;
  margin: 4px 0 0;
  width: 18px;
  height: 18px;
}
.pay-box-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.pay-box-title strong {
  font-size: 15px;
  line-height: 1.3;
}
.pay-box-desc {
  display: block;
  font-size: 13px;
  line-height: 1.4;
}
.pay-box-body {
  margin: 10px 0 0 30px;
  clear: both;
}
.pay-bank {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--s-border);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0;
  font-family: ui-monospace, Consolas, monospace;
}
.store-foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--s-border); font-size: 13px; color: var(--s-muted); }
.store-foot a { color: var(--s-oliv); text-decoration: none; }
.store-foot a:hover { text-decoration: underline; }
.legal h1 { font-size: 24px; margin-top: 0; }
.legal h2 { font-size: 16px; margin-top: 22px; color: var(--s-oliv); }
.legal p { font-size: 14px; }

/* Produktkacheln */
.product-card { transition: transform .15s ease, box-shadow .15s ease; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.product-card-link { color: inherit; text-decoration: none; display: block; }
.product-card-img {
  margin: -16px -16px 12px; aspect-ratio: 4/3; overflow: hidden;
  border-radius: 12px 12px 0 0; background: #f0ebe3;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card-img.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: #9a9488; font-size: 13px;
  background: linear-gradient(135deg, #e8e2d6, #f5f1ea);
}

/* Artikel-Detail */
.artikel-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: start;
}
/* Tablet/Phone: Artikel-Detail einspaltig – siehe Abschnitt Responsive unten */
.thumbs {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 10px;
  border-top: 1px solid var(--s-border);
}
.thumb {
  position: relative; width: 72px; height: 72px; padding: 0; border: 2px solid transparent;
  border-radius: 8px; overflow: hidden; cursor: pointer; background: #eee;
}
.thumb.active { border-color: var(--s-oliv); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-tag {
  position: absolute; left: 0; right: 0; bottom: 0; background: rgba(107,122,63,.9);
  color: #fff; font-size: 8px; text-align: center; padding: 2px 1px;
  line-height: 1.15; white-space: normal;
}

/* Galerie + Lupe */
.galerie-main-wrap {
  position: relative;
  background: #f0ebe3;
}
.galerie-main-wrap #galerie-main,
.galerie-main-wrap .js-lightbox {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.btn-lupe {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
  cursor: zoom-in;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.btn-lupe:hover { background: #fff; transform: scale(1.05); }
.anwendung-wrap .js-lightbox { cursor: zoom-in; }

/* Lightbox Overlay */
.store-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(15, 18, 12, .88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  cursor: zoom-out;
}
.store-lightbox[hidden] { display: none !important; }
.store-lightbox img {
  max-width: min(96vw, 1100px);
  max-height: min(82vh, 900px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  background: #1a1a1a;
  cursor: zoom-out;
}
.store-lightbox-close {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.store-lightbox-close:hover { background: rgba(255,255,255,.28); }
.store-lightbox-caption {
  margin: 12px 0 0;
  color: #f5efe0;
  font-size: 14px;
  text-align: center;
  max-width: 90vw;
}
.store-lightbox-hint {
  margin: 6px 0 0;
  color: rgba(245,239,224,.65);
  font-size: 12px;
}
.anwendung-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.store-catalog {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}
.store-sidebar { padding: 14px; position: sticky; top: 12px; }
.sidebar-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--s-muted); font-weight: 700; margin-bottom: 10px;
}
.sidebar-link {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 8px; padding: 10px 12px; border-radius: 8px; margin-bottom: 6px;
  color: var(--s-text); text-decoration: none; border: 1px solid transparent;
  font-weight: 600; font-size: 14px; line-height: 1.25;
}
.sidebar-link .sidebar-label { flex: 1; min-width: 0; }
.sidebar-link small {
  display: block; width: 100%; font-weight: 500; color: var(--s-muted); font-size: 11px; margin-top: 2px;
}
.sidebar-link:hover { background: #f4f7ec; text-decoration: none; }
.sidebar-link.active {
  background: #f4f7ec; border-color: #cfe0b0; color: var(--s-oliv);
}
.sidebar-count {
  background: #eee; border-radius: 999px; padding: 1px 8px;
  font-size: 11px; font-weight: 700; color: #666; flex-shrink: 0;
}
.sidebar-link.active .sidebar-count { background: #dce8b8; color: #4a5630; }
.kat-heading { margin: 0 0 14px; font-size: 20px; }

.muster-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.muster-card {
  background: #fff;
  border: 1px solid var(--s-border);
  border-left: 4px solid var(--s-oliv);
  border-radius: 12px;
  padding: 14px 16px;
}
.muster-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--s-oliv);
  font-weight: 700;
  margin-bottom: 4px;
}
.muster-card p { margin: 6px 0 0; font-size: 13px; }

/* —— Navigation Toggle (Mobil) —— */
.store-nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 10px 12px;
  min-height: 44px;
  border: 1px solid var(--s-border);
  border-radius: 10px;
  background: #fff;
  color: var(--s-dark);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.store-nav-toggle-bars {
  display: block;
  width: 20px;
  height: 14px;
  background:
    linear-gradient(var(--s-dark), var(--s-dark)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--s-dark), var(--s-dark)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--s-dark), var(--s-dark)) 0 12px / 100% 2px no-repeat;
}
.store-nav-firma { color: var(--s-muted); font-size: 13px; font-weight: 600; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cart-qty {
  width: 70px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #d4cfc3;
  font-size: 14px;
}

/* Inhalte nicht horizontal sprengen (Logo behält eigene Höhe) */
.store-wrap img:not(.store-logo),
.artikel-gallery img,
.product-card-img img,
.anwendung-grid img {
  max-width: 100%;
}
.product-card-img img,
.artikel-gallery #galerie-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Responsive: Tablet ≤ 900px —— */
@media (max-width: 900px) {
  .store-catalog { grid-template-columns: 1fr; }
  .artikel-layout { grid-template-columns: 1fr; }
  .store-sidebar {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    margin-bottom: 4px;
  }
  .sidebar-title {
    display: none;
  }
  .sidebar-link {
    flex: 0 0 auto;
    margin: 0;
    white-space: nowrap;
    max-width: none;
  }
  .sidebar-link small { display: none; }
  .sidebar-link .sidebar-label { flex: none; }
  .store-wrap { padding: 16px 14px 40px; }
  .store-hero { padding: 22px 18px; }
  .store-hero h1 { font-size: 26px; }
}

/* —— Responsive: Phone / schmale Tablets ≤ 720px —— */
@media (max-width: 720px) {
  .store-top {
    padding: 10px 12px;
    gap: 10px;
    row-gap: 8px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .store-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
  }
  .store-logo { height: 52px; }
  .store-brand-text strong { font-size: 17px; }
  .store-slogan { display: none; }
  .store-brand-text small { display: none; }

  .store-nav-toggle { display: inline-flex; }

  .store-nav {
    display: none;
    width: 100%;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 6px;
    border-top: 1px solid var(--s-border);
  }
  .store-nav.is-open { display: flex; }
  .store-nav a,
  .store-nav .store-nav-firma {
    display: block;
    padding: 12px 10px;
    min-height: 44px;
    border-radius: 8px;
  }
  .store-nav a:hover { background: #f4f7ec; text-decoration: none; }

  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .preis-duo { grid-template-columns: 1fr 1fr; }
  .muster-strip { grid-template-columns: 1fr; }
  .anwendung-grid { grid-template-columns: 1fr; }

  .lieferart-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .lieferart-opt {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
    min-height: 44px;
    border-radius: 10px;
  }

  .btn {
    min-height: 44px;
    padding: 11px 16px;
    font-size: 15px;
  }

  /* iOS: kein Auto-Zoom bei Fokus */
  .field input,
  .field textarea,
  .field select,
  input[type="number"],
  input[type="email"],
  input[type="text"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }

  .store-hero h1 { font-size: 22px; line-height: 1.2; }
  .store-hero p { font-size: 14px; }
  .kat-heading { font-size: 18px; }
  .artikel-info h1 { font-size: 22px !important; }

  .store-foot { font-size: 12px; }
  .thumb { width: 64px; height: 64px; }

  /* Warenkorb: Karten statt enger Tabelle */
  table.cart thead { display: none; }
  table.cart,
  table.cart tbody,
  table.cart tr,
  table.cart td {
    display: block;
    width: 100%;
  }
  table.cart tr {
    border: 1px solid var(--s-border);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: #fff;
  }
  table.cart td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: none;
    text-align: left !important;
  }
  table.cart td + td {
    border-top: 1px dashed var(--s-border);
  }
  table.cart td::before {
    content: attr(data-label);
    font-size: 12px;
    font-weight: 600;
    color: var(--s-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
  }
  table.cart td.num { text-align: right; }
  .cart-qty { width: 88px; min-height: 40px; }

  #cookie-banner {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
}

/* —— Sehr schmale Phones ≤ 400px —— */
@media (max-width: 400px) {
  .store-logo { height: 46px; }
  .store-brand-text strong { font-size: 15px; }
  .preis-duo { grid-template-columns: 1fr; }
  .store-nav-toggle-label { display: none; }
}

/* Touch: Hover-Lift deaktivieren (kein „klebender“ Hover) */
@media (hover: none) {
  .product-card:hover { transform: none; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
}

/* Print: Navigation ausblenden */
@media print {
  .store-top, .store-nav-toggle, #cookie-banner { display: none !important; }
  .store-wrap { max-width: none; padding: 0; }
}
