/**
 * PEP Advanced Promo - Front Styles
 * Wersja kompletna: Koszyk + Strona Promocji + Fixy graficzne + Lista Nagród + Naprawa zdjęć + Archiwum
 */

.pep-promo-card {
    padding: 0 !important; 
    border: 1px solid #e5e5e5;
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.pep-banner-container {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #eee;
    display: block;
    line-height: 0;
    position: relative; /* Ważne dla overlay */
}

.pep-banner-container a,
.pep-banner-container picture,
.pep-banner-container img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.pep-banner-container img {
    height: auto;
    object-fit: cover;
}

.pep-no-image {
    background: #f6f6f6;
    padding: 40px 20px;
    text-align: center;
    font-weight: bold;
    color: #999;
    border-bottom: 1px solid #eee;
}

/* --- STYL DLA ARCHIWUM --- */
.pep-overlay-archived {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.pep-overlay-archived span {
    color: #fff;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid #fff;
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.5);
}

.pep-archived .pep-card-content {
    opacity: 0.6;
}

/* --- TREŚĆ POD BANEREM --- */
.pep-card-content {
    padding: 20px !important; 
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pep-title {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.pep-status-block {
    margin-top: auto;
}

.pep-status-block .progress {
    height: 8px;
    margin-bottom: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.pep-missing {
    color: #d63384;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 0;
}

.pep-success {
    color: #28a745;
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
}

.pep-success i {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.pep-counter {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

.pep-counter i {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 4px;
}

.pep-login-info {
    margin-top: 10px;
    color: #666;
    font-size: 13px;
}

/* --- LISTA DOSTĘPNOŚCI (INDYWIDUALNA) --- */
.pep-stock-list-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.pep-stock-header {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
}

.pep-stock-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pep-stock-list li {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
    border-bottom: 1px dashed #f0f0f0;
}

.pep-stock-list li:last-child {
    border-bottom: none;
}

.pep-stock-list .reward-name {
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.pep-stock-list .reward-qty {
    font-weight: bold;
    color: #28a745;
    white-space: nowrap;
}

.pep-stock-list .reward-qty.low-stock {
    color: #dc3545;
}

/* --- KOSZYK --- */
.pep-promo-card.card {
    border: 1px solid #e5e5e5 !important; 
    background: #fff !important;
    margin-bottom: 15px !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.pep-campaign-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 15px;
    position: relative;
}

.pep-campaign-item.conditions-met {
    border-color: #2fb5d2;
    background-color: #f9fcff;
}

.pep-campaign-item.conditions-not-met {
    background-color: #fdfdfd;
}

.pep-campaign-title {
    color: #333 !important;
    font-weight: bold;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.pep-campaign-title i {
    color: #2fb5d2; 
    margin-right: 5px; 
    font-size: 16px; 
}

.pep-campaign-title.locked { color: #666; }
.pep-campaign-title.unlocked { color: #2fb5d2; }

.pep-progress-container {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    width: 100%;
    margin: 8px 0;
    overflow: hidden;
}

.pep-progress-bar {
    background: #ffc107;
    height: 100%;
}

.pep-missing-text {
    font-size: 12px;
    color: #d63384;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0;
}

.pep-rewards-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -4px;
    margin-top: 10px;
}

.pep-campaign-item.conditions-not-met .pep-rewards-grid {
    opacity: 0.5;
    pointer-events: none;
    filter: grayscale(100%);
}

.pep-reward-col {
    padding: 0 4px;
    margin-bottom: 8px;
    width: 50%;
    box-sizing: border-box;
}

.pep-reward-box {
    border: 1px solid #eee !important; 
    background: #fff !important;
    border-radius: 4px;
    padding: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}

.pep-reward-box.in-cart {
    border-color: #28a745 !important; 
    background-color: #f0fff4 !important;
}

.pep-reward-img-container {
    height: 90px !important;       
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    background: #fff;
    margin-bottom: 10px;
}

.pep-reward-img-container img {
    width: auto !important;        
    height: auto !important;       
    max-width: 100% !important;    
    max-height: 100% !important;   
    object-fit: contain !important; 
    margin: 0 auto !important;
}

.pep-reward-name {
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 5px;
    height: 2.4em;
    overflow: hidden;
    color: #333;
}

.pep-btn-action {
    width: 100%;
    font-size: 10px;
    padding: 4px 0;
    text-transform: uppercase;
    border-radius: 0 !important; 
    font-weight: 600 !important;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: block;
}

.pep-btn-claim {
    background-color: #fff !important;
    border: 1px solid #2fb5d2 !important;
    color: #2fb5d2 !important;
}

.pep-btn-claim:hover {
    background-color: #2fb5d2 !important;
    color: #fff !important;
}

.pep-btn-selected {
    background-color: #28a745 !important;
    border: 1px solid #28a745 !important;
    color: #fff !important;
    cursor: default;
}

/* Blok "Wybrane Nagrody" (na dole prawej kolumny) */
.cart-summary-pep-rewards {
    background: #f8f9fa !important; 
    border: 1px solid #e5e5e5 !important; 
    box-shadow: none !important;
}

.cart-summary-pep-rewards .card-block {
    padding: 15px !important;
}

.pep-checkout-reward-item img {
    width: auto !important;        
    height: auto !important;       
    max-width: 40px !important;    
    max-height: 40px !important;   
    object-fit: contain !important;
    background: #fff;
}

.pep-checkout-reward-item > div:first-child {
    width: 42px !important;
    height: 42px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #ddd;
    background: #fff;
    padding: 2px;
}