:root {
  --bg: #020617;
  --bg-alt: #050816;
  --card-bg: #020617;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.18);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --danger: #f97373;
  --radius: 20px;
  --shadow-soft: 0 22px 45px rgba(0, 0, 0, 0.65);
  --border-soft: rgba(148, 163, 184, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    radial-gradient(circle at top, #1e293b 0, transparent 55%),
    radial-gradient(circle at 120% 0, rgba(99, 102, 241, 0.28), transparent 60%),
    #020617;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =======================
   HEADER + NAV
   ======================= */

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 1rem 1.5rem 0.8rem;
  background: linear-gradient(
      to bottom,
      rgba(15, 23, 42, 0.96),
      rgba(15, 23, 42, 0.86),
      transparent
    );
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.header-top {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.logo span {
  color: transparent;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
}

.subtitle {
  max-width: 1100px;
  margin: 0.35rem auto 0.3rem;
  text-align: left;
  color: var(--muted);
  font-size: 0.9rem;
  opacity: 0.95;
}

/* Lang switch */

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.lang-select {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: var(--text);
  padding: 0.25rem 0.7rem;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
}

/* Nav */

.nav {
  margin-top: 0.6rem;
  display: flex;
  justify-content: flex-start;
  gap: 0.45rem;
  padding: 0.35rem 0;
  flex-wrap: wrap;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.nav__link {
  font-size: 0.8rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease,
    border-color 0.15s ease, transform 0.15s ease;
}

.nav__link:hover {
  background: rgba(30, 64, 175, 0.55);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.5);
  transform: translateY(-1px);
}

.nav__link--active {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: white;
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.55);
}

/* =======================
   LAYOUT + HERO + TOOLS
   ======================= */

.container {
  max-width: 1100px;
  margin: 0 auto 3rem;
  padding: 1.5rem 1.5rem 3rem;
}

/* Hero */

.hero {
  margin-bottom: 2rem;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 55%),
    linear-gradient(135deg, #020617, #020617);
  border-radius: 22px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  padding: 1.7rem 1.6rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top, rgba(129, 140, 248, 0.22), transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.hero h1 {
  margin: 0 0 0.4rem;
  font-size: 1.9rem;
  position: relative;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36rem;
  line-height: 1.6;
  position: relative;
}

/* Grid de herramientas */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tools-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 700px;
  margin: 0 auto;
}

/* Tarjetas */

.tool-card {
  background: linear-gradient(135deg, #020617, #020617);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.4rem 1.3rem 1.3rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  position: relative;
  overflow: hidden;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out,
    border-color 0.16s ease-out, background 0.16s ease-out;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at top left, var(--accent-soft), transparent 60%);
  opacity: 0.65;
  pointer-events: none;
  transition: opacity 0.16s ease-out;
}

.tool-card h2 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  position: relative;
}

.tool-card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  position: relative;
}

/* Hover tarjetas */

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.9);
  border-color: rgba(129, 140, 248, 0.9);
  background: linear-gradient(135deg, #020617, #020617);
}

.tool-card:hover::before {
  opacity: 1;
}

/* =======================
   RESTO DE ESTILOS
   (sin cambios lógicos)
   ======================= */

/* Inputs de archivo */

.file-label {
  display: block;
  border-radius: 999px;
  border: 1px dashed rgba(156, 163, 175, 0.7);
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 0.8rem;
  background: rgba(15, 23, 42, 0.7);
  text-align: center;
}

.file-label input {
  display: none;
}

/* Lista de archivos */

.file-list-wrapper {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  padding: 0.6rem 0.7rem;
  margin-bottom: 0.8rem;
}

.file-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 160px;
  overflow-y: auto;
  font-size: 0.8rem;
}

.file-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed rgba(31, 41, 55, 0.8);
}

.file-list-item:last-child {
  border-bottom: none;
}

.file-list-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Botones */

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
  margin-top: 0.3rem;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: white;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.5);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 35px rgba(79, 70, 229, 0.6);
}

.btn.secondary {
  background: rgba(15, 23, 42, 0.95);
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.btn.secondary:hover {
  background: rgba(30, 64, 175, 0.4);
  color: #e5e7eb;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Textos de ayuda y estados */

.hint {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.status {
  margin-top: 0.7rem;
  min-height: 1.1rem;
  font-size: 0.8rem;
}

.status--success {
  color: #4ade80;
}

.status--error {
  color: var(--danger);
}

.status--info {
  color: #38bdf8;
}

/* Split info */

.split-info {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.split-info--secondary {
  opacity: 0.9;
}

/* Split mode */

.split-mode {
  margin: 0.7rem 0 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.split-mode__label {
  font-weight: 600;
  color: var(--text);
}

.split-mode__option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Compress quality */

.compress-quality {
  margin: 0.7rem 0 0.7rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.35);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.compress-quality__label {
  font-weight: 600;
  color: var(--text);
}

.compress-quality__option {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Signature pad */

.signature-pad {
  margin: 0.8rem 0;
  padding: 0.8rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.signature-pad__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.signature-pad__canvas-wrapper {
  border-radius: 10px;
  overflow: hidden;
  background: #020617;
  border: 1px dashed rgba(148, 163, 184, 0.6);
}

#signCanvas {
  width: 100%;
  display: block;
  background: transparent;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 50;
  align-items: center;
  justify-content: center;
}

.modal--open {
  display: flex;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(2px);
}

.modal__dialog {
  position: relative;
  max-width: 900px;
  width: min(900px, 100% - 2rem);
  max-height: 90vh;
  background: #020617;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.7);
  padding: 1rem 1.2rem 1rem;
  display: flex;
  flex-direction: column;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal__header h3 {
  margin: 0;
  font-size: 1rem;
}

.modal__close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.modal__body {
  margin-top: 0.6rem;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

.modal__hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.modal__controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  align-items: center;
}

.modal__footer {
  margin-top: 0.7rem;
  display: flex;
  justify-content: flex-end;
}

/* Thumbnails */

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.7rem;
  max-height: 360px;
  overflow-y: auto;
}

.thumb-item {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 12px;
  padding: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.thumb-item.dragging {
  opacity: 0.4;
}

.thumb-item__canvas-wrapper {
  background: #020617;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 140px;
}

.thumb-item canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.thumb-item__label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.thumb-item__checkbox {
  accent-color: var(--accent);
}

/* Footer */

.footer {
  margin-top: auto;
  text-align: center;
  padding: 1rem 1.5rem 1.6rem;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid rgba(15, 23, 42, 0.95);
  background: rgba(2, 6, 23, 0.98);
}

.footer-links {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 0.3rem;
}

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

.footer-x {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

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

/* Responsive básicos */

@media (max-width: 768px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .subtitle {
    text-align: left;
  }
}

@media (max-width: 600px) {
  .header {
    padding-top: 1.8rem;
  }

  .logo {
    font-size: 1.7rem;
  }

  .container {
    padding: 1.25rem 1rem 3rem;
  }

  .modal__dialog {
    width: calc(100% - 1.6rem);
  }
}

/* Vista previa para firmar con imagen */

.sign-preview-container {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: #020617;
  padding: 0.5rem;
  max-height: 70vh;
  overflow: visible !important;
}

.sign-preview-inner {
  position: relative;
  display: inline-block;
  overflow: visible !important;
}

#signPreviewCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

/* Firma */

.sign-signature-wrapper {
  position: absolute !important;
  left: 0;
  top: 0;
  display: inline-block;
  pointer-events: none;
  z-index: 5 !important;
}

.sign-preview-signature {
  position: absolute !important;
  left: 0;
  top: 0;
  width: 30%;
  max-width: 220px;
  user-select: none;
  cursor: move;
  pointer-events: auto;
  z-index: 6 !important;
}

/* Botones de la herramienta Firmar PDF */

.sign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.sign-actions .btn {
  flex: 1 1 auto;
}

@media (max-width: 640px) {
  .sign-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .sign-actions .btn {
    width: 100%;
  }
}

/* Handles de redimensión */

.resize-handle {
  width: 16px;
  height: 16px;
  background: #7b00ff;
  border: 2px solid var(--primary, #4f46e5);
  border-radius: 4px;
  position: absolute;
  pointer-events: auto;
  z-index: 10 !important;
}

.handle-ne { top: -12px; right: -12px; cursor: ne-resize; }
.handle-nw { top: -12px; left: -12px; cursor: nw-resize; }
.handle-se { bottom: -12px; right: -12px; cursor: se-resize; }
.handle-sw { bottom: -12px; left: -12px; cursor: sw-resize; }

/* visitas */

.visit-badge {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  font-size: 0.8rem;
  color: var(--muted);
  backdrop-filter: blur(4px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.visit-badge__label {
  white-space: nowrap;
}

.visit-badge__value {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
}

.visit-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.7);
}

.visit-badge--hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

@media (max-width: 600px) {
  .visit-badge {
    right: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.75rem;
    padding: 0.35rem 0.7rem;
  }
}

#visit-hearts-container {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  pointer-events: none;
  overflow: visible;
  z-index: 40;
}

.visit-heart {
  position: absolute;
  font-size: 1rem;
  color: #f472b6;
  opacity: 0.9;
  animation: heartFloat 2.8s ease-out forwards;
  filter: drop-shadow(0 0 6px rgba(244, 114, 182, 0.4));
}

@keyframes heartFloat {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 1;
  }
  50% {
    transform: translate(-10px, -40px) scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: translate(10px, -90px) scale(0.9);
    opacity: 0;
  }
}

/* Modal de introducción */

.intro-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.intro-modal--open {
  display: block;
}

.intro-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}

.intro-modal__dialog {
  position: relative;
  max-width: 460px;
  margin: 10vh auto;
  padding: 1.6rem 1.4rem;
  background: linear-gradient(135deg, var(--card-bg), #020617);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(148, 163, 184, 0.35);
  text-align: center;
  color: var(--text);
}

.intro-modal__dialog h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.intro-modal__dialog p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5rem;
}

.intro-social {
  margin: 0.8rem 0 1.2rem;
}

.intro-social a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.intro-social a:hover {
  text-decoration: underline;
}

/* Botón flotante "Sugerir herramienta" */

.suggest-fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: var(--shadow-soft);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  backdrop-filter: blur(4px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.suggest-fab__icon {
  font-size: 1rem;
}

.suggest-fab__text {
  white-space: nowrap;
}

.suggest-fab:hover {
  background: rgba(30, 64, 175, 0.75);
  color: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.7);
}

@media (max-width: 600px) {
  .suggest-fab {
    left: 0.7rem;
    bottom: 0.7rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
}

/* Banner */
/* ================================
   PROMO BANNER — ESTILO DESTACADO
   ================================ */

.promo-banner {
  margin: 2.2rem auto;
  padding: 0;
}

.promo-banner__content {
  padding: 1.6rem 1.4rem;
  border-radius: 22px;
  text-align: center;

  /* Fondo llamativo */
  background: radial-gradient(circle at top right,
      rgba(129,140,248,0.35),
      rgba(99,102,241,0.18),
      transparent 70%
    ),
    linear-gradient(135deg, #0f172a, #1e1b4b);

  border: 1px solid rgba(129,140,248,0.45);
  box-shadow:
    0 0 25px rgba(129,140,248,0.35),
    0 0 60px rgba(56,189,248,0.12),
    var(--shadow-soft);

  position: relative;
  overflow: hidden;
}

/* BRILLO animado */
.promo-banner__content::before {
  content: "";
  position: absolute;
  top: -40%;
  left: -20%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle,
      rgba(139,92,246,0.26),
      transparent 70%
    );
  opacity: 0.4;
  filter: blur(40px);
  animation: promoGlow 6s ease-in-out infinite alternate;
}

@keyframes promoGlow {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.35;
  }
  100% {
    transform: scale(1.35) translate(8%, -6%);
    opacity: 0.55;
  }
}

/* TÍTULO */
.promo-banner__content h3 {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 700;

  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  -webkit-background-clip: text;
  color: transparent;

  position: relative;
  z-index: 2;
}

/* TEXTO */
.promo-banner__content p {
  margin: 0 0 1rem;
  color: #cbd5e1;
  font-size: 0.95rem;
  position: relative;
  z-index: 2;
}

/* BOTÓN */
.promo-banner__content .btn.secondary {
  margin-top: 0.2rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;

  /* Fondo más brillante */
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #fff !important;
  border: none;

  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  z-index: 2;
}

.promo-banner__content .btn.secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(129, 140, 248, 0.55);
}

/* TIENDA */

.shop-filters {
  margin-top: 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border-radius: 999px;
  padding: 6px 14px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #f7f7f7;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.chip--active {
  background: var(--primary, #2962ff);
  color: #fff;
  border-color: transparent;
}

.shop-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.shop-card .price {
  display: block;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 10px 0 15px;
}

/* FAQ tipo acordeón (otra página) */

.faq-section {
  margin-top: 56px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

.faq-title {
  font-size: 1.6rem;
  margin-bottom: 20px;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
}

.faq-item {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 0% 0%, rgba(88, 101, 242, 0.20), transparent 55%),
              #050816;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.faq-toggle {
  width: 100%;
  padding: 14px 18px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: #ffffff;
}

.faq-toggle:hover {
  filter: brightness(1.05);
}

.faq-question {
  font-size: 0.98rem;
  font-weight: 600;
}

.faq-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 18px;
  transition: max-height 0.25s ease, padding-top 0.25s ease, padding-bottom 0.25s ease;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.faq-content p {
  font-size: 0.9rem;
  color: rgba(229, 233, 255, 0.9);
  line-height: 1.6;
  margin: 10px 0 14px;
}

.faq-item.is-open {
  border-color: var(--primary, #4f46e5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.faq-item.is-open .faq-question {
  color: var(--primary, #4f46e5);
}

.faq-item.is-open .faq-icon {
  background: var(--primary, #4f46e5);
  color: #ffffff;
  transform: rotate(90deg);
}

.faq-item.is-open .faq-content {
  padding-top: 8px;
  padding-bottom: 12px;
}

/* IMG A PDF */

.img2pdf-file-list {
  width: 100%;
  overflow-x: hidden;
}

.img2pdf-file-list .file-list-item.img2pdf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  overflow: hidden;
}

.img2pdf-item-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.img2pdf-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,0.4);
  flex-shrink: 0;
}

.img2pdf-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.img2pdf-name {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.img2pdf-size {
  font-size: 0.75rem;
  color: #9ca3af;
}

.img2pdf-options {
  margin: 1rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.img2pdf-options .split-mode__option select {
  margin-top: 0.25rem;
}

@media (max-width: 480px) {
  .img2pdf-thumb {
    width: 58px;
    height: 58px;
  }

  .img2pdf-item-left {
    gap: 0.75rem;
  }
}

.img2pdf-controls {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.btn.btn-xs {
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
}

/* Botones SVG premium */

.img2pdf-icon-btn {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  display: flex;
  align-items:center;
  justify-content:center;
  cursor: pointer;
  transition: 0.2s ease;
  flex-shrink: 0;
}

.img2pdf-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: #cbd5e1;
  transition: 0.2s ease;
}

.img2pdf-icon-btn:hover {
  background: rgba(99,102,241,0.23);
  border-color: rgba(99,102,241,0.55);
}

.img2pdf-icon-btn:hover svg {
  fill: #fff;
}

.img2pdf-icon-btn.delete {
  border-color: rgba(248,113,113,0.35);
}

.img2pdf-icon-btn.delete svg {
  fill: #fda4a4;
}

.img2pdf-icon-btn.delete:hover {
  background: rgba(248,113,113,0.22);
  border-color: rgba(248,113,113,0.55);
}

.img2pdf-icon-btn.delete:hover svg {
  fill: #fff;
}

/* Select premium */

.select-premium {
  width: 100%;
  max-width: 220px;
  padding: 0.45rem 2.2rem 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background:
    radial-gradient(circle at 0 0, rgba(148,163,184,0.35), transparent 60%),
    #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, #e5e7eb 50%, transparent 50%),
    linear-gradient(135deg, #e5e7eb 50%, transparent 50%);
  background-position:
    calc(100% - 1.1rem) 50%,
    calc(100% - 0.7rem) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.select-premium:hover {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.35),
    0 0 24px rgba(79, 70, 229, 0.45);
}

.select-premium:focus {
  border-color: #6366f1;
  box-shadow:
    0 0 0 1px rgba(129, 140, 248, 0.8),
    0 0 28px rgba(94, 92, 240, 0.75);
}

.split-mode__option span:first-child {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  color: #e5e7eb;
}

@media (max-width: 600px) {
  .img2pdf-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .select-premium {
    max-width: 100%;
  }
}

/* OCR */

.ocr-output {
  margin-top: 1.25rem;
}

.ocr-output__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.ocr-textarea {
  width: 100%;
  min-height: 190px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.45);
  background: #020617;
  padding: 0.75rem 0.9rem;
  color: #e5e7eb;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
  resize: vertical;
}

.ocr-textarea:focus {
  outline: none;
  border-color: rgba(129,140,248,0.9);
  box-shadow:
    0 0 0 1px rgba(129,140,248,0.5),
    0 0 24px rgba(79,70,229,0.4);
}

.ocr-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ocr-actions .btn {
  flex: 1 1 auto;
}

@media (max-width: 640px) {
  .ocr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ocr-actions .btn {
    width: 100%;
  }

  .ocr-options {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* NUEVO CONTENIDO ANTI ADSENSE – HOME SEO */

.content-section {
  margin-top: 2.5rem;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
  line-height: 1.65;
}

.content-section h2 {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: #e2e8f0;
  font-weight: 600;
}

.content-section p,
.content-section ul {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.content-section ul {
  margin-top: 0.75rem;
  padding-left: 1.3rem;
}

.content-section ul li {
  margin-bottom: 0.45rem;
}

/* FAQ <details> en home */

.faq {
  margin-top: 2.5rem;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
}

.faq h2 {
  font-size: 1.3rem;
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.faq details {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  margin-bottom: 0.8rem;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.faq details[open] {
  border-color: rgba(129, 140, 248, 0.6);
  box-shadow: 0 0 12px rgba(79, 70, 229, 0.25);
}

.faq summary {
  cursor: pointer;
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 500;
  list-style: none;
}

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

.faq summary::after {
  content: "➕";
  float: right;
  transition: transform 0.3s ease;
  color: #a5b4fc;
}

.faq details[open] summary::after {
  content: "➖";
  transform: rotate(180deg);
}

.faq p {
  margin-top: 0.6rem;
  color: #cbd5e1;
  font-size: 0.9rem;
  padding-right: 0.5rem;
}

/* Testimonios */

.testimonials {
  margin-top: 2.5rem;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 1.6rem 1.8rem;
}

.testimonials h2 {
  font-size: 2rem;
  color: #e2e8f0;
  margin-bottom: 1rem;
}

.testimonials blockquote {
  background: rgba(148, 163, 184, 0.08);
  border-left: 4px solid #6366f1;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  color: #cbd5e1;
  font-style: italic;
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .content-section,
  .faq,
  .testimonials {
    padding: 1.2rem 1.2rem;
  }

  .content-section h2,
  .faq h2,
  .testimonials h2 {
    font-size: 1.18rem;
  }
}

/* Guía / Ayuda */

.guide-section {
  margin-top: 3rem;
  padding: 2rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.guide-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #fff;
}

.guide-intro {
  font-size: 1rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

.guide-steps {
  margin: 0 0 1.5rem 1.2rem;
  color: #e2e8f0;
  line-height: 1.55;
}

.guide-steps li {
  margin-bottom: 0.6rem;
}

.guide-tips h3 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #fff;
}

.guide-tips ul {
  margin-left: 1.2rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.guide-tips a {
  color: #7aa2ff;
  text-decoration: underline;
}

@media (max-width: 680px) {
  .guide-section {
    padding: 1.25rem;
  }
}

/* Reviews / Opiniones (sección de la home) */

.reviews-section {
  margin-top: 3rem;
  padding: 2rem;
  background: #0f172a;
  border: 1px solid rgba(148,163,184,0.15);
  border-radius: 12px;
}

.reviews-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.reviews-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

/* Formulario de review */

.review-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.review-form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.review-form input,
.review-form select,
.review-form textarea {
  background: #1e293b;
  border: 1px solid rgba(148,163,184,0.3);
  color: #e2e8f0;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}

.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus {
  border-color: var(--primary, #4f46e5);
}

.review-submit {
  margin-top: 0.5rem;
  width: 100%;
}

/* Lista de reviews */

.reviews-grid {
  display: grid;
  gap: 1rem;
}

.review-card {
  background: #1e293b;
  border: 1px solid rgba(148,163,184,0.15);
  padding: 1rem;
  border-radius: 10px;
  animation: fadeIn 0.3s ease;
}

.review-text {
  color: #f8fafc;
  margin-bottom: 0.6rem;
  line-height: 1.45;
}

.review-author {
  font-size: 0.85rem;
  color: #94a3b8;
}

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

@media (min-width: 640px) {
  .review-form-row input,
  .review-form-row select {
    width: calc(50% - 0.5rem);
  }

  .review-submit {
    max-width: 220px;
  }
}

/* Resumen de opiniones */

.reviews-summary {
  margin-bottom: 1.5rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(148,163,184,0.25);
}

.reviews-summary-score {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.25rem;
}

#reviewsAverage {
  font-size: 1.6rem;
  font-weight: 700;
  color: #fbbf24;
}

.reviews-summary-stars {
  font-size: 1.1rem;
}

.reviews-summary-count {
  font-size: 0.85rem;
  color: #9ca3af;
}


/* NAV compacto en móvil + indicador de scroll */
@media (max-width: 640px) {
  .nav {
    margin-top: 0.4rem;
    padding: 0.3rem 0;
    flex-wrap: nowrap;           /* no saltar de línea */
    overflow-x: auto;            /* scroll horizontal */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    gap: 0.35rem;

    position: relative;          /* necesario para el ::after */
    scrollbar-width: none;       /* oculta barra en Firefox */
  }

  .nav::-webkit-scrollbar {
    display: none;               /* oculta barra en Chrome/Safari */
  }

  /* indicador de que hay más a la derecha */
  .nav::after {
    content: "→";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 20px;
    padding-right: 8px;

    font-size: 1rem;
    color: #a5b4fc;
    font-weight: bold;

    background: linear-gradient(
      to right,
      transparent,
      rgba(15, 23, 42, 0.6),
      rgba(15, 23, 42, 0.95)
    );

    pointer-events: none;
    opacity: 0.75;
    animation: navHint 1.3s ease-in-out infinite;
  }

  .nav__link {
    flex: 0 0 auto;              /* ancho según su contenido */
    white-space: nowrap;         /* que no corten texto */
  }

  /* opcional: un poco de respiro arriba del contenido */
  .container {
    padding-top: 1.25rem;
  }
}

/* animación de la flechita */
@keyframes navHint {
  0%   { opacity: 0.2; transform: translateY(-50%) translateX(0); }
  50%  { opacity: 1;   transform: translateY(-50%) translateX(-4px); }
  100% { opacity: 0.2; transform: translateY(-50%) translateX(0); }
}

/* ===== Selector de idioma en móvil arriba a la derecha ===== */
@media (max-width: 640px) {

  .header-top {
    width: 100%;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
  }

  /* Ajustar tamaño del logo para que no empuje el selector */
  .logo {
    font-size: 1.4rem;
  }

  /* Que el idioma no salte de línea */
  .lang-switch {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }

  .lang-label {
    font-size: 0.75rem;
  }

  .lang-select {
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
  }
}
