/* ==========================================================================
   AETHERIA BIO / PEPTIDE LAB CATALOG — CLINICAL & SCIENTIFIC DESIGN SYSTEM
   ========================================================================== */

:root,
[data-theme="dark"] {
  /* Paleta Escura Científica (Padrão) */
  --bg-primary: #060a10;
  --bg-secondary: #0b111c;
  --bg-surface: rgba(15, 23, 38, 0.75);
  --bg-surface-elevated: #111a2b;
  --bg-surface-hover: #162238;
  --bg-glass: rgba(11, 17, 28, 0.82);
  --bg-modal: #0c1320;

  /* Textos */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Acentos Azul / Ciano Clínico */
  --accent-cyan: #06b6d4;
  --accent-cyan-bright: #22d3ee;
  --accent-blue: #3b82f6;
  --accent-glow: rgba(6, 182, 212, 0.16);
  --accent-glow-strong: rgba(6, 182, 212, 0.28);
  --accent-subtle-bg: rgba(6, 182, 212, 0.08);

  /* Bordas e Divisores */
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-accent: rgba(6, 182, 212, 0.35);
  --border-card-hover: rgba(34, 211, 238, 0.55);

  /* Sombras */
  --shadow-card: 0 12px 32px -8px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(148, 163, 184, 0.08);
  --shadow-card-hover: 0 20px 40px -12px rgba(6, 182, 212, 0.18), 0 0 0 1px rgba(34, 211, 238, 0.4);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(6, 182, 212, 0.25);

  /* Padrão de Grade Científica */
  --grid-line: rgba(148, 163, 184, 0.04);
}

[data-theme="light"] {
  /* Paleta Branco Clínico */
  --bg-primary: #f8fafc;
  --bg-secondary: #f1f5f9;
  --bg-surface: rgba(255, 255, 255, 0.9);
  --bg-surface-elevated: #ffffff;
  --bg-surface-hover: #f8fafc;
  --bg-glass: rgba(248, 250, 252, 0.88);
  --bg-modal: #ffffff;

  /* Textos */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Acentos Azul / Ciano Clínico */
  --accent-cyan: #0891b2;
  --accent-cyan-bright: #06b6d4;
  --accent-blue: #2563eb;
  --accent-glow: rgba(8, 145, 178, 0.1);
  --accent-glow-strong: rgba(8, 145, 178, 0.2);
  --accent-subtle-bg: rgba(8, 145, 178, 0.07);

  /* Bordas e Divisores */
  --border-subtle: rgba(15, 23, 42, 0.09);
  --border-accent: rgba(8, 145, 178, 0.35);
  --border-card-hover: rgba(8, 145, 178, 0.6);

  /* Sombras */
  --shadow-card: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 0 0 1px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 20px 35px -10px rgba(8, 145, 178, 0.14), 0 0 0 1px rgba(8, 145, 178, 0.45);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.08);

  /* Padrão de Grade Científica */
  --grid-line: rgba(15, 23, 42, 0.035);
}

/* Reset e Tipografia Base */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}

body.modal-open {
  overflow: hidden;
}

/* Brilho Ambiental Sutil */
.ambient-glow {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 820px;
  height: 360px;
  background: radial-gradient(ellipse at center, var(--accent-glow-strong) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(50px);
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   HEADER E BARRA SUPERIOR
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1rem;
}

.header-brand-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.btn-community {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-community:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.38);
}

.btn-community:active {
  transform: translateY(0);
}

.btn-community svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(59, 130, 246, 0.12));
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan-bright);
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
}

.brand-title span {
  color: var(--accent-cyan);
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lab-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-cyan-bright);
  box-shadow: 0 0 8px var(--accent-cyan-bright);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.theme-toggle:hover {
  border-color: var(--border-accent);
  background: var(--bg-surface-hover);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
}

/* ==========================================================================
   NAVEGAÇÃO PRINCIPAL (ABAS DE CATEGORIAS)
   ========================================================================== */

.nav-bar-wrapper {
  border-top: 1px solid var(--border-subtle);
  background: rgba(6, 182, 212, 0.015);
}

.category-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.55rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.nav-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 1.05rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

.nav-tab.active {
  color: var(--text-primary);
  background: var(--accent-subtle-bg);
  border-color: var(--border-accent);
  box-shadow: 0 0 18px var(--accent-glow);
  font-weight: 600;
}

.nav-tab-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  transition: all 0.22s ease;
}

.nav-tab.active .nav-tab-indicator {
  background: var(--accent-cyan-bright);
  opacity: 1;
  box-shadow: 0 0 8px var(--accent-cyan-bright);
}

.nav-tab-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.nav-tab.active .nav-tab-count {
  background: var(--accent-cyan);
  color: #041016;
  font-weight: 700;
}

/* ==========================================================================
   HERO / CABEÇALHO DA SEÇÃO ATIVA
   ========================================================================== */

.main-content {
  flex: 1;
  padding: 2.5rem 0 4.5rem;
}

.catalog-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.25rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .catalog-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.category-meta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.45rem;
}

.category-title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.category-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin-top: 0.4rem;
}

.catalog-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.stat-chip {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  min-width: 130px;
}

.stat-chip-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-chip-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent-cyan-bright);
  margin-top: 0.15rem;
}

/* ==========================================================================
   GRID DE PRODUTOS E CARD CIENTÍFICO
   ========================================================================== */

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

@media (max-width: 420px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

.peptide-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.65rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.28s ease,
              box-shadow 0.28s ease;
  overflow: hidden;
  animation: cardFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.peptide-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  opacity: 0.85;
}

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

/* Topo do Card */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.card-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 6px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan-bright);
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.card-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.07);
}

/* Visual Clínico do Frasco / Molécula */
.card-visual {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.1rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.07) 0%, rgba(59, 130, 246, 0.03) 100%);
  border: 1px solid var(--border-subtle);
}

.card-visual.has-profile-photo {
  flex-direction: column;
  align-items: flex-start;
  padding: 0.85rem;
  gap: 0.95rem;
}

.card-profile-photo-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-accent);
  background: #050b14;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.peptide-card:hover .card-profile-photo {
  transform: scale(1.03);
}

.vial-illustration {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.vial-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan-bright);
  box-shadow: inset 0 0 12px var(--accent-glow);
  flex-shrink: 0;
}

.card-title-group {
  display: flex;
  flex-direction: column;
}

.card-product-name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  line-height: 1.15;
}

.card-product-subtitle {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  font-weight: 500;
  margin-top: 0.2rem;
}

/* Especificações Rápidas no Card */
.card-specs-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}

.spec-mini {
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
}

.spec-mini-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.spec-mini-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.1rem;
}

/* Exibição Limpa e Destacada de Preços no Card */
.card-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.card-price-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.12) 0%, rgba(59, 130, 246, 0.06) 100%);
  border: 1px solid var(--border-accent);
  box-shadow: inset 0 0 12px var(--accent-glow);
}

.card-price-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.card-price-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan-bright);
  margin-top: 0.15rem;
}

/* Exibição de Preços no Modal de Detalhes */
.modal-pricing-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.modal-price-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.14) 0%, rgba(59, 130, 246, 0.07) 100%);
  border: 1px solid var(--border-accent);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.modal-price-label {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.modal-price-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-cyan-bright);
}

/* Descrição Curta */
.card-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.35rem;
  flex: 1;
}

/* Destaques rápidos */
.card-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.4rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-subtle);
}

.card-highlights li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.card-highlights li svg {
  width: 14px;
  height: 14px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* Ações do Card (Ver Detalhes + Comprar) */
.card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: auto;
}

/* Botão Ver Detalhes */
.btn-details {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-blue) 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--accent-glow-strong);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-details:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px var(--accent-glow-strong);
  transform: translateY(-1px);
}

.btn-details:active {
  transform: translateY(0);
}

.btn-details svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.btn-details:hover svg {
  transform: translateX(3px);
}

/* Botão Comprar (WhatsApp) */
.btn-buy {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.25rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-buy:hover {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.38);
  transform: translateY(-1px);
}

.btn-buy:active {
  transform: translateY(0);
}

.btn-buy svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.modal-buy-btn {
  width: auto;
  padding: 0.65rem 1.25rem;
  border-radius: 8px;
  font-size: 0.84rem;
}

/* Modal de Compra via WhatsApp */
#buyModalBackdrop {
  z-index: 120;
}

.buy-modal-dialog {
  max-width: 480px;
}

.buy-modal-body {
  gap: 1rem;
}

.buy-options-section {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.buy-options-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
}

.buy-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.buy-options-grid.needs-selection {
  animation: buyShake 0.36s ease;
}

@keyframes buyShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}

.buy-option-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.buy-option-btn:hover {
  border-color: var(--accent-cyan);
  transform: translateY(-1px);
}

.buy-option-btn.active {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35), 0 6px 18px rgba(16, 185, 129, 0.18);
}

.buy-option-name {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.buy-option-btn.active .buy-option-name {
  color: #34d399;
}

[data-theme="light"] .buy-option-btn.active .buy-option-name {
  color: #059669;
}

.buy-option-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent-cyan-bright);
}

.buy-option-btn.active .buy-option-price {
  color: var(--text-primary);
}

.buy-copy-status {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.buy-copy-status.is-copied {
  color: #34d399;
  font-weight: 500;
}

.buy-copy-status.is-warning {
  color: #fbbf24;
  font-weight: 600;
}

[data-theme="light"] .buy-copy-status.is-copied {
  color: #059669;
}

[data-theme="light"] .buy-copy-status.is-warning {
  color: #d97706;
}

.buy-message-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
}

.buy-message-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  word-break: break-word;
}

.buy-message-text.is-placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.btn-copy-message {
  flex-shrink: 0;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan-bright);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-message:hover:not(:disabled) {
  background: var(--accent-cyan);
  color: #041016;
}

.btn-copy-message:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-whatsapp-group {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.28);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-whatsapp-group:hover {
  filter: brightness(1.07);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.36);
}

.btn-whatsapp-group.is-disabled {
  opacity: 0.48;
  filter: grayscale(0.4);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-whatsapp-group.is-disabled:hover {
  transform: none;
  filter: grayscale(0.4);
  box-shadow: none;
}

.btn-whatsapp-group svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ==========================================================================
   ESTADO VAZIO ELEGANTE (PARA CATEGORIAS EM CATALOGAÇÃO)
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4.5rem 1.5rem;
  border-radius: 18px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-accent);
  max-width: 680px;
  margin: 1rem auto;
  animation: cardFadeIn 0.35s ease forwards;
}

.empty-state-icon {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan-bright);
  margin-bottom: 1.35rem;
  box-shadow: 0 0 28px var(--accent-glow);
}

.empty-state-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.empty-state-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}

.empty-state-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 1.65rem;
}

.btn-secondary-clinical {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan-bright);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary-clinical:hover {
  background: var(--accent-subtle-bg);
  box-shadow: 0 0 16px var(--accent-glow);
}

/* ==========================================================================
   MODAL DE DETALHES TÉCNICOS DO PRODUTO
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(3, 7, 14, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

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

.modal-dialog {
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  background: var(--bg-modal);
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Cabeçalho do Modal */
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(180deg, var(--accent-subtle-bg) 0%, transparent 100%);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header-main {
  display: flex;
  align-items: center;
  gap: 1.15rem;
}

.modal-product-thumb-wrapper {
  width: 84px;
  height: 84px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-accent);
  background: #050b14;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.modal-product-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.modal-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.modal-title {
  font-size: clamp(1.5rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--bg-surface-hover);
}

/* Corpo do Modal */
.modal-body {
  padding: 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Faixa de Propriedades Físico-Químicas */
.chemical-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.chem-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.chem-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.chem-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-cyan-bright);
}

/* Grid das 4 Seções Estruturadas do Produto */
.modal-sections-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 720px) {
  .modal-sections-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-section.full-width {
    grid-column: 1 / -1;
  }
}

.modal-section {
  padding: 1.35rem;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
}

.section-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-icon svg {
  width: 17px;
  height: 17px;
}

.section-title-group {
  display: flex;
  flex-direction: column;
}

.section-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.68;
}

/* Lista de Benefícios */
.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.benefit-bullet {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-accent);
  color: var(--accent-cyan-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* Blocos de Dosagem / Apresentação e Notas Técnicas */
.tech-kv-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tech-kv-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
}

.tech-kv-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
}

.tech-kv-val {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dosage-pills {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.dosage-pill {
  font-family: inherit;
  font-size: 0.84rem;
  line-height: 1.5;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--accent-subtle-bg);
  border: 1px solid var(--border-accent);
  color: var(--text-primary);
}

/* Rodapé do Modal */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
  flex-wrap: wrap;
}

.modal-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

/* ==========================================================================
   RODAPÉ DO SITE
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    text-align: left;
  }
}

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

.footer-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   OTIMIZAÇÃO EXCLUSIVA PARA MOBILE (TELAS < 768px)
   ========================================================================== */

@media (max-width: 767px) {
  .container {
    padding: 0 0.75rem;
  }

  /* 1. Cabeçalho compacto: Logo "BioScience", Comunidade e Botão de Tema */
  .header-top {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    gap: 0.45rem;
  }

  .header-brand-group {
    gap: 0.55rem;
    flex-wrap: nowrap;
  }

  .btn-community {
    padding: 0.34rem 0.65rem;
    font-size: 0.68rem;
    gap: 0.3rem;
  }

  .btn-community svg {
    width: 12px;
    height: 12px;
  }

  .brand {
    gap: 0.5rem;
    min-width: 0;
    flex-shrink: 0;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
    border-radius: 8px;
  }

  .brand-mark svg {
    width: 17px;
    height: 17px;
  }

  .brand-title {
    font-size: 0.96rem;
    white-space: nowrap;
  }

  .header-actions {
    flex-shrink: 0;
  }

  .theme-toggle {
    padding: 0.35rem 0.65rem;
    font-size: 0.7rem;
    gap: 0.3rem;
    white-space: nowrap;
    border-radius: 7px;
  }

  .theme-toggle svg {
    width: 13px;
    height: 13px;
  }

  /* 2. Menu de Navegação: Carrossel horizontal deslizável sem scrollbar */
  .nav-bar-wrapper .container {
    padding: 0;
  }

  .category-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .category-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .nav-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 0.42rem 0.75rem;
    font-size: 0.76rem;
    border-radius: 8px;
    gap: 0.38rem;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
  }

  /* 3. Título da Aba e Contador super compactos para caber tudo na primeira dobra */
  .main-content {
    padding: 0.65rem 0 2rem;
  }

  .catalog-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
  }

  .category-title {
    font-size: 1.15rem;
    line-height: 1.15;
  }

  .catalog-stats {
    flex-shrink: 0;
  }

  .stat-chip {
    padding: 0.25rem 0.55rem;
    border-radius: 7px;
    min-width: auto;
    align-items: flex-end;
    text-align: right;
  }

  .stat-chip-label {
    font-size: 0.52rem;
    letter-spacing: 0.05em;
  }

  .stat-chip-value {
    font-size: 0.68rem;
    margin-top: 0.04rem;
    white-space: nowrap;
  }

  /* 4. Cards dos Produtos LADO A LADO (2 colunas) cabendo na tela inicial com preço e botão */
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    width: 100%;
  }

  .peptide-card {
    width: 100%;
    padding: 0.6rem;
    border-radius: 12px;
  }

  .card-top {
    margin-bottom: 0.4rem;
    gap: 0.25rem;
  }

  .card-category-badge {
    font-size: 0.55rem;
    padding: 0.16rem 0.42rem;
    gap: 0.25rem;
  }

  .card-category-badge svg {
    width: 10px;
    height: 10px;
  }

  .card-code {
    display: none;
  }

  .card-visual.has-profile-photo {
    padding: 0.4rem;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
    border-radius: 9px;
  }

  .card-profile-photo-wrapper {
    aspect-ratio: 1 / 1;
    border-radius: 7px;
  }

  .card-product-name {
    font-size: 0.98rem;
    line-height: 1.15;
  }

  .card-product-subtitle {
    font-size: 0.6rem;
    line-height: 1.2;
    margin-top: 0.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-pricing-grid {
    grid-template-columns: 1fr;
    gap: 0.28rem;
    margin-bottom: 0.5rem;
  }

  .card-price-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.32rem 0.48rem;
    border-radius: 7px;
  }

  .card-price-label {
    font-size: 0.56rem;
    letter-spacing: 0.02em;
  }

  .card-price-value {
    font-size: 0.78rem;
    margin-top: 0;
  }

  .card-actions {
    gap: 0.35rem;
  }

  .btn-details,
  .btn-buy {
    min-height: 34px;
    padding: 0.42rem 0.5rem;
    font-size: 0.74rem;
    border-radius: 8px;
    gap: 0.3rem;
    -webkit-tap-highlight-color: transparent;
  }

  .btn-details svg,
  .btn-buy svg {
    width: 13px;
    height: 13px;
  }

  .modal-footer-actions {
    width: 100%;
    flex-direction: column;
  }

  .modal-buy-btn {
    width: 100%;
    min-height: 44px;
    font-size: 0.88rem;
  }

  /* 5. Modal de "Ver Detalhes" ajustado para smartphones */
  .modal-backdrop {
    padding: 0.65rem;
    align-items: center;
  }

  .modal-dialog {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px;
  }

  .modal-header {
    padding: 1rem 1.1rem;
    gap: 0.65rem;
  }

  .modal-header-main {
    gap: 0.8rem;
    align-items: center;
  }

  .modal-product-thumb-wrapper {
    width: 62px;
    height: 62px;
    border-radius: 10px;
  }

  .modal-title {
    font-size: 1.25rem;
  }

  .modal-subtitle {
    font-size: 0.76rem;
    line-height: 1.3;
  }

  .modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .modal-body {
    padding: 1.1rem;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .modal-pricing-banner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.55rem;
  }

  .modal-price-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.68rem 0.8rem;
    border-radius: 10px;
  }

  .modal-price-label {
    font-size: 0.65rem;
  }

  .modal-price-value {
    font-size: 1.02rem;
  }

  .chemical-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0.85rem;
  }

  .chem-label {
    font-size: 0.62rem;
  }

  .chem-value {
    font-size: 0.78rem;
    word-break: break-word;
  }

  .modal-section {
    padding: 1rem;
    border-radius: 12px;
    gap: 0.7rem;
  }

  .section-text {
    font-size: 0.85rem;
    line-height: 1.6;
  }

  .benefits-list li {
    font-size: 0.84rem;
  }

  .tech-kv-item {
    padding: 0.55rem 0.75rem;
  }

  .tech-kv-val {
    font-size: 0.82rem;
  }

  .modal-footer {
    padding: 0.9rem 1.1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }

  .modal-footer .btn-secondary-clinical {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .site-footer {
    padding: 1.5rem 0;
  }
}
