/* ===================================================================
   PHARMAWEB DESIGN SYSTEM v4.0 — Premium Medical Commerce
   Inspired by Railway.app's precision • Adapted for RTL pharma
   =================================================================== */

/* === Design Tokens === */
:root {
  /* -- Surface & Background — Rich warm, zero eye-strain -- */
  --pw-bg:          hsl(35, 20%, 88%);
  --pw-bg-alt:      hsl(35, 16%, 85%);
  --pw-surface:     hsl(35, 25%, 92%);
  --pw-surface-alt: hsl(35, 18%, 90%);
  --pw-surface-raised: hsl(35, 28%, 94%);
  --pw-overlay:     hsla(220, 40%, 8%, 0.55);

  /* -- Text — Deep, warm hierarchy -- */
  --pw-text:        hsl(215, 28%, 14%);
  --pw-text-2:      hsl(215, 18%, 38%);
  --pw-text-3:      hsl(215, 12%, 52%);
  --pw-text-4:      hsl(215, 8%, 65%);

  /* -- Brand — Deep Medical Teal-Emerald -- */
  --pw-brand:       hsl(160, 84%, 30%);
  --pw-brand-hover: hsl(160, 84%, 24%);
  --pw-brand-light: hsl(160, 40%, 88%);
  --pw-brand-50:    hsl(160, 35%, 90%);
  --pw-brand-rgb:   0, 140, 105;

  /* -- Accent — Regal Deep Indigo -- */
  --pw-accent:      hsl(250, 50%, 48%);
  --pw-accent-hover:hsl(250, 50%, 40%);
  --pw-accent-light:hsl(250, 35%, 88%);
  --pw-accent-rgb:  82, 61, 184;

  /* -- Warm — Premium Gold -- */
  --pw-warm:        hsl(38, 95%, 50%);
  --pw-warm-hover:  hsl(38, 95%, 42%);
  --pw-warm-light:  hsl(38, 60%, 88%);
  --pw-warm-rgb:    249, 168, 2;

  /* -- Semantic -- */
  --pw-success:     hsl(152, 68%, 32%);
  --pw-success-light:hsl(152, 40%, 86%);
  --pw-danger:      hsl(0, 72%, 50%);
  --pw-danger-light:hsl(0, 55%, 88%);
  --pw-warning:     hsl(38, 92%, 50%);
  --pw-info:        hsl(210, 80%, 48%);

  /* -- Border — Warm tones, visible but gentle -- */
  --pw-border:      hsl(35, 15%, 82%);
  --pw-border-hover:hsl(35, 15%, 72%);
  --pw-border-focus:hsl(160, 84%, 30%);

  /* -- Shadows — Rich warm depth -- */
  --pw-shadow-xs: 0 1px 2px hsla(215, 30%, 10%, 0.05);
  --pw-shadow-sm: 0 1px 3px hsla(215, 30%, 10%, 0.07), 0 1px 2px hsla(215, 30%, 10%, 0.05);
  --pw-shadow-md: 0 4px 12px -2px hsla(215, 30%, 10%, 0.08), 0 2px 4px -2px hsla(215, 30%, 10%, 0.04);
  --pw-shadow-lg: 0 12px 32px -4px hsla(215, 30%, 10%, 0.10), 0 4px 8px -2px hsla(215, 30%, 10%, 0.06);
  --pw-shadow-xl: 0 24px 56px -8px hsla(215, 30%, 10%, 0.14), 0 8px 16px -4px hsla(215, 30%, 10%, 0.06);
  --pw-shadow-brand: 0 8px 32px -4px hsla(160, 84%, 30%, 0.30);
  --pw-shadow-accent:0 8px 28px -4px hsla(250, 50%, 48%, 0.22);
  --pw-shadow-warm:  0 8px 24px -4px hsla(38, 95%, 50%, 0.20);
  --pw-shadow-glow:  0 0 40px -8px hsla(160, 84%, 30%, 0.15);

  /* -- Radii -- */
  --pw-r-sm:  10px;
  --pw-r-md:  14px;
  --pw-r-lg:  18px;
  --pw-r-xl:  22px;
  --pw-r-2xl: 28px;
  --pw-r-pill: 100px;

  /* -- Spacing Scale -- */
  --pw-sp-1: 4px;
  --pw-sp-2: 8px;
  --pw-sp-3: 12px;
  --pw-sp-4: 16px;
  --pw-sp-5: 20px;
  --pw-sp-6: 24px;
  --pw-sp-8: 32px;
  --pw-sp-10: 40px;
  --pw-sp-12: 48px;
  --pw-sp-16: 64px;

  /* -- Motion — The "Railway Snap" -- */
  --pw-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --pw-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --pw-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --pw-dur-fast: 150ms;
  --pw-dur-normal: 250ms;
  --pw-dur-slow: 400ms;
  --pw-dur-reveal: 600ms;

  /* -- Touch -- */
  --pw-touch-min: 44px;
  --pw-safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* === Bootstrap Override — Kill ALL white backgrounds === */
.bg-white {
  background-color: hsl(35, 25%, 92%) !important;
}
.bg-light {
  background-color: hsl(35, 18%, 90%) !important;
}
.card, .modal-content, .dropdown-menu, .list-group-item, .table {
  background-color: hsl(35, 25%, 92%);
}
.form-control, .form-select, .input-group-text {
  background-color: hsl(35, 20%, 93%);
  border-color: hsl(35, 15%, 82%);
}
.form-control:focus, .form-select:focus {
  background-color: hsl(35, 22%, 95%);
  border-color: hsl(160, 84%, 30%);
  box-shadow: 0 0 0 3px hsla(160, 84%, 30%, 0.15);
}

/* === SEO Contextual Content — properly hidden but crawlable === */
.seo-contextual-content {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none;
  user-select: none;
}
.seo-contextual-content a {
  color: inherit;
  text-decoration: none;
  pointer-events: none;
}

/* === Scroll Reveal Animation System === */
.pw-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--pw-dur-reveal) var(--pw-ease-out),
    transform var(--pw-dur-reveal) var(--pw-ease-out);
  will-change: opacity, transform;
}
.pw-reveal.pw-visible {
  opacity: 1;
  transform: translateY(0);
}
.pw-reveal-delay-1 { transition-delay: 80ms; }
.pw-reveal-delay-2 { transition-delay: 160ms; }
.pw-reveal-delay-3 { transition-delay: 240ms; }
.pw-reveal-delay-4 { transition-delay: 320ms; }

.pw-reveal-scale {
  opacity: 0;
  transform: scale(0.95) translateY(16px);
  transition:
    opacity var(--pw-dur-reveal) var(--pw-ease-out),
    transform var(--pw-dur-reveal) var(--pw-ease-out);
}
.pw-reveal-scale.pw-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Staggered children */
.pw-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--pw-dur-slow) var(--pw-ease-out),
    transform var(--pw-dur-slow) var(--pw-ease-out);
}
.pw-stagger.pw-visible > * { opacity: 1; transform: translateY(0); }
.pw-stagger.pw-visible > *:nth-child(1) { transition-delay: 0ms; }
.pw-stagger.pw-visible > *:nth-child(2) { transition-delay: 60ms; }
.pw-stagger.pw-visible > *:nth-child(3) { transition-delay: 120ms; }
.pw-stagger.pw-visible > *:nth-child(4) { transition-delay: 180ms; }
.pw-stagger.pw-visible > *:nth-child(5) { transition-delay: 240ms; }
.pw-stagger.pw-visible > *:nth-child(6) { transition-delay: 300ms; }
.pw-stagger.pw-visible > *:nth-child(7) { transition-delay: 360ms; }
.pw-stagger.pw-visible > *:nth-child(8) { transition-delay: 420ms; }

/* =========================================
   CARD SYSTEM — Railway-inspired surfaces
   ========================================= */
.pw-card {
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-xl);
  transition:
    border-color var(--pw-dur-normal) var(--pw-ease-out),
    box-shadow var(--pw-dur-normal) var(--pw-ease-out),
    transform var(--pw-dur-normal) var(--pw-ease-out);
}
.pw-card:hover {
  border-color: var(--pw-border-hover);
  box-shadow: var(--pw-shadow-md);
}
.pw-card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: var(--pw-shadow-lg);
}
.pw-card-elevated {
  box-shadow: var(--pw-shadow-sm);
  border-color: transparent;
}
.pw-card-elevated:hover {
  box-shadow: var(--pw-shadow-lg);
  border-color: var(--pw-border-hover);
}

/* =========================================
   BUTTON SYSTEM — Premium tactile feel
   ========================================= */
.pw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--pw-sp-2);
  padding: var(--pw-sp-3) var(--pw-sp-5);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.2;
  border: 1px solid transparent;
  border-radius: var(--pw-r-md);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    background var(--pw-dur-fast) var(--pw-ease-out),
    border-color var(--pw-dur-fast) var(--pw-ease-out),
    color var(--pw-dur-fast) var(--pw-ease-out),
    box-shadow var(--pw-dur-fast) var(--pw-ease-out),
    transform var(--pw-dur-fast) var(--pw-ease-out);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.pw-btn:active { transform: scale(0.97); }
.pw-btn:focus-visible {
  outline: 2px solid var(--pw-brand);
  outline-offset: 2px;
}

.pw-btn-primary {
  background: var(--pw-brand);
  color: #fff;
  box-shadow: var(--pw-shadow-brand);
}
.pw-btn-primary:hover {
  background: var(--pw-brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -4px hsla(160, 84%, 30%, 0.35);
  color: #fff;
}

.pw-btn-accent {
  background: var(--pw-accent);
  color: #fff;
  box-shadow: var(--pw-shadow-accent);
}
.pw-btn-accent:hover {
  background: var(--pw-accent-hover);
  transform: translateY(-1px);
  color: #fff;
}

.pw-btn-ghost {
  background: transparent;
  color: var(--pw-text-2);
  border-color: var(--pw-border);
}
.pw-btn-ghost:hover {
  background: var(--pw-bg-alt);
  border-color: var(--pw-border-hover);
  color: var(--pw-text);
}

.pw-btn-soft {
  background: var(--pw-brand-light);
  color: var(--pw-brand);
  border-color: hsla(160, 84%, 30%, 0.12);
}
.pw-btn-soft:hover {
  background: hsla(160, 84%, 30%, 0.15);
  border-color: hsla(160, 84%, 30%, 0.25);
  color: var(--pw-brand-hover);
}

.pw-btn-danger {
  background: transparent;
  color: var(--pw-danger);
  border-color: hsla(0, 72%, 51%, 0.15);
}
.pw-btn-danger:hover {
  background: var(--pw-danger-light);
  border-color: hsla(0, 72%, 51%, 0.3);
}

.pw-btn-lg {
  padding: var(--pw-sp-4) var(--pw-sp-8);
  font-size: 1rem;
  border-radius: var(--pw-r-lg);
  min-height: 52px;
}
.pw-btn-sm {
  padding: var(--pw-sp-2) var(--pw-sp-3);
  font-size: 0.8125rem;
  border-radius: var(--pw-r-sm);
}
.pw-btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--pw-r-md);
}

/* CTA with shimmer */
.pw-btn-cta {
  background: linear-gradient(135deg, var(--pw-brand) 0%, hsl(160, 84%, 24%) 100%);
  color: #fff;
  box-shadow: var(--pw-shadow-brand);
  font-size: 1rem;
  padding: var(--pw-sp-4) var(--pw-sp-8);
  border-radius: var(--pw-r-lg);
  min-height: 52px;
}
.pw-btn-cta::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -60%;
  width: 40%;
  height: 200%;
  background: linear-gradient(90deg, transparent, hsla(0,0%,100%,0.15), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--pw-ease-out);
  pointer-events: none;
}
.pw-btn-cta:hover::after { left: 120%; }
.pw-btn-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -4px hsla(160, 84%, 30%, 0.35);
  color: #fff;
}

/* =========================================
   BADGE SYSTEM
   ========================================= */
.pw-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--pw-sp-1);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--pw-r-pill);
  line-height: 1.4;
}
.pw-badge-brand  { background: var(--pw-brand-light); color: var(--pw-brand); }
.pw-badge-accent { background: var(--pw-accent-light); color: var(--pw-accent); }
.pw-badge-success{ background: var(--pw-success-light); color: var(--pw-success); }
.pw-badge-danger { background: var(--pw-danger-light); color: var(--pw-danger); }
.pw-badge-warm   { background: var(--pw-warm-light); color: hsl(38, 75%, 40%); }
.pw-badge-neutral{ background: var(--pw-bg-alt); color: var(--pw-text-3); }

/* =========================================
   TRUST & SECURITY STRIP
   ========================================= */
.pw-trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--pw-sp-8);
  padding: var(--pw-sp-4) var(--pw-sp-6);
  flex-wrap: wrap;
}
.pw-trust-item {
  display: flex;
  align-items: center;
  gap: var(--pw-sp-2);
  font-size: 0.8125rem;
  color: var(--pw-text-3);
  font-weight: 500;
  transition: color var(--pw-dur-fast) var(--pw-ease-out);
}
.pw-trust-item i {
  font-size: 1rem;
  color: var(--pw-brand);
  transition: transform var(--pw-dur-normal) var(--pw-ease-bounce);
}
.pw-trust-item:hover { color: var(--pw-text-2); }
.pw-trust-item:hover i { transform: scale(1.15); }

/* =========================================
   SECTION PATTERNS
   ========================================= */
.pw-page-header {
  text-align: center;
  padding: var(--pw-sp-10) 0 var(--pw-sp-8);
}
.pw-page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--pw-text);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--pw-sp-3) 0;
}
.pw-page-subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.125rem);
  color: var(--pw-text-3);
  line-height: 1.6;
  margin: 0;
  max-width: 540px;
  margin-inline: auto;
}

.pw-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--pw-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--pw-sp-3);
}
.pw-section-title i {
  color: var(--pw-brand);
  font-size: 1rem;
}

/* =========================================
   DIVIDERS
   ========================================= */
.pw-divider {
  border: none;
  border-top: 1px solid var(--pw-border);
  margin: var(--pw-sp-4) 0;
}
.pw-divider-dashed {
  border: none;
  border-top: 1.5px dashed var(--pw-border);
  margin: var(--pw-sp-4) 0;
}

/* =========================================
   INPUT SYSTEM
   ========================================= */
.pw-input {
  width: 100%;
  padding: var(--pw-sp-3) var(--pw-sp-4);
  background: var(--pw-surface);
  border: 1.5px solid var(--pw-border);
  border-radius: var(--pw-r-md);
  font-size: 0.9375rem;
  color: var(--pw-text);
  font-family: inherit;
  transition:
    border-color var(--pw-dur-fast) var(--pw-ease-out),
    box-shadow var(--pw-dur-fast) var(--pw-ease-out);
}
.pw-input::placeholder { color: var(--pw-text-4); }
.pw-input:focus {
  outline: none;
  border-color: var(--pw-brand);
  box-shadow: 0 0 0 3px hsla(160, 84%, 30%, 0.1);
}

/* =========================================
   LOADING STATES
   ========================================= */
.pw-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--pw-border);
  border-top-color: var(--pw-brand);
  border-radius: 50%;
  animation: pw-spin 0.7s linear infinite;
}
@keyframes pw-spin { to { transform: rotate(360deg); } }

.pw-skeleton {
  background: linear-gradient(90deg, var(--pw-bg-alt) 0%, var(--pw-bg) 50%, var(--pw-bg-alt) 100%);
  background-size: 200% 100%;
  animation: pw-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--pw-r-sm);
}
@keyframes pw-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* =========================================
   STEPPER (Quantity)
   ========================================= */
.pw-stepper {
  display: inline-flex;
  align-items: center;
  background: var(--pw-bg-alt);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-md);
  overflow: hidden;
}
.pw-stepper-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--pw-text-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition:
    background var(--pw-dur-fast) var(--pw-ease-out),
    color var(--pw-dur-fast) var(--pw-ease-out);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pw-stepper-btn:hover {
  background: var(--pw-brand);
  color: #fff;
}
.pw-stepper-btn:active { transform: scale(0.9); }
.pw-stepper input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--pw-text);
  -moz-appearance: textfield;
  appearance: textfield;
}
.pw-stepper input::-webkit-outer-spin-button,
.pw-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* =========================================
   MOBILE BOTTOM NAV
   ========================================= */
.pw-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsla(0, 0%, 100%, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--pw-border);
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: var(--pw-sp-2) 0 calc(var(--pw-sp-2) + var(--pw-safe-bottom));
  z-index: 999;
  box-shadow: 0 -4px 20px hsla(220, 30%, 10%, 0.06);
}
@media (max-width: 991px) {
  .pw-mobile-nav { display: flex; }
  /* body padding handled by .pharma-mobile-nav below */
}
.pw-mobile-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--pw-text-4);
  font-size: 0.65rem;
  font-weight: 500;
  padding: var(--pw-sp-1) var(--pw-sp-3);
  border-radius: var(--pw-r-sm);
  transition: color var(--pw-dur-fast) var(--pw-ease-out);
  position: relative;
}
.pw-mobile-nav a i { font-size: 1.15rem; }
.pw-mobile-nav a.active,
.pw-mobile-nav a:hover { color: var(--pw-brand); }
.pw-mobile-nav a.active::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--pw-brand);
  border-radius: 2px;
}
.pw-nav-badge {
  position: absolute;
  top: -2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: var(--pw-danger);
  color: #fff;
  border-radius: var(--pw-r-pill);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* =========================================
   BREADCRUMB
   ========================================= */
.pw-breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--pw-sp-2);
  font-size: 0.8125rem;
  padding: var(--pw-sp-4) 0;
}
.pw-breadcrumb a {
  color: var(--pw-text-3);
  text-decoration: none;
  transition: color var(--pw-dur-fast) var(--pw-ease-out);
}
.pw-breadcrumb a:hover { color: var(--pw-brand); }
.pw-breadcrumb .sep { color: var(--pw-text-4); font-size: 0.7rem; }
.pw-breadcrumb .current { color: var(--pw-text); font-weight: 600; }

/* =========================================
   PROGRESS STEPPER (Checkout Flow)
   ========================================= */
.pw-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--pw-sp-6) 0 var(--pw-sp-8);
}
.pw-progress-step {
  display: flex;
  align-items: center;
  gap: var(--pw-sp-2);
  font-size: 0.8125rem;
  color: var(--pw-text-4);
  font-weight: 500;
  white-space: nowrap;
}
.pw-progress-step.active { color: var(--pw-text); }
.pw-progress-step.active .pw-progress-num {
  background: var(--pw-brand);
  color: #fff;
  box-shadow: 0 0 0 4px hsla(160, 84%, 30%, 0.15);
}
.pw-progress-step.done .pw-progress-num {
  background: var(--pw-success);
  color: #fff;
}
.pw-progress-step.done .pw-progress-num::after {
  content: '\2713';
  font-size: 0.7rem;
}
.pw-progress-step.done .pw-progress-num span { display: none; }
.pw-progress-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pw-bg-alt);
  border: 1.5px solid var(--pw-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--pw-dur-normal) var(--pw-ease-out);
}
.pw-progress-line {
  width: 48px;
  height: 2px;
  background: var(--pw-border);
  margin: 0 var(--pw-sp-2);
  flex-shrink: 0;
  border-radius: 1px;
  position: relative;
  overflow: hidden;
}
.pw-progress-line.done { background: var(--pw-success); }

/* =========================================
   TOAST NOTIFICATION
   ========================================= */
.pw-toast-container {
  position: fixed;
  top: var(--pw-sp-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--pw-sp-2);
  pointer-events: none;
}
.pw-toast {
  display: flex;
  align-items: center;
  gap: var(--pw-sp-3);
  padding: var(--pw-sp-3) var(--pw-sp-5);
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-md);
  box-shadow: var(--pw-shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pw-text);
  pointer-events: auto;
  animation: pw-slideDown 0.35s var(--pw-ease-out);
}
.pw-toast.success { border-color: var(--pw-success); }
.pw-toast.success i { color: var(--pw-success); }
.pw-toast.error { border-color: var(--pw-danger); }
.pw-toast.error i { color: var(--pw-danger); }
.pw-toast-exit {
  animation: pw-fadeOut 0.25s var(--pw-ease-out) forwards;
}
@keyframes pw-fadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}
@keyframes pw-slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   MODAL
   ========================================= */
.pw-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--pw-overlay);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--pw-sp-4);
  animation: pw-fadeIn 0.2s var(--pw-ease-out);
}
.pw-modal {
  background: var(--pw-surface);
  border-radius: var(--pw-r-2xl);
  box-shadow: var(--pw-shadow-xl);
  max-width: 420px;
  width: 100%;
  padding: var(--pw-sp-8);
  animation: pw-scaleIn 0.3s var(--pw-ease-out);
  text-align: center;
}
.pw-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--pw-sp-5);
  font-size: 1.5rem;
}
.pw-modal-icon.danger {
  background: var(--pw-danger-light);
  color: var(--pw-danger);
}
.pw-modal h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--pw-text);
  margin: 0 0 var(--pw-sp-2);
}
.pw-modal p {
  font-size: 0.875rem;
  color: var(--pw-text-3);
  margin: 0 0 var(--pw-sp-6);
  line-height: 1.6;
}
.pw-modal-actions {
  display: flex;
  gap: var(--pw-sp-3);
  justify-content: center;
}
@keyframes pw-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pw-scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* =========================================
   UTILITY CLASSES
   ========================================= */
.pw-font-mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.pw-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pw-text-muted { color: var(--pw-text-3); }
.pw-text-sm { font-size: 0.8125rem; }
.pw-text-xs { font-size: 0.75rem; }

/* =========================================
   ACCESSIBILITY
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pw-reveal, .pw-reveal-scale, .pw-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
@media (forced-colors: active) {
  .pw-btn { border: 2px solid ButtonText; }
  .pw-card { border: 2px solid CanvasText; }
}

/* =========================================
   BACKWARD COMPAT — Map old class names
   ========================================= */
.pharma-card {
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-xl);
  transition: border-color var(--pw-dur-normal) var(--pw-ease-out), box-shadow var(--pw-dur-normal) var(--pw-ease-out);
}
.pharma-card:hover {
  border-color: var(--pw-border-hover);
  box-shadow: var(--pw-shadow-md);
}
.pharma-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--pw-sp-2);
  padding: var(--pw-sp-3) var(--pw-sp-5); font-weight: 600; font-size: 0.875rem;
  border: none; border-radius: var(--pw-r-md); cursor: pointer;
  background: var(--pw-brand); color: #fff; box-shadow: var(--pw-shadow-brand);
  transition: all var(--pw-dur-fast) var(--pw-ease-out); text-decoration: none;
}
.pharma-btn-primary:hover { background: var(--pw-brand-hover); transform: translateY(-1px); color: #fff; }
.pharma-btn-success { 
  display: inline-flex; align-items: center; justify-content: center; gap: var(--pw-sp-2);
  padding: var(--pw-sp-3) var(--pw-sp-5); font-weight: 600; font-size: 0.875rem;
  border: none; border-radius: var(--pw-r-md); cursor: pointer;
  background: var(--pw-success); color: #fff;
  transition: all var(--pw-dur-fast) var(--pw-ease-out); text-decoration: none;
}
.pharma-badge-success { display: inline-flex; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; border-radius: var(--pw-r-pill); background: var(--pw-success-light); color: var(--pw-success); }
.pharma-badge-warning { display: inline-flex; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; border-radius: var(--pw-r-pill); background: var(--pw-warm-light); color: hsl(38, 75%, 40%); }
.pharma-badge-info { display: inline-flex; padding: 3px 10px; font-size: 0.75rem; font-weight: 600; border-radius: var(--pw-r-pill); background: var(--pw-accent-light); color: var(--pw-accent); }
.pharma-trust-strip { display: flex; align-items: center; justify-content: center; gap: var(--pw-sp-8); padding: var(--pw-sp-4) var(--pw-sp-6); flex-wrap: wrap; }
/* Mobile Bottom Navigation — pharma-mobile-nav */
.pharma-mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: hsla(0, 0%, 100%, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--pw-border, hsl(35, 15%, 82%));
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  box-shadow: 0 -4px 20px hsla(220, 30%, 10%, 0.08);
}
@media (max-width: 991px) {
  .pharma-mobile-nav { display: flex; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important; }
}
.pharma-mobile-nav-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.pharma-mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 10px;
  position: relative;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.pharma-mobile-nav-item i { font-size: 1.2rem; }
.pharma-mobile-nav-item.active { color: #008c69; }
.pharma-mobile-nav-item:hover { color: #008c69; }
.pharma-mobile-nav-item.active::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: #008c69;
  border-radius: 2px;
}
.pharma-mobile-nav-badge {
  position: absolute;
  top: 0;
  right: 4px;
  min-width: 18px;
  height: 18px;
  background: #e53e3e;
  color: #fff;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* =========================================
   PREMIUM POLISH — Ambient Effects & Depth
   ========================================= */

/* Gentle page ambient glow — warmth instead of harsh white */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(160, 84%, 30%, 0.04), transparent 70%);
  pointer-events: none;
  z-index: -1;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  left: -20%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(38, 95%, 50%, 0.03), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

/* Premium card lift — elegant depth on hover */
.pw-card-premium {
  background: var(--pw-surface);
  border: 1px solid var(--pw-border);
  border-radius: var(--pw-r-xl);
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--pw-ease-out);
}
.pw-card-premium::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, hsla(160, 84%, 30%, 0.05), hsla(250, 50%, 48%, 0.03));
  opacity: 0;
  transition: opacity 0.35s var(--pw-ease-out);
}
.pw-card-premium:hover {
  border-color: hsla(160, 84%, 30%, 0.2);
  box-shadow: var(--pw-shadow-lg), 0 0 0 1px hsla(160, 84%, 30%, 0.08);
  transform: translateY(-3px);
}
.pw-card-premium:hover::before {
  opacity: 1;
}

/* Glass effect for premium overlays */
.pw-glass {
  background: hsla(40, 20%, 99%, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid hsla(220, 14%, 90%, 0.6);
}
.pw-glass-dark {
  background: hsla(215, 28%, 14%, 0.85);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid hsla(0, 0%, 100%, 0.08);
  color: hsla(0, 0%, 100%, 0.92);
}

/* Premium gradient text */
.pw-gradient-text {
  background: linear-gradient(135deg, var(--pw-brand), var(--pw-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pw-gradient-text-warm {
  background: linear-gradient(135deg, var(--pw-brand), var(--pw-warm));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Floating glow dot — subtle ambient indicator */
.pw-glow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--pw-brand);
  box-shadow: 0 0 12px var(--pw-brand), 0 0 24px hsla(160, 84%, 30%, 0.3);
  animation: pw-pulse-glow 2.5s ease-in-out infinite;
}
@keyframes pw-pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--pw-brand), 0 0 16px hsla(160, 84%, 30%, 0.2); }
  50% { box-shadow: 0 0 16px var(--pw-brand), 0 0 32px hsla(160, 84%, 30%, 0.35); }
}

/* Premium divider */
.pw-divider {
  height: 1px;
  border: none;
  background: linear-gradient(90deg, transparent, var(--pw-border), transparent);
  margin: var(--pw-sp-8) 0;
}

/* Shimmer loading bar */
.pw-shimmer {
  background: linear-gradient(90deg, var(--pw-bg-alt) 25%, var(--pw-bg) 50%, var(--pw-bg-alt) 75%);
  background-size: 200% 100%;
  animation: pw-shimmer-move 1.5s ease-in-out infinite;
}
@keyframes pw-shimmer-move {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hover glow effect for interactive elements */
.pw-hover-glow {
  transition: box-shadow 0.3s var(--pw-ease-out);
}
.pw-hover-glow:hover {
  box-shadow: var(--pw-shadow-md), var(--pw-shadow-glow);
}

/* Premium tag/chip */
.pw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--pw-r-pill);
  background: var(--pw-bg-alt);
  border: 1px solid var(--pw-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--pw-text-2);
  transition: all 0.2s var(--pw-ease-out);
}
.pw-chip:hover {
  background: var(--pw-brand-light);
  border-color: var(--pw-brand);
  color: var(--pw-brand);
}

/* Premium section separator — wave-like divider */
.pw-section-wave {
  position: relative;
  padding-top: var(--pw-sp-16);
}
.pw-section-wave::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--pw-bg);
  clip-path: ellipse(60% 100% at 50% 0%);
}

/* Smooth image container */
.pw-img-container {
  overflow: hidden;
  border-radius: var(--pw-r-lg);
  background: var(--pw-bg-alt);
}
.pw-img-container img {
  transition: transform 0.5s var(--pw-ease-out);
}
.pw-img-container:hover img {
  transform: scale(1.04);
}

/* Focus ring for accessibility */
.pw-focus-ring:focus-visible {
  outline: 2px solid var(--pw-brand);
  outline-offset: 2px;
  border-radius: var(--pw-r-sm);
}

/* Subtle noise texture overlay */
.pw-texture {
  position: relative;
}
.pw-texture::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
  mix-blend-mode: multiply;
}
