/* ============================================
   PHARMA SPORT — Modern E-commerce UI
   ============================================ */

/* === CSS Variables === */
:root {
  /* Colors - Dark pharma theme */
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-light: #3f3f46;
  
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Accent - Professional blue-cyan */
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-muted: rgba(6, 182, 212, 0.15);
  
  /* Status */
  --success: #10b981;
  --success-muted: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-muted: rgba(239, 68, 68, 0.15);
  
  /* Telegram */
  --telegram: #0088cc;
  --telegram-hover: #0099dd;
  
  /* Sizing */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px rgba(6, 182, 212, 0.15);
  
  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--font-sans);
  min-height: 100vh;
}

a { 
  color: inherit; 
  text-decoration: none;
  transition: color 0.15s;
}

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

h1, h2, h3, h4 { 
  margin: 0;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: 1.125rem; }

p { margin: 0; }

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

/* === Utilities === */
.container { 
  width: min(1200px, 100% - 40px); 
  margin-inline: auto; 
}

.muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--font-mono); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.logo:hover { opacity: 0.8; }

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

/* Search */
.search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.search input::placeholder { color: var(--text-muted); }

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.search::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2371717a'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}

.search button:hover { background: var(--accent-hover); }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.cart-link:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}

.cart-icon {
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fafafa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.badge {
  background: var(--accent);
  color: var(--bg);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  padding: 0 6px;
}

/* Navigation */
.site-nav {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.nav-inner {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-inner::-webkit-scrollbar { display: none; }

.nav-inner a {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  white-space: nowrap;
  transition: all 0.15s;
}

.nav-inner a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-inner a.nav-blog {
  color: var(--accent);
}

.nav-inner a.nav-blog:hover {
  color: var(--accent-hover);
  background: var(--accent-muted);
}

/* === Main Content === */
.page {
  padding: 32px 0 80px;
  min-height: calc(100vh - 200px);
}

/* === Hero Section === */
.hero {
  position: relative;
  padding: 64px 48px;
  margin-bottom: 48px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-muted) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--success-muted);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.hero h1 {
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.hero-features li::before {
  content: '';
  width: 20px;
  height: 20px;
  background: var(--success);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%230a0a0b' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}

.btn-telegram {
  background: var(--telegram);
  color: #fff;
}

.btn-telegram:hover {
  background: var(--telegram-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 16px;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* === Section Headers === */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 48px 0 24px;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-link {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s;
}

.section-link:hover {
  color: var(--accent-hover);
}

/* === Categories Strip === */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 48px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

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

.category-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.category-card strong {
  font-size: 0.95rem;
}

.category-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Product Grid === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* Product Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--bg-elevated), var(--surface));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.card-placeholder {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-brand {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

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

.card-dosage {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

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

/* Tags */
.tag {
  position: absolute;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-sm);
}

.tag-sale {
  top: 12px;
  left: 12px;
  background: var(--danger);
  color: #fff;
}

.tag-out {
  top: 12px;
  right: 12px;
  background: var(--text-muted);
  color: var(--bg);
}

.tag-new {
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--bg);
}

/* Price */
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-usdt {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.price-rub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.price-current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.price-old {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-lg .price-usdt {
  font-size: 1.75rem;
}

.price-lg .price-rub {
  font-size: 1rem;
}

/* === Brands === */
.brands-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-chip {
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}

.brand-chip:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* === Filters === */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group input,
.filter-group select {
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 140px;
  transition: border-color 0.15s;
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--accent);
}

.filter-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}

.pagination a {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
}

.pagination a:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
}

.pagination a.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

/* === Empty State === */
.empty {
  padding: 80px 40px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* === Breadcrumbs === */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

.breadcrumbs a:hover { color: var(--accent); }

.breadcrumbs .separator {
  color: var(--border-light);
}

.breadcrumbs .current {
  color: var(--text);
}

/* === Product Page === */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.product-image {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info h1 {
  margin-bottom: 8px;
}

.product-brand {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.product-price {
  margin-bottom: 20px;
}

.product-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.product-stock.in-stock {
  background: var(--success-muted);
  color: var(--success);
}

.product-stock.out-of-stock {
  background: var(--danger-muted);
  color: var(--danger);
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.buy-row {
  display: flex;
  gap: 12px;
}

.qty-input {
  width: 80px;
  padding: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
}

.product-description {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  line-height: 1.7;
  color: var(--text-secondary);
}

.product-specs {
  margin-top: 24px;
}

.specs-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 24px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.specs-grid dt {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.specs-grid dd {
  margin: 0;
  font-weight: 500;
}

/* CTA Box */
.cta-box {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, var(--accent-muted), transparent);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
}

.cta-box h3 {
  margin-bottom: 8px;
  color: var(--accent);
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* CTA Banner */
.cta-banner {
  margin: 48px 0;
  padding: 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(139, 92, 246, 0.05));
  border: 1px solid var(--accent);
  border-radius: var(--radius-xl);
}

.cta-banner h3 {
  margin-bottom: 8px;
  font-size: 1.5rem;
}

.cta-banner p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 500px;
  margin-inline: auto;
}

/* === Cart === */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: grid;
  grid-template-columns: 80px 1fr auto auto auto;
  gap: 20px;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.cart-item-info h4 a:hover { color: var(--accent); }

.cart-item-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cart-qty-form {
  display: flex;
  gap: 8px;
}

.cart-qty-form input {
  width: 60px;
  padding: 8px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cart-item-total {
  font-weight: 700;
  font-size: 1rem;
  min-width: 100px;
  text-align: right;
}

/* Cart Summary */
.cart-summary {
  position: sticky;
  top: 100px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cart-summary h3 {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.95rem;
}

.summary-row.total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-summary .btn {
  width: 100%;
  margin-top: 20px;
}

.cart-note {
  margin-top: 16px;
  padding: 12px;
  background: var(--accent-muted);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--accent);
}

/* === Forms === */
.form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 0;
  background: var(--surface);
}

.form legend {
  padding: 0 12px;
  font-weight: 600;
  font-size: 1rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.alert {
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.alert-error {
  background: var(--danger-muted);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.alert-success {
  background: var(--success-muted);
  border: 1px solid var(--success);
  color: var(--success);
}

/* === Blog === */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.2s;
}

.article-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.article-card-image {
  display: block;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  overflow: hidden;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

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

.article-card-body {
  padding: 20px;
}

.article-card-title {
  font-size: 1.1rem;
  margin-bottom: 12px;
  line-height: 1.35;
}

.article-card-title a:hover { color: var(--accent); }

.article-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-tags .tag {
  position: static;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 4px 8px;
}

/* Article Page */
.article {
  max-width: 760px;
  margin: 0 auto;
}

.article-header {
  margin-bottom: 40px;
}

.article-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article-cover {
  margin: 0 0 40px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.article-content h2 {
  margin: 48px 0 20px;
  color: var(--text);
}

.article-content h3 {
  margin: 36px 0 16px;
  color: var(--text);
}

.article-content p {
  margin-bottom: 24px;
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 8px;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover {
  color: var(--accent-hover);
}

.article-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: 0.95rem;
}

.article-content th,
.article-content td {
  padding: 14px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.article-content th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text);
}

.article-content strong {
  color: var(--text);
}

/* Article Warning & Tip Blocks */
.article-warning,
.article-tip {
  margin: 24px 0;
  padding: 20px 24px;
  border-radius: var(--radius);
  border-left: 4px solid;
}

.article-warning {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

.article-warning h3,
.article-warning h4 {
  color: #f87171;
  margin: 0 0 12px;
  font-size: 1rem;
}

.article-tip {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--accent);
}

.article-tip h3,
.article-tip h4 {
  color: var(--accent);
  margin: 0 0 12px;
  font-size: 1rem;
}

.article-warning p,
.article-tip p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.article-warning p:last-child,
.article-tip p:last-child {
  margin-bottom: 0;
}

.article-warning ul,
.article-tip ul {
  margin: 8px 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.article-warning ul li,
.article-tip ul li {
  margin-bottom: 6px;
}

/* Article CTA */
.article-cta {
  margin: 48px 0;
  padding: 40px;
  text-align: center;
  background: linear-gradient(135deg, rgba(0, 136, 204, 0.1), rgba(0, 136, 204, 0.05));
  border: 1px solid var(--telegram);
  border-radius: var(--radius-xl);
}

.article-cta h3 {
  color: #fff;
  margin-bottom: 8px;
}

.article-cta p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* Related */
.related-articles {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-articles h3 {
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.related-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.15s;
}

.related-card:hover {
  border-color: var(--accent);
}

.related-card h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.related-card h4 a:hover { color: var(--accent); }

/* Article Products */
.article-products {
  margin: 40px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.article-products h3 {
  margin-bottom: 16px;
}

.products-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.product-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.15s;
}

.product-link:hover {
  border-color: var(--accent);
}

.product-link .price {
  color: var(--accent);
  font-weight: 600;
}

/* === SEO Text === */
.seo-text {
  margin-top: 48px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* === Footer === */
.site-footer {
  margin-top: 80px;
  padding: 48px 0 32px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-section h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.15s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-telegram {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--telegram);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 16px;
  transition: background 0.15s;
}

.footer-telegram:hover { background: var(--telegram-hover); }

/* === Error Page === */
.error-page {
  text-align: center;
  padding: 100px 20px;
}

.error-page h1 {
  font-size: 6rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* === Thanks Page === */
.thanks-page {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 60px 20px;
}

.thanks-icon {
  width: 80px;
  height: 80px;
  background: var(--success-muted);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
  font-size: 2.5rem;
}

.thanks-page h1 {
  margin-bottom: 12px;
}

.thanks-page p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  .container { width: 100%; padding: 0 16px; }
  
  .header-inner {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
  
  .hero {
    padding: 40px 24px;
  }
  
  .hero-features {
    gap: 16px;
  }
  
  .hero-features li {
    flex-basis: calc(50% - 8px);
  }
  
  .product-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .product-gallery {
    position: static;
  }
  
  .cart-layout {
    grid-template-columns: 1fr;
  }
  
  .cart-summary {
    position: static;
  }
  
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 12px;
  }
  
  .cart-item-image {
    width: 60px;
    height: 60px;
  }
  
  .cart-qty-form,
  .cart-item-total {
    grid-column: 2;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .card-body {
    padding: 12px;
  }
  
  .card-title {
    font-size: 0.85rem;
  }
  
  .card-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .btn {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .categories-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================
   COURSES PAGES
   ============================================ */

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.course-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.course-card-header {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.course-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-badge-mass { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.course-badge-cutting { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.course-badge-strength { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.course-badge-recomp { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.course-badge-first { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.course-badge-level { background: var(--bg); color: var(--text-secondary); }

.course-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.course-card-title a {
  color: var(--text);
  text-decoration: none;
}

.course-card-title a:hover {
  color: var(--accent);
}

.course-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
}

.course-card-meta {
  display: flex;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Course detail page */
.course-detail {
  max-width: 1200px;
  margin: 0 auto;
}

.course-header {
  margin-bottom: 32px;
}

.course-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.course-header h1 {
  font-size: 2rem;
  margin: 0 0 12px;
}

.course-excerpt {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.course-content {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: start;
}

.course-main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.course-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.course-section h2 {
  font-size: 1.25rem;
  margin: 0 0 16px;
  color: var(--accent);
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.course-table th,
.course-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.course-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.course-table .week-number {
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  vertical-align: middle;
}

.pct-start {
  color: var(--warning);
  margin-bottom: 16px;
}

.side-effects-list,
.contraindications-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.side-effects-list li,
.contraindications-list li {
  margin-bottom: 8px;
}

/* Course sidebar */
.course-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 100px;
}

.sidebar-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-block h3 {
  font-size: 1rem;
  margin: 0 0 16px;
  color: var(--text);
}

.course-products {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.course-product-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}

.course-product-link:hover {
  background: var(--surface-hover);
}

.course-product-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.course-product-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.course-product-name {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}

.course-product-price {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.checklist li:last-child {
  border-bottom: none;
}

.related-courses {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-course-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  background: var(--bg);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s;
}

.related-course-link:hover {
  background: var(--surface-hover);
}

.related-course-title {
  color: var(--text);
  font-weight: 500;
}

.related-course-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* Info block */
.info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.info-block h2 {
  text-align: center;
  margin: 0 0 24px;
}

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

.info-item h3 {
  font-size: 1rem;
  margin: 0 0 8px;
}

.info-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.5;
}

/* CTA block */
.cta-block {
  background: linear-gradient(135deg, var(--accent-muted), var(--surface));
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}

.cta-block h2 {
  margin: 0 0 12px;
}

.cta-block p {
  color: var(--text-secondary);
  margin: 0 0 24px;
}

/* Responsive */
@media (max-width: 900px) {
  .course-content {
    grid-template-columns: 1fr;
  }
  
  .course-sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .courses-grid {
    grid-template-columns: 1fr;
  }
  
  .course-header h1 {
    font-size: 1.5rem;
  }
  
  .course-table {
    font-size: 0.8rem;
  }
  
  .course-table th,
  .course-table td {
    padding: 8px;
  }
}

/* ============================================
   PROOFS — отзывы (скриншоты Telegram)
   ============================================ */

.proofs-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.proof-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}

.proof-stat strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--accent);
}

.proof-stat span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.proof-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.proof-filters .tag,
.proof-products .tag {
  position: static;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.75rem;
  padding: 5px 10px;
  transition: color 0.15s, border-color 0.15s;
}

.proof-filters .tag:hover,
.proof-products .tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.proof-filters .tag.is-active {
  background: var(--accent-muted);
  border-color: var(--accent);
  color: var(--accent-hover);
}

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

.proof-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.proof-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

/* Скриншот TG: кнопка, чтобы открывался лайтбокс с клавиатуры тоже */
.proof-shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--bg);
  cursor: zoom-in;
}

.proof-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  object-position: top;
}

.proof-zoom {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 10px;
  font-size: 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(10, 10, 11, 0.75);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.2s;
}

.proof-shot:hover .proof-zoom,
.proof-shot:focus-visible .proof-zoom { opacity: 1; }

/* Фоллбэк, пока скриншота нет: цитата */
.proof-quote {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(160deg, rgba(0, 136, 204, 0.12), transparent 70%);
  border-bottom: 1px solid var(--border);
}

.proof-avatar {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: var(--telegram);
  color: #fff;
}

.proof-quote p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
}

.proof-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 20px;
}

.proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.proof-verified {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--success-muted);
  color: var(--success);
  white-space: nowrap;
}

.proof-text {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.proof-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.proof-rating { color: var(--warning); letter-spacing: 1px; }

.proof-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Лайтбокс */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 6, 0.92);
}

.lightbox[hidden] { display: none; }

.lightbox-inner {
  margin: 0;
  max-width: min(520px, 100%);
  max-height: 100%;
  text-align: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-inner figcaption {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 40px;
  height: 40px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.lightbox-close:hover { color: var(--accent); }

/* Тизер отзывов на главной */
.proofs-teaser .proofs-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

@media (max-width: 600px) {
  .proofs-stats { grid-template-columns: 1fr; }
  .proofs-grid { grid-template-columns: 1fr; }
}

/* ============================================
   LAB TESTS — лабораторные анализы
   ============================================ */

.lab-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.lab-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}

.lab-stat strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--accent);
}

.lab-stat span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.lab-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius-lg);
  scroll-margin-top: 90px;
}

.lab-card-warning { border-left-color: var(--warning); }
.lab-card-fail { border-left-color: var(--danger); }

.lab-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lab-card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.lab-card-title a { color: var(--text); }
.lab-card-title a:hover { color: var(--accent); }

.lab-card-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lab-verdict {
  flex: 0 0 auto;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.lab-verdict-pass { background: var(--success-muted); color: var(--success); }
.lab-verdict-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.lab-verdict-fail { background: var(--danger-muted); color: var(--danger); }

.lab-rows {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.lab-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.lab-row:last-child { border-bottom: 0; }

.lab-row dt {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.lab-row dd {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.85rem;
  text-align: right;
}

.lab-declared {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.lab-deviation {
  padding: 2px 6px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums;
}

.lab-deviation.is-ok { background: var(--success-muted); color: var(--success); }
.lab-deviation.is-off { background: rgba(245, 158, 11, 0.15); color: var(--warning); }

.lab-notes {
  margin: 0;
  padding: 10px 12px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.lab-actions .btn { flex: 1 1 auto; text-align: center; }

/* Плашка «партия проверена» на карточке товара */
.lab-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 16px 0;
  background: var(--success-muted);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.lab-badge a {
  margin-left: auto;
  white-space: nowrap;
  color: var(--success);
  font-weight: 600;
}

.lab-badge a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .lab-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .lab-grid { grid-template-columns: 1fr; }
  .lab-badge { flex-wrap: wrap; }
  .lab-badge a { margin-left: 0; }
}

/* Препараты курса не из витрины — идут под заказ */
.course-on-request {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border-left: 2px solid var(--warning);
  border-radius: var(--radius-sm);
}

/* ============================================
   TON — оплата USDT/TON через TON Console
   ============================================ */

.ton-invoice {
  max-width: 600px;
  margin: 0 auto 32px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
}

.ton-invoice-paid { border-left-color: var(--success); }
.ton-invoice-expired,
.ton-invoice-cancelled { border-left-color: var(--danger); }

.ton-invoice h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

.ton-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ton-badge {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.ton-badge-pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.ton-badge-paid { background: var(--success-muted); color: var(--success); }
.ton-badge-expired,
.ton-badge-cancelled { background: var(--danger-muted); color: var(--danger); }

.ton-expires {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ton-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}

.ton-pay-btn {
  width: 100%;
  text-align: center;
  margin-bottom: 16px;
}

.ton-address {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  margin-bottom: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.ton-address span { color: var(--text-muted); }

.ton-address code {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  word-break: break-all;
  color: var(--text);
}

.ton-check { margin-bottom: 12px; }
.ton-check .btn { width: 100%; }

.ton-hint {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.ton-paid {
  margin: 0 0 8px;
  color: var(--success);
  font-weight: 500;
}

.ton-overpay {
  margin: 0;
  font-size: 0.85rem;
  color: var(--warning);
}

/* ============================================
   FAQ — вопросы и ответы
   ============================================ */

.faq-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.faq-nav .tag {
  position: static;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  font-size: 0.78rem;
  padding: 6px 12px;
  transition: color 0.15s, border-color 0.15s;
}

.faq-nav .tag:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.faq-list {
  max-width: 800px;
}

.faq-group {
  margin-bottom: 36px;
  scroll-margin-top: 90px;
}

.faq-group h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-item[open] { border-color: var(--border-light); }

.faq-item summary {
  padding: 16px 20px;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color 0.15s;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  flex: 0 0 auto;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  transition: transform 0.2s, color 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
  color: var(--accent);
}

.faq-item summary:hover { color: var(--accent); }

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Таблицы внутри статей (Quick Summary Table и сравнения) */
.article-content .article-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.88rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.article-content .article-table th,
.article-content .article-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.article-content .article-table th {
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
}

.article-content .article-table tr:last-child td { border-bottom: 0; }

.article-content .article-table td:first-child { color: var(--text); font-weight: 500; }

/* На узких экранах таблица скроллится сама, а не ломает вёрстку страницы */
@media (max-width: 600px) {
  .article-content .article-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

.lab-card-marks {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

/* Проверка бренда, которым мы не торгуем — отличаем визуально от своих партий */
.lab-market {
  padding: 3px 9px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  white-space: nowrap;
}

/* === Commercial-intent: rating, trust badges, benefits, product FAQ === */

.stars {
  display: inline-block;
  color: var(--warning);
  letter-spacing: 2px;
  font-size: 0.9rem;
  line-height: 1;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -2px;
}

.card-rating .rating-value {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
}

.product-rating .rating-value {
  font-weight: 700;
  color: var(--text);
}

.product-rating .rating-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.product-rating .rating-link:hover { color: var(--accent); }

/* In-stock badge on cards (counterpart to .tag-out) */
.tag-stock {
  top: 12px;
  right: 12px;
  background: var(--success-muted);
  color: var(--success);
}

/* Trust badges under CTA */
.trust-badges {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 24px 0 0;
  padding: 0;
}

.trust-badge {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.trust-badge-icon {
  font-size: 1.1rem;
  line-height: 1.2;
}

.trust-badge-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-badge-text strong {
  font-size: 0.85rem;
  font-weight: 600;
}

.trust-badge-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Benefits grid on product page */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.benefit-card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: left;
}

.benefit-icon {
  font-size: 1.6rem;
  display: inline-block;
  margin-bottom: 10px;
}

.benefit-card h3 {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.benefit-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Product FAQ — переиспользуем .faq-item из /ru/faq, добавляем отступы */
.product-faq .faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  padding: 14px 18px;
}

.product-faq .faq-item summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.product-faq .faq-item summary::-webkit-details-marker { display: none; }
.product-faq .faq-item summary::after {
  content: '+';
  float: right;
  color: var(--text-muted);
  font-weight: 400;
  transition: transform 0.2s;
}
.product-faq .faq-item[open] summary::after {
  content: '−';
}
.product-faq .faq-item p {
  margin-top: 10px;
  color: var(--text-secondary);
  line-height: 1.65;
}

@media (max-width: 720px) {
  .trust-badges { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
}
