#search-results {
    position: absolute;
    z-index: 9999;
    background: #fff;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin-top: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    font-family: 'Arial', sans-serif;
}

.result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    text-decoration: none;
    color: #000;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.2s ease;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background: #f9f9f9;
}

.result-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-right: 16px;
    background: #fff;
}

.result-text {
    flex: 1;
    margin-left: 10px;
}

.result-text .title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    display: block;
}

.result-text .desc {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

.result-price {
    text-align: right;
    font-size: 14px;
    min-width: 130px;
}

.result-price .sale {
    font-weight: 600;
    color: #222;
    display: inline-block;
}

.result-price .mrp {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-left: 6px;
}

.result-price .discount {
    display: block;
    color: #388e3c;
    font-size: 13px;
    margin-top: 2px;
    font-weight: 500;
}

.result-action .add-to-cart {
    background-color: transparent;
    color: #e53935;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-top: 6px;
}
.search-input-wrapper {
    position: relative;
}

.ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-height: 400px;
    overflow-y: auto;
}
/* ---------- MOBILE VIEW (Max 768px) ---------- */
@media only screen and (max-width: 768px) {
  .result-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .result-item img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .result-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .result-text .title {
    font-weight: 600;
    font-size: 14px;
    color: #222;
    line-height: 1.4;
    margin-bottom: 4px;
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* show max 2 lines */
    -webkit-box-orient: vertical;
  }

  .result-text .desc {
    font-size: 12px;
    color: #666;
    word-wrap: break-word;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1; /* max 1 line for desc */
    -webkit-box-orient: vertical;
  }

  .result-price,
  .add-to-cart-btn,
  .mrp-price,
  .discount-tag {
    display: none !important;
  }
}
.call-pharmacist-btn,
.whatsapp-btn {
  display: inline-block;
  margin: 10px 6px 0;
  padding: 10px 16px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.3s ease;
  white-space: nowrap;
  color: #fff !important;       /* ✅ Always white text */
}

/* Call Button States */
.call-pharmacist-btn {
  background: #007bff;
}

.call-pharmacist-btn:hover,
.call-pharmacist-btn:focus,
.call-pharmacist-btn:active {
  background-color: #0056b3;
  color: #fff !important;       /* ✅ Force white on all states */
}

/* WhatsApp Button States */
.whatsapp-btn {
  background: #25D366;
}

.whatsapp-btn:hover,
.whatsapp-btn:focus,
.whatsapp-btn:active {
  background-color: #1DA851;
  color: #fff !important;       /* ✅ Force white on all states */
}

/* ✅ Responsive for Mobile */
@media only screen and (max-width: 768px) {
  .no-results-msg {
    padding: 14px 12px;
    font-size: 13px;
  }

  .call-pharmacist-btn,
  .whatsapp-btn {
    display: block;
    width: 100%;
    margin: 10px 0;
    text-align: center;
    font-size: 15px;
    color: #fff !important;     /* ✅ White text on mobile too */
  }
}
