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

html {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding-top: 60px; /* prevent content hiding under navbar */
  font-family: Arial, sans-serif;
  line-height: 1.6;
  background: #f9fbfd;
  color: #333;
}

main {
  flex: 1;
}

.hamburger {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

h1 {
  color: white;
  font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande",
    "Lucida Sans", Arial, sans-serif;
}

/* Navbar */
header {
  background: #0077b6;
  padding: 10px 20px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

.greeting-text {
  color: white;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: medium;
}

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

.nav-links a {
  display: inline-flex;
  font-size: large;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  flex-direction: row;
  align-items: center;
  margin: 0 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 500;
}

.nav-links .btn {
  background: none;
  border: none;
  color: #fff;
  font-size: large;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  padding: 6px 12px;
}

.nav-links .btn:hover {
  color: black;
}

/* Search Section */
#searchContainer {
  text-align: center;
  padding: 40px 20px;
  background: #e0f7fa;
}

.search-header h2 {
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
  font-size: xx-large;
  color: #333;
}

.upload-link {
  text-align: center;
  margin: 20px;
}

.upload-link span {
  font-size: large;
  font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif;
}

.upload-link .btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: #103254;
  margin-left: 10px;
}

.file-name {
  margin-top: 10px;
  font-size: 14px;
  color: #333;
  font-style: italic;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
  gap: 20px;
}

.search-bar .btn {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 30px;
  background-color: #0b9b8a;
  color: white;
  border: none;
  cursor: pointer;
}

.search-input-wrapper {
  position: relative;
  width: 400px;
}

#searchMed {
  width: 100%;
  max-width: 600px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
}

.suggestion-box {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.suggestion-box li {
  padding: 10px;
  border-bottom: 1px solid #eee;
}

.suggestion-box li:hover {
  background-color: #f0f0f0;
  cursor: pointer;
}

/* Medicine Cards */
#featured-medicines {
  padding: 40px 20px;
  text-align: center;
}

#featured-medicines h3 {
  color: #023e8a;
  font-size: 30px;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.medicine-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.medicine-card {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.medicine-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
}

.medicine-card .btn {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.medicine-card:hover {
  transform: translateY(-5px);
}

/* Category Section */
#categories {
  padding: 40px 20px;
  text-align: center;
  background: #f1f1f1;
}

#categories h3 {
  color: #023e8a;
  font-size: 30px;
  font-family: Georgia, "Times New Roman", Times, serif;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.category-card {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.category-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.category-card:hover {
  transform: scale(1.05);
}

/* Why Choose Us */
#why-choose-us {
  padding: 40px 20px;
  text-align: center;
}

#why-choose-us h3 {
  color: #023e8a;
  font-size: 30px;
  font-family: Georgia, "Times New Roman", Times, serif;
}

#why-choose-us ul {
  list-style: none;
  margin-top: 20px;
}

#why-choose-us li {
  margin: 10px 0;
  font-size: 18px;
}

/* Footer */
footer {
  background: #0077b6;
  color: #fff;
  text-align: center;
  padding: 20px;
}

.footer-links {
  margin-bottom: 10px;
}

.footer-links a {
  margin: 0 10px;
  color: #fff;
  text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    padding: 15px;
    border-radius: 0 0 6px 6px;
  }

  .nav-links a,
  .nav-links .btn {
    color: #333;
    margin: 10px 0;
  }

  .nav-links .btn {
    margin-left: 0;
    padding: 0;
  }

  .hamburger {
    display: block;
  }

  .nav-links.show {
    display: flex;
  }
}
