/* ============================================
   Header & Footer Styling - سوق مصر - تصميم عصري فاتح
   ============================================ */

/* Header Styles */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 2px solid rgba(79, 70, 229, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header:hover::before {
  transform: scaleX(1);
}

.header-container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo a {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: #1f2937;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.logo a::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 9999px;
  transform: scaleX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo a:hover::after {
  transform: scaleX(1);
}

.logo a:hover {
  transform: translateY(-3px);
}

.logo-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 4px 8px rgba(79, 70, 229, 0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.logo-text {
  font-size: 1.875rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  color: #1f2937;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
  border-radius: 9999px;
}

.nav-link:hover::after {
  width: 70%;
}

.nav-icon {
  font-size: 1.25rem;
  z-index: 1;
}

.nav-text {
  z-index: 1;
}

.cart-icon-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 9999px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  cursor: pointer;
}

.cart-icon-header::before {
  content: '';
  position: absolute;
  inset: -3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 9999px;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  filter: blur(8px);
}

.cart-icon-header:hover::before {
  opacity: 0.7;
}

.cart-icon-header:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.5);
}

.cart-icon-header:active {
  transform: scale(0.95);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  animation: pulse-badge 2s infinite;
  border: 2px solid white;
}

@keyframes pulse-badge {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
  }
  50% { 
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.6);
  }
}

/* Footer Styles */
.site-footer {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(79, 70, 229, 0.02) 100%);
  border-top: 2px solid rgba(79, 70, 229, 0.1);
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  position: relative;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #667eea 25%, 
    #764ba2 50%, 
    #667eea 75%, 
    transparent 100%
  );
}

.footer-container {
  max-width: 1536px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation-fill-mode: both;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }

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

.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 9999px;
}

.footer-text {
  font-size: 0.9375rem;
  color: #6b7280;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.footer-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding-right: 0.5rem;
}

.footer-link::before {
  content: '→';
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #667eea;
}

.footer-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.footer-link:hover {
  color: #667eea;
  transform: translateX(-8px);
  font-weight: 600;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: #6b7280;
  padding: 0.75rem;
  border-radius: 0.75rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-item:hover {
  background: rgba(79, 70, 229, 0.05);
  transform: translateX(-5px);
}

.contact-icon {
  font-size: 1.5rem;
  color: #667eea;
  filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2));
}

.payment-methods {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.payment-icon {
  font-size: 2.5rem;
  filter: grayscale(0.6);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  cursor: pointer;
}

.payment-icon:hover {
  filter: grayscale(0) drop-shadow(0 4px 8px rgba(79, 70, 229, 0.3));
  transform: translateY(-5px) scale(1.15);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 2px solid rgba(79, 70, 229, 0.1);
  gap: 1.5rem;
  flex-wrap: wrap;
}

.copyright {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0;
  font-weight: 500;
}

.footer-legal-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-legal-link {
  font-size: 0.875rem;
  color: #6b7280;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  font-weight: 500;
}

.footer-legal-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-legal-link:hover::after {
  width: 100%;
}

.footer-legal-link:hover {
  color: #667eea;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-container {
    padding: 1rem 1.25rem;
  }
  
  .header-top {
    gap: 1rem;
  }
  
  .logo-text {
    font-size: 1.25rem;
  }
  
  .logo-icon {
    font-size: 1.875rem;
  }
  
  .main-nav {
    gap: 0.25rem;
  }
  
  .nav-text {
    display: none;
  }
  
  .nav-link {
    padding: 0.625rem 0.875rem;
  }
  
  .cart-icon-header {
    width: 48px;
    height: 48px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-legal-links {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .nav-icon {
    font-size: 1rem;
  }
  
  .cart-icon-header {
    width: 44px;
    height: 44px;
  }
  
  .cart-icon-header svg {
    width: 22px;
    height: 22px;
  }
  
  .cart-badge {
    width: 22px;
    height: 22px;
    font-size: 0.6875rem;
    top: -4px;
    right: -4px;
  }
  
  .logo-text {
    font-size: 1.125rem;
  }
  
  .logo-icon {
    font-size: 1.5rem;
  }
}

/* تأثيرات خاصة */
.site-header,
.site-footer {
  animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Glass effect */
.site-header {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* Smooth transitions for all interactive elements */
.nav-link,
.footer-link,
.cart-icon-header,
.payment-icon,
.footer-legal-link {
  will-change: transform;
}

/* Accessibility improvements */
.nav-link:focus-visible,
.footer-link:focus-visible,
.cart-icon-header:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 3px;
  border-radius: 9999px;
}