/* Alerta de Economia - Versão Compacta */
.craftando-savings-alert {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    border-radius: 12px;
    padding: 12px 16px;
    margin: 10px 0;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.25);
    position: relative;
    overflow: hidden;
    animation: slideInUp 0.4s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    box-sizing: border-box;
}

.craftando-savings-alert::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    animation: shimmer 4s ease-in-out infinite;
}

.savings-main {
    text-align: center;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
}

.savings-text {
    color: white;
    font-size: 16px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    white-space: nowrap;
    display: inline-block;
}

.savings-icon {
    font-size: 18px;
    animation: pulse 2s infinite;
    display: inline;
    margin-right: 6px;
}

.savings-text strong {
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
    display: inline;
}

/* Força todos elementos do preço WooCommerce a ficarem inline - versão geral */
.savings-text strong .woocommerce-Price-amount,
.savings-text strong .woocommerce-Price-amount bdi,
.savings-text strong .woocommerce-Price-currencySymbol {
    display: inline !important;
    white-space: nowrap !important;
}

/* Preços Compactos */
.savings-prices {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.price-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.price-option.pix {
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.price-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.price-value {
    color: white;
    font-size: 16px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.price-divider {
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    font-weight: 300;
}

/* Call-to-Action Compacto */
.savings-cta {
    text-align: center;
    position: relative;
    z-index: 2;
}

.coupon-info {
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
}

.coupon-info strong {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

/* Botões de Compra */
.single_add_to_cart_button {
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

.single_add_to_cart_button.has-coupon {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
    border: none !important;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.4) !important;
}

.single_add_to_cart_button.has-coupon:hover {
    background: linear-gradient(135deg, #E55A2B 0%, #E0821A 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5) !important;
}

/* Animações */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Versão compacta para lista de produtos */
.woocommerce ul.products .craftando-savings-alert {
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.woocommerce ul.products .savings-text {
    font-size: 14px;
}

.woocommerce ul.products .savings-text strong {
    font-size: 15px;
    white-space: nowrap;
    display: inline;
}

/* Força todos elementos do preço WooCommerce a ficarem inline */
.woocommerce ul.products .savings-text strong .woocommerce-Price-amount,
.woocommerce ul.products .savings-text strong .woocommerce-Price-amount bdi,
.woocommerce ul.products .savings-text strong .woocommerce-Price-currencySymbol {
    display: inline !important;
    white-space: nowrap !important;
}

.woocommerce ul.products .savings-main {
    white-space: nowrap !important;
    overflow: visible;
}

.woocommerce ul.products .price-value {
    font-size: 14px;
}

.woocommerce ul.products .coupon-info {
    font-size: 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .craftando-savings-alert {
        padding: 10px 12px;
        margin: 8px 0;
    }
    
    .savings-text {
        font-size: 14px;
    }
    
    .savings-text strong {
        font-size: 16px;
    }
    
    .savings-prices {
        gap: 12px;
    }
    
    .price-value {
        font-size: 14px;
    }
    
    .coupon-info {
        font-size: 11px;
    }
    
    .woocommerce ul.products .craftando-savings-alert {
        padding: 6px 10px;
        margin: 4px 0;
        width: 100%;
        box-sizing: border-box;
        display: block;
    }
    
    .woocommerce ul.products .savings-text {
        font-size: 12px;
    }
    
    .woocommerce ul.products .savings-text strong {
        font-size: 13px;
    }
}

/* Alertas do Carrinho - Estrutura MFN - Inline com preço */
.mfn-cart-holder .craftando-cart-item-savings {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 2px 6px;
    margin: 0;
    border-radius: 4px;
    font-size: 10px;
    color: white;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px;
    vertical-align: middle;
    white-space: nowrap !important;
    flex-shrink: 0;
}

.mfn-cart-holder .cart-savings-icon {
    font-size: 10px;
}

.mfn-cart-holder .cart-savings-text {
    font-weight: 500;
    line-height: 1.1;
    font-size: 10px;
}

.mfn-cart-holder .cart-savings-text strong {
    font-weight: 700;
    font-size: 10px;
}

/* Força todos elementos do preço no alerta a ficarem inline */
.mfn-cart-holder .craftando-cart-item-savings .woocommerce-Price-amount,
.mfn-cart-holder .craftando-cart-item-savings .woocommerce-Price-amount bdi,
.mfn-cart-holder .craftando-cart-item-savings .woocommerce-Price-currencySymbol {
    display: inline !important;
    white-space: nowrap !important;
}

/* Economia Total do Carrinho - Estrutura MFN */
.mfn-cart-holder .craftando-cart-total-savings {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    padding: 12px;
    margin: 0 0 10px 0;
    border-radius: 8px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    animation: slideInUp 0.4s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.cart-total-savings-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.cart-total-icon {
    font-size: 16px;
    animation: pulse 2s infinite;
}

.cart-total-text {
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cart-total-text strong {
    font-size: 16px;
    font-weight: 800;
}


/* Responsividade para carrinho MFN */
@media (max-width: 768px) {
    .mfn-cart-holder .craftando-cart-item-savings {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .mfn-cart-holder .craftando-cart-total-savings {
        padding: 10px;
    }
    
    .mfn-cart-holder .cart-total-text {
        font-size: 13px;
    }
    
    .mfn-cart-holder .cart-total-text strong {
        font-size: 14px;
    }
}

/* Ajustes específicos para integração com tema MFN */
.mfn-ch-product .mfn-chp-info {
    position: relative;
}

.mfn-cart-holder .mfn-ch-footer-totals {
    position: relative;
}

/* Força preço e alerta na mesma linha horizontal */
.mfn-ch-product .mfn-chp-price {
    min-width: 140px;
    white-space: nowrap !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end;
    gap: 6px;
}

/* Garante que todos elementos fiquem inline */
.mfn-ch-product .mfn-chp-price > * {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

/* Oculta linha de preço normal no carrinho quando há economia */
.mfn-ch-product:has(.craftando-cart-item-savings) .mfn-chp-info p.price {
    display: none !important;
}

/* ======================================
   ESTILOS PARA CHECKOUT
====================================== */

/* Resumo de economia no checkout */
.craftando-checkout-savings td {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 16px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* Preços dos itens no checkout - simplificado para mostrar apenas preço com desconto */

/* Responsividade para checkout */
@media (max-width: 768px) {
    .craftando-checkout-savings td {
        font-size: 14px !important;
        padding: 12px !important;
    }
}

/* ======================================
   ESTILOS ESPECÍFICOS PARA FUNNELKIT
====================================== */

/* Banner de economia do FunnelKit */
.craftando-funnelkit-savings-banner {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    margin: 0 0 20px 0;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
    animation: slideInUp 0.5s ease-out;
}

.funnelkit-savings-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    text-align: center;
}

.craftando-funnelkit-savings-banner .savings-icon {
    font-size: 20px;
    animation: pulse 2s infinite;
}

.craftando-funnelkit-savings-banner .savings-text {
    font-size: 16px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.craftando-funnelkit-savings-banner .savings-text strong {
    font-weight: 800;
    font-size: 18px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Responsividade para FunnelKit */
@media (max-width: 768px) {
    .craftando-funnelkit-savings-banner {
        margin: 0 0 15px 0;
        padding: 12px 15px;
    }
    
    .craftando-funnelkit-savings-banner .savings-icon {
        font-size: 18px;
    }
    
    .craftando-funnelkit-savings-banner .savings-text {
        font-size: 14px;
    }
    
    .craftando-funnelkit-savings-banner .savings-text strong {
        font-size: 16px;
    }
}

/* ======================================
   BANNER DE ECONOMIA APÓS TABELA FUNNELKIT
====================================== */

.craftando-checkout-savings-banner {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%) !important;
    color: white !important;
    font-weight: bold !important;
    border-radius: 8px !important;
    text-align: center !important;
    margin: 15px 0 !important;
    padding: 15px !important;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
    animation: slideInUp 0.5s ease-out;
    border: none !important;
}

.craftando-checkout-savings-banner span {
    color: white !important;
    font-size: 16px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: bold !important;
}

/* Responsividade para banner após tabela - tablets e mobile */
@media (max-width: 1024px) {
    .craftando-checkout-savings-banner {
        margin: 15px 0 !important;
        padding: 15px !important;
        border-radius: 8px !important;
        font-size: 15px !important;
    }
    
    .craftando-checkout-savings-banner span {
        font-size: 15px !important;
        line-height: 1.4;
    }
    
    /* Estilos específicos quando banner está no mobile/tablet após wfacp_collapsible_order_summary_wrap */
    .wfacp_collapsible_order_summary_wrap + .craftando-checkout-savings-banner {
        margin: 20px 15px !important;
        box-shadow: 0 2px 10px rgba(255, 107, 53, 0.2);
    }
}

/* Ajustes específicos para mobile pequeno */
@media (max-width: 768px) {
    .craftando-checkout-savings-banner {
        font-size: 14px !important;
    }
    
    .craftando-checkout-savings-banner span {
        font-size: 14px !important;
    }
}

/* ======================================
   ESTILOS PARA ESTRUTURA CRAFTANDO CHECKOUT
====================================== */

/* Container dos alertas promocionais */
.craftando-alerts-container {
    margin: 15px 0;
    animation: slideInUp 0.5s ease-out;
}

/* Alertas promocionais específicos para checkout Craftando */
.craftando-promo-alert {
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.craftando-promo-alert:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Alerta de economia com cupom */
.craftando-coupon-savings {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
}

/* Alerta de desconto PIX */
.craftando-pix-discount {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

/* Indicador de economia nos itens */
.savings-indicator {
    background: #27ae60;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 4px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estilos para itens com desconto */
.craftando-order-item.has-discount {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.05), rgba(39, 174, 96, 0.05));
    border-left: 4px solid #27ae60;
    border-radius: 4px;
    margin: 8px 0;
    padding: 8px;
    transition: all 0.3s ease;
}

.craftando-order-item.has-discount:hover {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.08), rgba(39, 174, 96, 0.08));
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade para checkout Craftando */
@media (max-width: 768px) {
    .craftando-promo-alert {
        padding: 10px 12px;
        font-size: 13px;
        margin: 8px 0;
    }
    
    .craftando-alerts-container {
        margin: 12px 0;
    }
    
    .savings-indicator {
        font-size: 9px;
        padding: 2px 5px;
    }
}

@media (max-width: 480px) {
    .craftando-promo-alert {
        padding: 8px 10px;
        font-size: 12px;
        margin: 6px 0;
    }
    
    .craftando-promo-alert span {
        font-size: 14px;
    }
    
    .craftando-alerts-container {
        margin: 10px 0;
    }
}

