/* CSS Design System for MedEasein Holistic Healthcare */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* Color Palette */
  --bg-primary: #060F1E;
  --bg-secondary: #0b192f;
  --color-blue: #1976D2;
  --color-blue-light: #42A5F5;
  --color-red: #E53935;
  --color-red-light: #FF5252;
  --color-gold: #FFB830;
  --color-text-primary: #F0FAF5;
  --color-text-secondary: #8892B0;
  --color-text-muted: #626C84;
  --glass-bg: rgba(25, 118, 210, 0.05);
  --glass-border: rgba(25, 118, 210, 0.15);
  --glass-hover: rgba(25, 118, 210, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Fonts */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Outfit', sans-serif;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-primary);
  color: var(--color-text-primary);
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: radial-gradient(circle at 10% 20%, rgba(25, 118, 210, 0.1) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(229, 57, 53, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

p {
  color: var(--color-text-secondary);
  font-weight: 400;
  margin-bottom: 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 8rem 0;
  position: relative;
}

.text-center {
  text-align: center;
}

/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-light) 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.4);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 118, 210, 0.6);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  transform: translateY(-2px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--color-gold) 0%, #FFA000 100%);
  color: #060F1E;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(255, 184, 48, 0.3);
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 184, 48, 0.5);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: rgba(25, 118, 210, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(25, 118, 210, 0.15);
}

/* Header & Navigation */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-smooth);
  padding: 1.5rem 0;
}

header.scrolled {
  background: rgba(6, 15, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(25, 118, 210, 0.1);
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.logo img {
  height: 40px;
  width: auto;
}

.logo span {
  background: linear-gradient(135deg, #fff 0%, #cfd8dc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}

.nav-link {
  font-family: var(--font-accent);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--color-blue) 0%, var(--color-red) 100%);
  transition: var(--transition-smooth);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background-color: #fff;
  transition: var(--transition-smooth);
}

/* Floating Elements */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition-smooth);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Footer styling */
footer {
  background: #03070f;
  padding: 5rem 0 2rem;
  border-top: 1px solid rgba(25, 118, 210, 0.1);
  color: var(--color-text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand p {
  margin: 1.5rem 0;
  max-width: 320px;
}

.footer-heading {
  font-family: var(--font-accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--color-blue);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: #fff;
  padding-left: 5px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.footer-contact i {
  color: var(--color-blue-light);
  margin-top: 0.25rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.9rem;
}

/* Animations */
.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.animated {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 5rem 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(6, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
    z-index: 1000;
    transition: var(--transition-smooth);
    border-left: 1px solid rgba(25, 118, 210, 0.15);
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* Cart & Checkout Premium UI Styling */
.cart-icon-container {
  position: relative;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.cart-icon-container:hover {
  color: var(--color-blue-light);
  transform: scale(1.08);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--color-red);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-accent);
  font-weight: 700;
}

/* Cart Drawer Sidebar */
.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 15, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 450px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--glass-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 2001;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-close-btn {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  transition: var(--transition-smooth);
}

.cart-close-btn:hover {
  color: #fff;
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cart-empty-text {
  text-align: center;
  color: var(--color-text-muted);
  margin-top: 5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.cart-item img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-name {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cart-item-price {
  color: var(--color-blue-light);
  font-size: 0.85rem;
  font-family: var(--font-accent);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
}

.cart-item-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.8rem;
}

.cart-footer {
  padding: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 15, 30, 0.4);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Premium Modals (Razorpay Simulation / Certification Drawer) */
.premium-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 15, 0.8);
  backdrop-filter: blur(12px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.premium-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.premium-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-modal-overlay.active .premium-modal {
  transform: scale(1);
}

.razorpay-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 0.75rem;
}

.razorpay-logo i {
  color: #3399FF;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 2rem auto;
  border-radius: 50%;
  border: 4px solid rgba(76, 175, 80, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #4CAF50;
  animation: scaleUp 0.5s ease forwards;
}

@keyframes scaleUp {
  0% { transform: scale(0); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Global Form Controls (used by Razorpay modal and contact form on all pages) */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-family: var(--font-accent);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-control {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(25, 118, 210, 0.15);
  border-radius: 8px;
  padding: 1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-blue-light);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 10px rgba(25, 118, 210, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
}

/* Cart drawer responsive for very small screens */
@media (max-width: 480px) {
  .cart-drawer {
    max-width: 100vw;
    width: 100vw;
  }
}

/* Global Medicine Badge (used in show cases) */
.med-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-family: var(--font-accent);
}

/* --- Floating Happy Pill Chat --- */
.happy-pill-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  box-shadow: 0 5px 25px rgba(229, 57, 53, 0.4);
  background: radial-gradient(circle at top right, #fff, #e0e0e0);
  z-index: 1000;
  animation: bouncePill 2.5s infinite ease-in-out;
  transition: all 0.3s ease;
  text-decoration: none;
}
.happy-pill-float:hover {
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 8px 35px rgba(229, 57, 53, 0.6);
  animation-play-state: paused;
}
.pill-speech-bubble {
  position: absolute;
  right: 80px;
  bottom: 15px;
  background: var(--color-gold);
  color: #060F1E;
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: all 0.3s ease;
}
.pill-speech-bubble::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -8px;
  transform: translateY(-50%);
  border-left: 8px solid var(--color-gold);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.happy-pill-float:hover .pill-speech-bubble {
  opacity: 1;
  transform: translateX(0);
}
@keyframes bouncePill {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}