/* ═══════════════════════════════════════════════════════════
   BioScienceHack — Premium Research Peptide Storefront
   Design System: Silver / White / Navy
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ──────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --surface: #f4f5f7;
  --navy: #1a1a1a;
  --navy-light: #2c2c2c;
  --accent: #a8a9ad;
  /* Metallic Silver accent */
  --accent-hover: #8c8d91;
  --accent-glow: rgba(168, 169, 173, 0.25);
  --silver: #c0c0c0;
  --silver-light: #e8eaed;
  --text-primary: #1a1a2e;
  --text-secondary: #6c6c80;
  --text-on-dark: #e0e0e0;
  --danger: #ff4757;
  --warning: #ffa502;
  --success: #2ed573;
  --border: rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --container: 1200px;
}

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: var(--font);
}

/* ── Container ─────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--navy);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ═══ MODAL (RUO Compliance) ═══════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-start;
  /* Changed from center to allow scrolling tall modals */
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Allow the overlay to scroll if modal is taller than screen */
  animation: fadeIn 0.4s ease;
}

.modal-overlay[style*="display: none"] {
  display: none !important;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  max-width: 560px;
  width: 100%;
  margin: auto;
  /* Centers the modal vertically when it fits the screen */
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.5s cubic-bezier(0.34, 1.56, 1, 1);
  /* Removed max-height constraints to let the overlay scroll naturally */
}

.modal-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.modal-logo img {
  height: 60px;
  margin: 0 auto 1rem;
}

.modal-logo h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: 1px;
}

.modal-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.modal-warning {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary) !important;
}

.modal-content ul {
  margin: 1rem 0 1.5rem;
}

.modal-content li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
}

.modal-checks {
  margin: 1.5rem 0;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.check-row:hover {
  background: var(--silver-light);
}

.check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}

.check-row span {
  font-size: 0.9rem;
  line-height: 1.4;
}

.modal-legal {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 1rem;
}

.modal-legal a {
  color: var(--accent);
  text-decoration: underline;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.modal-header button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--bg);
  transition: var(--transition);
}

.modal-header button:hover {
  background: var(--silver-light);
}

/* ═══ HEADER ═══════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  gap: 1.5rem;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 40px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-primary {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 3px;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.site-nav a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--accent);
}

.btn-carrito {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-sm);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-carrito:hover {
  background: rgba(168, 169, 173, 0.15);
  color: var(--accent);
}

.carrito-count {
  background: var(--accent);
  color: var(--navy);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Mobile hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

.ruo-banner {
  background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-align: center;
  padding: 0.5rem 1rem;
  letter-spacing: 0.5px;
  font-weight: 500;
  animation: shimmer 8s linear infinite;
  background-size: 200% 100%;
}

/* ═══ HERO ═════════════════════════════════════════════ */
.hero {
  position: relative;
  background: linear-gradient(160deg, #e8e8e8 0%, #ffffff 40%, #f4f5f7 100%);
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-logo {
  width: 100%;
  max-width: 700px;
  height: auto;
  margin: 0 auto 1.5rem;
  mix-blend-mode: multiply;
  display: block;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.25rem;
  background: rgba(0, 212, 170, 0.1);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  animation: pulseGlow 3s infinite;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-weight: 400;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--navy);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-dna-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.3;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 30px,
      rgba(255, 255, 255, 0.8) 30px, rgba(255, 255, 255, 0.8) 31px),
    repeating-linear-gradient(60deg, transparent, transparent 30px,
      rgba(200, 200, 200, 0.3) 30px, rgba(200, 200, 200, 0.3) 31px);
}

/* ═══ SECTION HEADERS ══════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 300;
}

/* ═══ CATÁLOGO ═════════════════════════════════════════ */
.catalogo-section {
  padding: 4rem 0;
}

/* Search & Filter */
.catalogo-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-wrap {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 2px solid var(--silver-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--surface);
  transition: var(--transition);
}

.search-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.45rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--silver-light);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 400;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
  font-weight: 600;
}

/* Product Grid */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.5rem;
}

/* Loading */
.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 0;
  color: var(--text-secondary);
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 3px solid var(--silver-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Product Card */
.product-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0, 212, 170, 0.2);
}

.product-card-img {
  position: relative;
  background: #fafbfc;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  overflow: hidden;
}

.product-card-img img {
  max-height: 100%;
  object-fit: contain;
  transition: var(--transition);
}

.product-card:hover .product-card-img img {
  transform: scale(1.05);
}

.stock-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.stock-badge.in-stock {
  background: rgba(46, 213, 115, 0.15);
  color: var(--success);
}

.stock-badge.low-stock {
  background: rgba(255, 165, 2, 0.15);
  color: var(--warning);
}

.stock-badge.out-of-stock {
  background: rgba(255, 71, 87, 0.12);
  color: var(--danger);
}

.product-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.product-card-conc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.product-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.product-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.product-card-price small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.btn-add-cart {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--navy);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  border: none;
  transition: var(--transition);
}

.btn-add-cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 12px var(--accent-glow);
}

.btn-add-cart:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ═══ PRODUCT DETAIL MODAL ═════════════════════════════ */
.modal-checkout,
.modal-detail {
  max-width: 640px;
}

.detail-top {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.detail-img {
  width: 200px;
  flex-shrink: 0;
  background: #fafbfc;
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.detail-img img {
  max-height: 200px;
  object-fit: contain;
}

.detail-info {
  flex: 1;
}

.detail-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.detail-info .detail-conc {
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.detail-info .detail-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.detail-info .detail-price small {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.detail-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.detail-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.spec-item {
  background: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.spec-item .spec-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-item .spec-value {
  font-size: 0.95rem;
  font-weight: 600;
}

.detail-ruo {
  background: rgba(255, 71, 87, 0.06);
  border: 1px solid rgba(255, 71, 87, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--danger);
  margin-bottom: 1.5rem;
}

/* ═══ NOSOTROS ═════════════════════════════════════════ */
.nosotros-section {
  padding: 4rem 0;
  background: var(--surface);
}

.nosotros-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.nosotros-card {
  background: var(--bg);
  padding: 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition);
  border: 1px solid transparent;
}

.nosotros-card:hover {
  border-color: rgba(0, 212, 170, 0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.nosotros-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.nosotros-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══ PAGOS ════════════════════════════════════════════ */
.pagos-section {
  padding: 4rem 0;
}

.pagos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pago-card {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  text-align: center;
  border: 2px solid var(--border);
  transition: var(--transition);
  position: relative;
}

.pago-card:hover {
  border-color: var(--silver);
  box-shadow: var(--shadow-md);
}

.pago-card.featured {
  border-color: var(--accent);
}

.pago-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.pago-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pago-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.pago-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: var(--accent);
  color: var(--navy);
  padding: 0.2rem 0.85rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ═══ CONTACTO ═════════════════════════════════════════ */
.contacto-section {
  padding: 4rem 0;
  background: var(--surface);
}

.contacto-form {
  max-width: 680px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--silver-light);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background: var(--bg);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: var(--surface);
}

.form-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

/* Payment options in checkout */
.pago-opciones {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.pago-opcion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--silver-light);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.95rem;
}

.pago-opcion:hover {
  border-color: var(--silver);
}

.pago-opcion:has(input:checked) {
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.04);
}

.pago-opcion input[type="radio"] {
  accent-color: var(--accent);
}

/* Promo code input */
.promo-wrap {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.promo-wrap input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 2px solid var(--silver-light);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg);
}

.promo-wrap input:focus {
  outline: none;
  border-color: var(--accent);
}

.promo-wrap button {
  padding: 0.65rem 1.25rem;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
}

.promo-wrap button:hover {
  background: var(--navy-light);
}

.promo-msg {
  font-size: 0.82rem;
  margin-top: 0.25rem;
}

.promo-msg.success {
  color: var(--success);
}

.promo-msg.error {
  color: var(--danger);
}

/* ═══ CARRITO SIDEBAR ══════════════════════════════════ */
.carrito-sidebar {
  position: fixed;
  right: -400px;
  top: 0;
  z-index: 2000;
  width: 380px;
  height: 100vh;
  background: var(--surface);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.carrito-sidebar.open {
  right: 0;
}

.carrito-overlay {
  position: fixed;
  inset: 0;
  z-index: 1999;
  background: rgba(10, 22, 40, 0.5);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.carrito-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.carrito-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.carrito-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.carrito-header button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.carrito-header button:hover {
  background: var(--silver-light);
}

.ruo-carrito-notice {
  background: rgba(255, 71, 87, 0.06);
  padding: 0.6rem 1.5rem;
  font-size: 0.78rem;
  color: var(--danger);
  line-height: 1.4;
}

.carrito-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.carrito-vacio {
  text-align: center;
  color: var(--text-secondary);
  padding: 3rem 0;
  font-size: 0.95rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.3s ease;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  background: #fafbfc;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item-img img {
  max-height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--silver-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--silver-light);
}

.cart-item-qty {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-remove {
  color: var(--danger);
  font-size: 0.78rem;
  cursor: pointer;
  margin-left: auto;
  padding: 0.25rem;
  opacity: 0.7;
}

.cart-item-remove:hover {
  opacity: 1;
}

.carrito-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.carrito-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.carrito-total span:first-child {
  font-size: 1rem;
  font-weight: 500;
}

.carrito-total span:last-child {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}

/* ═══ CHECKOUT MODAL specifics ═════════════════════════ */
.modal-checkout {
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
}

#checkout-resultado {
  text-align: center;
  padding: 2rem 0;
}

.checkout-success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.checkout-order-num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.checkout-instructions {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin: 1rem 0;
  text-align: left;
}

.checkout-instructions h4 {
  margin-bottom: 0.75rem;
}

.checkout-instructions p {
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.checkout-instructions .highlight {
  font-weight: 700;
  color: var(--text-primary);
}

/* ═══ FOOTER ═══════════════════════════════════════════ */
.site-footer {
  background: var(--bg);
  color: var(--text-primary);
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo img {
  height: 36px;
}

.footer-logo span {
  font-weight: 600;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-disclaimer {
  padding: 1rem 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
}

.footer-copy {
  padding: 0.75rem 0;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ═══ WHATSAPP FLOAT ═══════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

/* ═══ BACK TO TOP ══════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 5rem;
  z-index: 998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
}

/* ═══ INVESTIGACION ══════════════════════════════════════ */
.btn-more-info {
  background: rgba(var(--primary-rgb), 0.1);
  color: var(--primary);
  border: 1px solid rgba(var(--primary-rgb), 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1rem;
  width: 100%;
  text-align: center;
  display: block;
}

.btn-more-info:hover {
  background: rgba(var(--primary-rgb), 0.15);
  border-color: rgba(var(--primary-rgb), 0.3);
}

.detail-research-content {
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
}

.detail-research-content h3 {
  font-size: 1.05rem;
  color: var(--navy);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.detail-research-content h3:first-child {
  margin-top: 0;
}

.detail-research-content p {
  margin-bottom: 0.75rem;
}

.detail-research-content p:last-child {
  margin-bottom: 0;
}

/* ═══ ANIMATIONS ═══════════════════════════════════════ */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.2);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(0, 212, 170, 0);
  }
}

/* ═══ RESPONSIVE ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-stats {
    gap: 2rem;
  }

  .detail-top {
    flex-direction: column;
  }

  .detail-img {
    width: 100%;
    height: 200px;
  }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .site-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-md);
    padding: 1rem;
  }

  .site-nav.open a {
    padding: 0.75rem 1rem;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero-sub {
    font-size: 0.95rem;
  }

  .hero-stats {
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .stat-num {
    font-size: 1.4rem;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }

  .productos-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .carrito-sidebar {
    width: 100%;
    right: -100%;
  }

  .detail-specs {
    grid-template-columns: 1fr;
  }

  .back-to-top {
    right: 4.5rem;
    bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.7rem;
  }

  .hero-ctas .btn-outline {
    display: none;
  }

  .productos-grid {
    grid-template-columns: 1fr;
  }

  .product-card-img {
    height: 180px;
  }

  .modal-box {
    padding: 1.5rem;
  }
}

/* ==============================================================
   RECONSTITUTION CALCULATOR STYLES 
   ============================================================== */
.calc-container {
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border: 1px solid rgba(44, 62, 80, 0.1);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin: 3rem 0;
  position: relative;
  overflow: hidden;
}

.calc-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), #3498db);
}

.calc-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.calc-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
}

.calc-header-icon {
  font-size: 2rem;
  background: var(--light-bg);
  padding: 0.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc-input-group label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

.calc-input-group .helper-text {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  line-height: 1.3;
}

.calc-input {
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: white;
  width: 100%;
}

.calc-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
  outline: none;
}

.calc-input:disabled,
.calc-input[readonly] {
  background: #f1f3f5;
  color: #7f8c8d;
  cursor: not-allowed;
  border-color: #e0e6ed;
}

.calc-error {
  color: #e74c3c;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.calc-results-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
  margin-top: 2rem;
}

.calc-results-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.calc-concentration {
  font-size: 1.15rem;
  color: var(--navy);
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(243, 156, 18, 0.1);
  border-radius: 8px;
  border-left: 4px solid #f39c12;
}

.calc-concentration strong {
  color: var(--navy);
  font-weight: 800;
}

.calc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.calc-card {
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.calc-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.calc-card.low {
  background: rgba(46, 204, 113, 0.05);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.calc-card.low .card-tag {
  background: #2ecc71;
  color: white;
}

.calc-card.normal {
  background: rgba(52, 152, 219, 0.05);
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.calc-card.normal .card-tag {
  background: #3498db;
  color: white;
}

.calc-card.high {
  background: rgba(231, 76, 60, 0.05);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.calc-card.high .card-tag {
  background: #e74c3c;
  color: white;
}

.calc-card.custom {
  background: rgba(155, 89, 182, 0.05);
  border: 1px solid rgba(155, 89, 182, 0.3);
}

.calc-card.custom .card-tag {
  background: #9b59b6;
  color: white;
}

.card-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.card-action {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.4;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card-ticks {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--accent);
  display: block;
  margin-top: 0.5rem;
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.calc-disclaimer {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-tertiary);
  text-align: center;
  padding-top: 1rem;
  border-top: 1px dashed var(--border);
}

/* UI Switching Logic */
#calculator-container.nasal-mode-active .inject-only {
  display: none !important;
}

#calculator-container.nasal-mode-active .nasal-only {
  display: flex !important;
}

.nasal-only {
  display: none !important;
}

/* ==============================================================
   CALCULATOR RESPONSIVE — TABLET (≤768px)
   ============================================================== */
@media (max-width: 768px) {
  .calc-container {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .calc-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .calc-header h2 {
    font-size: 1.25rem;
  }

  .calc-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calc-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calc-results-panel {
    padding: 1.25rem;
  }

  .card-ticks {
    font-size: 1.8rem;
    white-space: nowrap;
  }

  .calc-concentration {
    font-size: 1rem;
  }
}

/* ==============================================================
   CALCULATOR RESPONSIVE — PHONE (≤480px)
   ============================================================== */
@media (max-width: 480px) {
  .calc-container {
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 12px;
  }

  .calc-header-icon {
    font-size: 1.5rem;
    padding: 0.35rem;
  }

  .calc-header h2 {
    font-size: 1.1rem;
  }

  .calc-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .calc-input {
    padding: 0.75rem;
    font-size: 0.95rem;
  }

  .calc-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .calc-card {
    padding: 1.25rem;
  }

  .card-tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }

  .card-ticks {
    font-size: 1.6rem;
  }

  .card-action {
    font-size: 0.85rem;
  }

  .calc-results-panel {
    padding: 1rem;
  }

  .calc-concentration {
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  .calc-disclaimer {
    font-size: 0.8rem;
  }

  .calc-results-header h3 {
    font-size: 1.1rem;
  }
}