/* ==========================================================================
   Pay JF — Styles (MIX DARK & LIGHT THEME)
   ========================================================================== */
:root {
    --bg-primary-dark: #050508;
    --bg-card-dark: #12121a;
    --border-subtle-dark: rgba(255, 255, 255, 0.08);
    --border-active-dark: rgba(255, 255, 255, 0.15);
    --text-primary-dark: #ffffff;
    --text-muted-dark: #94a3b8;
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f6f9fc;
    --border-subtle-light: #e3e8ee;
    --border-active-light: #cbd5e1;
    --text-primary-light: #1a1f36;
    --text-secondary-light: #3c4257;
    --text-muted-light: #697386;
    --accent-orange: #f97316;
    --accent-orange-hover: #ea580c;
    --accent-orange-light-bg: #fff8f1;
    --accent-green: #22c55e;
    --accent-blue: #3b82f6;
    --paypal-blue: #0070ba;
    --paypal-dark-blue: #003087;
    --paypal-yellow: #ffc439;
    --paypal-yellow-hover: #f2b827;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary-dark);
    color: var(--text-primary-dark);
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

.space-font { font-family: 'Space Grotesk', sans-serif; font-weight: 700; }

/* Animations */
@keyframes breathingGlow {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.5); border-color: var(--border-subtle-dark); }
    50% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); border-color: var(--accent-orange); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); border-color: var(--border-subtle-dark); }
}
@keyframes breathingGlowLight {
    0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4); border-color: var(--accent-orange); }
    50% { box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); border-color: var(--accent-orange-hover); }
    100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); border-color: var(--accent-orange); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes checkmark { 0% { transform: scale(0); } 50% { transform: scale(1.2); } 100% { transform: scale(1); } }

.needs-action-dark { animation: breathingGlow 2s infinite ease-in-out !important; }
.needs-action-light { animation: breathingGlowLight 2s infinite ease-in-out !important; }

/* Onboarding Modal */
.onboarding-overlay {
    position: fixed; inset: 0; background: rgba(5,5,8,0.85);
    display: flex; justify-content: center; align-items: center; z-index: 10000;
    backdrop-filter: blur(8px); animation: fadeIn 0.4s ease;
}
.onboarding-box {
    background: var(--bg-primary-light); color: var(--text-primary-light);
    width: 90%; max-width: 480px; border-radius: 20px; padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5); text-align: center;
    transform: translateY(20px); animation: slideInUp 0.5s ease forwards;
}
.onboarding-icon { font-size: 3.5rem; margin-bottom: 10px; line-height: 1; }
.onboarding-box h2 { font-size: 1.8rem; margin-bottom: 8px; color: var(--text-primary-light); }
.onboarding-box p { color: var(--text-muted-light); font-size: 1rem; margin-bottom: 30px; }
.onboarding-steps { text-align: left; margin-bottom: 30px; display: flex; flex-direction: column; gap: 15px; }
.onb-step { display: flex; align-items: flex-start; gap: 15px; background: var(--bg-secondary-light); padding: 15px; border-radius: 12px; border: 1px solid var(--border-subtle-light); }
.onb-step-num { background: var(--accent-orange-light-bg); color: var(--accent-orange); width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: 'Space Grotesk'; flex-shrink: 0; border: 1px solid rgba(249,115,22,0.2); }
.onb-step-text h4 { font-size: 1rem; color: var(--text-primary-light); margin-bottom: 2px; }
.onb-step-text p { margin: 0; font-size: 0.85rem; color: var(--text-muted-light); }
.btn-start-tour { background: var(--accent-orange); color: white; width: 100%; padding: 18px; border-radius: 12px; font-weight: 700; font-size: 1.1rem; border: none; cursor: pointer; transition: 0.3s; }
.btn-start-tour:hover { background: var(--accent-orange-hover); transform: translateY(-2px); }

/* Layout */
.app-container { display: flex; min-height: 100vh; max-width: 1600px; margin: 0 auto; background: var(--bg-primary-dark); }
.left-panel { flex: 1; width: 100%; padding: 60px 40px; border-right: 1px solid var(--border-subtle-dark); transition: all 0.3s ease; }
.step-badge { display: inline-flex; align-items: center; padding: 6px 14px; background: rgba(249, 115, 22, 0.1); color: var(--accent-orange); border: 1px solid rgba(249, 115, 22, 0.3); border-radius: 20px; font-size: 0.75rem; font-weight: 700; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.05em; }
.country-selector { background: var(--bg-card-dark); padding: 24px; border-radius: 16px; border: 1px solid var(--border-subtle-dark); margin-bottom: 40px; position: relative; }
.country-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 15px; }
.country-btn { background: var(--bg-primary-dark); border: 1px solid var(--border-subtle-dark); color: var(--text-muted-dark); padding: 15px; border-radius: 12px; font-family: inherit; font-size: 0.95rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; }
.country-btn:hover { border-color: var(--border-active-dark); color: var(--text-primary-dark); }
.country-btn.active { border-color: var(--accent-orange); color: var(--accent-orange); background: rgba(249, 115, 22, 0.05); font-weight: 600; }
.catalog-section { display: none; animation: fadeIn 0.5s ease; padding-bottom: 20px; }
.catalog-section.visible { display: block; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.mini-card { background: var(--bg-card-dark); border: 1px solid var(--border-subtle-dark); padding: 25px 20px; border-radius: 16px; cursor: pointer; transition: all 0.2s ease; text-align: center; }
.mini-card:hover { transform: translateY(-4px); border-color: var(--border-active-dark); }
.mini-card.active { border: 2px solid var(--accent-orange); box-shadow: 0 4px 20px rgba(249, 115, 22, 0.15); background: rgba(249, 115, 22, 0.02); }
.mini-card i { font-size: 3rem; display: block; margin-bottom: 12px; }

/* Pallets Section */
.pallets-section { display: none; animation: fadeIn 0.5s ease; margin-top: 60px; padding-top: 50px; border-top: 1px dashed var(--border-active-dark); text-align: center; }
.pallets-section.visible { display: block; }
.pallets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; text-align: left; }
.pallet-card { background: var(--bg-card-dark); border: 1px solid var(--border-subtle-dark); padding: 24px; border-radius: 16px; transition: all 0.3s ease; }
.pallet-card:hover { border-color: var(--border-active-dark); transform: translateY(-3px); }
.pallet-card.featured { border-color: var(--accent-orange); background: linear-gradient(135deg, var(--bg-card-dark) 0%, rgba(249, 115, 22, 0.05) 100%); }
.step-num { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; font-family: 'Space Grotesk', sans-serif; }
.pallet-card .step-num { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); border: 1px solid rgba(59, 130, 246, 0.3); }
.pallet-card.featured .step-num { background: var(--accent-orange); color: white; border: none; box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3); }
.pallet-card h4 { font-size: 1.1rem; color: var(--text-primary-dark); margin-bottom: 6px; }
.pallet-card p { font-size: 0.85rem; color: var(--text-muted-dark); margin-bottom: 10px; line-height: 1.5; }
.pallets-ctas { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.pallets-ctas .btn { flex: 0 1 250px; padding: 14px; font-size: 0.95rem; }

/* Right Panel */
.right-panel { width: 480px; flex-shrink: 0; background: var(--bg-primary-light); color: var(--text-primary-light); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 40px; border-left: 1px solid var(--border-subtle-dark); box-shadow: -10px 0 30px rgba(0,0,0,0.3); transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.right-panel-inner { width: 100%; max-width: 500px; margin: 0 auto; display: flex; flex-direction: column; }
.app-container.expanded-mode .left-panel { display: none; }
.app-container.expanded-mode .right-panel { width: 100%; border-left: none; box-shadow: none; }
.app-container.expanded-mode .right-panel-inner { max-width: 1200px; }
.checkout-split { display: grid; grid-template-columns: 1fr; gap: 40px; }
@media(min-width: 1001px) {
    .app-container.expanded-mode .checkout-split { grid-template-columns: 1.2fr 450px; align-items: start; }
}
.btn-back-catalog { display: inline-flex; align-items: center; gap: 8px; background: transparent; color: var(--text-secondary-light); border: 1px solid var(--border-subtle-light); padding: 10px 16px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s; margin-bottom: 24px; align-self: flex-start; }
.btn-back-catalog:hover { background: var(--bg-secondary-light); color: var(--text-primary-light); border-color: var(--border-active-light); }
.empty-state { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--text-muted-light); text-align: center; }
.detail-view { display: none; width: 100%; }
.detail-view.visible { display: block; animation: slideIn 0.4s ease; }
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.photo-gallery img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border-subtle-light); }
.rules-box { background: var(--bg-secondary-light); border: 1px solid var(--border-subtle-light); padding: 20px; border-radius: 12px; margin-bottom: 20px; }
.rules-box h4 { color: var(--accent-orange); margin-bottom: 12px; font-size: 0.95rem; }
.rules-box ul { list-style: none; font-size: 0.9rem; color: var(--text-secondary-light); margin-bottom: 15px; }
.rules-box li { margin-bottom: 8px; display: flex; gap: 8px; }
.rules-box li::before { content: '•'; color: var(--accent-orange); font-weight: bold; }
.shipping-info { background: rgba(34, 197, 94, 0.1); border-left: 3px solid var(--accent-green); padding: 12px; font-size: 0.85rem; color: #166534; font-weight: 500; border-radius: 0 8px 8px 0; }
.qty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 15px 0 20px; }
.qty-btn { background: var(--bg-primary-light); border: 1px solid var(--border-subtle-light); color: var(--text-secondary-light); padding: 14px 10px; border-radius: 10px; cursor: pointer; text-align: center; transition: all 0.2s ease; font-family: inherit; }
.qty-btn strong { display: block; font-size: 1.2rem; font-family: 'Space Grotesk', sans-serif; color: var(--text-primary-light); }
.qty-btn small { font-size: 0.7rem; opacity: 0.7; text-transform: uppercase; font-weight: 600; }
.qty-btn:hover { border-color: var(--text-muted-light); }
.qty-btn.active { background: var(--text-primary-light); border-color: var(--text-primary-light); color: white; }
.qty-btn.active strong { color: white; }
.tyc-mini-summary { background: var(--accent-orange-light-bg); border-radius: 12px; padding: 16px; margin-bottom: 20px; font-size: 0.85rem; border: 1px solid #ffedd5; color: var(--text-secondary-light); }
.tyc-checkbox-container { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 0.9rem; margin-bottom: 24px; color: var(--text-secondary-light); padding: 10px; border-radius: 8px; border: 1px solid transparent; transition: all 0.2s; }
.tyc-checkbox-container:hover { background: var(--bg-secondary-light); }
.tyc-checkbox-container input { width: 18px; height: 18px; accent-color: var(--accent-orange); margin-top: 2px; cursor: pointer; }

/* Payment Column */
.payment-column { background: var(--bg-primary-light); border: 1px solid var(--border-subtle-light); border-radius: 16px; padding: 32px 24px; box-shadow: 0 15px 35px -5px rgba(0,0,0,0.05); position: relative; overflow: hidden; }
.payment-overlay { position: absolute; inset: 0; background: rgba(255,255,255,0.85); backdrop-filter: blur(4px); z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; transition: opacity 0.3s ease, visibility 0.3s; }
.payment-overlay.hidden { opacity: 0; visibility: hidden; }
.payment-overlay-icon { font-size: 2.5rem; margin-bottom: 15px; }
.payment-overlay h4 { font-size: 1.1rem; color: var(--text-primary-light); margin-bottom: 5px; font-family: 'Space Grotesk', sans-serif; }
.payment-overlay p { font-size: 0.9rem; color: var(--accent-orange); font-weight: 600; }
.total-row { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px dashed var(--border-subtle-light); }
.total-price { font-size: 2.2rem; font-weight: 700; color: var(--text-primary-light); line-height: 1; font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.5px; }
.btn { width: 100%; padding: 14px; border-radius: 25px; font-weight: 600; font-size: 1rem; font-family: inherit; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; transition: all 0.2s ease; height: 48px; }
.btn-wsp { background: transparent; color: #16a34a; border: 1px solid #16a34a; border-radius: 8px; }
.btn-wsp:hover { background: rgba(22, 163, 74, 0.05); }
.paypal-divider { display: flex; align-items: center; text-align: center; color: var(--text-muted-light); font-size: 13px; margin: 20px 0; }
.paypal-divider::before, .paypal-divider::after { content: ''; flex: 1; border-bottom: 1px solid var(--border-subtle-light); }
.paypal-divider:not(:empty)::before { margin-right: .5em; }
.paypal-divider:not(:empty)::after { margin-left: .5em; }
.trust-badges { text-align: center; margin-top: 15px; }
.trust-badges img { height: 24px; margin: 0 5px; opacity: 0.9; transition: all 0.3s ease; }
.trust-badges p { font-size: 0.75rem; color: var(--text-muted-light); margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; }

/* PayPal Buttons Container */
#paypal-button-container { min-height: 50px; margin-bottom: 16px; }
#paypal-card-container { min-height: 50px; margin-bottom: 16px; }

/* Processing overlay */
.processing-overlay { position: fixed; inset: 0; background: rgba(5,5,8,0.92); z-index: 20000; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(10px); }
.processing-box { background: var(--bg-primary-light); padding: 50px; border-radius: 20px; text-align: center; max-width: 440px; width: 90%; box-shadow: 0 25px 50px rgba(0,0,0,0.3); }
.processing-spinner { width: 60px; height: 60px; border: 4px solid var(--border-subtle-light); border-top-color: var(--accent-orange); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success Screen */
.success-screen { animation: fadeIn 0.5s ease; }
.success-icon { font-size: 4rem; animation: checkmark 0.5s ease; display: inline-block; }
.success-card { background: var(--bg-secondary-light); border: 1px solid var(--border-subtle-light); border-radius: 16px; padding: 24px; margin: 20px 0; text-align: left; }
.success-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-subtle-light); font-size: 0.9rem; }
.success-row:last-child { border-bottom: none; }
.success-row .label { color: var(--text-muted-light); }
.success-row .value { color: var(--text-primary-light); font-weight: 600; }
.tracking-highlight { background: linear-gradient(135deg, #0a0a14, #12121f); border: 1px solid #1e1e30; border-radius: 12px; padding: 20px; text-align: center; margin: 20px 0; }
.tracking-highlight .tracking-code { color: var(--accent-orange); font-size: 2rem; font-family: 'Space Grotesk', monospace; font-weight: 700; letter-spacing: 3px; }

/* Error message */
.payment-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 12px 16px; border-radius: 8px; font-size: 0.85rem; margin-bottom: 16px; display: none; }

/* Mobile */
@media (max-width: 1000px) {
    .app-container { flex-direction: column; }
    .left-panel { width: 100%; padding: 30px 20px 60px; border-right: none; }
    .right-panel {
        position: fixed; top: 0; bottom: 0; left: 0; right: 0;
        height: 100dvh; z-index: 1000; width: 100%;
        transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        border-left: none; border-top: none;
        padding: 30px 20px; box-shadow: none;
    }
    .right-panel.open { transform: translateY(0); }
    .empty-state { display: none; }
    .pallets-grid { grid-template-columns: 1fr; }
    .pallets-ctas { flex-direction: column; }
}
