/*
Theme Name: S.A. Pharmaceuticals
Theme URI: https://sapharmapk.com/
Author: S.A. Pharmaceuticals
Description: A standalone WordPress theme migration for the S.A. Pharmaceuticals website.
Version: 1.0.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: sa-pharmaceuticals
*/

:root {
  --sa-primary: #126be6;
  --sa-primary-dark: #0752bb;
  --sa-accent: #16b8bd;
  --sa-ink: #0f172a;
  --sa-muted: #64748b;
  --sa-soft: #f8fafc;
  --sa-border: #e5eaf1;
  --sa-radius: 1.25rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #334155;
  background: #fff;
  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body, button, input, textarea { font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--sa-primary); text-decoration: none; }
a:hover { color: var(--sa-primary-dark); }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 1rem;
  color: var(--sa-ink);
  font-family: Outfit, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
p { margin: 0 0 1rem; }
.sa-container { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }
.sa-site-main { min-height: 60vh; }
.sa-skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 1000;
  padding: 8px 14px; background: #fff; border-radius: 8px;
}
.sa-skip-link:focus { left: 8px; }

/* Header */
.sa-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding: 20px 0;
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid rgba(226,232,240,.7);
  backdrop-filter: blur(14px);
}
.sa-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.sa-logo { display: inline-flex; align-items: center; }
.sa-logo img { display: block; width: auto; height: 48px; }
.sa-menu-toggle {
  display: none; border: 0; background: transparent; color: var(--sa-ink);
  padding: 8px; font-size: 24px; cursor: pointer;
}
.sa-primary-nav ul {
  display: flex; align-items: center; gap: 32px; margin: 0; padding: 0; list-style: none;
}
.sa-primary-nav a { color: #64748b; font-size: 14px; font-weight: 600; }
.sa-primary-nav a:hover,
.sa-primary-nav .current-menu-item > a { color: var(--sa-primary); }
.sa-nav-cta {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 10px 22px; color: #fff !important; background: var(--sa-primary);
  box-shadow: 0 10px 24px rgba(18,107,230,.22);
}
.sa-nav-cta:hover { color: #fff !important; background: var(--sa-primary-dark); }

/* Shared sections */
.sa-hero,
.sa-page-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #126be6 0%, #0752bb 100%);
}
.sa-hero::before,
.sa-page-banner::before {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(30deg, rgba(255,255,255,.3) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.3) 87.5%, rgba(255,255,255,.3)),
    linear-gradient(150deg, rgba(255,255,255,.3) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,.3) 87.5%, rgba(255,255,255,.3));
  background-size: 80px 140px;
}
.sa-page-banner { padding: 152px 0 78px; color: #fff; text-align: center; }
.sa-page-banner h1 { color: #fff; font-size: clamp(2.5rem, 6vw, 4rem); }
.sa-page-banner p { max-width: 760px; margin: 0 auto; color: #dbeafe; font-size: 1.15rem; }
.sa-section { padding: 96px 0; }
.sa-section-soft { background: var(--sa-soft); }
.sa-section-heading { margin-bottom: 52px; text-align: center; }
.sa-section-heading h2 { font-size: clamp(2rem, 4vw, 3rem); }
.sa-section-heading p { max-width: 700px; margin: 0 auto; color: var(--sa-muted); }
.sa-accent-line { width: 64px; height: 4px; margin: 18px auto 0; border-radius: 999px; background: linear-gradient(90deg, var(--sa-primary), var(--sa-accent)); }
.sa-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 24px; border: 0; border-radius: 999px;
  color: #fff; background: var(--sa-primary); font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 24px rgba(18,107,230,.2);
}
.sa-button:hover { color: #fff; background: var(--sa-primary-dark); }
.sa-button-outline { color: var(--sa-ink); background: #fff; border: 2px solid #cbd5e1; box-shadow: none; }
.sa-button-outline:hover { color: var(--sa-primary); background: #fff; border-color: var(--sa-primary); }
.sa-button-white { color: var(--sa-primary); background: #fff; }

/* Home */
.sa-home-hero { min-height: 720px; padding: 150px 0 92px; display: flex; align-items: center; }
.sa-home-hero .sa-container { position: relative; z-index: 1; }
.sa-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.sa-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px;
  padding: 8px 16px; border-radius: 999px; color: var(--sa-primary);
  background: rgba(18,107,230,.1); font-size: .88rem; font-weight: 700;
}
.sa-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sa-primary); }
.sa-hero h1 { font-size: clamp(3.5rem, 7vw, 5.8rem); }
.sa-gradient-text {
  color: #bbf7d0;
  text-shadow: 0 2px 18px rgba(15, 23, 42, .18);
}
.sa-hero-copy {
  max-width: 570px;
  color: #eff6ff;
  font-size: 1.13rem;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(15, 23, 42, .22);
}
.sa-hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; }
.sa-hero-visual { position: relative; }
.sa-hero-visual img { display: block; width: 100%; border: 8px solid rgba(255,255,255,.75); border-radius: 28px; box-shadow: 0 28px 60px rgba(18,107,230,.18); }
.sa-hero-badge {
  position: absolute; right: -24px; top: 25%; display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border: 1px solid #e8eef5; border-radius: 16px; background: #fff;
  box-shadow: 0 18px 35px rgba(15,23,42,.12);
}
.sa-badge-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #16a34a; background: #dcfce7; font-weight: 800; }
.sa-hero-badge small { display: block; color: var(--sa-muted); font-size: 11px; }
.sa-hero-badge strong { display: block; color: var(--sa-ink); font-size: 14px; }
.sa-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.sa-feature-card { padding: 32px; border: 1px solid var(--sa-border); border-radius: var(--sa-radius); background: #fff; }
.sa-feature-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 14px; color: var(--sa-primary); background: #eff6ff; font-size: 24px; }
.sa-feature-card h3 { font-size: 1.3rem; }
.sa-feature-card p { color: var(--sa-muted); }
.sa-products-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.sa-products-header h2 { margin-bottom: 10px; font-size: clamp(2rem, 4vw, 3rem); }
.sa-products-header p { max-width: 680px; margin: 0; color: var(--sa-muted); }
.sa-view-all { font-weight: 700; white-space: nowrap; }
.sa-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.sa-product-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; border: 1px solid var(--sa-border); border-radius: var(--sa-radius); background: #fff; }
.sa-product-image-link { position: relative; display: block; aspect-ratio: 4 / 3; padding: 24px; background: linear-gradient(#f1f5f9, #f8fafc); }
.sa-product-image-link img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s ease; }
.sa-product-card:hover .sa-product-image-link img { transform: scale(1.03); }
.sa-product-category { position: absolute; left: 16px; top: 16px; padding: 5px 10px; border-radius: 999px; color: var(--sa-primary); background: rgba(255,255,255,.94); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sa-product-content { display: flex; flex: 1; flex-direction: column; padding: 24px; }
.sa-product-content h3 { margin-bottom: 8px; font-size: 1.35rem; }
.sa-product-content p { display: -webkit-box; flex: 1; margin-bottom: 22px; overflow: hidden; color: var(--sa-muted); font-size: .91rem; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.sa-product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid #eef2f7; color: #94a3b8; font-size: .78rem; }
.sa-product-meta a { font-size: .88rem; font-weight: 700; }
.sa-catalog-controls { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 42px; }
.sa-filter-buttons { display: flex; flex-wrap: wrap; gap: 9px; }
.sa-filter-buttons button { padding: 9px 16px; border: 1px solid #dfe6ee; border-radius: 999px; color: var(--sa-muted); background: #fff; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.sa-filter-buttons button:hover, .sa-filter-buttons button.is-active { color: #fff; border-color: var(--sa-primary); background: var(--sa-primary); }
.sa-product-search input { width: min(320px, 100%); padding: 11px 16px; border: 1px solid #dfe6ee; border-radius: 999px; background: #fff; font: inherit; outline: none; }
.sa-product-search input:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(18,107,230,.12); }
.sa-catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sa-no-products { padding: 60px 0; color: var(--sa-muted); text-align: center; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.sa-cta { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, #126be6, #0752bb); text-align: center; }
.sa-cta h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.sa-cta p { max-width: 700px; margin: 0 auto 28px; color: #dbeafe; font-size: 1.08rem; }

/* About and contact */
.sa-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 48px 0; text-align: center; }
.sa-stat-icon { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; color: var(--sa-primary); background: #eff6ff; font-size: 21px; }
.sa-stat-value { display: block; color: var(--sa-ink); font-family: Outfit, sans-serif; font-size: 1.7rem; font-weight: 700; }
.sa-stat-label { color: var(--sa-muted); font-size: .85rem; }
.sa-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.sa-info-card { padding: 36px; border: 1px solid var(--sa-border); border-radius: 28px; background: #fff; }
.sa-info-card-highlight { background: linear-gradient(135deg, #eff6ff, #f0fdfa); border-color: #dbeafe; }
.sa-info-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 22px; border-radius: 14px; color: var(--sa-primary); background: #eff6ff; font-size: 24px; }
.sa-info-card p { color: var(--sa-muted); }
.sa-message { max-width: 860px; margin: 0 auto; padding: 44px; border: 1px solid var(--sa-border); border-radius: 28px; background: linear-gradient(135deg, #f8fafc, #fff); }
.sa-message-copy p { color: var(--sa-muted); }
.sa-ceo { display: flex; align-items: center; gap: 16px; margin-top: 30px; padding-top: 24px; border-top: 1px solid #e2e8f0; }
.sa-ceo img { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; object-position: top; }
.sa-ceo strong { display: block; color: var(--sa-ink); }
.sa-ceo span { display: block; color: var(--sa-muted); font-size: .85rem; }
.sa-contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.sa-contact-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin: 38px 0; }
.sa-contact-item { display: flex; align-items: flex-start; gap: 14px; }
.sa-contact-icon { display: grid; flex: 0 0 46px; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: var(--sa-primary); background: #fff; box-shadow: 0 5px 16px rgba(15,23,42,.06); font-size: 20px; }
.sa-contact-item h4 { margin-bottom: 4px; font-size: 1rem; }
.sa-contact-item p { margin: 0; color: var(--sa-muted); font-size: .88rem; white-space: pre-line; }
.sa-map { height: 270px; overflow: hidden; border: 1px solid var(--sa-border); border-radius: 22px; box-shadow: 0 6px 20px rgba(15,23,42,.05); }
.sa-map iframe { width: 100%; height: 100%; border: 0; }
.sa-form-card { padding: 36px; border: 1px solid #edf1f5; border-radius: 28px; background: #fff; box-shadow: 0 18px 50px rgba(15,23,42,.08); }
.sa-form-card h2 { font-size: 1.65rem; }
.sa-form-row { margin-bottom: 18px; }
.sa-form-row label { display: block; margin-bottom: 7px; color: var(--sa-ink); font-size: .9rem; font-weight: 700; }
.sa-form-row input, .sa-form-row textarea {
  width: 100%; border: 1px solid #dfe6ee; border-radius: 10px; padding: 13px 14px;
  color: var(--sa-ink); background: #fff; font: inherit; outline: none;
}
.sa-form-row input:focus, .sa-form-row textarea:focus { border-color: var(--sa-primary); box-shadow: 0 0 0 3px rgba(18,107,230,.12); }
.sa-form-row textarea { min-height: 140px; resize: vertical; }
.sa-form-notice { margin-bottom: 18px; padding: 12px 14px; border-radius: 10px; color: #166534; background: #dcfce7; }

/* Product detail */
.sa-product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.sa-product-detail-image { display: flex; align-items: center; justify-content: center; min-height: 480px; padding: 48px; border: 1px solid var(--sa-border); border-radius: 28px; background: linear-gradient(#f1f5f9, #f8fafc); }
.sa-product-detail-image img { max-height: 480px; width: 100%; object-fit: contain; }
.sa-product-detail h1 { margin: 12px 0 20px; font-size: clamp(2.6rem, 5vw, 4rem); }
.sa-product-description { color: var(--sa-muted); font-size: 1.1rem; }
.sa-pill { display: inline-block; padding: 7px 14px; border-radius: 999px; color: var(--sa-primary); background: #eff6ff; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sa-detail-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 30px 0; }
.sa-detail-card { padding: 20px; border: 1px solid var(--sa-border); border-radius: 16px; background: #f8fafc; }
.sa-detail-card strong { display: block; margin-bottom: 4px; color: var(--sa-ink); }
.sa-detail-card p { margin: 0; color: var(--sa-muted); font-size: .86rem; }
.sa-detail-section { padding-top: 26px; border-top: 1px solid var(--sa-border); }
.sa-detail-section ul { margin: 0; padding: 0; list-style: none; }
.sa-detail-section li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--sa-muted); }
.sa-detail-section li::before { content: "✓"; position: absolute; left: 0; display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #16a34a; background: #dcfce7; font-size: 12px; font-weight: 800; }
.sa-detail-box { margin-top: 18px; padding: 15px 18px; border-radius: 12px; background: #f8fafc; }
.sa-detail-box strong { color: var(--sa-ink); }
.sa-detail-box p { margin: 4px 0 0; color: var(--sa-muted); font-size: .9rem; }
.sa-back-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 32px; color: var(--sa-muted); font-size: .9rem; font-weight: 700; }

/* Footer */
.sa-footer { padding: 72px 0 28px; color: #cbd5e1; background: #0f172a; }
.sa-footer-grid { display: grid; grid-template-columns: 1.35fr 1fr 1.35fr 1.35fr; gap: 42px; margin-bottom: 54px; }
.sa-footer h3, .sa-footer h4 { color: #fff; }
.sa-footer h4 { margin-bottom: 20px; font-size: 1rem; }
.sa-footer-brand img { height: 56px; width: auto; margin-bottom: 18px; filter: brightness(0) invert(1); }
.sa-footer p, .sa-footer li { color: #94a3b8; font-size: .88rem; }
.sa-footer ul { margin: 0; padding: 0; list-style: none; }
.sa-footer li { margin-bottom: 12px; }
.sa-footer a { color: #94a3b8; }
.sa-footer a:hover { color: #fff; }
.sa-footer-contact { display: flex; align-items: flex-start; gap: 10px; }
.sa-footer-contact span:first-child { color: var(--sa-accent); font-size: 18px; line-height: 1.3; }
.sa-footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 26px; border-top: 1px solid #1e293b; color: #64748b; font-size: .76rem; }
.sa-footer-bottom-links { display: flex; gap: 22px; }

@media (max-width: 900px) {
  .sa-menu-toggle { display: block; }
  .sa-primary-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 16px 24px 22px; background: #fff; border-bottom: 1px solid var(--sa-border); box-shadow: 0 10px 24px rgba(15,23,42,.08); }
  .sa-primary-nav.is-open { display: block; }
  .sa-primary-nav ul { display: flex; align-items: stretch; flex-direction: column; gap: 8px; }
  .sa-primary-nav a { display: block; padding: 9px 0; }
  .sa-nav-cta { display: inline-flex !important; padding: 10px 18px !important; }
  .sa-hero-grid, .sa-contact-grid, .sa-product-detail { grid-template-columns: 1fr; gap: 42px; }
  .sa-hero-visual { display: none; }
  .sa-footer-grid { grid-template-columns: repeat(2, 1fr); }
  .sa-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sa-container { width: min(100% - 32px, 1160px); }
  .sa-header { padding: 14px 0; }
  .sa-logo img { height: 42px; }
  .sa-section { padding: 68px 0; }
  .sa-home-hero { min-height: 640px; padding: 125px 0 70px; }
  .sa-hero h1 { font-size: 3.2rem; }
  .sa-feature-grid, .sa-product-grid, .sa-two-column, .sa-contact-details, .sa-detail-cards, .sa-stat-grid { grid-template-columns: 1fr; }
  .sa-products-header { display: block; }
  .sa-view-all { display: inline-block; margin-top: 16px; }
  .sa-page-banner { padding: 124px 0 60px; }
  .sa-form-card, .sa-info-card, .sa-message { padding: 26px; }
  .sa-product-detail-image { min-height: 350px; padding: 30px; }
  .sa-footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .sa-footer-bottom { flex-direction: column; }
  .sa-footer-bottom-links { flex-wrap: wrap; }
  .sa-catalog-controls { align-items: stretch; flex-direction: column; }
  .sa-product-search input { width: 100%; }
  .sa-catalog-grid { grid-template-columns: 1fr; }
}