/* =========================================================================
   Gratisartikel Plus (just-SOUND) - Design-System
   Alles unter .jsga gekapselt, damit nichts ins Shop-Template ausblutet.
   Akzentfarbe kommt per Inline-Style (--jsga-accent) aus den Einstellungen.
   ========================================================================= */

.jsga {
    --jsga-accent: #ec6707;
    --jsga-accent-2: #ff6a00;
    --jsga-ink: #0e1116;
    --jsga-muted: #626b78;
    --jsga-line: #e7eaee;
    --jsga-soft: #f5f7f9;
    --jsga-card: #ffffff;
    --jsga-ok: #1faa59;
    --jsga-accent-strong: #cf5a06;
    --jsga-radius: 2px;
    --jsga-r: 2px;
    --jsga-shadow: 0 6px 20px rgba(14, 17, 22, .08);
    --jsga-shadow-sm: 0 2px 8px rgba(14, 17, 22, .05);
    color: var(--jsga-ink);
    font-family: inherit;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.jsga *,
.jsga *::before,
.jsga *::after { box-sizing: border-box; }

/* ---------- Contentseite: Wrapper & Hero ---------- */

.jsga-page { margin: 0 auto; max-width: 1180px; padding: 0 16px 64px; }

/* ---------- Zweispaltig: links Kachel + Erklaerung, rechts Artikel ---------- */
.jsga-cols { display: grid; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 26px; align-items: start; margin-bottom: 34px; }
.jsga-left { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.jsga-right { min-width: 0; }
@media (max-width: 900px) {
    .jsga-cols { grid-template-columns: 1fr; }
    .jsga-left { position: static; }
}

/* linke Spalte kompakter */
.jsga-left .jsga-hero { margin: 0; padding: 28px clamp(20px, 3vw, 30px); }
.jsga-left .jsga-hero-inner { max-width: none; }
.jsga-left .jsga-hero h1 { font-size: clamp(26px, 3.4vw, 38px); }
.jsga-left .jsga-steps { grid-template-columns: 1fr; gap: 10px; margin: 0; }
.jsga-left .jsga-step { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; }
.jsga-left .jsga-step-num { margin-bottom: 0; flex: 0 0 auto; width: 32px; height: 32px; font-size: 15px; }
.jsga-left .jsga-step h3 { font-size: 15px; margin-bottom: 3px; }
.jsga-left .jsga-step p { font-size: 13.5px; }

/* rechte Spalte: kompakte Artikelkacheln */
.jsga-right .jsga-tier { margin-bottom: 26px; }
.jsga-right .jsga-section-head { margin-bottom: 14px; }
.jsga-right .jsga-section-head h2 { font-size: clamp(18px, 2.4vw, 22px); }
.jsga-right .jsga-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.jsga-right .jsga-info { padding: 12px 12px 6px; }
.jsga-right .jsga-info h4 { font-size: 14px; }
.jsga-right .jsga-badge { font-size: 11px; padding: 4px 8px; }
.jsga-right .jsga-worth { font-size: 12px; margin-top: 4px; }
.jsga-right .jsga-state { font-size: 12px; margin-top: 6px; }

.jsga-hero {
    position: relative;
    margin: 8px 0 40px;
    padding: 54px clamp(20px, 5vw, 64px);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--jsga-line);
    background:
        radial-gradient(900px 360px at 92% -20%, color-mix(in srgb, var(--jsga-accent) 12%, transparent), transparent 60%),
        var(--jsga-card);
    color: var(--jsga-ink);
    box-shadow: var(--jsga-shadow-sm);
}

.jsga-hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(color-mix(in srgb, var(--jsga-ink) 5%, transparent) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: .3; pointer-events: none;
}

.jsga-hero-inner { position: relative; z-index: 1; max-width: 720px; }

.jsga-eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 7px 14px; border-radius: 999px; color: var(--jsga-ink);
    background: color-mix(in srgb, var(--jsga-accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--jsga-accent) 30%, var(--jsga-line));
    font-size: 13px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase;
    margin-bottom: 20px;
}

.jsga-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5.5vw, 56px);
    line-height: 1.05; font-weight: 600; letter-spacing: -.01em; color: var(--jsga-ink);
}
.jsga-hero h1 .jsga-accent-text { color: var(--jsga-accent); }
.jsga-hero .jsga-lead {
    margin: 0 0 26px; max-width: 620px;
    font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--jsga-muted);
}

.jsga-livedot {
    position: relative; width: 9px; height: 9px; border-radius: 50%;
    background: #17b36a; box-shadow: 0 0 0 0 rgba(23, 179, 106, .6);
    animation: jsga-pulse 1.8s infinite;
}
@keyframes jsga-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(23, 179, 106, .5); }
    70%  { box-shadow: 0 0 0 9px rgba(23, 179, 106, 0); }
    100% { box-shadow: 0 0 0 0 rgba(23, 179, 106, 0); }
}

/* ---------- Live-Fortschritt ---------- */

.jsga-progress { margin-top: 6px; position: relative; }
.jsga-progress-track {
    height: 12px; border-radius: 999px;
    background: color-mix(in srgb, var(--jsga-ink) 10%, var(--jsga-card));
    overflow: hidden;
}
.jsga-progress-bar {
    height: 100%; width: 0;
    border-radius: 999px;
    background: var(--jsga-accent);
    transition: width .7s cubic-bezier(.22, 1, .36, 1);
}
.jsga-progress-meta { margin-top: 11px; font-size: 15px; color: var(--jsga-muted); }
.jsga-progress-meta b { color: var(--jsga-ink); }

.jsga-hero-stats { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 28px; }
.jsga-stat { display: flex; flex-direction: column; }
.jsga-stat b { font-size: 26px; font-weight: 800; color: var(--jsga-ink); }
.jsga-stat span { font-size: 13px; color: var(--jsga-muted); text-transform: uppercase; letter-spacing: .4px; }

/* ---------- Explore-Schieberegler + Ticks + kleiner Live-Warenkorb ---------- */

.jsga-explore { margin-top: 6px; }
.jsga-explore-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.jsga-explore-head > span { font-size: 15px; color: var(--jsga-muted); }
.jsga-explore-val { font-size: 26px; font-weight: 700; color: var(--jsga-ink); font-variant-numeric: tabular-nums; }
.jsga-explore-meta { margin-top: 8px; font-size: 14px; color: var(--jsga-muted); }
.jsga-explore-meta b { color: var(--jsga-ink); }

.jsga-ticks { position: absolute; inset: 0; pointer-events: none; }
.jsga-tick { position: absolute; top: 0; height: 100%; width: 2px; transform: translateX(-50%);
    background: color-mix(in srgb, var(--jsga-ink) 22%, transparent); border-radius: 2px; }
.jsga-tick.hit { background: #fff; }

.jsga-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 999px;
    background: color-mix(in srgb, var(--jsga-ink) 10%, var(--jsga-card)); outline: none; margin: 14px 0 4px; cursor: pointer; }
.jsga-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%;
    background: var(--jsga-accent); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .28); cursor: pointer; }
.jsga-slider::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: var(--jsga-accent);
    border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .28); cursor: pointer; }
.jsga-slider:focus-visible { outline: 2px solid var(--jsga-accent); outline-offset: 3px; }

.jsga-livecart { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 16px; font-size: 14px; color: var(--jsga-muted); }
.jsga-livecart b { color: var(--jsga-ink); }
.jsga-lc-cart { white-space: nowrap; }
.jsga-lc-sub { flex-basis: 100%; font-size: 13px; color: var(--jsga-muted); }
.jsga-livecart-apply { border: 1px solid var(--jsga-line); background: var(--jsga-card); color: var(--jsga-accent);
    font: inherit; font-weight: 600; font-size: 13px; padding: 5px 11px; border-radius: var(--jsga-r); cursor: pointer; }
.jsga-livecart-apply:hover { background: color-mix(in srgb, var(--jsga-accent) 8%, var(--jsga-card)); }

/* ---------- "So funktioniert's" ---------- */

.jsga-steps {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 46px;
}
.jsga-step {
    background: var(--jsga-card); border: 1px solid var(--jsga-line);
    border-radius: var(--jsga-radius); padding: 24px; box-shadow: none;
}
.jsga-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 2px; margin-bottom: 14px;
    font-weight: 600; font-size: 18px; color: #fff;
    background: var(--jsga-accent);
}
.jsga-step h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.jsga-step p { margin: 0; color: var(--jsga-muted); font-size: 15px; line-height: 1.55; }

/* ---------- Stufen-Abschnitte ---------- */

.jsga-section-head { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; }
.jsga-section-head h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 600; letter-spacing: -.005em; }
.jsga-tierpill {
    padding: 5px 12px; border-radius: 2px; font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap;
    background: var(--jsga-accent);
}
.jsga-tierpill.jsga-reached { background: var(--jsga-ok); }
.jsga-tier { margin-bottom: 42px; }

/* ---------- Karten-Grid ---------- */

.jsga-grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.jsga-grid--compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }

.jsga-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--jsga-card); border: 1px solid var(--jsga-line);
    border-radius: var(--jsga-radius); overflow: hidden;
    box-shadow: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.jsga-card:hover { transform: translateY(-2px); box-shadow: var(--jsga-shadow-sm); }
.jsga-card[data-jsga-state="unlocked"] { border-color: color-mix(in srgb, var(--jsga-accent) 55%, var(--jsga-line)); }
.jsga-card[data-jsga-state="incart"] { border-color: var(--jsga-ok); box-shadow: 0 0 0 2px rgba(31, 170, 89, .18); }

.jsga-badge {
    position: absolute; top: 12px; left: 12px; z-index: 2;
    padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 800;
    letter-spacing: .3px; color: #fff;
    background: rgba(14, 17, 22, .82); backdrop-filter: blur(4px);
}
.jsga-card[data-jsga-state="unlocked"] .jsga-badge,
.jsga-card[data-jsga-state="incart"] .jsga-badge {
    background: var(--jsga-accent);
}

.jsga-thumb {
    position: relative; aspect-ratio: 4 / 3; background: var(--jsga-soft);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.jsga-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .4s ease; }
.jsga-card:hover .jsga-thumb img { transform: scale(1.05); }
.jsga-noimg { color: var(--jsga-muted); font-weight: 700; letter-spacing: .5px; }

.jsga-lock {
    position: absolute; inset: 0; display: none;
    background: rgba(245, 247, 249, .62); backdrop-filter: grayscale(.4) blur(1px);
}
.jsga-card[data-jsga-state="locked"] .jsga-thumb img { filter: grayscale(.85) opacity(.6); }
.jsga-card[data-jsga-state="locked"] .jsga-lock { display: block; }
.jsga-lock::after {
    content: "🔒"; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); font-size: 26px; opacity: .8;
}

.jsga-info { padding: 16px 16px 10px; flex: 1 1 auto; }
.jsga-info h4 { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.3; }
.jsga-worth { font-size: 13px; color: var(--jsga-muted); }
.jsga-worth b { color: var(--jsga-ink); }
.jsga-desc { margin: 8px 0 0; font-size: 13.5px; color: var(--jsga-muted); line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jsga-stock { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--jsga-ok); font-weight: 600; }
.jsga-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--jsga-ok); }
.jsga-stock--low { color: var(--jsga-accent-2); }
.jsga-stock--low::before { background: var(--jsga-accent-2); }

.jsga-btn {
    margin: 6px 16px 16px; padding: 11px 14px; border: 0; cursor: pointer;
    border-radius: var(--jsga-r); font-size: 14.5px; font-weight: 500; letter-spacing: .2px;
    color: #fff; background: var(--jsga-accent);
    transition: background .15s ease, opacity .2s ease;
}
.jsga-btn:hover:not(:disabled) { background: var(--jsga-accent-strong); }
.jsga-btn:disabled {
    cursor: not-allowed; color: var(--jsga-muted);
    background: var(--jsga-soft); border: 1px solid var(--jsga-line);
    box-shadow: none;
}
.jsga-card[data-jsga-state="incart"] .jsga-btn {
    background: rgba(31, 170, 89, .12); color: var(--jsga-ok);
    border: 1px solid rgba(31, 170, 89, .35); box-shadow: none;
}
.jsga-btn.jsga-busy { opacity: .6; pointer-events: none; }

.jsga-mini {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 0 16px 14px; font-size: 12.5px; color: var(--jsga-muted);
}
.jsga-mini a { color: var(--jsga-accent-2); font-weight: 700; text-decoration: none; }

/* ---------- Karten-Link + Live-Status (native Gifts, read-only) ---------- */

.jsga-cardlink { display: flex; flex-direction: column; flex: 1 1 auto; text-decoration: none; color: inherit; }
.jsga-cardlink:hover { color: inherit; text-decoration: none; }
.jsga-hero-cta { margin-top: 26px; }
.jsga-state { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--jsga-accent); }
.jsga-card[data-jsga-state="unlocked"] .jsga-state { color: var(--jsga-ok); }
.jsga-hint-cart { text-align: center; color: var(--jsga-muted); margin: 6px 0 10px; font-size: 15px; }
.jsga-hint-cart a { color: var(--jsga-accent); font-weight: 600; text-decoration: none; }

/* ---------- FAQ ---------- */

.jsga-faq { max-width: 820px; margin: 8px auto 0; }
.jsga-faq h2 { text-align: center; font-size: clamp(22px, 3vw, 30px); font-weight: 600; margin: 0 0 22px; }
.jsga-faq details {
    background: var(--jsga-card); border: 1px solid var(--jsga-line);
    border-radius: 6px; margin-bottom: 10px; padding: 4px 6px;
}
.jsga-faq summary {
    cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 700; font-size: 16px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.jsga-faq summary::-webkit-details-marker { display: none; }
.jsga-faq summary::after { content: "+"; font-size: 22px; color: var(--jsga-accent); font-weight: 700; transition: transform .2s ease; }
.jsga-faq details[open] summary::after { transform: rotate(45deg); }
.jsga-faq .jsga-faq-a { padding: 0 18px 18px; color: var(--jsga-muted); line-height: 1.6; }

/* ---------- CTA-Band ---------- */

.jsga-cta {
    margin-top: 44px; padding: 30px clamp(22px, 4vw, 40px);
    border-radius: var(--jsga-radius); color: var(--jsga-ink);
    background: var(--jsga-card); border: 1px solid var(--jsga-line);
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
    box-shadow: none;
}
.jsga-cta h3 { margin: 0 0 6px; font-size: 21px; font-weight: 700; }
.jsga-cta p { margin: 0; color: var(--jsga-muted); max-width: 520px; }
.jsga-cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.jsga-cta .jsga-btn { margin: 0; }
.jsga-btn-ghost {
    padding: 11px 18px; border-radius: var(--jsga-r); font-weight: 500; text-decoration: none;
    color: var(--jsga-ink); border: 1px solid var(--jsga-line); background: transparent;
    display: inline-flex; align-items: center; gap: 8px; transition: background .2s ease;
}
.jsga-btn-ghost:hover { background: color-mix(in srgb, var(--jsga-ink) 4%, transparent); color: var(--jsga-ink); }

/* ---------- Warenkorb-Panel (kompakt) ---------- */

.jsga--cart {
    margin: 0 0 22px; padding: 20px; border-radius: var(--jsga-radius);
    background: var(--jsga-card); border: 1px solid var(--jsga-line); box-shadow: var(--jsga-shadow-sm);
}
.jsga--cart .jsga-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.jsga--cart .jsga-title { margin: 0; font-size: 18px; font-weight: 800; flex: 1 1 auto; }
.jsga--cart .jsga-more { font-size: 13px; font-weight: 700; color: var(--jsga-accent-2); text-decoration: none; white-space: nowrap; }
.jsga--cart .jsga-progress-track { background: var(--jsga-soft); }
.jsga--cart .jsga-progress-meta { color: var(--jsga-muted); }
.jsga--cart .jsga-progress-meta b { color: var(--jsga-ink); }
.jsga--cart .jsga-badge { font-size: 11px; padding: 4px 8px; }
.jsga--cart .jsga-info h4 { font-size: 14px; }
.jsga--cart .jsga-btn { margin: 6px 12px 12px; padding: 9px 10px; font-size: 13px; }

.jsga-cart-tier { margin-top: 16px; }
.jsga-cart-tierlab { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.jsga-cart-pill {
    padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; color: #fff;
    background: var(--jsga-muted);
}
.jsga-cart-tierlab.jsga-reached .jsga-cart-pill { background: var(--jsga-ok); }
.jsga-cart-choose { font-size: 13px; font-weight: 700; color: var(--jsga-muted); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Modal-Vorschau ---------- */

.jsga-modal {
    position: fixed; inset: 0; z-index: 99999; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(8, 10, 14, .6); backdrop-filter: blur(3px);
}
.jsga-modal.jsga-open { display: flex; }
.jsga-modal-box {
    background: #fff; border-radius: 18px; max-width: 520px; width: 100%;
    overflow: hidden; box-shadow: 0 30px 70px rgba(0, 0, 0, .4);
    animation: jsga-pop .2s ease;
}
@keyframes jsga-pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.jsga-modal-img { aspect-ratio: 16 / 10; background: var(--jsga-soft); display: flex; align-items: center; justify-content: center; }
.jsga-modal-img img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 18px; }
.jsga-modal-body { padding: 22px 24px 26px; }
.jsga-modal-body h3 { margin: 0 0 8px; font-size: 20px; font-weight: 800; }
.jsga-modal-body p { margin: 0 0 18px; color: var(--jsga-muted); line-height: 1.6; }
.jsga-modal-close {
    position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
    border: 0; background: rgba(255, 255, 255, .9); font-size: 20px; cursor: pointer; line-height: 1;
}

/* ---------- Toast ---------- */

.jsga-toast {
    position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
    z-index: 100000; padding: 13px 20px; border-radius: 12px; color: #fff; font-weight: 700;
    background: #14181f; box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
    opacity: 0; pointer-events: none; transition: opacity .25s ease, transform .25s ease;
}
.jsga-toast.jsga-show { opacity: 1; transform: translateX(-50%) translateY(0); }
.jsga-toast--ok { background: #1faa59; }
.jsga-toast--err { background: #e04141; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
    .jsga-steps { grid-template-columns: 1fr; }
    .jsga-hero { padding: 38px 22px; }
    .jsga-cta { flex-direction: column; align-items: flex-start; }
}
