/*
 * COW Frontend 2.0 – interaktiver Frontend-Prototyp
 * Diese Datei liegt bewusst nach style.css/custom.css, damit die neuen
 * Komponenten zentral und ohne Eingriff in die bestehende Shoplogik gepflegt werden können.
 */

:root {
  --cow-red: #e30613;
  --cow-red-dark: #b9000b;
  --cow-navy: #25346f;
  --cow-navy-dark: #17234f;
  --cow-blue-soft: #eef1fb;
  --cow-bg: #f4f6f9;
  --cow-surface: #ffffff;
  --cow-surface-soft: #f9fafc;
  --cow-text: #20242d;
  --cow-muted: #687083;
  --cow-line: #e3e7ef;
  --cow-success: #1f7a4f;
  --cow-success-soft: #eaf7f0;
  --cow-warning: #a65f00;
  --cow-warning-soft: #fff5e6;
  --cow-danger-soft: #fff0f1;
  --cow-radius-sm: 8px;
  --cow-radius: 14px;
  --cow-radius-lg: 20px;
  --cow-shadow-sm: 0 4px 14px rgba(28, 39, 72, 0.06);
  --cow-shadow: 0 14px 40px rgba(28, 39, 72, 0.11);
  --cow-shell: 1440px;
  --cow-drawer: 460px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.cow-app {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--cow-bg);
  color: var(--cow-text);
  font-family: "Ropa Sans", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.45;
}

body.cow-app.is-locked {
  overflow: hidden;
}

body.cow-app a {
  color: inherit;
  text-decoration: none;
}

body.cow-app button,
body.cow-app input,
body.cow-app select {
  font: inherit;
}

body.cow-app button {
  cursor: pointer;
}

.cow-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cow-shell {
  width: min(calc(100% - 48px), var(--cow-shell));
  margin: 0 auto;
}

.cow-icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--cow-line);
  border-radius: 50%;
  background: var(--cow-surface);
  color: var(--cow-navy);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.cow-icon-button:hover,
.cow-icon-button:focus-visible {
  border-color: var(--cow-navy);
  box-shadow: var(--cow-shadow-sm);
  outline: none;
  transform: translateY(-1px);
}

.cow-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border: 2px solid var(--cow-surface);
  border-radius: 999px;
  background: var(--cow-red);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

/* Header */
.cow-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--cow-line);
  box-shadow: 0 4px 18px rgba(28, 39, 72, .05);
  backdrop-filter: blur(12px);
}

.cow-utility {
  background: var(--cow-navy-dark);
  color: white;
  font-size: 14px;
}

.cow-utility__inner {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cow-utility__left,
.cow-utility__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cow-utility__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,.9);
}

.cow-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5fd39b;
  box-shadow: 0 0 0 4px rgba(95, 211, 155, .15);
}

.cow-header-main {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: center;
  gap: 30px;
}

.cow-logo {
  display: inline-flex;
  align-items: center;
  width: 174px;
  height: 60px;
}

.cow-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cow-search {
  position: relative;
  width: min(100%, 620px);
  justify-self: center;
}

.cow-search input {
  width: 100%;
  height: 48px;
  padding: 0 52px 0 18px;
  border: 1px solid var(--cow-line);
  border-radius: 999px;
  background: var(--cow-surface-soft);
  color: var(--cow-text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.cow-search input:focus {
  border-color: var(--cow-navy);
  background: white;
  box-shadow: 0 0 0 4px rgba(37,52,111,.09);
}

.cow-search button {
  position: absolute;
  top: 4px;
  right: 5px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--cow-navy);
  color: white;
}

.cow-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cow-budget-pill,
.cow-role-control,
.cow-shop-control {
  position: relative;
}

.cow-budget-pill {
  min-width: 170px;
  padding: 8px 13px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-sm);
  background: var(--cow-surface-soft);
}

.cow-budget-pill__label {
  display: block;
  color: var(--cow-muted);
  font-size: 12px;
  line-height: 1.1;
}

.cow-budget-pill__value {
  display: block;
  margin-top: 3px;
  color: var(--cow-navy);
  font-size: 17px;
  font-weight: 700;
}

.cow-role-button,
.cow-shop-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-sm);
  background: white;
  color: var(--cow-text);
}

.cow-role-button:hover,
.cow-shop-button:hover {
  border-color: var(--cow-navy);
}

.cow-role-button__text,
.cow-shop-button__text {
  text-align: left;
}

.cow-role-button small,
.cow-shop-button small {
  display: block;
  color: var(--cow-muted);
  font-size: 11px;
  line-height: 1.1;
}

.cow-role-button strong,
.cow-shop-button strong {
  display: block;
  max-width: 170px;
  overflow: hidden;
  color: var(--cow-navy);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cow-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 90;
  width: 300px;
  padding: 10px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius);
  background: white;
  box-shadow: var(--cow-shadow);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}

.cow-popover.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.cow-popover__title {
  padding: 8px 10px 10px;
  color: var(--cow-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.cow-popover__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--cow-text);
  text-align: left;
}

.cow-popover__option:hover,
.cow-popover__option.is-active {
  background: var(--cow-blue-soft);
  color: var(--cow-navy);
}

.cow-popover__option.is-active::after {
  content: "✓";
  font-weight: 700;
}

.cow-nav {
  border-top: 1px solid var(--cow-line);
}

.cow-nav__inner {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cow-nav__links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cow-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  color: #42495a;
  font-size: 16px;
}

.cow-nav__link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 3px;
  transform: scaleX(0);
  background: var(--cow-red);
  transition: transform .18s ease;
}

.cow-nav__link:hover,
.cow-nav__link.is-active {
  color: var(--cow-navy);
}

.cow-nav__link:hover::after,
.cow-nav__link.is-active::after {
  transform: scaleX(1);
}

.cow-nav__link[data-hidden="true"] {
  display: none;
}

.cow-shop-control {
  margin-left: auto;
}

.cow-mobile-toggle {
  display: none;
}

/* Main */
.cow-main {
  padding: 30px 0 64px;
}

.cow-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--cow-muted);
  font-size: 14px;
}

.cow-breadcrumbs a:hover {
  color: var(--cow-navy);
}

.cow-hero {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: var(--cow-radius-lg);
  background: var(--cow-surface);
  box-shadow: var(--cow-shadow-sm);
}

.cow-hero img {
  display: block;
  width: 100%;
  min-height: 250px;
  object-fit: cover;
}

.cow-hero__panel {
  position: absolute;
  left: 30px;
  bottom: 24px;
  max-width: 520px;
  padding: 17px 20px;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: var(--cow-radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--cow-shadow-sm);
  backdrop-filter: blur(8px);
}

.cow-hero__eyebrow {
  color: var(--cow-red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cow-hero__title {
  margin: 3px 0 2px;
  color: var(--cow-navy);
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.1;
}

.cow-hero__text {
  margin: 0;
  color: #51596b;
}

.cow-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.cow-stat-card {
  position: relative;
  min-height: 152px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius);
  background: var(--cow-surface);
  box-shadow: var(--cow-shadow-sm);
}

.cow-stat-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--cow-blue-soft);
}

.cow-stat-card--attention::after {
  background: var(--cow-warning-soft);
}

.cow-stat-card--success::after {
  background: var(--cow-success-soft);
}

.cow-stat-card__icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--cow-blue-soft);
  color: var(--cow-navy);
}

.cow-stat-card__label {
  margin-top: 15px;
  color: var(--cow-muted);
  font-size: 14px;
}

.cow-stat-card__value {
  margin-top: 2px;
  color: var(--cow-text);
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
}

.cow-stat-card__meta {
  margin-top: 8px;
  color: var(--cow-muted);
  font-size: 13px;
}

.cow-progress {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f5;
}

.cow-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cow-navy);
}

.cow-section {
  margin-top: 38px;
}

.cow-section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.cow-section__eyebrow {
  color: var(--cow-red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cow-section__title {
  margin: 2px 0 0;
  color: var(--cow-navy);
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.1;
}

.cow-section__text {
  max-width: 620px;
  margin: 5px 0 0;
  color: var(--cow-muted);
}

.cow-link-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--cow-line);
  border-radius: 999px;
  background: white;
  color: var(--cow-navy);
  font-weight: 700;
}

.cow-link-button:hover {
  border-color: var(--cow-navy);
}

/* Quick actions and management */
.cow-action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.cow-action-card {
  display: flex;
  align-items: center;
  gap: 17px;
  min-height: 110px;
  padding: 20px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius);
  background: white;
  box-shadow: var(--cow-shadow-sm);
  text-align: left;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cow-action-card:hover {
  transform: translateY(-3px);
  border-color: #cad0dd;
  box-shadow: var(--cow-shadow);
}

.cow-action-card__icon {
  display: inline-flex;
  flex: 0 0 52px;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--cow-blue-soft);
  color: var(--cow-navy);
  font-size: 20px;
}

.cow-action-card__title {
  display: block;
  color: var(--cow-navy);
  font-size: 20px;
  font-weight: 700;
}

.cow-action-card__text {
  display: block;
  margin-top: 2px;
  color: var(--cow-muted);
  font-size: 14px;
}

.cow-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  gap: 18px;
}

.cow-panel {
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius);
  background: white;
  box-shadow: var(--cow-shadow-sm);
}

.cow-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--cow-line);
}

.cow-panel__head h3 {
  margin: 0;
  color: var(--cow-navy);
  font-size: 21px;
}

.cow-panel__body {
  padding: 8px 22px 16px;
}

.cow-approval-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(130px, .8fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cow-line);
}

.cow-approval-row:last-child {
  border-bottom: 0;
}

.cow-approval-row.is-resolved {
  opacity: .55;
}

.cow-approval-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cow-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  background: var(--cow-blue-soft);
  color: var(--cow-navy);
  font-weight: 700;
}

.cow-approval-user strong,
.cow-approval-info strong {
  display: block;
  color: var(--cow-text);
}

.cow-approval-user small,
.cow-approval-info small {
  display: block;
  color: var(--cow-muted);
  font-size: 13px;
}

.cow-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.cow-button:hover {
  transform: translateY(-1px);
}

.cow-button--primary {
  background: var(--cow-red);
  color: white;
}

.cow-button--primary:hover {
  background: var(--cow-red-dark);
  color: white;
}

.cow-button--navy {
  background: var(--cow-navy);
  color: white;
}

.cow-button--navy:hover {
  background: var(--cow-navy-dark);
  color: white;
}

.cow-button--outline {
  border-color: var(--cow-line);
  background: white;
  color: var(--cow-navy);
}

.cow-button--outline:hover {
  border-color: var(--cow-navy);
}

.cow-button--success {
  background: var(--cow-success-soft);
  color: var(--cow-success);
}

.cow-button--danger-soft {
  background: var(--cow-danger-soft);
  color: var(--cow-red-dark);
}

.cow-budget-overview {
  padding: 22px;
}

.cow-budget-overview__amount {
  margin-top: 10px;
  color: var(--cow-navy);
  font-size: 34px;
  font-weight: 700;
}

.cow-budget-overview__meta {
  color: var(--cow-muted);
}

.cow-budget-overview__rows {
  margin-top: 20px;
  border-top: 1px solid var(--cow-line);
}

.cow-budget-overview__row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--cow-line);
}

/* Product cards */
.cow-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.cow-product-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius);
  background: white;
  box-shadow: var(--cow-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cow-product-card:hover {
  transform: translateY(-4px);
  border-color: #cdd3df;
  box-shadow: var(--cow-shadow);
}

.cow-product-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 330px;
  padding: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f6f9 100%);
}

.cow-product-card__media img {
  display: block;
  width: min(100%, 300px);
  height: 300px;
  object-fit: contain;
  transition: transform .22s ease;
}

.cow-product-card:hover .cow-product-card__media img {
  transform: scale(1.035);
}

.cow-product-card__favorite {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
}

.cow-product-card__tag {
  position: absolute;
  left: 15px;
  top: 15px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  background: white;
  color: var(--cow-navy);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--cow-shadow-sm);
}

.cow-product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}

.cow-product-card__category {
  color: var(--cow-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.cow-product-card__title {
  margin: 4px 0 0;
  color: var(--cow-navy);
  font-size: 23px;
  line-height: 1.15;
}

.cow-product-card__meta {
  min-height: 38px;
  margin: 7px 0 0;
  color: var(--cow-muted);
  font-size: 14px;
}

.cow-product-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.cow-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--cow-surface-soft);
  color: #51596b;
  font-size: 13px;
}

.cow-chip--success {
  background: var(--cow-success-soft);
  color: var(--cow-success);
}

.cow-product-card__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
}

.cow-product-card__price-label {
  display: block;
  color: var(--cow-muted);
  font-size: 12px;
}

.cow-product-card__price {
  color: var(--cow-text);
  font-size: 25px;
  font-weight: 700;
}

.cow-add-button {
  min-width: 150px;
}

/* Listing */
.cow-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 22px;
}

.cow-page-head h1 {
  margin: 0;
  color: var(--cow-navy);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
}

.cow-page-head p {
  margin: 6px 0 0;
  color: var(--cow-muted);
}

.cow-listing-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.cow-filter {
  position: sticky;
  top: 176px;
  overflow: hidden;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius);
  background: white;
  box-shadow: var(--cow-shadow-sm);
}

.cow-filter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--cow-line);
}

.cow-filter__head h2 {
  margin: 0;
  color: var(--cow-navy);
  font-size: 21px;
}

.cow-filter__section {
  padding: 18px 20px;
  border-bottom: 1px solid var(--cow-line);
}

.cow-filter__section h3 {
  margin: 0 0 12px;
  color: var(--cow-text);
  font-size: 16px;
}

.cow-filter__options {
  display: grid;
  gap: 9px;
}

.cow-filter__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #50586a;
  font-size: 14px;
}

.cow-filter__option span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cow-filter__option input {
  width: 16px;
  height: 16px;
  accent-color: var(--cow-navy);
}

.cow-filter__count {
  color: var(--cow-muted);
  font-size: 12px;
}

.cow-filter__actions {
  display: grid;
  gap: 9px;
  padding: 18px 20px;
}

.cow-listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-sm);
  background: white;
}

.cow-listing-toolbar__left {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--cow-muted);
  font-size: 14px;
}

.cow-listing-toolbar select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-sm);
  background: white;
  color: var(--cow-text);
}

.cow-filter-mobile-toggle {
  display: none;
}

/* Drawers and overlays */
.cow-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
  opacity: 0;
  background: rgba(13, 21, 47, .45);
  backdrop-filter: blur(3px);
  transition: opacity .22s ease, visibility .22s;
}

.cow-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.cow-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 110;
  display: flex;
  width: min(100%, var(--cow-drawer));
  height: 100dvh;
  flex-direction: column;
  transform: translateX(105%);
  background: white;
  box-shadow: -18px 0 55px rgba(13,21,47,.2);
  transition: transform .26s cubic-bezier(.2,.8,.2,1);
}

.cow-cart-drawer.is-open {
  transform: translateX(0);
}

.cow-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 22px;
  border-bottom: 1px solid var(--cow-line);
}

.cow-drawer__head h2 {
  margin: 0;
  color: var(--cow-navy);
  font-size: 26px;
}

.cow-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px;
}

.cow-cart-empty {
  display: none;
  padding: 50px 20px;
  color: var(--cow-muted);
  text-align: center;
}

.cow-cart-empty.is-visible {
  display: block;
}

.cow-cart-item {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--cow-line);
}

.cow-cart-item__image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 106px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--cow-surface-soft);
}

.cow-cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cow-cart-item__title {
  color: var(--cow-navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.15;
}

.cow-cart-item__variant {
  margin-top: 4px;
  color: var(--cow-muted);
  font-size: 13px;
}

.cow-cart-item__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
}

.cow-qty-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--cow-line);
  border-radius: 50%;
  background: white;
  color: var(--cow-navy);
}

.cow-cart-item__price {
  color: var(--cow-text);
  font-weight: 700;
  white-space: nowrap;
}

.cow-cart-remove {
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cow-muted);
  font-size: 12px;
}

.cow-cart-remove:hover {
  color: var(--cow-red);
}

.cow-cart-budget {
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--cow-radius-sm);
  background: var(--cow-blue-soft);
}

.cow-cart-budget__row,
.cow-cart-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.cow-cart-budget__row + .cow-cart-budget__row,
.cow-cart-summary__row + .cow-cart-summary__row {
  margin-top: 8px;
}

.cow-cart-approval {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--cow-radius-sm);
  background: var(--cow-success-soft);
  color: var(--cow-success);
  font-size: 14px;
}

.cow-cart-approval.is-warning {
  background: var(--cow-warning-soft);
  color: var(--cow-warning);
}

.cow-drawer__footer {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--cow-line);
  background: white;
}

.cow-cart-summary {
  margin-bottom: 14px;
}

.cow-cart-summary__total {
  color: var(--cow-navy);
  font-size: 22px;
  font-weight: 700;
}

.cow-checkout-button {
  width: 100%;
  min-height: 50px;
}

/* Modal */
.cow-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 130;
  width: min(calc(100% - 32px), 560px);
  visibility: hidden;
  opacity: 0;
  transform: translate(-50%, -48%) scale(.98);
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-lg);
  background: white;
  box-shadow: 0 24px 80px rgba(13,21,47,.28);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.cow-modal.is-open {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cow-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--cow-line);
}

.cow-modal__head h2 {
  margin: 0;
  color: var(--cow-navy);
  font-size: 25px;
}

.cow-modal__body {
  padding: 22px;
}

.cow-form-group + .cow-form-group {
  margin-top: 17px;
}

.cow-form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--cow-text);
  font-weight: 700;
}

.cow-form-group input,
.cow-form-group select {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-sm);
  background: white;
  outline: none;
}

.cow-form-group input:focus,
.cow-form-group select:focus {
  border-color: var(--cow-navy);
  box-shadow: 0 0 0 4px rgba(37,52,111,.09);
}

.cow-form-hint {
  margin-top: 7px;
  color: var(--cow-muted);
  font-size: 13px;
}

.cow-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 22px;
  border-top: 1px solid var(--cow-line);
}

/* Toast */
.cow-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 380px;
  padding: 14px 17px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(15px);
  border-radius: var(--cow-radius-sm);
  background: var(--cow-navy-dark);
  color: white;
  box-shadow: var(--cow-shadow);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.cow-toast.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.cow-footer {
  margin-top: 30px;
  background: var(--cow-navy-dark);
  color: white;
}

.cow-footer__inner {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(150px, .6fr));
  gap: 35px;
  padding: 44px 0;
}

.cow-footer__brand img {
  width: 160px;
  height: 70px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.cow-footer__brand p {
  max-width: 400px;
  color: rgba(255,255,255,.65);
  font-size: 14px;
}

.cow-footer h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.cow-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cow-footer li + li {
  margin-top: 8px;
}

.cow-footer a {
  color: rgba(255,255,255,.68);
  font-size: 14px;
}

.cow-footer a:hover {
  color: white;
}

.cow-footer__bottom {
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.55);
  font-size: 12px;
}

/* Role visibility */
[data-roles] {
  display: none;
}

body[data-role="mitarbeiter"] [data-roles~="mitarbeiter"],
body[data-role="entscheider"] [data-roles~="entscheider"],
body[data-role="standortleiter"] [data-roles~="standortleiter"],
body[data-role="hauptadmin"] [data-roles~="hauptadmin"] {
  display: flex;
}

section[data-roles],
div[data-roles].cow-management-grid {
  display: none;
}

body[data-role="mitarbeiter"] section[data-roles~="mitarbeiter"],
body[data-role="entscheider"] section[data-roles~="entscheider"],
body[data-role="standortleiter"] section[data-roles~="standortleiter"],
body[data-role="hauptadmin"] section[data-roles~="hauptadmin"],
body[data-role="mitarbeiter"] div[data-roles~="mitarbeiter"].cow-management-grid,
body[data-role="entscheider"] div[data-roles~="entscheider"].cow-management-grid,
body[data-role="standortleiter"] div[data-roles~="standortleiter"].cow-management-grid,
body[data-role="hauptadmin"] div[data-roles~="hauptadmin"].cow-management-grid {
  display: grid;
}

/* Responsive */
@media (max-width: 1180px) {
  .cow-header-main {
    grid-template-columns: auto 1fr auto;
    gap: 18px;
  }

  .cow-role-control,
  .cow-budget-pill {
    display: none;
  }

  .cow-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cow-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .cow-shell {
    width: min(calc(100% - 30px), var(--cow-shell));
  }

  .cow-utility {
    display: none;
  }

  .cow-header-main {
    min-height: 68px;
    grid-template-columns: auto 1fr auto;
  }

  .cow-logo {
    width: 136px;
    height: 50px;
  }

  .cow-search {
    display: none;
  }

  .cow-mobile-toggle {
    display: inline-flex;
  }

  .cow-nav__inner {
    min-height: auto;
    flex-wrap: wrap;
  }

  .cow-nav__links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 16px;
  }

  .cow-nav__links.is-open {
    display: flex;
  }

  .cow-nav__link {
    min-height: 42px;
    border-radius: 8px;
  }

  .cow-nav__link:hover,
  .cow-nav__link.is-active {
    background: var(--cow-blue-soft);
  }

  .cow-nav__link::after {
    display: none;
  }

  .cow-shop-control {
    width: 100%;
    order: -1;
    padding: 9px 0;
  }

  .cow-shop-button {
    width: 100%;
    justify-content: space-between;
  }

  .cow-shop-button__text {
    margin-right: auto;
  }

  .cow-main {
    padding-top: 20px;
  }

  .cow-hero,
  .cow-hero img {
    min-height: 280px;
  }

  .cow-hero img {
    object-position: 62% center;
  }

  .cow-hero__panel {
    left: 14px;
    right: 14px;
    bottom: 14px;
    max-width: none;
  }

  .cow-action-grid,
  .cow-management-grid {
    grid-template-columns: 1fr;
  }

  .cow-listing-layout {
    grid-template-columns: 1fr;
  }

  .cow-filter {
    position: static;
    display: none;
  }

  .cow-filter.is-open {
    display: block;
  }

  .cow-filter-mobile-toggle {
    display: inline-flex;
  }

  .cow-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.cow-app {
    font-size: 16px;
  }

  .cow-shell {
    width: min(calc(100% - 22px), var(--cow-shell));
  }

  .cow-header-main {
    gap: 8px;
  }

  .cow-logo {
    width: 112px;
  }

  .cow-header-actions {
    gap: 6px;
  }

  .cow-icon-button {
    width: 39px;
    height: 39px;
  }

  .cow-dashboard-grid,
  .cow-product-grid {
    grid-template-columns: 1fr;
  }

  .cow-stat-card {
    min-height: 132px;
  }

  .cow-section__head,
  .cow-page-head,
  .cow-listing-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .cow-product-card__media {
    min-height: 285px;
  }

  .cow-product-card__media img {
    height: 260px;
  }

  .cow-product-card__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .cow-add-button {
    width: 100%;
  }

  .cow-approval-row {
    grid-template-columns: 1fr;
  }

  .cow-row-actions {
    justify-content: flex-start;
  }

  .cow-cart-drawer {
    width: 100%;
  }

  .cow-cart-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .cow-cart-item__image {
    width: 76px;
    height: 92px;
  }

  .cow-cart-item__price {
    grid-column: 2;
  }

  .cow-footer__inner {
    grid-template-columns: 1fr;
    padding: 35px 0;
  }

  .cow-toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* Logo-Datei enthält viel Weißraum: innerhalb des festen Header-Rahmens optisch vergrößern. */
.cow-logo {
  overflow: hidden;
}

.cow-logo img {
  transform: scale(1.65);
}

.cow-footer__brand img {
  width: 105px;
  height: 76px;
  padding: 7px;
  border-radius: 10px;
  background: white;
  filter: none;
}


/* COW Frontend 2.1 – Webshop + Self-Service */
.cow-budget-pill--button {
  text-align: left;
  cursor: pointer;
}
.cow-budget-pill--button:hover,
.cow-budget-pill--button:focus-visible {
  border-color: var(--cow-navy);
  box-shadow: 0 0 0 4px rgba(37,52,111,.07);
  outline: none;
}
.cow-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.cow-stat-card__value--status {
  color: var(--cow-warning);
  font-size: 23px;
}
.cow-action-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.cow-action-grid--four .cow-action-card {
  min-height: 126px;
}
.cow-selfservice-grid {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}
.cow-panel__body--flush {
  padding-top: 0;
  padding-bottom: 0;
}
.cow-order-row {
  display: grid;
  grid-template-columns: 44px minmax(140px, 1fr) minmax(170px, .9fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cow-line);
}
.cow-order-row:last-child { border-bottom: 0; }
.cow-order-row strong,
.cow-order-row small { display: block; }
.cow-order-row small { margin-top: 2px; color: var(--cow-muted); font-size: 13px; }
.cow-order-icon,
.cow-process-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--cow-blue-soft);
  color: var(--cow-navy);
}
.cow-status {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.cow-status--shipping { background: var(--cow-blue-soft); color: var(--cow-navy); }
.cow-status--processing { background: var(--cow-warning-soft); color: var(--cow-warning); }
.cow-status--done { background: var(--cow-success-soft); color: var(--cow-success); }
.cow-process-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 15px 0;
  border-bottom: 1px solid var(--cow-line);
}
.cow-process-card strong,
.cow-process-card small { display: block; }
.cow-process-card small { margin-top: 2px; color: var(--cow-muted); font-size: 13px; }
.cow-selfservice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
}
.cow-inline-action,
.cow-footer-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cow-navy);
  text-align: left;
}
.cow-inline-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-weight: 700;
}
.cow-footer-link:hover,
.cow-inline-action:hover { color: var(--cow-red); }
.cow-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
body.cow-app textarea {
  width: 100%;
  padding: 12px 14px;
  resize: vertical;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-sm);
  background: white;
  color: var(--cow-text);
  font: inherit;
  outline: none;
}
body.cow-app textarea:focus {
  border-color: var(--cow-navy);
  box-shadow: 0 0 0 4px rgba(37,52,111,.09);
}
.cow-request-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 15px;
  margin-bottom: 18px;
  padding: 15px 17px;
  border-radius: var(--cow-radius-sm);
  background: var(--cow-blue-soft);
}
.cow-request-summary span,
.cow-request-summary small { color: var(--cow-muted); }
.cow-request-summary strong { color: var(--cow-navy); font-size: 23px; }
.cow-request-summary small { grid-column: 1 / -1; }
.cow-cart-approval.is-danger {
  background: var(--cow-danger-soft);
  color: var(--cow-red-dark);
}
.cow-no-results {
  display: none;
  padding: 70px 20px;
  text-align: center;
  border: 1px dashed var(--cow-line);
  border-radius: var(--cow-radius);
  background: white;
}
.cow-no-results.is-visible { display: block; }
.cow-no-results i { color: var(--cow-navy); font-size: 36px; }
.cow-no-results h2 { margin: 12px 0 4px; color: var(--cow-navy); }
.cow-no-results p { margin: 0; color: var(--cow-muted); }
.cow-product-card[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .cow-action-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cow-selfservice-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cow-action-grid--four { grid-template-columns: 1fr; }
  .cow-form-grid { grid-template-columns: 1fr; }
  .cow-order-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .cow-order-row > div:nth-child(3) { grid-column: 2 / -1; }
  .cow-order-row > button { grid-column: 2 / -1; justify-self: start; }
  .cow-process-card { grid-template-columns: 40px minmax(0, 1fr); }
  .cow-process-card .cow-status { grid-column: 2; }
  .cow-hero__actions .cow-button { width: 100%; }
}


/* V29: Startseiten-Fokus und robuste Abstände unter dem Sticky Header */
html { scroll-padding-top: 190px; }
.cow-main {
  position: relative;
  z-index: 1;
  padding-top: 38px;
}
.cow-main .cow-shell > :first-child { margin-top: 0; }
.cow-hero {
  min-height: 310px;
  margin-top: 0;
  isolation: isolate;
}
.cow-hero img {
  width: 100%;
  height: 310px;
  min-height: 310px;
}
.cow-hero__panel {
  top: auto;
  bottom: 26px;
  max-height: calc(100% - 52px);
  overflow: auto;
}
.cow-section,
.cow-dashboard-grid { scroll-margin-top: 190px; }
.cow-section { position: relative; z-index: 1; }
.cow-dashboard-grid { position: relative; z-index: 2; }

@media (max-width: 760px) {
  html { scroll-padding-top: 118px; }
  .cow-main { padding-top: 20px; }
  .cow-hero { min-height: 0; overflow: visible; }
  .cow-hero img { height: 190px; min-height: 190px; border-radius: var(--cow-radius-lg) var(--cow-radius-lg) 0 0; }
  .cow-hero__panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    max-width: none;
    max-height: none;
    overflow: visible;
    margin: 0;
    border-radius: 0 0 var(--cow-radius-lg) var(--cow-radius-lg);
  }
  .cow-section,
  .cow-dashboard-grid { scroll-margin-top: 118px; }
}


/* V30: Originales Headerbild und separater Willkommen-Block */
.cow-main {
  padding-top: 30px;
}
.cow-welcome-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  margin: 0 0 18px;
  padding: 22px 26px;
  border: 1px solid var(--cow-line);
  border-radius: var(--cow-radius-lg);
  background: var(--cow-surface);
  box-shadow: var(--cow-shadow-sm);
}
.cow-welcome-block__content {
  min-width: 0;
  max-width: 760px;
}
.cow-welcome-block .cow-hero__title {
  margin-top: 4px;
}
.cow-welcome-block .cow-hero__actions {
  flex: 0 0 auto;
  margin: 0;
}
.cow-hero--image-only {
  min-height: 0;
  margin: 0;
  overflow: hidden;
}
.cow-hero--image-only img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
}
@media (max-width: 760px) {
  .cow-welcome-block {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }
  .cow-welcome-block .cow-hero__actions {
    width: 100%;
  }
  .cow-hero--image-only img {
    height: auto;
    min-height: 0;
    border-radius: var(--cow-radius-lg);
    object-position: center;
  }
}

[x-cloak] { display: none !important; }
