/* ============================================================
   Affiliate Product Box – Styles
   Plugin: affiliate-box.php | Mologico
   ============================================================ */

/* --- Einzelne Produktbox --- */
.afb-box {
    position: relative;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.afb-image {
    flex: 0 0 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.afb-image img {
    max-width: 180px;
    max-height: 180px;
    object-fit: contain;
    border-radius: 6px;
}

.afb-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.afb-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 0.25rem !important;
    line-height: 1.3 !important;
    border: none !important;
    padding: 0 !important;
}

/* --- Badge --- */
.afb-badge {
    position: absolute;
    top: -12px;
    left: 1.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: #fff;
}
.afb-badge--orange { background: #e67e22; }
.afb-badge--green  { background: #27ae60; }
.afb-badge--blue   { background: #2575fc; }

/* --- Sterne --- */
.afb-stars {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0.1rem 0;
}
.afb-star         { font-size: 1.1rem; line-height: 1; }
.afb-star.full    { color: #f39c12; }
.afb-star.half    { color: #f39c12; opacity: 0.55; }
.afb-star.empty   { color: #ddd; }
.afb-reviews      { font-size: 0.8rem; color: #888; margin-left: 6px; }

/* --- Features --- */
.afb-features {
    list-style: none !important;
    padding: 0 !important;
    margin: 0.25rem 0 !important;
}
.afb-features li {
    font-size: 0.88rem;
    color: #555;
    padding: 0.15rem 0 0.15rem 1.2rem;
    position: relative;
    line-height: 1.5;
}
.afb-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: 700;
}

/* --- Preis --- */
.afb-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0.25rem 0;
}
.afb-oldprice {
    font-size: 0.95rem;
    color: #aaa;
    text-decoration: line-through;
}
.afb-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: #B12704;
}

/* --- Button --- */
.afb-button {
    display: inline-block;
    background: linear-gradient(135deg, #f39c12, #e67e22) !important;
    color: #fff !important;
    text-decoration: none !important;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    transition: opacity 0.2s;
    align-self: flex-start;
    border: none !important;
    box-shadow: 0 2px 8px rgba(230,126,34,0.3);
}
.afb-button:hover {
    opacity: 0.88;
    color: #fff !important;
}

/* --- Disclaimer --- */
.afb-disclaimer {
    font-size: 0.72rem !important;
    color: #bbb !important;
    margin: 0.25rem 0 0 !important;
}

/* ============================================================
   Vergleichstabelle [affiliate_compare]
   ============================================================ */
.afb-compare {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 2rem 0;
}

.afb-compare-item {
    position: relative;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1.5rem 1rem 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.afb-compare-item img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    margin: 0.5rem 0;
}

.afb-compare-item h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.afb-compare-item .afb-price {
    font-size: 1.3rem;
}

.afb-compare-item .afb-button {
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.6rem 0.75rem;
    align-self: stretch;
    margin-top: auto;
}

.afb-compare-item .afb-stars {
    justify-content: center;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .afb-box {
        flex-direction: column;
    }
    .afb-image {
        flex: none;
        width: 100%;
    }
    .afb-compare {
        grid-template-columns: 1fr;
    }
    .afb-compare-item .afb-button {
        align-self: center;
        width: auto;
        padding: 0.7rem 2rem;
    }
}

@media (max-width: 900px) and (min-width: 769px) {
    .afb-compare {
        grid-template-columns: repeat(2, 1fr);
    }
}
