/* ========================================
   ORDER BUMP FRONTEND STYLES v1.0.3 - SCROLL SIMPLES
   ======================================== */

/* Container principal - SIMPLIFICADO */
.order-bump-container,
.wc-order-bump-container {
    background: #fff;
    border: 2px solid #e74c3c;
    border-radius: 12px;
    margin: 0;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.3s ease;
    display: block !important;
    visibility: visible !important;
}

.order-bump-container.loading,
.wc-order-bump-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mensagem da oferta */
.order-bump-message {
    background: linear-gradient(135deg, #fff3e0, #ffeaa7);
    border: 1px solid #f39c12;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    display: block !important;
}

/* Container de produtos */
.order-bump-products-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* ========================================
   PRODUTO ÚNICO - CARD PRINCIPAL
   ======================================== */

.single-product-card {
    display: flex !important;
    align-items: center;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 150px;
    width: 100%;
}

.single-product-card:hover,
.single-product-card.hover-effect {
    border-color: #e74c3c;
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.2);
    transform: translateY(-2px);
}

/* ========================================
   MÚLTIPLOS PRODUTOS - SCROLL HORIZONTAL SIMPLES
   ======================================== */

.multiple-products-scroll {
    display: block !important;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #ddd;
    overflow: hidden;
    position: relative;
}

.products-scroll-container {
    display: flex !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* iOS smooth scrolling */
    scrollbar-width: thin;
    scrollbar-color: #e74c3c #f1f1f1;
    gap: 0;
    /* Sem gap entre os cards */
}

/* Custom scrollbar para webkit browsers */
.products-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.products-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.products-scroll-container::-webkit-scrollbar-thumb {
    background: #e74c3c;
    border-radius: 4px;
}

.products-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #c0392b;
}

/* Cada produto ocupa largura total do container */
.product-scroll-item {
    flex: 0 0 100% !important;
    /* Cada card ocupa 100% da largura */
    width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    border-right: 1px solid #eee;
    background: #fff;
    transition: background-color 0.3s ease;
}

.product-scroll-item:last-child {
    border-right: none;
}

.product-scroll-item:hover {
    background: #f8f9fa;
}

/* Indicador de scroll (sutil) */
.scroll-indicator {
    position: absolute;
    bottom: 10px;
    right: 15px;
    background: rgba(231, 76, 60, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.multiple-products-scroll:hover .scroll-indicator {
    opacity: 1;
}

/* ========================================
   IMAGENS DOS PRODUTOS
   ======================================== */

/* Imagem principal do produto */
.product-main-image {
    position: relative;
    width: 120px;
    height: 120px;
    margin-right: 20px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.product-main-image img:hover {
    transform: scale(1.05);
}

/* Imagem no scroll */
.product-scroll-image {
    position: relative;
    width: 100px;
    height: 100px;
    margin-right: 20px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #eee;
}

.product-scroll-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #f8f9fa;
}

/* Badge de desconto */
.discount-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 50px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse-badge 2s infinite;
    z-index: 10;
}

.scroll-badge {
    position: absolute;
    top: 45%;
    right: 5px;
    background: #797979;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 50px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse-badge 2s infinite;
    z-index: 10;
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   INFORMAÇÕES DOS PRODUTOS
   ======================================== */

/* Informações do card principal */
.product-card-info {
    flex: 1;
    display: block !important;
}

.product-card-info h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2d3436;
    line-height: 1.3;
}

/* Informações no scroll */
.product-scroll-info {
    flex: 1;
    display: block !important;
}

.product-scroll-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3436;
    line-height: 1.3;
}

/* Container de preços */
.price-container {
    margin-bottom: 5px;
    display: block !important;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 10px;
}

.bump-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
}

.product-scroll-item .bump-price {
    font-size: 16px;
}

/* ========================================
   SELETOR DE VARIAÇÕES - SIMPLIFICADO
   ======================================== */

.variation-selector-inline {
    display: block !important;
    margin-top: 5px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.variation-selector-inline label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.order-bump-variation-select-inline {
    width: 100% !important;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 5px;
    background: #fff;
    transition: all 0.3s ease;
    display: block !important;
}

.order-bump-variation-select-inline:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.order-bump-variation-select-inline:disabled {
    background: #f8f9fa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ========================================
   BOTÕES - SIMPLIFICADOS
   ======================================== */

.add-order-bump-btn,
.add-order-bump-variation-inline {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
    min-width: 160px !important;
    text-align: center !important;
    display: inline-block !important;
    text-decoration: none !important;
    margin-top: 5px !important;
    position: relative !important;
    overflow: hidden !important;
}

.add-order-bump-btn:hover,
.add-order-bump-variation-inline:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(231, 76, 60, 0.4) !important;
}

.add-order-bump-btn:disabled,
.add-order-bump-variation-inline:disabled,
.add-order-bump-btn.disabled,
.add-order-bump-variation-inline.disabled {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.add-order-bump-btn.loading,
.add-order-bump-variation-inline.loading {
    background: #95a5a6 !important;
    cursor: not-allowed !important;
    animation: loading-pulse 1.5s infinite !important;
    color: transparent !important;
}

.add-order-bump-btn.loading::after,
.add-order-bump-variation-inline.loading::after {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid transparent !important;
    border-top: 2px solid #fff !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes loading-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   NOTIFICAÇÕES
   ======================================== */

.order-bump-success-notification,
.order-bump-error-notification {
    position: fixed !important;
    top: 20px !important;
    right: -400px !important;
    background: #27ae60 !important;
    color: #fff !important;
    padding: 15px 20px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    z-index: 9999 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    max-width: 350px !important;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    display: block !important;
}

.order-bump-error-notification {
    background: #e74c3c !important;
}

.order-bump-success-notification.show,
.order-bump-error-notification.show {
    right: 20px !important;
    animation: notification-bounce 0.6s ease !important;
}

@keyframes notification-bounce {
    0% {
        transform: translateX(100%);
    }

    60% {
        transform: translateX(-10px);
    }

    100% {
        transform: translateX(0);
    }
}

/* ========================================
   LABELS E BADGES
   ======================================== */

.order-bump-label {
    background: #e74c3c !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: bold !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    margin-left: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    display: inline-block !important;
    vertical-align: middle !important;
    border: 1px solid #e74c3c !important;
}

.order-bump-cart-item,
.cart_item.order-bump-cart-item {
    border: 2px dashed #e74c3c !important;
    background: rgba(231, 76, 60, 0.05) !important;
    border-radius: 8px !important;
    position: relative !important;
}

.order-bump-cart-item::before,
.cart_item.order-bump-cart-item::before {
    content: "🎯" !important;
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    font-size: 20px !important;
    opacity: 0.3 !important;
}

/* ========================================
   RESPONSIVIDADE - SIMPLIFICADA
   ======================================== */

@media (max-width: 768px) {

    .order-bump-container,
    .wc-order-bump-container {
        margin: 0;
        padding: 20px 15px;
    }

    .single-product-card,
    .product-scroll-item {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }

    .product-main-image,
    .product-scroll-image {
        margin-right: 0;
        margin-bottom: 5px;
        width: 120px;
        height: 120px;
    }

    .product-card-info,
    .product-scroll-info {
        width: 100%;
    }

    .add-order-bump-btn,
    .add-order-bump-variation-inline {
        width: 100% !important;
        max-width: none !important;
        margin-top: 5px !important;
    }

    .scroll-indicator {
        display: none;
        /* Ocultar em mobile */
    }

    .order-bump-success-notification,
    .order-bump-error-notification {
        right: -100% !important;
        left: 10px !important;
        right: 10px !important;
        max-width: none !important;
    }

    .order-bump-success-notification.show,
    .order-bump-error-notification.show {
        right: 10px !important;
    }
}

@media (max-width: 480px) {

    .order-bump-container,
    .wc-order-bump-container {
        margin: 0;
        padding: 15px 10px;
    }

    .product-card-info h4,
    .product-scroll-info h4 {
        font-size: 14px;
    }

    .add-order-bump-btn,
    .add-order-bump-variation-inline {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }

    .product-scroll-item {
        padding: 10px;
    }
}

/* ========================================
   MELHORIAS DE ACESSIBILIDADE
   ======================================== */

.order-bump-variation-select-inline:focus,
.add-order-bump-btn:focus,
.add-order-bump-variation-inline:focus {
    outline: 2px solid #e74c3c !important;
    outline-offset: 2px !important;
}

/* Estados visuais melhorados */
.single-product-card.success,
.product-scroll-item.success {
    border-color: #27ae60 !important;
    background: rgba(39, 174, 96, 0.05) !important;
}

.single-product-card.error,
.product-scroll-item.error {
    border-color: #e74c3c !important;
    background: rgba(231, 76, 60, 0.05) !important;
    animation: shake 0.5s ease-in-out !important;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Garantir visibilidade forçada */
.wc-order-bump-container[style*="display: none"] {
    display: block !important;
}

.wc-order-bump-container[style*="visibility: hidden"] {
    visibility: visible !important;
}

.wc-order-bump-container[style*="opacity: 0"] {
    opacity: 1 !important;
}