/* ===== VPharmacy UI polish (alignment, forms, WhatsApp widget, mobile) ===== */
html { scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; }
.section-header h2, .features-section-header h2 { line-height: 1.2; }

/* Section pills sit centred above centred headings */
.section-label-pill:has(+ .section-header),
.section-label-pill:has(+ .features-section-header) {
  display: flex; width: fit-content; margin-left: auto; margin-right: auto;
}

/* ---------- Page layouts: keep everything inside the container ---------- */
.page-content-wrap { padding: 48px 24px 80px; }
.pane-layout-two-col {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px;
  align-items: start; width: 100%; max-width: 100%; margin: 0;
}
.pane-main, .pane-side { min-width: 0; width: 100%; margin: 0; }
.pane-side { position: sticky; top: 100px; }
.pane-card { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.pane-card-header { display: flex; gap: 16px; align-items: flex-start; }
.pane-card-header h2 { line-height: 1.2; margin-bottom: 6px; }
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 28px;
  align-items: start; width: 100%; max-width: 100%; margin: 0;
}
.contact-info, .contact-form-card-new { min-width: 0; width: 100%; margin: 0; }
.contact-info { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin-bottom: 22px; }
.form-group { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.form-grid .form-group { margin: 0; }
.form-group-full { grid-column: 1 / -1; }
.form-group label { font-size: 13.5px; font-weight: 600; color: #334155; margin: 0; }
.form-group label .vp-opt { font-weight: 500; color: #94a3b8; }
.form-control {
  width: 100%; min-height: 50px; padding: 13px 16px; border: 1.5px solid #e2e8f0;
  border-radius: 12px; background: #fff; font-size: 15px; color: #0f172a;
  transition: border-color .2s ease, box-shadow .2s ease; box-shadow: none;
}
textarea.form-control { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-control::placeholder { color: #94a3b8; }
.form-control:focus { outline: none; border-color: #0284c7; box-shadow: 0 0 0 4px rgba(2,132,199,.12); }
.prescription-upload-box { border-radius: 14px; }
#medicine-order-form button[type=submit],
.contact-form-card-new button[type=submit] { width: 100%; justify-content: center; }
.vp-form-error { display: none; margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13.5px; font-weight: 500; }
.vp-form-error.show { display: block; }
.vp-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 12px; color: #94a3b8; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.vp-or::before, .vp-or::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }
.vp-wa-order {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 14px 20px; border-radius: 50px; border: 2px solid rgba(37,211,102,.35);
  background: #f0fdf4; color: #128c7e; font-weight: 700; font-size: 15px; text-decoration: none;
  transition: all .25s ease;
}
.vp-wa-order:hover { background: #25d366; color: #fff; border-color: #25d366; }
.vp-wa-order ion-icon { font-size: 20px; }

/* Order steps */
.vp-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.vp-steps li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #f1f7fd; border: 1px solid #e0effa; font-size: 13px; font-weight: 600; color: #1e293b; line-height: 1.3; }
.vp-steps b { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg,#0284c7,#2563eb); color: #fff; font-size: 13px; }

/* Order success modal */
.vp-modal { position: fixed; inset: 0; z-index: 3000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); }
.vp-modal.show { display: flex; }
.vp-modal-box { width: 100%; max-width: 420px; background: #fff; border-radius: 22px; padding: 32px 26px 24px; text-align: center; box-shadow: 0 30px 80px rgba(15,23,42,.3); animation: vpPop .3s ease; }
@keyframes vpPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.vp-modal-ic { width: 68px; height: 68px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #16a34a; font-size: 36px; }
.vp-modal-box h3 { font-size: 22px; margin-bottom: 6px; color: #0f172a; }
.vp-modal-box p { color: #475569; font-size: 14.5px; line-height: 1.6; }
.vp-oid { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px 0; padding: 12px 16px; border: 1.5px dashed #93c5fd; border-radius: 12px; background: #eff6ff; font-weight: 700; color: #1d4ed8; font-size: 17px; }
.vp-oid button { border: 0; background: #2563eb; color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
.vp-modal-actions { display: grid; gap: 10px; margin-top: 8px; }
.vp-modal-actions .hero-btn-primary { justify-content: center; width: 100%; }
.vp-modal-close { margin-top: 6px; border: 0; background: none; color: #64748b; font-weight: 600; cursor: pointer; padding: 8px; }

/* ---------- Floating WhatsApp widget ---------- */
.vpw { position: fixed; right: 22px; bottom: 22px; z-index: 2500; font-family: var(--font-primary, Inter, sans-serif); }
.vpw-btn {
  position: relative; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer;
  background: #25d366; color: #fff; font-size: 32px; display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(37,211,102,.45); transition: transform .25s ease;
}
.vpw-btn:hover { transform: scale(1.07); }
.vpw-btn::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: vpwRing 2s ease-out infinite; }
@keyframes vpwRing { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.55); opacity: 0; } }
.vpw-badge { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; border-radius: 50%; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.vpw-tip { position: absolute; right: 72px; bottom: 12px; white-space: nowrap; background: #fff; color: #0f172a; font-size: 13px; font-weight: 600; padding: 9px 14px; border-radius: 12px; box-shadow: 0 8px 24px rgba(15,23,42,.15); }
.vpw.open .vpw-tip, .vpw.tip-hidden .vpw-tip { display: none; }
.vpw-card {
  position: absolute; right: 0; bottom: 76px; width: 330px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 60px rgba(15,23,42,.25);
  transform-origin: bottom right; transform: scale(.85) translateY(10px); opacity: 0; pointer-events: none;
  transition: all .25s ease;
}
.vpw.open .vpw-card { transform: none; opacity: 1; pointer-events: auto; }
.vpw-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(135deg,#075e54,#128c7e); color: #fff; }
.vpw-av { width: 42px; height: 42px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.vpw-av img { width: 34px; height: 34px; object-fit: contain; }
.vpw-head strong { display: block; font-size: 15px; }
.vpw-head span { display: flex; align-items: center; gap: 6px; font-size: 12px; opacity: .9; }
.vpw-head span i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; }
.vpw-x { margin-left: auto; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1; cursor: pointer; }
.vpw-body { padding: 16px; background: #efeae2; display: flex; flex-direction: column; gap: 8px; }
.vpw-bubble { align-self: flex-start; max-width: 90%; background: #fff; padding: 10px 13px; border-radius: 0 12px 12px 12px; font-size: 13.5px; color: #111827; box-shadow: 0 1px 1px rgba(0,0,0,.08); margin-bottom: 4px; }
.vpw-opt { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px; background: #fff; color: #075e54; font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid rgba(7,94,84,.12); transition: all .2s ease; }
.vpw-opt:hover { background: #dcf8c6; }
.vpw-opt ion-icon { font-size: 18px; }
.vpw-start { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 16px 16px; padding: 12px; border-radius: 50px; background: #25d366; color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }
body[data-view="admin"] .vpw, body[data-view="admin"] .vp-mbar { display: none; }

/* ---------- Mobile sticky action bar ---------- */
.vp-mbar { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .pane-layout-two-col { grid-template-columns: minmax(0, 1fr); }
  .pane-side { position: static; }
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .features-cta-row { flex-direction: column; text-align: center; }
  .features-cta-btns { flex-wrap: wrap; justify-content: center; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .section-header, .features-section-header { margin-bottom: 36px; }
  .section-header h2, .features-section-header h2 { font-size: 28px; }
  .section-header p, .features-section-header p { font-size: 15px; }
  .hero-content h1 { font-size: 36px; }
  .page-hero-banner { padding: 108px 0 36px; text-align: center; }
  .page-hero-banner h1 { font-size: 31px; }
  .page-hero-banner > .container > p { margin: 0 auto; font-size: 15px; }
  .page-content-wrap { padding: 28px 18px 110px; }

  .services-tab-bar { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; width: 100%; margin-bottom: 20px; }
  .services-tab { flex-direction: column; text-align: center; gap: 6px; padding: 12px 6px; min-width: 0; width: auto; margin: 0; }
  .services-tab .tab-title { font-size: 12.5px; line-height: 1.25; }
  .services-tab .tab-sub { display: none; }

  .pane-card { padding: 22px 18px; border-radius: 18px; }
  .pane-card-header { gap: 12px; margin-bottom: 20px; }
  .pane-card-header h2 { font-size: 22px; }
  .pane-card-header p { font-size: 13.5px; }
  .pane-icon-circle { width: 44px; height: 44px; flex-shrink: 0; }
  .pane-header-center { flex-direction: column; align-items: center; text-align: center; }

  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .form-control { font-size: 16px; } /* prevents iOS zoom */
  .prescription-upload-box { padding: 22px 14px; }
  .vp-steps { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; margin-bottom: 18px; }
  .vp-steps li { flex-direction: column; text-align: center; gap: 6px; padding: 10px 6px; font-size: 11.5px; }
  #medicine-order-form button[type=submit] { padding: 16px 20px !important; font-size: 15px; }
  .search-box-tracker { flex-direction: column; align-items: stretch; }
  .search-box-tracker .hero-btn-primary { justify-content: center; }

  .contact-form-card-new { padding: 22px 18px; }
  .about-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .about-img-col, .about-text { min-width: 0; max-width: 100%; }
  .about-cert-badge { left: 12px; right: 12px; max-width: calc(100% - 24px); }
  .testimonial-strip { padding: 22px 18px; }
  .testimonial-item { padding: 0; }
  .features-cta-row { padding: 30px 22px; }
  .features-cta-text h3 { font-size: 21px; }
  .footer-grid { grid-template-columns: minmax(0,1fr); gap: 32px; }

  .vpw { right: 14px; bottom: 82px; }
  .vpw-btn { width: 54px; height: 54px; font-size: 28px; }
  .vpw-tip { display: none; }
  .vp-mbar {
    display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 2400; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px); box-shadow: 0 -6px 24px rgba(15,23,42,.1); border-top: 1px solid #e2e8f0;
  }
  .vp-mbar a, .vp-mbar button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; border-radius: 50px; font-weight: 700; font-size: 15px; border: 0; cursor: pointer; text-decoration: none; }
  .vp-mbar a { background: #eff6ff; color: #1d4ed8; border: 1.5px solid #bfdbfe; }
  .vp-mbar button { background: linear-gradient(135deg,#0284c7,#2563eb); color: #fff; box-shadow: 0 6px 18px rgba(37,99,235,.3); }
  .vp-mbar ion-icon { font-size: 19px; }
  footer { padding-bottom: 80px; }
}
@media (max-width: 380px) {
  .hero-content h1 { font-size: 31px; }
  .services-tab .tab-title { font-size: 11.5px; }
}
.why-grid { align-items: stretch; }
