/* ==========================================================
   T.G. 15 mg Tirzepatida - Laboratorios Indufar CISA
   Clean, Responsive Mobile-First Web Application
   ========================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --color-green-auth: #15803d;
  --color-blue-auth: #0f3460;
  --color-link-blue: #2563eb;
  --color-text-dark: #111827;
  --color-text-muted: #374151;
  --app-max-width: 440px;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  font-family: var(--font-main);
  background-color: #f7f8fa;
  color: var(--color-text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Centered Responsive Page Wrapper (100% on mobile, max 440px on desktop) */
.page-wrapper {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background-color: #ffffff;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  body {
    background-color: #ffffff;
  }
  .page-wrapper {
    box-shadow: none;
  }
}

/* ==========================================================
   HAMBURGER BUTTON (SHARED)
   ========================================================== */
.menu-btn {
  background: #f1f3f5;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9px;
  width: 42px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  z-index: 10;
}

.menu-btn:hover {
  background: #e5e7eb;
}

.menu-btn:active {
  transform: scale(0.95);
}

.menu-btn .bar {
  width: 22px;
  height: 2.8px;
  background-color: #1e293b;
  border-radius: 3px;
  display: block;
}

/* ==========================================================
   AUTHNOW MULTI-STAGE SCAN FLOW (FOTO 1 -> FOTO 2 -> FOTO 3)
   ========================================================== */
.authnow-scan-flow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 15%, #2a2478 0%, #1c1859 50%, #14113f 100%);
  color: #ffffff;
  overflow-y: auto;
  overflow-x: hidden;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease, transform 0.5s ease;
  opacity: 1;
  visibility: visible;
}

.authnow-scan-flow.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.99);
}

.flow-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 6px 16px;
  width: 100%;
  z-index: 20;
}

.flow-menu-btn {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4.5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.flow-menu-btn:hover {
  background: rgba(255, 255, 255, 0.32);
}

.flow-menu-btn:active {
  transform: scale(0.95);
}

.flow-menu-btn .bar {
  width: 22px;
  height: 2.8px;
  background-color: #111827;
  border-radius: 3px;
  display: block;
}

.flow-header-logo-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.flow-logo-img {
  width: 95px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
}

.flow-logo-text {
  color: #8c531b;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.6px;
  margin-top: 2px;
  display: none; /* Only visible in camera & success stages */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.flow-header-spacer {
  width: 44px;
  height: 44px;
}

/* Stages */
.scan-stage {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.scan-stage.hidden {
  display: none !important;
  opacity: 0;
}

/* STAGE 1: Instruction Card (Foto 1) */
.scan-stage-intro {
  justify-content: center;
  padding: 10px 16px 28px 16px;
}

.scan-intro-card {
  background: #ffffff;
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  padding: 24px 20px 22px 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: #111827;
  animation: cardPopIn 0.35s ease-out;
}

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

.intro-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.step-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #5850ec;
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 2px 6px rgba(88, 80, 236, 0.4);
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 3px 0;
  letter-spacing: -0.2px;
}

.step-subtitle {
  font-size: 13.5px;
  color: #4b5563;
  margin: 0;
  line-height: 1.35;
}

.step-qr-icon {
  margin-top: 10px;
  display: flex;
  align-items: center;
}

.step-qr-icon svg {
  opacity: 0.55;
  width: 58px;
  height: 58px;
}

.flow-autenticar-btn {
  width: 100%;
  height: 50px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(90deg, #3b82f6 0%, #7c3aed 50%, #9333ea 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.4);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.flow-autenticar-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.flow-autenticar-btn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

/* STAGE 2 & 3: Scanner Camera & Success Card (Foto 2 & Foto 3) */
.scan-stage-camera {
  justify-content: space-between;
  padding: 8px 16px 24px 16px;
}

.scanner-viewport-wrapper {
  position: relative;
  width: 100%;
  max-width: 350px;
  margin: 6px auto;
}

/* FOTO 2: Camera Viewport */
.scanner-viewport-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 330px;
  border-radius: 18px;
  overflow: hidden;
  background: #0d0b24;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-fallback-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0e0c26;
  z-index: 1;
}

.scanner-fallback-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.95);
}

/* Corner Brackets */
.scanner-corner {
  position: absolute;
  width: 40px;
  height: 40px;
  border-color: #4ade80;
  border-style: solid;
  z-index: 5;
  pointer-events: none;
}

.corner-tl {
  top: 14px;
  left: 14px;
  border-width: 3.5px 0 0 3.5px;
  border-top-left-radius: 16px;
}

.corner-tr {
  top: 14px;
  right: 14px;
  border-width: 3.5px 3.5px 0 0;
  border-top-right-radius: 16px;
}

.corner-bl {
  bottom: 14px;
  left: 14px;
  border-width: 0 0 3.5px 3.5px;
  border-bottom-left-radius: 16px;
}

.corner-br {
  bottom: 14px;
  right: 14px;
  border-width: 0 3.5px 3.5px 0;
  border-bottom-right-radius: 16px;
}

/* Animated Green Laser Scanning Line */
.scanner-laser-line {
  position: absolute;
  left: 20px;
  right: 20px;
  height: 2.5px;
  background: #4ade80;
  box-shadow: 0 0 10px #22c55e, 0 0 20px #22c55e, 0 0 30px rgba(34, 197, 94, 0.6);
  z-index: 6;
  pointer-events: none;
  animation: laserScan 2.4s ease-in-out infinite alternate;
}

@keyframes laserScan {
  0% {
    top: 25px;
    opacity: 0.9;
  }
  50% {
    opacity: 1;
  }
  100% {
    top: calc(100% - 25px);
    opacity: 0.9;
  }
}

/* FOTO 3: Authentic Success Card */
.scanner-success-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 330px;
  border-radius: 18px;
  background: rgba(30, 26, 85, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  text-align: center;
  animation: successCardFadeIn 0.35s ease-out;
}

.scanner-success-card.hidden {
  display: none !important;
}

@keyframes successCardFadeIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-shield-icon {
  margin-bottom: 12px;
  filter: drop-shadow(0 2px 8px rgba(34, 197, 94, 0.3));
}

.success-product-title {
  font-size: 21px;
  font-weight: 800;
  color: #4ade80;
  margin: 0 0 8px 0;
  letter-spacing: -0.2px;
}

.success-product-subtitle {
  font-size: 13.5px;
  color: #cbd5e1;
  max-width: 250px;
  line-height: 1.4;
  margin: 0 0 16px 0;
}

/* Radial Spoke Spinner (iOS / web style in Foto 3) */
.radial-spinner-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
}

.ios-radial-spinner {
  position: relative;
  width: 32px;
  height: 32px;
}

.ios-radial-spinner .spoke {
  position: absolute;
  left: 47%;
  top: 0;
  width: 2.8px;
  height: 8px;
  background: #ffffff;
  border-radius: 2px;
  transform-origin: 50% 16px;
  animation: spokeFade 1.2s linear infinite;
}

.ios-radial-spinner .s1  { transform: rotate(0deg);   animation-delay: -1.1s; }
.ios-radial-spinner .s2  { transform: rotate(30deg);  animation-delay: -1.0s; }
.ios-radial-spinner .s3  { transform: rotate(60deg);  animation-delay: -0.9s; }
.ios-radial-spinner .s4  { transform: rotate(90deg);  animation-delay: -0.8s; }
.ios-radial-spinner .s5  { transform: rotate(120deg); animation-delay: -0.7s; }
.ios-radial-spinner .s6  { transform: rotate(150deg); animation-delay: -0.6s; }
.ios-radial-spinner .s7  { transform: rotate(180deg); animation-delay: -0.5s; }
.ios-radial-spinner .s8  { transform: rotate(210deg); animation-delay: -0.4s; }
.ios-radial-spinner .s9  { transform: rotate(240deg); animation-delay: -0.3s; }
.ios-radial-spinner .s10 { transform: rotate(270deg); animation-delay: -0.2s; }
.ios-radial-spinner .s11 { transform: rotate(300deg); animation-delay: -0.1s; }
.ios-radial-spinner .s12 { transform: rotate(330deg); animation-delay: 0s; }

@keyframes spokeFade {
  0% { opacity: 1; }
  100% { opacity: 0.15; }
}

/* Floating Torch / Flashlight Button */
.scanner-torch-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #252e3d;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 15;
  transition: all 0.2s ease;
}

.scanner-torch-btn:hover {
  background: #333d50;
  transform: scale(1.05);
}

.scanner-torch-btn:active {
  transform: scale(0.92);
}

.scanner-torch-btn.active {
  background: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

/* Bottom Controls */
.scanner-bottom-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 350px;
  margin-top: 10px;
}

/* Horizontal Progress Bar Track & Fill */
.scanner-progress-bar-track {
  width: 90%;
  height: 11px;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.scanner-progress-bar-fill {
  width: 0%;
  height: 100%;
  background: #e2e8f0;
  border-radius: 6px;
  transition: width 0.05s linear, background-color 0.3s ease;
}

.scanner-progress-bar-fill.success-fill {
  background: #4ade80 !important;
  width: 42% !important;
}

/* Circular Info Button (i) */
.scanner-info-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1e1b4b;
  font-family: 'Times New Roman', serif;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  margin-bottom: 16px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.scanner-info-btn:hover {
  transform: scale(1.08);
  background: #f8fafc;
}

/* Prompt Text */
.scanner-prompt-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.2px;
  text-align: center;
  min-height: 24px;
  transition: color 0.3s ease;
}

.scanner-prompt-text.redirecting {
  color: #cbd5e1;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2px;
}

/* ==========================================================
   SCREEN 2: MAIN PRODUCT SCREEN (FOTO 2)
   ========================================================== */
.main-screen {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 0 28px 0;
  background-color: #ffffff;
}

/* Top App Header */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 48px;
}

.header-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  height: 42px;
  max-width: 120px;
  object-fit: contain;
}

/* Language selector */
.lang-selector-wrapper {
  position: relative;
}

.lang-pill {
  height: 32px;
  padding: 0 12px;
  border-radius: 18px;
  border: 1.5px solid #222a36;
  background: transparent;
  color: #111827;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-pill:hover {
  background: rgba(0, 0, 0, 0.04);
}

.lang-arrow-icon {
  stroke: #111827;
  stroke-width: 2.5;
}

.lang-dropdown {
  position: absolute;
  top: 38px;
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #e5e7eb;
  padding: 6px;
  width: 140px;
  display: none;
  flex-direction: column;
  z-index: 40;
}

.lang-dropdown.show {
  display: flex;
}

.lang-option {
  background: transparent;
  border: none;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-option:hover, .lang-option.active {
  background: #f3f4f6;
  color: #111827;
}

/* Subtitle: T.G. 15 mg */
.product-header-title {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 12px;
}

.product-header-title h1 {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.2px;
}

/* ==========================================================
   AUTHENTICITY CARD / BANNER ("AUTÉNTICO")
   ========================================================== */
.authenticity-card {
  margin: 0 16px 16px 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 8px 14px 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.authenticity-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border-color: rgba(21, 128, 61, 0.35);
}

.authenticity-card:active {
  transform: scale(0.98);
}

.auth-icon-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-svg {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 2px 4px rgba(15, 52, 96, 0.25));
}

.auth-text-content {
  flex: 1;
  margin-left: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tag {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-green-auth);
  letter-spacing: 0.6px;
  line-height: 1.2;
}

.auth-code {
  font-size: 13.5px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.2px;
  margin-top: 1px;
}

.auth-code strong {
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', monospace;
}

.auth-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  color: #222;
  transition: transform 0.2s;
}

.authenticity-card:hover .auth-arrow {
  transform: translateX(3px);
}

/* ==========================================================
   PRODUCT IMAGE CONTAINER
   ========================================================== */
.product-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px 14px 16px;
}

.product-box-img {
  width: 82%;
  max-width: 290px;
  height: auto;
  object-fit: contain;
  filter: contrast(1.02);
  transition: transform 0.3s ease;
}

.product-box-img:hover {
  transform: scale(1.02);
}

/* ==========================================================
   PRODUCT DESCRIPTION
   ========================================================== */
.product-description-container {
  padding: 0 18px 10px 18px;
  margin-top: 6px;
}

.product-desc-text {
  font-size: 13px;
  line-height: 1.45;
  color: #1f242c;
  font-weight: 500;
  text-align: left;
}

.product-dosage {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

/* ==========================================================
   APP FOOTER (PIE DE PÁGINA)
   ========================================================== */
.app-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px max(24px, env(safe-area-inset-bottom)) 16px;
  background-color: transparent;
}

.bottom-actions-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.olive-circle-action-btn {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background-color: #ae8200;
  border: 2.5px solid #8e6a00;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(174, 130, 0, 0.38);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.olive-circle-action-btn:hover {
  background-color: #946e00;
  border-color: #7b5b00;
  transform: translateY(-2px);
  box-shadow: 0 7px 20px rgba(174, 130, 0, 0.48);
}

.olive-circle-action-btn:active {
  transform: scale(0.94);
}

.olive-circle-action-btn svg {
  width: 44px;
  height: 44px;
  display: block;
  color: #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

/* ==========================================================
   SCREEN 3: AUTHENTICITY MODAL POPUP (FOTO 3)
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-card {
  width: 100%;
  max-width: 375px;
  background: #ffffff;
  border-radius: 20px;
  padding: 24px 18px 22px 18px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

/* Close Button (X) */
.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #111827;
  transition: background 0.2s, transform 0.2s;
}

.modal-close-btn:hover {
  background: #f3f4f6;
  transform: scale(1.08);
}

.modal-close-btn:active {
  transform: scale(0.92);
}

/* Modal Title */
.modal-title {
  font-size: 18px;
  font-weight: 800;
  text-align: center;
  color: #111827;
  letter-spacing: -0.2px;
  margin-top: 4px;
  margin-bottom: 14px;
  padding: 0 20px;
}

/* Modal Body */
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-text {
  font-size: 13px;
  line-height: 1.45;
  color: #374151;
  font-weight: 500;
  text-align: left;
}

/* Code Display Box */
.modal-code-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px auto 8px auto;
  padding: 8px 18px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: all;
}

.modal-code-display:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.code-value {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.8px;
  font-family: 'Space Grotesk', var(--font-main);
}

.copy-badge {
  font-size: 11px;
  font-weight: 700;
  color: #2563eb;
  background: #eff6ff;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #bfdbfe;
}

/* Disclaimer box */
.modal-disclaimer-box {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}

.disclaimer-title {
  font-size: 13px;
  line-height: 1.45;
  color: #111827;
  font-weight: 500;
}

.warning-icon-wrapper {
  display: inline-flex;
  align-items: center;
  vertical-align: -3px;
  margin-right: 4px;
}

.warning-icon-svg {
  display: inline-block;
}

.disclaimer-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--color-link-blue);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.disclaimer-link:hover {
  text-decoration: underline;
}

/* ==========================================================
   AUTHNOW SIDE DRAWER NAVIGATION (IMAGE 2 REPLICA)
   ========================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.drawer-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  width: 82%;
  max-width: 285px;
  height: 100%;
  background: #f8f9fa;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.drawer-overlay.active .drawer-sidebar {
  transform: translateX(0);
}

/* Gradient Header */
.authnow-header {
  background: linear-gradient(135deg, #1d3557 0%, #302b70 42%, #52277d 78%, #642b8a 100%);
  padding: 16px 14px 18px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.authnow-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.authnow-shield-svg {
  flex-shrink: 0;
}

.authnow-text-box {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
}

.authnow-text-top {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.authnow-text-bottom {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.authnow-check-tail {
  color: #22c55e;
  font-weight: 900;
  margin-left: 1px;
}

.drawer-close-btn {
  background: rgba(255, 255, 255, 0.22);
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  transition: background 0.15s, transform 0.15s;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: scale(1.06);
}

.drawer-close-btn:active {
  transform: scale(0.92);
}

/* Body */
.drawer-body {
  padding: 14px 12px 28px 12px;
  display: flex;
  flex-direction: column;
}

/* Standalone Menu Card */
.authnow-menu-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  width: 100%;
}

.authnow-menu-card:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.authnow-menu-card:active {
  transform: scale(0.98);
}

/* Section Header Labels: APP, ACERCA DE */
.authnow-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin: 16px 0 6px 4px;
}

/* Grouped Card for Legal & Licencias */
.authnow-grouped-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.authnow-group-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-decoration: none;
  background: #ffffff;
  transition: background 0.15s ease;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  width: 100%;
  border: none;
}

.authnow-group-row:not(:last-child) {
  border-bottom: 1px solid #f1f5f9;
}

.authnow-group-row:hover {
  background: #f9fafb;
}

.authnow-group-row:active {
  background: #f1f5f9;
}

.authnow-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.authnow-item-text {
  font-size: 13.5px;
  font-weight: 600;
  color: #1f2937;
  letter-spacing: -0.1px;
}

/* Base Mobile Flow for Product Content Layout (100% preserves current mobile view) */
.product-content-layout {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* ==========================================================
   LEGAL & CONDITIONS OF USE SCREEN (EXACT REPLICA DE FOTOS)
   ========================================================== */
.legal-screen {
  position: relative;
  width: 100%;
  flex: 1;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.legal-top-bar {
  width: 100%;
  height: 28px;
  background-color: #382a85;
}

.legal-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background-color: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.legal-return-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f3f5;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9px;
  padding: 8px 14px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legal-return-btn:hover {
  background: #e2e8f0;
}

.legal-return-btn:active {
  transform: scale(0.96);
}

.legal-content-body {
  padding: 14px 20px 36px 20px;
  font-family: var(--font-main);
  color: #111827;
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
}

.legal-heading {
  font-size: 19px;
  font-weight: 800;
  color: #111827;
  margin-top: 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.legal-emoji {
  font-size: 21px;
  display: inline-block;
  line-height: 1;
}

.legal-meta-block,
.legal-contact-block {
  font-size: 13.5px;
  line-height: 1.55;
  color: #1f2937;
  margin-bottom: 16px;
}

.legal-meta-block p,
.legal-contact-block p {
  margin-bottom: 3px;
}

.legal-sub-contact {
  margin-top: 10px;
}

.legal-lead {
  font-size: 13.5px;
  line-height: 1.5;
  color: #1f2937;
  margin-bottom: 14px;
}

.legal-term-item {
  margin-bottom: 18px;
}

.legal-subheading {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.legal-term-item p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #1f2937;
  margin-bottom: 8px;
}

.legal-bullets {
  list-style-type: disc;
  padding-left: 22px;
  margin: 6px 0 10px 0;
}

.legal-bullets li {
  font-size: 13.5px;
  line-height: 1.5;
  color: #1f2937;
  margin-bottom: 5px;
}

.legal-text-link {
  color: #2563eb;
  text-decoration: underline;
  word-break: break-all;
}

.legal-text-link:hover {
  color: #1d4ed8;
}

.legal-bottom-bar {
  width: 100%;
  height: 28px;
  background-color: #382a85;
  margin-top: auto;
}

/* ==========================================================
   DESKTOP ADAPTATION (VISTA DE COMPUTADOR)
   Preserves mobile <= 767px exactly as it is now.
   Adapts >= 768px with a luxurious 2-column showcase layout.
   ========================================================== */
@media (min-width: 768px) {
  body {
    background-color: #f1f4f8;
    background-image: radial-gradient(circle at 50% 0%, #ffffff 0%, #eef2f7 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
  }

  .page-wrapper {
    max-width: 960px;
    width: 100%;
    min-height: 560px;
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.09), 0 4px 16px rgba(0, 0, 0, 0.04);
    margin: auto;
    overflow: hidden;
  }

  .main-screen {
    padding: 0;
    min-height: 560px;
  }

  .app-header {
    height: 72px;
    padding: 0 40px;
    border-bottom: 1px solid #f1f5f9;
  }

  .header-logo {
    height: 48px;
    max-width: 150px;
  }

  .lang-pill {
    height: 36px;
    padding: 0 14px;
    font-size: 13.5px;
  }

  /* Two-column responsive desktop layout */
  .product-content-layout {
    display: grid;
    grid-template-columns: 1fr 1.08fr;
    grid-template-rows: auto auto auto auto;
    grid-template-areas:
      "image title"
      "image auth"
      "image desc"
      "image footer";
    gap: 14px 44px;
    padding: 36px 44px 44px 44px;
    align-items: center;
  }

  .product-image-container {
    grid-area: image;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f9 100%);
    border: 1px solid #e5e9f0;
    border-radius: 20px;
    padding: 32px 24px;
    height: 100%;
    min-height: 380px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.02);
  }

  .product-box-img {
    max-width: 320px;
    width: 100%;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.09));
  }

  .product-header-title {
    grid-area: title;
    text-align: left;
    margin: 0;
  }

  .product-header-title h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.4px;
  }

  .authenticity-card {
    grid-area: auth;
    margin: 0;
    padding: 12px 18px 12px 14px;
  }

  .auth-icon-badge {
    width: 48px;
    height: 48px;
  }

  .shield-svg {
    width: 46px;
    height: 46px;
  }

  .auth-tag {
    font-size: 17px;
  }

  .auth-code {
    font-size: 14px;
  }

  .product-description-container {
    grid-area: desc;
    padding: 0;
    margin-top: 4px;
  }

  .product-desc-text {
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
  }

  .product-dosage {
    font-size: 14.5px;
    margin-top: 10px;
  }

  .app-footer {
    grid-area: footer;
    margin: 0;
    padding: 8px 0 0 0;
    justify-content: flex-start;
  }

  .bottom-actions-container {
    justify-content: flex-start;
    gap: 20px;
  }

  /* AuthNow Scan Flow desktop adaptation */
  .authnow-scan-flow {
    border-radius: 24px;
    padding: 18px 24px 28px 24px;
  }

  .scan-stage-intro,
  .scan-stage-camera {
    max-width: 420px;
    margin: 0 auto;
  }

  /* Modals on desktop */
  .modal-card {
    max-width: 480px;
    border-radius: 22px;
    padding: 30px 26px 26px 26px;
  }

  .drawer-sidebar {
    max-width: 320px;
  }
}

@media (min-width: 1100px) {
  .page-wrapper {
    max-width: 1040px;
  }

  .product-content-layout {
    padding: 44px 52px 52px 52px;
    gap: 16px 52px;
  }

  .product-image-container {
    min-height: 410px;
    padding: 40px 30px;
  }

  .product-box-img {
    max-width: 360px;
  }

  .product-header-title h1 {
    font-size: 32px;
  }
}

