:root {
    --bg: #05070c;
    --surface: #0e111a;
    --surface-light: #171c28;
    --accent: #00ffaa; /* نيون أخضر مستقبلي */
    --accent-glow: rgba(0, 255, 170, 0.3);
    --text: #f1f5f9;
    --text-dark: #64748b;
    --border: rgba(255, 255, 255, 0.05);
    --radius: 12px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: system-ui, -apple-system, sans-serif; }
body { background: var(--bg); color: var(--text); overflow-x: hidden; }

/* هيدر احترافي زجاجي */
.navbar { position: fixed; top: 0; left: 0; width: 100%; background: rgba(5, 7, 12, 0.75); backdrop-filter: blur(15px); border-bottom: 1px solid var(--border); z-index: 999; }
.nav-inside { max-width: 1300px; margin: 0 auto; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 26px; font-weight: 900; letter-spacing: 2px; }
.logo span { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }

.search-box { position: relative; width: 350px; }
.search-box input { width: 100%; padding: 10px 40px 10px 15px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; color: #fff; transition: var(--transition); }
.search-box input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 15px var(--accent-glow); }
.search-box i { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: var(--text-dark); }

.cart-btn { position: relative; cursor: pointer; font-size: 22px; background: var(--surface); padding: 10px; border-radius: 50%; border: 1px solid var(--border); transition: var(--transition); }
.cart-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-badge { position: absolute; top: -5px; right: -5px; background: var(--accent); color: #000; font-size: 11px; font-weight: bold; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }

/* قسم الهيرو الفاخر */
.hero { position: relative; padding: 160px 30px 80px; text-align: center; overflow: hidden; }
.hero-text { position: relative; z-index: 5; }
.tag { background: rgba(0, 255, 170, 0.1); color: var(--accent); border: 1px solid var(--accent); padding: 5px 15px; border-radius: 30px; font-size: 12px; font-weight: bold; }
.hero h1 { font-size: 52px; font-weight: 900; margin: 20px 0; letter-spacing: -1px; }
.hero p { color: var(--text-dark); font-size: 18px; max-width: 600px; margin: 0 auto; }
.glow-1 { position: absolute; top: -10%; left: 15%; width: 350px; height: 350px; background: rgba(0, 255, 170, 0.15); filter: blur(120px); border-radius: 50%; }
.glow-2 { position: absolute; bottom: -10%; right: 15%; width: 350px; height: 350px; background: rgba(0, 150, 255, 0.15); filter: blur(120px); border-radius: 50%; }

/* فلاتر ومنتجات */
.store-container { max-width: 1300px; margin: 0 auto; padding: 0 30px 100px; }
.filter-bar { display: flex; gap: 15px; margin-bottom: 40px; justify-content: center; }
.filter-btn { background: var(--surface); border: 1px solid var(--border); color: var(--text-dark); padding: 10px 25px; border-radius: 25px; cursor: pointer; transition: var(--transition); font-weight: 600; }
.filter-btn.active, .filter-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; transition: var(--transition); position: relative; }
.product-card:hover { transform: translateY(-8px); border-color: rgba(255,255,255,0.15); box-shadow: 0 20px 30px rgba(0,0,0,0.5); }
.img-box { background: rgba(255,255,255,0.01); height: 220px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; overflow: hidden; border: 1px solid var(--border); }
.img-box img { max-width: 80%; max-height: 80%; object-fit: contain; transition: var(--transition); }
.product-card:hover .img-box img { transform: scale(1.08); }
.p-info { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; }
.p-title { font-size: 16px; font-weight: bold; }
.p-price { color: var(--accent); font-weight: 800; font-size: 18px; }
.add-to-cart-overlay { position: absolute; bottom: 75px; left: 20px; right: 20px; opacity: 0; transform: translateY(10px); transition: var(--transition); }
.product-card:hover .add-to-cart-overlay { opacity: 1; transform: translateY(0); }
.btn-add { width: 100%; background: #fff; color: #000; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: var(--transition); }
.btn-add:hover { background: var(--accent); box-shadow: 0 0 15px var(--accent-glow); }

/* سلة التسوق الجانبية */
.cart-panel { position: fixed; top: 0; left: -460px; width: 450px; height: 100%; background: var(--surface); border-right: 1px solid var(--border); z-index: 1500; display: flex; flex-direction: column; transition: var(--transition); }
.cart-panel.open { left: 0; box-shadow: 20px 0 40px rgba(0,0,0,0.7); }
.panel-header { padding: 25px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.panel-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; }
.panel-body { flex: 1; padding: 25px; overflow-y: auto; }

.cart-item { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; background: var(--surface-light); padding: 12px; border-radius: 8px; border: 1px solid var(--border); }
.cart-item img { width: 60px; height: 60px; object-fit: contain; }
.item-details { flex: 1; }
.item-details h4 { font-size: 14px; margin-bottom: 5px; }
.qty-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty-btn { background: var(--surface); border: 1px solid var(--border); color: #fff; width: 24px; height: 24px; border-radius: 4px; cursor: pointer; }
.remove-item { color: #ff4a4a; cursor: pointer; font-size: 13px; margin-right: auto; }

.panel-footer { padding: 25px; border-top: 1px solid var(--border); background: var(--surface-light); }
.coupon-wrapper { display: flex; gap: 10px; margin-bottom: 20px; }
.coupon-wrapper input { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 10px; color: #fff; }
.coupon-wrapper button { background: var(--text); color: #000; border: none; padding: 0 20px; border-radius: 6px; font-weight: bold; cursor: pointer; }

.price-summary { margin-bottom: 20px; display: flex; flex-direction: column; gap: 8px; }
.price-row { display: flex; justify-content: space-between; color: var(--text-dark); }
.discount-row { color: #00ff88; font-weight: bold; }
.total-row { color: #fff; font-size: 18px; font-weight: 800; border-top: 1px solid var(--border); padding-top: 10px; }

.checkout-trigger-btn { width: 100%; background: var(--accent); color: #000; border: none; padding: 15px; border-radius: 8px; font-size: 16px; font-weight: bold; cursor: pointer; transition: var(--transition); display: flex; justify-content: center; align-items: center; gap: 10px; }
.checkout-trigger-btn:hover { box-shadow: 0 0 20px var(--accent-glow); transform: scale(1.02); }

/* نافذة نظام الدفع الذكي (Checkout Wizard) */
.checkout-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(5,7,12,0.9); backdrop-filter: blur(10px); z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: var(--transition); }
.checkout-overlay.open { opacity: 1; pointer-events: auto; }
.checkout-wizard-card { background: var(--surface); width: 100%; max-width: 550px; border: 1px solid var(--border); border-radius: 20px; padding: 40px; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.8); }
.close-wizard { position: absolute; top: 20px; left: 20px; background: none; border: none; color: var(--text-dark); font-size: 28px; cursor: pointer; }

/* مؤشر الخطوات */
.steps-indicator { display: flex; align-items: center; justify-content: space-between; margin-bottom: 40px; }
.step-dot { width: 35px; height: 35px; background: var(--surface-light); border: 2px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; color: var(--text-dark); position: relative; }
.step-dot span { position: absolute; bottom: -22px; font-size: 11px; white-space: nowrap; color: var(--text-dark); font-weight: normal; }
.step-dot.active { background: var(--accent); border-color: var(--accent); color: #000; box-shadow: 0 0 15px var(--accent-glow); }
.step-dot.active span { color: var(--accent); font-weight: bold; }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 10px; }
.step-line.active { background: var(--accent); }

/* محتوى الفورم والخطوات */
.wizard-steps-container { position: relative; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fadeIn 0.4s ease-out forwards; }

.wizard-step h3 { font-size: 20px; margin-bottom: 25px; font-weight: bold; border-right: 3px solid var(--accent); padding-right: 10px; }
.wizard-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 13px; color: var(--text-dark); }
.form-group input { background: var(--surface-light); border: 1px solid var(--border); padding: 12px; border-radius: 8px; color: #fff; font-size: 15px; }
.form-group input:focus { border-color: var(--accent); outline: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.input-with-icon { position: relative; }
.input-with-icon input { width: 100%; padding-left: 45px; }
.card-brand-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--text-dark); }

.wizard-next-btn, .wizard-submit-btn { background: var(--accent); color: #000; border: none; padding: 14px; border-radius: 8px; font-weight: bold; cursor: pointer; font-size: 15px; transition: var(--transition); }
.wizard-next-btn:hover, .wizard-submit-btn:hover { box-shadow: 0 0 15px var(--accent-glow); }

.wizard-buttons { display: grid; grid-template-columns: 100px 1fr; gap: 15px; }
.wizard-back-btn { background: transparent; border: 1px solid var(--border); color: #fff; border-radius: 8px; cursor: pointer; transition: var(--transition); }
.wizard-back-btn:hover { background: var(--surface-light); }

/* فاتورة النجاح وشاشة الاكتمال */
.text-center { text-align: center; }
.success-msg { color: var(--text-dark); margin: 15px 0 25px; font-size: 14px; }
.invoice-box { background: var(--surface-light); border: 1px solid var(--border); border-radius: 10px; padding: 20px; text-align: right; margin-bottom: 25px; }
.invoice-title { font-weight: bold; border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 12px; font-size: 14px; color: var(--accent); }
.invoice-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }

.close-success-btn { width: 100%; background: #fff; color: #000; border: none; padding: 12px; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* توست نوتيفيكيشن */
.toast-container { position: fixed; bottom: 30px; right: 30px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-right: 4px solid var(--accent); padding: 15px 25px; border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; align-items: center; gap: 12px; animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

.blur-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 1400; display: none; }
.blur-backdrop.show { display: block; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* أنيميشن علامة الصح الفاخرة */
.success-checkmark { width: 80px; height: 80px; margin: 0 auto 20px; }
.success-checkmark .check-icon { width: 80px; height: 80px; relative; border-radius: 50%; box-shadow: inset 0px 0px 0px 5px #00ffaa; transform: scaleX(-1); }
.success-checkmark .check-icon .icon-line { height: 5px; background-color: #00ffaa; display: block; border-radius: 2px; position: absolute; z-index: 10; }
.success-checkmark .check-icon .icon-line.line-tip { width: 25px; left: 14px; top: 46px; transform: rotate(45deg); }
.success-checkmark .check-icon .icon-line.line-long { width: 47px; right: 8px; top: 38px; transform: rotate(-45deg); }