/* =====================================================================
   Wunschdesign24 – Produktkarten (Startseite, Kategorieseiten, …)
   Gemeinsame Datei: Änderungen hier wirken überall gleich.
   Eingebunden von index.php und category.php.
   ===================================================================== */
.shop-scope {
    --wx-accent: #E2007A;
    --wx-accent-dk: #b8005f;
    --wx-ink: #171512;
    --wx-muted: #6b665f;
}

.shop-scope .product-grid { gap: clamp(12px, 1.8vw, 24px); }
.shop-scope a.wx-card, .shop-scope a.wx-card:hover { text-decoration: none !important; color: inherit !important; }
.shop-scope a.wx-card * { text-decoration: none !important; }
.shop-scope .wx-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border: 1px solid #eee8e0; border-radius: 20px;
    box-shadow: 0 1px 2px rgba(23,21,18,.04);
    transition: translate .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s ease, border-color .3s ease;
}
.shop-scope .wx-card:hover {
    translate: 0 -6px; border-color: #f3cfe0;
    box-shadow: 0 22px 44px rgba(23,21,18,.10), 0 4px 10px rgba(226,0,122,.06);
}
.shop-scope .wx-card .product-card-img {
    position: relative; overflow: hidden; aspect-ratio: 1 / 1;
    background: #fff; /* Produktfotos haben weißen Hintergrund - so entsteht keine Kante */
}
.shop-scope .wx-card .product-card-img img {
    display: block; box-sizing: border-box; width: 100%; height: 100%; object-fit: contain; padding: 4%;
    transition: scale .6s cubic-bezier(.2,.8,.2,1);
}
.shop-scope .wx-card:hover .product-card-img img { scale: 1.07; }

/* Hinweis "Mit Foto & Text gestalten" - sagt sofort, was man hier tun kann */
.wx-card-tag {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 10px; border-radius: 999px;
    background: rgba(255,255,255,.92); color: var(--wx-accent);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
    box-shadow: 0 2px 10px rgba(23,21,18,.08);
}
.wx-card-tag svg { width: 12px; height: 12px; }
.wx-tag-short { display: none; }
/* KI-Hinweis bleibt (Transparenz), aber zurückhaltend */
.shop-scope .wx-card .ai-disclosure-badge { opacity: .7; transition: opacity .2s ease; }
.shop-scope .wx-card:hover .ai-disclosure-badge { opacity: 1; }

.shop-scope .wx-card .product-card-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 16px 18px 18px; }
.wx-card-title {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    font-size: 15.5px !important; font-weight: 700 !important; line-height: 1.35 !important;
    letter-spacing: -.005em; color: var(--wx-ink); margin: 0 !important;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.wx-card-sub {
    font-size: 13px; line-height: 1.45; color: var(--wx-muted); margin: 5px 0 0;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.shop-scope .wx-card-footer {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
    margin-top: auto; padding-top: 14px;
}
.wx-price { display: flex; flex-direction: column; line-height: 1.1; }
.wx-price strong {
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 19px; font-weight: 800; color: var(--wx-ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.wx-price small { font-size: 11.5px; color: var(--wx-muted); margin-top: 3px; }
.wx-cta {
    display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
    padding: 9px 14px; border-radius: 999px;
    background: #fdf0f6; color: var(--wx-accent); font-size: 13.5px; font-weight: 700;
    transition: background .25s ease, color .25s ease;
}
.shop-scope .wx-card:hover .wx-cta { background: var(--wx-accent); color: #fff; }
.shop-scope .wx-card .cta-arrow { display: inline-block; transition: translate .2s ease; }
.shop-scope .wx-card:hover .cta-arrow { translate: 3px 0; }

/* Filter auf Kategorieseiten blendet Karten über das hidden-Attribut aus -
   ohne diese Zeile würde "display:flex" oben das Ausblenden verhindern. */
.shop-scope .wx-card[hidden] { display: none !important; }

/* Ausverkauft: Karte bleibt sichtbar, wirkt aber zurückgenommen */
.shop-scope .wx-card.is-sold-out .product-card-img img { filter: grayscale(.6); opacity: .75; }
.shop-scope .wx-card.is-sold-out:hover { translate: none; }

@media (max-width: 640px) {
    /* Karten Handy: kompakt, CTA nur als Pfeil */
    .shop-scope .wx-card { border-radius: 16px; }
    .shop-scope .wx-card .product-card-body { padding: 12px 12px 14px; }
    .wx-card-title { font-size: 14px !important; -webkit-line-clamp: 3; line-clamp: 3; }
    .wx-card-sub { font-size: 12px; -webkit-line-clamp: 1; line-clamp: 1; }
    .wx-price strong { font-size: 16.5px; }
    .wx-price small { font-size: 10.5px; }
    .wx-cta { padding: 8px 10px; }
    .wx-cta-text { display: none; }
    .wx-card-tag { top: 8px; left: 8px; padding: 5px 8px; font-size: 10.5px; white-space: nowrap; }
    .wx-tag-long { display: none; }
    .wx-tag-short { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
    .shop-scope .wx-card, .shop-scope .wx-card .product-card-img img, .wx-cta, .shop-scope .wx-card .cta-arrow { transition: none !important; }
    .shop-scope .wx-card:hover { translate: none; }
    .shop-scope .wx-card:hover .product-card-img img { scale: 1; }
}
