/* Electronics Store Theme - Original San Smart Colors */
:root {
  --bg-dark: #FAFAF8; /* Very light warm background */
  --bg-light: #FFFFFF; /* Pure white */
  --surface: rgba(255, 255, 255, 0.98); /* Clean surface */
  --surface-hover: rgba(255, 255, 255, 1);
  --line: rgba(74, 55, 40, 0.15); /* Brown tinted line */
  --text-light: #1A1A2E; /* Dark text for light theme */
  --text-muted: #6B5B47; /* Darker warm brown for better contrast */
  --accent: #D4AF37; /* Original gold accent */
  --accent-2: #C9A96E; /* Warmer gold accent */
  --accent-3: #B8860B; /* Dark golden rod for better contrast */
  --primary: #4A3728; /* Dark brown from app - original primary */
  --secondary: #8B6F47; /* Light brown from app - original secondary */
  --success: #4CAF50; /* Green for success states */
  --warning: #FF9800; /* Orange for warnings */
  --error: #F44336; /* Red for errors */
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: none;
  --shadow-lg: none;
  --container: 1200px;
  --font-main: 'Segoe UI', 'Roboto', sans-serif;
}

/* Global Reset and Typography */
* { 
  box-sizing: border-box;
}

html { 
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: right; /* Default to RTL */
  overflow-x: hidden; /* Prevent horizontal scroll from animations */
  width: 100%;
  max-width: 100%;
}

/* LTR overrides when language is English */
[dir="ltr"] body {
  text-align: left;
}

[dir="ltr"] .hero__subtitle,
[dir="ltr"] .lead,
[dir="ltr"] .section-title {
  text-align: left;
}

[dir="ltr"] .hero__subtitle {
  margin-inline: 0 auto;
}

/* Mobile fixes for RTL/LTR */
@media (max-width: 768px) {
  body {
    width: 100vw;
    overflow-x: hidden;
  }
  
  html {
    width: 100%;
    overflow-x: hidden;
  }
}

/* Animated Background Gradient - Warm & Elegant */
.background-gradient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #FAFAF8 0%, #F5F1ED 50%, #FFF9F0 100%);
  z-index: -1;
  opacity: 1;
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

h1, h2, h3, .brand__name {
  font-family: var(--font-main);
  font-weight: 800;
  color: var(--text-light);
}

h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 1rem; }

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }

.container { 
  width: 100%; 
  max-width: var(--container); 
  margin-inline: auto; 
  padding-inline: 20px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .container {
    padding-inline: 16px;
    margin-left: 0;
    margin-right: 0;
  }
}
.section-title { text-align: center; margin-bottom: 3rem; }
.lead { text-align: center; font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 3rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; padding: 1rem 2rem; border-radius: 999px; font-weight: 700; border: 2px solid var(--line); background: transparent; color: var(--text-light); transition: all .3s cubic-bezier(0.25, 0.46, 0.45, 0.94); cursor: pointer; text-transform: uppercase; letter-spacing: 1px; }
.btn--accent { background: linear-gradient(45deg, var(--accent), var(--accent-2)); color: var(--bg-dark); border-color: var(--accent); }
.btn--accent:hover { transform: translateY(-5px) scale(1.02); }
.btn--ghost { border-color: var(--text-muted); color: var(--text-light); }
.btn--ghost:hover { background: var(--surface); transform: translateY(-3px); border-color: var(--accent); }

/* Appbar (Clean & Modern) */
.appbar { 
  position: sticky; 
  top: 0; 
  z-index: 100; 
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); 
  transition: all 0.3s ease;
}

.appbar--scrolled { 
  background: rgba(255, 255, 255, 0.98);
}

.appbar__inner { 
  min-height: 70px; 
  display: flex; 
  align-items: center; 
  gap: 2rem;
  animation: slideInDown 0.5s ease;
  justify-content: space-between;
  flex-wrap: nowrap;
}

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

.brand { 
  display: inline-flex; 
  align-items: center; 
  gap: 0.75rem; 
  font-weight: 800; 
  font-size: 1.3rem;
  color: var(--text-light);
  transition: transform 0.3s ease;
}

.brand:hover {
  transform: scale(1.05);
}

.brand__img { 
  width: 40px; 
  height: 40px; 
  object-fit: contain; 
  border-radius: 10px; 
  transition: transform 0.3s ease;
}

.brand__img:hover {
  transform: rotate(5deg) scale(1.1);
}
.quicknav { 
  display: none; 
  gap: 1.5rem; 
  margin-inline: auto;
}

@media (min-width: 768px) { 
  .quicknav { display: flex; } 
}

.quicknav a { 
  padding: 0.5rem 0.8rem; 
  border-radius: 8px; 
  font-weight: 600; 
  color: var(--text-muted); 
  position: relative; 
  transition: all 0.3s ease;
}

.quicknav a:hover { 
  color: var(--text-light);
}

.quicknav a::after { 
  content: ''; 
  position: absolute; 
  bottom: 0; 
  right: 50%; 
  width: 0; 
  height: 2px; 
  background: var(--accent); 
  transition: width 0.3s ease, right 0.3s ease;
}

.quicknav a:hover::after { 
  width: 100%; 
  right: 0;
}

/* Language Switch - Back in AppBar */
.morph-toggle { 
  cursor: pointer;
  margin-left: auto; /* يدفعه لأقصى اليمين دائماً */
  flex-shrink: 0; /* لا يتقلص */
}

.morph-toggle input { 
  display: none;
}

.morph-toggle .btn { 
  width: 70px; 
  height: 32px; 
  background: rgba(255, 255, 255, 0.95); 
  border-radius: 16px; 
  position: relative; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-family: var(--font-main); 
  font-weight: 600; 
  border: 2px solid var(--accent); 
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.morph-toggle .btn:hover { 
  transform: translateY(-2px) scale(1.05);
  border-color: var(--accent-3);
}

/* Sliding background indicator */
.morph-toggle .btn::before {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 30px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 14px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.morph-toggle input:checked + .btn::before {
  transform: translateX(-36px);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

/* Language text styling */
.morph-toggle .en, .morph-toggle .ar { 
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  letter-spacing: 0.5px;
}

.morph-toggle .ar {
  right: 10px;
  color: white;
}

.morph-toggle .en {
  left: 10px;
  color: var(--text-muted);
}

.morph-toggle input:checked + .btn .ar {
  color: var(--text-muted);
}

.morph-toggle input:checked + .btn .en {
  color: white;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .morph-toggle .btn {
    width: 60px;
    height: 28px;
  }
  
  .morph-toggle .btn::before {
    width: 26px;
    height: 24px;
    top: 2px;
  }
  
  .morph-toggle input:checked + .btn::before {
    transform: translateX(-30px);
  }
  
  .morph-toggle .en, .morph-toggle .ar {
    font-size: 10px;
  }
  
  .morph-toggle .ar {
    right: 8px;
  }
  
  .morph-toggle .en {
    left: 8px;
  }
}



/* Hero Section - Modern & Elegant with Background Image */
.hero { 
  padding: 120px 0 100px; 
  text-align: center; 
  min-height: 80vh; 
  display: flex; 
  align-items: center;
  animation: fadeIn 0.8s ease;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Parallax effect */
}

/* Subtle overlay for better text readability and brand consistency */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(250, 250, 248, 0.85) 0%, 
    rgba(245, 241, 237, 0.90) 30%,
    rgba(255, 249, 240, 0.85) 70%,
    rgba(250, 250, 248, 0.90) 100%);
  z-index: 1;
}

/* Ensure content is above overlay and background */
.hero .container {
  position: relative;
  z-index: 10; /* Higher z-index to ensure text is above background */
}

.hero .hero__grid {
  position: relative;
  z-index: 10; /* Higher z-index to ensure content is above background */
}

.hero .hero__copy {
  position: relative;
  z-index: 10; /* Higher z-index to ensure text is above background */
}

/* Enhanced text contrast for better readability */
.hero__title,
.hero__subtitle {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 10;
}

.hero__actions {
  position: relative;
  z-index: 10;
}

/* Mobile optimization - disable parallax for better performance */
@media (max-width: 768px) {
  .hero {
    background-attachment: scroll;
    min-height: 70vh;
  }
  
  .hero::before {
    background: linear-gradient(135deg, 
      rgba(250, 250, 248, 0.90) 0%, 
      rgba(245, 241, 237, 0.95) 50%,
      rgba(250, 250, 248, 0.90) 100%);
  }
}

@media (min-width: 768px) { 
  .hero { text-align: right; } 
}

.hero__grid { 
  display: grid; 
  gap: 40px; 
  align-items: center;
}

@media (min-width: 768px) { 
  .hero__grid { grid-template-columns: 1fr; } 
}

.hero__title { 
  margin: 0 0 1rem;
  color: var(--text-light);
  animation: slideInLeft 0.6s ease 0.2s both;
}

.hero__subtitle { 
  margin: 0 0 3rem; 
  color: var(--text-muted); 
  font-size: 1.3rem; 
  max-width: 600px; 
  margin-inline: auto;
  animation: slideInLeft 0.6s ease 0.4s both;
}

@media (min-width: 768px) { 
  .hero__subtitle { margin-inline: 0; } 
}

.hero__actions { 
  display: flex; 
  gap: 1.5rem; 
  justify-content: center; 
  flex-wrap: wrap;
  animation: slideInLeft 0.6s ease 0.6s both;
}

@media (min-width: 768px) { 
  .hero__actions { justify-content: flex-start; } 
}

.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease;
}

.hero__btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--primary);
  border: 2px solid var(--accent);
}

.hero__btn--primary:hover {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  color: white;
  transform: translateY(-4px) scale(1.05);
}

.hero__btn--secondary {
  background: transparent;
  color: var(--text-light);
  border: 2px solid var(--accent);
}

.hero__btn--secondary:hover {
  background: var(--accent);
  color: var(--primary);
  transform: translateY(-4px);
}

.hero__btn-icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.hero__btn:hover .hero__btn-icon {
  transform: translateX(-3px);
}

.hero__btn-label {
  white-space: nowrap;
}

/* Sections */
section { 
  padding: 80px 0; 
  position: relative;
  animation: fadeIn 0.8s ease;
}

@media (min-width: 768px) { 
  section { padding: 120px 0; } 
}

/* About Section */
.about__grid { 
  display: grid; 
  gap: 60px; 
  align-items: center;
}

@media (min-width: 992px) { 
  .about__grid { grid-template-columns: 1fr 1fr; } 
}

.about__text { 
  padding-right: 20px;
  animation: slideInLeft 0.6s ease;
}

.feature-list { 
  list-style: none; 
  padding: 0; 
  margin: 2rem 0;
}

.feature-list li { 
  display: flex; 
  align-items: center; 
  gap: 1rem; 
  margin-bottom: 1.5rem; 
  font-size: 1.1rem; 
  font-weight: 600; 
  color: var(--text-light);
  transition: transform 0.3s ease;
  animation: slideInRight 0.6s ease;
}

.feature-list li:hover {
  transform: translateX(10px);
}

.feature-list i { 
  color: var(--accent); 
  font-size: 1.5rem;
}

/* Card Stack Visual (Abstract Phone) */
.card-stack { 
  position: relative; 
  width: 300px; 
  height: 500px; 
  margin: 0 auto;
  animation: scaleIn 0.8s ease;
}

.card-stack__item { 
  position: absolute; 
  width: 100%; 
  height: 100%; 
  border-radius: var(--radius-lg); 
  background: var(--surface); 
  border: 1px solid var(--line); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px); 
  transition: transform 0.3s ease;
}

.card-stack__item--1 { 
  top: 0; 
  left: 0; 
  z-index: 3;
}

.card-stack__item--2 { 
  top: 20px; 
  left: 20px; 
  z-index: 2; 
  opacity: 0.7;
}

.card-stack__item--3 { 
  top: 40px; 
  left: 40px; 
  z-index: 1; 
  opacity: 0.4;
}

.card-stack:hover .card-stack__item--1 {
  transform: translateY(-10px);
}

.card-stack:hover .card-stack__item--2 {
  transform: translateY(-5px);
}

/* Promos Section */
.promo-cards { 
  display: grid; 
  gap: 30px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) { 
  .promo-cards { grid-template-columns: repeat(3, 1fr); } 
}

@media (min-width: 480px) and (max-width: 767px) {
  .promo-cards { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

.card { 
  background: #FFFFFF; /* خلفية بيضاء صافية */
  border: 3px solid var(--accent); /* حدود ذهبية أنيقة */
  border-radius: var(--radius-lg); 
  padding: 2.5rem; 
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: scaleIn 0.6s ease;
  position: relative;
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover { 
  transform: translateY(-8px) scale(1.02); 
  background: var(--surface-hover); 
  border-color: var(--accent-3);
  border-width: 4px;
}

.card:hover::before {
  opacity: 1;
}

.card__icon { 
  font-size: 3rem; 
  color: var(--accent-3); /* لون ذهبي داكن */
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.card__icon img {
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.card:hover .card__icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--primary); /* تغيير اللون عند التمرير */
}

.card:hover .card__icon img {
  transform: scale(1.1);
}

.promo__badge { 
  display: inline-block; 
  padding: 0.5rem 1.2rem; 
  background: var(--primary); /* خلفية داكنة وواضحة */
  color: white; 
  border-radius: 999px; 
  font-size: 0.9rem; 
  font-weight: 700; 
  margin-bottom: 1rem;
  border: 2px solid var(--accent-3); /* حدود ملونة */
}

.promo h3 { 
  margin: 0.5rem 0; 
  font-size: 1.8rem;
  color: var(--primary); /* لون أكثر قتامة */
  font-weight: 800; /* جعل النص أكثر سماكة */
}

.promo p { 
  margin: 0 0 1rem; 
  color: var(--primary); /* لون أكثر قتامة للوضوح */
  font-size: 1rem; 
  line-height: 1.5;
  font-weight: 500; /* وزن أكثر للنص */
}

/* Offer countdown styling */
.offer-countdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.5rem 1rem;
  background: rgba(212, 175, 55, 0.1);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--accent-3);
  font-weight: 600;
}

.offer-countdown i {
  font-size: 0.8rem;
}

/* Message Section */
.tags { 
  display: flex; 
  justify-content: center; 
  gap: 2rem; 
  flex-wrap: wrap; 
  margin-top: 3rem;
}

.tag { 
  display: flex; 
  align-items: center; 
  gap: 0.5rem; 
  padding: 1rem 2rem; 
  border: 2px solid var(--accent); 
  background: rgba(212, 175, 55, 0.05); /* خلفية ذهبية فاتحة */
  border-radius: var(--radius); 
  font-weight: 600; 
  font-size: 1.1rem;
  color: var(--text-light);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: scaleIn 0.6s ease;
}

.tag:hover { 
  background: var(--accent);
  color: var(--primary);
  transform: scale(1.1) translateY(-5px);
}

.tag i { 
  color: inherit;
  transition: transform 0.3s ease;
}

.tag:hover i {
  transform: rotate(20deg) scale(1.2);
}

/* CTA */
.cta { 
  padding: 100px 0;
}

.cta__box { 
  background: linear-gradient(135deg, var(--primary), var(--accent-3)); 
  color: white; 
  border-radius: var(--radius-lg); 
  padding: 4rem; 
  text-align: center; 
  position: relative; 
  overflow: hidden;
  animation: scaleIn 0.8s ease;
  border: 3px solid rgba(255, 255, 255, 0.1);
}

.cta__box::before { 
  content: ''; 
  position: absolute; 
  inset: 0; 
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%), 
              linear-gradient(45deg, rgba(0, 0, 0, 0.1) 25%, transparent 25%, transparent 75%, rgba(0, 0, 0, 0.1) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  opacity: 0.3;
}

.cta__text { 
  position: relative; 
  z-index: 1;
}

.cta__box h2 { 
  color: white; 
  margin-bottom: 1rem;
  font-weight: 800;
}

.cta__box p { 
  color: rgba(255, 255, 255, 0.95); 
  margin-bottom: 3rem; 
  font-size: 1.2rem;
  font-weight: 500;
}

.stores { 
  display: flex; 
  gap: 1.5rem; 
  justify-content: center; 
  flex-wrap: wrap;
}

.store { 
  padding: 1rem 2rem; 
  border-radius: 12px; 
  background: rgba(255, 255, 255, 0.2); 
  border: 2px solid rgba(255, 255, 255, 0.4); 
  color: white; 
  font-weight: 700; 
  transition: all 0.3s ease; 
  display: flex; 
  align-items: center; 
  gap: 0.75rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.store:hover { 
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-3px);
}

.store--soon {
  opacity: 0.8;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.store--soon:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
}

.store--soon { 
  opacity: 0.7; 
  cursor: not-allowed;
}

/* Footer */
.footer { padding: 2rem 0; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 0.9rem; }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footnav { display: flex; gap: 1.5rem; }

/* Privacy Page Styling */
.privacy-content { padding: 80px 0 120px; text-align: right; }
.privacy-content .section-title { text-align: right; margin-bottom: 1rem; }
.privacy-content .lead { text-align: right; margin-inline: 0; }
.privacy-section { margin-top: 4rem; }
.privacy-section h2 { text-align: right; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; color: var(--accent); }
.privacy-section p { font-size: 1.1rem; color: var(--text-light); }
.privacy-section .feature-list { margin-top: 1rem; }
.privacy-section .feature-list li { color: var(--text-muted); }

/* Electronics Categories Section */
.categories {
  padding: 80px 0;
  background: rgba(255, 255, 255, 0.03);
}

.categories-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.category-card {
  background: #FFFFFF;
  border: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  background: var(--surface-hover);
  border-color: var(--accent-3);
  border-width: 4px;
}

.category-card:hover::before {
  opacity: 1;
}

.category-icon {
  font-size: 3.5rem;
  color: var(--accent-3);
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
}

.category-icon img {
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
  transform: scale(1.2) rotate(10deg);
  color: var(--primary);
}

.category-card:hover .category-icon img {
  transform: scale(1.1);
}

.category-card h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin: 0.5rem 0 1rem;
  font-weight: 700;
}

.category-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1rem;
  flex-grow: 1;
}

.category-count {
  display: inline-block;
  background: var(--accent);
  color: var(--primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: auto;
}

/* Global Electronics Brands Section */
.brands {
  padding: 80px 0;
  background: rgba(59, 130, 246, 0.02);
}

.brands-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.brand-card {
  background: #FFFFFF;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 120px;
}

.brand-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-3);
  background: var(--surface-hover);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.brand-logo img {
  transition: transform 0.3s ease;
}

.brand-card:hover .brand-logo img {
  transform: scale(1.1);
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.brand-info h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
}

.brand-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Tech Specifications & Features Section */
.tech-features {
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(147, 197, 253, 0.05) 100%);
}

.tech-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tech-card {
  background: #FFFFFF;
  border: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.tech-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-3);
  background: var(--surface-hover);
}

.tech-card:hover::before {
  opacity: 1;
}

.tech-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.tech-card:hover .tech-icon {
  transform: scale(1.1) rotate(10deg);
}

.tech-icon i {
  font-size: 2rem;
  color: var(--primary);
}

.tech-card h3 {
  font-size: 1.4rem;
  color: var(--primary);
  margin: 0 0 1rem;
  font-weight: 700;
}

.tech-card p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.tech-specs {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tech-specs li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-light);
  font-weight: 500;
}

.tech-specs li::before {
  content: '✓';
  width: 20px;
  height: 20px;
  background: var(--success);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  flex-shrink: 0;
}

/* Mobile optimization for tech features */
@media (max-width: 600px) {
  .tech-features {
    padding: 60px 0;
  }
  
  .tech-grid {
    gap: 20px;
    grid-template-columns: 1fr !important;
  }
  
  .tech-card {
    padding: 1.5rem;
  }
  
  .tech-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .tech-icon i {
    font-size: 1.5rem;
  }
  
  .tech-card h3 {
    font-size: 1.2rem;
  }
  
  .tech-card p {
    font-size: 0.9rem;
  }
  
  .tech-specs li {
    font-size: 0.85rem;
  }
}

/* Mobile optimization for brands */
@media (max-width: 600px) {
  .brands {
    padding: 60px 0;
  }
  
  .brands-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .brand-card {
    padding: 1rem;
    min-height: 100px;
  }
  
  .brand-logo {
    min-height: 50px;
  }
  
  .brand-name {
    font-size: 1.2rem;
  }
  
  .brand-info h4 {
    font-size: 1rem;
  }
  
  .brand-info p {
    font-size: 0.8rem;
  }
}

/* Mobile optimization for categories */
@media (max-width: 600px) {
  .categories {
    padding: 60px 0;
  }
  
  .categories-grid {
    gap: 20px;
    grid-template-columns: 1fr !important;
  }
  
  .category-card {
    padding: 1.5rem;
    min-height: 200px;
  }
  
  .category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }
  
  .category-card h3 {
    font-size: 1.2rem;
  }
  
  .category-card p {
    font-size: 0.9rem;
  }
}

/* Track Order Section - No Shadows */
#track-order {
  background: rgba(255, 255, 255, 0.05); 
  padding: 4rem 0; 
  text-align: center;
}

#track-order .container > div {
  max-width: 500px; 
  margin: 0 auto; 
  background: white; 
  padding: 2rem; 
  border-radius: 16px; 
  border: 3px solid var(--accent-3);
}

#track-order input {
  width: 100%; 
  padding: 1rem 3rem 1rem 1rem; 
  border: 2px solid var(--line); 
  border-radius: 8px; 
  font-size: 1rem; 
  outline: none; 
  transition: border-color 0.3s;
  box-sizing: border-box;
}

#track-order input:focus {
  border-color: var(--accent-3);
}

#track-order .hero__btn {
  width: 100%; 
  justify-content: center; 
  margin-top: 0.5rem; 
  cursor: pointer;
}

#trackResult {
  margin-top: 1.5rem; 
  display: none; 
  text-align: right; 
  background: #f8f9fa; 
  padding: 1.5rem; 
  border-radius: 12px; 
  border: 2px solid var(--accent);
}

/* Responsive Track Order */
@media (max-width: 600px) {
  #track-order {
    padding: 3rem 0;
  }
  
  #track-order .container > div {
    margin: 0 15px;
    padding: 1.5rem;
  }
  
  #track-order input {
    padding: 0.9rem 2.5rem 0.9rem 0.9rem;
    font-size: 0.95rem;
  }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 0.95rem;
  }

  .container {
    padding-inline: 12px;
    width: 100%;
    max-width: 100%;
  }

  section {
    padding: 60px 0;
  }

  .appbar__inner {
    gap: 1rem;
    min-height: 60px;
    flex-wrap: nowrap;
    justify-content: space-between; /* تأكد من التوزيع الصحيح */
  }

  .brand {
    font-size: 1.1rem;
    flex-shrink: 0;
    order: 1; /* اللوجو أولاً */
  }

  .brand__img {
    width: 35px;
    height: 35px;
  }

  .quicknav {
    display: none !important;
  }

  /* Language Switch Mobile Optimization */
  .morph-toggle {
    flex-shrink: 0;
    order: 3; /* سويتش اللغة أخيراً (أقصى اليمين) */
    margin-left: auto; /* يدفعه لأقصى اليمين */
  }

  .morph-toggle .btn {
    width: 55px;
    height: 26px;
  }
  
  .morph-toggle .btn::before {
    width: 24px;
    height: 22px;
    top: 2px;
  }
  
  .morph-toggle input:checked + .btn::before {
    transform: translateX(-27px);
  }
  
  .morph-toggle .en, .morph-toggle .ar {
    font-size: 9px;
  }
  
  .morph-toggle .ar {
    right: 7px;
  }
  
  .morph-toggle .en {
    left: 7px;
  }

  .hero {
    padding: 90px 0 70px;
    min-height: auto;
  }

  .hero__title {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero__subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero__btn {
    width: 100%;
    padding: 0.85rem 1.4rem;
    font-size: 0.85rem;
  }

  /* Track Order Section Mobile */
  #track-order {
    padding: 3rem 0;
  }

  #track-order .container > div {
    padding: 1.5rem;
    margin: 0 10px;
  }

  #track-order input {
    padding: 0.9rem 2.5rem 0.9rem 0.9rem;
    font-size: 0.95rem;
  }

  #track-order .hero__btn {
    padding: 0.9rem 1.2rem;
    font-size: 0.9rem;
  }

  .about__grid {
    gap: 40px;
  }

  .about__text {
    padding-right: 0;
  }

  .feature-list li {
    font-size: 1rem;
    margin-bottom: 1.2rem;
  }

  .card-stack {
    width: 240px;
    height: 400px;
  }

  /* Promos Section Mobile - CRITICAL FIX */
  .promo-cards {
    gap: 20px;
    grid-template-columns: 1fr !important;
    padding: 0 5px;
  }

  .card {
    padding: 1.5rem;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    border-width: 2px;
  }

  .card__icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  .promo__badge {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
  }

  .promo h3 {
    font-size: 1.3rem;
    margin: 0.5rem 0;
    line-height: 1.3;
  }

  .promo p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0 0 0.8rem;
  }

  /* Offer countdown mobile */
  .offer-countdown {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* Products Section Mobile */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* عمودين بدلاً من عمود واحد */
    gap: 1rem !important; /* مسافة أصغر بين البطاقات */
  }

  .product-card {
    padding: 1rem !important; /* حشو أصغر */
    max-width: none !important;
    width: 100% !important;
  }

  .product-image {
    height: 140px !important; /* ارتفاع أصغر للصورة */
    margin-bottom: 0.8rem !important;
  }

  .product-card h3 {
    font-size: 0.95rem !important; /* خط أصغر للعنوان */
    line-height: 1.2 !important;
    margin-bottom: 0.4rem !important;
  }

  .product-card p {
    font-size: 0.8rem !important; /* خط أصغر للوصف */
    line-height: 1.3 !important;
    margin-bottom: 0.8rem !important;
  }

  .product-card .price span:first-child {
    font-size: 1.1rem !important; /* سعر أصغر */
  }

  .product-card .btn-icon {
    width: 32px !important; /* زر أصغر */
    height: 32px !important;
  }

  .tags {
    gap: 1rem;
    flex-direction: column;
  }

  .tag {
    padding: 0.8rem 1.4rem;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .cta__box {
    padding: 2.5rem 1.5rem;
  }

  .cta__box h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .cta__box p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .stores {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .store {
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footnav {
    gap: 1rem;
  }

  .privacy-content {
    padding: 60px 0 100px;
  }

  .privacy-section {
    margin-top: 2rem;
  }

  .privacy-section h2 {
    font-size: 1.3rem;
  }
}

/* Additional Mobile Fixes for Very Small Screens */
@media (max-width: 480px) {
  .container {
    padding-inline: 8px !important; /* حشو أصغر للحاوي */
  }

  /* تأكيد موضع سويتش اللغة على الشاشات الصغيرة جداً */
  .appbar__inner {
    padding-inline: 8px;
    justify-content: space-between !important;
  }

  .morph-toggle {
    margin-left: auto !important;
    flex-shrink: 0 !important;
    order: 999 !important; /* أعلى أولوية لضمان الموضع الأخير */
  }

  /* تحسينات خاصة لبطاقات المنتجات على الشاشات الصغيرة جداً */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.8rem !important;
    padding: 0 4px !important;
  }

  .product-card {
    padding: 0.8rem !important;
    border-radius: 12px !important;
    min-height: auto !important;
  }

  .product-image {
    height: 120px !important;
    margin-bottom: 0.6rem !important;
    border-radius: 8px !important;
  }

  .product-card h3 {
    font-size: 0.85rem !important;
    line-height: 1.1 !important;
    margin-bottom: 0.3rem !important;
    font-weight: 600 !important;
  }

  .product-card p {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.6rem !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  .product-card .price {
    margin-bottom: 0.4rem !important;
  }

  .product-card .price span:first-child {
    font-size: 1rem !important;
    font-weight: 700 !important;
  }

  .product-card .price span:last-child {
    font-size: 0.8rem !important;
  }

  .product-card .btn-icon {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.8rem !important;
  }

  /* تحسين المسافات العامة */
  #products {
    padding-top: 1.5rem !important;
    padding-bottom: 3rem !important;
  }

  #products .section-title {
    font-size: 1.4rem !important;
    margin-bottom: 1rem !important;
  }

  #products .lead {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
  }
}

/* تحسينات للأجهزة اللوحية الصغيرة */
@media (min-width: 481px) and (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr) !important; /* ثلاثة أعمدة للتابلت */
    gap: 1.2rem !important;
  }

  .product-card {
    padding: 1.2rem !important;
  }

  .product-image {
    height: 160px !important;
    margin-bottom: 1rem !important;
  }

  .product-card h3 {
    font-size: 1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .product-card p {
    font-size: 0.85rem !important;
    margin-bottom: 0.8rem !important;
  }
}

/* تحسينات للشاشات الكبيرة */
@media (min-width: 769px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 2rem !important;
  }
}