/* E-Commerce Simulator Styles */

.ecommerce-container {
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: center;
}

/* Mobile Phone Frame - Unified with device theme */
.mobile-phone-frame {
    width: var(--device-phone-width, 320px);
    max-width: 100%;
    background: linear-gradient(180deg, var(--phone-body) 0%, var(--phone-body-light) 50%, var(--phone-body) 100%);
    border-radius: 36px;
    padding: 10px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.35),
        inset 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 0 2px var(--phone-body-light);
    position: relative;
}

/* Brand accent strip on phone */
.mobile-phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: var(--accent-gradient-horizontal);
    border-radius: 0 0 3px 3px;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 24px;
    background: var(--phone-body);
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

.phone-speaker {
    width: 50px;
    height: 5px;
    background: var(--phone-body-light);
    border-radius: 3px;
}

.phone-camera {
    width: 10px;
    height: 10px;
    background: var(--phone-body-light);
    border-radius: 50%;
    position: relative;
}

.phone-camera::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 4px;
    height: 4px;
    background: var(--zillion-blue-dark);
    border-radius: 50%;
}

.phone-screen {
    width: 100%;
    height: var(--device-phone-height, 580px);
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-secondary) 100%);
    border-radius: 26px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: height 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 56, 106, 0.05);
}

.phone-home-bar {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--phone-body-light);
    border-radius: 2px;
}

/* Mobile App Header - PayZillion branded */
.mobile-app-header {
    background: var(--accent-gradient);
    padding: 28px var(--space-sm) 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.app-logo {
    font-size: var(--text-base);
    font-weight: 700;
}

.app-logo .pay {
    color: var(--pay-orange);
}

.app-logo .zillion {
    color: white;
}

.app-logo .shop-text {
    font-weight: 400;
    font-size: 11px;
    opacity: 0.8;
    margin-left: 4px;
}

.header-cart {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-cart:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* E-Commerce Screens - Allow vertical scroll if needed */
.ecommerce-section {
    flex: 1;
    padding: var(--space-xs);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Products Grid - Compact 2x2 layout */
.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    align-items: stretch;
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-image {
    height: var(--product-img-height, 40px);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--product-emoji-size, 18px);
}

.product-info {
    padding: 3px var(--space-xs);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    text-align: center;
}

.product-info h3 {
    font-size: var(--product-title-font, 10px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.product-price {
    font-size: var(--product-price-font, 11px);
    font-weight: 700;
    color: var(--zillion-blue);
    margin: 0;
    white-space: nowrap;
}

.add-to-cart-btn {
    width: 100%;
    padding: var(--product-btn-padding, 4px);
    background: linear-gradient(135deg, var(--pay-orange) 0%, var(--pay-orange-dark) 100%);
    color: white;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 600;
    font-size: var(--product-btn-font, 10px);
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, var(--pay-orange-light) 0%, var(--pay-orange) 100%);
}

.add-to-cart-btn.added {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
}

/* Cart Section - Compact, always visible */
.cart-section {
    background: white;
    border-radius: var(--radius-sm);
    padding: 4px 6px;
    margin-top: 6px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.cart-section h3 {
    font-size: 10px;
    margin-bottom: 2px;
    color: var(--zillion-blue);
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 9px;
    min-height: 0;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 500;
}

.cart-item-price {
    font-size: 8px;
    color: var(--text-muted);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.cart-item-total {
    font-weight: 600;
    color: var(--zillion-blue);
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: var(--text-lg);
    padding: 2px;
    transition: transform var(--transition-fast);
}

.cart-item-remove:hover {
    transform: scale(1.2);
}

.cart-empty {
    text-align: center;
    padding: 4px;
    color: var(--text-muted);
    font-size: 9px;
}

.cart-footer {
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid var(--border-light);
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    font-weight: 600;
    font-size: 10px;
}

.checkout-btn {
    width: 100%;
    padding: 4px;
    background: linear-gradient(135deg, var(--zillion-blue) 0%, var(--zillion-blue-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.checkout-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--zillion-blue-light) 0%, var(--zillion-blue) 100%);
}

.checkout-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

/* Access key underline for ecommerce buttons */
.checkout-btn u,
.pay-btn u,
.verify-btn u,
.cancel-btn u,
.resend-otp-btn u,
.shop-again-btn u,
.add-to-cart-btn u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Checkout View */
.ecom-checkout {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.checkout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-steps {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.checkout-step.active {
    color: var(--zillion-blue);
    font-weight: 600;
}

.checkout-step.completed {
    color: var(--success);
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
    font-weight: 600;
}

.checkout-step.active .step-number {
    background: var(--zillion-blue);
    color: white;
}

.checkout-step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-arrow {
    color: var(--border-color);
}

/* Payment Form */
.payment-form {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.payment-hint {
    font-size: 11px;
    color: #6b7280;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid var(--zillion-blue);
}

.payment-form h3 {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-brands {
    display: flex;
    gap: var(--space-sm);
    margin-left: auto;
}

.card-brand {
    padding: 4px 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
}

.card-brand.generic {
    color: #00386A;
}

.form-group {
    margin-bottom: var(--space-md);
}

/* Card Selector Dropdown */
.card-selector {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.card-selector:focus {
    outline: none;
    border-color: var(--zillion-blue);
    box-shadow: 0 0 0 3px rgba(0, 56, 106, 0.1);
}

.card-selector:hover {
    border-color: var(--zillion-blue-light);
}

.card-selector option {
    padding: var(--space-sm);
}

.form-label {
    display: block;
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: border-color var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--zillion-blue);
    box-shadow: 0 0 0 3px rgba(0, 56, 106, 0.1);
}

.form-input.error {
    border-color: var(--error);
}

.form-row {
    display: flex;
    gap: var(--space-md);
}

.form-row .form-group {
    flex: 1;
}

.order-summary {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.order-summary h4 {
    margin-bottom: var(--space-sm);
    font-size: var(--text-sm);
}

.order-item {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    padding: var(--space-xs) 0;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-color);
    margin-top: var(--space-sm);
}

.pay-btn {
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.pay-btn:hover {
    background: linear-gradient(135deg, #34D399 0%, var(--success) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Payment Options Grid */
.payment-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 6px;
}

.payment-option-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    transition: background var(--transition-fast);
}

.payment-option-toggle:hover {
    background: rgba(255, 170, 77, 0.08);
}

.payment-option-toggle input[type="checkbox"] {
    width: 13px;
    height: 13px;
    accent-color: var(--accent-color);
    margin: 0;
}

.payment-option-toggle span {
    font-weight: 500;
}

.payment-sub-select {
    width: 100%;
    padding: 4px 8px;
    font-size: 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface-color);
    color: var(--text-primary);
    margin-bottom: 6px;
}

/* Wallet Payment Buttons */
.wallet-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.wallet-btn.apple-pay-btn {
    background: #000;
    color: #fff;
    border-color: #333;
}

.wallet-btn.apple-pay-btn:hover {
    background: #333;
}

.wallet-btn.google-pay-btn {
    background: #fff;
    color: #333;
    border-color: #dadce0;
}

.wallet-btn.google-pay-btn:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

/* Card Brand Icons in Checkout */
.brand-generic {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 2px;
    letter-spacing: 0.5px;
    color: #00386A;
}

.secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* 3DS2 Modal */
.threeds-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    backdrop-filter: blur(4px);
}

.threeds-modal.active {
    opacity: 1;
    visibility: visible;
}

.threeds-content {
    background: white;
    width: 280px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.threeds-modal.active .threeds-content {
    transform: scale(1);
}

/* 3DS Header - Compact */
.threeds-header {
    background: linear-gradient(135deg, #1a1f36 0%, #2d3555 100%);
    color: white;
    padding: 12px 14px;
}

.threeds-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.issuer-logo {
    display: flex;
    align-items: center;
    gap: 6px;
}

.issuer-logo .bank-icon {
    font-size: 16px;
}

.issuer-logo .bank-name {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.9;
}

/* Network Secure Logo - Compact */
.network-secure-logo {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.network-secure-logo.generic {
    background: linear-gradient(135deg, #1a1f71 0%, #003087 100%);
}

.network-secure-logo.generic .secure-badge {
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.network-secure-logo.generic .secure-text {
    color: #90caf9;
    font-size: 8px;
    text-transform: uppercase;
}

/* 3DS Body - Compact */
.threeds-body {
    padding: 14px;
}

/* Transaction Summary - Single Line */
.threeds-txn-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fc;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
}

.txn-merchant {
    font-size: 11px;
    color: #6b7280;
    flex: 1;
}

.txn-amount {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
    margin: 0 10px;
}

.txn-card {
    font-size: 11px;
    color: #374151;
    font-family: 'Consolas', monospace;
}

/* OTP Section - Compact */
.otp-section {
    text-align: center;
    margin-bottom: 14px;
}

.otp-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.otp-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 12px;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
}

.otp-digit {
    width: 36px;
    height: 44px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    color: #1f2937;
    background: #f9fafb;
    transition: all 0.2s ease;
    font-family: 'Consolas', monospace;
}

.otp-digit:focus {
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

.otp-digit:not(:placeholder-shown) {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Auto-filled OTP animation */
.otp-digit.auto-filled {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Error Message */
.threeds-body .error-message {
    color: #dc2626;
    font-size: 11px;
    min-height: 16px;
    margin: 6px 0;
    font-weight: 500;
}

/* OTP Meta - Attempts & Timer */
.otp-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #9ca3af;
}

.otp-attempts.warning {
    color: #dc2626;
    font-weight: 600;
}

.otp-timer {
    color: #059669;
    font-weight: 600;
}

.otp-timer.expiring {
    color: #dc2626;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Resend OTP Button */
.resend-otp-btn {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    background: transparent;
    color: #9ca3af;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.resend-otp-btn:disabled {
    opacity: 0.5;
}

.resend-otp-btn.active {
    background: linear-gradient(135deg, #00386A 0%, #0056a6 100%);
    color: white;
    border: none;
    cursor: pointer;
    opacity: 1;
    animation: fadeIn 0.3s ease;
}

.resend-otp-btn.active:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 56, 106, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 3DS Actions - Compact */
.threeds-actions {
    display: flex;
    gap: 8px;
}

.threeds-actions .cancel-btn {
    flex: 1;
    padding: 10px;
    background: white;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.threeds-actions .cancel-btn:hover {
    background: #f3f4f6;
}

.threeds-actions .verify-btn {
    flex: 2;
    padding: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.threeds-actions .verify-btn:hover {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* 3DS Footer - Compact */
.threeds-footer {
    background: #f3f4f6;
    padding: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-top: 1px solid #e5e7eb;
}

.footer-lock {
    font-size: 10px;
}

.footer-text {
    font-size: 9px;
    color: #6b7280;
}

/* Floating SMS Toast - Appears at top like real phone notification */
.sms-toast {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1001;
    max-width: 280px;
}

.sms-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.sms-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.sms-toast-content {
    flex: 1;
}

.sms-toast-title {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 2px;
}

.sms-toast-body {
    font-size: 12px;
    color: #1f2937;
}

.sms-toast-body strong {
    color: #1e40af;
    font-size: 14px;
    letter-spacing: 2px;
    font-family: 'Consolas', monospace;
}

/* 3DS Authentication Failure Info Box */
.threeds-failure-info {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-left: 3px solid var(--error);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin-top: var(--space-md);
    font-size: 11px;
}

.threeds-failure-info.compact {
    padding: var(--space-xs);
    margin-top: var(--space-sm);
    font-size: 10px;
}

.order-summary-grid.compact {
    gap: var(--space-xs);
    padding: var(--space-xs);
}

.threeds-failure-info .info-icon {
    flex-shrink: 0;
    font-size: 14px;
}

.threeds-failure-info.compact .info-icon {
    font-size: 12px;
}

.threeds-failure-info .info-text {
    color: var(--text-secondary);
    line-height: 1.4;
    font-weight: 500;
}

.error-grid {
    border-left: 3px solid var(--error) !important;
}

/* Legacy 3DS Info Box - keep for compatibility */
.threeds-info-box {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    background: var(--zillion-blue-subtle);
    border: 1px solid var(--zillion-blue);
    border-radius: var(--radius-sm);
    padding: var(--space-xs) var(--space-sm);
    margin: var(--space-md) 0;
    font-size: 10px;
}

.threeds-info-box .info-icon {
    flex-shrink: 0;
}

.threeds-info-box .info-text {
    color: var(--zillion-blue-dark);
    line-height: 1.3;
}

/* Error message in 3DS */
.threeds-body .error-message {
    color: var(--error);
    font-size: 11px;
    text-align: center;
    min-height: 16px;
    margin-top: var(--space-xs);
}

.threeds-info {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.threeds-card-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.threeds-amount {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--zillion-blue);
}

.threeds-otp-form {
    margin-bottom: var(--space-lg);
}

.otp-label {
    display: block;
    text-align: center;
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: var(--space-xs);
}

.otp-digit {
    width: 36px;
    height: 44px;
    text-align: center;
    font-size: var(--text-lg);
    font-weight: 700;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-family: 'Consolas', monospace;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--zillion-blue);
    box-shadow: 0 0 0 3px rgba(0, 56, 106, 0.1);
}

.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: var(--text-xl);
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.otp-input:focus {
    outline: none;
    border-color: var(--zillion-blue);
}

.threeds-timer {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.threeds-submit {
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--zillion-blue) 0%, var(--zillion-blue-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 56, 106, 0.3);
}

.threeds-submit:hover {
    background: linear-gradient(135deg, var(--zillion-blue-light) 0%, var(--zillion-blue) 100%);
    box-shadow: 0 4px 12px rgba(0, 56, 106, 0.4);
}

.threeds-resend {
    text-align: center;
    margin-top: var(--space-md);
}

.threeds-resend a {
    color: var(--zillion-blue);
    font-size: var(--text-sm);
    cursor: pointer;
}

/* Processing Overlay */
.ecom-processing {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    z-index: 10;
}

.ecom-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--zillion-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.ecom-processing-text {
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

/* Success/Error Result */
.ecom-result {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.result-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-icon svg {
    width: 20px;
    height: 20px;
}

.result-icon.success {
    background: var(--success-light);
    color: var(--success);
}

.result-icon.error {
    background: var(--error-light);
    color: var(--error);
}

.result-title {
    font-size: var(--text-sm);
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.result-title.success {
    color: var(--success);
}

.result-title.error {
    color: var(--error);
}

.result-message {
    color: var(--text-secondary);
    font-size: 11px;
    margin: 0;
    line-height: 1.2;
}

.result-details {
    color: var(--text-secondary);
    font-size: 11px;
    margin: 0;
    line-height: 1.3;
    width: 100%;
    max-width: 220px;
}

/* Order items row - purchased products */
.order-items-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--border-light);
}

.order-item {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

/* Order summary grid - 2 column layout */
.order-summary-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    text-align: left;
    width: 100%;
    background: var(--bg-secondary);
    padding: 6px 10px;
    border-radius: var(--radius-md);
}

.order-summary-grid .label {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
}

.order-summary-grid .value {
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.order-summary-grid .value.mono {
    font-family: 'Consolas', 'Monaco', monospace;
    letter-spacing: 0.5px;
}

.order-summary-grid.error-grid {
    background: var(--error-light);
}

.result-info {
    background: var(--bg-secondary);
    padding: 6px 8px;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 200px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    padding: 1px 0;
    line-height: 1.4;
}

.result-row .label {
    color: var(--text-muted);
}

.result-row .value {
    font-weight: 600;
}

.shop-again-btn {
    padding: 6px var(--space-md);
    background: linear-gradient(135deg, var(--zillion-blue) 0%, var(--zillion-blue-light) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    margin-top: 4px;
    width: 100%;
    max-width: 160px;
    box-shadow: 0 2px 6px rgba(0, 56, 106, 0.25);
}

.shop-again-btn:hover {
    background: linear-gradient(135deg, var(--zillion-blue-light) 0%, var(--zillion-blue) 100%);
    box-shadow: 0 4px 10px rgba(0, 56, 106, 0.35);
}

/* 3DS Flow Options */
.ecommerce-3ds-options {
    display: flex;
    justify-content: center;
}

.ecommerce-3ds-options select {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: white;
    cursor: pointer;
}

.ecommerce-3ds-options select:focus {
    outline: none;
    border-color: var(--zillion-blue);
}

/* eCommerce Section Hidden State */
.ecommerce-section.hidden {
    display: none !important;
}

/* Shop Header */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.shop-header h2 {
    color: var(--zillion-blue);
    font-size: var(--text-xl);
}

.cart-summary {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 500;
}

/* Products Grid - Desktop fallback (mobile frame uses earlier definition) */
/* Cart & checkout compact styles defined earlier in the mobile frame section */

/* Checkout Grid - Compact vertical layout, no scrolling */
.checkout-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.order-summary-panel, .payment-form-panel {
    background: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.order-summary-panel h3, .payment-form-panel h3 {
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 11px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: var(--text-sm);
    padding-top: 4px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
}

/* Payment Form - Very compact for mobile */
.payment-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.form-group label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--zillion-blue);
    box-shadow: 0 0 0 2px rgba(0, 56, 106, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-style: italic;
}

/* Payment hint for checkout form */
.payment-form-panel .payment-hint {
    font-size: 9px;
    padding: 4px 6px;
    margin-bottom: 6px;
    line-height: 1.3;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.form-row .form-group {
    min-width: 0;
}

.pay-btn {
    padding: 8px var(--space-md);
    background: var(--pay-orange);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    margin-top: 4px;
}

.pay-btn:hover {
    background: var(--pay-orange-dark);
}

/* Checkout section h2 */
#ecommerce-checkout h2 {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
    color: var(--zillion-blue);
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    z-index: 10;
}

.processing-overlay.active {
    display: flex;
}

.processing-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-light);
    border-top-color: var(--zillion-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 3DS Modal */
.threeds-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.threeds-modal.active {
    display: flex;
}

.threeds-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.threeds-header {
    background: linear-gradient(135deg, var(--zillion-blue) 0%, var(--zillion-blue-dark) 100%);
    color: white;
    padding: var(--space-lg);
    text-align: center;
}

.bank-logo {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-sm);
}

.threeds-body {
    padding: var(--space-xl);
    text-align: center;
}

.threeds-body p {
    margin-bottom: var(--space-lg);
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.otp-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: var(--text-2xl);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
}

.otp-digit:focus {
    outline: none;
    border-color: var(--zillion-blue);
}

.error-message {
    color: var(--error);
    font-size: var(--text-sm);
    min-height: 20px;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.error-message.visible {
    opacity: 1;
}

.threeds-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.cancel-btn, .verify-btn {
    padding: var(--space-sm) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

.cancel-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.verify-btn {
    background: var(--success);
    color: white;
}

/* Result Content */
.result-content {
    text-align: center;
    padding: var(--space-xl);
}

.result-content h2 {
    margin-bottom: var(--space-lg);
}

.result-content h2.success {
    color: var(--success);
}

.result-content h2.error {
    color: var(--error);
}

.result-details {
    background: var(--bg-secondary);
    padding: 6px 8px;
    border-radius: var(--radius-md);
    margin: 4px auto;
    max-width: 220px;
}

.result-detail {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: var(--text-sm);
}

.continue-btn {
    padding: var(--space-md) var(--space-xl);
    background: var(--zillion-blue);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
}

/* Checkout Inline Error */
.checkout-inline-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border: 1px solid #e53e3e;
    border-left: 3px solid #e53e3e;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 11px;
    color: #c53030;
    animation: checkoutErrorSlide 0.3s ease;
}

.checkout-inline-error .checkout-error-icon {
    font-size: 16px;
    flex-shrink: 0;
    line-height: 1;
}

.checkout-inline-error .checkout-error-content {
    flex: 1;
    line-height: 1.4;
}

.checkout-inline-error .checkout-error-content strong {
    display: block;
    font-size: 12px;
    margin-bottom: 2px;
    color: #9b2c2c;
}

.checkout-inline-error .checkout-error-content p {
    margin: 0;
    font-size: 10.5px;
    color: #c53030;
}

.checkout-inline-error .checkout-error-close {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    line-height: 1;
    opacity: 0.7;
}

.checkout-inline-error .checkout-error-close:hover {
    opacity: 1;
}

@keyframes checkoutErrorSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input error highlight */
.input-error {
    border-color: #e53e3e !important;
    box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2) !important;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    z-index: 9999;
    opacity: 0;
    transition: all var(--transition-normal);
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
