/* ============================================================
   products.css — catalog visuals
   Loaded after style.css. Reuses existing tokens (--blue-500,
   --navy-800, etc). All colors via tokens or category --cat-* vars.
   ============================================================ */

/* ---------- Section headings ---------- */
.section-h {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: var(--sp-12) 0 var(--sp-3);
  letter-spacing: -0.01em;
}
.section-h:first-child { margin-top: 0; }
.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 var(--sp-6);
  max-width: 760px;
}

.content-section-full > .container {
  display: block;
  grid-template-columns: none;
  max-width: 1240px;
}

/* ---------- Catalog hero ---------- */
.catalog-hero {
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  position: relative;
  overflow: hidden;
}
.catalog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(27, 122, 229, 0.15), transparent 60%);
  pointer-events: none;
}
.catalog-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--blue-300);
  font-weight: 700;
  margin-bottom: var(--sp-3);
}
.catalog-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 760px;
  line-height: 1.6;
  margin: var(--sp-3) 0 var(--sp-6);
}
.catalog-hero-cta { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* ---------- Quick Facts ---------- */
.quick-facts {
  background: var(--navy-800);
  border-bottom: 1px solid var(--border-glass);
  padding: var(--sp-8) 0;
}
.quick-facts-h {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-300);
  margin: 0 0 var(--sp-4);
  font-weight: 700;
}
.quick-facts-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 900px;
}
.quick-facts-list dt {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85rem;
}
.quick-facts-list dd { margin: 0; line-height: 1.55; }

/* ---------- Breadcrumb bar (sits between nav and product hero) ---------- */
/* The site nav is `position: fixed` (style.css line 282), so without an
 * explicit offset the breadcrumb-bar would render at body Y=0 and overlap
 * the nav. The 72px margin-top clears the nav band; everything below
 * stacks naturally. .product-hero already follows in normal flow. */
.breadcrumb-bar {
  margin-top: 72px;
  background: var(--navy-800, #0b1530);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding: 18px 0 16px;
}
.breadcrumb-bar .breadcrumb {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
}
.breadcrumb-bar .breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.15s ease;
}
.breadcrumb-bar .breadcrumb a:hover { color: #fff; }
.breadcrumb-bar .breadcrumb .sep {
  color: rgba(255,255,255,0.25);
  margin: 0 8px;
}
.breadcrumb-bar .breadcrumb > span:last-child {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}

/* ---------- Product hero (detail page) ---------- */
.product-hero {
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  /* The breadcrumb-bar above provides nav clearance; hero just needs
   * normal section breathing room. */
  padding: 56px 0 var(--sp-10);
  border-bottom: 1px solid var(--border-glass);
  position: relative;
}
.product-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--cat-primary, var(--blue-500));
}
.product-hero-grid {
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: var(--sp-10);
  align-items: center;
}
.product-hero-img {
  position: relative;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: var(--sp-3);
  border: 1px solid var(--border-glass);
}
.product-hero-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.vial-img {
  animation: vial-float 3.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes vial-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .vial-img { animation: none; }
}

.product-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cat-accent, var(--blue-300));
  font-weight: 700;
  margin-bottom: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cat-icon { font-size: 1.1em; }

.product-hero-info h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 var(--sp-4);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.strength-display {
  font-weight: 500;
  opacity: 0.7;
  font-size: 0.7em;
  letter-spacing: 0;
}
.product-summary {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 var(--sp-6);
  max-width: 640px;
}

.product-quickfacts {
  display: grid;
  grid-template-columns: repeat(2, max-content 1fr);
  gap: 0.4rem 1.25rem;
  margin: 0 0 var(--sp-6);
  font-size: 0.9rem;
  padding: var(--sp-4);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid var(--border-glass);
}
.product-quickfacts dt {
  font-weight: 600;
  color: var(--blue-300);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.product-quickfacts dd { margin: 0; color: var(--text-secondary); }

.product-cta-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}
.product-cta-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  max-width: 560px;
  line-height: 1.5;
}

/* ---------- Order button (gradient) ---------- */
.btn-order {
  background: linear-gradient(135deg, #1d4ed8 0%, #0d9488 100%);
  color: #fff;
  border: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 4px 14px rgba(27, 122, 229, 0.3);
}
.btn-order:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(27, 122, 229, 0.45);
}
.btn-order:focus-visible {
  outline: 2px solid var(--blue-300);
  outline-offset: 2px;
}
.btn-large {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
  min-height: 48px;
  border-radius: 10px;
}
.btn-block { width: 100%; display: block; text-align: center; }

.inline-link-btn {
  background: none;
  border: none;
  color: var(--blue-400);
  font: inherit;
  cursor: pointer;
  padding: 0;
  border-bottom: 1px solid transparent;
  transition: all 0.2s;
}
.inline-link-btn:hover {
  color: var(--blue-300);
  border-bottom-color: var(--blue-400);
}

/* ---------- Category hero ---------- */
.category-hero { position: relative; }
.category-hero::before {
  content: "";
  position: absolute;
  top: 72px; left: 0; right: 0;
  height: 4px;
  background: var(--cat-primary, var(--blue-500));
  opacity: 0.9;
}
.category-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cat-accent, var(--blue-300));
  font-weight: 700;
  margin-bottom: var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.category-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 760px;
  line-height: 1.6;
  margin: var(--sp-3) 0 0;
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-5);
  margin: var(--sp-6) 0;
}
.product-grid-featured {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--navy-800);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.25s ease, border-color 0.2s ease;
  position: relative;
}
.product-grid[style*="--cat-primary"] .product-card {
  border-top: 3px solid var(--cat-primary);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: var(--blue-400);
}
.product-card-img {
  background: linear-gradient(180deg, #0a1628 0%, #040b18 100%);
  padding: 0;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.03); }

.product-card-body {
  padding: var(--sp-4) var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.product-card-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.25;
}
.product-card-body h3 .strength {
  font-weight: 500;
  opacity: 0.65;
  font-size: 0.85em;
  margin-left: 0.25rem;
}
.product-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
  flex: 1;
}
.card-cta {
  display: inline-flex;
  align-items: center;
  margin-top: var(--sp-3);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-400);
  letter-spacing: 0.01em;
  transition: color 0.2s, transform 0.2s;
}
.product-card:hover .card-cta { color: var(--blue-300); }
.product-card:hover .card-cta::after {
  content: "";
}

.product-card-mini { font-size: 0.9rem; }
.product-card-mini .product-card-img { aspect-ratio: 4 / 5; }

/* ---------- Category tile grid ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
  margin: var(--sp-6) 0;
}
.category-tile {
  display: flex;
  flex-direction: column;
  background: var(--navy-800);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s;
  border-top: 3px solid var(--cat-primary, var(--blue-500));
}
.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  border-color: var(--cat-accent, var(--blue-400));
}
.category-tile-img {
  background: linear-gradient(180deg, #0a1628 0%, #040b18 100%);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.category-tile-img img { width: 80%; height: auto; display: block; }
.category-tile-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.category-tile-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}
.category-tile-body p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* ---------- Filter ---------- */
.product-filter {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin: var(--sp-5) 0;
}
.product-filter input,
.product-filter select {
  padding: 0.7rem 1rem;
  background: var(--navy-800);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
}
.product-filter input { flex: 1; min-width: 220px; }
.product-filter select { min-width: 200px; }
.product-filter input:focus,
.product-filter select:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(27, 122, 229, 0.2);
}
.filter-empty {
  color: var(--text-muted);
  text-align: center;
  padding: var(--sp-6);
}

/* ---------- Sticky mobile order CTA ---------- */
.sticky-order-cta {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy-800);
  border-top: 1px solid var(--border-glass);
  padding: 0.75rem 1rem;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  align-items: center;
  gap: 0.75rem;
}
.sticky-order-info {
  flex: 1;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.sticky-order-info strong { display: block; font-weight: 700; }
.sticky-order-info span { color: var(--text-muted); font-size: 0.8rem; }
.sticky-order-cta .btn-order {
  padding: 0.7rem 1.1rem;
  font-size: 0.95rem;
  border-radius: 8px;
  white-space: nowrap;
  min-height: 44px;
}

@media (max-width: 768px) {
  .sticky-order-cta { display: flex; }
  body.has-sticky-cta { padding-bottom: 80px; }
}

/* ---------- Order modal ---------- */
.order-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(640px, 96vw);
  width: 100%;
  border-radius: 14px;
  color: inherit;
  /* Native <dialog> centering — without these the dialog drifts to the
   * left in some browsers (Chrome/Safari were reported pinning it to the
   * top-left of the viewport). inset:0 + margin:auto is the standard
   * dialog-centering recipe; position:fixed locks it during scroll. */
  position: fixed;
  inset: 0;
  margin: auto;
  height: fit-content;
  max-height: 92vh;
}
.order-modal::backdrop {
  background: rgba(2, 7, 18, 0.78);
  backdrop-filter: blur(4px);
}
.order-modal-inner {
  background: var(--navy-800);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  padding: var(--sp-6);
  position: relative;
  max-height: 92vh;
  overflow-y: auto;
}
.order-modal-close {
  position: absolute;
  top: 0.75rem; right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.order-modal-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }

.order-modal h2 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0 0 var(--sp-3);
  padding-right: 2.5rem;
  font-weight: 700;
}
.order-modal-sub {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0 0 var(--sp-5);
}
.order-modal-sub strong { color: var(--text-primary); }

.order-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
}
.order-field { display: flex; flex-direction: column; gap: 0.3rem; }
.order-field-wide { grid-column: 1 / -1; }
.order-field span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--blue-300);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.order-field em { color: #fb7185; font-style: normal; margin-left: 2px; }
.order-field input,
.order-field select,
.order-field textarea {
  padding: 0.65rem 0.85rem;
  background: var(--navy-900);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}
.order-field textarea { resize: vertical; min-height: 70px; }
.order-field input:focus,
.order-field select:focus,
.order-field textarea:focus {
  outline: none;
  border-color: var(--blue-400);
  box-shadow: 0 0 0 3px rgba(27, 122, 229, 0.2);
}

.order-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
  flex-wrap: wrap;
}
.order-actions .btn { flex: 1; min-width: 160px; }

.order-status {
  margin-top: var(--sp-4);
  padding: 0;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.order-status:not(:empty) { padding: var(--sp-3) var(--sp-4); }
.order-status.success { background: rgba(13, 148, 136, 0.15); border: 1px solid #0d9488; color: #5eead4; }
.order-status.error   { background: rgba(190, 18, 60, 0.15); border: 1px solid #be123c; color: #fb7185; }

.order-disclaimer {
  margin-top: var(--sp-4);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}
.order-disclaimer strong { color: var(--text-secondary); }

@media (max-width: 560px) {
  .order-grid { grid-template-columns: 1fr; }
  .order-field-wide { grid-column: auto; }
}

/* ---------- Related grid + sections ---------- */
.related-section {
  background: var(--navy-800);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
  padding: var(--sp-10) 0;
}
.related-h {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--sp-5);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
}

/* ---------- Docs xlink card on product page ---------- */
.docs-xlink-card {
  background: linear-gradient(135deg, var(--blue-500), #0d9488);
  border-radius: 12px;
  padding: var(--sp-5);
  color: #fff;
}
.docs-xlink-card h3 { color: #fff; margin: 0 0 var(--sp-2); font-size: 1.05rem; }
.docs-xlink-card p { color: rgba(255,255,255,0.85); font-size: 0.88rem; margin: 0 0 var(--sp-3); }
.docs-xlink-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.docs-xlink-card .btn-outline { color: #fff; border-color: rgba(255,255,255,0.5); }
.docs-xlink-card .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* ---------- CTA card variant for order ---------- */
.cta-card-order {
  background: linear-gradient(135deg, rgba(29, 78, 216, 0.18), rgba(13, 148, 136, 0.15));
  border-color: rgba(96, 165, 250, 0.4);
}

/* ---------- Research disclaimer block ---------- */
.research-disclaimer {
  background: rgba(190, 18, 60, 0.08);
  border-left: 3px solid #fb7185;
  padding: var(--sp-3) var(--sp-4);
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: var(--sp-4) 0;
}
.research-disclaimer strong { color: #fb7185; }

/* ---------- Mobile responsive ---------- */
@media (max-width: 900px) {
  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .product-hero-img {
    max-width: 360px;
    margin: 0 auto;
  }
  .product-hero {
    padding-top: 32px;
  }
  .breadcrumb-bar {
    margin-top: 60px;
    padding: 14px 0 12px;
  }
}

@media (max-width: 600px) {
  .product-quickfacts {
    grid-template-columns: max-content 1fr;
  }
  .product-cta-row { flex-direction: column; }
  .product-cta-row .btn { width: 100%; }
  .catalog-hero-cta .btn { width: 100%; }
}
