// Miss-Scully — DOCTR care: Kategorie-Unterseiten (Hund / Katze) + Artikel-Detailseite
// Lädt nach doctr-page.jsx (nutzt DoctrTilt, DoctrShot, chf, DoctrCard).
function DoctrKategorie({ pet }) {
const info = DOCTR_PET_PAGES[pet];
const all = DOCTR_PRODUCTS.filter((p) => p.pet === pet);
const sets = DOCTR_SETS.filter((s) => s.pet === pet);
const dog = pet === 'dog';
const Photo = ({ src, alt, cls }) =>
;
const [q, setQ] = React.useState('');
const [use, setUse] = React.useState('all');
const [sort, setSort] = React.useState('rel');
const USES = [['all', 'Alle'], ['clean', 'Reinigen'], ['coat', 'Fell & Shampoo'], ['wound', 'Haut & Wunden'], ['paw', 'Pfoten'], ['protect', 'Zecken & Insekten'], ['odor', 'Geruch']].filter(([k]) => k === 'all' || all.some((p) => p.use === k)).concat(sets.length ? [['sets', 'Sets']] : []);
const nq = q.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '').trim();
let list = all.filter((p) => (use === 'all' || p.use === use) && (!nq || (p.name + ' ' + p.sub + ' ' + (p.bullets || []).join(' ')).toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '').includes(nq)));
const matchSet = (s) => !nq || (s.name + ' ' + (s.text || '') + ' ' + (s.parts || []).join(' ')).toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, '').includes(nq);
let setList = (use === 'all' || use === 'sets') ? sets.filter(matchSet) : [];
if (use === 'sets') list = [];
if (sort === 'asc') setList = [...setList].sort((a, b) => a.price - b.price);
if (sort === 'desc') setList = [...setList].sort((a, b) => b.price - a.price);
if (sort === 'asc') list = [...list].sort((a, b) => a.price - b.price);
if (sort === 'desc') list = [...list].sort((a, b) => b.price - a.price);
return (
{info.label}
{info.claim}
{info.paras[0]}
{info.paras.length > 1 ?
{info.paras.slice(1).map((t, i) =>
{t}
)}
: null}
Sortiment
Entdecke alle Produkte
{list.length || setList.length ? null : Kein Produkt gefunden.
}
{list.map((p, i) =>
{dog && use === 'all' && !nq && i === 2 ? : null}
{dog && use === 'all' && !nq && i === 5 ? : null}
)}
{setList.length ?
Sets – kombiniert günstiger
: null}
{dog ?
Gepflegt durch den Alltag
Nähe ohne Hundegeruch
Sofa, Bett, Homeoffice: Mit der pH-adaptiven Pflege von DOCTR bleibt Ihr Hund sauber und riecht neutral – ohne Parfum, das überdeckt.
: null}
{dog ?
Für jedes Fell
Vom Welpen bis zum Senior
Hypoallergen, duftstofffrei und für alle Fellarten geeignet – damit Kuscheln auch im Bett erlaubt bleibt.
: null}
);
}
/* ---------- Artikel-Detailseite ---------- */
function DoctrAcc({ title, children, initial }) {
const [open, setOpen] = React.useState(!!initial);
return (
{open ?
{children}
: null}
);
}
function DoctrArtikel() {
const id = new URLSearchParams(location.search).get('id') || 'd1';
const p = doctrById(id) || DOCTR_PRODUCTS[0];
const use = DOCTR_USE_INFO[p.use];
const petPage = DOCTR_PET_PAGES[p.pet];
const petWord = p.pet === 'dog' ? 'Hund' : 'Katze';
const d = doctrDetail(p);
const [shot, setShot] = React.useState(0);
const set = DOCTR_SETS.filter((s) => s.pet === p.pet)[0];
const related = DOCTR_PRODUCTS.filter((x) => x.pet === p.pet && x.id !== p.id).slice(0, 4);
React.useEffect(() => {
document.title = p.name + ' – ' + p.sub + ' | Miss-Scully';
}, [p]);
return (
{d.gallery.length > 1 ?
{d.gallery.map((g, i) =>
)}
:
null}
{d.merkmal.map((t) => {t}
)}
{d.anwendung}
{d.tipp ? Tipp: {d.tipp}
: null}
{d.inci ?
{d.inci}
:
null}
{d.lieferumfang}
Häufige Fragen
Gut zu wissen
Passt dazu
Weitere Pflege für {petWord === 'Hund' ? 'Hunde' : 'Katzen'}
{related.map((r, i) =>
)}
);
}
Object.assign(window, { DoctrKategorie, DoctrArtikel });