* {
  /* margin: 0;
  padding: 0; */
  box-sizing: border-box;
  /* font-family: Arial, sans-serif; */
  /* font-family: 'Poppins', sans-serif !important; */
}

body {
  background: url('../images/5555.jpg') no-repeat center center fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  /* background: #005f60;
  box-shadow: 0 2px 5px rgba(44, 2, 52, 0.1); */
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  /* position: sticky; */
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.logo img {
  height: 50px;
  top: 6px;
}

.menu-icon {
  font-size: 35px;
  cursor: pointer;
  padding: 10px;
  color: #a7358c;
}

.pharma-wrapper {
  max-width: 1000px;
  margin: 20px auto;
  /* background: #f4ecff42; */
  background-color: #f4ecff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 1.05);
}

.pharma-wrapper h2 {
  text-align: center;
  color: #a7358c;
  margin-bottom: 15px;
}

.search-box {
  text-align: right;
  margin-bottom: 15px;
}

#searchInput {
  padding: 8px;
  width: 100%;
  max-width: 280px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.pharma-table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
}

.pharma-table th,
.pharma-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
  font-size: 0.95rem;
}

.pharma-table th {
  background: #a7358c;
  color: white;
}

.action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  /* space between icons */
  height: 100%;
}

.action-buttons button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-buttons img {
  width: 24px;
  height: 24px;
  display: block;
}

/* .view-btn,
    .share-btn {
      padding: 5px 10px;
      background: #a7358c;
      color: white;
      border: none;
      border-radius: 20px;
      cursor: pointer;
      font-size: 0.85rem;
      margin-right: 5px;
    }

    .share-btn img {
      width: 16px;
      vertical-align: middle;
    } */

/* View button */
.view-btn {
  padding: 6px 14px;
  background-size: 20px;

  background-color: transparent;
  /* background: #a7358c; */
  /* color: white; */
  border: none;
  border-radius: 20px;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
}

.view-btn img {
  width: 24px;
  height: 24px;
}

/* Share icon button */
.share-btn {
  background: none;
  border: none;
  padding: 0px;
  margin: 0px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.share-btn img {
  width: 20px;
  height: 20px;
  /* display: block; */
}

.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.image-modal img {
  max-width: 90%;
  max-height: 90%;
  display: block;
  margin: auto;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .pharma-table {
    font-size: 0.85rem;
  }

  .action-buttons {
    justify-content: flex-start;
    /* flex-wrap: wrap; */
    gap: 4px;
  }

  .view-btn {
    padding: 5px 10px;
  }

  .pharma-table td,
  .pharma-table th {
    padding: 8px 2px;
  }
}

@media (max-width: 768px) {

  .pharma-table th,
  .pharma-table td {
    font-size: 0.85rem;
    /* padding: 6px; */
  }

  .pharma-wrapper {
    padding: 15px 7px;
    /* table adjustment*/
  }
}

/* Side bar css  */
.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 260px;
  height: 100vh;
  font-family: 'poppins';
  font-weight: bold;
  background: linear-gradient(180deg, #f8f0f9, #f3d9ec);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
  z-index: 1100;
  padding: 1rem;
  overflow-y: auto;
  transition: right 0.4s ease, transform 0.4s ease;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.sidebar.open {
  right: 0;
  transform: translateX(0);
}

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

.sidebar-logo {
  height: 40px;
}

.close-btn {
  background: #a7358c;
  border: none;
  color: #fff;
  padding: 6px 10px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.close-btn:hover {
  background: #f3d9ec;
  color: #a7358c;
  transform: scale(1.1);
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0.2rem 0;
}

.sidebar-menu li {
  margin: 0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.sidebar-menu li:nth-child(odd) {
  background: rgba(167, 53, 140, 0.07);
}

.sidebar-menu li:nth-child(even) {
  background: rgba(255, 255, 255, 0.4);
}

.sidebar-menu li:hover {
  background: rgba(167, 53, 140, 0.2);
  transform: translateX(4px);
}

.sidebar-menu li a {
  text-decoration: none;
  color: #5c2a57;
  font-size: 15px;
  display: block;
  padding: 4px 10px;
}

.sidebar-menu li a:hover {
  color: #a7358c;
}

.sidebar-contact {
  font-size: 15px;
  color: #5c2a57;
  margin-top: 1rem;
}

.sidebar-contact a {
  color: #5c2a57;
  text-decoration: none;
}

.sidebar-contact a:hover {
  text-decoration: underline;
}

.sidebar hr {
  border: none;
  /* border-top: 1px solid #ccc; */
  border-top: 3px solid #797979;
  margin: 0.8rem 0;
}

@media (max-width: 768px) {
  .sidebar {
    width: 220px;
    padding: 0.8rem;
  }

  .sidebar-menu li a {
    font-size: 15px;
    /* padding: 4px 6px; */
    padding: 8px 7px 8px 6px;
  }

  .close-btn {
    font-size: 14px;
    padding: 5px 8px;
  }

  .sidebar-logo {
    height: 32px;
  }
}

/* table row effectt */
.pharma-table tbody tr {
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.pharma-table tbody tr:hover {
  background-color: #f2e7fc;
  /* light purple background on hover */
  transform: scale(1.01);
  /* slight zoom effect */
  box-shadow: 0 2px 10px rgba(128, 0, 128, 0.15);
  /* soft shadow */
  z-index: 1;
  position: relative;
}

.pharma-table tbody tr:nth-child(odd) {
  background-color: #f8f4fc;
  /* Light lavender */
}

.pharma-table tbody tr:nth-child(even) {
  background-color: #eae2f8;
  /* Slightly darker lavender */
}

/* table row effectt */




/* Close button of popup */

.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
}

.image-modal img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.close-popup-btn {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 28px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  z-index: 2100;
  transition: transform 0.2s ease;
}

.close-popup-btn:hover {
  transform: scale(1.2);
  color: #f8c;
}

/* Mobile & Tablet adjustments */
@media (max-width: 768px) {
  .close-popup-btn {
    font-size: 35px;
    top: 20px;
    right: 18px;
  }

  .image-modal img {
    max-width: 95%;
    max-height: 70vh;
  }
}



body.modal-open {
      overflow: hidden;
      position: fixed;
      width: 100%;
    }

    /* Fullscreen overlay */
    .image-modal {
      position: fixed;
      inset: 0;
      display: none; /* toggled in JS */
      z-index: 2000;
      background: rgba(0, 0, 0, 0.78);
      padding: max(16px, env(safe-area-inset-top)) 10px max(16px, env(safe-area-inset-bottom)) 10px;
      box-sizing: border-box;
      grid-template-rows: 1fr auto; /* image area + buttons row */
    }

    .image-modal[aria-hidden="false"] {
      display: grid;
    }

    .image-modal-inner {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: stretch;
      max-width: 520px;
      width: 100%;
      margin: 0 auto;
      gap: 10px;
    }

    /* Image container – no scroll inside */
    .image-modal-img-wrap {
      background: #ffffff;
      border-radius: 14px;
      padding: 10px;
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Image scales to fit viewport (full visible, no scroll) */
    .image-modal-img-wrap img {
      max-width: 100%;
      max-height: calc(100dvh - 180px); /* space for buttons & paddings */
      width: auto;
      height: auto;
      display: block;
      object-fit: contain;
    }

    /* Buttons row under image */
    .image-modal-actions {
      display: flex;
      justify-content: center;
      gap: 12px;
      flex-wrap: wrap;
      padding-top: 4px;
    }

    .image-modal-actions button {
      min-width: 120px;
      padding: 9px 16px;
      border-radius: 999px;
      border: none;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
      transition: transform 0.12s ease, filter 0.12s ease;
    }

    /* Nevil-ish colors: deep blue primary, softer gray secondary */
    .image-modal-actions .btn-close {
      background: #ffffff;
      color: #1b3552;
      border: 1px solid rgba(0, 0, 0, 0.12);
    }

    .image-modal-actions .btn-share {
      background: linear-gradient(135deg, #184b8f, #1f7ac8);
      color: #ffffff;
    }

    .image-modal-actions button:active {
      transform: translateY(1px);
      filter: brightness(0.96);
    }

    /* Ensure everything works at 320px too */
    @media (max-width: 480px) {
      .image-modal-inner {
        max-width: 100%;
      }

      .image-modal-actions button {
        flex: 1 1 45%;
        min-width: 0;
      }
    }

    @media (max-width: 360px) {
      .image-modal-actions {
        flex-direction: column;
        align-items: stretch;
      }

      .image-modal-actions button {
        width: 100%;
      }
    }