.shop-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr)); /* 2 per row, but cards won't shrink below 150px */
  gap: 1rem; /* spacing between cards */
  padding: 1rem;
  justify-content: center; /* center the grid */
}

/* Tablet (≥768px) → 3 per row */
@media (min-width: 768px) {
  .shop-container {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
    gap: 1.5rem;
  }
}

/* Desktop (≥1024px) → 4 per row */
@media (min-width: 1024px) {
  .shop-container {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 2rem;
  }
}

.medicine-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
  padding: 1rem;
  text-align: center;
  max-width: 250px;   /* keeps them from being too wide */
  margin: auto;       /* centers each card */
}


.medicine-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* Images */
.medicine-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

/* Title */
.medicine-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937; /* gray-800 */
  margin-bottom: 0.5rem;
  min-height: 2.5rem; /* keeps card height consistent */
}

/* Price */
.price {
  font-size: 1.2rem;
  font-weight: bold;
  color: #1d4ed8; /* premium blue */
  margin-bottom: 1rem;
}

/* Buttons shared base */
.medicine-card button {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}

/* Order Now button */
.medicine-card button:first-of-type {
  background: #1d4ed8; /* blue */
  color: white;
  margin-bottom: 0.6rem;
  border: none;
}

.medicine-card button:first-of-type:hover {
  background: #1e40af; /* darker blue */
  transform: translateY(-2px);
}

/* Add to Cart button */
.medicine-card .add-to-cart {
  background: #f3f4f6; /* gray */
  color: #374151; /* gray-700 */
  border: 1px solid #e5e7eb;
}

.medicine-card .add-to-cart:hover {
  background: #e0e7ff; /* light indigo */
  color: #1d4ed8; /* blue */
  transform: translateY(-2px);
}
.custom-cart-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 400px;
    width: 90%;
  }
  
  .popup-content {
    position: relative;
  }
  
  .close-popup {
    position: absolute;
    top: -10px;
    right: -0.4px;
    cursor: pointer;
    font-size: 20px;
  }
  
  .popup-details {
    display: flex;
    gap: 15px;
    margin: 15px 0;
  }
  
  .popup-details img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
  }
  
  .popup-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
  }
  
  .popup-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .popup-buttons button:first-child {
    background: #007bff;
    color: white;
  }
  
  .popup-buttons button:last-child {
    background: #f8f9fa;
    border: 1px solid #ddd;
  }
  /* Add this CSS for the stylish link effects */
.nav-link-mobile {
  position: relative;
  transition: color 0.3s ease-in-out;
  letter-spacing: 0.05em;
}

.nav-link-mobile::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 0;
  height: 2px;
  background-color: #3b82f6; /* A nice blue color */
  transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}

.nav-link-mobile:hover {
  color: #3b82f6;
}

.nav-link-mobile:hover::after {
  width: 100%;
  left: 0;

}