/* ==========================================================================
   Integrador Universal de Promociones en Tarjetas de Retrato (CPM + CPBC)
   ========================================================================== */

/* Banner superior promocional */
.cpm-promo-active-banner {
    max-width: 1100px;
    margin: 20px auto 35px auto;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(22, 101, 52, 0.08);
    font-family: inherit;
    box-sizing: border-box;
}

.cpm-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

.cpm-banner-title {
    color: #166534;
    font-size: 15px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.cpm-banner-icon {
    font-size: 20px;
}

.cpm-code-tag {
    background: #0b1e36;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 5px;
    font-family: monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

.cpm-discount-desc {
    font-weight: 600;
    color: #15803d;
}

.cpm-btn-toggle-filter {
    background: #ffffff;
    border: 1.5px solid #166534;
    color: #166534;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cpm-btn-toggle-filter:hover {
    background: #166534;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.2);
}

/* --- TARJETAS NO ELEGIBLES: En gris atenuado y bloqueadas --- */
.cpbc-card-item.cpbc-promo-ineligible,
.cpbc-card-item.cpm-card-ineligible {
    opacity: 0.38 !important;
    filter: grayscale(95%) !important;
    background-color: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    user-select: none !important;
    transition: all 0.3s ease;
}

.cpbc-card-item.cpbc-promo-ineligible:hover,
.cpbc-card-item.cpm-card-ineligible:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #cbd5e1 !important;
}

.cpbc-card-item.cpbc-promo-ineligible .cpbc-selector-label,
.cpbc-card-item.cpm-card-ineligible .cpbc-selector-label {
    cursor: not-allowed !important;
    background: #e2e8f0 !important;
    color: #94a3b8 !important;
    border-color: #cbd5e1 !important;
    pointer-events: none !important;
}

.cpbc-card-item.cpbc-promo-ineligible input[type="radio"],
.cpbc-card-item.cpm-card-ineligible input[type="radio"] {
    cursor: not-allowed !important;
    opacity: 0.35 !important;
    pointer-events: none !important;
}

.cpbc-card-item.cpbc-promo-ineligible .cpbc-btn,
.cpbc-card-item.cpm-card-ineligible .cpbc-btn,
.cpbc-btn.cpbc-btn-disabled,
.cpbc-btn.cpm-btn-disabled {
    background: #94a3b8 !important;
    border-color: #94a3b8 !important;
    color: #ffffff !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.75 !important;
}

/* Insignias promocionales */
.cpbc-promo-status-slot {
    margin-bottom: 12px;
}

.cpbc-badge-promo-ineligible {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.cpbc-badge-promo-applied {
    display: inline-block;
    background: linear-gradient(135deg, #e6af2e, #d97706);
    color: #0b1e36;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(230, 175, 46, 0.3);
}

/* Tarjeta elegible con oferta aplicada */
.cpbc-card-item.cpbc-has-promo,
.cpbc-card-item.cpm-card-eligible {
    border-color: #e6af2e !important;
    box-shadow: 0 8px 25px rgba(230, 175, 46, 0.15) !important;
}

.cpbc-card-item.cpbc-has-promo .cpbc-price-current,
.cpbc-card-item.cpm-card-eligible .cpbc-price-current {
    color: #d97706 !important;
}

.cpbc-card-item.cpbc-has-promo .cpbc-btn,
.cpbc-card-item.cpm-card-eligible .cpbc-btn {
    background: linear-gradient(135deg, #e6af2e, #d97706) !important;
    color: #0b1e36 !important;
    border-color: #e6af2e !important;
}

.cpbc-card-item.cpbc-has-promo .cpbc-btn:hover,
.cpbc-card-item.cpm-card-eligible .cpbc-btn:hover {
    background: linear-gradient(135deg, #f3ca65, #e6af2e) !important;
    border-color: #f3ca65 !important;
}

/* Priorizar tarjetas con promoción en primeras posiciones del Grid */
.cpbc-card-item.cpm-card-eligible,
.cpbc-card-item.cpbc-promo-eligible {
    order: -1 !important;
}

.cpbc-card-item.cpm-card-ineligible,
.cpbc-card-item.cpbc-promo-ineligible {
    order: 1 !important;
}


/* Ocultamiento instantáneo de tarjetas no elegibles */
.cpm-card-ineligible.cpbc-ineligible-hidden,
.cpbc-promo-ineligible.cpbc-ineligible-hidden {
    display: none !important;
}
