/* Farbkonzept angelehnt an purmax.de. Werte sind Vorgaben und werden über
   /theme.css aus den Shop-Einstellungen überschrieben. */
:root {
  color-scheme: light;
  --primary: #002549;
  --primary-hover: #003f7c;
  --accent: #acc600;
  --accent-ink: #002549;
  --text: #383838;
  --surface: #f5f5f8;
  --surface-2: #f8f8fa;
  --line: #dadae5;
  --muted: #4f4f71;
  --success: #458746;
  --danger: #c0392b;
  --white: #fff;
  --radius: 4px;
  --shadow: 0 6px 24px rgba(0, 37, 73, .1);
  --font: "Open Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 15px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { color: var(--primary); line-height: 1.25; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); font-size: 13px; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--primary); color: var(--white); }
.skip-link:focus { top: 8px; color: var(--white); }

/* Kopfbereich */
.topbar { background: var(--primary); color: rgba(255, 255, 255, .9); font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 7px; padding-bottom: 7px; }
.topbar-note { color: var(--accent); font-weight: 600; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 84px; }
.brand { display: flex; flex-direction: column; justify-content: center; gap: 2px; flex: 0 0 auto; text-decoration: none; }
.brand-logo { display: block; max-height: 52px; max-width: 220px; width: auto; height: auto; }
.brand-name { color: var(--primary); font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.brand-claim { color: var(--muted); font-size: 12px; }
.header-search { position: relative; display: flex; flex: 1; max-width: 560px; }
.header-search input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--surface-2); }
.header-search input:focus { border-color: var(--primary); background: var(--white); outline: none; }
.header-search button { width: 52px; border: 0; border-radius: 0 var(--radius) var(--radius) 0; background: var(--primary); cursor: pointer; }
.header-search button:hover { background: var(--primary-hover); }
.header-search svg { width: 20px; height: 20px; fill: none; stroke: var(--white); stroke-width: 2.2; stroke-linecap: round; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-radius: var(--radius); background: none; color: var(--primary); font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.header-button:hover { background: var(--surface); color: var(--primary); }
.header-button svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cart-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 700; }
.cart-count.empty { background: var(--line); color: var(--muted); }
.main-nav { background: var(--primary); }
.main-nav ul { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.main-nav a { display: block; padding: 13px 16px; color: var(--white); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.main-nav a:hover { background: var(--primary-hover); color: var(--white); }
.main-nav a[aria-current] { border-bottom-color: var(--accent); }

/* Schaltflächen und Formulare */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius); font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button-primary { background: var(--primary); color: var(--white); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); color: var(--white); }
.button-accent { background: var(--accent); color: var(--accent-ink); }
.button-accent:hover:not(:disabled) { filter: brightness(.94); color: var(--accent-ink); }
.button-ghost { border-color: rgba(255, 255, 255, .6); background: transparent; color: var(--white); }
.button-ghost:hover { background: rgba(255, 255, 255, .1); color: var(--white); }
.button-ghost-dark { border-color: var(--primary); background: transparent; color: var(--primary); }
.button-ghost-dark:hover { background: var(--surface); }
.button-danger { border-color: var(--danger); background: transparent; color: var(--danger); }
.button-danger:hover { background: #fbeceb; }
.button-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.full { grid-column: 1 / -1; width: 100%; }
.link-button { padding: 0; border: 0; background: none; color: var(--primary); font-size: 13px; text-decoration: underline; cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.field { display: flex; flex-direction: column; gap: 5px; color: var(--primary); font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--text); font-size: 15px; font-weight: 400; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0, 37, 73, .12); }
.field small { color: var(--muted); font-weight: 400; }
.form-footnote { margin: 0; color: var(--muted); font-size: 13px; }
.form-message { min-height: 20px; margin: 14px 0 0; color: var(--success); font-size: 14px; }
.form-message.error, .error-text { color: var(--danger); }
.form-tabs { display: flex; gap: 24px; margin: 0 0 20px; border-bottom: 1px solid var(--line); }
.form-tab { padding: 0 0 10px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.form-tab.active { border-color: var(--accent); color: var(--primary); }
.quantity-input { display: inline-flex; align-items: stretch; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.quantity-input button { width: 34px; border: 0; background: var(--surface); color: var(--primary); font-size: 18px; cursor: pointer; }
.quantity-input button:hover { background: var(--line); }
.quantity-input input { width: 56px; border: 0; text-align: center; -moz-appearance: textfield; }
.quantity-input input::-webkit-inner-spin-button, .quantity-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.badge { display: inline-block; padding: 1px 7px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }

/* Startseite */
.hero { background: linear-gradient(120deg, var(--primary) 0%, var(--primary) 55%, var(--primary-hover) 100%); color: var(--white); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 0; color: var(--white); font-size: clamp(30px, 4vw, 46px); }
.hero-text { max-width: 620px; margin: 18px 0 28px; color: rgba(255, 255, 255, .85); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { display: grid; gap: 14px; }
.hero-facts p { display: flex; flex-direction: column; min-width: 190px; margin: 0; padding: 16px 20px; border-left: 4px solid var(--accent); background: rgba(255, 255, 255, .07); }
.hero-facts strong { color: var(--white); font-size: 32px; line-height: 1.1; }
.hero-facts span { color: rgba(255, 255, 255, .8); font-size: 13px; }
.trust { border-bottom: 1px solid var(--line); background: var(--surface); }
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0 auto; padding-top: 22px; padding-bottom: 22px; list-style: none; }
.trust-list li { display: flex; align-items: flex-start; gap: 12px; }
.trust-list svg { flex: 0 0 28px; width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--accent); fill: none; stroke: var(--accent-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.trust-list strong { display: block; color: var(--primary); font-size: 14px; }
.trust-list span { color: var(--muted); font-size: 13px; }
.cta { background: var(--surface); border-top: 1px solid var(--line); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-top: 44px; padding-bottom: 44px; }
.cta h2 { margin: 0 0 6px; font-size: 26px; }
.cta p { margin: 0; color: var(--muted); }

/* Kataloglisten */
.catalog { padding-top: 40px; padding-bottom: 56px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 22px; padding-bottom: 12px; border-bottom: 2px solid var(--primary); }
.section-head h1, .section-head h2 { margin: 0; font-size: 28px; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.product-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: box-shadow .2s, border-color .2s; }
.product-card:hover { border-color: #c5c5d6; box-shadow: var(--shadow); }
/* Nicht verfügbare Artikel leicht ausblenden (Deckkraft in der Verwaltung einstellbar). */
/* Vaterartikel: Ausführungen */
.product-variants { margin: 16px 0; }
.product-variants h2 { margin: 0 0 6px; font-size: 18px; }
.product-variants ul { margin: 8px 0 0; padding: 0; list-style: none; }
.product-variants li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.variant-list { display: grid; gap: 12px; margin: 8px 0; }
.variant-row { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.variant-info { display: grid; gap: 2px; }
.variant-row.has-image { grid-template-columns: 64px 1fr; }
.variant-row.has-image .buy-row { grid-column: 1 / -1; }
.variant-thumb { width: 64px; height: 64px; padding: 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: zoom-in; }
.variant-thumb img { width: 100%; height: 100%; object-fit: contain; }
.variant-info .price { margin: 4px 0 0; }
.product-card.is-unavailable { opacity: var(--unavailable-opacity, .8); transition: opacity .2s, box-shadow .2s, border-color .2s; }
.product-card.is-unavailable:hover, .product-card.is-unavailable:focus-within { opacity: 1; }
.product-image { display: grid; place-items: center; aspect-ratio: 1; padding: 14px; background: var(--white); border-bottom: 1px solid var(--line); }
.product-image img { width: 100%; height: 100%; object-fit: contain; }
/* Bei Mausberührung dreht sich das Bild und zeigt das zweite Artikelbild. */
.product-image.has-flip { perspective: 1200px; }
.flip-inner { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .6s ease; }
.flip-inner img { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: var(--white); }
.flip-inner .flip-back { transform: rotateY(180deg); }
@media (hover: hover) {
  .product-image:hover .flip-inner { transform: rotateY(180deg); }
}
.image-placeholder, img.broken { display: grid; place-items: center; width: 100%; height: 100%; background: var(--surface); color: var(--muted); font-size: 13px; }
.product-body { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.product-meta { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.product-title { margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.product-title a { color: var(--primary); text-decoration: none; }
.product-title a:hover { text-decoration: underline; }
.product-sku { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.product-description { display: -webkit-box; margin: 0 0 10px; overflow: hidden; color: var(--text); font-size: 13px; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.stock { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.stock::before { width: 9px; height: 9px; border-radius: 50%; background: currentColor; content: ""; }
.in-stock { color: var(--success); }
.out-of-stock { color: var(--danger); }
.price-slot { margin-top: auto; }
.price-locked { display: block; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); color: var(--muted); font-size: 13px; }
.price { margin: 0; color: var(--primary); }
.price strong { font-size: 20px; }
.price span { color: var(--muted); font-size: 12px; }
.price-tier { margin: 0 0 10px; color: var(--success); font-size: 13px; font-weight: 600; }
.card-buy { display: flex; gap: 8px; }
.card-buy .quantity-input input { width: 42px; }
.card-buy .button { flex: 1; padding: 0 10px; font-size: 14px; }
.empty-state { padding: 48px 16px; border: 1px dashed var(--line); text-align: center; color: var(--muted); }

/* Brotkrumen und Artikelseite */
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 16px 0 0; list-style: none; font-size: 13px; }
.breadcrumbs li + li::before { margin-right: 6px; color: var(--muted); content: "›"; }
.breadcrumbs [aria-current] { color: var(--muted); }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; padding-top: 24px; padding-bottom: 56px; }
.gallery-main { display: grid; place-items: center; aspect-ratio: 1; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.gallery-thumbs a { display: block; width: 76px; height: 76px; padding: 4px; border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); }
.gallery-thumbs a[aria-current] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { margin: 0 0 6px; font-size: clamp(24px, 3vw, 32px); }
.product-lede { color: var(--text); }
.buy-box { margin-top: 18px; padding: 20px; border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: var(--radius); background: var(--surface-2); }
.buy-box-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.price-large strong { font-size: 30px; }
.tier-table { width: 100%; margin: 16px 0; border-collapse: collapse; background: var(--white); font-size: 14px; }
.tier-table caption { padding-bottom: 6px; color: var(--primary); font-weight: 700; text-align: left; }
.tier-table th, .tier-table td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.tier-table th { background: var(--surface); color: var(--primary); }
.tier-table tr.active td { background: #f4f9dc; font-weight: 700; }
.buy-row { display: flex; gap: 10px; margin-top: 12px; }
.buy-row .button { flex: 1; }
.buy-line { margin: 10px 0 0; color: var(--primary); font-weight: 600; }
.buy-hint { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.product-description-full, .product-specs { grid-column: 1 / -1; }
.product-description-full h2, .product-specs h2 { margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); font-size: 22px; }
.product-description-full { max-width: 900px; }
.product-specs table { width: 100%; max-width: 900px; border-collapse: collapse; }
.product-specs th, .product-specs td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.product-specs th { width: 34%; background: var(--surface); color: var(--primary); font-weight: 600; }
.text-page { max-width: 900px; padding-top: 24px; padding-bottom: 64px; }
.text-page h1 { font-size: 32px; }

/* Fußzeile */
.site-footer { margin-top: 0; background: var(--primary); color: rgba(255, 255, 255, .82); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 28px; }
.footer-grid p { margin: 0 0 6px; }
.footer-brand { color: var(--white); font-size: 20px; font-weight: 800; }
.footer-heading { color: var(--accent); font-weight: 700; }
.site-footer a { color: var(--white); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: 20px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: 13px; }
.footer-links { display: flex; gap: 18px; }

/* Dialoge */
dialog { border: 0; padding: 0; color: var(--text); }
dialog::backdrop { background: rgba(0, 20, 40, .55); }
.drawer { position: fixed; inset: 0 0 0 auto; width: min(520px, 100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 32px 28px; overflow-y: auto; background: var(--white); box-shadow: -10px 0 40px rgba(0, 0, 0, .2); }
.drawer-wide { width: min(640px, 100%); }
.modal { width: min(560px, calc(100% - 32px)); padding: 32px 28px; border-top: 5px solid var(--accent); border-radius: var(--radius); }
dialog h2 { margin: 0 0 6px; font-size: 26px; }
.dialog-lede { margin: 0 0 20px; color: var(--muted); }
.dialog-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--primary); font-size: 28px; line-height: 1; cursor: pointer; }
.dialog-close:hover { background: var(--surface); }
.cart-lines { display: grid; gap: 0; margin-top: 18px; }
.cart-line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { display: grid; place-items: center; width: 72px; height: 72px; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.cart-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cart-line h3 { margin: 0 0 2px; font-size: 15px; }
.cart-line h3 a { text-decoration: none; }
.cart-line p { margin: 0 0 2px; }
.cart-line-actions { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.cart-line-actions .quantity-input { height: 36px; }
.cart-line-total { margin: 0; color: var(--primary); font-weight: 700; white-space: nowrap; }
.cart-empty { padding: 28px 0; color: var(--muted); text-align: center; }
.cart-problems:not(:empty) { margin: 16px 0 0; padding: 12px 14px; border-left: 4px solid var(--danger); background: #fbeceb; color: #7b241c; font-size: 14px; }
.cart-problems ul { margin: 0 0 6px; padding-left: 18px; }
.cart-summary { display: grid; gap: 6px; margin: 18px 0; font-size: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 16px; }
.summary-subtotal { padding-top: 6px; border-top: 1px solid var(--line); font-weight: 600; }
.summary-total { padding-top: 10px; border-top: 2px solid var(--primary); color: var(--primary); font-size: 18px; font-weight: 800; }
.checkout-form { display: grid; gap: 14px; }
.checkout-address { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); font-size: 14px; }
.checkout-address address { font-style: normal; }
.checkout-label { margin: 0 0 4px; color: var(--primary); font-weight: 700; }
.checkout-address-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.delivery-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin: 10px 0 12px; }
@media (max-width: 560px) { .delivery-fields { grid-template-columns: 1fr; } }
.address-load { margin: 10px 0 4px; }
.saved-addresses { margin-top: 10px; }
.saved-addresses summary { cursor: pointer; color: var(--primary); font-weight: 600; }
.saved-addresses ul { margin: 8px 0 0; padding: 0; list-style: none; }
.saved-addresses li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.saved-address-actions { display: flex; gap: 12px; flex-shrink: 0; }
.payment-method { margin: 0; padding: 12px 14px; border-left: 4px solid var(--accent); background: var(--surface); }
.payment-note { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.payment-note p { margin: 0 0 6px; }
.checkout-hint { margin: 0; color: var(--muted); font-size: 13px; }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(440px, calc(100% - 40px)); padding: 14px 18px; border-left: 5px solid var(--accent); border-radius: var(--radius); background: var(--primary); color: var(--white); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; }
.toast.error { border-left-color: var(--danger); }
.toast.visible { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; gap: 12px 20px; padding-top: 12px; padding-bottom: 12px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .hero-facts { grid-template-columns: 1fr 1fr; }
  .trust-list { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .topbar-note { display: none; }
  .header-button span:not(.cart-count) { display: none; }
  .header-button#admin-link { display: none; }
  .brand-name { font-size: 20px; }
  .brand-claim { display: none; }
  .hero-facts p { min-width: 0; }
  .trust-list { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-body { padding: 10px 12px 12px; }
  .card-buy { flex-direction: column; }
  .card-buy .quantity-input { width: 100%; }
  .card-buy .quantity-input input { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .drawer { padding: 28px 16px; }
  .cart-line { grid-template-columns: 56px minmax(0, 1fr); }
  .cart-thumb { width: 56px; height: 56px; }
  .cart-line-total { grid-column: 2; }
  .buy-row { flex-direction: column; }
}

/* Rechtliche Hinweise */
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }
.b2b-notice { margin-top: 10px !important; font-size: 13px; color: rgba(255, 255, 255, .7); }
.price-strike { margin-left: 6px; color: var(--muted); font-size: 13px; text-decoration: line-through; }
.price-label { display: block; color: var(--success); font-size: 12px; font-weight: 700; }

/* Sprachumschaltung */
.topbar-right { display: flex; align-items: center; gap: 16px; }
.language-switch ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.language-switch a { display: block; padding: 1px 7px; border-radius: 3px; color: rgba(255, 255, 255, .85); font-size: 12px; font-weight: 700; text-decoration: none; }
.language-switch a:hover { background: var(--primary-hover); color: var(--white); }
.language-switch a[aria-current] { background: var(--accent); color: var(--accent-ink); }
.notice-inline { padding: 10px 14px; border-left: 4px solid var(--accent); background: var(--surface); font-size: 14px; }
@media (max-width: 600px) {
  .topbar-inner > span:first-child { display: none; }
  .topbar-inner { justify-content: flex-end; }
}

/* Kategorienavigation: Unterkategorien als Dropdown per Klick */
.main-nav { position: relative; }
.main-nav .nav-root { flex-wrap: wrap; overflow: visible; }
.main-nav .nav-root > li { position: relative; }
.nav-toggle { display: flex; align-items: center; gap: 6px; height: 100%; padding: 13px 14px 13px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--white); font-size: 14px; font-weight: 600; white-space: nowrap; cursor: pointer; }
.nav-toggle:hover, .has-children.open > .nav-toggle { background: var(--primary-hover); }
.nav-toggle.is-active { border-bottom-color: var(--accent); }
.nav-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.has-children.open > .nav-toggle svg { transform: rotate(180deg); }
.main-nav .subnav { position: absolute; top: 100%; left: 0; z-index: 30; min-width: 300px; max-height: min(70vh, 560px); overflow-y: auto; padding: 8px 0; border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 0 0 var(--radius) var(--radius); background: var(--white); box-shadow: var(--shadow); visibility: hidden; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s; }
.has-children.open > .subnav,
html:not(.js) .has-children:hover > .subnav,
html:not(.js) .has-children:focus-within > .subnav { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .18s ease, transform .18s ease; }
.main-nav .subnav ul { display: block; margin: 0; padding: 0; overflow: visible; list-style: none; }
.main-nav .subnav a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 18px; border-bottom: 0; color: var(--primary); white-space: normal; }
.main-nav .subnav a:hover, .main-nav .subnav a[aria-current] { background: var(--surface); color: var(--primary); }
.main-nav .subnav .subnav-all { margin-bottom: 4px; border-bottom: 1px solid var(--line); font-weight: 700; }
.main-nav .subnav ul ul a { padding-left: 34px; font-weight: 400; }
.nav-count-small { color: var(--muted); font-size: 12px; font-weight: 400; }
/* Kopfbereich, Navigation und Brotkrumen bleiben stehen; gescrollt wird nur der Inhalt
   darunter. Nur auf ausreichend großen Bildschirmen, damit mobil genug Platz bleibt. */
@media (min-width: 901px) and (min-height: 600px) {
  html { scroll-padding-top: calc(var(--page-top-height, 0px) + 64px); }
  .page-top { position: sticky; top: 0; z-index: 40; }
  .breadcrumb-bar { position: sticky; top: var(--page-top-height, 0px); z-index: 35; padding-bottom: 12px; border-bottom: 1px solid var(--line); background: var(--white); }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav .subnav, .nav-toggle svg { transition: none; }
  /* Statt Drehung sanft überblenden. */
  .flip-inner, .product-image:hover .flip-inner { transform: none; transition: none; }
  .flip-inner .flip-back { transform: none; opacity: 0; transition: opacity .3s ease; }
  .product-image:hover .flip-inner .flip-back { opacity: 1; }
}
@media (max-width: 960px) {
  /* Waagerecht scrollende Leiste; das Menü öffnet in voller Breite darunter. */
  .main-nav .nav-root { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .main-nav .nav-root::-webkit-scrollbar { display: none; }
  .main-nav .nav-root > li { position: static; }
  .main-nav .subnav { left: 0; right: 0; min-width: 0; border-radius: 0; }
}
.category-overview { padding-top: 36px; }
.category-overview h2 { margin: 0 0 14px; font-size: 22px; }
.category-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.category-tiles a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--white); color: var(--primary); font-weight: 700; text-decoration: none; }
.category-tiles a:hover { box-shadow: var(--shadow); }
.category-tiles small, .category-chips small { min-width: 26px; padding: 1px 8px; border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 12px; text-align: center; }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.category-chips a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.category-chips a:hover { border-color: var(--primary); }
.product-categories { grid-column: 1 / -1; }

/* Kundenkonto */
.account-page { padding-top: 24px; padding-bottom: 56px; }
.account-page h1 { margin: 0 0 20px; font-size: 30px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px; margin-bottom: 20px; }
.account-card { padding: 20px 22px; border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: var(--radius); background: var(--white); }
.account-card h2 { margin: 0 0 14px; font-size: 20px; }
.account-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 14px; font-size: 14px; }
.account-list dt { color: var(--muted); font-weight: 600; }
.account-list dd { margin: 0; }
.account-locked { padding: 28px; border: 1px dashed var(--line); text-align: center; }
.table-scroll { overflow-x: auto; }
.orders-table, .order-items { width: 100%; border-collapse: collapse; font-size: 14px; }
.orders-table th, .orders-table td, .order-items th, .order-items td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.orders-table th, .order-items th { background: var(--surface); color: var(--primary); font-size: 13px; white-space: nowrap; }
.orders-table .num, .order-items .num { text-align: right; white-space: nowrap; }
.order-details > td { padding: 0 0 12px; background: var(--surface-2); }
.order-detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; gap: 20px; padding: 16px; }
.order-detail address { margin-bottom: 10px; font-style: normal; font-size: 14px; }
.order-status { display: inline-block; padding: 2px 9px; border-radius: 11px; background: var(--surface); color: var(--primary); font-size: 12px; font-weight: 700; white-space: nowrap; }
.order-status.shipped { background: #eaf4dc; color: #3d6b00; }
.order-status.cancelled { background: #fbeceb; color: #922b21; }
.order-status.processing { background: #e6eef7; }
@media (max-width: 900px) {
  .account-grid, .order-detail { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .account-list { grid-template-columns: 1fr; gap: 2px; }
  .account-list dd { margin-bottom: 8px; }
}
