/* ========== RESET & BASE ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #0d0f17; --bg-card: rgba(255,255,255,0.03); --bg-glass: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.07); --text: #d8d8e8; --text-dim: #6e7191;
  --accent: #6c5ce7; --accent2: #00cec9; --accent3: #fd79a8;
  --gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
  --radius: 14px; --radius-sm: 10px;
  --font: 'Tajawal', 'Inter', system-ui, sans-serif;
}
html { scroll-behavior: smooth; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; direction: rtl; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ========== SUBTLE BG GLOW ========== */
.bg-glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-glow::before { content: ''; position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(108,92,231,0.08) 0%, transparent 70%); top: -200px; right: -150px; }
.bg-glow::after { content: ''; position: absolute; width: 500px; height: 500px; background: radial-gradient(circle, rgba(0,206,201,0.06) 0%, transparent 70%); bottom: -100px; left: -100px; }

/* ========== NAVBAR ========== */
.navbar { position: fixed; top: 32px; left: 0; right: 0; z-index: 100; padding: 12px 0; transition: all 0.3s ease; }
.navbar.scrolled { background: rgba(13,15,23,0.9); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); padding: 8px 0; top: 32px; }
.nav-container { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.3px; }
.logo-icon { width: 38px; height: 38px; background: linear-gradient(135deg, #6c5ce7, #00cec9, #6c5ce7); background-size: 200% 200%; animation: gradientBg 3s ease infinite; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; box-shadow: 0 4px 15px rgba(108,92,231,0.4); }
.logo-text { background: linear-gradient(to right, #ffffff, #b2b2cb); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.accent { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-weight: 900; }
@keyframes gradientBg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.nav-link { font-size: 0.85rem; color: var(--text-dim); transition: color 0.2s; font-weight: 500; }
.nav-link:hover { color: var(--text); }

/* ========== BUTTONS ========== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.88rem; transition: all 0.3s ease; }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: 0 4px 18px rgba(108,92,231,0.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(108,92,231,0.35); }
.btn-outline { border: 1.5px solid var(--border); color: var(--text); background: var(--bg-glass); }
.btn-outline:hover { border-color: var(--accent); background: rgba(108,92,231,0.08); }
.btn-nav { padding: 7px 16px; font-size: 0.82rem; background: rgba(0,206,201,0.1); color: var(--accent2); border: 1px solid rgba(0,206,201,0.2); border-radius: var(--radius-sm); }
.btn-nav:hover { background: rgba(0,206,201,0.2); }
.btn-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); color: #fff; width: auto; justify-content: center; padding: 10px 24px; border-radius: 50px; font-size: 0.9rem; font-weight: 700; box-shadow: 0 4px 15px rgba(37,211,102,0.25); border: none; }
.btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,0.4); }

/* ========== COMPACT HERO ========== */
.hero { position: relative; z-index: 1; padding: 120px 0 60px; text-align: center; overflow: hidden; display: flex; align-items: center; justify-content: center; min-height: 40vh; }
.hero-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-container { position: relative; z-index: 2; pointer-events: auto; }
.hero-title { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 900; line-height: 1.3; margin-bottom: 16px; text-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { font-size: clamp(0.95rem, 2vw, 1.1rem); color: #e2e2ee; max-width: 540px; margin: 0 auto 24px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-subtitle strong { color: var(--accent2); font-weight: 800; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ========== SECTIONS ========== */
.services-section { position: relative; z-index: 1; padding: 40px 0 60px; }
.why-us-section { position: relative; z-index: 1; padding: 60px 0; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-title { font-size: clamp(1.4rem, 3vw, 1.8rem); font-weight: 800; margin-bottom: 8px; }

/* ========== SEARCH ========== */
.search-container { max-width: 440px; margin: 0 auto 24px; }
.search-wrapper { position: relative; }
.search-icon { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 0.9rem; }
.search-input { width: 100%; padding: 12px 44px 12px 44px; background: var(--bg-glass); border: 1px solid var(--border); border-radius: 50px; color: var(--text); font-size: 0.9rem; font-family: var(--font); outline: none; transition: all 0.3s ease; direction: rtl; }
.search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,0.12); }
.search-input::placeholder { color: var(--text-dim); }
.search-clear { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: 0.85rem; padding: 6px; opacity: 0; transition: opacity 0.2s; }
.search-clear.visible { opacity: 1; }

/* ========== CATEGORY TABS ========== */
.category-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.tab { padding: 8px 18px; border-radius: 50px; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); background: var(--bg-glass); border: 1px solid var(--border); transition: all 0.3s ease; display: flex; align-items: center; gap: 6px; }
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 3px 12px rgba(108,92,231,0.3); }

/* ========== PRODUCT CARDS ========== */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 18px; cursor: pointer; transition: all 0.3s ease; position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; text-align: center; }
.product-card:hover { transform: translateY(-4px); border-color: rgba(108,92,231,0.25); box-shadow: 0 8px 30px rgba(0,0,0,0.25); }
.card-icon { width: 85px; height: 85px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin-bottom: 16px; position: relative; z-index: 1; transition: transform 0.3s ease; overflow: hidden; }
.product-card:hover .card-icon { transform: scale(1.08); }
.card-icon img, .modal-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 10px; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: 4px; position: relative; z-index: 1; }
.card-category-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; position: relative; z-index: 1; }
.card-price { font-size: 0.95rem; font-weight: 800; color: var(--accent2); background: rgba(0,206,201,0.1); border: 1px solid rgba(0,206,201,0.25); padding: 6px 16px; border-radius: 50px; position: relative; z-index: 1; margin-top: 8px; box-shadow: 0 4px 15px rgba(0,206,201,0.05); transition: all 0.3s ease; }
.product-card:hover .card-price { background: rgba(0,206,201,0.15); border-color: rgba(0,206,201,0.4); transform: scale(1.05); }
.card-hot { position: absolute; top: 10px; left: 10px; background: rgba(253,121,168,0.12); color: var(--accent3); padding: 3px 8px; border-radius: 50px; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; gap: 3px; z-index: 1; }

/* ========== NO RESULTS ========== */
.no-results { text-align: center; padding: 50px 20px; color: var(--text-dim); }
.no-results i { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.3; }
.no-results h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 6px; }

/* ========== WHY US ========== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature-card { background: var(--bg-glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 20px; text-align: center; transition: all 0.3s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: rgba(108,92,231,0.2); }
.feature-icon { width: 48px; height: 48px; background: var(--gradient); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #fff; margin: 0 auto 14px; }
.feature-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 0.85rem; color: var(--text-dim); }

/* ========== FOOTER ========== */
.footer { position: relative; z-index: 1; padding: 48px 0 20px; border-top: 1px solid var(--border); margin-top: 20px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-desc { color: var(--text-dim); font-size: 0.85rem; margin-top: 12px; max-width: 280px; }
.footer-links h4, .footer-social h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 14px; }
.footer-links a { display: block; color: var(--text-dim); font-size: 0.85rem; margin-bottom: 8px; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.social-icons { display: flex; gap: 10px; }
.social-icons a { width: 36px; height: 36px; border-radius: 9px; background: var(--bg-glass); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; font-size: 0.9rem; }
.social-icons a:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-2px); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.75rem; color: var(--text-dim); }

/* ========== MODAL ========== */
.modal-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.65); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: #14162a; border: 1px solid var(--border); border-radius: 18px; padding: 32px; max-width: 480px; width: 100%; max-height: 85vh; overflow-y: auto; position: relative; transform: translateY(20px) scale(0.97); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.modal-overlay.active .modal { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 14px; left: 14px; width: 32px; height: 32px; border-radius: 50%; background: var(--bg-glass); border: 1px solid var(--border); color: var(--text-dim); display: flex; align-items: center; justify-content: center; transition: all 0.2s; font-size: 0.85rem; }
.modal-close:hover { background: rgba(253,121,168,0.12); color: var(--accent3); }
.modal-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.modal-icon { width: 75px; height: 75px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; overflow: hidden; }
.modal-title { font-size: 1.2rem; font-weight: 800; }
.modal-category { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.modal-description { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 20px; line-height: 1.7; }

/* ========== MODAL PLANS ========== */
.plan-card { background: var(--bg-glass); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-bottom: 14px; transition: all 0.3s ease; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; }
.plan-card:hover { border-color: rgba(0,206,201,0.3); background: rgba(0,206,201,0.05); transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.plan-header { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 0; flex: 1; min-width: 150px; }
.plan-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.plan-price { font-size: 1.1rem; font-weight: 800; color: var(--accent2); background: rgba(0,206,201,0.12); border: 1px solid rgba(0,206,201,0.2); padding: 4px 12px; border-radius: 8px; display: inline-block; box-shadow: 0 2px 8px rgba(0,206,201,0.1); }
.plan-features { list-style: none; margin-bottom: 14px; }
.plan-features li { font-size: 0.8rem; color: var(--text-dim); padding: 2px 0; display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--accent2); font-size: 0.65rem; }

/* ========== MODAL SUGGESTIONS ========== */
.modal-suggestions { margin-top: 30px; border-top: 1px solid var(--border); padding-top: 20px; }
.modal-suggestions h3 { font-size: 1rem; font-weight: 800; margin-bottom: 16px; color: var(--text); }
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.suggestion-card { background: var(--bg-glass); border: 1px solid var(--border); border-radius: 12px; padding: 14px 10px; cursor: pointer; text-align: center; transition: all 0.2s; }
.suggestion-card:hover { border-color: var(--accent); background: rgba(108,92,231,0.08); transform: translateY(-2px); }
.suggestion-icon { width: 44px; height: 44px; border-radius: 10px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.suggestion-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.suggestion-title { font-size: 0.8rem; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.suggestion-price { font-size: 0.75rem; color: var(--accent2); font-weight: 600; }

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.product-card { animation: fadeInUp 0.4s ease both; }

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2d2d4a; border-radius: 3px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero { padding: 80px 0 24px; }
  .nav-link { display: none; }
  .footer-content { grid-template-columns: 1fr; gap: 24px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .product-card { padding: 16px 12px; }
  .card-icon { width: 65px; height: 65px; font-size: 1.5rem; }
  .modal { padding: 22px; }
  .tab { padding: 7px 12px; font-size: 0.75rem; }
}
@media (max-width: 480px) {
  .hero-title { font-size: 1.3rem; }
  .hero-cta .btn { width: 100%; justify-content: center; font-size: 0.85rem; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .product-card { padding: 14px 10px; }
  .card-icon { width: 55px; height: 55px; margin-bottom: 12px; }
  .card-title { font-size: 0.85rem; }
  .card-price { font-size: 0.85rem; padding: 4px 10px; }
  .plan-card { flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 16px; }
  .plan-header { align-items: center; min-width: 100%; }
  .btn-whatsapp { width: 100%; max-width: 280px; }
}

/* ========== NEWS BAR ========== */
.news-bar {
  background: var(--gradient);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  height: 32px;
  line-height: 20px;
  padding: 6px 10px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ========== SPECIAL OFFER POPUP ========== */
.special-offer-popup {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  z-index: 1000;
  width: 320px;
  box-shadow: 0 10px 30px rgba(108,92,231,0.2);
  backdrop-filter: blur(10px);
  animation: slideUpPopup 0.5s ease-out forwards;
}

@keyframes slideUpPopup {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.popup-close {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.popup-close:hover {
  background: var(--accent3);
  color: #fff;
}

.popup-content {
  text-align: center;
}

.popup-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent3);
  margin-bottom: 8px;
}

.popup-desc {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.popup-price {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--accent2);
  margin-bottom: 15px;
  background: rgba(0,206,201,0.1);
  display: inline-block;
  padding: 4px 12px;
  border-radius: 8px;
}

.popup-btn {
  width: 100%;
  font-size: 0.9rem;
  padding: 8px 15px;
}

@media (max-width: 480px) {
  .special-offer-popup {
    right: 50%;
    transform: translateX(50%);
    bottom: 20px;
    width: 90%;
    animation: slideUpPopupMobile 0.5s ease-out forwards;
  }
  @keyframes slideUpPopupMobile {
    from { transform: translate(50%, 100px); opacity: 0; }
    to { transform: translate(50%, 0); opacity: 1; }
  }
}
