/*
Theme Name: Biopharma
Theme URI: https://biopharma.co
Author: Biopharma Development
Author URI: https://biopharma.co
Description: A premium, clinical-aesthetic WordPress theme for Biopharma Research Supply. Built as a lab interface, not an ecommerce store. Custom WooCommerce integration with batch-level COA documentation, data-first UI, and research-grade positioning.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: biopharma
Tags: custom-menu, custom-logo, woocommerce, one-column, two-columns

Biopharma Research Supply — A Controlled Access Research Supply System.
*/

/* ============================================
   0. DESIGN TOKENS (Global System)
   ============================================ */

:root {
  /* Colors */
  --bp-bg: #F7F8FA;
  --bp-surface: #FFFFFF;
  --bp-text: #0A0A0A;
  --bp-text-secondary: #6B7280;
  --bp-purple: #6C3BFF;
  --bp-purple-hover: #5A2DE6;
  --bp-red: #FF3B5C;
  --bp-border: #E5E7EB;
  --bp-muted-bg: #F0F1F3;

  /* Spacing */
  --bp-xs: 8px;
  --bp-sm: 16px;
  --bp-md: 32px;
  --bp-lg: 64px;
  --bp-xl: 96px;

  /* Grid */
  --bp-max-width: 1280px;
  --bp-content-width: 1120px;
  --bp-gutter: 24px;

  /* Typography */
  --bp-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bp-font-mono: 'IBM Plex Mono', 'Menlo', 'Consolas', monospace;

  /* Radius */
  --bp-radius: 3px;
}

/* ============================================
   1. RESET & BASE
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--bp-font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--bp-text);
  background-color: var(--bp-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================
   2. TYPOGRAPHY
   ============================================ */

h1, .bp-h1 {
  font-size: 48px;
  line-height: 56px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--bp-text);
}

h2, .bp-h2 {
  font-size: 32px;
  line-height: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--bp-text);
}

h3, .bp-h3 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--bp-text);
}

p {
  font-size: 16px;
  line-height: 24px;
  color: var(--bp-text-secondary);
}

.bp-mono {
  font-family: var(--bp-font-mono);
  font-size: 14px;
  line-height: 20px;
}

.bp-label {
  font-family: var(--bp-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--bp-text-secondary);
}

/* ============================================
   3. LAYOUT
   ============================================ */

.bp-container {
  width: 100%;
  max-width: var(--bp-max-width);
  margin: 0 auto;
  padding: 0 var(--bp-sm);
}

@media (min-width: 640px) {
  .bp-container {
    padding: 0 var(--bp-gutter);
  }
}

@media (min-width: 1024px) {
  .bp-container {
    padding: 0 var(--bp-md);
  }
}

.bp-grid {
  display: grid;
  gap: var(--bp-gutter);
}

.bp-grid-2 { grid-template-columns: 1fr; }
.bp-grid-3 { grid-template-columns: 1fr; }
.bp-grid-4 { grid-template-columns: 1fr 1fr; }

@media (min-width: 768px) {
  .bp-grid-2 { grid-template-columns: 1fr 1fr; }
  .bp-grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
  .bp-grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.bp-section {
  padding: var(--bp-lg) 0;
}

@media (min-width: 1024px) {
  .bp-section {
    padding: var(--bp-xl) 0;
  }
}

/* ============================================
   4. COMPONENTS
   ============================================ */

/* --- Buttons --- */
.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--bp-radius);
  transition: all 200ms ease;
  line-height: 1;
}

.bp-btn-primary {
  background: var(--bp-purple);
  color: #fff;
}

.bp-btn-primary:hover {
  background: var(--bp-purple-hover);
}

.bp-btn-secondary {
  background: transparent;
  color: var(--bp-text-secondary);
  padding: 12px 0;
}

.bp-btn-secondary:hover {
  color: var(--bp-text);
}

.bp-btn-outline {
  background: transparent;
  border: 1px solid var(--bp-border);
  color: var(--bp-text-secondary);
}

.bp-btn-outline:hover {
  border-color: rgba(10, 10, 10, 0.3);
  color: var(--bp-text);
}

/* --- Data Panel --- */
.bp-data-panel {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: var(--bp-surface);
  overflow: hidden;
}

.bp-data-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

.bp-data-row:last-child {
  border-bottom: none;
}

.bp-data-label {
  font-family: var(--bp-font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bp-text-secondary);
}

.bp-data-value {
  font-family: var(--bp-font-mono);
  font-size: 14px;
  color: var(--bp-text);
  text-align: right;
}

.bp-data-value.highlight {
  color: var(--bp-purple);
  font-weight: 500;
}

/* --- Card --- */
.bp-card {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: var(--bp-surface);
  overflow: hidden;
  transition: all 200ms ease;
}

.bp-card:hover {
  border-color: rgba(108, 59, 255, 0.4);
  box-shadow: 0 2px 12px rgba(108, 59, 255, 0.06);
}

.bp-card-image {
  aspect-ratio: 1;
  background: var(--bp-bg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.bp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 300ms ease;
}

.bp-card:hover .bp-card-image img {
  transform: scale(1.02);
}

.bp-card-body {
  padding: 20px;
  border-top: 1px solid var(--bp-border);
}

.bp-card-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(229, 231, 235, 0.6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- Tabs --- */
.bp-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--bp-border);
  overflow-x: auto;
}

.bp-tab {
  padding: 14px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--bp-text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color 200ms ease;
}

.bp-tab:hover {
  color: var(--bp-text);
}

.bp-tab.active {
  color: var(--bp-purple);
  border-bottom-color: var(--bp-purple);
}

.bp-tab-content {
  display: none;
  padding-top: var(--bp-md);
  max-width: 720px;
}

.bp-tab-content.active {
  display: block;
}

/* --- Spec Table --- */
.bp-spec-table {
  width: 100%;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: var(--bp-surface);
  overflow: hidden;
  border-collapse: collapse;
}

.bp-spec-table tr {
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

.bp-spec-table tr:last-child {
  border-bottom: none;
}

.bp-spec-table th {
  text-align: left;
  padding: 14px 20px;
  background: var(--bp-bg);
  font-family: var(--bp-font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bp-text-secondary);
  border-right: 1px solid rgba(229, 231, 235, 0.6);
  width: 180px;
}

.bp-spec-table td {
  padding: 14px 20px;
  font-family: var(--bp-font-mono);
  font-size: 14px;
  color: var(--bp-text);
  word-break: break-all;
}

/* --- Batch Table --- */
.bp-batch-table {
  width: 100%;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: var(--bp-surface);
  overflow: hidden;
  border-collapse: collapse;
}

.bp-batch-table thead tr {
  background: var(--bp-bg);
  border-bottom: 1px solid var(--bp-border);
}

.bp-batch-table thead th {
  text-align: left;
  padding: 14px 20px;
  font-family: var(--bp-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bp-text-secondary);
}

.bp-batch-table thead th:last-child {
  text-align: right;
}

.bp-batch-table tbody tr {
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  transition: background 200ms ease;
}

.bp-batch-table tbody tr:last-child {
  border-bottom: none;
}

.bp-batch-table tbody tr:hover {
  background: rgba(247, 248, 250, 0.5);
}

.bp-batch-table tbody td {
  padding: 16px 20px;
  font-size: 14px;
}

.bp-batch-table tbody td:last-child {
  text-align: right;
}

/* --- Purity Dot --- */
.bp-purity {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bp-purity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bp-purple);
}

/* ============================================
   5. HEADER
   ============================================ */

.bp-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  transition: all 200ms ease;
}

.bp-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bp-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bp-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--bp-radius);
  background: var(--bp-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.bp-logo-text {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--bp-text);
}

.bp-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.bp-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--bp-text-secondary);
  transition: color 200ms ease;
}

.bp-nav a:hover {
  color: var(--bp-text);
}

.bp-mobile-toggle {
  display: none;
  padding: 8px;
  color: var(--bp-text-secondary);
}

@media (max-width: 767px) {
  .bp-nav { display: none; }
  .bp-mobile-toggle { display: block; }

  .bp-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--bp-surface);
    border-bottom: 1px solid var(--bp-border);
    padding: 16px;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .bp-nav.open a {
    padding: 8px 0;
  }
}

/* ============================================
   6. HERO SECTION
   ============================================ */

.bp-hero {
  padding-top: 72px;
  min-height: 85vh;
  display: flex;
  align-items: center;
}

.bp-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding: var(--bp-lg) 0;
}

@media (min-width: 1024px) {
  .bp-hero-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 0;
  }
}

.bp-hero-content {
  max-width: 520px;
}

.bp-hero-image {
  display: flex;
  justify-content: center;
}

@media (min-width: 1024px) {
  .bp-hero-image {
    justify-content: flex-end;
  }
}

.bp-hero-image img {
  max-width: 520px;
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.08));
  animation: bp-float 6s ease-in-out infinite;
}

@keyframes bp-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.bp-hero-ctas {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: var(--bp-md);
}

/* ============================================
   7. TRUST STRIP
   ============================================ */

.bp-trust-strip {
  border-top: 1px solid var(--bp-border);
  border-bottom: 1px solid var(--bp-border);
  background: var(--bp-surface);
}

.bp-trust-strip-inner {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  overflow-x: auto;
}

.bp-trust-item {
  font-family: var(--bp-font-mono);
  font-size: 13px;
  color: var(--bp-text-secondary);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ============================================
   8. SECTIONS
   ============================================ */

.bp-section-header {
  margin-bottom: 40px;
}

.bp-section-header p {
  margin-top: 12px;
  max-width: 480px;
  font-size: 15px;
}

/* System explanation columns */
.bp-system-col {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: var(--bp-surface);
  padding: 24px;
  height: 100%;
}

.bp-system-col ul {
  list-style: none;
  margin-top: 16px;
}

.bp-system-col li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--bp-text-secondary);
}

.bp-system-col li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--bp-purple);
  margin-top: 7px;
  flex-shrink: 0;
}

/* COA Preview */
.bp-coa-card {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  background: var(--bp-bg);
  overflow: hidden;
  display: flex;
}

.bp-coa-thumb {
  width: 120px;
  flex-shrink: 0;
  background: var(--bp-surface);
  border-right: 1px solid var(--bp-border);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bp-coa-thumb img {
  width: 100%;
  opacity: 0.7;
  filter: blur(1px);
}

.bp-coa-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.bp-coa-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.bp-coa-actions a {
  font-size: 13px;
  font-weight: 500;
  color: var(--bp-purple);
  transition: text-decoration 200ms;
}

.bp-coa-actions a:hover {
  text-decoration: underline;
}

.bp-coa-actions button {
  font-size: 13px;
  font-weight: 500;
  color: var(--bp-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 200ms;
}

.bp-coa-actions button:hover {
  color: var(--bp-text);
}

/* Disclaimer */
.bp-disclaimer {
  padding: 48px 0;
  background: var(--bp-muted-bg);
  border-top: 1px solid var(--bp-border);
  text-align: center;
}

.bp-disclaimer p {
  max-width: 560px;
  margin: 12px auto 0;
  font-size: 14px;
}

/* ============================================
   9. FOOTER
   ============================================ */

.bp-footer {
  border-top: 1px solid var(--bp-border);
  background: var(--bp-surface);
  padding: var(--bp-lg) 0;
}

.bp-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 640px) {
  .bp-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .bp-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 32px;
  }
}

.bp-footer-heading {
  font-family: var(--bp-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--bp-text-secondary);
  margin-bottom: 16px;
}

.bp-footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bp-footer-links a,
.bp-footer-links span {
  font-size: 13px;
  color: var(--bp-text-secondary);
  transition: color 200ms;
}

.bp-footer-links a:hover {
  color: var(--bp-text);
}

.bp-footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--bp-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .bp-footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.bp-footer-bottom p {
  font-size: 12px;
  color: rgba(107, 114, 128, 0.6);
}

.bp-footer-bottom .bp-mono {
  font-size: 11px;
  color: rgba(107, 114, 128, 0.5);
}

/* ============================================
   10. WOOCOMMERCE OVERRIDES
   ============================================ */

/* Remove all default Woo styling */
.woocommerce .products,
.woocommerce ul.products {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--bp-gutter);
}

@media (max-width: 767px) {
  .woocommerce .products,
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .woocommerce .products,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Override Woo buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--bp-purple) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--bp-radius) !important;
  padding: 12px 24px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  font-family: var(--bp-font-sans) !important;
  transition: background 200ms ease !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--bp-purple-hover) !important;
}

/* Override Woo notices */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--bp-purple) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--bp-purple) !important;
}

/* Hide default Woo elements we don't want */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering,
.woocommerce .star-rating,
.woocommerce .price del,
.woocommerce span.onsale,
.woocommerce .related.products,
.woocommerce .up-sells,
.woocommerce .cross-sells {
  display: none !important;
}

/* Clean cart page */
.woocommerce-cart .cart-collaterals .cross-sells,
.woocommerce-cart .coupon {
  display: none !important;
}

/* Clean checkout */
.woocommerce-checkout #order_review_heading + #order_review .shop_table {
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
}

/* ============================================
   11. FORM ELEMENTS
   ============================================ */

.bp-input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius);
  font-size: 14px;
  font-family: var(--bp-font-sans);
  color: var(--bp-text);
  background: var(--bp-bg);
  transition: border-color 200ms ease;
}

.bp-input:focus {
  outline: none;
  border-color: var(--bp-purple);
}

.bp-input::placeholder {
  color: var(--bp-text-secondary);
}

.bp-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--bp-text-secondary);
  line-height: 1.6;
}

.bp-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--bp-purple);
}

/* ============================================
   12. UTILITIES
   ============================================ */

.bp-border-t { border-top: 1px solid var(--bp-border); }
.bp-border-b { border-bottom: 1px solid var(--bp-border); }
.bp-bg-white { background: var(--bp-surface); }
.bp-bg-muted { background: var(--bp-muted-bg); }
.bp-text-purple { color: var(--bp-purple); }
.bp-text-red { color: var(--bp-red); }
.bp-text-secondary { color: var(--bp-text-secondary); }
.bp-mt-xs { margin-top: var(--bp-xs); }
.bp-mt-sm { margin-top: var(--bp-sm); }
.bp-mt-md { margin-top: var(--bp-md); }
.bp-mt-lg { margin-top: var(--bp-lg); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }
