/* Shop-Styles für Perspektivwechsel und Statement Pieces.
 * Header-Stil analog /musik (kein Hero-Banner), Konfigurator immer sichtbar,
 * Details im Akkordeon, persistenter Petrol-Cart unten.
 */

/* === Body & Layout === */
body.shop-page {
    overflow-x: clip;
    background: #fff8ef;
}

/* Auf Shop-Seiten ist Body und "Vielleicht interessiert dich auch"-Section
 * gleichfarbig beigegelb — Trennung über eine zentrierte, an den Enden
 * weich auslaufende Petrol-Linie, damit die Section spürbar als neuer
 * Block beginnt, ohne mit einer harten Volllinie zu schreien. */
body.shop-page .weitere-angebote-section {
    background: #fff8ef;
    position: relative;
}
body.shop-page .weitere-angebote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(88%, 880px);
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(75, 135, 154, 0.85) 50%,
        transparent 100%
    );
    pointer-events: none;
}

body.shop-page #swup {
    overflow-x: hidden;
}

/* === Shop-Main (analog .musik-main / .kindergeschichten-main) === */
.shop-main {
    padding: 90px 1.5rem 4rem;
    min-height: 100vh;
}

.shop-container {
    max-width: 1100px;
    margin: 0 auto;
}

.shop-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.shop-title {
    font-family: 'Alice', serif;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    font-weight: 400;
    color: #4b879a;
    letter-spacing: 3px;
    margin: 0 0 0.6rem;
    line-height: 1.1;
}

.shop-subtitle {
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: #2a3f4d;
    margin: 0;
    line-height: 1.5;
    max-width: 38ch;
    margin-left: auto;
    margin-right: auto;
}

/* Intro-Block direkt unter dem Header (Hintergrund + Ablauf) */
.shop-intro {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    padding: 0 1rem;
    color: #2a3f4d;
}

.shop-intro-text {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
    text-align: left;
}

.shop-intro-howto {
    margin-top: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    border: 1px solid rgba(75, 135, 154, 0.15);
}

.shop-intro-howto-heading {
    font-family: 'Alice', serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: #4b879a;
    letter-spacing: 1.5px;
    margin: 0 0 0.8rem;
    text-transform: uppercase;
}

.shop-intro-howto-list {
    margin: 0;
    padding-left: 1.25rem;
    line-height: 1.65;
}

.shop-intro-howto-list li {
    margin-bottom: 0.6rem;
}

.shop-intro-howto-list li:last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {
    .shop-intro-howto {
        padding: 1rem 1.1rem;
    }
}

/* === Product-Card === */
.product-card {
    background: #fff;
    border-radius: 18px;
    margin: 0 auto 1.6rem;
    box-shadow: 0 2px 12px rgba(17, 39, 54, 0.06);
    border: 1px solid rgba(75, 135, 154, 0.12);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 20px rgba(17, 39, 54, 0.1);
}

/* 3-Spalten-Layout: Bild | Info (Summary + Details inline) | Konfigurator */
.product-card-main {
    display: grid;
    grid-template-columns: minmax(220px, 290px) 1fr 260px;
    gap: 1.5rem;
    padding: 1.5rem;
    align-items: start;
}

.product-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* === Media / Bild-Slider === */
.product-media {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.product-media-frame {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #f4ece0;
    cursor: zoom-in;
}

.product-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
    will-change: transform;
    touch-action: pan-y;
}

.product-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.product-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f4ece0 0%, #e6dbc8 100%);
    color: #a89478;
    font-family: 'Alice', serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.product-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #4b879a;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    transition: background 0.2s ease;
    z-index: 2;
}

.product-slider-nav:hover {
    background: #3f7385;
}

.product-slider-nav.prev { left: 8px; }
.product-slider-nav.next { right: 8px; }
.product-slider-nav[hidden] { display: none; }

.product-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.product-slider-dots:empty { display: none; }

.product-slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 248, 239, 0.6);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease;
}

.product-slider-dot.active {
    background: #fff;
}

/* === Thumbnail-Leiste unter dem Bild === */
/* Alle Bilder immer sichtbar — umbricht in mehrere Zeilen statt zu scrollen. */
.product-thumb-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.55rem;
}

.product-thumb {
    flex: 0 0 auto;
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid #e3d8c4;
    padding: 0;
    background: none;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-thumb:hover {
    border-color: #c9b896;
}

.product-thumb.active {
    border-color: #4b879a;
    box-shadow: 0 0 0 2px rgba(75, 135, 154, 0.3);
}

/* === Summary (mittlere Spalte) === */
.product-summary {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.product-title {
    font-family: 'Alice', serif;
    font-size: 1.55rem;
    color: #112736;
    margin: 0;
    line-height: 1.2;
}

.product-tagline {
    font-size: 1.05rem;
    color: #4b879a;
    font-style: italic;
    margin: 0;
    line-height: 1.4;
}

.product-shortdesc {
    font-size: 0.97rem;
    line-height: 1.6;
    color: #2a3f4d;
    margin: 0;
}

/* Toggle-Button wird nicht mehr verwendet (Details immer sichtbar) */
.product-toggle { display: none !important; }

/* === Konfigurator (rechte Spalte, immer sichtbar) === */
.product-config {
    background: #fff8ef;
    border-radius: 12px;
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.product-price-display {
    text-align: center;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(75, 135, 154, 0.15);
    margin-bottom: 0.1rem;
}

.product-price-value {
    font-family: 'Alice', serif;
    font-size: 1.8rem;
    color: #4b879a;
    line-height: 1;
}

/* Kleiner Versand-Hinweis unter dem Preis im Produktkonfigurator */
.product-shipping-note {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #6b7280;
    line-height: 1.3;
}

.product-shipping-note a {
    color: #6b7280;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.product-shipping-note a:hover {
    color: #4b879a;
}

/* Stock-Hinweis (z.B. "Nur noch 6 Stück verfügbar") */
.product-stock-note {
    text-align: center;
    margin: 0.5rem 0 0;
    font-size: 0.82rem;
    color: #c4783a;
    font-style: italic;
    line-height: 1.4;
}

.product-config-row {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-config-row[hidden] { display: none; }

.product-config-label {
    font-size: 0.8rem;
    color: #4b879a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-config-static-row {
    flex-direction: row;
    align-items: baseline;
    gap: 0.5rem;
}

.product-config-static {
    color: #112736;
    font-size: 0.92rem;
}

/* Farben */
.product-colors {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.product-color {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(17, 39, 54, 0.15);
    padding: 0;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.product-color:hover {
    transform: scale(1.1);
}

.product-color.active {
    border-color: #4b879a;
}

/* Größen */
.product-sizes {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.product-size {
    min-width: 36px;
    height: 32px;
    padding: 0 0.45rem;
    border: 1px solid rgba(75, 135, 154, 0.35);
    background: #fff;
    color: #112736;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.product-size:hover {
    border-color: #4b879a;
}

.product-size.active {
    background: #4b879a;
    color: #fff8ef;
    border-color: #4b879a;
}

/* Anzahl */
.product-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(75, 135, 154, 0.35);
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
    align-self: flex-start;
}

.product-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    color: #112736;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.product-qty-btn:hover {
    background: #f4ece0;
}

.product-qty-input {
    width: 44px;
    height: 32px;
    border: none;
    border-left: 1px solid rgba(75, 135, 154, 0.2);
    border-right: 1px solid rgba(75, 135, 154, 0.2);
    text-align: center;
    background: #fff;
    color: #112736;
    font-size: 0.92rem;
    appearance: textfield;
    -moz-appearance: textfield;
}

.product-qty-input::-webkit-outer-spin-button,
.product-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* In den Warenkorb Button */
.product-add-btn {
    background: #4b879a;
    color: #fff8ef;
    border: none;
    padding: 0.75rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-top: 0.4rem;
    box-shadow: 0 2px 8px rgba(75, 135, 154, 0.25);
}

.product-add-btn:hover {
    background: #3a6e80;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 135, 154, 0.35);
}

.product-add-btn.success {
    background: #2a8060;
    color: #fff;
}

/* === Details-Bereich ===
 * Desktop: immer sichtbar, direkt in der mittleren Spalte unter Summary.
 * Mobile: Akkordeon-Verhalten (Toggle), erscheint zwischen Summary und Konfigurator. */
.product-details {
    background: transparent;
    overflow: hidden;
}

.product-details[hidden] { display: block; }

.product-details-inner {
    padding-top: 0.6rem;
    border-top: 1px solid rgba(75, 135, 154, 0.18);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.product-details-block {
    min-width: 0;
}

.product-details-heading {
    font-family: 'Alice', serif;
    font-size: 1.05rem;
    color: #4b879a;
    margin: 0 0 0.5rem;
    font-weight: 400;
}

.product-details-block p {
    line-height: 1.7;
    color: #112736;
    margin: 0 0 0.6rem;
}

.product-details-block p:last-child { margin-bottom: 0; }

.product-details-block p strong {
    color: #112736;
}

/* Nummerierte Anleitung im Mehr-Infos-Akkordeon */
.product-details-list {
    margin: 0;
    padding-left: 1.4rem;
    line-height: 1.65;
    color: #112736;
}

.product-details-list li {
    margin-bottom: 0.55rem;
}

.product-details-list li:last-child {
    margin-bottom: 0;
}

/* Größentabellen-Icon (📏): nur auf Mobile sichtbar (oben rechts auf dem Bild)
 * Auf Desktop wird stattdessen der Text-Link unter dem Bild angezeigt. */
.product-sizes-icon {
    display: none; /* default hidden — wird auf Mobile per Media-Query eingeblendet */
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 248, 239, 0.92);
    color: #112736;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s ease, transform 0.15s ease;
    padding: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    font-size: 1.1rem;
    line-height: 1;
}

.product-sizes-icon:hover {
    background: #fff;
    transform: scale(1.05);
}

/* Text-Link unter dem Bild — nur auf Desktop sichtbar */
.product-sizes-link {
    margin: 0;
    text-align: center;
}

.product-sizes-trigger {
    background: none;
    border: none;
    color: #4b879a;
    padding: 0;
    cursor: pointer;
    font-size: 0.88rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: inherit;
    transition: color 0.2s ease;
}

.product-sizes-trigger:hover {
    color: #112736;
}

/* Mobile: Icon zeigen, Text-Link verstecken */
@media (max-width: 900px) {
    .product-sizes-icon { display: flex; }
    .product-sizes-link { display: none; }
}

/* Tabelle im Größentabellen-Modal */
.shop-modal-content-wide {
    max-width: 560px;
    text-align: left;
}

.product-size-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1rem;
    font-size: 0.92rem;
}

.product-size-table th,
.product-size-table td {
    padding: 0.55rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(75, 135, 154, 0.18);
}

.product-size-table thead th {
    background: rgba(75, 135, 154, 0.12);
    color: #4b879a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 0.82rem;
}

.product-size-table tbody th {
    color: #4b879a;
    font-weight: 600;
    background: rgba(75, 135, 154, 0.05);
}

.shop-size-disclaimer {
    font-size: 0.82rem;
    color: #7a6850;
    font-style: italic;
    line-height: 1.5;
    margin: 0;
}

.product-specs {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4rem 1rem;
    margin: 0;
    line-height: 1.6;
}

.product-specs dt {
    color: #4b879a;
    font-weight: 500;
}

.product-specs dd {
    margin: 0;
    color: #112736;
}

/* === Sticky Cart-Bar (Petrol leuchtend) === */
.shop-cart-stack {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1010; /* über dem Musik-Mini-Player (z-index 1000) — aber stack-bottom wird per JS hochgesetzt wenn Mini-Player sichtbar */
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 0; /* Cart-Bars direkt aneinander */
    transition: bottom 0.25s ease;
}

/* Zwei Bars: dünne Trennlinie statt Lücke */
.shop-cart-bar + .shop-cart-bar {
    border-top: 1px solid rgba(255, 248, 239, 0.18);
}

.shop-cart-bar {
    pointer-events: auto;
    position: relative;
    background: linear-gradient(180deg, #4b879a 0%, #3a6e80 100%);
    color: #fff8ef;
    box-shadow: 0 -4px 20px rgba(75, 135, 154, 0.45), 0 0 30px rgba(75, 135, 154, 0.2);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    animation: cart-glow-in 0.4s ease;
    overflow: hidden;
    /* Hintergrund-Scroll mobil verhindern wenn man die Bar berührt */
    touch-action: none;
    overscroll-behavior: contain;
}

.shop-cart-bar.dragging {
    transition: none;
}

/* Product-Card Highlight nach Cart-Navigation */
.product-card-highlight {
    animation: card-highlight-pulse 1.2s ease;
}

@keyframes card-highlight-pulse {
    0% { box-shadow: 0 2px 12px rgba(17, 39, 54, 0.06), 0 0 0 0 rgba(75, 135, 154, 0.4); }
    30% { box-shadow: 0 2px 12px rgba(17, 39, 54, 0.06), 0 0 0 12px rgba(75, 135, 154, 0.18); }
    100% { box-shadow: 0 2px 12px rgba(17, 39, 54, 0.06), 0 0 0 0 rgba(75, 135, 154, 0); }
}

/* Cart-Item-Edit auf Desktop: clickable (zur Produktseite springen) */
@media (min-width: 901px) {
    .shop-cart-item-edit { cursor: pointer; }
    .shop-cart-item-edit:hover .shop-cart-item-name {
        text-decoration: underline;
        text-underline-offset: 3px;
    }
}

/* Drag-Handle (kleine Linie oben in der Bar, click/drag zum Auf-/Zuklappen) */
.shop-cart-drag-handle {
    width: 100%;
    height: 14px;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    touch-action: none;
}
.shop-cart-drag-handle::before {
    content: '';
    width: 40px;
    height: 4px;
    background: rgba(255, 248, 239, 0.45);
    border-radius: 2px;
    transition: background 0.15s ease, width 0.15s ease;
}
.shop-cart-drag-handle:hover::before {
    background: rgba(255, 248, 239, 0.7);
    width: 56px;
}
.shop-cart-bar.drag-active .shop-cart-drag-handle::before {
    background: #ffdca8;
    width: 60px;
}

/* Swipe-Background mit Mülleimer (wird sichtbar wenn man zur Seite wischt) */
.shop-cart-swipe-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, #c4434c 0%, #a32e36 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: -1;
    opacity: var(--swipe-progress, 0);
    transition: opacity 0.15s ease;
}

.shop-cart-swipe-icon {
    font-size: 1.6rem;
    color: #fff;
    transform: scale(calc(0.7 + var(--swipe-progress, 0) * 0.5));
    transition: transform 0.2s ease;
}

.shop-cart-bar.swipe-confirmed .shop-cart-swipe-icon {
    transform: scale(1.4);
}

/* Chevron entfernt, der Drag-Handle übernimmt die Affordance */
.shop-cart-chevron { display: none; }

@keyframes cart-glow-in {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.shop-cart-bar[hidden] { display: none; }

.shop-cart-summary-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1.2rem 0.85rem;
    cursor: pointer;
    touch-action: none;
}

.shop-cart-toggle {
    flex: 1;
    color: #fff8ef;
    font-size: 0.98rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.shop-cart-icon {
    font-size: 1.25rem;
}

.shop-cart-text {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.shop-cart-label {
    font-weight: 600;
    letter-spacing: 0.3px;
}

.shop-cart-divider { opacity: 0.5; }

.shop-cart-count { color: #fff8ef; }

.shop-cart-total {
    color: #ffdca8;
    font-family: 'Alice', serif;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
}

.shop-cart-checkout-inline {
    background: #fff8ef;
    color: #112736;
    border: none;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.shop-cart-checkout-inline:hover {
    background: #ffdca8;
    transform: translateY(-1px);
}

.shop-cart-info-btn {
    background: rgba(255, 248, 239, 0.18);
    border: none;
    color: #fff8ef;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s ease;
    display: none;
}

.shop-cart-info-btn:hover {
    background: rgba(255, 248, 239, 0.3);
}

body.shop-cart-double .shop-cart-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.shop-cart-dismiss {
    background: none;
    border: none;
    color: #fff8ef;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.2rem 0.4rem;
    transition: opacity 0.2s ease;
}

.shop-cart-dismiss:hover { opacity: 1; }

/* Aufgeklappte Cart-Details — smooth max-height animation statt sprunghaft */
.shop-cart-details {
    background: #1a3142;
    padding: 0 1.2rem;
    border-top: 1px solid rgba(255, 248, 239, 0);
    max-height: 0;
    opacity: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: max-height 0.35s cubic-bezier(0.2, 0.85, 0.25, 1),
                opacity 0.25s ease,
                padding 0.3s ease,
                border-top-color 0.3s ease;
}

.shop-cart-bar.expanded .shop-cart-details {
    max-height: 420px;
    opacity: 1;
    padding: 0.8rem 1.2rem 1rem;
    border-top-color: rgba(255, 248, 239, 0.1);
}

/* Beim Ziehen am Handle: keine Transition, damit das Panel dem Cursor exakt folgt */
.shop-cart-bar.drag-active .shop-cart-details {
    transition: none;
}

/* Dezenter "Leeren"-Button links neben "Zur Bestellübersicht" in der oberen Zeile */
.shop-cart-clear {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: none;
    color: rgba(255, 248, 239, 0.7);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    padding: 0.3rem 0.5rem;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 248, 239, 0.35);
    transition: color 0.15s ease;
}
.shop-cart-clear:hover { color: #fff8ef; }
/* "Leeren" nur am Desktop zeigen — mobil ausblenden */
@media (max-width: 768px) {
    .shop-cart-clear { display: none; }
}

/* Wenn .shop-cart-details mit hidden-Attribut: trotzdem im DOM bleiben für transitions */
.shop-cart-details[hidden] {
    display: block; /* hidden-Attribut wird durch CSS-Animation überschrieben */
}

.shop-cart-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Item-Zeile auf Desktop: Info | Variants | Controls (3 Spalten)
 * Auf Mobile: Info | Controls (Variants hidden, Modal-Click übernimmt) */
.shop-cart-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 248, 239, 0.08);
    align-items: center;
}

@media (min-width: 901px) {
    .shop-cart-item {
        grid-template-columns: minmax(180px, 1.2fr) auto auto;
    }
}

/* Inline-Variant-Picker (Desktop) */
.shop-cart-item-variants {
    display: none;
}

@media (min-width: 901px) {
    .shop-cart-item-variants {
        display: flex;
        align-items: center;
        gap: 0.8rem;
    }
}

.shop-cart-vrow {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.shop-cart-vchip {
    border: 2px solid transparent;
    cursor: grab;
    padding: 0;
    transition: transform 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
    font-family: inherit;
}

.shop-cart-vchip:hover {
    transform: scale(1.1);
}

.shop-cart-vchip:active,
.shop-cart-vchip.dragging {
    cursor: grabbing;
    opacity: 0.5;
    transform: scale(0.95);
}

.shop-cart-vchip.active {
    border-color: #ffdca8;
}

.shop-cart-vcolor {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.shop-cart-vsize {
    min-width: 30px;
    height: 26px;
    padding: 0 0.4rem;
    border-radius: 5px;
    background: rgba(255, 248, 239, 0.1);
    color: #fff8ef;
    font-size: 0.78rem;
}

.shop-cart-vsize.active {
    background: rgba(255, 220, 168, 0.25);
    color: #fff;
}

/* Drop-Target visuelles Feedback */
.shop-cart-item-edit.drop-target {
    outline: 2px dashed #ffdca8;
    outline-offset: 2px;
    border-radius: 6px;
}

.shop-cart-item:last-child { border-bottom: none; }

.shop-cart-item-edit {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0.7rem;
    align-items: center;
    background: none;
    border: none;
    color: #fff8ef;
    cursor: pointer;
    padding: 0;
    text-align: left;
    min-width: 0;
}

.shop-cart-item-edit:hover { opacity: 0.85; }

.shop-cart-item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    background: rgba(255, 248, 239, 0.1);
}

.shop-cart-item-thumb-empty {
    display: block;
}

.shop-cart-item-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.shop-cart-item-name {
    color: #fff8ef;
    font-size: 0.93rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shop-cart-item-variant {
    font-size: 0.78rem;
    opacity: 0.7;
}

.shop-cart-item-price {
    font-family: 'Alice', serif;
    color: #ffdca8;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.shop-cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.shop-cart-item-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 248, 239, 0.25);
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 248, 239, 0.08);
}

.shop-cart-qty-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #fff8ef;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.shop-cart-qty-btn:hover {
    background: rgba(255, 248, 239, 0.18);
}

.shop-cart-qty-val {
    min-width: 22px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    color: #fff8ef;
    font-size: 0.88rem;
}

.shop-cart-item-remove {
    background: none;
    border: none;
    color: #fff8ef;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.05rem;
    padding: 0.4rem 0.5rem;
    transition: opacity 0.2s ease, transform 0.15s ease;
    /* Emoji-Helligkeit auf hellem-Text-Style ziehen */
    filter: grayscale(0.5) brightness(1.4);
}

.shop-cart-item-remove:hover {
    opacity: 1;
    transform: scale(1.08);
    filter: grayscale(0.3) brightness(1.5);
}

@media (max-width: 900px) {
    .shop-cart-item-remove {
        padding-right: 0.2rem;
        margin-right: -0.3rem; /* näher an den Rand, nicht im Schatten der Bar */
    }
}

/* Versand-Zeile im aufgeklappten Cart */
.shop-cart-shipping {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0.8rem 0 0;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 248, 239, 0.1);
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255, 248, 239, 0.85);
}

.shop-cart-shipping-label {
    font-weight: 600;
    color: rgba(255, 248, 239, 0.95);
    white-space: nowrap;
}

.shop-cart-shipping-values {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.shop-cart-shipping-line {
    color: rgba(255, 248, 239, 0.85);
}

/* === Toast (Undo) === */
.shop-toast {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #112736;
    color: #fff8ef;
    padding: 0.7rem 1rem 0.7rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(17, 39, 54, 0.3);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.92rem;
    z-index: 1280;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease, bottom 0.25s ease;
    max-width: calc(100vw - 2rem);
}

.shop-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Wenn Cart sichtbar, Toast über die Bars setzen */
body.has-cart .shop-toast { bottom: 75px; }
body.shop-cart-double .shop-toast { bottom: 140px; }

.shop-toast-msg {
    flex: 1;
}

.shop-toast-action {
    background: none;
    border: none;
    color: #ffdca8;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    font-size: 0.92rem;
}

.shop-toast-action:hover { color: #fff; }

/* === Variant-Edit-Popover (Reuse shop-modal Style) === */
.shop-modal-subtitle {
    color: #4b879a;
    font-size: 0.95rem;
    margin: -0.6rem 0 1rem;
    font-style: italic;
}

.shop-variant-row {
    margin-bottom: 1rem;
    text-align: left;
}

.shop-variant-row:last-child { margin-bottom: 0; }

.shop-variant-label {
    display: block;
    font-size: 0.78rem;
    color: #4b879a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.45rem;
}

.shop-variant-options {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* === Info-Popup (Warum nicht zusammengefasst?) === */
.shop-info-popup {
    position: fixed;
    inset: 0;
    background: rgba(17, 39, 54, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    padding: 1.5rem;
    animation: fade-in 0.2s ease;
}

.shop-info-popup[hidden] { display: none; }

.shop-info-popup-content {
    background: #fff8ef;
    color: #112736;
    border-radius: 18px;
    padding: 2rem;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(17, 39, 54, 0.4);
    position: relative;
}

.shop-info-popup-title {
    font-family: 'Alice', serif;
    color: #4b879a;
    margin: 0 0 1rem;
    font-size: 1.3rem;
    font-weight: 400;
    padding-right: 2rem;
}

.shop-info-popup-body {
    line-height: 1.6;
}

.shop-info-popup-body p {
    margin: 0 0 0.8rem;
}

.shop-info-popup-body p:last-child { margin-bottom: 0; }

.shop-info-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #4b879a;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

/* === Coming-Soon-Modal === */
.shop-modal {
    position: fixed;
    inset: 0;
    background: rgba(17, 39, 54, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1250;
    padding: 1.5rem;
    animation: fade-in 0.2s ease;
}

.shop-modal[hidden] { display: none; }

.shop-modal-content {
    background: #fff8ef;
    color: #112736;
    border-radius: 22px;
    padding: 2.5rem 2rem;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(17, 39, 54, 0.4);
    position: relative;
}

.shop-modal-title {
    font-family: 'Alice', serif;
    color: #4b879a;
    margin: 0 0 1rem;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 1.5px;
}

.shop-modal-body {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.shop-modal-body p { margin: 0 0 0.6rem; }
.shop-modal-body p:last-child { margin-bottom: 0; }

.shop-modal-action {
    background: #4b879a;
    color: #fff8ef;
    border: none;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.shop-modal-action:hover {
    background: #3a6e80;
}

.shop-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #4b879a;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === Bestellübersicht-Modal (recycelt shop-modal Optik) === */
.shop-order-modal {
    text-align: left;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.shop-order-modal .shop-modal-title { text-align: center; }

.shop-order-modal .shop-modal-subtitle {
    text-align: center;
    font-style: normal;
    color: rgba(17, 39, 54, 0.6);
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: -0.4rem 0 1.2rem;
}

.shop-order-modal .shop-modal-body {
    overflow-y: auto;
    margin-bottom: 1.2rem;
    text-align: left;
    /* Abstand zwischen Produktliste und Scrollbalken */
    padding-right: 0.7rem;
}

.shop-order-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-order-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid rgba(17, 39, 54, 0.08);
}

.shop-order-item:first-child { padding-top: 0; }

.shop-order-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(17, 39, 54, 0.06);
    flex-shrink: 0;
}

.shop-order-thumb-empty {
    display: inline-block;
}

.shop-order-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.shop-order-item-name {
    font-weight: 600;
    color: #112736;
    font-size: 0.95rem;
}

.shop-order-item-variant {
    font-size: 0.82rem;
    color: rgba(17, 39, 54, 0.6);
}

.shop-order-item-qty {
    font-size: 0.8rem;
    color: rgba(17, 39, 54, 0.55);
}

.shop-order-item-price {
    font-family: 'Alice', serif;
    font-size: 1.05rem;
    color: #4b879a;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.shop-order-shipping {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(17, 39, 54, 0.1);
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(17, 39, 54, 0.75);
}

.shop-order-shipping-label {
    font-weight: 600;
    color: #112736;
    white-space: nowrap;
}

.shop-order-shipping-values {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.shop-order-total-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid rgba(17, 39, 54, 0.1);
}

.shop-order-total-label {
    font-weight: 600;
    color: #112736;
    font-size: 1rem;
}

.shop-order-total-value {
    font-family: 'Alice', serif;
    font-size: 1.4rem;
    color: #4b879a;
    font-variant-numeric: tabular-nums;
}

.shop-order-notice {
    margin: 1.2rem 0 0;
    padding: 0.85rem 1rem;
    background: rgba(75, 135, 154, 0.1);
    border: 1px solid rgba(75, 135, 154, 0.25);
    border-radius: 12px;
    color: #3a6e80;
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: center;
}

.shop-order-cta {
    align-self: center;
}

.shop-order-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 0.2rem;
}

.shop-order-edit {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1.5px solid rgba(75, 135, 154, 0.5);
    color: #4b879a;
    padding: 0.75rem 1.6rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.shop-order-edit:hover {
    background: rgba(75, 135, 154, 0.12);
    border-color: #4b879a;
    color: #3a6e80;
}

/* === Bilder-Lightbox === */
.shop-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(17, 39, 54, 0.65);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    z-index: 1300;
    padding: 2rem;
    animation: fade-in 0.25s ease;
}

.shop-lightbox[hidden] { display: none; }

.shop-lightbox-viewport {
    width: 100%;
    height: 80vh;            /* Fallback; per JS auf die echte Bildhöhe gesetzt */
    overflow: hidden;
    transition: height 0.25s ease;
}

.shop-lightbox-track {
    display: flex;
    height: 100%;
    transition: transform 0.35s ease;
    will-change: transform;
    touch-action: pan-y;
}

.shop-lightbox-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-lightbox-img {
    max-width: 90vw;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.shop-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 248, 239, 0.15);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    transition: background 0.2s ease;
}

.shop-lightbox-close:hover {
    background: rgba(255, 248, 239, 0.3);
}

.shop-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 248, 239, 0.15);
    border: none;
    color: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 2rem;
    line-height: 1;
    transition: background 0.2s ease;
}

.shop-lightbox-nav:hover {
    background: rgba(255, 248, 239, 0.3);
}

.shop-lightbox-nav.prev { left: 1.5rem; }
.shop-lightbox-nav.next { right: 1.5rem; }
.shop-lightbox-nav[hidden] { display: none; }

/* Thumbnail-Leiste in der Zoom-Ansicht — zeigt, wo man ist (aktives mit hellem Glow) */
.shop-lightbox-thumbs {
    display: flex;
    gap: 8px;
    max-width: min(90vw, 760px);
    overflow-x: auto;
    padding: 6px;
    scrollbar-width: none;
}

.shop-lightbox-thumbs::-webkit-scrollbar { display: none; }

.shop-lightbox-thumb {
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.shop-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shop-lightbox-thumb:hover { border-color: rgba(255, 255, 255, 0.75); }

.shop-lightbox-thumb.active {
    border-color: #fff;
    box-shadow: 0 0 10px 2px rgba(255, 255, 255, 0.75);
}

/* Padding für Body wenn Cart sichtbar (Inhalt wird nicht abgeschnitten) */
body.shop-page.has-cart { padding-bottom: 90px; }
body.shop-page.shop-cart-double { padding-bottom: 160px; }

/* Wenn Mini-Player aktiv: cart-stack rutscht über den Player */
body.has-cart.has-active-mini-player .shop-cart-stack { bottom: var(--mini-player-height, 60px); }

/* === Mobile: 1-Spalte. Reihenfolge: Bild → Info → Konfigurator === */
@media (max-width: 900px) {
    .shop-main {
        padding: 80px 1rem 3rem;
    }

    /* Mobil in der Zoom-Ansicht: keine Pfeile — gewischt wird (Thumbnail-Leiste bleibt). */
    .shop-lightbox-nav {
        display: none;
    }

    .product-card-main {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding: 1.2rem;
    }

    .product-media {
        max-width: 320px;
        margin: 0 auto;
        width: 100%;
        order: 1;
    }

    .product-info {
        order: 2;
    }

    .product-config {
        order: 3;
    }
}

@media (max-width: 560px) {
    .product-card {
        border-radius: 14px;
    }

    .product-title { font-size: 1.3rem; }
    .product-price-value { font-size: 1.6rem; }

    .shop-cart-summary-row {
        padding: 0.7rem 0.9rem;
        gap: 0.5rem;
    }

    .shop-cart-checkout-inline {
        padding: 0.5rem 1rem;
        font-size: 0.88rem;
    }

    .shop-cart-info-btn {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
    }

    .shop-lightbox {
        padding: 1rem;
    }

    .shop-lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
    }

    .shop-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }

    .shop-lightbox-nav.prev { left: 0.6rem; }
    .shop-lightbox-nav.next { right: 0.6rem; }
}
