/* Authentication Styles */
.auth-section {
  padding: 3rem 0;
  min-height: 70vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.login-container {
  grid-template-columns: 1fr 1fr;
}

.auth-form-container {
  padding: 3rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.auth-header p {
  color: #666;
  font-size: 1rem;
}

.auth-form {
  margin-bottom: 2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #dc3545;
}

.password-input {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
}

.password-strength {
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.strength-weak {
  color: #dc3545;
}
.strength-medium {
  color: #ffc107;
}
.strength-strong {
  color: #28a745;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 0.5rem;
}

.checkmark {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 18px;
  background: white;
  border: 2px solid #ddd;
  border-radius: 3px;
  margin-right: 0.5rem;
  transition: all 0.3s;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #dc3545;
  border-color: #dc3545;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  position: absolute;
  top: -2px;
  left: 2px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.auth-btn {
  width: 100%;
  background: #dc3545;
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.auth-btn:hover {
  background: #c82333;
}

.auth-footer {
  text-align: center;
  margin-bottom: 2rem;
}

.link {
  color: #dc3545;
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.social-auth {
  margin-top: 2rem;
}

.divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #ddd;
}

.divider span {
  background: white;
  padding: 0 1rem;
  color: #666;
}

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid #ddd;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.social-btn:hover {
  border-color: #dc3545;
  background: #f8f9fa;
}

.social-btn.google {
  color: #db4437;
}

.social-btn.facebook {
  color: #4267b2;
}

.auth-benefits,
.auth-welcome {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-benefits h2,
.auth-welcome h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
}

.benefits-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.benefit-item i {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.benefit-item h3 {
  margin-bottom: 0.25rem;
  font-size: 1.1rem;
}

.benefit-item p {
  opacity: 0.9;
  font-size: 0.9rem;
}

.welcome-features {
  margin-top: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.feature-item i {
  color: rgba(255, 255, 255, 0.9);
}

/* Header Styles */
.header {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  width: 100%;
}

.logo a {
  color: #dc3545;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
}

.logo i {
  margin-right: 0.3rem;
}

.search-bar {
  display: flex;
  flex: 1;
  max-width: 600px;
  margin: 0 2rem;
  border-radius: 25px;
  margin-left: 90px; /* مساحة من اليسار */
}

.search-bar input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 25px 0 0 25px;
  outline: none;
  font-size: 1rem;
}

.search-bar button {
  padding: 0.75rem 1.5rem;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 0 25px 25px 0;
  cursor: pointer;
  transition: background 0.3s;
  font-weight: bold;
  font-size: 1rem;
}

.search-bar button:hover {
  background: #c82333;
}

.header-actions {
  display: flex;
  align-items: center;
}

.user-actions {
  margin-left: auto; /* يدزها لليمين */
  display: flex;
  align-items: center;
  gap: 20px;
  padding-right: 30px; /* مساحة من اليمين */
}

.user-menu {
  gap: 25px;
  display: flex;
  align-items: center;
  margin-left: 150px;
}

.user-menu a {
  text-decoration: none;
  color: #d50932;
  font-weight: bold;
}

/* Navigation */
.navbar {
  padding: 0.5rem 0;
}

.nav-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #dc3545;
}

.nav-menu {
  display: flex;
  list-style: none;
  justify-content: center;
  align-items: center;
  padding: 0;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: #dc3545;
  color: white;
}

/* User Menu */
.user-menu {
  position: relative;
  margin-right: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: background 0.3s;
}

.user-info:hover {
  background: #f8f9fa;
}

.user-avatar {
  width: 35px;
  height: 35px;
  background: #dc3545;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.user-name {
  font-weight: 500;
  color: #333;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1000;
  display: none;
  padding: 0.5rem 0;
}

.user-dropdown.active {
  display: block;
}

.user-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #333;
  text-decoration: none;
  transition: background 0.3s;
}

.user-dropdown a:hover {
  background: #f8f9fa;
}

.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 0.5rem 0;
}

/* Profile Page Styles */
.profile-section {
  padding: 3rem 0;
  background: #f8f9fa;
  min-height: 70vh;
}

.profile-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 3rem;
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.profile-card {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.profile-avatar {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.profile-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #dc3545;
}

.change-avatar {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: bold;
  color: #dc3545;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
}

.profile-nav {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  color: #333;
  text-decoration: none;
  transition: all 0.3s;
  border-left: 3px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  background: #f8f9fa;
  border-left-color: #dc3545;
  color: #dc3545;
}

.profile-content {
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.content-section {
  display: none;
  padding: 2rem;
}

.content-section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f8f9fa;
}

.section-header h2 {
  color: #333;
  font-size: 1.8rem;
}

.edit-btn,
.add-btn,
.change-btn,
.view-btn {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.edit-btn:hover,
.add-btn:hover,
.change-btn:hover,
.view-btn:hover {
  background: #c82333;
}

.profile-form {
  max-width: 600px;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.save-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

.cancel-btn {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
}

/* Orders */
.order-filters select {
  padding: 0.5rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  outline: none;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.order-item {
  border: 2px solid #eee;
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.order-item:hover {
  border-color: #dc3545;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.order-number {
  font-weight: bold;
  color: #333;
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}
.status-shipped {
  background: #d4edda;
  color: #155724;
}
.status-delivered {
  background: #d1ecf1;
  color: #0c5460;
}
.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* Addresses */
.addresses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.address-card {
  border: 2px solid #eee;
  border-radius: 10px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.3s;
}

.address-card:hover {
  border-color: #dc3545;
}

.address-card.default {
  border-color: #28a745;
}

.address-title {
  font-weight: bold;
  color: #333;
  margin-bottom: 0.5rem;
}

.default-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #28a745;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
}

.address-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.address-actions button {
  padding: 0.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.9rem;
}

.edit-address {
  background: #ffc107;
  color: #333;
}

.delete-address {
  background: #dc3545;
  color: white;
}

/* Wishlist */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.wishlist-item {
  border: 2px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.3s;
}

.wishlist-item:hover {
  border-color: #dc3545;
}

.wishlist-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.wishlist-info {
  padding: 1rem;
}

.wishlist-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.wishlist-actions button {
  flex: 1;
  padding: 0.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
}

.add-to-cart-wishlist {
  background: #dc3545;
  color: white;
}

.remove-wishlist {
  background: #6c757d;
  color: white;
}

/* Security */
.security-options {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.security-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border: 2px solid #eee;
  border-radius: 10px;
}

.security-info h3 {
  margin-bottom: 0.5rem;
  color: #333;
}

.security-info p {
  color: #666;
  font-size: 0.9rem;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #dc3545;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Notifications */
.notifications-form {
  max-width: 500px;
}

.notification-group {
  margin-bottom: 2rem;
}

.notification-group h3 {
  margin-bottom: 1rem;
  color: #333;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eee;
}

.notification-item {
  margin-bottom: 1rem;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
}

.modal-header h2 {
  color: #333;
  margin: 0;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.3s;
}

.close-modal:hover {
  background: #f8f9fa;
}

.modal form {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Responsive Design for Auth and Profile */
@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    margin: 0 1rem;
  }

  .auth-benefits,
  .auth-welcome {
    order: -1;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .profile-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .profile-sidebar {
    order: 1;
  }

  .profile-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

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

  .addresses-grid {
    grid-template-columns: 1fr;
  }

  .wishlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }
}

@media (max-width: 480px) {
  .auth-form-container,
  .auth-benefits,
  .auth-welcome {
    padding: 2rem;
  }

  .social-buttons {
    gap: 0.5rem;
  }

  .social-btn {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  .user-info {
    padding: 0.25rem 0.5rem;
  }

  .user-name {
    display: none;
  }

  .profile-card {
    padding: 1.5rem;
  }

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

  .form-actions {
    flex-direction: column;
  }

  .modal-actions {
    flex-direction: column;
  }
}
