@charset "utf-8";
/* ==========================================================================
   AUTO-GRID STYLES
   ========================================================================== */

.prod-auto-grid {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* --- 1. GRID LAYOUT --- */
.rg-product-grid {
    display: grid;
    gap: 1rem;
    font-family: inherit;
    /* Standard-Ansicht für Mobile: Genau 2 Spalten nebeneinander */
    grid-template-columns: repeat(2, 1fr);
}

/* Tablet (ab ca. 600px): Flexibles Raster für 3 oder mehr Spalten */
@media (min-width: 600px) {
    .rg-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
    }
}

/* Winzige Bildschirme (unter 350px): Nur 1 Spalte */
@media (max-width: 350px) {
    .rg-product-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 2. PRODUKT-KARTE --- */
.rg-product-card {
    border: 1px solid #d1d1d1;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    position: relative; 
}

.rg-product-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.rg-product-image-wrap {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.rg-product-image {
    max-width: 90%;
    height: auto;
}

/* --- 3. TEXT & TYPOGRAFIE --- */
.rg-offer-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
    width: 100%;
}

img.rg-e-label {
    height: 24px;
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
    object-position: left;
}

.rg-badge {
    background: transparent;
    color: rgb(58, 58, 58);
    font-weight: bold;
    padding: 0.2rem 0.5rem;
    border-radius: 6rem;
    border: solid 1px #df0000;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.rg-offer-brand {
    font-size: 0.75em;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    color: rgb(97, 97, 97);
    font-weight: 400;
    line-height: 1.33333;
}

.rg-offer-title {
    margin: 0;
    margin-bottom: auto; /* Schiebt die Preise immer nach ganz unten */
    word-break: break-word;
    color: rgb(0, 0, 0);
    font-size: 0.875rem;
    line-height: 1.42857;
    font-family: NotoSansDisplay, NotoSansDisplay-fallback, Arial, sans-serif;
    font-weight: 700;
    overflow-wrap: anywhere;
    white-space: normal;
    overflow: hidden;
    max-height: 2.5rem;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* --- 4. PREISE & VERSAND --- */
.rg-offer-price-row {
    margin: 0.5rem 0;
    position: relative;
}

/* Alles auf einer Linie (Badge, Streichpreis, Hauptpreis) */
.rg-price-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 2px;
}

.rg-discount-badge {
    background-color: #df0000;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 12px;
    line-height: 1;
    display: inline-block;
}

.rg-price-strike {
    text-decoration: line-through;
    color: #555555;
    font-size: 13px;
}

.rg-price {
    color: #df0000;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
}

.rg-shipping-info {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.2;
    color: #333333;
}

.rg-shipping-text {
    cursor: default;
}

/* --- 5. LAGERBESTAND BALKEN --- */
.rg-stock-wrap {
    margin-top: auto; 
    margin-bottom: 15px;
    width: 100%;
}

.rg-stock-bar {
    background: #cfcfcf;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
    width: 100%;
}

.rg-stock-bar-fill {
    background: #df0000;
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

/* Das Leuchten an der Spitze des Balkens */
.rg-stock-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.7));
    border-radius: inherit; 
    animation: stockPulse 1.2s ease-in-out infinite alternate;
}

.rg-stock-label {
    font-size: 0.75em;
    color: #df0000;
    font-weight: bold;
    text-align: left;
}

@keyframes stockPulse {
    0% { opacity: 0.1; transform: scaleX(0.8); transform-origin: right; }
    100% { opacity: 1; transform: scaleX(1); transform-origin: right; box-shadow: 2px 0 8px rgba(255,255,255,0.5); }
}

/* --- 6. BUTTONS (PRODUKT & PROMO) --- */

/* Gemeinsame Flexbox-Eigenschaften, damit Icon und Text perfekt sitzen */
.rg-product-btn,
.rg-promo-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Abstand zwischen SVG und Text */
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
}

/* Der Button in der Produktkarte (Schwarz) */
.rg-product-btn {
    background-color: #000000;
    color: #ffffff;
    width: 100%;
    margin-top: auto;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    line-height: 1.1rem;
}

.rg-product-card:hover .rg-product-btn {
    background-color: #292929;
}

/* Ganze Karte klickbar machen (Magie) */
.rg-product-btn::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 1;
}

/* Der große Promo-Sammel-Button (Rot, unter dem Grid) */
.rg-promo-action-wrap {
    display: flex;
    justify-content: flex-start; /* Links ausgerichtet */
    width: 100%;
    margin-top: 30px;
    margin-bottom: 20px;
}

.rg-promo-action-btn {
    background-color: #DF0000;
    color: #ffffff;
    font-size: 16px;
    padding: 12px 30px 12px 24px;
}

.rg-promo-action-btn:hover {
    background-color: #bb0000;
}

.rg-promo-action-btn:active {
    transform: scale(0.98);
}

/* --- 7. AUSVERKAUFT STATUS --- */
.rg-product-card.is-soldout .rg-product-image {
    opacity: 0.4;
    filter: grayscale(100%);
}

/* Leuchten stoppen */
.is-soldout .rg-stock-bar-fill::after {
    display: none;
}

/* Grauer Button */
.rg-product-card.is-soldout .rg-product-btn {
    background-color: #999 !important;
    color: #fff;
}

.rg-product-card.is-soldout:hover .rg-product-btn {
    background-color: #888 !important;
}

/* --- 8. LOADER / SPINNER --- */
.rg-loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    width: 100%;
}

.rg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #df0000;
    border-radius: 50%;
    animation: rg-spin 1s linear infinite;
    margin-bottom: 15px;
}

.rg-loading-text {
    color: #666;
    font-size: 1rem;
    font-family: inherit;
    margin: 0;
}

@keyframes rg-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rg-product-card > a > span {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
}

.rg-promo-action-wrap > a > span {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.1rem;
}

.rg-promo-message {
    margin-bottom: 0.5rem;
    padding: 4px 8px;
    background-color: #ffe9b3;
    color: #6b3b00;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 3px;
    text-align: center;
    line-height: 1.2em;
}