/* تحسينات الهيدر والفوتر للموبايل - Es-Gift */

/* Cairo Font Application for Header & Footer */
.header, .header *, .footer, .footer * {
  font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تحسينات عامة للهيدر */
.header {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  box-shadow: 0 4px 20px rgba(255, 0, 51, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
  transform: translateY(0);
  will-change: transform;
  backdrop-filter: blur(10px);
}

/* تأثير عند التمرير */
.header.scrolled {
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);
  backdrop-filter: blur(20px);
}

/* تعويض مساحة الهيدر الثابت */
body {
  padding-top: 140px; /* ارتفاع الهيدر التقريبي */
  scroll-behavior: smooth;
}

/* تحسين للأجهزة المحمولة */
@media (max-width: 768px) {
  body {
    padding-top: 120px;
  }
  
  .header {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

@media (max-width: 480px) {
  body {
    padding-top: 110px;
  }
  
  .header {
    transition: transform 0.2s ease-out;
  }
}

/* تحسين ترتيب عناصر الهيدر */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(17, 17, 17, 0.95);
  backdrop-filter: blur(10px);
  gap: 15px;
}

.header-left {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-center {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 500px;
  margin: 0 15px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* تحسين اللوجو */
.logo-image {
  width: 65px;
  height: 65px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 0, 51, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-image:hover {
  box-shadow: 0 8px 30px rgba(255, 0, 51, 0.4);
  transform: scale(1.05);
}

/* تحسين البحث */
.search-box {
  flex: 1;
  position: relative;
  max-width: 450px;
}

.search-box input {
  width: 100%;
  padding: 14px 45px 14px 18px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-box input:focus {
  outline: none;
  border-color: #ff0033;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(255, 0, 51, 0.3);
}

.search-box i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  transition: color 0.3s ease;
}

.search-box:hover i {
  color: #ff0033;
}

/* تحسين منطقة العملة */
.lang-currency {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.lang-currency:hover {
  background: rgba(255, 0, 51, 0.1);
  border-color: rgba(255, 0, 51, 0.3);
  transform: translateY(-2px);
}

.global-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(27, 27, 27, 0.8);
  transition: all 0.3s ease;
}

.global-container:hover {
  border-color: rgba(255, 0, 51, 0.5);
  background: rgba(31, 28, 28, 0.8);
}

.currency-selector-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 30px 0 12px;
  min-width: 120px;
  transition: all 0.3s ease;
}

.currency-selector-wrapper:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.currency-selector-wrapper select {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  padding: 8px 0;
  width: 100%;
  appearance: none;
}

.currency-arrow {
  position: absolute;
  right: 8px;
  pointer-events: none;
  font-size: 12px;
  transition: transform 0.3s ease;
}

.currency-selector-wrapper:hover .currency-arrow {
  transform: rotate(180deg);
}

/* تحسين منطقة المستخدم */
.user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-btn,
.menu-btn,
.support-icon,
.logout-btn,
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
}

.cart-btn:hover,
.menu-btn:hover,
.support-icon:hover,
.search-icon:hover {
  background: rgba(255, 0, 51, 0.15);
  color: #ff0033;
  transform: scale(1.1);
  border-color: rgba(255, 0, 51, 0.3);
}

.logout-btn:hover {
  background: rgba(255, 69, 58, 0.15);
  color: #ff453a;
  transform: scale(1.1);
  border-color: rgba(255, 69, 58, 0.3);
}

.logout-text {
  display: none;
  position: absolute;
  bottom: -25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  z-index: 1000;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: linear-gradient(135deg, #ff0033, #cc0028);
  color: white;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 0, 51, 0.4);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.cart-count.animate {
  animation: cartBounce 0.6s ease-out;
}

.cart-count.show {
  display: flex;
}

@keyframes cartBounce {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.logout-btn:hover .logout-text {
  display: block;
}

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

.login-btn-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #ff0033 0%, #cc0028 100%);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 51, 0.3);
  text-decoration: none;
}

.login-btn-header:hover {
  background: linear-gradient(135deg, #cc0028 0%, #990020 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(255, 0, 51, 0.5);
  color: white;
}

/* قائمة المستخدم المنسدلة */
.user-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown a {
  display: block;
  padding: 12px 20px;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.user-dropdown a:last-child {
  border-bottom: none;
}

.user-dropdown a:hover {
  background: rgba(255, 0, 51, 0.1);
  color: #ff0033;
  padding-right: 25px;
}

/* البحث السفلي للموبايل */
.bottom-search-box {
  display: none;
  position: relative;
  margin: 15px 20px;
}

.bottom-search-box input {
  width: 100%;
  padding: 14px 45px 14px 18px;
  border-radius: 25px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.bottom-search-box input:focus {
  outline: none;
  border-color: #ff0033;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(255, 0, 51, 0.3);
}

.bottom-search-box i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
}

/* تحسينات الموبايل */
@media (max-width: 768px) {
  .top-bar {
    padding: 12px 15px;
    gap: 10px;
  }

  .header-left {
    order: 1;
  }

  .header-center {
    display: none;
  }

  .header-right {
    order: 2;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
  }

  .logo-image {
    width: 50px;
    height: 50px;
  }

  .bottom-search-box {
    display: block;
    margin: 12px 15px;
  }

  .lang-currency {
    padding: 8px 12px;
    gap: 6px;
  }

  .global-container {
    width: 30px;
    height: 30px;
  }

  .currency-selector-wrapper {
    min-width: 85px;
    padding: 0 25px 0 8px;
  }

  .currency-selector-wrapper select {
    font-size: 13px;
  }

  .cart-btn,
  .menu-btn,
  .support-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .login-btn-header {
    padding: 8px 12px;
    font-size: 13px;
  }

  .login-text {
    display: none;
  }

  .admin-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .top-bar {
    padding: 10px 12px;
    gap: 8px;
  }

  .header-right {
    gap: 6px;
  }

  .logo-image {
    width: 45px;
    height: 45px;
  }

  .lang-currency {
    padding: 6px 8px;
    gap: 4px;
  }

  .global-container {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .currency-selector-wrapper {
    min-width: 75px;
    padding: 0 20px 0 6px;
  }

  .currency-selector-wrapper select {
    font-size: 12px;
  }

  .cart-btn,
  .menu-btn,
  .support-icon,
  .logout-btn,
  .search-icon {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .cart-count {
    min-width: 16px;
    height: 16px;
    font-size: 10px;
    top: -3px;
    right: -3px;
  }

  .logout-text {
    display: none !important;
  }

  .admin-text {
    display: none;
  }

  .login-btn-header {
    padding: 6px 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }

  .bottom-search-box {
    margin: 10px 12px;
  }
}

/* تحسين عداد السلة للأجهزة المختلفة */
@media (max-width: 375px) {
  .user-actions {
    gap: 4px;
  }
  
  .cart-btn,
  .menu-btn,
  .support-icon,
  .logout-btn,
  .search-icon {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .cart-count {
    min-width: 14px;
    height: 14px;
    font-size: 9px;
    top: -2px;
    right: -2px;
  }

  .logo-image {
    width: 40px;
    height: 40px;
  }

  .admin-text,
  .login-text {
    display: none;
  }
}

/* إضافة hover effect لجميع الأزرار */
.user-actions a,
.user-actions button {
  transition: all 0.3s ease;
}

.user-actions a:hover,
.user-actions button:hover {
  transform: translateY(-2px);
}

/* شريط البحث المنبثق */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  transition: all 0.3s ease;
}

.search-overlay.active {
  display: flex;
  opacity: 1;
}

.search-popup {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 60px rgba(255, 0, 51, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(-30px);
  transition: all 0.3s ease;
}

.search-overlay.active .search-popup {
  transform: translateY(0);
}

.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.search-header h3 {
  color: #fff;
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.close-search {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-search:hover {
  background: rgba(255, 0, 51, 0.2);
  transform: scale(1.1);
}

.search-input-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#popupSearchInput {
  flex: 1;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

#popupSearchInput:focus {
  outline: none;
  border-color: #ff0033;
  background: rgba(255, 255, 255, 0.1);
}

#popupSearchInput::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-btn {
  background: linear-gradient(135deg, #ff0033, #cc0028);
  border: none;
  border-radius: 15px;
  padding: 15px 20px;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
}

.search-btn:hover {
  background: linear-gradient(135deg, #ff1a4a, #dd0030);
  transform: scale(1.05);
}

.search-suggestions {
  max-height: 300px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 10px;
}

.search-suggestion-item {
  padding: 12px 15px;
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-suggestion-item:hover {
  background: rgba(255, 0, 51, 0.1);
}

/* تحسينات البحث المنبثق للأجهزة المحمولة */
@media (max-width: 768px) {
  .search-popup {
    width: 95%;
    padding: 20px;
    margin: 0 10px;
  }
  
  .search-header h3 {
    font-size: 1.3rem;
  }
  
  #popupSearchInput {
    padding: 12px 15px;
    font-size: 1rem;
  }
  
  .search-btn {
    padding: 12px 15px;
    min-width: 50px;
  }
}

@media (max-width: 480px) {
  .search-overlay {
    padding-top: 5vh;
  }
  
  .search-popup {
    width: 98%;
    padding: 15px;
    border-radius: 15px;
  }
  
  .search-header h3 {
    font-size: 1.2rem;
  }
  
  .close-search {
    width: 35px;
    height: 35px;
  }
  
  #popupSearchInput {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  
  .search-btn {
    padding: 10px 12px;
    min-width: 45px;
  }
}

/* تحسينات الفوتر */
.footer {
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
  border-top: 2px solid rgba(255, 0, 51, 0.2);
  position: relative;
  overflow: hidden;
}

/* تحسينات الفوتر للموبايل */
@media (max-width: 768px) {
  .footer {
    padding: 25px 15px 20px;
  }

  .footer-first-row {
    flex-direction: column;
    gap: 25px;
    align-items: center;
    text-align: center;
  }

  .payment-icons {
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px;
  }

  .payment-icon-item {
    font-size: 24px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .payment-icon-item:hover {
    background: rgba(255, 0, 51, 0.1);
    border-color: rgba(255, 0, 51, 0.3);
    transform: scale(1.05);
  }

  .trustpilot-btn {
    padding: 12px 25px;
    font-size: 15px;
    border-radius: 25px;
    background: linear-gradient(135deg, #00b67a 0%, #00a86b 100%);
    border: none;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 182, 122, 0.3);
  }

  .social-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
  }

  .social-icons {
    justify-content: center;
    gap: 20px;
  }

  .social-icons img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 5px;
    background: rgba(255, 255, 255, 0.05);
  }

  .social-icons img:hover {
    transform: scale(1.1);
    border-color: #ff0033;
  }

  .footer-links {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links div {
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
  }

  .footer-links p {
    font-size: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .footer-links p:hover {
    color: #ff0033;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 20px 12px 15px;
  }

  .payment-icon-item {
    font-size: 20px;
    padding: 8px;
  }

  .social-icons img {
    width: 35px;
    height: 35px;
  }
}
