:root {
  color-scheme: light;
  --pb-primary: #080957;
  --pb-primary-soft: #11136f;
  --pb-primary-muted: #25276f;
  --pb-light: #DBDBEB;
  --pb-light-soft: #F3F3FA;
  --pb-white: #FFFFFF;
  --pb-text: #151525;
  --pb-muted: #5F6078;
  --pb-border: #D9DAEA;
  --ink: var(--pb-text);
  --muted: var(--pb-muted);
  --paper: var(--pb-white);
  --paper-strong: #F7F7FC;
  --line: var(--pb-border);
  --accent: var(--pb-primary);
  --accent-strong: var(--pb-primary-soft);
  --blue: var(--pb-primary-muted);
  --green: var(--pb-primary);
  --rose: var(--pb-primary-soft);
  --warn: #8b4b00;
  --shadow: 0 18px 42px rgba(8, 9, 87, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--pb-light-soft);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(8, 9, 87, 0.06);
  backdrop-filter: blur(14px);
}

body.is-start .topbar {
  justify-content: center;
}

body.is-start {
  min-height: 100vh;
}

body.is-start main {
  display: flex;
  min-height: calc(100vh - 84px);
  flex-direction: column;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--pb-primary);
  text-decoration: none;
}

.brand-logo-link {
  flex-direction: column;
  justify-content: center;
  gap: 0;
  text-align: center;
}

.pb-logo {
  width: min(270px, 62vw);
  max-height: 76px;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand-logo-link small {
  color: var(--pb-muted);
  font-weight: 900;
}

.brand small,
.eyebrow,
.results-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.topbar nav {
  display: none;
  gap: 18px;
}

.topbar nav a {
  color: var(--pb-primary-muted);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.topbar nav a:hover {
  color: var(--pb-primary);
}

.hero {
  display: grid;
  min-height: 64vh;
  align-items: end;
  gap: 28px;
  padding: clamp(42px, 10vw, 96px) clamp(16px, 4vw, 56px) 32px;
  background:
    linear-gradient(145deg, rgba(8, 9, 87, 0.94), rgba(17, 19, 111, 0.88)),
    linear-gradient(90deg, var(--pb-primary), var(--pb-primary-soft));
  color: var(--pb-white);
}

.start-hero {
  width: min(980px, 100%);
  min-height: auto;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 44px) 24px 10px;
  background: var(--pb-light-soft);
  color: var(--pb-text);
  text-align: center;
}

.start-hero > div {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--pb-light);
}

.start-hero .eyebrow {
  color: var(--pb-muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 8vw, 5.8rem);
  line-height: 0.98;
}

.start-hero h1 {
  max-width: none;
  margin: 0 auto;
  color: var(--pb-primary);
  font-size: clamp(1.75rem, 4vw, 2.55rem);
  line-height: 1.12;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  color: #ECECF8;
  font-size: 1.08rem;
  line-height: 1.58;
}

.primary-action,
.card-button,
.request-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--pb-primary);
  border-radius: 7px;
  background: var(--pb-primary);
  color: var(--pb-white);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.primary-action {
  padding: 0 18px;
  border-color: var(--pb-white);
}

.primary-action:hover,
.card-button:hover,
.request-button:hover {
  background: var(--pb-primary-soft);
  border-color: var(--pb-primary-soft);
  transform: translateY(-1px);
}

.brand-overview {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 360px));
  gap: 14px;
  justify-content: center;
  justify-items: center;
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 56px);
}

body.is-start .brand-overview {
  width: min(1080px, 100%);
  padding: clamp(14px, 3vw, 24px) 24px clamp(40px, 8vw, 78px);
}

.quick-overview {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  justify-content: center;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 56px) 22px;
}

.quick-overview:empty,
body.is-start .quick-overview {
  display: none;
}

.quick-tile {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  padding: 14px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(8, 9, 87, 0.06);
}

.quick-tile:hover,
.brand-card:hover,
.product-card:hover {
  border-color: #BFC1DE;
  box-shadow: 0 18px 34px rgba(8, 9, 87, 0.12);
}

.quick-tile strong,
.quick-tile small {
  display: block;
}

.quick-tile strong {
  color: var(--pb-primary);
}

.quick-tile small {
  margin-top: 4px;
  color: var(--muted);
}

.brand-card {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--pb-primary);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 25px rgba(8, 9, 87, 0.08);
  cursor: pointer;
}

.animal-card {
  display: grid;
  overflow: hidden;
  width: min(100%, 390px);
  min-height: 330px;
  border: 1px solid var(--pb-border);
  border-top: 5px solid var(--pb-primary);
  border-radius: 10px;
  background: var(--pb-white);
  box-shadow: 0 12px 30px rgba(8, 9, 87, 0.09);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.animal-card:hover {
  border-color: #BFC1DE;
  box-shadow: 0 18px 34px rgba(8, 9, 87, 0.12);
  transform: translateY(-2px);
}

.animal-card:focus-visible {
  outline: 3px solid rgba(8, 9, 87, 0.22);
  outline-offset: 3px;
}

.animal-image {
  display: grid;
  min-height: 210px;
  padding: 18px 18px 0;
  place-items: center;
}

.animal-image img {
  width: 100%;
  max-height: 210px;
  object-fit: contain;
}

.animal-body {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 0 24px 28px;
}

.animal-body h2 {
  margin: 0;
  color: var(--pb-primary);
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.1;
}

.animal-body p {
  margin: 0;
  color: var(--pb-muted);
  font-weight: 800;
  line-height: 1.4;
}

body.is-start .brand-card {
  display: grid;
  width: min(100%, 380px);
  min-height: 220px;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 34px);
  text-align: center;
}

.brand-card:focus-visible {
  outline: 3px solid rgba(8, 9, 87, 0.22);
  outline-offset: 3px;
}

.brand-logo-wrap {
  display: grid;
  min-height: 78px;
  place-items: center;
  width: 100%;
}

.brand-logo-img {
  display: block;
  width: min(260px, 72%);
  max-height: 76px;
  object-fit: contain;
}

.brand-logo-img.is-missing {
  display: none;
}

.brand-logo-text {
  display: none;
  color: var(--pb-primary);
  font-size: clamp(2rem, 5.6vw, 3.05rem);
  font-weight: 950;
  line-height: 0.95;
}

.brand-logo-img.is-missing + .brand-logo-text {
  display: block;
}

.brand-hint {
  margin: 2px 0 0;
  color: var(--pb-muted);
  font-size: 1rem;
  font-weight: 900;
}

.brand-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.brand-chips span {
  border: 1px solid var(--pb-border);
  border-radius: 999px;
  background: var(--pb-light-soft);
  color: var(--pb-primary);
  font-size: 0.84rem;
  font-weight: 900;
  padding: 7px 10px;
}

.brand-card span {
  color: var(--pb-primary);
  font-weight: 900;
}

.brand-card h2 {
  margin: 46px 0 8px;
  color: var(--pb-primary);
  font-size: clamp(1.6rem, 6vw, 2.5rem);
}

.dog,
.craft,
.cat,
.nav-card.dog,
.nav-card.craft,
.nav-card.cat {
  border-top: 5px solid var(--pb-primary);
}

.catalog-shell {
  display: grid;
  width: min(1500px, 100%);
  gap: 18px;
  margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 56px) 56px;
}

body.is-start .catalog-shell {
  display: none;
}

body.is-catalog .start-hero,
body.is-catalog .brand-overview {
  display: none;
}

.filters,
.results {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(8, 9, 87, 0.07);
}

.filters {
  padding: 16px;
}

.search-box label,
.filter-grid label,
.filters > label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--pb-white);
  color: var(--ink);
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: var(--pb-primary);
  outline: 3px solid rgba(8, 9, 87, 0.12);
}

details {
  margin-top: 14px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

.filter-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.filter-grid label.is-hidden {
  display: none;
}

.reset-filter-button {
  width: 100%;
  min-height: 40px;
  margin-top: 14px;
  border: 1px solid var(--pb-border);
  border-radius: 7px;
  background: var(--pb-light-soft);
  color: var(--pb-primary);
  cursor: pointer;
  font-weight: 900;
}

.reset-filter-button:hover {
  border-color: var(--pb-primary);
  background: var(--pb-white);
}

.quick-filters,
.line-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.quick-filters button,
.line-chips button,
.breadcrumb button {
  min-height: 34px;
  border: 1px solid var(--pb-border);
  border-radius: 999px;
  background: var(--pb-light-soft);
  color: var(--pb-primary);
  cursor: pointer;
  padding: 0 12px;
  font-weight: 900;
}

.quick-filters button:hover,
.line-chips button:hover,
.breadcrumb button:hover:not(:disabled) {
  border-color: var(--pb-primary);
  background: var(--pb-white);
}

.quick-filters button.is-active,
.line-chips button.is-active {
  border-color: var(--pb-primary);
  background: var(--pb-primary);
  color: var(--pb-white);
}

.results {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.results-head {
  display: flex;
  width: min(1120px, 100%);
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 10px;
  text-align: center;
  flex-wrap: wrap;
}

.results-head h2 {
  margin-bottom: 0;
  color: var(--pb-primary);
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.catalog-grid {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 340px));
  gap: 14px;
  justify-content: center;
  justify-items: stretch;
  margin-top: 18px;
}

.breadcrumb {
  display: flex;
  width: min(1120px, 100%);
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.breadcrumb button:disabled {
  cursor: default;
  opacity: 0.68;
}

.nav-card {
  min-height: 210px;
}

.nav-card .product-body {
  grid-column: 1 / -1;
  align-content: space-between;
}

.product-card {
  position: relative;
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--pb-primary);
  border-radius: 8px;
  background: var(--pb-white);
  box-shadow: 0 8px 22px rgba(8, 9, 87, 0.06);
}

.product-image {
  display: grid;
  min-height: 220px;
  place-items: center;
  background: linear-gradient(180deg, var(--pb-light-soft), #FFFFFF);
}

.product-image img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  padding: 18px;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.product-meta,
.badges,
.variant-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.product-meta span,
.badge,
.variant-preview span,
.status {
  border-radius: 999px;
  background: var(--pb-light-soft);
  border: 1px solid var(--pb-border);
  color: var(--pb-primary);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 5px 9px;
}

.status.sicher {
  background: #eef7f0;
  color: #24543a;
}

.status.wahrscheinlich {
  background: #fff7dc;
  color: #6f5100;
}

.status.fehlt,
.status.manuell-pruefen {
  background: #fff0ed;
  color: #8a2e20;
}

.product-card h3 {
  margin: 0;
  color: var(--pb-primary);
  font-size: 1.28rem;
}

.product-card p {
  color: var(--muted);
  line-height: 1.45;
}

.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--pb-primary);
  font-weight: 900;
}

.card-button {
  width: 100%;
}

.empty-state {
  padding: 36px 12px;
  color: var(--muted);
  text-align: center;
}

.detail-dialog {
  width: min(960px, calc(100vw - 24px));
  max-height: min(86dvh, 920px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--pb-white);
  box-shadow: var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

@supports not (height: 1dvh) {
  .detail-dialog {
    max-height: min(86vh, 920px);
  }
}

.detail-dialog::backdrop {
  background: rgba(8, 9, 87, 0.52);
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: var(--pb-primary);
  color: var(--pb-white);
  cursor: pointer;
  font-size: 1.5rem;
}

.detail-dialog[open] .dialog-close {
  position: sticky;
  float: right;
  margin: 10px 10px 0 0;
}

.detail-layout {
  display: grid;
  clear: both;
}

.detail-media {
  display: grid;
  min-height: 280px;
  place-items: center;
  background: linear-gradient(180deg, var(--pb-light-soft), #FFFFFF);
}

.detail-media img {
  max-height: 430px;
  object-fit: contain;
  padding: 24px;
}

.detail-main {
  padding: 22px;
}

.detail-main h2 {
  margin-bottom: 8px;
  color: var(--pb-primary);
  font-size: clamp(1.8rem, 6vw, 3rem);
}

.variant-table {
  width: 100%;
  margin-top: 18px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.variant-table th,
.variant-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.variant-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.request-button {
  min-height: 34px;
  padding: 0 10px;
  white-space: nowrap;
}

.required-info {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: transparent;
}

.required-accordion {
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--pb-primary);
  border-radius: 8px;
  background: var(--pb-white);
}

.required-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 13px 15px;
  color: var(--pb-primary);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  list-style: none;
}

.required-accordion summary::-webkit-details-marker {
  display: none;
}

.required-accordion summary::after {
  content: "›";
  flex: 0 0 auto;
  color: var(--pb-primary);
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(90deg);
  transition: transform 0.16s ease;
}

.required-accordion[open] summary::after {
  transform: rotate(-90deg);
}

.required-content {
  padding: 14px 15px 16px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 0.98rem;
  line-height: 1.58;
  white-space: pre-wrap;
}

.required-content p {
  margin: 0 0 12px;
}

.required-content p:last-child {
  margin-bottom: 0;
}

.feeding-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--pb-white);
}

.feeding-table {
  width: 100%;
  min-width: 420px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.feeding-table th,
.feeding-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.feeding-table th {
  background: var(--pb-light-soft);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.feeding-table td:not(:first-child),
.feeding-table th:not(:first-child) {
  text-align: right;
}

.feeding-table tr:last-child td {
  border-bottom: 0;
}

@media (min-width: 760px) {
  .topbar nav {
    display: flex;
  }

  .hero {
    grid-template-columns: minmax(0, 760px);
  }

  body.is-start .start-hero {
    display: flex;
  }

  .brand-overview {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  }

  body.is-start .brand-overview {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  }

  body.is-start .brand-overview.animal-overview {
    grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  }

  .quick-overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
  }

  .product-card {
    grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
  }

  .detail-layout {
    grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
  }
}

@media (min-width: 1120px) {
  .catalog-shell {
    grid-template-columns: 310px minmax(0, 1fr);
    align-items: start;
  }

  .filters {
    position: sticky;
    top: 86px;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 340px));
  }

  .product-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: center;
  }

  .brand {
    min-width: 0;
  }

  .brand span:last-child {
    min-width: 0;
  }

  .pb-logo {
    width: min(240px, 76vw);
    max-height: 68px;
  }

  .brand-logo-img {
    width: min(230px, 82%);
    max-height: 68px;
  }

  .results-head {
    align-items: center;
    flex-direction: column;
  }

  .detail-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }

  @supports not (height: 1dvh) {
    .detail-dialog {
      max-height: 100vh;
    }
  }

  .detail-media {
    min-height: 190px;
  }

  .detail-media img {
    max-width: 100%;
    max-height: 280px;
    padding: 16px;
  }

  .detail-main {
    padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
  }

  .detail-main h2 {
    font-size: clamp(1.45rem, 9vw, 2.15rem);
  }

  .quick-filters button,
  .line-chips button {
    flex: 1 1 auto;
  }

  .variant-table,
  .variant-table tbody,
  .variant-table tr,
  .variant-table td {
    display: block;
    width: 100%;
  }

  .variant-table thead {
    display: none;
  }

  .variant-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .variant-table td {
    padding: 5px 0;
    border-bottom: 0;
  }

  .variant-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .request-button {
    width: 100%;
    margin-top: 4px;
  }
}
