@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Colors for Light Theme */
  --bg-light: oklch(98% 0.005 240);
  --card-bg-light: rgba(255, 255, 255, 0.7);
  --card-border-light: rgba(226, 232, 240, 0.8);
  --text-primary-light: oklch(25% 0.02 240);
  --text-secondary-light: oklch(45% 0.02 240);
  --brand-primary-light: oklch(52% 0.19 236); /* Deep Tech Blue */
  --brand-accent-light: oklch(62% 0.17 195);  /* Cyber Cyan */
  --brand-success-light: oklch(65% 0.15 150); /* Health Mint */
  --brand-danger-light: oklch(55% 0.22 27);    /* Warning Amber */
  --shadow-color-light: rgba(148, 163, 184, 0.12);

  /* Colors for Dark Theme */
  --bg-dark: oklch(14% 0.024 235);            /* Midnight Indigo */
  --card-bg-dark: rgba(15, 23, 42, 0.65);
  --card-border-dark: rgba(51, 65, 85, 0.45);
  --text-primary-dark: oklch(93% 0.015 235);
  --text-secondary-dark: oklch(70% 0.02 235);
  --brand-primary-dark: oklch(65% 0.18 236);
  --brand-accent-dark: oklch(80% 0.15 195);
  --brand-success-dark: oklch(82% 0.12 150);
  --brand-danger-dark: oklch(72% 0.16 27);
  --shadow-color-dark: rgba(0, 0, 0, 0.4);

  /* Dynamic variables that automatically map based on scheme */
  --bg: light-dark(var(--bg-light), var(--bg-dark));
  --card-bg: light-dark(var(--card-bg-light), var(--card-bg-dark));
  --card-border: light-dark(var(--card-border-light), var(--card-border-dark));
  --text-primary: light-dark(var(--text-primary-light), var(--text-primary-dark));
  --text-secondary: light-dark(var(--text-secondary-light), var(--text-secondary-dark));
  
  --brand-primary: light-dark(var(--brand-primary-light), var(--brand-primary-dark));
  --brand-accent: light-dark(var(--brand-accent-light), var(--brand-accent-dark));
  --brand-success: light-dark(var(--brand-success-light), var(--brand-success-dark));
  --brand-danger: light-dark(var(--brand-danger-light), var(--brand-danger-dark));
  --shadow-color: light-dark(var(--shadow-color-light), var(--shadow-color-dark));

  /* UI Accent & Scrollbar Colors */
  --scrollbar-track: light-dark(rgba(0,0,0,0.03), rgba(255,255,255,0.02));
  --scrollbar-thumb: light-dark(rgba(0,0,0,0.15), rgba(255,255,255,0.12));
  --scrollbar-thumb-hover: light-dark(rgba(0,0,0,0.25), rgba(255,255,255,0.22));

  /* Setup base standard scheme */
  color-scheme: light dark;
  accent-color: var(--brand-primary);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Fallback for browsers without light-dark() support (e.g. older engines) */
@supports not (color: light-dark(white, black)) {
  :root {
    --bg: var(--bg-dark);
    --card-bg: var(--card-bg-dark);
    --card-border: var(--card-border-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --brand-primary: var(--brand-primary-dark);
    --brand-accent: var(--brand-accent-dark);
    --brand-success: var(--brand-success-dark);
    --brand-danger: var(--brand-danger-dark);
    --shadow-color: var(--shadow-color-dark);
  }
  
  @media (prefers-color-scheme: light) {
    :root {
      --bg: var(--bg-light);
      --card-bg: var(--card-bg-light);
      --card-border: var(--card-border-light);
      --text-primary: var(--text-primary-light);
      --text-secondary: var(--text-secondary-light);
      --brand-primary: var(--brand-primary-light);
      --brand-accent: var(--brand-accent-light);
      --brand-success: var(--brand-success-light);
      --brand-danger: var(--brand-danger-light);
      --shadow-color: var(--shadow-color-light);
    }
  }
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Custom Gutter & Scrollbar styling for Webkit */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
  }
}

/* Custom Utility Classes */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.glass {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px -10px var(--shadow-color);
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 70px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--card-border);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  height: 52px;
  text-decoration: none;
}

.logo-svg {
  height: 100%;
  width: auto;
  display: block;
}

nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-accent);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-accent);
  transition: width 0.2s ease;
}

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

.actions-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle-btn, .cart-trigger-btn {
  background: none;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover, .cart-trigger-btn:hover {
  background-color: var(--card-border);
  transform: translateY(-2px);
  color: var(--brand-accent);
}

.cart-trigger-btn {
  position: relative;
}

.cart-count-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--brand-accent);
  color: oklch(10% 0.01 240);
  font-size: 10px;
  font-weight: 800;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* Hero Section */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: radial-gradient(circle at top, light-dark(rgba(79, 172, 254, 0.05), rgba(0, 242, 254, 0.03)), transparent 60%);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text-primary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 650px;
  margin: 0 auto 32px;
}

.hero-compliance-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  background: light-dark(rgba(79,172,254,0.1), rgba(0,242,254,0.08));
  border: 1px dashed var(--brand-primary);
  margin-bottom: 24px;
}

.search-filter-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.search-box-wrapper {
  position: relative;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  border-radius: 99px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-input:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.15);
}

.search-icon-svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
  width: 18px;
  height: 18px;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 8px 20px;
  border-radius: 99px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-tab:hover, .category-tab.active {
  background: var(--brand-primary);
  color: light-dark(#ffffff, oklch(14% 0.024 235));
  border-color: var(--brand-primary);
  box-shadow: 0 4px 12px rgba(79, 172, 254, 0.25);
}

/* Products Section */
.products-section {
  padding: 20px 0 80px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.product-card {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -15px var(--shadow-color);
  border-color: var(--brand-accent);
}

.product-image-wrapper {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: radial-gradient(circle at center, light-dark(rgba(0, 242, 254, 0.05), rgba(0, 242, 254, 0.02)), transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border-bottom: 1px solid var(--card-border);
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.product-card:hover .product-card-image {
  transform: scale(1.05);
}

.product-card-header {
  padding: 24px 24px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.purity-badge {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: light-dark(rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.15));
  color: var(--brand-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.cas-number {
  font-size: 11px;
  color: var(--text-secondary);
  font-family: monospace;
}

.product-card-body {
  padding: 0 24px 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.product-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.product-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 20px;
  border: 1px solid var(--card-border);
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-label {
  color: var(--text-secondary);
}

.spec-val {
  font-weight: 600;
  font-family: monospace;
}

.product-card-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  margin-top: auto;
  padding-top: 16px;
}

.price-tag {
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-accent);
}

.price-unit {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.btn-primary-sm {
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--brand-primary);
  color: light-dark(#ffffff, oklch(14% 0.024 235));
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary-sm:hover {
  background: var(--brand-accent);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
  transform: translateY(-1px);
}

/* Pillars Section */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.pillar-card {
  padding: 32px 24px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-accent);
}

.pillar-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0, 242, 254, 0.08);
  color: var(--brand-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border: 1px solid rgba(0, 242, 254, 0.2);
}

.pillar-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.pillar-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Compliance Banner / Disclaimers on Product List */
.compliance-banner-section {
  padding: 40px 0;
  background-color: light-dark(rgba(244, 63, 94, 0.03), rgba(244, 63, 94, 0.02));
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}

.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.compliance-card {
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid var(--brand-danger);
}

.compliance-card h3 {
  font-size: 16px;
  color: var(--brand-danger);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.compliance-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Entrance Compliance Gate Modal */
.dialog-modal {
  margin: auto;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  box-shadow: 0 25px 50px -12px var(--shadow-color);
  max-width: 600px;
  width: calc(100% - 32px);
  padding: 32px;
  outline: none;
}

.dialog-modal::backdrop {
  background-color: rgba(10, 15, 30, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Animations for dialog entrance using starting-style */
.dialog-modal[open] {
  opacity: 1;
  transform: scale(1);

  @starting-style {
    opacity: 0;
    transform: scale(0.95);
  }
}

.dialog-modal {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.3s allow-discrete, transform 0.3s allow-discrete, display 0.3s allow-discrete, overlay 0.3s allow-discrete;
}

.dialog-modal::backdrop {
  opacity: 0;
  transition: opacity 0.3s allow-discrete, backdrop-filter 0.3s allow-discrete;
}

.dialog-modal[open]::backdrop {
  opacity: 1;
  @starting-style {
    opacity: 0;
  }
}

.compliance-gate-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
}

.compliance-gate-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.warning-icon {
  width: 48px;
  height: 48px;
  color: var(--brand-danger);
}

.compliance-gate-title {
  font-size: 24px;
  color: var(--text-primary);
}

.compliance-gate-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: left;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  max-height: 200px;
  overflow-y: auto;
}

.compliance-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 10px 0;
}

.checkbox-label {
  display: flex;
  gap: 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-primary);
}

.checkbox-label input {
  margin-top: 3px;
  cursor: pointer;
}

.gate-buttons {
  display: flex;
  gap: 16px;
}

.btn-decline {
  flex: 1;
  padding: 12px;
  border-radius: 99px;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-decline:hover {
  background: var(--card-border);
  color: var(--text-primary);
}

.btn-accept {
  flex: 2;
  padding: 12px;
  border-radius: 99px;
  background: var(--brand-primary);
  color: light-dark(#ffffff, oklch(14% 0.024 235));
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-accept:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--text-secondary);
}

.btn-accept:not(:disabled):hover {
  background: var(--brand-accent);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

/* Product Detail Modal View */
.product-detail-modal {
  max-width: 800px;
  padding: 0;
  overflow: hidden;
  border-radius: 20px;
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .product-detail-layout {
    grid-template-columns: 1fr 1.2fr;
  }
}

.product-detail-visual {
  background: radial-gradient(circle at center, light-dark(rgba(79, 172, 254, 0.1), rgba(0, 242, 254, 0.05)), var(--bg));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  border-bottom: 1px solid var(--card-border);
}

@media (min-width: 768px) {
  .product-detail-visual {
    border-bottom: none;
    border-right: 1px solid var(--card-border);
  }
}

.product-image-render {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float-animation 6s ease-in-out infinite;
}

@keyframes float-animation {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.detail-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  filter: drop-shadow(0 15px 30px var(--shadow-color));
}

.product-detail-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow-y: auto;
}

.detail-close-btn {
  align-self: flex-end;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.detail-close-btn:hover {
  color: var(--text-primary);
}

.detail-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
  padding: 16px;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.detail-spec-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-spec-item span:first-child {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-spec-item span:last-child {
  font-size: 13px;
  font-weight: 600;
  font-family: monospace;
}

.detail-compliance-warning {
  margin: 16px 0;
  padding: 14px 16px;
  background: light-dark(rgba(244, 63, 94, 0.05), rgba(244, 63, 94, 0.03));
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: var(--brand-danger);
  line-height: 1.5;
  font-weight: 500;
}

.detail-coa-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  margin-bottom: 24px;
}

.coa-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coa-badge {
  background: light-dark(rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.2));
  color: var(--brand-success);
  font-weight: 700;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.coa-download-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-primary);
  text-decoration: none;
}

.coa-download-btn:hover {
  text-decoration: underline;
}

/* 5. COA Dialog Modal Specifics */
.coa-modal {
  max-width: 760px !important;
  width: calc(100% - 32px);
  padding: 0 !important;
  overflow: hidden;
  border-radius: 20px;
}

.coa-modal-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}

.coa-header {
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 16px;
}

.coa-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .coa-grid {
    grid-template-columns: 1fr 1.3fr;
  }
}

.coa-meta-pane {
  background: light-dark(rgba(0, 0, 0, 0.02), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.coa-meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid light-dark(rgba(0, 0, 0, 0.04), rgba(255, 255, 255, 0.04));
  padding-bottom: 10px;
  gap: 12px;
}

.coa-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.meta-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: monospace;
  text-align: right;
}

.coa-chart-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.coa-chart-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coa-svg-wrapper {
  background: light-dark(#ffffff, #0a0f1d);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: inset 0 2px 8px light-dark(rgba(0,0,0,0.05), rgba(0,0,0,0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2/1.1;
  min-height: 200px;
}

.hplc-graph {
  width: 100%;
  height: 100%;
  display: block;
}

.coa-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--card-border);
  padding-top: 20px;
  gap: 16px;
  flex-wrap: wrap;
}

/* Print Stylesheet for High Fidelity COA Downloads */
@media print {
  body > *:not(#coa-modal) {
    display: none !important;
  }
  
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  
  #coa-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    background: #ffffff !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
  }

  .coa-modal-content {
    padding: 0 !important;
  }

  .detail-close-btn,
  .coa-footer button {
    display: none !important;
  }

  .coa-meta-pane, 
  .coa-svg-wrapper {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
  }

  .meta-value, 
  .meta-label, 
  .coa-chart-title,
  .coa-header h2,
  .coa-header p {
    color: #0f172a !important;
  }

  /* Force print colored text backgrounds/borders */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

.detail-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.detail-price-wrapper {
  display: flex;
  flex-direction: column;
}

.detail-price {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand-accent);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.qty-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
}

.qty-btn:hover {
  background: var(--card-border);
}

.qty-val {
  font-weight: 600;
  font-size: 14px;
  width: 24px;
  text-align: center;
}

/* Cart Slide-out Panel */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h2 {
  font-size: 20px;
}

.cart-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
}

.cart-close-btn:hover {
  color: var(--text-primary);
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-secondary);
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 16px;
}

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

.cart-item-title {
  font-size: 15px;
  font-weight: 600;
}

.cart-item-specs {
  font-size: 11px;
  color: var(--text-secondary);
}

.cart-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-accent);
  margin-top: 4px;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--brand-danger);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  align-self: flex-start;
}

.cart-item-remove:hover {
  text-decoration: underline;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
}

.cart-total-price {
  color: var(--brand-accent);
}

.btn-checkout {
  width: 100%;
  padding: 14px;
  border-radius: 99px;
  background: var(--brand-primary);
  color: light-dark(#ffffff, oklch(14% 0.024 235));
  border: none;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-checkout:hover {
  background: var(--brand-accent);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 15, 30, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

/* Checkout Wizard Modal */
.checkout-modal {
  max-width: 650px;
}

.checkout-wizard {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-bottom: 8px;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--card-border);
  z-index: 1;
}

.wizard-step-progress {
  position: absolute;
  top: 14px;
  left: 0;
  height: 2px;
  background: var(--brand-primary);
  z-index: 1;
  transition: width 0.3s ease;
  width: 0%;
}

.step-node {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  z-index: 2;
  transition: all 0.3s ease;
}

.step-node.active {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.step-node.completed {
  border-color: var(--brand-primary);
  background: var(--brand-primary);
  color: light-dark(#ffffff, oklch(14% 0.024 235));
}

.wizard-pane {
  display: none;
}

.wizard-pane.active {
  display: block;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-group input, .form-group select {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-primary);
  outline: none;
  font-size: 14px;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--brand-primary);
}

.form-feedback {
  font-size: 12px;
  color: var(--brand-danger);
  display: none;
}

/* Wizard navigation */
.wizard-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.checkout-summary-box {
  padding: 16px;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  border-radius: 12px;
  border: 1px solid var(--card-border);
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.summary-item:last-child {
  border-top: 1px solid var(--card-border);
  padding-top: 8px;
  font-weight: 700;
  font-size: 15px;
}

/* Payment Mocks styling */
.payment-selector {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--card-bg);
}

.payment-option:hover {
  border-color: var(--brand-primary);
}

.payment-option.selected {
  border-color: var(--brand-accent);
  background: light-dark(rgba(0, 242, 254, 0.03), rgba(0, 242, 254, 0.01));
}

.payment-option-text h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.payment-option-text p {
  font-size: 11px;
  color: var(--text-secondary);
}

.mock-payment-pane {
  margin-top: 20px;
  padding: 20px;
  border-radius: 12px;
  background: light-dark(rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  border: 1px solid var(--card-border);
  display: none;
}

.mock-payment-pane.active {
  display: block;
}

/* Open banking details style */
.open-banking-mock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.qr-code-placeholder {
  width: 140px;
  height: 140px;
  background: white;
  padding: 8px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ccc;
}

.qr-code-placeholder img {
  width: 100%;
  height: 100%;
}

.bank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
  margin: 12px 0;
}

.bank-btn {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: white;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  color: #333;
}

.bank-btn:hover {
  border-color: var(--brand-primary);
}

/* Card Mock styling */
.card-details-mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Success View */
.success-screen {
  text-align: center;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.success-icon {
  width: 64px;
  height: 64px;
  color: var(--brand-success);
}

/* Footer styling */
footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding: 48px 0;
  background-color: light-dark(rgba(0,0,0,0.01), rgba(255,255,255,0.01));
}

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

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

.footer-col h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.footer-col p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-accent);
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: var(--text-secondary);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* Icons */
.svg-icon {
  display: inline-block;
  width: 24px;
  height: 24px;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* Responsive Overrides */
@media (max-width: 768px) {
  .hero-title {
    font-size: 36px;
  }
}

/* --- Premium Motion & Micro-Animations --- */

/* 1. Staggered Product Card Entry Fade & Slide */
.product-card {
  opacity: 0;
  transform: translateY(16px);
  animation: card-entry 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.product-card:nth-child(1) { animation-delay: 0.04s; }
.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.12s; }
.product-card:nth-child(4) { animation-delay: 0.16s; }
.product-card:nth-child(5) { animation-delay: 0.20s; }
.product-card:nth-child(6) { animation-delay: 0.24s; }
.product-card:nth-child(7) { animation-delay: 0.28s; }
.product-card:nth-child(8) { animation-delay: 0.32s; }
.product-card:nth-child(9) { animation-delay: 0.36s; }
.product-card:nth-child(10) { animation-delay: 0.40s; }
.product-card:nth-child(11) { animation-delay: 0.44s; }
.product-card:nth-child(12) { animation-delay: 0.48s; }

@keyframes card-entry {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 2. Interactive SVG HPLC Path Drawing on Modal Load */
.coa-modal[open] .hplc-graph path {
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  animation: draw-hplc-line 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.3s;
}

@keyframes draw-hplc-line {
  to {
    stroke-dashoffset: 0;
  }
}

/* 3. HPLC Peak Annotation Fade In */
.coa-modal[open] .hplc-graph g {
  opacity: 0;
  transform: translateY(4px);
  transform-origin: center;
  animation: fade-in-annotation 0.4s ease-out forwards;
  animation-delay: 1.9s;
}

@keyframes fade-in-annotation {
  to {
    opacity: 0.9;
    transform: translateY(0);
  }
}

/* 4. Active pulse for key CTA triggers (e.g. view certificate) */
.coa-badge {
  position: relative;
  overflow: hidden;
}

.coa-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer-badge 3s infinite linear;
}

@keyframes shimmer-badge {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* --- Discount Code UI Styling --- */
.discount-container {
  display: flex;
  flex-direction: column;
}

.discount-message {
  font-size: 11px;
  margin-top: 6px;
  font-weight: 600;
  border-radius: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
}

.discount-message.success {
  color: var(--brand-success);
  background: light-dark(rgba(16, 185, 129, 0.05), rgba(16, 185, 129, 0.03));
  border-color: rgba(16, 185, 129, 0.15);
}

.discount-message.error {
  color: var(--brand-danger);
  background: light-dark(rgba(244, 63, 94, 0.05), rgba(244, 63, 94, 0.03));
  border-color: rgba(244, 63, 94, 0.15);
}

.cart-total-row.discount-row {
  color: var(--brand-success);
  font-size: 13px;
  margin-top: 4px;
}
