/* --- OPTIMIERTES DESIGN FÜR EINZELPRODUKT-KARTEN --- */

/* Ganz oben in der Datei einfügen */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: white !important;
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 25px; /* Abgerundete Ecken wie bei Kategorie-Karten */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Der Container für das Bild (erzeugt den weißen Rahmen-Effekt) */
.product-card .card-img-container {
    padding: 8px; /* Der Abstand für den weißen "Rahmen" um das Bild */
    background-color: white;
    overflow: hidden;                 /* kappt evtl. Sub-Pixel-Überstand des Bildes */
    border-radius: 20px;              /* gleicher Radius wie das Bild (weißer Rahmen) */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);         /* erzwingt sauberes Rundecken-Clipping auf iOS Safari */
}

.product-card img {
    display: block;                   /* entfernt Inline-Baseline-Lücke unten */
    width: 100%;
    /* Nicht mehr zwingend quadratisch: Verhältnis 4:5 für mehr Höhe */
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px; /* Abgerundete Ecken am Bild selbst */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.product-card .card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 1.5rem 1.5rem 1.5rem !important;
    background-color: white !important;
}

/* Titel-Styling mit deiner Dancing Script Font */
.product-card .product-title, .product-card .large-card .product-title {
    font-family: 'Indie Flower', cursive;
    font-size: 1.5rem;
    color: #2c5157;
    margin-bottom: 0;
    line-height: 1.2;
}

/* Preis-Tag Hervorhebung */
.product-card .price-tag {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #4a8d96;
    margin: 10px 0 15px 0;
}

/* Versand- und Verpackungspauschale-Hinweis im Produkt-Lightbox (PAngV § 6) */
.shipping-hint {
    font-size: 1rem;
    color: #666;
    margin-bottom: 34px;
}
.shipping-hint a {
    color: #4a8d96;
    text-decoration: underline;
}
.shipping-hint a:hover {
    color: #2c5157;
}

/* Hover-Effekt: Karte hebt sich leicht ab */
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* Button-Anpassung innerhalb der Karte */
.product-card .btn-custom , .large-card .btn-custom {
    border-radius: 12px;
    padding: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}



/* Styling für den Mengen-Wähler */

.qty-selector {
    width: 70px;
    height: 45px; /* Gleiche Höhe wie der Button */
}

.qty-input {
    background-color: white !important;
    border-radius: 12px 0 0 12px !important;
    font-weight: 600;
    color: #2c5157;
    padding: 0;
}

.qty-selector .d-flex {
    width: 25px;
}

.qty-selector .btn {
    padding: 0;
    font-size: 0.7rem;
    height: 50%;
    border: 1px solid #ced4da;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-qty-plus {
    border-radius: 0 12px 0 0 !important;
    border-bottom: none !important;
}

.btn-qty-minus {
    border-radius: 0 0 12px 0 !important;
}

.qty-selector .btn:hover {
    background: #e9ecef;
    color: #2c5157;
}

.selection-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: none;
    letter-spacing: 1px;
    margin-bottom: 8px;
}


/* Mengenauswahl (Horizontal) */
.custom-qty-group {
    display: inline-flex;
    align-items: center;
    border: 1px solid #2c5157;
    border-radius: 25px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    background: #2c5157;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #2c5157;
}

.qty-display {
    width: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    color: #2c5157;
}


/* Verhindert, dass das readonly-Feld grau hinterlegt wird */
.qty-display {
    border-left: none !important;
    border-right: none !important;
    font-weight: 600;
    color: #2c5157 !important;
    cursor: default;
}

/* Optional: Damit die Bootstrap-Buttons den Fokus-Ring in deiner Farbe haben */
.btn-outline-secondary:focus {
    box-shadow: 0 0 0 0.25rem rgba(44, 81, 87, 0.25) !important;
    border-color: #2c5157 !important;
}

.selection-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: none;
    letter-spacing: 1px;
    margin-bottom: 8px;
}



.product-info-text {
    /* border-top: 1px solid #eee; /* Eine feine Trennlinie oben */
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: 10px;
    font-size: 1.0rem;
}

.info-label {
    display: block;
    font-size: 1.0rem;
    font-weight: 500;
    color: #999;
    text-transform: none;
    letter-spacing: 0.75px;
    margin-bottom: 2px;
}

.info-value {
    font-size: 1.2rem;
    color: #444;
    font-weight: 500;

}

/* Anpassung der Farbauswahl-Beschriftung auf linksbündig */
.selection-label {
    font-size: 0.7rem;
    color: #999;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.details-toggle {
    cursor: pointer;
    color: #2c5157; /* Dein Türkis-Ton */
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.details-toggle:hover {
    opacity: 0.7;
}

.chevron-icon {
    font-size: 0.6rem;
    display: inline-block;
    transition: transform 0.3s;
    margin-left: 4px;
}

/* Zustand wenn offen */
.details-toggle.active .chevron-icon {
    transform: rotate(180deg);
}

.expandable-details {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}

/* =========================================================
   RELATED-PRODUCTS TOAST (Produktseite)
   ========================================================= */

#related-products-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 81, 87, 0.18);
    z-index: 10500;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

#related-products-toast.related-toast-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Mobile: Toast über die nutzbare Breite spannen statt fixer 320px */
@media (max-width: 767.98px) {
    #related-products-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        max-width: none;
    }
}

.related-toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #4a8d96;
    color: #fff;
    padding: 10px 16px;
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.related-toast-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
.related-toast-close:hover { opacity: 1; }

.related-toast-body {
    padding: 10px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.related-toast-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-toast-img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid #eee;
}

.related-toast-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.related-toast-title {
    font-family: 'Raleway', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #2c5157;
    line-height: 1.2;
}

.related-toast-price {
    font-size: 0.82rem;
    color: #4a8d96;
    font-weight: 500;
}

.related-toast-btn {
    background: #4a8d96;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}
.related-toast-btn:hover { background: #3a6f76; }

/* =========================================================
   MINDESTBESTELLWERT-TOAST (Produktseite) – rechts positioniert,
   damit er direkt ins Auge fällt; rueckt per JS (showRelatedToast())
   automatisch ueber den Empfehlungs-Toast, sobald dieser erscheint.
   ========================================================= */

.mindestbestellwert-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 81, 87, 0.18);
    z-index: 10500;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    pointer-events: none;
}

.mindestbestellwert-toast.related-toast-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

@media (max-width: 767.98px) {
    .mindestbestellwert-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
        max-width: none;
    }
}

.mindestbestellwert-toast .related-toast-header {
    position: relative;
    justify-content: center;
    background: #f8e5e5;
    color: #9c4d68;
    font-size: 1rem;
    font-weight: 800;
    padding: 16px 34px 6px;
    text-align: center;
}

.mindestbestellwert-toast .related-toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #9c4d68;
}

.mindestbestellwert-toast .related-toast-body {
    background: #fdf6f6;
    padding: 4px 18px 16px;
}

.mbw-toast-text {
    font-family: 'Raleway', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    color: #2c5157;
    line-height: 1.4;
    text-align: center;
}

.mbw-toast-progress {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #eef2f2;
    overflow: hidden;
}

.mbw-toast-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: #c9738f;
    transition: width 0.4s ease;
}

/* Highlight-Pulsring beim Anzeigen einer angesprungenen Produktkarte */
.product-card.related-highlight {
    animation: related-pulse 0.6s ease 2;
}

@keyframes related-pulse {
    0%   { box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
    50%  { box-shadow: 0 0 0 6px rgba(44, 81, 87, 0.25), 0 8px 24px rgba(44, 81, 87, 0.15); }
    100% { box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
}

/* ============================================================ */

/* Der kleine weiße Plus-Button */
.img-zoom-btn {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 32px;
    height: 32px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease, background-color 0.2s ease;
    z-index: 10;
}

.img-zoom-btn:hover {
    transform: scale(1.1);
    background-color: #f8f8f8;
}

.img-zoom-btn span {
    color: #2c5157; /* Dein Theme-Grün */
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

/* Lightbox Overlay (Vollbild). Deckkraft bewusst auf 1 (nicht 0.85). */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 1);
    display: none; /* Initial versteckt */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: zoom-out;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

/* Der Schließen-Button in der Lightbox */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 10001; /* Liegt über dem Bild */
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.1);
    background-color: #f0f0f0;
}

/* Das X im Button */
.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: #2c5157; /* Dein Theme-Grün */
}

.lightbox-close::before { transform: rotate(45deg); }
.lightbox-close::after { transform: rotate(-45deg); }


/* Erweitertes Overlay */
.lightbox-content-container {
    display: flex;
    flex-direction: row;
    background: white;
    width: 90%;
    max-width: 1050px;
    max-height: 85vh;
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* HIER HINZUFÜGEN: */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.lightbox-overlay.active .lightbox-content-container {
    transform: scale(1);
}

/* Linke Seite: Bild */
.lightbox-image-side {
    flex: 1.2;
    background: #fcfcfc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-image-side img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 15px;
}

/* ----- Lightbox-Slideshow (Detailansicht mit mehreren Bildern) ----- */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    color: #2c5157;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 3;
}
.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.92);
}
.lightbox-nav-prev { left: 22px; }
.lightbox-nav-next { right: 22px; }

.lightbox-dots {
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}
.lightbox-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(44, 81, 87, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}
.lightbox-dot:hover { background: rgba(44, 81, 87, 0.6); }
.lightbox-dot.active {
    background: #2c5157;
    transform: scale(1.25);
}

/* ----- Produkt-Navigation (voriges/nächstes Produkt derselben Kategorie) -----
   Reines Desktop-Feature: sitzt außen am Kartenrand, mit kleinem Abstand
   verankert (bewegt sich mit der Karte), volle Kreis-Buttons wie auf der
   Impressionen-Seite. Unterhalb des Umschaltpunkts, an dem die Karte selbst
   auf gestapeltes Layout wechselt (767.98px), komplett ausgeblendet. */
.lightbox-card-wrap {
    position: relative;
    width: 100%;
}

.product-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    padding: 0;
    border: none;
    outline: none;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s ease;
}
.product-nav:hover { transform: translateY(-50%) scale(1.1); }

.product-nav-prev { right: 100%; margin-right: 14px; }
.product-nav-next { left: 100%; margin-left: 14px; }

.product-nav::before,
.product-nav::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 3px;
    background-color: #2c5157;
    border-radius: 2px;
}
.product-nav-prev::before { transform: rotate(-45deg); transform-origin: left center; left: 22px; top: 30px; }
.product-nav-prev::after  { transform: rotate(45deg);  transform-origin: left center; left: 22px; top: 30px; }
.product-nav-next::before { transform: rotate(45deg);  transform-origin: right center; right: 22px; top: 30px; }
.product-nav-next::after  { transform: rotate(-45deg); transform-origin: right center; right: 22px; top: 30px; }

@media (max-width: 767.98px) {
    .product-nav { display: none !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .product-nav { width: 45px; height: 45px; }
    .product-nav-prev { margin-right: 8px; }
    .product-nav-next { margin-left: 8px; }
    .product-nav::before,
    .product-nav::after { width: 14px; }
    .product-nav-prev::before,
    .product-nav-prev::after { left: 15px; top: 21px; }
    .product-nav-next::before,
    .product-nav-next::after { right: 15px; top: 21px; }
}

/* Interne ProduktNr als zweite Titelzeile bei Platzhalter-Artikeln */
.product-nr-hint {
    display: block;
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
    margin-top: 2px;
}

/* Rechte Seite: Produktdetails */
.lightbox-details-side {
    flex: 0.8;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    font-family: 'Raleway', serif !important;
}

/* Farbkreise-Zeile auf Breite von 9 Kreisen (34px + 8px gap) deckeln, damit
   Zeile 1 auf breiten Bildschirmen zuverlaessig nach 9 umbricht statt je nach
   verfuegbarer Lightbox-Breite unterschiedlich zu reissen. Auf schmalen
   Screens greift trotzdem ganz normal flex-wrap frueher. */
.color-selection > .d-flex {
    max-width: 372px;
    margin-left: auto;
    margin-right: auto;
}

/* Zusatzoptionen-Dropdown (z.B. Buchstabe wählen) – generische zweite
   Auswahl-Achse neben Farbe, s. .p-options/openQuickView() in card-logic.js. */
.option-selection {
    text-align: center;
}

.option-select {
    width: auto;
    max-width: 220px;
    margin: 0 auto;
    display: block;
    border: 1px solid #2c5157;
    border-radius: 8px;
    color: #2c5157;
    font-weight: 600;
    padding: 8px 32px 8px 18px;
}

.option-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(44, 81, 87, 0.25);
    border-color: #2c5157;
    outline: none;
}

/* ===== Responsive: Detailkarte als Vollbild-Sheet (Handys) ===== */
@media (max-width: 767.98px) {
    /* Overlay: nicht mehr zentrieren -> kein Abschneiden oben/unten */
    .lightbox-overlay {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }

    /* Shell füllt den ganzen Bildschirm (dvh = ohne Browser-Toolbar-Clipping) */
    /* !important schlägt die Inline-Styles aus card-logic.js (padding/max-width) */
    .lightbox-shell {
        width: 100% !important;
        max-width: 100% !important;
        height: 100vh;
        height: 100dvh;
        margin: 0 !important;
        padding: 0 !important;
        gap: 0 !important;
    }

    /* Karte = 3-Zonen-Spalte über volle Höhe */
    .lightbox-content-container {
        flex-direction: column;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
        max-height: 100dvh;
        border-radius: 0 !important;
        overflow: hidden;
    }

    /* Zone 1: Bild kompakt (~33% der Höhe), skaliert mit dem Viewport */
    .lightbox-image-side {
        flex: 0 0 auto !important;
        padding: clamp(8px, 1.6dvh, 14px) !important;
    }
    .lightbox-image-side img {
        width: 100%;
        height: auto !important;
        max-height: 33dvh;
        object-fit: contain !important;
    }

    /* Zone 2: Details füllen die Resthöhe und verteilen ihre Kinder
       gleichmäßig (space-evenly) -> keine toten Leerräume.
       !important schlägt Bootstrap .p-4 (ebenfalls !important). */
    .lightbox-details-side {
        flex: 1 1 auto !important;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly !important;
        gap: clamp(8px, 1.8dvh, 22px);
        overflow-y: auto;            /* Fallback: kurze Screens scrollen */
        -webkit-overflow-scrolling: touch;
        padding: clamp(10px, 2.2dvh, 22px) 14px !important;
    }

    /* Eigenmargins der Elemente neutralisieren -> nur gap/space-evenly
       bestimmt die Abstände (sonst Doppelabstände). */
    .lightbox-details-side .product-title,
    .lightbox-details-side .product-info-text,
    .lightbox-details-side .price-tag,
    .lightbox-details-side .shipping-hint,
    .lightbox-details-side .color-selection,
    .lightbox-details-side .option-selection,
    .lightbox-details-side .input-group {
        margin: 0 !important;
    }
    .lightbox-details-side > .d-flex {
        margin: 0 !important;        /* Bootstrap mb-4 der Mengen-Zeile */
    }

    /* Dezente, höhenbasierte Skalierung */
    .lightbox-details-side .product-title {
        font-size: clamp(1.3rem, 3.4dvh, 1.95rem) !important;
    }
    .lightbox-details-side .price-tag {
        font-size: clamp(1.5rem, 3.2dvh, 2.1rem) !important;
    }
    .lightbox-details-side .shipping-hint {
        font-size: clamp(0.85rem, 1.9dvh, 1.05rem);
    }
    .lightbox-details-side .product-info-text {
        font-size: clamp(0.9rem, 2dvh, 1.1rem);
    }
    .lightbox-details-side .selection-label {
        font-size: clamp(0.75rem, 1.6dvh, 0.95rem);
    }
    .lightbox-details-side .qty-display {
        font-size: clamp(1.1rem, 2.4dvh, 1.4rem) !important;
    }
    .lightbox-details-side .btn-custom {
        font-size: clamp(1rem, 2.2dvh, 1.2rem);
        padding: clamp(10px, 1.8dvh, 16px);
    }

    /* Hinweis-Banner als Overlay, reduziert die 100dvh-Höhe nicht */
    #color-banner {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 10060; /* über .lightbox-close (10001) → Schließen-Icon liegt dahinter */
        border-radius: 0 !important;
    }

    .lightbox-nav-prev { left: 12px; }
    .lightbox-nav-next { right: 12px; }
}

@media (max-width: 400px) {
    .lightbox-image-side {
        padding: 8px !important;
    }
    .lightbox-image-side img {
        max-height: 30dvh;
    }
    .lightbox-details-side {
        padding: 12px 12px !important;
    }
}

/* Die große Karte */
.large-card {
    border-radius: 30px;
    transition: all 0.4s ease;
}

.large-card .card-img-top {
    aspect-ratio: 3 / 2; /* Ein schönes, weites Querformat */
    object-fit: cover;
    border-radius: 25px;
}

/* ==========================================================================
   „neu“-Kennzeichnung (Washi-Tape)
   --------------------------------------------------------------------------
   Diagonales, einfarbiges Altrosa-Band über der oberen rechten Ecke.

   Das Band wird bewusst NICHT beschnitten oder ausgerichtet – es ragt absichtlich
   über die Kartenkante hinaus und wird vom bereits vorhandenen
   overflow:hidden + border-radius:25px der Karte bündig abgeschnitten. Genau
   daher stammt die Klebeband-Optik. Deshalb muss das Band ein direktes Kind der
   Karte sein: der .card-img-container hätte seinen eigenen, engeren Radius.
   ========================================================================== */

/* Verankerung. .large-card (large-card.css) setzt selbst kein position, ohne das
   würde das Band an der nächsten positionierten Vorfahren-Box kleben. */
.product-card.large-card { position: relative; }

.plt-neu {
    position: absolute;
    z-index: 6;
    pointer-events: none;              /* der Klick gehört der Karte, nicht dem Band */
    font-family: 'Indie Flower', cursive;
    color: #fff;
    line-height: 1;
}

.plt-neu-washi {
    top: 30px;
    right: -46px;
    width: 200px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c9738f;
    transform: rotate(40deg);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.plt-neu-washi span {
    font-size: 1.3rem;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

/* Detailansicht: gleiche Ecke, gleicher Winkel, aber größerer Rahmen.
   #lightboxToCart bringt overflow:hidden + border-radius:25px bereits mit
   (per CSSOM gesetzt, s. js/card-logic.js), position:relative kommt dort dazu. */
#lightboxToCart > .plt-neu-washi {
    top: 7px;
    right: -52px;
    width: 158px;
    height: 34px;
}

#lightboxToCart > .plt-neu-washi span {
    font-size: 1.15rem;
}

/* --- "Bestseller"-Label (Metallic-Gold, dunkle Schrift, Glanzstreifen + Funkeln) --
   Gegenstueck zum neu-Band, oben LINKS; "neu" und "Bestseller" schliessen sich aus.
   Gleiche Verankerung wie .plt-neu: direktes Kind der Karte / der Lightbox / des
   Detailbildes (alle drei haben position:relative + overflow:hidden). Markup:
   plt_best_label_html() in php/lib/produkt-karte.php, Lightbox: js/card-logic.js.
   Alles in em: Desktop doppelt so gross wie Handy, nur font-size wird getauscht.
   Aeusserer Wrapper ohne overflow, damit die Sternchen ueber den Rand ragen duerfen;
   das innere Label schneidet den Glanzstreifen. */
.plt-best {
    position: absolute;
    z-index: 6;
    top: 68px;
    left: 34px;
    font-size: 2rem;
    transform: rotate(-4deg);
    pointer-events: none;              /* der Klick gehoert der Karte, nicht dem Label */
}

.plt-best-label {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.45em 0.8em;
    border: 0.12em solid #ffeeb0;
    border-radius: 0.4em;
    overflow: hidden;
    background: linear-gradient(135deg, #ffe9a0 0%, #e8b730 30%, #a8750c 55%, #f6d56a 78%, #b8860b 100%);
    box-shadow: 0 0 0 0.1em #b8860b, 0 0.15em 0.5em rgba(0, 0, 0, 0.3);
    font-family: 'Inter', 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #4a2e00;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.plt-best-krone {
    width: 1.05em;
    height: 1.05em;
    fill: #4a2e00;
    flex: none;
    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

/* Glanzstreifen, der alle ~3 s ueber das Gold gleitet */
.plt-best-label::after {
    content: "";
    position: absolute;
    top: -20%;
    left: -60%;
    width: 40%;
    height: 140%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0));
    transform: skewX(-20deg);
    animation: plt-best-glanz 3.2s ease-in-out infinite;
}

/* Vierzackige Sternchen an Ecken und Kanten, nacheinander */
.plt-best-stern {
    position: absolute;
    width: 0.72em;
    height: 0.72em;
    opacity: 0;
    fill: #fff;
    filter: drop-shadow(0 0 3px #ffd54a) drop-shadow(0 0 1px #b8860b);
    animation: plt-best-funkeln 3.2s ease-in-out infinite;
}
.plt-best-stern.s1 { top: -0.4em;  right: 0.9em; }
.plt-best-stern.s2 { bottom: -0.35em; left: 1.6em; width: 0.58em; height: 0.58em; animation-delay: 1s; }
.plt-best-stern.s3 { top: 0.3em; left: -0.4em; width: 0.52em; height: 0.52em; animation-delay: 2s; }
.plt-best-stern.s4 { bottom: -0.2em; right: -0.35em; width: 0.62em; height: 0.62em; animation-delay: 0.5s; }

@keyframes plt-best-glanz {
    0%, 50% { left: -60%; }
    100%    { left: 130%; }
}
@keyframes plt-best-funkeln {
    0%, 100% { opacity: 0; transform: scale(0) rotate(0); }
    12%      { opacity: 1; transform: scale(1.15) rotate(45deg); }
    28%      { opacity: 0; transform: scale(0.2) rotate(90deg); }
}

@media (prefers-reduced-motion: reduce) {
    .plt-best-label::after, .plt-best-stern { animation: none; }
}

/* Auf Karten (Katalog, "Passt dazu") ist die Flaeche kleiner als in Lightbox und Detailbild:
   dort das Label deutlich kleiner. Lightbox und Detailbild behalten die grosse Fassung. */
.product-card > .plt-best { top: 36px; left: 22px; font-size: 1.05rem; }

/* Handy: Groesse wie bisher, aber weiter ins Bild gerueckt */
@media (max-width: 767.98px) {
    .plt-best { top: 52px; left: 24px; font-size: 0.9rem; }
    .plt-best-label { padding: 0.5em 0.85em; }
    .product-card > .plt-best { top: 30px; left: 18px; font-size: 0.8rem; }
}

/* Der Produkttitel ist zentriert und nutzt die volle Spaltenbreite - ohne
   Freihaltezone schneidet ihm das Band das Wortende ab. Zwei Massnahmen,
   die zusammen unabhaengig von der Titellaenge tragen:
   - padding-top schiebt den Spalteninhalt nach unten (wegen justify-content:
     center wirkt davon nur die Haelfte, daher der grosszuegige Wert),
   - padding-right verengt die Zeilenbreite. Das ist die eigentliche Garantie:
     die rechte Zeilengrenze liegt damit fest links der Bandkante, egal wie
     lang der Produktname ist.
   Der Innenabstand trifft die ganze Spalte, also ruecken Titel, Preis, Farben
   und Knopf gleichmaessig - die Spalte wirkt schmaler, nicht verschoben.
   !important schlaegt Bootstraps .p-4 (setzt padding ebenfalls !important).
   Nur auf dem Desktop noetig: darunter steht die Detailspalte UNTER dem Bild,
   das Band beruehrt sie gar nicht. */
@media (min-width: 768px) {
    #lightboxToCart.plt-hat-neu .lightbox-details-side {
        padding-top: 3rem !important;
        padding-right: 2.75rem !important;
    }
}

@media (max-width: 767.98px) {
    .plt-neu-washi {
        width: 170px;
        height: 34px;
        top: 22px;
        right: -42px;
    }
    .plt-neu-washi span { font-size: 1.1rem; }

    /* Die Lightbox läuft hier randlos über den ganzen Bildschirm
       (border-radius:0), das Band sitzt in der Bildschirmecke. */
    #lightboxToCart > .plt-neu-washi {
        top: 20px;
        right: -44px;
        width: 180px;
        height: 36px;
    }
    #lightboxToCart > .plt-neu-washi span { font-size: 1.15rem; }
}

/* --- Echte Links in den Produktkarten (SEO-Runde 2026-10-20) ---
   Bild und Titel jeder Karte sind in einen Link auf die Produkt-Einzelseite
   gefasst (php/lib/produkt-karte.php), damit Google die Produktseiten ueber
   interne Links findet. Der Link soll optisch NICHTS veraendern:
   display:contents erzeugt keinen eigenen Kasten (Bild und Titel liegen
   layouttechnisch wie zuvor direkt in ihrem Eltern-Element), Farbe und
   Unterstreichung des Titels bleiben wie bisher. Klickverhalten: js/actions.js. */
.plt-karten-link,
.plt-karten-link:hover,
.plt-karten-link:focus {
    display: contents;
    color: inherit;
    text-decoration: none;
}
