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

body {
  font-family: "Georgia", serif;
  background: #f5f5f0;
  overflow-x: hidden;
}

/* Header Styles */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 20px 20px;
  background: #e8e8dc;
  border-bottom: 1px solid #d0d0c0;
  box-sizing: border-box;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: #2d5016;
}

nav {
  display: flex;
  gap: 120px;
  align-items: center;
  justify-content: space-between;
}

nav a {
  text-decoration: none;
  color: #333;
  font-size: 15px;
  transition: color 0.3s;
  position: relative;
}

nav a:hover {
  color: #5a8c2e;
}

/* Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px 0;
}

.dropdown-toggle i {
  font-size: 12px;
  transition: transform 0.3s;
}

.dropdown.active .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  padding: 25px;
  min-width: 800px;
  z-index: 1001;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  visibility: hidden;
}

.dropdown.active .dropdown-menu {
  display: block;
  opacity: 1;
  visibility: visible;
}

.dropdown-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.dropdown-category {
  display: flex;
  flex-direction: column;
}

.dropdown-category h4 {
  font-size: 14px;
  font-weight: 700;
  color: #2d5016;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #5a8c2e;
}

.dropdown-category a {
  padding: 8px 12px;
  font-size: 13px;
  color: #555;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s;
  display: block;
}

.dropdown-category a:hover {
  background: #f0f7eb;
  color: #2d5016;
  transform: translateX(4px);
}

.user-icon {
  background: #5a8c2e;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s;
}

.user-icon:hover {
  background: #4a7525;
  transform: scale(1.05);
}

/* Hero Section */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 500px;
  position: relative;
  margin-top: 75px;
}

.hero-content {
  padding: 80px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #e8e8dc;
}

.hero-content h1 {
  font-size: 52px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  margin-bottom: 25px;
}

.hero-content p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 35px;
  max-width: 450px;
}

.search-container {
  position: relative;
  max-width: 500px;
}

.search-input {
  width: 100%;
  padding: 15px 60px 15px 20px;
  border: 1px solid #c0c0b0;
  border-radius: 25px;
  font-size: 15px;
  background: white;
  outline: none;
}

.search-btn {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: #5a8c2e;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  transition: background 0.3s;
}

.search-btn:hover {
  background: #4a7525;
}

.hero-image {
  position: relative;
  overflow: visible;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

/* Best Selling Section */
.best-selling {
  padding: 60px 80px;
  background: #f5f5f0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 40px;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 50px;
}

.category-tab {
  padding: 12px 35px;
  background: #b8d4a0;
  border: none;
  border-radius: 25px;
  font-size: 15px;
  color: #2d5016;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.category-tab:hover,
.category-tab.active {
  background: #5a8c2e;
  color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.product-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s,
    box-shadow 0.3s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.product-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.product-rating {
  color: #ffc107;
  font-size: 14px;
  margin-bottom: 15px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-price {
  font-size: 16px;
  color: #333;
}

.add-to-cart {
  background: #2d5016;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background 0.3s;
}

.add-to-cart:hover {
  background: #1a3010;
}

/* Footer */
footer {
  background: #d4e5c3;
  padding: 50px 80px 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-brand h3 {
  font-size: 24px;
  color: #2d5016;
  margin-bottom: 15px;
}

.footer-brand p {
  color: #555;
  font-size: 14px;
  line-height: 1.6;
}

.footer-column h4 {
  font-size: 16px;
  color: #2d5016;
  margin-bottom: 20px;
  font-weight: 600;
}

.footer-column a {
  display: block;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.footer-column a:hover {
  color: #5a8c2e;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.social-icon:hover {
  color: #5a8c2e;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #b8d4a0;
  color: #666;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}

/* 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.6);
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 40px;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: slideIn 0.3s;
}

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

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  transition: color 0.3s;
}

.close:hover {
  color: #000;
}

/* Authentication Modal Styles */
.auth-modal-content {
  max-width: 450px;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e0e0e0;
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
}

.auth-tab.active {
  color: #5a8c2e;
  border-bottom-color: #5a8c2e;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  font-size: 24px;
  color: #1a1a1a;
  margin-bottom: 25px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #5a8c2e;
}

.auth-submit-btn {
  width: 100%;
  padding: 14px;
  background: #5a8c2e;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.auth-submit-btn:hover {
  background: #4a7525;
}

.auth-divider {
  text-align: center;
  margin: 25px 0;
  position: relative;
}

.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e0e0e0;
}

.auth-divider span {
  background: white;
  padding: 0 15px;
  color: #999;
  font-size: 14px;
  position: relative;
  z-index: 1;
}

.google-login-btn {
  width: 100%;
  padding: 14px;
  background: white;
  color: #333;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.google-login-btn:hover {
  border-color: #5a8c2e;
  background: #f9f9f9;
}

.google-login-btn i {
  font-size: 18px;
  color: #4285f4;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: #666;
}

.auth-switch a {
  color: #5a8c2e;
  text-decoration: none;
  font-weight: 600;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .hero-image {
    min-height: 400px;
  }

  .dropdown-menu {
    min-width: 600px;
  }

  .dropdown-categories {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  header,
  .hero-content,
  .best-selling,
  footer {
    padding-left: 30px;
    padding-right: 30px;
  }

  nav {
    gap: 30px;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .dropdown-menu {
    min-width: 90vw;
    left: 5vw;
    transform: none;
  }

  .dropdown-categories {
    grid-template-columns: 1fr;
  }
}
