/* ============================================
   PHARMALINK B2B - MAIN STYLES
   ============================================ */
@import 'variables.css';

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: var(--header-height-desktop);
}
body.mobile { padding-top: var(--header-height-mobile); padding-bottom: var(--footer-mobile-h); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
ul, ol { list-style: none; }

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container-fluid { width: 100%; padding: 0 var(--space-lg); }

/* ---- Utility Classes ---- */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.text-center { text-align: center; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.relative { position: relative; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.25; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }
p { line-height: 1.75; }

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 48px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
}
.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-top: var(--space-md);
  max-width: 600px;
}
.section-header {
  margin-bottom: var(--space-2xl);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.925rem;
  transition: all var(--transition-base);
  cursor: pointer;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0,123,94,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,123,94,0.45);
}
.btn-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--white);
  box-shadow: 0 4px 15px rgba(249,115,22,0.35);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(249,115,22,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-primary); padding: 10px 16px; }
.btn-ghost:hover { background: var(--primary-light); color: var(--primary); }
.btn-sm { padding: 7px 16px; font-size: 0.85rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }

/* ---- Badge / Tag ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }
.badge-secondary { background: var(--secondary-light); color: var(--secondary-dark); }
.badge-success { background: #DCFCE7; color: var(--success); }
.badge-warning { background: #FEF9C3; color: #854D0E; }

/* ---- Card ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}
.card-body { padding: var(--space-lg); }

/* ---- Grid layouts ---- */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-lg); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-lg); }

/* ---- Section Spacing ---- */
.section { padding: var(--space-4xl) 0; }
.section-sm { padding: var(--space-2xl) 0; }

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--primary); transition: color var(--transition-fast); }
.breadcrumb a:hover { color: var(--primary-dark); }
.breadcrumb-sep { color: var(--text-light); }
.breadcrumb .active { color: var(--text-primary); font-weight: 500; }

/* ---- Form Inputs ---- */
.form-group { margin-bottom: var(--space-lg); }
.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--white);
  transition: all var(--transition-fast);
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,123,94,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { min-height: 130px; resize: vertical; }

/* ---- Alert ---- */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}
.alert-success { background: #DCFCE7; color: #14532D; border: 1px solid #86EFAC; }
.alert-error   { background: #FEE2E2; color: #7F1D1D; border: 1px solid #FCA5A5; }
.alert-info    { background: #DBEAFE; color: #1E3A5F; border: 1px solid #93C5FD; }

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-wave 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-wave {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Page wrapper ---- */
.page-with-sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: var(--space-xl);
  align-items: start;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

/* ---- Trust Badges Strip ---- */
.trust-strip {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}
.trust-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.trust-item .icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

/* ---- Overlay ---- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}
.overlay.active { opacity: 1; visibility: visible; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- Back to top ---- */
#backToTop {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  opacity: 0;
  visibility: hidden;
  z-index: var(--z-dropdown);
  font-size: 1.1rem;
}
#backToTop.visible { opacity: 1; visibility: visible; }
#backToTop:hover { transform: translateY(-3px); background: var(--primary-dark); }

/* ---- Marquee announcement bar ---- */
.announcement-bar {
  background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--primary-dark));
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 0;
  overflow: hidden;
  letter-spacing: 0.03em;
}
.marquee-content {
  display: flex;
  gap: 60px;
  animation: marquee 30s linear infinite;
  white-space: nowrap;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item { display: flex; align-items: center; gap: 8px; }

/* ---- Page Hero (Inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #00A67E 100%);
  padding: var(--space-3xl) 0;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 { color: var(--white); margin-bottom: var(--space-sm); font-size: clamp(1.8rem, 4vw, 2.8rem); }
.page-hero p { color: rgba(255,255,255,0.82); font-size: 1.05rem; }
.breadcrumb-hero a { color: rgba(255,255,255,0.75); }
.breadcrumb-hero .active { color: var(--white); }
.breadcrumb-hero .breadcrumb-sep { color: rgba(255,255,255,0.5); }

/* ---- Animated counter ---- */
.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
}
