/* ==========================================================================
   Aivabio Clinical Precision Commerce — Store Design System
   Matches DESIGN.md specifications & docs/design wireframe
   ========================================================================== */

/* Fonts are self-hosted in assets/fonts/fonts.css (Cairo, Inter, Domine) — no external CDN. */

:root {
  --primary: #0B2545;
  --primary-dark: #00142E;
  --primary-light: #132E58;
  --secondary: #00A699;
  --secondary-hover: #008b80;
  --secondary-subtle: rgba(0, 166, 153, 0.08);
  --secondary-border: rgba(0, 166, 153, 0.25);
  --mint-accent: #53D6A4;
  --mint-subtle: rgba(83, 214, 164, 0.12);
  --clinical-cyan: #38B2AC;
  --distribution-blue: #228BE6;
  --navy-deep: #00142E;
  
  --surface-canvas: #FAF8FF;
  --surface-light: #FFFFFF;
  --surface-subtle: #F8FAFC;
  --surface-muted: #F1F5F9;
  --surface-border: #E2E8F0;
  --surface-border-strong: #CBD5E1;
  
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-inverse: #FFFFFF;
  
  --font-serif: 'Domine', Georgia, 'Cairo', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Cairo', sans-serif;
  --font-arabic: 'Cairo', 'Inter', -apple-system, sans-serif;
  
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
  
  --shadow-micro: 0 1px 3px 0 rgba(11, 37, 69, 0.04);
  --shadow-sm: 0 4px 12px -2px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 10px 25px -4px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 20px 40px -8px rgba(11, 37, 69, 0.14);
  --shadow-drawer: -8px 0 30px rgba(0, 20, 46, 0.25);
  
  --container-max: 1380px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
  font-family: var(--font-sans);
  background-color: var(--surface-canvas);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.rtl {
  font-family: var(--font-arabic);
  direction: rtl;
  text-align: right;
}

body.ltr {
  direction: ltr;
  text-align: left;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

button, input, select, textarea {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ==========================================================================
   Utility Top Bar (Alpha Group Line Button & Procurement Credentials)
   ========================================================================== */
.top-utility-bar {
  background-color: var(--navy-deep);
  color: #C4C6CF;
  font-size: 12px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  z-index: 50;
}

.top-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.45rem;
  gap: 1rem;
}

.alphagroup-line-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #F8FAFC;
  background: rgba(255, 255, 255, 0.07);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: all var(--transition-fast);
}

.alphagroup-line-button:hover {
  background: rgba(34, 139, 230, 0.2);
  border-color: var(--distribution-blue);
  color: #FFFFFF;
}

.alphagroup-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--mint-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--mint-accent);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.top-utility-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.utility-badge-sfda {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--mint-accent);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.lang-switch-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #E2E8F0;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all var(--transition-fast);
}

.lang-switch-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

/* ==========================================================================
   Main Header (Centered Brand Architecture with Motion Graphic Heartbeat)
   ========================================================================== */
.main-header {
  background-color: var(--surface-light);
  border-bottom: 1px solid var(--surface-border);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: var(--shadow-micro);
}

.header-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-block: 0.75rem;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-search-bar {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.header-search-input {
  width: 100%;
  padding: 0.55rem 1rem;
  padding-inline-start: 2.25rem;
  background-color: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.header-search-input:focus {
  outline: none;
  border-color: var(--secondary);
  background-color: var(--surface-light);
  box-shadow: 0 0 0 3px var(--secondary-subtle);
}

.header-search-icon {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.75rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Center Logo with Motion Graphic Heartbeat Line */
.header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.brand-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  position: relative;
  padding-inline: 1rem;
}

.brand-logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: transform var(--transition-fast);
}

.brand-wrapper:hover .brand-logo-img {
  transform: scale(1.02);
}

/* Motion Graphic Heartbeat underneath logo */
.brand-heartbeat-anim {
  width: 160px;
  height: 18px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
}

.brand-heartbeat-svg {
  width: 100%;
  height: 100%;
  stroke: var(--secondary);
  stroke-width: 1.8;
  fill: none;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: pulse-heartbeat 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse-heartbeat {
  0% {
    stroke-dashoffset: 200;
    opacity: 0.2;
  }
  30% {
    opacity: 1;
  }
  60%, 100% {
    stroke-dashoffset: 0;
    opacity: 0.8;
  }
}

.brand-tagline-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  margin-top: 1px;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-header-rfq {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--secondary);
  border: 1.5px solid var(--secondary);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-header-rfq:hover {
  background: var(--secondary);
  color: #FFFFFF;
}

.btn-header-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #FFFFFF;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  gap: 0.5rem;
  transition: background var(--transition-fast);
}

.btn-header-cart:hover {
  background: var(--primary-light);
}

.cart-count-badge {
  background: var(--mint-accent);
  color: var(--navy-deep);
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Category Matrix Sub-navigation Tier */
.nav-matrix-tier {
  background-color: var(--surface-light);
  border-bottom: 1px solid var(--surface-border);
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.nav-matrix-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.25rem;
  padding-block: 0.25rem;
}

.nav-matrix-item a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-matrix-item a:hover,
.nav-matrix-item.active a {
  color: var(--primary);
  background-color: var(--surface-subtle);
  font-weight: 600;
}

/* ==========================================================================
   HERO SECTION (Video Background + Moving Heartbeat Hero + Statements Slider)
   ========================================================================== */
.hero-clinical {
  position: relative;
  background-color: var(--navy-deep);
  color: #FFFFFF;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.2) contrast(1.1);
  pointer-events: none;
  z-index: 1;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(0, 166, 153, 0.15) 0%, rgba(11, 37, 69, 0.85) 60%, rgba(0, 20, 46, 0.95) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Continuous Moving ECG Heartbeat Across Hero (matches layoutidea.jpg wireframe) */
.hero-heartbeat-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  /* Fade the top half so the motion lives at the hero edge, never behind text */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
}

.hero-heartbeat-wave {
  width: 200%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  animation: move-ecg-wave 12s linear infinite;
}

@keyframes move-ecg-wave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.hero-content {
  position: relative;
  z-index: 4;
  padding-block: 4rem;
  max-width: 820px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(83, 214, 164, 0.12);
  border: 1px solid rgba(83, 214, 164, 0.35);
  color: var(--mint-accent);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.hero-statements-slider {
  position: relative;
  min-height: 120px;
}

.hero-statement {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 1rem;
  display: none;
  animation: fadeInStatement 0.6s ease forwards;
}

.hero-statement.active {
  display: block;
}

@keyframes fadeInStatement {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-statement-indicators {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.statement-dot {
  width: 24px;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.statement-dot.active {
  width: 44px;
  background: var(--mint-accent);
}

.hero-description {
  font-size: 16px;
  line-height: 1.7;
  color: #C9D6E3;
  margin-bottom: 2rem;
  max-width: 700px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--secondary);
  color: #FFFFFF;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 166, 153, 0.35);
}

.btn-primary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 166, 153, 0.45);
}

.btn-outline-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #FFFFFF;
}

.hero-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-stat-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hero-stat-number {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--mint-accent);
  white-space: nowrap;
}

/* English stat strings are much longer — scale down to stay on one line */
body.ltr .hero-stat-number { font-size: 19px; }

.hero-stat-label {
  font-size: 12px;
  color: #94A3B8;
  line-height: 1.3;
}

/* ==========================================================================
   Section Headers & Common Layout
   ========================================================================== */
.section-pad {
  padding-block: 4rem;
}

.section-head {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.section-subtitle {
  font-size: 15px;
  color: var(--text-muted);
}

.section-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--secondary);
  font-weight: 600;
  font-size: 14px;
}

.section-view-all:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Featured Products Grid & Product Cards (DESIGN.md specifications)
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background-color: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.product-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.product-card-head {
  padding: 0.6rem 0.85rem;
  background-color: var(--surface-subtle);
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

.product-sku-pill {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.product-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--mint-subtle);
  color: var(--secondary);
  border: 1px solid rgba(83, 214, 164, 0.35);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
}

.product-card-img-wrap {
  position: relative;
  background-color: var(--surface-subtle);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  overflow: hidden;
}

.product-card-img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

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

.product-cert-badge {
  position: absolute;
  bottom: 0.5rem;
  inset-inline-start: 0.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--surface-border);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-xs);
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: var(--shadow-micro);
}

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

.product-card-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--clinical-cyan);
  margin-bottom: 0.35rem;
}

.product-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.product-card-title a:hover {
  color: var(--secondary);
}

.product-card-price-box {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--surface-border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.product-card-price {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
}

.product-card-original-price {
  font-size: 12px;
  color: var(--text-light);
  text-decoration: line-through;
}

.product-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.btn-card-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background-color: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-card-add:hover {
  background-color: var(--secondary);
}

.btn-card-rfq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-subtle);
  color: var(--primary);
  border: 1px solid var(--surface-border);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-card-rfq:hover {
  background: #FFFFFF;
  border-color: var(--secondary);
  color: var(--secondary);
}

/* ==========================================================================
   Known Medical Brands / Manufacturers (Yuwell, Zerone, Yonker, BTL, etc.)
   ========================================================================== */
.brands-section {
  background-color: var(--surface-light);
  border-block: 1px solid var(--surface-border);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.brand-card {
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.brand-card:hover {
  border-color: var(--clinical-cyan);
  background: #FFFFFF;
  box-shadow: var(--shadow-micro);
}

.brand-card-logo-wrap {
  background: #FFFFFF;
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 8px 14px;
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.brand-card-logo {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.brand-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.brand-card-country {
  font-size: 11px;
  color: var(--text-muted);
}

.brand-card-spec {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 10px;
  font-weight: 600;
  color: var(--secondary);
  background: var(--secondary-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

/* Trust Badges Strip */
.trust-badges-bar {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.trust-badge-icon {
  width: 38px;
  height: 38px;
  background: #FFFFFF;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary);
  flex-shrink: 0;
}

.trust-badge-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.trust-badge-text p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ==========================================================================
   Category Cards Matrix
   ========================================================================== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background-color: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 4px;
  height: 100%;
  background-color: transparent;
  transition: background-color var(--transition-fast);
}

.category-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.category-card:hover::before {
  background-color: var(--secondary);
}

.category-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.category-card-icon {
  width: 44px;
  height: 44px;
  background-color: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.category-card-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-subtle);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.category-card-title {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.category-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.category-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.category-card-link:hover {
  color: var(--secondary-hover);
}

/* ==========================================================================
   Footer Section with Heartbeat Pulse Wave Divider
   ========================================================================== */
.footer-wrapper {
  background-color: var(--navy-deep);
  color: #FFFFFF;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

/* Video background (same branding treatment as the hero) */
.footer-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.2) contrast(1.1);
  pointer-events: none;
  z-index: 0;
}

.footer-gradient-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0, 166, 153, 0.12) 0%, rgba(11, 37, 69, 0.82) 55%, rgba(0, 20, 46, 0.94) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Footer content floats above the video */
.footer-heartbeat-divider,
.footer-main,
.footer-bottom {
  position: relative;
  z-index: 2;
}

/* Moving Heartbeat Wave Top Divider for Footer */
.footer-heartbeat-divider {
  width: 100%;
  height: 46px;
  background-color: rgba(0, 16, 38, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.footer-heartbeat-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
  animation: move-ecg-wave 10s linear infinite;
}

.footer-main {
  padding-block: 4rem 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
}

.footer-col-brand .footer-logo-img {
  height: 72px;
  width: auto;
  margin-bottom: 1.25rem;
}

/* Dark artwork (e.g. black wordmark) shown fully white on the dark footer */
.white-logo {
  filter: brightness(0) invert(1);
}

.footer-desc {
  font-size: 13px;
  color: #94A3B8;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.footer-alpha-seal {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: #E2E8F0;
}

.footer-col-title {
  font-size: 14px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.4rem;
}

.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 24px;
  height: 2px;
  background-color: var(--secondary);
}

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

.footer-links-list a {
  font-size: 13px;
  color: #94A3B8;
  transition: color var(--transition-fast);
}

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

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 13px;
  color: #94A3B8;
  margin-bottom: 0.75rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 1.5rem;
  font-size: 12px;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-cert-tags {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cert-tag {
  color: var(--mint-accent);
  font-size: 11px;
}

/* ==========================================================================
   CATALOG PAGE (12-Column B2B Layout, Facets & Data Table Mode)
   ========================================================================== */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  padding-block: 2.5rem 4rem;
}

.catalog-sidebar {
  background-color: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  height: fit-content;
}

.filter-group {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--surface-border);
}

.filter-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-category-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 280px;
  overflow-y: auto;
}

.filter-category-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-xs);
  transition: all var(--transition-fast);
}

.filter-category-item.active a,
.filter-category-item a:hover {
  background-color: var(--surface-subtle);
  color: var(--primary);
  font-weight: 600;
}

.filter-price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.filter-input {
  width: 100%;
  padding: 0.45rem 0.65rem;
  font-size: 13px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
}

.filter-input:focus {
  outline: none;
  border-color: var(--secondary);
  background: #FFFFFF;
}

.catalog-top-controls {
  background-color: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.catalog-count-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.catalog-actions-group {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.catalog-sort-select {
  padding: 0.45rem 0.75rem;
  font-size: 13px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-light);
  color: var(--text-main);
  cursor: pointer;
}

.view-mode-toggle {
  display: inline-flex;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-btn {
  background: var(--surface-light);
  border: none;
  padding: 0.45rem 0.65rem;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.view-btn.active {
  background: var(--primary);
  color: #FFFFFF;
}

/* Catalog Table View (Procurement Data Mode) */
.procurement-table-wrap {
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.procurement-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: inherit;
}

.procurement-table th {
  background-color: var(--surface-subtle);
  color: var(--primary);
  font-weight: 700;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  white-space: nowrap;
}

.procurement-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--surface-border);
  vertical-align: middle;
}

.procurement-table tr:hover {
  background-color: rgba(248, 250, 252, 0.8);
}

.table-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: var(--surface-subtle);
  border-radius: var(--radius-xs);
  border: 1px solid var(--surface-border);
  padding: 2px;
}

/* Pagination */
.pagination-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 2.5rem;
}

.page-num-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border: 1px solid var(--surface-border);
  background: var(--surface-light);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.page-num-btn:hover,
.page-num-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  border-color: var(--primary);
}

/* ==========================================================================
   PRODUCT DETAIL PAGE (Clinical Presentation, Gallery, Specs, Wholesale Tiers)
   ========================================================================== */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding-block: 2rem 4rem;
}

.product-gallery-sticky {
  position: sticky;
  top: 90px;
}

.main-image-viewer {
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
}

.main-gallery-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
}

.thumbnails-row {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.thumbnail-btn {
  width: 68px;
  height: 68px;
  background: var(--surface-light);
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--transition-fast);
}

.thumbnail-btn.active,
.thumbnail-btn:hover {
  border-color: var(--secondary);
}

.thumbnail-btn img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.product-meta-header {
  margin-bottom: 1.5rem;
}

.meta-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.detail-product-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.product-spec-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.spec-pill-item strong {
  color: var(--text-main);
}

/* Institutional Wholesale Volume Tier Box */
.wholesale-tiers-box {
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.wholesale-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tiers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tiers-table th {
  text-align: inherit;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--surface-border);
}

.tiers-table td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--surface-border);
}

.tier-highlight {
  color: var(--secondary);
  font-weight: 700;
}

.product-buy-box {
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.price-main-display {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.unit-price-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

.qty-actions-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.qty-counter {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  overflow: hidden;
}

.qty-btn {
  background: none;
  border: none;
  width: 38px;
  height: 42px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-main);
  transition: background var(--transition-fast);
}

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

.qty-input {
  width: 50px;
  height: 42px;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 15px;
}

.qty-input:focus {
  outline: none;
}

.btn-detail-add {
  flex-grow: 1;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-detail-add:hover {
  background: var(--secondary);
}

.btn-detail-rfq {
  width: 100%;
  background: transparent;
  color: var(--secondary);
  border: 1.5px solid var(--secondary);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.btn-detail-rfq:hover {
  background: var(--secondary);
  color: #FFFFFF;
}

.btn-whatsapp-advisor {
  width: 100%;
  background: #25D366;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  transition: opacity var(--transition-fast);
}

.btn-whatsapp-advisor:hover {
  opacity: 0.9;
}

/* Product Tabs Section */
.product-tabs-wrap {
  margin-top: 3rem;
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.tabs-nav {
  display: flex;
  background: var(--surface-subtle);
  border-bottom: 1px solid var(--surface-border);
  overflow-x: auto;
}

.tab-btn {
  padding: 0.9rem 1.5rem;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-btn.active {
  color: var(--primary);
  background: #FFFFFF;
  border-bottom-color: var(--secondary);
}

.tab-content-panel {
  padding: 2rem;
  display: none;
}

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

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

.spec-cell {
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.spec-cell-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-cell-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

/* ==========================================================================
   CHECKOUT PAGE (B2B Institutional Medical Procurement Flow)
   ========================================================================== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2.5rem;
  padding-block: 2.5rem 4rem;
}

.checkout-card-step {
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

.checkout-step-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--surface-border);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 14px;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px var(--secondary-subtle);
}

.radio-card-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-sm);
  background: var(--surface-light);
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-card-option:hover {
  border-color: var(--secondary);
  background: var(--surface-subtle);
}

.radio-card-option input[type="radio"] {
  accent-color: var(--secondary);
  margin-top: 3px;
}

.radio-card-content strong {
  display: block;
  font-size: 14px;
  color: var(--primary);
}

.radio-card-content p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.checkout-sidebar {
  position: sticky;
  top: 90px;
}

.order-summary-box {
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.order-summary-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--surface-border);
}

.order-items-scroll {
  max-height: 260px;
  overflow-y: auto;
  margin-bottom: 1.25rem;
}

.summary-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px dashed var(--surface-border);
  font-size: 13px;
}

.summary-calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.summary-calc-row.total-row {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 2px solid var(--surface-border);
}

.btn-place-order {
  width: 100%;
  background: var(--secondary);
  color: #FFFFFF;
  border: none;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 14px rgba(0, 166, 153, 0.35);
}

.btn-place-order:hover {
  background: var(--secondary-hover);
}

/* ==========================================================================
   CART DRAWER & RFQ MODAL
   ========================================================================== */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.cart-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: var(--surface-light);
  z-index: 101;
  box-shadow: var(--shadow-drawer);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
}

body.rtl .cart-drawer-panel {
  left: 0;
  transform: translateX(-100%);
}

body.ltr .cart-drawer-panel {
  right: 0;
  transform: translateX(100%);
}

body.rtl .cart-drawer-overlay.open .cart-drawer-panel {
  transform: translateX(0);
}

body.ltr .cart-drawer-overlay.open .cart-drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--surface-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.drawer-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.drawer-body {
  padding: 1.25rem 1.5rem;
  flex-grow: 1;
  overflow-y: auto;
}

.drawer-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--surface-border);
}

.drawer-item-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--surface-subtle);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xs);
  padding: 2px;
}

.drawer-item-info h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.drawer-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2px;
}

.drawer-foot {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--surface-border);
  background: var(--surface-subtle);
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 37, 69, 0.6);
  backdrop-filter: blur(4px);
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  inset-inline-end: 1.25rem;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  inset-inline-end: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--navy-deep);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  border-inline-start: 4px solid var(--secondary);
  animation: slideToast 0.3s ease forwards;
}

@keyframes slideToast {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .catalog-sidebar {
    display: none;
  }
  .catalog-sidebar.drawer-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    max-height: 100vh;
    overflow-y: auto;
    border-radius: 0;
  }
  .product-detail-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-grid {
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
  }
  .header-left {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
  }
  .product-card-body {
    padding: 0.65rem;
  }
  .product-card-title {
    font-size: 13px;
    min-height: auto;
  }
}

/* ==========================================================================
   RESPONSIVE SYSTEM — Full Multi-Screen Coverage
   Breakpoints: 1024 | 768 | 480 | 375 | 320
   ========================================================================== */

/* --- Global overflow guard --- */
html {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fix minmax grids that exceed container width on narrow screens */
.categories-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.specs-data-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
}
.brands-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr));
}
.trust-badges-bar {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

/* Scrollable overflow regions */
.procurement-table-wrap,
.thumbnails-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-matrix-tier {
  scrollbar-width: none;
}
.nav-matrix-tier::-webkit-scrollbar { display: none; }

.tabs-nav {
  scrollbar-width: none;
}
.tabs-nav::-webkit-scrollbar { display: none; }

/* ==========================================================================
   1024px — Tablet Landscape (supplements existing block above)
   ========================================================================== */
@media (max-width: 1024px) {
  .section-pad { padding-block: 3rem; }
  .checkout-sidebar { position: static; }
  .hero-content { max-width: 100%; }
  .footer-grid { gap: 1.75rem; }
}

/* ==========================================================================
   768px — Tablet Portrait / Large Mobile (supplements existing block above)
   ========================================================================== */
@media (max-width: 768px) {
  .container { padding-inline: 1rem; }
  .section-pad { padding-block: 2.5rem; }
  .section-head { flex-wrap: wrap; }

  /* Hero */
  .hero-clinical { min-height: 420px; }
  .hero-content { padding-block: 2.5rem; }
  .hero-description { font-size: 14px; }
  .hero-stats-row { gap: 1.25rem; }
  .hero-stat-number { font-size: 18px; }
  body.ltr .hero-stat-number { font-size: 16px; }
  .hero-actions { gap: 0.75rem; }
  .btn-primary,
  .btn-outline-white { padding: 0.65rem 1.2rem; font-size: 13px; }

  /* Top utility bar */
  .top-utility-inner { flex-wrap: wrap; gap: 0.4rem; padding-block: 0.3rem; }
  .top-utility-meta { gap: 0.65rem; }

  /* Hide long Alpha link text on mobile, keep icon+dot */
  .alphagroup-line-button .alphagroup-link-text { display: none; }

  /* Header buttons — icon only on mobile */
  .btn-header-rfq .btn-rfq-label,
  .btn-header-cart .btn-cart-label { display: none; }
  .btn-header-rfq { padding: 0.5rem 0.6rem; min-width: 44px; min-height: 44px; }
  .btn-header-cart { padding: 0.5rem 0.6rem; min-width: 44px; min-height: 44px; }

  /* Footer */
  .footer-main { padding-block: 2.5rem 2rem; }
  .footer-grid { gap: 1.5rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* Modal */
  .modal-overlay { padding: 0.75rem; }
  .modal-dialog { padding: 1.25rem; max-height: 95vh; }

  /* Cart drawer full width on mobile */
  .cart-drawer-panel { max-width: 100%; width: 100%; }

  /* Product detail */
  .product-gallery-sticky { position: static; }
  .qty-actions-row { flex-wrap: wrap; }
  .btn-detail-add { flex-grow: 1; }

  /* Tabs */
  .tab-content-panel { padding: 1.25rem; }

  /* Toast positioning */
  .toast-container { inset-inline-end: 1rem; bottom: 1.25rem; }

  /* Touch targets for all interactive elements */
  .btn-header-rfq,
  .btn-header-cart,
  .lang-switch-btn,
  .page-num-btn,
  .view-btn,
  .qty-btn,
  .drawer-close-btn,
  .modal-close-btn,
  .tab-btn {
    min-height: 44px;
    min-width: 44px;
  }

  /* Filter list tap targets */
  .filter-category-item a { min-height: 44px; }

  /* RTL mobile layout */
  body.rtl .cart-drawer-panel { max-width: 100%; width: 100%; }
  body.rtl .hero-content { text-align: right; }
}

/* ==========================================================================
   480px — Large Phones (Pixel, Samsung Galaxy)
   ========================================================================== */
@media (max-width: 480px) {
  .container { padding-inline: 0.85rem; }
  .section-pad { padding-block: 2rem; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }

  /* Hero */
  .hero-clinical { min-height: 380px; }
  .hero-content { padding-block: 2rem; }
  .hero-badge-pill { font-size: 11px; padding: 0.25rem 0.75rem; }
  .hero-actions { flex-direction: column; }
  .btn-primary,
  .btn-outline-white { width: 100%; justify-content: center; }
  .hero-statement { font-size: clamp(22px, 6.5vw, 30px) !important; }
  .hero-stat-item { gap: 0.5rem; }
  .hero-stat-number { font-size: 16px; }
  body.ltr .hero-stat-number { font-size: 14px; white-space: normal; }

  /* Hide cert badge to save space */
  .utility-badge-sfda { display: none; }

  /* Products grid — 2 columns */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .product-card-body { padding: 0.6rem; }
  .product-card-title { font-size: 12px; min-height: auto; }
  .product-card-price { font-size: 14px; }
  .product-card-actions { gap: 0.35rem; }
  .btn-card-add { font-size: 11px; padding: 0.4rem 0.5rem; }
  .btn-card-rfq { font-size: 11px; padding: 0.4rem 0.5rem; }

  /* Categories — single column */
  .categories-grid { grid-template-columns: 1fr; }
  .category-card { padding: 1.1rem; }

  /* Brands — 2 columns */
  .brands-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  /* Trust badges — single column */
  .trust-badges-bar { grid-template-columns: 1fr; padding: 1rem; }

  /* Section title */
  .section-title { font-size: clamp(20px, 6vw, 26px); }

  /* Footer */
  .footer-heartbeat-divider { height: 32px; }
  .footer-cert-tags { flex-wrap: wrap; gap: 0.5rem; }

  /* Modal */
  .modal-dialog { padding: 1rem; }
  .modal-overlay { padding: 0.5rem; }

  /* Checkout */
  .checkout-card-step { padding: 1.25rem; }

  /* Pagination */
  .pagination-wrap { flex-wrap: wrap; gap: 0.25rem; }
  .page-num-btn { min-width: 32px; height: 32px; font-size: 12px; }

  /* Wholesale tiers */
  .wholesale-tiers-box { padding: 1rem; }
  .tiers-table { font-size: 12px; }

  /* Catalog controls */
  .catalog-top-controls { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .catalog-actions-group { flex-wrap: wrap; }

  /* Product buy box */
  .product-buy-box { padding: 1.1rem; }
}

/* ==========================================================================
   375px — iPhone SE / Standard iPhone
   ========================================================================== */
@media (max-width: 375px) {
  .container { padding-inline: 0.75rem; }

  /* Products grid — single column */
  .product-grid { grid-template-columns: 1fr; }

  /* Header */
  .header-grid { gap: 0.5rem; }
  .brand-logo-img { height: 46px; }
  .brand-tagline-sub { font-size: 9px; letter-spacing: 0.04em; }
  .brand-heartbeat-anim { width: 120px; margin-top: 5px; }

  /* Hero */
  .hero-clinical { min-height: 340px; }
  .hero-badge-pill { display: none; }
  .hero-stats-row { flex-direction: column; gap: 0.75rem; padding-top: 1rem; }

  /* Section padding */
  .section-pad { padding-block: 1.75rem; }

  /* Modal — sheet style from bottom */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-dialog {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
    padding: 1rem;
  }

  /* Drawer */
  .drawer-head { padding: 1rem; }
  .drawer-body { padding: 1rem; }
  .drawer-foot { padding: 1rem; }

  /* Section head */
  .section-head { flex-direction: column; }
  .section-view-all { font-size: 13px; }

  /* Hide Alpha portal link entirely */
  .alphagroup-line-button { display: none; }

  /* Compact nav matrix */
  .nav-matrix-item a { padding: 0.45rem 0.7rem; font-size: 12px; }

  /* Footer grid */
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ==========================================================================
   320px — Smallest Phones (Galaxy S5, iPhone 5)
   ========================================================================== */
@media (max-width: 320px) {
  .container { padding-inline: 0.6rem; }

  .hero-clinical { min-height: 300px; }
  .hero-content { padding-block: 1.5rem; }
  .hero-description { font-size: 13px; }
  .hero-stat-number { font-size: 14px; }

  .brand-logo-img { height: 38px; }
  .brand-heartbeat-anim { width: 90px; }
  .brand-tagline-sub { display: none; }

  .section-title { font-size: 18px; }
  .detail-product-title { font-size: clamp(18px, 5vw, 24px); }
  .section-pad { padding-block: 1.5rem; }

  .page-num-btn { min-width: 28px; height: 28px; font-size: 11px; }

  .tab-btn { padding: 0.6rem 0.75rem; font-size: 12px; }
  .tab-content-panel { padding: 0.85rem; }

  .product-buy-box { padding: 0.85rem; }
  .unit-price-val { font-size: 22px; }
  .qty-actions-row { gap: 0.5rem; }

  /* Minimum 44px tap targets */
  .btn-primary,
  .btn-outline-white,
  .btn-detail-add,
  .btn-place-order,
  .btn-card-add { min-height: 44px; }

  .footer-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-main { padding-block: 2rem 1.5rem; }
}

/* ==========================================================================
   Print media — clean order confirmation
   ========================================================================== */
@media print {
  .main-header,
  .top-utility-bar,
  .nav-matrix-tier,
  .footer-wrapper,
  .cart-drawer-overlay,
  .modal-overlay,
  .toast-container { display: none !important; }
  body { background: #fff; color: #000; }
  .checkout-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Phase 12 — Responsive fixes (live audit 2026-10-03, 320–768px)
   ========================================================================== */

/* Mobile search: toggle button + row exist only on small screens */
.btn-header-search { display: none; }
.alphagroup-link-short { display: none; }
.mobile-search-row { display: none; }

/* Catalog: let the content column shrink (a 1fr track never shrinks below its
   min-content width, which pushed the page to ~1500px on tablets). */
.catalog-layout > * { min-width: 0; }

@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }

}

@media (max-width: 768px) {
  /* Header: logo + icon buttons must fit 320px */
  .header-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem; }
  .header-center { justify-content: flex-start; min-width: 0; }
  .header-right { gap: 0.35rem; flex-wrap: nowrap; }
  .btn-header-search { display: inline-flex; justify-content: center; }
  .btn-header-rfq, .btn-header-cart { justify-content: center; position: relative; }
  .btn-header-cart .cart-count-badge { position: absolute; top: -6px; inset-inline-end: -6px; }

  .alphagroup-line-button .alphagroup-link-short { display: inline; }

  .mobile-search-row { display: block; border-top: 1px solid var(--surface-border); padding-block: 0.6rem; background: var(--surface-light); }
  .mobile-search-row[hidden] { display: none; }
  .mobile-search-form { max-width: none; }
  .mobile-search-form .header-search-input { font-size: 16px; min-height: 44px; } /* 16px stops iOS zoom-on-focus */
}

@media (max-width: 414px) {
  .brand-logo-img { height: 44px; }
  .brand-tagline-sub { font-size: 9px; letter-spacing: 0.04em; }
  .header-right { gap: 0.25rem; }
  .btn-header-rfq, .btn-header-cart { padding: 0.45rem; min-width: 42px; min-height: 42px; }
}

@media (max-width: 360px) {
  .brand-heartbeat-anim, .brand-tagline-sub { display: none; }
  .brand-logo-img { height: 34px; }
  .btn-header-rfq, .btn-header-cart { min-width: 40px; min-height: 40px; padding: 0.4rem; }
}

/* Hero: poster frame as the fallback when video can't autoplay (data saver) or motion is reduced */
.hero-clinical {
  /* navy wash ≈ the look of the 35%-opacity video over navy */
  background-image: linear-gradient(rgba(0, 20, 46, 0.68), rgba(0, 20, 46, 0.68)), url('../images/hero-poster.jpg');
  background-size: cover;
  background-position: center;
}
@media (prefers-reduced-motion: reduce) {
  .hero-video-bg { display: none; }
  .footer-video-bg { display: none; }
}

/* Compact catalog pagination (wraps instead of overflowing) */
.pagination-wrap { flex-wrap: wrap; justify-content: center; row-gap: 0.5rem; }
.page-gap { display: inline-flex; align-items: center; padding-inline: 0.25rem; color: var(--text-muted); }
.page-step { font-size: 18px; font-weight: 700; }

/* Product card header on small phones: stack SKU above the stock chip */
@media (max-width: 480px) {
  .product-card-head { flex-direction: column; align-items: flex-start; gap: 0.3rem; padding: 0.5rem 0.6rem; }
  .product-sku-pill { font-size: 10px; letter-spacing: 0.02em; overflow-wrap: anywhere; }
  .product-status-chip { border-radius: 6px; line-height: 1.35; max-width: 100%; }
}
/* Pager on phones: show current ±1 (plus first/last) so it stays on one line */
@media (max-width: 414px) {
  .page-num-btn.page-far { display: none; }
  .page-num-btn { min-width: 36px; height: 40px; padding: 0 0.35rem; }
  .pagination-wrap { gap: 0.2rem; }
  .page-gap { padding-inline: 0.1rem; }
}

/* ==========================================================================
   Categories button + panel (replaces the sideways-scrolling category row)
   ========================================================================== */
.nav-matrix-tier { overflow: visible; white-space: normal; position: relative; }
.nav-cats-bar { display: flex; align-items: center; gap: 1rem; min-height: 50px; }
.nav-cats-toggle {
  display: inline-flex; align-items: center; gap: 0.5rem; flex-shrink: 0;
  padding: 0.55rem 1rem; min-height: 42px;
  background: var(--navy-deep); color: #fff; border: 0; border-radius: var(--radius-sm);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.nav-cats-toggle:hover { background: var(--secondary); }
.nav-cats-caret { transition: transform var(--transition-fast); }
.nav-cats-toggle[aria-expanded="true"] .nav-cats-caret { transform: rotate(180deg); }
.nav-quick-links { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; list-style: none; margin: 0; padding: 0; }
.nav-quick-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.7rem; font-size: 13px; font-weight: 500; color: var(--text-muted); border-radius: var(--radius-sm); }
.nav-quick-links a:hover { color: var(--primary); background: var(--surface-subtle); }

.cats-panel {
  position: absolute; inset-inline: 0; top: 100%; z-index: 60;
  background: var(--surface-light); border-bottom: 1px solid var(--surface-border);
  box-shadow: 0 18px 40px rgba(0, 20, 46, 0.14);
  padding-block: 1.25rem 1.5rem; max-height: calc(100vh - 160px); overflow-y: auto;
}
.cats-panel[hidden] { display: none; }
.cats-panel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 0.6rem; }
.cats-panel-item {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 52px; padding: 0.7rem 1rem;
  border: 1px solid var(--surface-border); border-radius: var(--radius-md);
  color: var(--primary); font-size: 14px; font-weight: 600; line-height: 1.35;
  transition: all var(--transition-fast);
}
.cats-panel-item:hover, .cats-panel-item.active { border-color: var(--secondary); background: var(--mint-subtle); }
.cats-panel-count {
  flex-shrink: 0; min-width: 2.2rem; text-align: center; padding: 0.15rem 0.5rem;
  background: var(--surface-subtle); color: var(--text-muted); border-radius: var(--radius-full); font-size: 12px; font-weight: 600;
}
.cats-panel-all { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem; font-weight: 600; color: var(--secondary); }

@media (max-width: 1024px) {
  .nav-quick-links { display: none; }
}
@media (max-width: 768px) {
  .nav-cats-bar { min-height: 0; padding-block: 0.5rem; }
  .nav-cats-toggle { width: 100%; justify-content: center; min-height: 44px; }
  .cats-panel { position: static; box-shadow: none; max-height: none; padding-block: 0.25rem 1rem; }
  .cats-panel-grid { grid-template-columns: 1fr; gap: 0.45rem; }
}

/* OTP code inputs: wide letter-spacing only for the digits, not the placeholder */
#otpCode::placeholder, #otpCodeInput::placeholder { letter-spacing: normal; font-family: inherit; font-size: 15px; }

/* Certifications slider (one card per view, auto-rotating, arrows + dots) */
.certs-slider {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 12px;
}
.certs-track {
  display: flex;
  transition: transform 0.5s ease;
}
.certs-slide {
  min-width: 100%;
  box-sizing: border-box;
  padding: 4px;
}
.certs-card {
  background: #fff;
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 12px;
  padding: 32px 28px;
  text-align: center;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.certs-badge {
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  background: var(--secondary-subtle);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  font-size: 18px;
}
.certs-title {
  font-size: 19px;
  color: var(--primary);
  margin: 0 0 8px;
}
.certs-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.8;
  margin: 0;
  max-width: 46ch;
}
.certs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border, #E2E8F0);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-micro);
  z-index: 2;
}
.certs-prev { left: 8px; }
.certs-next { right: 8px; }
.certs-arrow:hover { background: var(--secondary-subtle); }
.certs-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
.certs-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #CBD5E1;
  cursor: pointer;
  padding: 0;
}
.certs-dot.active { background: var(--secondary); transform: scale(1.2); }
@media (prefers-reduced-motion: reduce) {
  .certs-track { transition: none; }
}
