/* General Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
}

/* Header Styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #333;
  color: white;
  padding: 15px 30px;
}

header .logo h1 {
  font-size: 24px;
}

header nav ul {
  list-style-type: none;
  display: flex;
  gap: 20px;
}

header nav ul li a {
  text-decoration: none;
  color: white;
  font-size: 16px;
}

/* Hero Section */
.hero {
  text-align: center;
  background-color: #ff9900;
  padding: 50px;
  color: white;
}

.hero h2 {
  font-size: 36px;
}

.hero button {
  background-color: #333;
  color: white;
  padding: 10px 20px;
  border: none;
  cursor: pointer;
}

/* Categories Section */
.categories {
  padding: 50px 30px;
  text-align: center;
}

.categories h2 {
  font-size: 28px;
  margin-bottom: 30px;
}

.category-list {
  display: flex;
  justify-content: space-around;
}

.category {
  text-align: center;
}

.category img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

.category p {
  font-size: 18px;
  margin-top: 10px;
}

/* Featured Products Section */
.featured-products {
  padding: 50px 30px;
  background-color: #fff;
}

.featured-products h2 {
  font-size: 28px;
  text-align: center;
  margin-bottom: 30px;
}

.product-list {
  display: flex;
  justify-content: space-around;
}

.product-card {
  background-color: #f1f1f1;
  padding: 15px;
  width: 250px;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
}

.product-card p {
  font-size: 18px;
  margin-top: 10px;
}

.product-card button {
  background-color: #333;
  color: white;
  border: none;
  padding: 10px;
  margin-top: 10px;
  cursor: pointer;
}

/* Footer Styles */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 30px;
}

footer a {
  text-decoration: none;
  color: white;
  margin: 0 15px;
}

footer p {
  font-size: 14px;
  margin-top: 10px;
}

/* Navigation Styles */
nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin-right: 20px;
  position: relative;
}

nav a {
  text-decoration: none;
  color: #333;
  font-size: 18px;
  padding: 10px 15px;
  display: block;
}

/* Categories Dropdown Styles */
.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  min-width: 160px;
  z-index: 1;
  padding: 10px 0;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
  opacity: 1;
}

.dropdown-content a {
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover > a {
  background-color: #f1f1f1;
}

/* Profile Info Section */
.profile-info {
  padding: 15px;
  text-align: center;
}

.profile-info .profile-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.profile-info p {
  margin: 5px 0;
  color: #333;
}

.logout-btn {
  background-color: red;
  color: white;
  padding: 10px 15px;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: center;
  margin-top: 10px;
}

.logout-btn:hover {
  background-color: darkred;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 9999; /* Ensure it is above other content */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dark background */
  display: none;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-out;
}

/* Fade in animation for smooth transition */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Modal content box */
.modal-content {
  background-color: #fff;
  border-radius: 8px;
  width: 400px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideIn 0.5s ease-out;
}

/* Slide-in animation */
@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal header */
.modal-header {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}

/* Input fields styling */
.modal input {
  width: 100%;
  padding: 12px 15px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid #ddd;
  font-size: 16px;
  box-sizing: border-box;
  transition: all 0.3s ease;
}

/* Input fields focus effect */
.modal input:focus {
  border-color: #4CAF50;
  outline: none;
}

/* Button styling */
.modal button {
  background-color: #4CAF50;
  color: white;
  padding: 12px 15px;
  border: none;
  cursor: pointer;
  width: 100%;
  font-size: 16px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

/* Button hover effect */
.modal button:hover {
  background-color: #45a049;
}

/* Forgot password link */
.modal a {
  display: block;
  margin-top: 15px;
  text-align: center;
  color: #4CAF50;
  text-decoration: none;
  font-size: 14px;
}

.modal a:hover {
  text-decoration: underline;
}

/* Checkbox and label */
.modal .checkbox-label {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

/* Close button (×) styling */
.modal .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal .close-btn:hover {
  color: #333;
}

/* Responsive for smaller screens */
@media (max-width: 480px) {
  .modal-content {
    width: 90%;
    padding: 20px;
  }
  
  .modal-header {
    font-size: 24px;
  }

  .modal input, .modal button {
    font-size: 14px;
    padding: 10px 12px;
  }
}


/* Carousel Styles */
.featured-products {
  text-align: center;
  margin-top: 20px;
}

.product-carousel {
  position: relative;
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  animation: scroll 10s linear infinite;
}

.carousel-item {
  min-width: 25%;
  margin: 0 10px;
  text-align: center;
}

.carousel-item img {
  width: 100%;
  height: auto;
}

.carousel-item p {
  margin-top: 10px;
  font-size: 16px;
}

@keyframes scroll {
  0% {
      transform: translateX(0);
  }
  100% {
      transform: translateX(-100%);
  }
}

/* Product Grid */
.other-products {
  margin-top: 40px;
  text-align: center;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  justify-items: center;
}

.product-item {
  border: 1px solid #ccc;
  padding: 10px;
  text-align: center;
  background-color: #f9f9f9;
}

.product-item img {
  max-width: 100%;
  height: auto;
}

.view-more {
  margin-left: 20px;
  font-size: 16px;
  color: #007bff;
  text-decoration: none;
  background-color: transparent;
  border: 1px solid #007bff;
  border-radius: 5px;
  padding: 5px 10px;
}

.view-more:hover {
  background-color: #007bff;
  color: white;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  header nav ul {
      gap: 10px;
  }

  .product-list {
      flex-wrap: wrap;
      justify-content: center;
  }

  .product-card {
      width: 220px;
  }

  .product-grid {
      grid-template-columns: repeat(3, 1fr);
  }

  .categories h2,
  .featured-products h2 {
      font-size: 24px;
  }
}

@media (max-width: 768px) {
  header {
      flex-direction: column;
      padding: 10px;
  }

  header .logo h1 {
      font-size: 20px;
  }

  header nav ul {
      flex-direction: column;
  }

  .hero {
      padding: 30px;
  }

  .hero h2 {
      font-size: 28px;
  }

  .categories h2 {
      font-size: 22px;
  }

  .product-card {
      width: 100%;
  }

  .product-grid {
      grid-template-columns: repeat(2, 1fr);
  }

  .modal-content {
      width: 80%;
  }
}

@media (max-width: 480px) {
  header .logo h1 {
      font-size: 18px;
  }

  header nav ul li a {
      font-size: 14px;
  }

  .hero h2 {
      font-size: 24px;
  }

  .product-card {
      width: 100%;
      margin-bottom: 20px;
  }

  .product-grid {
      grid-template-columns: 1fr;
  }

  .view-more {
      font-size: 14px;
  }
}
