@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary: #2a7f62;
  --secondary: #f8f9fa;
  --accent: #ff7e33;
  --text: #333333;
  --light-text: #6c757d;
  --mainBlue: #2a7fba;
  --primaryGradient: linear-gradient(
    45deg,
    rgba(42, 127, 98, 0.8) 0%,
    rgba(25, 60, 48, 0.6) 100%
  );
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: var(--text);
  line-height: 1.6;
}

header {
  background-color: var(--primary);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.address {
  font-size: 0.9rem;
}

.superintendent {
  font-style: italic;
  font-size: 0.85rem;
}

.logo-section {
  text-align: center;
  padding: 2rem;
  background-color: white;
  margin-bottom: 1rem;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.logo-section h1 {
  color: var(--primary);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.logo-section p {
  color: var(--light-text);
  font-size: 1.1rem;
}

.phone {
  color: white;
  font-weight: bold;
  margin-top: 0.5rem;
}

.search-bar {
  background-color: white;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.home-search-bar {
  margin-bottom: 0;
}

.search-container {
  display: flex;
  width: 70%;
}

.search-container input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px 0 0 4px;
  font-size: 1rem;
}

.search-container button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0 1.5rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-container button:hover {
  background-color: #1e6b52;
}

.nav-logout-btn {
  background-color: white;
  color: var(--primary);
  font-size: 1rem;
  font-weight: 600;
  margin-left: 1rem;
  border: none;
  transition: color 0.3s;
}

.account-actions {
  display: flex;
  align-items: center;
}

.account-actions a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  margin-left: 1rem;
  transition: color 0.3s;
}

.account-actions a:hover {
  color: var(--accent);
}

.products-grid {
  display: flex;
  width: 100%;
  margin: 0 auto;
  justify-content: flex-start;
  gap: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.product-card {
  background-color: white;
  border-radius: 8px;
  width: 19%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 15px;
}

.product-image img {
  height: auto;
  width: 80%;
  padding: 2rem;
}

.product-details {
  padding: 1.2rem;
}

.product-title {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.product-description {
  color: var(--light-text);
  font-size: 0.7rem;
  margin-bottom: 0.3rem;
  min-height: 40px;
}

.product-price {
  font-weight: bold;
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.add-to-cart {
  width: 100%;
  padding: 0.7rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.3s;
}

.add-to-cart:hover {
  background-color: #e66a22;
}

.cart_container {
  position: relative;
}

.cart_container span {
  position: absolute;
  top: -10px;
  right: -14px;
  background-color: #ff5100;
  color: white;
  padding: 1px 4px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 25px;
  height: auto;
  font-size: small;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 20px;
}

.pagination-controls a {
  padding: 8px 16px;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
}

.pagination-controls a.disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  pointer-events: none;
}

.hero {
  width: 100%;
  min-height: 80vh;
  background: var(--primaryGradient), url("images/pharmaxy.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  margin-top: 20px;
}

.hero-content {
  max-width: 600px;
  text-align: center;
  width: 45%;
}

.hero h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.partners-section {
  background: white;
  padding: 80px 0;
  text-align: center;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-header {
  text-align: center;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 15px;
  font-weight: 700;
}

.section-header .subheading {
  font-size: 1.1rem;
  color: var(--primary);
  max-width: 600px;
  margin: 0 auto 50px;
  line-height: 1.6;
}

.partners-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.partners-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
  text-align: left;
}

.partner-name {
  font-size: 1.1rem;
  color: #2d3748;
  padding: 18px 25px;
  background: #f8fafc;
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.partner-name:hover {
  background: #ebf8ff;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* CSS for the certificate container */
.certificate-container {
  padding: 40px 0;
  text-align: center;
  margin: 30px 0;
  min-height: 80vh;
  /* background: linear-gradient(to right, #f46b45, #eea849); */
}

.certificate-container h2 {
  font-size: 2.2rem;
  font-weight: 700;
}

.certificate-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 20px;
}

.certificate-item {
  max-width: 300px;
}

.certificate-thumbnail {
  max-width: 100%;
  border: 3px solid #ddd;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
}

.certificate-thumbnail:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.caption {
  margin-top: 10px;
  font-style: italic;
  color: grey;
}

/* CSS for the modal overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: auto;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90%;
  margin-top: 50px;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0.5);
  }
  to {
    transform: scale(1);
  }
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover {
  color: #bbb;
}

/* Loading spinner */
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20% auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Happy Customers Section Styles */
.happy-customers-section {
  background: var(--primary);
  padding: 80px 0;
  color: white;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  color: white !important;
}

.section-subtitle {
  color: white !important;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 30px;
  text-align: left;
  transition: transform 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-10px);
}

.rating {
  color: #ffd700;
  font-size: 1.2rem;
  margin-bottom: 15px;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 25px;
  line-height: 1.6;
}

.customer-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.customer-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

.customer-name {
  margin: 0;
  font-size: 1.1rem;
}

.customer-title {
  margin: 0;
  opacity: 0.8;
  font-size: 0.9rem;
}

.stats-container {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.stat-item {
  background: rgba(255, 255, 255, 0.15);
  padding: 20px 30px;
  border-radius: 10px;
  min-width: 150px;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Contact Section Styles */
.contact-section {
  background: white;
  padding: 80px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.info-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.info-icon {
  width: 50px;
  height: 50px;
  background: #ebf8ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.info-icon svg {
  width: 24px;
  height: 24px;
}

.info-content h3 {
  font-size: 1.2rem;
  color: #2a4365;
  margin-bottom: 5px;
}

.info-content p {
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

.contact-form {
  background: #f8fafc;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-form h3 {
  font-size: 1.3rem;
  color: #2a4365;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
  width: 100%;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4299e1;
}

.form-group textarea {
  resize: vertical;
}

.submit-btn {
  background: var(--accent);
  color: white;
  border: none;
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease-in;
  transition-property: "background-color";
}

.submit-btn:hover {
  background: var(--primary);
}

.custom-alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.custom-alert-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  width: 90%;
  position: relative;
}

.custom-alert-progress {
  height: 4px;
  background: #ddd;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.custom-alert-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 100%;
  transition: width linear;
}

.custom-alert-title {
  font-size: 1.2em;
  margin-bottom: 15px;
  font-weight: bold;
}

.custom-alert-buttons {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.custom-alert-button {
  padding: 8px 16px;
  margin-left: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.custom-alert-ok {
  background-color: var(--primary);
  color: white;
}

.to-store {
  background-color: white;
  display: flex;
  padding: 1rem 2rem;
  margin-bottom: 1.2rem;
  border-top: 1px solid #ddd;
  justify-content: center;
  gap: 1rem;
}

.cta-button {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(90deg, #2a7f62, #3a9f7a, #2a7f62);
  background-size: 200% auto;
  color: white;
  font-family: "Arial", sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.5s ease;
  animation: gradientWave 3s ease infinite;
}

/* .cta-cart {
  background: linear-gradient(90deg, #ff7e33, #fd8037, #e97532);
} */

@keyframes gradientWave {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  animation: gradientWave 1.5s ease infinite; /* Faster wave on hover */
}

.cta-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Minimal Footer Styles */
.pharmacy-footer {
  background: #2a7f62;
  padding: 30px 0;
  border-top: 1px solid #f0f0f0;
  font-size: 14px;
  color: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 15px;
}

.pharmacy-info h3 {
  color: white;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.pharmacy-info p {
  margin: 5px 0;
  line-height: 1.5;
}

.copyright {
  margin-top: 10px;
}

@media screen and (max-width: 768px) {
  header {
    flex-direction: column;
    justify-content: center;
  }

  .address {
    font-size: 0.9rem;
    text-align: center;
  }

  .logo-section {
    padding: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .logo-section h1 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }

  .logo-section p {
    color: var(--light-text);
    font-size: 1rem;
  }

  .search-bar {
    background-color: white;
    padding: 1.5rem 0.5rem;
    flex-direction: column-reverse;
    gap: 1rem;
  }

  .search-container {
    display: flex;
    width: 100%;
  }

  .products-grid {
    justify-content: center;
    flex-direction: column;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .product-card {
    width: 100%;
  }

  .hero {
    width: 100%;
    min-height: 60vh;
    background: var(--primaryGradient), url("images/pharmaxy.jpg");
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 0 0.5rem;
    color: white;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    margin-top: 20px;
  }

  .hero-content {
    max-width: 100%;
    text-align: center;
    width: 100%;
  }

  .hero h2 {
    font-size: 2rem;
    margin-bottom: 0.8rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }

  .section-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
  }

  .section-header .subheading {
    font-size: 0.9rem;
    color: var(--primary);
    max-width: 600px;
    margin: 0 auto 50px;
    line-height: 1.6;
  }

  .partners-grid {
    display: flex;
    justify-content: center;
    flex-direction: column;
    gap: 1;
  }

  .partners-section {
    padding: 40px 0;
  }

  .certificate-container {
    padding: 40px 0;
    margin-top: 0;
  }

  .happy-customers-section {
    padding: 40px 0;
  }

  .contact-section {
    padding: 40px 0;
  }

  .contact-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .contact-form {
    padding: 30px 10px;
  }

  .product-image img {
    height: auto;
    width: 70%;
    padding: 2rem;
  }
}
