@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;700;900&display=swap');

:root {
  --bg: #05080f; 
  --panel: #101010; 
  --red: #ff1e25; 
  --red-glow: rgba(255, 30, 37, 0.4); 
  --white: #f5f5f5; 
  --muted: #8d8d8d;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Cairo', sans-serif; }

/* ===== الخلفية الأساسية (شبكة وإضاءة) ===== */
body { 
  background-color: var(--bg); 
  color: var(--white); 
  overflow-x: hidden; 
  background-image: 
    radial-gradient(ellipse at top, rgba(255, 30, 37, 0.1), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(255, 30, 37, 0.05), transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 50px 50px, 50px 50px;
  background-attachment: fixed;
}

/* ===== كانفاس شرارات النار في الخلفية ===== */
#particles-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* ===== وهج حراري وإضاءة خلفية للنار ===== */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 30%, rgba(255, 30, 37, 0.08) 0%, transparent 60%);
}

/* وهج النار المتصاعدة من الأسفل */
body::after {
  content: "";
  position: fixed;
  bottom: 0; left: 0; width: 100%; height: 260px;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 120%, rgba(255, 30, 37, 0.28) 0%, rgba(255, 80, 0, 0.1) 45%, transparent 75%);
}

/* ===== شاشة الترحيب ===== */
#welcomeScreen { 
  position: fixed; 
  inset: 0; 
  z-index: 50; 
  background: radial-gradient(circle at 50% 50%, rgba(255, 30, 37, 0.12) 0%, rgba(5, 1, 1, 0.6) 55%, rgba(3, 0, 0, 0.88) 100%); 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  transition: opacity 0.8s ease; 
}
#welcomeScreen.fade-out { opacity: 0; pointer-events: none; }
.welcome-image-container { width: 90%; max-width: 550px; margin-bottom: 20px; position: relative; z-index: 2; }
.welcome-image-container img { width: 100%; border-radius: 20px; box-shadow: 0 0 40px var(--red-glow); border: 1px solid rgba(255, 30, 37, 0.3); }
.welcome-title { font-size: 32px; font-weight: 900; margin-bottom: 10px; position: relative; z-index: 2; }
.welcome-title span { color: var(--red); }
.welcome-sub { color: #aaa; font-size: 15px; margin-bottom: 30px; position: relative; z-index: 2; }
.enter-store-btn { padding: 15px 50px; background: var(--red); color: white; border: none; border-radius: 12px; font-size: 20px; font-weight: 900; cursor: pointer; transition: 0.3s; box-shadow: 0 10px 30px var(--red-glow); display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.enter-store-btn:hover { background: #ff343a; transform: scale(1.05); }

/* ===== المتجر ===== */
#mainApp { display: none; position: relative; z-index: 2; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
header { position: sticky; top: 0; z-index: 30; background: rgba(7, 7, 7, 0.88); backdrop-filter: blur(16px); border-bottom: 1px solid #262626; }
.nav { height: 70px; display: flex; align-items: center; justify-content: space-between; width: 92%; max-width: 1180px; margin: auto; }
.logo { font-size: 26px; font-weight: 1000; color: #fff; text-decoration: none; }
.logo span { color: var(--red); }
.links a { color: #ccc; text-decoration: none; margin-left: 20px; font-weight: 700; font-size: 14px; }
.links a:hover { color: var(--red); }
.actions { display: flex; gap: 10px; }
.icon { width: 42px; height: 42px; border-radius: 11px; border: 1px solid #303030; background: #111; color: #fff; cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; }
.icon:hover { border-color: var(--red); color: var(--red); }
.badge { position: absolute; top: -6px; left: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); display: grid; place-items: center; font-size: 10px; font-weight: 900; }

.container { width: 92%; max-width: 1180px; margin: auto; padding: 40px 0; }
.head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 15px; }
.head h2 { font-size: 28px; font-weight: 900; color: var(--red); }

.store-banner-container { width: 100%; position: relative; border-radius: 20px; overflow: hidden; border: 1px solid #333; background: #111; box-shadow: 0 0 30px rgba(255, 30, 37, 0.15); margin-bottom: 20px; }
.store-banner-img { width: 100%; height: 380px; object-fit: cover; display: block; }
.store-banner-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%); }
.store-banner-title { position: absolute; bottom: 25px; right: 35px; font-size: 45px; font-weight: 900; color: #fff; text-shadow: 0 5px 15px rgba(0, 0, 0, 0.8); letter-spacing: 2px; margin: 0; }
.store-banner-title span { color: var(--red); text-shadow: 0 0 25px var(--red-glow); }

.marquee-wrapper { width: 100%; overflow: hidden; background: rgba(255, 30, 37, 0.05); border-top: 1px solid rgba(255, 30, 37, 0.2); border-bottom: 1px solid rgba(255, 30, 37, 0.2); padding: 15px 0; margin-bottom: 10px; display: flex; direction: ltr; }
.marquee-content { display: flex; align-items: center; gap: 30px; white-space: nowrap; animation: scrollMarquee 25s linear infinite; }
.marquee-wrapper:hover .marquee-content { animation-play-state: paused; }
@keyframes scrollMarquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
.social-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 20px; border-radius: 50px; font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; transition: 0.3s; border: 1px solid transparent; }
.social-pill.fb { background: rgba(24, 119, 242, 0.1); border-color: #1877f2; color: #1877f2; }
.social-pill.fb:hover { background: #1877f2; color: #fff; }
.social-pill.wa { background: rgba(37, 211, 102, 0.1); border-color: #25d366; color: #25d366; }
.social-pill.wa:hover { background: #25d366; color: #fff; }
.social-pill.dc { background: rgba(88, 101, 242, 0.1); border-color: #5865f2; color: #5865f2; }
.social-pill.dc:hover { background: #5865f2; color: #fff; }
.star { color: var(--red); font-size: 18px; text-shadow: 0 0 10px var(--red-glow); }

.categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.cat { border: 1px solid #262626; background: #141414; padding: 25px; border-radius: 18px; cursor: pointer; transition: 0.2s; text-align: center; }
.cat:hover { border-color: var(--red); transform: translateY(-4px); box-shadow: 0 10px 25px rgba(255, 30, 37, 0.1); }
.cat b { font-size: 18px; display: block; margin-bottom: 5px; }
.cat small { color: #777; }

.search, .select { background: #111; border: 1px solid #333; border-radius: 10px; color: white; padding: 12px 15px; outline: 0; }
.search:focus, .select:focus { border-color: var(--red); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.card { background: var(--panel); border: 1px solid #252525; border-radius: 18px; overflow: hidden; transition: 0.2s; }
.card:hover { transform: translateY(-5px); border-color: var(--red); box-shadow: 0 10px 30px rgba(255, 30, 37, 0.1); }
.art { height: 160px; display: grid; place-items: center; position: relative; }
.art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.art i { font-size: 40px; color: rgba(255,255,255,0.1); z-index: 1; }
.info { padding: 15px; }
.info h3 { font-size: 15px; margin-bottom: 5px; }
.meta { font-size: 12px; color: #777; margin-bottom: 10px; }
.row { display: flex; justify-content: space-between; align-items: center; }
.price { font-size: 16px; font-weight: 900; color: var(--red); }
.add { border: 0; background: #fff; color: #000; border-radius: 8px; padding: 8px 12px; font-weight: 900; cursor: pointer; transition: 0.2s; }
.add:hover { background: var(--red); color: #fff; }

.review-form-box { background: #111; border: 1px solid #333; padding: 25px; border-radius: 15px; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.review-form-box h3 { color: var(--red); margin-bottom: 5px; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.review-card { background: linear-gradient(145deg, #171717, #101010); border: 1px solid #303030; border-right: 3px solid var(--red); padding: 20px; border-radius: 13px; transition: border-color .2s, transform .2s; }
.review-card:hover { border-color: #555; border-right-color: var(--red); transform: translateY(-3px); }
.review-card h4 { color: #fff; font-size: 16px; font-weight: 900; margin: 0 0 10px; }
.review-card p { color: #bdbdbd; font-size: 14px; line-height: 1.8; margin: 0; overflow-wrap: anywhere; }

.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); z-index: 60; display: none; }
.overlay.open { display: block; }
.cart { position: absolute; top: 0; right: 0; width: min(430px, 100%); height: 100%; background: #0d0d0d; border-left: 1px solid var(--red); padding: 20px; overflow: auto; display: flex; flex-direction: column; }
.cartHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close { background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; }
.cartItem { display: flex; gap: 10px; padding: 15px 0; border-bottom: 1px solid #222; align-items: center; }
.qty { display: flex; gap: 5px; margin-top: 5px; }
.qty button { width: 25px; height: 25px; background: #222; color: #fff; border: 1px solid #333; border-radius: 4px; cursor: pointer; }
.total { display: flex; justify-content: space-between; font-size: 18px; font-weight: 900; padding: 20px 0; }
.full { width: 100%; padding: 15px; background: var(--red); border: none; border-radius: 10px; color: white; font-weight: 900; cursor: pointer; transition: 0.2s; font-size: 16px; }
.full:hover { background: #ff343a; }

.modal { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.8); z-index: 70; display: none; place-items: center; padding: 20px; }
.modal.open { display: grid; }
.box { width: min(500px, 100%); background: #0e0e0e; border: 1px solid var(--red); border-radius: 20px; padding: 25px; box-shadow: 0 0 40px rgba(255, 30, 37, 0.1); }
.form { display: grid; gap: 15px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; color: #aaa; }
.field input, .field select { background: #151515; color: #fff; border: 1px solid #333; border-radius: 8px; padding: 12px; outline: 0; }
.field input:focus, .field select:focus { border-color: var(--red); }

.admin-card { background: #111; border: 1px solid #333; border-radius: 15px; padding: 20px; margin-bottom: 30px; }
.admin-card h3 { color: var(--red); margin-bottom: 15px; font-size: 18px; }
.admin-form { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.admin-form input, .admin-form select { padding: 12px; background: #000; border: 1px solid #444; color: #fff; border-radius: 8px; outline: 0; font-family: 'Cairo'; }
.admin-form button { grid-column: 1 / -1; }

#adminProductsList { max-height: 500px; overflow-y: auto; border: 1px solid #333; border-radius: 12px; }
#adminProductsList::-webkit-scrollbar { width: 8px; }
#adminProductsList::-webkit-scrollbar-track { background: #0a0a0a; border-radius: 4px; }
#adminProductsList::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }
#adminProductsList::-webkit-scrollbar-thumb:hover { background: #cc0000; }

.admin-product-row { display: flex; justify-content: space-between; align-items: center; background: #1a1a1a; border-bottom: 1px solid #333; padding: 15px 20px; gap: 15px; }
.admin-product-row:last-child { border-bottom: none; }
.admin-product-row:hover { background: #222; }
.admin-product-info { flex: 1; text-align: right; }
.admin-product-info strong { font-size: 15px; color: #fff; display: block; margin-bottom: 5px; }
.admin-product-meta { font-size: 11px; color: #888; display: flex; gap: 10px; flex-wrap: wrap; }
.admin-product-meta span { color: #aaa; }
.admin-product-meta span::after { content: '|'; margin-right: 10px; color: #555; }
.admin-product-meta span:last-child::after { content: ''; }

.admin-product-actions { display: flex; gap: 8px; }
.btn-edit-square { background: #0d6efd; border: none; color: #fff; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; transition: 0.2s; }
.btn-edit-square:hover { background: #0b5ed7; }
.btn-del-circle { background: #ff4d4d; border: none; color: #fff; cursor: pointer; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: 0.2s; }
.btn-del-circle:hover { background: #dc3545; }

#adminReviewsList { max-height: 500px; overflow-y: auto; }
.admin-review-row { background: #1a1a1a; border: 1px solid #333; padding: 15px; border-radius: 10px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; flex-wrap: wrap; }
.admin-review-info { flex: 1; min-width: 200px; }
.admin-review-info h4 { color: #0d6efd; margin-bottom: 5px; font-size: 15px; }
.admin-review-info p { color: #ccc; font-size: 13px; }
.admin-review-actions { display: flex; gap: 8px; }
.admin-review-actions button { padding: 6px 12px; border: none; border-radius: 6px; color: #fff; cursor: pointer; font-size: 12px; font-weight: bold; font-family: 'Cairo'; }
.btn-approve { background: #28a745; }
.btn-approve:hover { background: #218838; }
.btn-reject { background: #dc3545; }
.btn-reject:hover { background: #b02a37; }

.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #333; padding-bottom: 10px; flex-wrap: wrap; }
.admin-tabs button { background: none; border: none; color: #888; font-size: 16px; font-weight: 700; cursor: pointer; padding: 8px 15px; border-radius: 8px; transition: 0.2s; }
.admin-tabs button.active { background: var(--red); color: #fff; }
.admin-tabs button:hover:not(.active) { color: #fff; background: #222; }

.order-card { background: #151515; border: 1px solid #333; border-radius: 12px; padding: 15px; margin-bottom: 15px; display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 15px; }
.order-info { flex: 1; min-width: 250px; }
.order-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.order-actions button { padding: 8px 15px; border-radius: 8px; border: none; font-weight: 700; cursor: pointer; color: #fff; font-size: 13px; font-family: 'Cairo'; }
.btn-done { background: #28a745; }
.btn-cancel { background: #dc3545; }
.btn-delete { background: #444; }

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.toast { position: fixed; bottom: 20px; right: 20px; background: #171717; border: 1px solid var(--red); padding: 13px 17px; border-radius: 11px; z-index: 100; transform: translateY(80px); opacity: 0; transition: 0.25s; font-weight: 700; box-shadow: 0 0 20px var(--red-glow); }
.toast.show { transform: none; opacity: 1; }

@media(max-width: 768px) {
  .grid { grid-template-columns: 1fr; }
  .categories { grid-template-columns: repeat(2, 1fr); }
  .links { display: none; }
  .admin-form { grid-template-columns: 1fr; }
  .store-banner-img { height: 220px; }
  .store-banner-title { font-size: 28px; right: 20px; bottom: 15px; }
}

.checkout-modal { padding: 16px; overflow-y: auto; align-items: center; }
.checkout-box { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: #0e0e0e; border: 1px solid #292929; border-radius: 12px; padding: 16px 22px 12px; box-shadow: 0 12px 40px rgba(255, 30, 37, 0.08); }
.checkout-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.checkout-header h2 { color: #f5f5f5; font-family: Arial, sans-serif; font-size: 24px; font-weight: 800; letter-spacing: .2px; }
.checkout-close { border: 0; background: transparent; color: #f5f5f5; font-family: Arial, sans-serif; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 2px; }
.checkout-notice { background: #151515; border: 1px solid #292929; border-radius: 10px; color: #aaa; font-size: 11px; line-height: 1.7; padding: 11px 12px; margin-bottom: 12px; }
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 11px; margin-bottom: 11px; }
.checkout-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.checkout-field label { color: #bdbdbd; font-family: Arial, sans-serif; font-size: 12px; }
.checkout-field input, .checkout-field select, .checkout-field textarea { width: 100%; min-width: 0; background: #161616; color: #f5f5f5; border: 1px solid #303030; border-radius: 10px; outline: none; padding: 11px 12px; font-family: Arial, sans-serif; font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.checkout-field input, .checkout-field select { height: 45px; }
.checkout-field textarea { height: 80px; resize: vertical; font-family: monospace; font-size: 12px; }
.checkout-field input::placeholder, .checkout-field textarea::placeholder { color: #777; }
.checkout-field input:focus, .checkout-field select:focus, .checkout-field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(255, 30, 37, .1); }
.checkout-span { grid-column: 1 / -1; }
.checkout-submit { width: 100%; min-height: 51px; border: 0; border-radius: 11px; background: #ff1e25; color: #fff; font-family: Arial, sans-serif; font-size: 16px; font-weight: 900; cursor: pointer; transition: background .2s, transform .2s; }
.checkout-submit:hover { background: #e9151c; transform: translateY(-1px); }
@media (max-width: 520px) { .checkout-box { padding: 15px; } .checkout-header h2 { font-size: 21px; } .checkout-form { gap: 13px 9px; } .checkout-field input, .checkout-field select { padding: 10px 9px; } }
@media (max-width: 380px) { .checkout-form { grid-template-columns: 1fr; } .checkout-span { grid-column: auto; } }

.why-choose-us { padding-bottom: 20px; }
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 30px; }
.feature-box { background: #0d0d0d; border: 1px solid #222; border-radius: 12px; padding: 20px; display: flex; align-items: flex-start; gap: 15px; transition: 0.3s; }
.feature-box:hover { border-color: var(--red); box-shadow: 0 0 15px rgba(255,30,37,0.1); }
.feature-box .f-icon { background: rgba(255, 30, 37, 0.1); color: var(--red); width: 45px; height: 45px; border-radius: 10px; display: flex; justify-content: center; align-items: center; font-size: 20px; flex-shrink: 0; }
.feature-box .f-text h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 5px; }
.feature-box .f-text p { color: #777; font-size: 12px; line-height: 1.5; }

.stats-bar { background: #0a0a0a; border: 1px solid #222; border-radius: 15px; display: flex; justify-content: space-around; padding: 25px 10px; flex-wrap: wrap; gap: 20px; }
.stat { text-align: center; }
.stat h3 { color: var(--red); font-size: 28px; font-weight: 900; margin-bottom: 5px; }
.stat p { color: #888; font-size: 13px; font-weight: 700; }

.main-footer { background: #050505; border-top: 1px solid #222; padding: 50px 20px 20px; margin-top: 40px; }
.footer-container { max-width: 1180px; margin: auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-col h2 { color: #fff; font-size: 24px; font-weight: 900; margin-bottom: 15px; }
.footer-col h4 { color: var(--red); font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.footer-col p { color: #888; font-size: 13px; line-height: 1.8; max-width: 300px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { color: #bbb; text-decoration: none; font-size: 13px; font-weight: 700; transition: 0.2s; display: flex; align-items: center; gap: 10px; }
.footer-col ul li a i { color: #555; font-size: 14px; transition: 0.2s; }
.footer-col ul li a:hover { color: var(--red); }
.footer-col ul li a:hover i { color: var(--red); }
.footer-bottom { text-align: center; border-top: 1px solid #222; padding-top: 20px; }

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; }
  .stats-bar { flex-direction: column; gap: 15px; }
}