/* Software-Katalog (kosatec) – passt sich an das g5a-Design an. */
.sw {
  --sw-bg: #f7fbfd;
  --sw-card: #ffffff;
  --sw-ink: #0b1220;
  --sw-muted: #4b5a68;
  --sw-line: #e2ecf1;
  --sw-primary: #0ea5c9;
  --sw-primary-ink: #063947;
  --sw-accent: #00e5ff;
  --sw-ok-bg: #e6f7ee;
  --sw-ok-ink: #127a4a;
  --sw-wait-bg: #fdf1e6;
  --sw-wait-ink: #b4610a;
  font-family: Inter, system-ui, sans-serif;
  color: var(--sw-ink);
  background: var(--sw-bg);
}
.sw *, .sw *::before, .sw *::after { box-sizing: border-box; }

.sw__wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Hero */
.sw__hero {
  padding: 72px 0 32px;
  background:
    radial-gradient(1100px 380px at 78% -12%, rgba(0, 229, 255, .16), transparent 60%),
    linear-gradient(180deg, #eef7fb 0%, #f7fbfd 100%);
  border-bottom: 1px solid var(--sw-line);
}
.sw__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--sw-primary-ink); background: rgba(14, 165, 201, .12);
  padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.sw__title { font-size: clamp(1.8rem, 3.2vw, 2.7rem); font-weight: 800; line-height: 1.1; margin: 0 0 12px; }
.sw__title-sub {
  display: block; margin-top: 10px;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem); font-weight: 600; line-height: 1.3;
  color: var(--sw-muted);
}
.sw__lead { font-size: 1.05rem; color: var(--sw-muted); max-width: 640px; }

/* CTA-Kasten im Hero (eigener Hintergrund) */
.sw__hero-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin: 26px 0 4px; padding: 20px 26px; border-radius: 16px;
  background: linear-gradient(120deg, #063947 0%, #0c93b4 100%);
  color: #fff; box-shadow: 0 14px 32px rgba(6, 57, 71, .22);
}
.sw__hero-cta-text { display: flex; flex-direction: column; gap: 4px; }
.sw__hero-cta-text strong { font-size: 1.12rem; font-weight: 700; }
.sw__hero-cta-text span { font-size: .92rem; color: rgba(255, 255, 255, .86); max-width: 560px; }
.sw__hero-cta-btn {
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
  height: 48px; padding: 0 26px; border-radius: 11px; font-weight: 700; font-size: 1rem;
  background: #fff; color: #063947;
}
.sw__hero-cta-btn:hover { background: #eafaff; }
@media (max-width: 640px) { .sw__hero-cta-btn { width: 100%; } }

/* Suche */
.sw__search { margin-top: 22px; display: flex; gap: 10px; max-width: 640px; }
.sw__search input[type="search"] {
  flex: 1; height: 50px; padding: 0 16px; font-size: 1rem;
  border: 1px solid var(--sw-line); border-radius: 12px; background: #fff; color: var(--sw-ink);
  box-shadow: 0 1px 2px rgba(6, 57, 71, .04);
}
.sw__search input[type="search"]:focus { outline: none; border-color: var(--sw-primary); box-shadow: 0 0 0 4px rgba(14, 165, 201, .15); }
.sw__btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 50px; padding: 0 22px; font-weight: 600; font-size: 1rem; cursor: pointer;
  border-radius: 12px; border: 1px solid transparent;
  background: var(--sw-primary); color: #fff; white-space: nowrap;
}
.sw__btn:hover { background: #0c93b4; }
.sw__btn--ghost { background: #fff; color: var(--sw-primary-ink); border-color: var(--sw-line); }
.sw__btn--ghost:hover { border-color: var(--sw-primary); }

/* Kategorie-Chips */
.sw__cats { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 6px; }
.sw__chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; font-size: .9rem; font-weight: 500;
  border: 1px solid var(--sw-line); background: #fff; color: var(--sw-ink); cursor: pointer;
}
.sw__chip:hover { border-color: var(--sw-primary); }
.sw__chip--active { background: var(--sw-primary); color: #fff; border-color: var(--sw-primary); }
.sw__chip .n { font-size: .78rem; opacity: .7; }

/* Hersteller-Filterleiste */
.sw__filterbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 18px 0 2px; }
.sw__brandform { display: flex; align-items: center; gap: 9px; }
.sw__flabel { font-size: .85rem; font-weight: 600; color: var(--sw-muted); }
.sw__select {
  height: 42px; max-width: 340px; padding: 0 14px; font-size: .9rem;
  border: 1px solid var(--sw-line); border-radius: 10px; background: #fff; color: var(--sw-ink); cursor: pointer;
}
.sw__select:focus { outline: none; border-color: var(--sw-primary); box-shadow: 0 0 0 4px rgba(14, 165, 201, .15); }
.sw__reset { font-size: .85rem; font-weight: 600; color: var(--sw-primary-ink); }
.sw__reset:hover { text-decoration: underline; }

/* Ergebnis-Kopf */
.sw__meta { margin: 18px 0 14px; color: var(--sw-muted); font-size: .92rem; }

/* Grid */
.sw__grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: 8px;
}
@media (max-width: 900px) { .sw__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sw__grid { grid-template-columns: 1fr; } }
.sw__card {
  display: flex; flex-direction: column;
  background: var(--sw-card); border: 1px solid var(--sw-line); border-radius: 16px;
  padding: 18px; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sw__card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(6, 57, 71, .10); border-color: #cfe6ee; }
/* Produktbild / Monogramm-Fallback */
.sw__media {
  height: 156px; margin: -18px -18px 14px; border-radius: 16px 16px 0 0;
  background: #f4f8fa; border-bottom: 1px solid var(--sw-line);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sw__img { max-width: 84%; max-height: 84%; object-fit: contain; mix-blend-mode: multiply; }
.sw__logo {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, #ffffff), #ffffff);
}
.sw__logo-mono {
  width: 54px; height: 54px; border-radius: 15px; background: var(--c); color: #fff;
  font-weight: 800; font-size: 1.25rem; letter-spacing: .02em;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 35%, transparent);
}
.sw__logo-name { font-size: .82rem; font-weight: 600; color: color-mix(in srgb, var(--c) 72%, #333); padding: 0 12px; text-align: center; }

.sw__card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.sw__brand { font-size: .8rem; font-weight: 600; color: var(--sw-primary-ink); text-transform: uppercase; letter-spacing: .03em; }
.sw__cat2 { font-size: .72rem; color: var(--sw-muted); background: #f1f6f8; padding: 3px 9px; border-radius: 999px; }
.sw__name {
  font-size: 1.05rem; font-weight: 700; line-height: 1.45; margin: 12px 0 22px;
  color: #063947;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 3em;
}
.sw__spec { font-size: .78rem; color: var(--sw-muted); margin-bottom: 14px; }
.sw__spec b { color: var(--sw-ink); font-weight: 600; }

.sw__foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.sw__price { font-size: 1.15rem; font-weight: 800; }
.sw__price small { display: block; font-size: .68rem; font-weight: 500; color: var(--sw-muted); }
.sw__price--inquiry { font-size: .95rem; font-weight: 700; color: var(--sw-primary-ink); }

/* Preis-Aufschlüsselung: Netto / USt. / Brutto */
.sw__price-box { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.sw__pl { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: .82rem; color: var(--sw-muted); }
.sw__pl > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw__pl--gross {
  margin-top: 5px; padding-top: 7px; border-top: 1px solid var(--sw-line);
  align-items: baseline;
}
.sw__pl--gross > span:first-child { font-size: .78rem; font-weight: 600; color: var(--sw-muted); }
.sw__pl--gross > span:last-child { font-size: 1.15rem; font-weight: 800; color: var(--sw-ink); }
.sw__pl--gross small { font-size: .66rem; font-weight: 500; color: var(--sw-muted); margin-left: 4px; }

/* Streichpreis (UVP) + Ersparnis */
.sw__gross-val { display: inline-flex; align-items: baseline; gap: 8px; }
.sw__uvp { font-size: .66em; font-weight: 600; color: var(--sw-muted); text-decoration: line-through; }
.sw__save {
  align-self: flex-start; margin-top: 7px; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 700; background: #fdecef; color: #c0264a;
}
.sw__save--lg { font-size: .88rem; padding: 6px 13px; margin-top: 12px; }
.sw__badge { font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.sw__badge--ok { background: var(--sw-ok-bg); color: var(--sw-ok-ink); }
.sw__badge--wait { background: var(--sw-wait-bg); color: var(--sw-wait-ink); }

/* ESD-Hervorhebung – digitale Sofort-Lieferung per Download-Link */
.sw__esd {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  margin-bottom: 14px; padding: 6px 11px; border-radius: 8px;
  font-size: .78rem; font-weight: 700; letter-spacing: .01em;
  background: var(--sw-ok-bg); color: var(--sw-ok-ink);
}
.sw__chip--esd { border-color: #12a05a; color: #0f7a45; font-weight: 700; }
.sw__chip--esd:hover { border-color: #0f7a45; }
.sw__chip--esd.sw__chip--active { background: #12a05a; border-color: #12a05a; color: #fff; }
.sw__esd-note {
  margin-top: 14px; padding: 12px 16px; border-radius: 11px; max-width: 520px;
  background: var(--sw-ok-bg); color: var(--sw-ok-ink); font-size: .92rem; line-height: 1.45;
}

.sw__inquiry {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 14px; height: 42px; width: 100%; border-radius: 10px; font-weight: 600; font-size: .92rem;
  background: rgba(14, 165, 201, .10); color: var(--sw-primary-ink); border: 1px solid transparent;
}
.sw__inquiry:hover { background: var(--sw-primary); color: #fff; }

/* Leerzustand */
.sw__empty { text-align: center; padding: 60px 20px; color: var(--sw-muted); }
.sw__empty h3 { color: var(--sw-ink); margin-bottom: 8px; }

/* Pagination */
.sw__pager { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: 34px 0 60px; }
.sw__pager a, .sw__pager span {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--sw-line); border-radius: 10px; background: #fff; color: var(--sw-ink); font-size: .9rem; text-decoration: none;
}
.sw__pager a:hover { border-color: var(--sw-primary); }
.sw__pager .is-active { background: var(--sw-primary); color: #fff; border-color: var(--sw-primary); }
.sw__pager .is-disabled { opacity: .45; }

@media (max-width: 560px) {
  .sw__search { flex-direction: column; }
  .sw__search .sw__btn { width: 100%; }
}

/* ---------- Produkt-Detailseite ---------- */
.sw__detail { padding: 104px 20px 60px; }
.sw__breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--sw-muted); margin-bottom: 24px; }
.sw__breadcrumb a:hover { color: var(--sw-primary); }
.sw__breadcrumb-current { color: var(--sw-ink); }

.sw__detail-grid { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 42px; align-items: start; }
.sw__detail-media {
  height: 380px; border: 1px solid var(--sw-line); border-radius: 18px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.sw__detail-media .sw__img { max-width: 82%; max-height: 82%; }
.sw__detail-media .sw__logo { border-radius: 18px; }

.sw__detail-info { padding-top: 4px; }
.sw__detail-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; line-height: 1.2; color: #063947; margin: 10px 0 14px; }
.sw__detail-buy { margin: 22px 0 20px; }
.sw__detail-avail { margin-top: 14px; }
.sw__price-box--lg { max-width: 380px; }
.sw__price-box--lg .sw__pl { font-size: .98rem; }
.sw__price-box--lg .sw__pl--gross > span:last-child { font-size: 1.75rem; }
.sw__detail-price { font-size: 1.9rem; font-weight: 800; color: var(--sw-ink); }
.sw__detail-price small { font-size: .8rem; font-weight: 500; color: var(--sw-muted); margin-left: 8px; }
.sw__detail-price--inquiry { font-size: 1.3rem; color: var(--sw-primary-ink); }
.sw__detail-cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 28px; border-radius: 12px; font-weight: 700; font-size: 1.02rem;
  background: var(--sw-primary); color: #fff; box-shadow: 0 8px 20px rgba(14, 165, 201, .28);
}
.sw__detail-cta:hover { background: #0c93b4; }

.sw__specs { margin-top: 28px; border-top: 1px solid var(--sw-line); }
.sw__specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 2px; border-bottom: 1px solid var(--sw-line); font-size: .92rem; }
.sw__specs dt { color: var(--sw-muted); }
.sw__specs dd { font-weight: 600; color: var(--sw-ink); text-align: right; }

.sw__detail-desc { margin-top: 46px; max-width: 780px; }
.sw__detail-desc h2 { font-size: 1.25rem; font-weight: 700; color: #063947; margin-bottom: 12px; }
.sw__detail-desc p { color: #374151; margin-bottom: 12px; }
.sw__detail-hint a { color: var(--sw-primary); font-weight: 600; }
.sw__detail-hint a:hover { text-decoration: underline; }

.sw__related { margin-top: 52px; }
.sw__related h2 { font-size: 1.25rem; font-weight: 700; color: #063947; margin-bottom: 18px; }
.sw__rgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.sw__rcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--sw-line); border-radius: 14px; padding: 14px; transition: transform .15s ease, box-shadow .15s ease; }
.sw__rcard:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(6, 57, 71, .10); }
.sw__rcard .sw__media { height: 120px; margin: -14px -14px 12px; border-radius: 14px 14px 0 0; }
.sw__rbrand { font-size: .72rem; font-weight: 600; color: var(--sw-primary-ink); text-transform: uppercase; letter-spacing: .03em; }
.sw__rname { margin-top: 6px; font-size: .9rem; font-weight: 600; color: #063947; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.sw__back { margin-top: 40px; }
.sw__back a { color: var(--sw-primary); font-weight: 600; }
.sw__back a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .sw__detail-grid { grid-template-columns: 1fr; gap: 24px; }
  .sw__detail-media { height: 300px; }
  .sw__rgrid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Dunkles Theme (Tag/Nacht-Umschalter: html[data-theme="dark"]) ---------- */
html[data-theme="dark"] .sw {
  --sw-bg: #071820;
  --sw-card: #0e2731;
  --sw-ink: #e6f7fb;
  --sw-muted: #9db2bb;
  --sw-line: rgba(255, 255, 255, .11);
  --sw-primary: #33cdee;
  --sw-primary-ink: #8cfff9;
  --sw-ok-bg: rgba(18, 160, 90, .20);
  --sw-ok-ink: #7fe0a6;
  --sw-wait-bg: rgba(180, 97, 10, .22);
  --sw-wait-ink: #f0b878;
}
html[data-theme="dark"] .sw__hero {
  background:
    radial-gradient(1100px 380px at 78% -12%, rgba(0, 229, 255, .12), transparent 60%),
    linear-gradient(180deg, #0a222b 0%, #071820 100%);
  border-bottom-color: rgba(255, 255, 255, .08);
}
/* vormals weiße Flächen -> dunkle Karten-Fläche */
html[data-theme="dark"] .sw__search input[type="search"],
html[data-theme="dark"] .sw__btn--ghost,
html[data-theme="dark"] .sw__chip,
html[data-theme="dark"] .sw__select,
html[data-theme="dark"] .sw__pager a,
html[data-theme="dark"] .sw__pager span,
html[data-theme="dark"] .sw__rcard { background: var(--sw-card); color: var(--sw-ink); }
html[data-theme="dark"] .sw__cat2 { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .sw__card:hover { border-color: rgba(255, 255, 255, .22); }
/* Überschriften hell */
html[data-theme="dark"] .sw__name,
html[data-theme="dark"] .sw__detail-title,
html[data-theme="dark"] .sw__rname,
html[data-theme="dark"] .sw__detail-desc h2,
html[data-theme="dark"] .sw__related h2 { color: var(--sw-primary-ink); }
html[data-theme="dark"] .sw__detail-desc p { color: var(--sw-muted); }
html[data-theme="dark"] .sw__save { background: rgba(220, 60, 90, .18); color: #ff9db3; }
