/* ===============================================
   REVENUE OPTIMIZATION CSS
   Buy Now, Order Bumps, Upsells, etc.
   =============================================== */

/* Product Page - Buy Now CTA */
.product-cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.buy-now-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.5rem;
}

.buy-now-note i {
    color: var(--primary-color);
}

/* ===============================================
   REDESIGNED ORDER SUMMARY
   =============================================== */
.order-summary {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 20px;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid #f3f4f6;
    background: linear-gradient(135deg, #f9fafb, #ffffff);
}

.summary-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.summary-header h2 i {
    color: var(--primary-color);
}

.item-count {
    background: var(--primary-color);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.summary-items {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.summary-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1.25rem;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.summary-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
}

.summary-item:last-child {
    margin-bottom: 0;
}

.item-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--dark);
    font-weight: 600;
    line-height: 1.3;
}

.item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.item-platform,
.item-quantity {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.item-platform i,
.item-quantity i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

.item-delivery {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--gray);
    padding: 0.35rem 0.65rem;
    background: white;
    border-radius: 6px;
    width: fit-content;
}

.item-delivery i {
    color: var(--secondary-color);
}

.item-price-box {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

/* Order Bump - Checkout */
.order-bump {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.05));
    border: 2px solid var(--secondary-color);
    border-radius: 12px;
    padding: 0;
    margin: 2rem 0;
    overflow: hidden;
}

.order-bump-header {
    background: linear-gradient(135deg, var(--secondary-color), #059669);
    color: white;
    padding: 0.75rem 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-align: center;
}

.order-bump-content {
    padding: 1.5rem;
}

.order-bump-checkbox {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    margin: 0;
}

.order-bump-checkbox input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
    cursor: pointer;
    margin-top: 0.25rem;
}

.order-bump-details {
    flex: 1;
}

.order-bump-badge {
    display: inline-block;
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.order-bump-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.order-bump-details p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.order-bump-pricing {
    margin: 0.75rem 0;
}

.order-bump-pricing .original-price {
    text-decoration: line-through;
    color: var(--gray);
    margin-right: 0.75rem;
    font-size: 1rem;
}

.order-bump-pricing .bump-price {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.bump-description {
    font-size: 0.9rem !important;
    color: var(--dark) !important;
    margin-top: 0.75rem !important;
}

.order-bump-row {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Pulse Animation for Primary CTA */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

.pulse-button {
    animation: pulse 2s infinite;
}

.pulse-button:hover {
    animation: none;
}

/* Upsell Page Specific Styles (already in upsell-offer.php but centralizing here) */
.upsell-offer-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.upsell-container {
    max-width: 800px;
    margin: 0 auto;
}

.upsell-header {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
}

.upsell-checkmark {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 1rem;
    display: block;
}

.upsell-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.upsell-subheading {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Real Social Proof (replacing fake rand() numbers) */
.urgency-banner {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--danger-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--dark);
}

.urgency-banner i {
    color: var(--danger-color);
    margin-right: 0.5rem;
}

.urgency-banner strong {
    color: var(--danger-color);
}

/* Redesigned Checkout Form */
.checkout-section-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.3s ease;
}

.checkout-section-card:hover {
    border-color: var(--primary-color);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
}

.section-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--dark);
}

.login-prompt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #eff6ff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.login-prompt i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.login-prompt span {
    color: var(--dark);
    font-size: 0.95rem;
}

.login-prompt a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--primary-color);
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-control::placeholder {
    color: #9ca3af;
}

/* Enhanced Checkout Design */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--radius);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-weight: 600;
}

.progress-step.active {
    color: var(--primary-color);
}

.progress-step .step-number {
    width: 32px;
    height: 32px;
    background: #e5e7eb;
    color: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.progress-step.active .step-number {
    background: var(--primary-color);
    color: white;
}

.progress-divider {
    width: 40px;
    height: 2px;
    background: #e5e7eb;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark);
    font-size: 0.9rem;
}

.trust-badge i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.checkout-layout {
    max-width: 1200px;
    margin: 0 auto;
}

/* Better Mobile Responsiveness for Revenue Features */
@media (max-width: 968px) {
    .checkout-progress {
        flex-direction: column;
        gap: 0.5rem;
    }

    .progress-divider {
        width: 2px;
        height: 20px;
        transform: rotate(90deg);
    }

    .trust-badges {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .product-cta-buttons .btn {
        font-size: 1rem;
        padding: 1rem;
    }

    .order-bump {
        margin: 1.5rem 0;
    }

    .order-bump-content {
        padding: 1rem;
    }

    .order-bump-checkbox {
        flex-direction: row;
        align-items: flex-start;
    }

    .order-bump-pricing .bump-price {
        font-size: 1.25rem;
    }

    .upsell-header h1 {
        font-size: 1.8rem;
    }

    .offer-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .comparison-arrow {
        transform: rotate(90deg);
    }

    .checkout-layout {
        grid-template-columns: 1fr !important;
    }

    .order-summary {
        order: -1;
    }
}

/* Auto-fill Indication (for returning customers) */
.auto-filled {
    border-color: var(--secondary-color);
    background: rgba(16, 185, 129, 0.05);
}

.auto-filled::after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    font-weight: 700;
}

/* Skip Cart Badge */
.skip-cart-badge {
    display: inline-block;
    background: var(--warning-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Checkout Optimization - Streamlined View */
.checkout-progress {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
    border-bottom: 2px solid var(--border-color);
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.progress-step.active {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed {
    color: var(--secondary-color);
}

.progress-step i {
    font-size: 1.2rem;
}

/* Bundle Packages */
.bundle-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, var(--warning-color), #dc2626);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.bundle-savings {
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Payment Method Selector */
.payment-method-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method-option {
    cursor: pointer;
    display: block;
}

.payment-method-option input[type="radio"] {
    display: none;
}

.payment-method-card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
}

.payment-method-option:hover .payment-method-card {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.payment-method-option input[type="radio"]:checked + .payment-method-card {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.payment-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    min-width: 50px;
}

.payment-icon .fa-paypal {
    color: #0070ba;
}

.payment-method-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.payment-method-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--gray);
}

.accepted-cards {
    display: flex;
    gap: 0.5rem;
    font-size: 1.2rem;
    color: var(--gray);
}

.payment-form-container {
    margin-top: 1.5rem;
}

.payment-notice {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.payment-notice i {
    color: var(--primary-color);
}

/* PayPal Button Container */
#paypal-button-container {
    min-height: 45px;
}

@media (max-width: 640px) {
    .payment-method-selector {
        grid-template-columns: 1fr;
    }

    .payment-method-card {
        flex-direction: column;
        text-align: center;
    }

    .payment-icon {
        min-width: auto;
    }
}

/* Payment Options Enhancement */
.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.payment-option-card {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.payment-option-card:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.payment-option-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.payment-option-card i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Trust Signals Enhancement */
.trust-signals-row {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.trust-signal {
    text-align: center;
}

.trust-signal i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.trust-signal strong {
    display: block;
    font-size: 0.9rem;
    color: var(--dark);
}

.trust-signal span {
    font-size: 0.8rem;
    color: var(--gray);
}

@media (max-width: 640px) {
    .trust-signals-row {
        flex-direction: column;
        gap: 1rem;
    }
}
