@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
  --primary: #0aad0a;
  --primary-light: #cef2ce;
  --primary-hover: #09990a;
  --primary-dark: #008a00;
  --secondary: #ff6723;
  --light: #f8fff8;
  --dark: #1d3c1d;
  --gray: #f0f0f0;
  --text: #2c3e50;
  --text-light: #7d8a94;
  --border: #e2f5e2;
  --shadow: rgba(10, 173, 10, 0.1);
  --error: #e74c3c;
  --success: #0aad0a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header Styles */
header.shop-header {
  padding: 16px 24px;
  background-color: #e8f7e8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  position: relative;
  display: flex;
  align-items: center;
  height: 50px;
}
.logo img {
  max-height: 150px;
  transition: transform 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
}

.nav-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* Login/Signup Container */
.login-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f8fff8 0%, #e2f5e2 100%);
}

.login-section {
  background-color: white;
  width: 100%;
  max-width: 480px;
  padding: 40px 30px;
  border-radius: 16px;
  box-shadow: 0 15px 30px var(--shadow);
  text-align: left;
  animation: fadeIn 0.5s ease;
  position: relative;
  overflow: hidden;
}

.login-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(to right, var(--primary), var(--secondary));
}

h2 {
  font-size: 2.2em;
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-weight: 700;
}

.login-subtitle {
  color: var(--text-light);
  margin-bottom: 30px;
  font-size: 1.05em;
}

.input-group {
  margin-bottom: 24px;
  position: relative;
}

.input-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text);
  transition: all 0.3s ease;
}

.input-group input {
  width: 100%;
  padding: 16px;
  padding-left: 45px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: var(--light);
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
}

.input-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--shadow);
  outline: none;
}

.input-group::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 16px;
  top: 44px;
  color: var(--text-light);
  transition: all 0.3s ease;
}

.input-group:nth-of-type(1)::before {
  content: "\f0e0"; /* Email icon */
}

.input-group:nth-of-type(2)::before {
  content: "\f023"; /* Password icon */
}

.login-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(to right, var(--primary), var(--primary-dark));
  color: white;
  font-weight: 600;
  font-size: 1.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(10, 173, 10, 0.2);
  position: relative;
  overflow: hidden;
}

.login-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.5s ease;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(10, 173, 10, 0.3);
}

.login-btn:hover::before {
  left: 100%;
}

.login-btn:active {
  transform: translateY(-1px);
}

.login-btn .spinner {
  /* Spinner icon is typically inline-block by FontAwesome, so it should align well. */
  /* We can add specific styling if needed, e.g., color or size relative to button text */
}

.signup-prompt {
  text-align: center;
  margin-top: 28px;
  font-size: 1em;
  position: relative;
  padding-top: 20px;
}

.signup-prompt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 1px;
  background-color: var(--border);
}

.signup-prompt a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-left: 5px;
  transition: all 0.3s ease;
}

.signup-prompt a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.login-info {
  margin-top: 25px;
  padding: 15px;
  background-color: var(--primary-light);
  border-radius: 8px;
  color: var(--primary-dark);
  font-size: 0.9em;
}

/* Form validation styles */
.input-group.error input {
  border-color: var(--error);
}

.input-group .error-message {
  color: var(--error);
  font-size: 0.85em;
  margin-top: 5px;
  display: none;
}

.input-group.error .error-message {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Footer Styles */
footer {
  background-color: white;
  padding: 40px 20px;
  font-size: 0.9em;
  color: var(--text-light);
  box-shadow: 0 -2px 10px var(--shadow);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.footer-info p {
  margin-bottom: 10px;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-icon:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.social-icon img {
  width: 20px;
  height: 20px;
}

.footer-copyright {
  margin-top: 20px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

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

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

/* Success message */
.success-message {
  background-color: rgba(10, 173, 10, 0.1);
  color: var(--success);
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: center;
  display: none;
  animation: fadeIn 0.5s ease;
}


/* Responsive Design */
@media (max-width: 768px) {
  header.shop-header {
    flex-direction: column;
    gap: 15px;
    padding: 15px;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .search-container {
    order: 3;
    width: 100%;
    margin-top: 10px;
  }

  .search-bar {
    width: 100%;
  }

  .search-bar:focus {
    width: 100%;
  }

  .login-section {
    padding: 30px 20px;
  }

  h2 {
    font-size: 1.8em;
  }

  .login-subtitle {
    font-size: 1em;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .account-btn span, .cart-link span {
    display: none;
  }

  .account-btn, .cart-link {
    padding: 10px;
  }

  .login-section {
    padding: 25px 15px;
  }

  .input-group input {
    padding: 14px;
    padding-left: 40px;
  }

  .input-group::before {
    top: 42px;
  }
}
/* Add these styles to your login-signup.css file */

.error-message {
  color: #e74c3c;
  font-size: 14px;
  margin-top: 5px;
  margin-bottom: 15px;
  display: none;
  padding: 8px 12px;
  background-color: rgba(231, 76, 60, 0.1);
  border-radius: 4px;
  border-left: 3px solid #e74c3c;
}

.success-message {
  color: #27ae60;
  font-size: 14px;
  margin-top: 10px;
  margin-bottom: 15px;
  display: none;
  padding: 8px 12px;
  background-color: rgba(39, 174, 96, 0.1);
  border-radius: 4px;
  border-left: 3px solid #27ae60;
}

.password-field {
  position: relative;
  width: 100%;
}

.password-field input {
  width: 100%;
}

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

/* Style for the account dropdown in the header */
.account-dropdown .dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  z-index: 1;
  border-radius: 4px;
  overflow: hidden;
}

.account-dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s;
}

.dropdown-content a:hover {
  background-color: #f9f9f9;
}