/* MS Campanhas - Frontend Styles */

/* ─── Product Badge ─────────────────────────────────────────────── */

.msc-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    max-width: 140px;
    text-align: center;
    background-color: #764ea0 !important;
}

.msc-badge-single {
    font-size: 13px;
    padding: 6px 14px;
    top: 12px;
    left: 12px;
}

/* ─── Hidden native radio ──────────────────────────────────────── */

.msc-promo-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* ─── Qty Boxes (cards lado a lado) ──────────────────────────────── */

.msc-qty-boxes {
    display: flex;
    gap: 10px;
    flex-basis: 100% !important;
    order: -1;
    margin-bottom: 14px;
}

.msc-qty-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}

.msc-qty-box:hover {
    border-color: #ccc;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.msc-qty-box .msc-promo-radio:checked ~ .msc-qty-box__qty,
.msc-qty-box--selected .msc-qty-box__qty {
    color: #764ea0;
}

.msc-qty-box .msc-promo-radio:checked ~ .msc-qty-box__price {
    color: #333;
}

.msc-qty-box:has(.msc-promo-radio:checked),
.msc-qty-box--selected {
    border-color: #764ea0;
    box-shadow: 0 0 0 1px #764ea0;
}

.msc-qty-box__qty {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
    transition: color .2s;
}

.msc-qty-box__price {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.msc-qty-box__price .woocommerce-Price-currencySymbol {
    font-size: 14px;
    font-weight: 600;
}

.msc-qty-box__label {
    font-size: 12px;
    color: #888;
    margin-top: 1px;
}

.msc-qty-box__badge {
    position: absolute;
    top: -9px;
    left: 10px;
    background: #764ea0;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ─── Multi cards (tiered / progressive — wrap) ──────────────────── */

.msc-qty-boxes--multi {
    flex-wrap: wrap;
}

/* ─── Combo Card ─────────────────────────────────────────────────── */

.msc-qty-box--combo {
    cursor: default;
}

.msc-qty-box__combo-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.msc-qty-box__combo-price del {
    font-size: 14px;
    color: #999;
}

.msc-qty-box__combo-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
    width: 100%;
}

.msc-qty-box__combo-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.msc-qty-box__combo-item img.msc-combo-thumb {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid #eee;
}

.msc-qty-box__combo-name {
    font-size: 12px;
    color: #555;
    line-height: 1.3;
}

/* ─── Gift Card (Compre X Ganhe Y) ────────────────────────────────── */

.msc-qty-box--gift .msc-qty-box__badge {
    background: #a6ce39;
}

.msc-qty-box__gift-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.msc-qty-box__gift-info img.msc-gift-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid #eee;
}

.msc-qty-box__gift-detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.msc-qty-box__gift-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.msc-qty-box__gift-prices {
    display: flex;
    align-items: center;
    gap: 6px;
}

.msc-qty-box__gift-prices del {
    font-size: 12px;
    color: #999;
}

.msc-qty-box__gift-free {
    font-size: 14px;
    font-weight: 700;
    color: #a6ce39;
}

/* ─── Quantity Flash Animation ──────────────────────────────────── */

@keyframes mscQtyFlash {
    0%   { background: #fff; }
    30%  { background: #764ea0; color: #fff; }
    100% { background: #fff; color: #333; }
}

.msc-qty-flash {
    animation: mscQtyFlash .6s ease;
}

/* ─── Cart Item Campaign Label ──────────────────────────────────── */

.msc-cart-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: #764ea0;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ─── Cart Subtotal Campaign Label ──────────────────────────────── */

.msc-subtotal-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #764ea0;
    padding: 1px 6px;
    border-radius: 3px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* ─── Cart/Checkout Totals Campaign Row ─────────────────────────── */

.msc-campaign-discount th {
    color: #764ea0 !important;
    font-weight: 600 !important;
}

.msc-campaign-discount td {
    color: #764ea0 !important;
    font-weight: 700 !important;
}

.msc-totals-icon {
    margin-right: 4px;
}

/* ─── Mini Cart Labels ──────────────────────────────────────────── */

.msc-mini-label {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #764ea0;
    padding: 1px 5px;
    border-radius: 3px;
    margin-top: 2px;
    text-transform: uppercase;
}

.msc-mini-label--gift {
    background: #a6ce39;
}

/* ─── "A partir de" price annotation ────────────────────────────── */

.msc-from-price {
    color: #764ea0;
    font-weight: 600;
    font-size: 12px;
}
