/* ===================================================
   Shop-Produkt Einbetten – Frontend-Styles
   =================================================== */

a.spe-box,
div.spe-box {
    display: flex;
    align-items: stretch;
    background: #e2e2e2;
    border: none;
    border-radius: 8px;
    margin: 16px 0;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    max-height: 155px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: box-shadow 0.15s ease;
    box-sizing: border-box;
}

a.spe-box:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.13);
    text-decoration: none;
}

/* Schutz: kein Markieren, kein Ziehen */
a.spe-box,
div.spe-box {
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.spe-box-bild img,
.spe-karussell-bild {
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* Bild-Container — relativ, Bild darin absolut */
.spe-box-bild {
    flex-shrink: 0;
    width: 240px;
    position: relative;
    overflow: hidden;
}

/* Alle img-Tags im Bild-Container absolut füllen */
.spe-box-bild img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Karussell */
.spe-karussell-bild {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.spe-karussell-bild.spe-karussell-aktiv {
    opacity: 1;
}

/* Erstes Karussell-Bild gibt dem Container seine Höhe */
.spe-karussell-bild:first-child {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Inhalt — Text links, Button rechts, beide vertikal mittig */
.spe-box-inhalt {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 8px 18px;
    background: #e2e2e2;
    gap: 16px;
}

.spe-box-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Name — immer schwarz */
.spe-box-name {
    font-size: 1.25em;
    font-weight: 700;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.spe-box-name2 {
    font-size: 0.9em;
    font-weight: 400;
    color: #444444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Preiszeile */
.spe-box-preiszeile {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
}

.spe-box-label    { font-size: 1.1em; color: #000000; }
.spe-box-preis    { font-size: 1.1em; font-weight: 600; color: #000000; }
.spe-box-aktpreis { font-size: 1.1em; font-weight: 700; color: #000000; }
.spe-box-altpreis { font-size: 1.1em; color: #000000; text-decoration: line-through; }
.spe-box-rabatt   { font-size: 1.0em; font-weight: 700; color: #cc0000; }
.spe-box-versand  { font-size: 0.85em; color: #000000; }

/* Jetzt kaufen + Bezahl-Logos */
.spe-box-kaufen-wrap {
    flex-shrink: 0;
    margin-right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
}

.spe-payment-logos {
    display: flex;
    align-items: center;
    gap: 5px;
}

.spe-payment-logos img {
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

.spe-logo-paypal {
    mix-blend-mode: multiply;
}

.spe-versand-text {
    font-size: 0.72em;
    color: #000;
    margin-top: -4px;
}

.spe-box-kaufen {
    display: inline-block;
    padding: 7px 18px;
    background: #0066cc;
    color: #ffffff;
    border-radius: 5px;
    font-size: 0.92em;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

/* Responsive — Mobile */
@media (max-width: 540px) {
    /* Box: Spalte — Bild oben, Inhalt unten */
    a.spe-box,
    div.spe-box {
        flex-direction: column;
        max-height: none;
    }

    /* Bild: volle Breite, feste Höhe */
    .spe-box-bild {
        width: 100%;
        height: 180px;
        flex-shrink: 0;
    }

    /* Karussell-Bilder bleiben absolut im Container */
    .spe-karussell-bild:first-child {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    /* Inhalt: wie Desktop — Text links, Button rechts */
    .spe-box-inhalt {
        flex-direction: row;
        align-items: center;
        padding: 10px 12px;
        gap: 12px;
    }

    .spe-box-kaufen-wrap {
        margin-right: 0;
        flex-shrink: 0;
    }
}
