/*!
 * SGS 4x4 – Warenkorb-Erlebnis (Paket Warenkorb 1.0.0 · 09.10.2026 · Child-Template SGS2026)
 * Knopf-Rückmeldung, Flug ins Warenkorbsymbol, Warenkorb-Leiste (Desktop rechts, Handy von unten), Fehler-Hinweis.
 * Gehört zu sgs-site/sgs-cart.js und productdetails/pushed_success.tpl. Farben/Schriften wie SGS-Kopf (sgs-header.css).
 */
:root {
    --sgc-ink: #161718;
    --sgc-ink2: #3c3f42;
    --sgc-grey: #62666a;
    --sgc-g4: #eff0ee;
    --sgc-line: #e6e8e5;
    --sgc-yel: #efc03d;
    --sgc-yel2: #e0ad22;
    --sgc-ok: #2e9b5f;
    --sgc-ok-bg: #e7f3ec;
    --sgc-ok-ink: #1d6b44;
    --sgc-fh: Poppins, "Helvetica Neue", Arial, sans-serif;
    --sgc-ft: Raleway, "Helvetica Neue", Arial, sans-serif;
    --sgc-ease: cubic-bezier(.22, 1, .36, 1);
    --sgc-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ------------------------------------------------------------------ Bestätigung der Artikelseite (Template) – nur ohne JavaScript sichtbar */
#pushed-success.sgs-pushed { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
.sgs-pushed__note { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: var(--sgc-ok-bg); color: var(--sgc-ok-ink); font: 600 14px/1.4 var(--sgc-ft); }
.sgs-pushed__note a { margin-left: 6px; color: inherit; text-decoration: underline; }
html.sgs-cart-on .sgs-pushed__note { display: none; }

/* ------------------------------------------------------------------ Knopf: Ladekreis → Haken */
.sgs-atc { position: relative; overflow: hidden; }
.sgs-atc-fx {
    position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: inherit; background: inherit; color: inherit; font: inherit; white-space: nowrap; pointer-events: none;
    animation: sgs-atc-in .2s ease both;
}
.sgs-atc-spin { width: 18px; height: 18px; border: 2.5px solid rgba(22, 23, 24, .22); border-top-color: var(--sgc-ink); border-radius: 50%; animation: sgs-spin .7s linear infinite; }
.is-sgs-done > .sgs-atc-fx { background: var(--sgc-ink) !important; color: #fff !important; }
.sgs-atc-fx svg { width: 20px; height: 20px; fill: none; stroke: var(--sgc-yel); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: sgs-draw .35s .08s ease-out forwards; }
.sgs-atc-fx.is-out { animation: sgs-atc-out .3s ease forwards; }
.is-sgs-shake { animation: sgs-shake .5s ease; }

/* ------------------------------------------------------------------ Flug ins Warenkorbsymbol + Symbol springt */
.sgs-fly { position: fixed; z-index: 1000000002; pointer-events: none; border-radius: 14px; background: #fff; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .45); overflow: hidden; will-change: transform, opacity; }
.sgs-fly img { display: block; width: 100%; height: 100%; padding: 8px; object-fit: contain; }
.sgs-cart.is-bump .sgs-cart__btn svg,
.cart-icon-dropdown.is-bump .nav-link > :first-child { animation: sgs-bump .65s var(--sgc-spring); transform-origin: 50% 65%; }
.sgs-cart.is-bump .sgs-badge { animation: sgs-pop .6s .08s var(--sgc-spring) both; }
.sgs-cart.is-bump .sgs-cart__sum { animation: sgs-flash 1.3s ease; }

/* ------------------------------------------------------------------ Warenkorb-Leiste */
html.sgs-cd-lock, html.sgs-cd-lock body { overflow: hidden; }
.sgs-cd { position: fixed; inset: 0; z-index: 1000000001; }   /* über schwebenden Plugin-Abzeichen (z. B. Google-Bewertungen: 999999999) */
.sgs-cd[hidden] { display: none; }
.sgs-cd__bg { position: absolute; inset: 0; background: rgba(22, 23, 24, .45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .4s ease; }
.sgs-cd__panel {
    position: absolute; top: 12px; right: 12px; bottom: 12px; display: flex; flex-direction: column; width: min(440px, calc(100vw - 24px));
    border-radius: 18px; background: #fff; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); overflow: hidden; outline: none;
    transform: translateX(calc(100% + 24px)); transition: transform .6s var(--sgc-ease);
}
.sgs-cd.is-open .sgs-cd__bg { opacity: 1; }
.sgs-cd.is-open .sgs-cd__panel { transform: none; }

.sgs-cd__head { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 18px 16px 18px 20px; background: var(--sgc-ink); color: #fff; }
.sgs-cd__ok { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--sgc-yel); transform: scale(.3); opacity: 0; }
.sgs-cd__ok svg { width: 22px; height: 22px; fill: none; stroke: var(--sgc-ink); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.sgs-cd.is-open .sgs-cd__ok { animation: sgs-pop-in .55s .22s var(--sgc-spring) forwards; }
.sgs-cd.is-open .sgs-cd__ok svg { animation: sgs-draw .4s .5s ease-out forwards; }
.sgs-cd__t { margin: 0; font: 600 17px/1.25 var(--sgc-fh); color: #fff; }
.sgs-cd__n { margin: 3px 0 0; font: 500 12.5px/1.4 var(--sgc-ft); color: rgba(255, 255, 255, .66); }
.sgs-cd__n:empty { display: none; }
.sgs-cd__x { display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; transition: background-color .2s ease, transform .3s var(--sgc-ease); }
.sgs-cd__x:hover { background: rgba(255, 255, 255, .2); transform: rotate(90deg); }
.sgs-cd__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.sgs-cd__x:focus-visible, .sgs-cd__btn:focus-visible, .sgs-cd__more:focus-visible, .sgs-cd a:focus-visible { outline: 2px solid var(--sgc-yel); outline-offset: 2px; }

.sgs-cd__body { flex: 1 1 auto; display: grid; gap: 16px; align-content: start; padding: 20px; overflow-y: auto; overscroll-behavior: contain; }
.sgs-cd__body > * { opacity: 0; transform: translateY(12px); }
.sgs-cd.is-open .sgs-cd__body > * { animation: sgs-up .55s var(--sgc-ease) forwards; }
.sgs-cd.is-open .sgs-cd__body > :nth-child(1) { animation-delay: .2s; }
.sgs-cd.is-open .sgs-cd__body > :nth-child(2) { animation-delay: .27s; }
.sgs-cd.is-open .sgs-cd__body > :nth-child(3) { animation-delay: .34s; }
.sgs-cd.is-open .sgs-cd__body > :nth-child(4) { animation-delay: .41s; }
.sgs-cd.is-open .sgs-cd__body > :nth-child(n+5) { animation-delay: .48s; }
.sgs-cd.is-again .sgs-cd__body > * { animation: sgs-up .45s var(--sgc-ease) forwards; }

/* Artikel */
.sgs-cd__item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; }
.sgs-cd__img { display: grid; place-items: center; width: 92px; aspect-ratio: 1; border-radius: 12px; background: var(--sgc-g4); overflow: hidden; }
.sgs-cd__img img { width: 100%; height: 100%; padding: 8px; object-fit: contain; mix-blend-mode: multiply; }
.sgs-cd__img svg, .sgs-cd__xi svg { width: 34px; height: 34px; fill: none; stroke: #9a9d9f; stroke-width: 1.5; stroke-linejoin: round; }
.sgs-cd__info { display: grid; gap: 4px; min-width: 0; }
.sgs-cd__name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font: 600 15px/1.3 var(--sgc-fh); color: var(--sgc-ink); text-decoration: none; overflow-wrap: anywhere; }
a.sgs-cd__name:hover { color: var(--sgc-ink); text-decoration: underline; text-underline-offset: 2px; }
.sgs-cd__meta { font: 600 12.5px/1.4 var(--sgc-ft); color: var(--sgc-grey); }
.sgs-cd__price { margin-top: 2px; font: 600 17px/1.2 var(--sgc-fh); color: var(--sgc-ink); }
.sgs-cd__price em { font: 500 13px var(--sgc-ft); font-style: normal; color: var(--sgc-grey); }

/* Ebenfalls im Warenkorb */
.sgs-cd__also { padding-top: 14px; border-top: 1px solid var(--sgc-line); }
.sgs-cd__al { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sgs-cd__ar { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; color: var(--sgc-ink); text-decoration: none; }
.sgs-cd__ar:hover { color: var(--sgc-ink); text-decoration: none; }
.sgs-cd__ar:hover b { text-decoration: underline; text-underline-offset: 2px; }
.sgs-cd__ai { display: grid; place-items: center; width: 44px; aspect-ratio: 1; border-radius: 8px; background: var(--sgc-g4); overflow: hidden; }
.sgs-cd__ai img { width: 100%; height: 100%; padding: 4px; object-fit: contain; mix-blend-mode: multiply; }
.sgs-cd__ai svg { width: 22px; height: 22px; fill: none; stroke: #9a9d9f; stroke-width: 1.5; }
.sgs-cd__ar b { overflow: hidden; font: 600 13px/1.3 var(--sgc-ft); white-space: nowrap; text-overflow: ellipsis; }
.sgs-cd__ar em { font: 600 13px var(--sgc-fh); font-style: normal; white-space: nowrap; }
.sgs-cd__am { margin: 8px 0 0; font: 600 12.5px var(--sgc-ft); color: var(--sgc-grey); }

/* Versandkosten */
.sgs-cd__ship { display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--sgc-g4); font: 600 13.5px/1.4 var(--sgc-ft); color: var(--sgc-ink); }
.sgs-cd__ship-t { display: flex; gap: 10px; align-items: center; }
.sgs-cd__ship-t svg { flex: none; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sgs-cd__ship.is-free { background: var(--sgc-ok-bg); color: var(--sgc-ok-ink); }
.sgs-cd__ship.is-free .sgs-cd__ship-t svg { stroke-width: 2.6; }
.sgs-cd__bar { display: block; height: 6px; border-radius: 6px; background: rgba(22, 23, 24, .1); overflow: hidden; }
.sgs-cd__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--sgc-yel); transition: width 1.1s .45s var(--sgc-ease); }
.sgs-cd__ship.is-free .sgs-cd__bar i { background: var(--sgc-ok); }

/* Summe */
.sgs-cd__sum { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; padding-top: 4px; font: 600 14px var(--sgc-ft); color: var(--sgc-ink); }
.sgs-cd__sum b { font: 600 22px/1.1 var(--sgc-fh); }
.sgs-cd__sum small { grid-column: 1 / -1; justify-self: end; font: 500 12px/1.4 var(--sgc-ft); color: var(--sgc-grey); }

/* Passt dazu */
.sgs-cd__xh { margin: 4px 0 10px; font: 700 11px/1 var(--sgc-ft); letter-spacing: .1em; text-transform: uppercase; color: var(--sgc-grey); }
.sgs-cd__xs { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 10px; margin: 0 -20px; padding: 0 20px 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.sgs-cd__xc { display: grid; align-content: start; gap: 6px; scroll-snap-align: start; color: var(--sgc-ink); text-decoration: none; }
.sgs-cd__xc:hover { color: var(--sgc-ink); text-decoration: none; }
.sgs-cd__xi { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--sgc-g4); overflow: hidden; }
.sgs-cd__xi img { width: 100%; height: 100%; padding: 8px; object-fit: contain; mix-blend-mode: multiply; transition: transform .8s var(--sgc-ease); }
.sgs-cd__xc:hover .sgs-cd__xi img { transform: scale(1.07); }
.sgs-cd__xc b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font: 600 12.5px/1.3 var(--sgc-ft); }
.sgs-cd__xc em { font: 600 13.5px var(--sgc-fh); font-style: normal; }

/* Knöpfe */
.sgs-cd__foot { display: grid; gap: 10px; padding: 16px 20px 18px; border-top: 1px solid var(--sgc-line); background: #fff; }
.sgs-cd__btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 20px; border-radius: 10px; font: 700 15px/1.2 var(--sgc-ft); text-decoration: none; transition: background-color .2s ease; }
.sgs-cd a.sgs-cd__btn--go, .sgs-cd a.sgs-cd__btn--go:hover { background: var(--sgc-yel); color: var(--sgc-ink); text-decoration: none; }
.sgs-cd a.sgs-cd__btn--go:hover { background: var(--sgc-yel2); }
.sgs-cd a.sgs-cd__btn--cart, .sgs-cd a.sgs-cd__btn--cart:hover { background: var(--sgc-ink); color: #fff; text-decoration: none; }
.sgs-cd a.sgs-cd__btn--cart:hover { background: #000; }
.sgs-cd__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--sgc-ease); }
.sgs-cd__btn:hover svg { transform: translateX(4px); }
.sgs-cd__more { justify-self: center; margin: 2px 0 0; padding: 6px 8px; border: 0; background: none; font: 700 13.5px/1.3 var(--sgc-ft); color: var(--sgc-ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--sgc-yel); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Handy: Leiste von unten */
@media (max-width: 640px) {
    .sgs-cd__panel { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: min(90vh, 760px); border-radius: 20px 20px 0 0; transform: translateY(100%); }
    .sgs-cd__panel::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 1; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(255, 255, 255, .32); }
    .sgs-cd__head { padding: 24px 14px 16px 16px; }
    .sgs-cd__body { padding: 16px; gap: 14px; }
    .sgs-cd__item { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
    .sgs-cd__img { width: 76px; }
    .sgs-cd__xs { margin: 0 -16px; padding: 0 16px 6px; }
    .sgs-cd__foot { grid-template-columns: 1fr 1fr; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
    .sgs-cd__foot > :only-of-type, .sgs-cd__more { grid-column: 1 / -1; }
    .sgs-cd__btn { min-height: 50px; padding: 10px 12px; font-size: 14.5px; }
    .sgs-cd__btn svg { display: none; }
}

/* ------------------------------------------------------------------ Fehler-Hinweis */
.sgs-toast {
    position: fixed; top: 96px; right: 20px; z-index: 1000000002; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start;
    width: min(380px, calc(100vw - 32px)); padding: 14px 12px 14px 16px; border-radius: 14px; background: var(--sgc-ink); color: #fff;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity .3s ease, transform .45s var(--sgc-ease);
}
.sgs-toast.is-in { opacity: 1; transform: none; pointer-events: auto; }
.sgs-toast__i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--sgc-yel); color: var(--sgc-ink); font: 700 15px/1 var(--sgc-fh); }
.sgs-toast b { display: block; font: 600 14px/1.35 var(--sgc-fh); }
.sgs-toast p { margin: 3px 0 0; font: 500 13px/1.45 var(--sgc-ft); color: rgba(255, 255, 255, .76); }
.sgs-toast p:empty { display: none; }
.sgs-toast__x { display: grid; place-items: center; width: 30px; height: 30px; margin: -4px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.sgs-toast__x:hover { background: rgba(255, 255, 255, .12); }
.sgs-toast__x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (max-width: 640px) {
    .sgs-toast { top: auto; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: auto; transform: translateY(14px); }
}

/* ------------------------------------------------------------------ Bewegungen */
@keyframes sgs-spin { to { transform: rotate(360deg); } }
@keyframes sgs-draw { to { stroke-dashoffset: 0; } }
@keyframes sgs-atc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes sgs-atc-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes sgs-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes sgs-bump { 0% { transform: none; } 30% { transform: scale(1.28) rotate(-9deg); } 60% { transform: scale(.92) rotate(4deg); } 100% { transform: none; } }
@keyframes sgs-pop { 0% { transform: scale(.3); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes sgs-pop-in { to { transform: none; opacity: 1; } }
@keyframes sgs-flash { 0%, 35% { color: var(--sgc-yel); } 100% { color: inherit; } }
@keyframes sgs-up { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .sgs-cd__panel, .sgs-cd__bg, .sgs-toast, .sgs-cd__bar i { transition-duration: .01ms !important; transition-delay: 0s !important; }
    .sgs-cd *, .sgs-atc-fx, .sgs-atc-fx *, .sgs-cart.is-bump *, .is-sgs-shake { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
