/* css/estilo.css - Diseño moderno y atractivo */

@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800;900&display=swap");

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  margin: 0;
  padding: 0;
  background: #f9fafb;
  min-height: 100vh;
}

/* Header moderno con glassmorphism */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

header h1 {
  margin: 0;
  font-size: 1.3rem;
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  margin-top: 0;
  color: #111827;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: #6b7280;
  margin-bottom: 2rem;
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.5rem;
  color: #374151;
  font-size: 0.95rem;
}

textarea {
  width: 100%;
  min-height: 160px;
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  font-family: monospace;
  font-size: 0.95rem;
  resize: vertical;
  transition: all 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.hint {
  font-size: 0.875rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.btn-primary {
  display: inline-block;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

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

.btn-secondary {
  display: inline-block;
  border: 2px solid #667eea;
  background: #ffffff;
  color: #667eea;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-add-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-add-cart:hover {
  background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

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

.cart-added {
  display: inline-flex;
  align-items: center;
  color: #28a745;
  font-weight: 600;
  font-size: 0.9rem;
}

.btn-add-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.results {
  margin-top: 3rem;
}

.results h2 {
  margin-top: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

th,
td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.95rem;
  text-align: left;
}

th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

tbody tr {
  transition: all 0.2s ease;
}

tbody tr:hover {
  background: #f9fafb;
  transform: scale(1.01);
}

.empty {
  color: #6b7280;
  font-size: 0.9rem;
}

.scan-button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  background: #ffffff;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.scan-button:hover {
  border-color: #667eea;
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.scan-button span {
  font-size: 1.3rem;
}

.scan-note {
  font-size: 0.8rem;
  color: #9ca3af;
}

.alert-success {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
  border: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.alert-error {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.alert-error ul {
  margin: 0;
  padding-left: 1.2rem;
}

.alert-warning {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.alert-info {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: none;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

select {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  font-size: 1rem;
  background-color: #fff;
  transition: all 0.3s ease;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.admin-filters {
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.admin-filters a {
  margin-left: 0.5rem;
  text-decoration: none;
  color: #2563eb;
}

.admin-filters a.active {
  font-weight: 600;
  text-decoration: underline;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.admin-table th,
.admin-table td {
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.9rem;
  text-align: left;
}

.admin-table th {
  background: #f9fafb;
  font-weight: 600;
}

.btn-link {
  font-size: 0.85rem;
  color: #2563eb;
  text-decoration: none;
}

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

.badge-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.badge-new {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-accepted {
  background: #ecfdf3;
  color: #166534;
}

.badge-sent {
  background: #fef9c3;
  color: #854d0e;
}

.badge-received {
  background: #e0f2fe;
  color: #075985;
}

.badge-paid {
  background: #f0fdf4;
  color: #166534;
}

.badge-cancelled {
  background: #fee2e2;
  color: #b91c1c;
}

/* ============================================
   HEADER MODERNO Y PROFESIONAL
   ============================================ */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.85rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

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

/* Logo redesigned */
.logo {
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.8;
}

.logo-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.logo-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: #667eea;
  letter-spacing: -0.3px;
}

.logo svg {
  flex-shrink: 0;
}

.logo:hover .logo-main {
  color: #764ba2;
}

.logo-tagline {
  font-size: 0.65rem;
  color: #9ca3af;
  font-weight: 400;
  letter-spacing: 0.3px;
  margin-top: -0.8rem;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

.tombolo-icon {
  width: 28px;
  height: 28px;
  opacity: 0.8;
}

@media (max-width: 768px) {
  .tombolo-icon {
    width: 14px;
    height: 14px;
  }
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
}

.user-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.nav-link:hover {
  background: #f3f4f6;
  color: #111827;
}

.nav-link svg {
  flex-shrink: 0;
}

.nav-text {
  display: none;
}

.nav-text-mobile {
  display: none;
}

.nav-text-desktop {
  display: inline;
}

@media (min-width: 1024px) {
  .nav-text {
    display: inline;
  }

  .nav-text-mobile {
    display: none;
  }

  .nav-text-desktop {
    display: inline;
  }
}

.nav-link-admin {
  color: #8b5cf6;
  background: #f5f3ff;
}

.nav-link-admin:hover {
  background: #ede9fe;
  color: #7c3aed;
}

.nav-link-cart {
  position: relative;
}

.nav-link-secondary {
  color: #6b7280;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

.nav-link-secondary:hover {
  color: #374151;
  background: #f9fafb;
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-header-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.6rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25);
}

.btn-header-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.btn-header-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: #4b5563;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid #d1d5db;
  cursor: pointer;
  white-space: nowrap;
}

.btn-header-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

/* Estilos legacy - ahora manejados por nav-link */
.login-btn,
.logout-btn,
.cart-link,
.my-account-btn,
.admin-nav-btn {
  /* Ahora se manejan con las clases modernas del header */
}

.admin-lot-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.admin-lot-col {
  flex: 1 1 300px;
}

.address-block {
  background: #f9fafb;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  border: 1px solid #e5e7eb;
  white-space: pre-wrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 0.9rem;
}

.btn-small {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

/* Libros tasados - Admin panel */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card.stat-oro {
  border-left-color: #ffd700;
}

.stat-card.stat-plata {
  border-left-color: #c0c0c0;
}

.stat-card.stat-bronce {
  border-left-color: #cd7f32;
}

.stat-card h3 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  text-transform: uppercase;
  color: #666;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin: 0.5rem 0;
  color: #333;
}

.stat-detail {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
}

.filters-form {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group {
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: #666;
}

.filter-group input,
.filter-group select {
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.875rem;
}

.results-count {
  color: #666;
  font-size: 0.875rem;
  margin: 1rem 0;
}

.badge-nivel {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-nivel.badge-oro {
  background: #ffd700;
  color: #856404;
}

.badge-nivel.badge-plata {
  background: #c0c0c0;
  color: #383d41;
}

.badge-nivel.badge-bronce {
  background: #cd7f32;
  color: #721c24;
}

.tasacion-manual-input {
  width: 100px;
  padding: 0.375rem 0.5rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.875rem;
  transition: border-color 0.15s;
}

.tasacion-manual-input:focus {
  outline: none;
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.save-status {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  color: #28a745;
}

.save-status.saving {
  color: #ffc107;
}

.save-status.error {
  color: #dc3545;
}

.book-cover {
  width: 60px;
  height: auto;
  max-height: 80px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-delete {
  background: #dc3545;
  color: white;
  border: none;
  border-radius: 4px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}

.btn-delete:hover {
  background: #c82333;
}

.btn-delete:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-icon {
  color: #111827;
  text-decoration: none;
  font-size: 1.2rem;
  display: inline-block;
  line-height: 1;
}

.btn-icon:hover {
  opacity: 0.7;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.875rem;
  text-decoration: none;
  display: inline-block;
  align-self: flex-end;
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
}

/* Row borders by nivel */
.admin-table tbody tr.nivel-oro {
  border-left: 5px solid #ffd700;
}

.admin-table tbody tr.nivel-plata {
  border-left: 5px solid #c0c0c0;
}

.admin-table tbody tr.nivel-bronce {
  border-left: 5px solid #cd7f32;
}

.admin-table tbody tr.nivel-rechazado {
  border-left: 5px solid #dc3545;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  background: white;
  color: #111827;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination-btn:hover {
  background: #f8f9fa;
  border-color: #111827;
}

.pagination-btn.active {
  background: #111827;
  color: white;
  border-color: #111827;
  font-weight: 600;
  cursor: default;
}

.pagination-dots {
  padding: 0.5rem;
  color: #6c757d;
}

/* Ver libro - Info cards */
.info-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-title {
  margin: 0 0 1rem 0;
  font-size: 1.2rem;
  color: #333;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

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

.info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-item.full-width {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 0.95rem;
  color: #333;
  word-break: break-word;
}

.code-block {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1rem;
  font-family: "Courier New", monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Ver libro - Stats boxes */
.stats-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.stat-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-box .stat-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.stat-box .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.stat-box .stat-value {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Price comparison bars */
.price-comparison {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-bar {
  display: grid;
  grid-template-columns: 140px 1fr 80px;
  align-items: center;
  gap: 1rem;
}

.price-bar-label {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
}

.price-bar-container {
  background: #e9ecef;
  border-radius: 8px;
  height: 24px;
  overflow: hidden;
}

.price-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.3s ease;
}

.price-bar-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
  text-align: right;
}

/* Drops chart */
.drops-chart {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.drop-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 1rem;
}

.drop-period {
  font-size: 0.85rem;
  color: #495057;
  font-weight: 500;
}

.drop-bar {
  background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  min-width: 60px;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Rankings list */
.rankings-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ranking-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #007bff;
}

.ranking-category {
  font-size: 0.9rem;
  color: #495057;
  font-weight: 500;
}

.ranking-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #007bff;
}

/* Badge offer */
.badge-offer {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background: #e7f3ff;
  color: #0056b3;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Price charts */
.price-chart {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.5rem;
  position: relative;
}

.chart-point {
  cursor: pointer;
  transition: r 0.2s;
}

.chart-point:hover {
  r: 6;
  filter: brightness(1.2);
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.chart-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.chart-stat-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.chart-stat-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  font-weight: 600;
}

.chart-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #333;
}

/* Index page styles */
.index-hero {
  text-align: center;
}

.index-hero-content {
  max-width: 600px;
  margin: 0.5rem auto 0;
}

.index-hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.bookshelf-svg,
.hero-illustration-svg {
  width: 100%;
  max-width: 400px;
  height: auto;
}

.book-icon,
.valuation-icon,
.money-icon {
  transition: transform 0.3s ease;
}

.book-icon:hover {
  transform: translateY(-3px);
}

.money-icon circle {
  filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.3));
}

.index-hero-form-wrapper {
  text-align: left;
}

.index-form {
  max-width: 100%;
  margin: 0;
}

.index-form-group {
  margin-bottom: 1.5rem;
}

.index-form-label {
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: block;
  color: #374151;
}

.index-form-input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.index-form-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.index-hint {
  margin-top: 0.75rem;
}

.index-btn-primary {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  background: #ffffff;
  color: #667eea;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.index-btn-primary:hover {
  border-color: #667eea;
  background: #f9fafb;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.index-form-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 500;
}

.index-form-divider::before,
.index-form-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.index-form-divider span {
  padding: 0 1rem;
}

.index-form-scan-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border-radius: 12px;
  padding: 1.4rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0;
  box-shadow: 0 4px 14px 0 rgba(102, 126, 234, 0.4);
}

.index-form-scan-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

.index-form-scan-button span {
  font-size: 1.3rem;
}

/* Contenedor de resultados - aparece justo después del formulario */
.results-container {
  max-width: 900px;
  margin: 3rem auto 2rem;
  scroll-margin-top: 100px;
}

/* Links adicionales - van después de todo */
.index-additional-links {
  max-width: 600px;
  margin: 1.5rem auto 0;
  text-align: center;
}

.index-bulk-link {
  text-align: center;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.15);
}

.index-bulk-link p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9rem;
}

.index-bulk-link a {
  color: #667eea;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.index-bulk-link a:hover {
  color: #764ba2;
  border-bottom-color: #764ba2;
}

.index-scan-button {
  margin-top: 0;
}

.index-book-card {
  border: none;
  border-radius: 20px;
  padding: 2.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(249, 250, 251, 0.9) 100%
  );
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.index-book-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 50px rgba(102, 126, 234, 0.15);
}

.index-book-card-content {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.index-book-info {
  flex: 1;
  min-width: 300px;
}

.index-book-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.index-book-title-empty {
  color: #9ca3af;
}

.index-book-isbn {
  color: #6b7280;
  margin: 0.5rem 0;
  font-family: monospace;
  font-size: 0.9rem;
}

.index-book-actions {
  text-align: right;
}

.index-price-box {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border: none;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.2);
}

.index-price-label {
  margin: 0;
  color: #065f46;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.index-price-value {
  margin: 0.5rem 0 0 0;
  color: #047857;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}

.index-in-cart {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.index-add-cart-form {
  margin: 0;
}

.index-add-cart-btn {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  white-space: nowrap;
  font-weight: 700;
}

.index-rejected-box {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  border: none;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.15);
}

.index-rejected-title {
  margin: 0;
  color: #991b1b;
  font-weight: 700;
  font-size: 1.1rem;
}

.index-rejected-reason {
  margin: 0.75rem 0 0 0;
  color: #b91c1c;
  font-size: 0.95rem;
}

/* Sección para probar otro libro */
.try-another-book {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.try-another-book p {
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-weight: 600;
  font-size: 1rem;
}

.try-another-book .btn-secondary {
  display: inline-block;
  text-decoration: none;
  padding: 0.875rem 2rem;
  font-size: 1rem;
}

/* Formulario rápido para valorar otro libro */
.quick-search-form {
  margin-top: 2rem;
  padding: 2rem;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 100%
  );
  border-radius: 16px;
  border: 2px solid rgba(102, 126, 234, 0.2);
}

.quick-search-form h3 {
  margin: 0 0 1.25rem 0;
  color: #374151;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
}

.quick-search-input-group {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}

.quick-search-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1.05rem;
  transition: all 0.3s ease;
}

.quick-search-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

.quick-search-btn {
  padding: 1rem 2rem;
  white-space: nowrap;
  margin-top: 0;
}

.quick-search-scan-btn {
  margin-top: 1rem;
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .quick-search-input-group {
    flex-direction: column;
  }

  .quick-search-btn {
    width: 100%;
  }
}

.index-pending-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: none;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.15);
}

.index-pending-title {
  margin: 0;
  color: #92400e;
  font-weight: 700;
  font-size: 1.1rem;
}

.index-pending-text {
  margin: 0.75rem 0 0 0;
  color: #b45309;
  font-size: 0.95rem;
}

.index-cart-summary {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: none;
  border-radius: 20px;
  padding: 2rem;
  margin-top: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.2);
}

.index-cart-summary-text {
  margin: 0 0 1.5rem 0;
  font-size: 1.2rem;
  color: #0c4a6e;
  font-weight: 600;
}

.index-cart-summary-link {
  display: inline-block;
  padding: 1rem 2.5rem;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
}

/* Login & Registro common styles */
.auth-footer-box {
  text-align: center;
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.08) 0%,
    rgba(118, 75, 162, 0.08) 100%
  );
  border-radius: 16px;
}

.auth-footer-box p {
  margin: 0;
  color: #4b5563;
  font-size: 1rem;
}

.auth-footer-box a {
  color: #667eea;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid #667eea;
  transition: all 0.3s ease;
}

.auth-footer-box a:hover {
  color: #764ba2;
  border-color: #764ba2;
}

.registro-form {
  max-width: 500px;
  margin: 0 auto;
}

.registro-submit-btn {
  width: 100%;
  padding: 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.75rem;
}

.registro-hint-center {
  text-align: center;
  margin-top: 1.25rem;
}

/* Header cart link styles */
.cart-link {
  position: relative;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white !important;
  border-radius: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.cart-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Valoración masiva styles */
.vm-auth-required {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: none;
  color: #92400e;
  padding: 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.2);
}

.vm-auth-required h3 {
  margin: 0 0 1rem 0;
  font-size: 1.4rem;
  font-weight: 700;
}

.vm-auth-required p {
  margin: 0 0 1.5rem 0;
  font-size: 1.05rem;
}

.vm-auth-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: baseline;
}

.vm-auth-actions a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s ease;
  white-space: nowrap;
  line-height: 1;
  box-sizing: border-box;
  border: 2px solid transparent;
  vertical-align: middle;
}

.vm-auth-actions .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  border-color: transparent;
}

.vm-auth-actions .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.vm-auth-actions .btn-secondary {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.vm-auth-actions .btn-secondary:hover {
  background: #f3f4f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.vm-auth-actions a:not(.btn-primary):not(.btn-secondary) {
  background: white;
  color: #92400e;
  border: 2px solid #92400e;
  box-shadow: 0 4px 15px rgba(146, 64, 14, 0.15);
}

.vm-auth-actions a:not(.btn-primary):not(.btn-secondary):hover {
  background: #fef3c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(146, 64, 14, 0.2);
}

.vm-user-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: none;
  color: #1e40af;
  padding: 1.25rem 1.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.15);
}

.vm-results-hint {
  margin-top: 1rem;
  font-size: 1rem;
}

.vm-separator {
  margin: 2rem 0;
  border: 0;
  border-top: 2px solid rgba(102, 126, 234, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    margin: 1rem;
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .index-hero-content {
    max-width: 100%;
  }

  .hero-illustration-svg,
  .bookshelf-svg {
    max-width: 350px;
  }

  .index-hero-form-wrapper {
    text-align: center;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
  }

  .site-header {
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1.75rem;
    margin-bottom: -0.25rem;
  }

  .logo svg {
    width: 36px;
    height: 36px;
  }

  .logo-tagline {
    margin-top: -0.75rem;
  }

  .main-nav {
    gap: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: -0.25rem;
  }

  .user-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: -0.25rem;
  }

  .main-nav a,
  .user-nav a {
    font-size: 0.9rem;
  }

  .index-book-card {
    padding: 1.5rem;
  }

  .index-book-card-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .index-book-title {
    font-size: 1.2rem;
  }

  .index-price-value {
    font-size: 2rem;
  }

  table {
    font-size: 0.85rem;
  }

  th,
  td {
    padding: 0.75rem 0.5rem;
  }

  .cart-link {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }

  .vm-auth-required {
    padding: 1.5rem;
  }

  .vm-auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .vm-auth-actions a {
    width: 100%;
    text-align: center;
  }
}

/* Animaciones sutiles */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeIn 0.6s ease-out;
}

/* Scroll suave */
html {
  scroll-behavior: smooth;
}

/* Mejoras de accesibilidad */
:focus-visible {
  outline: 3px solid #667eea;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Loading states */
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Footer profesional */
.site-footer {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #e5e7eb;
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 1rem 0;
}

.footer-section h4 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section p {
  color: #9ca3af;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: inline-block;
  position: relative;
}

.footer-section ul li a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: width 0.3s ease;
}

.footer-section ul li a:hover {
  color: #ffffff;
  transform: translateX(5px);
}

.footer-section ul li a:hover::after {
  width: 100%;
}

/* Deshabilitar animaciones y hover en dispositivos táctiles (móviles) */
@media (pointer: coarse) {
  .footer-section ul li a {
    transition: none !important;
  }

  .footer-section ul li a:hover {
    color: #d1d5db;
    transform: none;
  }

  .footer-section ul li a:hover::after {
    width: 0;
  }

  .footer-section ul li a::after {
    display: none;
  }
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #e5e7eb;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-links a:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.social-links a svg {
  width: 20px;
  height: 20px;
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: #9ca3af;
  margin: 0;
  font-size: 0.9rem;
}

/* Ajustes responsive para footer */
@media (max-width: 768px) {
  .site-footer {
    padding: 3rem 1.5rem 1.5rem;
    margin-top: 3rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }

  .footer-section h3 {
    font-size: 1.3rem;
  }

  .footer-section h4 {
    font-size: 1rem;
  }

  .social-links {
    justify-content: center;
  }
}

/* Notificación flotante del carrito */
.cart-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(40, 167, 69, 0.3);
  z-index: 10000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.cart-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.cart-notification-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cart-notification-icon {
  font-size: 1.5rem;
  font-weight: bold;
}

.cart-notification-text {
  font-weight: 600;
  font-size: 1rem;
}

.cart-notification-btn {
  background: white;
  color: #28a745;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cart-notification-btn:hover {
  background: #f8f9fa;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .cart-notification {
    bottom: 10px;
    right: 10px;
    left: 10px;
    padding: 0.875rem 1rem;
  }

  .cart-notification-content {
    gap: 0.75rem;
  }

  .cart-notification-icon {
    font-size: 1.25rem;
  }

  .cart-notification-text {
    font-size: 0.9rem;
    flex: 1;
  }

  .cart-notification-btn {
    padding: 0.4rem 0.875rem;
    font-size: 0.85rem;
  }
}

/* Secciones de confianza en index */
.trust-section {
  background: white;
  padding: 3rem 2rem;
  margin-top: 0.5rem;
}

.trust-container {
  max-width: 1200px;
  margin: 0 auto;
}

.trust-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  margin-top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.trust-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.trust-benefit {
  text-align: center;
  padding: 2rem;
  background: #f9fafb;
  border-radius: 16px;
  transition: all 0.3s ease;
}

.trust-benefit:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
}

.trust-benefit-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.trust-benefit h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
  margin: 1rem 0;
}

.trust-benefit p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

/* Trust story - texto destacado */
.trust-story {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 2.5rem;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.05) 0%,
    rgba(118, 75, 162, 0.05) 100%
  );
  border-radius: 20px;
  border-left: 5px solid #667eea;
  position: relative;
  overflow: hidden;
}

.trust-story::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 8rem;
  font-family: Georgia, serif;
  color: rgba(102, 126, 234, 0.08);
  line-height: 1;
  font-weight: 700;
}

.trust-story-text {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #374151;
  margin: 0;
  position: relative;
  z-index: 1;
}

.trust-story-text strong {
  color: #667eea;
  font-weight: 700;
}

/* Cómo funciona */
.how-it-works-section {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  padding: 3rem 2rem;
  border-top: 2px solid #d1d5db;
}

.how-container {
  max-width: 1000px;
  margin: 0 auto;
}

.how-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  margin-top: 0;
  color: #1f2937;
}

.how-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #6b7280;
  margin-bottom: 2.5rem;
}

.how-steps {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.how-step {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.how-step:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.how-step-number {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
}

.how-step-content h3 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.how-step-content p {
  color: #6b7280;
  line-height: 1.6;
  margin: 0;
}

.how-cta {
  text-align: center;
}

/* Estadísticas */
.stats-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 3rem 2rem;
  color: white;
  margin: 2rem 0 0 0;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 500;
}

/* Libros recientes */
.recent-books-section {
  background: white;
  padding: 3rem 2rem;
  border-top: 2px solid #e5e7eb;
}

.recent-books-container {
  max-width: 1200px;
  margin: 0 auto;
}

.recent-books-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  margin-top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.recent-books-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: #64748b;
  margin-bottom: 2.5rem;
}

.recent-books-slider {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.recent-book-item {
  position: relative;
  transition: transform 0.3s ease;
}

.recent-book-item:hover {
  transform: translateY(-5px);
}

.recent-book-img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  background: #f8fafc;
}

.recent-book-item:hover .recent-book-img {
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.recent-book-price-tag {
  position: absolute;
  bottom: -10px;
  right: -10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
  .recent-books-title {
    font-size: 2rem;
  }

  .recent-books-slider {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
  }

  .recent-book-img {
    height: 140px;
  }

  .recent-book-price-tag {
    font-size: 0.85rem;
    padding: 0.3rem 0.6rem;
  }
} /* Testimonios */
.testimonials-section {
  background: white;
  padding: 3rem 2rem;
  border-top: 2px solid #e5e7eb;
}

.testimonials-container {
  max-width: 1200px;
  margin: 0 auto;
}

.testimonials-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  margin-top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: #f9fafb;
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  border: 2px solid transparent;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
  border-color: #667eea;
}

.testimonial-rating {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #fbbf24;
}

.testimonial-text {
  color: #4b5563;
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
  border-top: 2px solid #e5e7eb;
}

/* =================================
   PANEL DE VENDEDORES (MI CUENTA)
   ================================= */

/* Estadísticas del usuario */
.user-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.user-stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
  transition: transform 0.3s ease;
}

.user-stat-card:hover {
  transform: translateY(-5px);
}

.user-stat-icon {
  font-size: 2.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.user-stat-info {
  flex: 1;
  color: white;
}

.user-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.user-stat-label {
  font-size: 0.9rem;
  opacity: 0.95;
  font-weight: 500;
}

/* Tabs */
.user-tabs {
  display: flex;
  gap: 0.5rem;
  margin: 2rem 0 1.5rem 0;
  border-bottom: 2px solid #e5e7eb;
}

.user-tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  bottom: -2px;
}

.user-tab:hover {
  color: #667eea;
}

.user-tab.active {
  color: #667eea;
  border-bottom-color: #667eea;
}

/* Contenido de tabs */
.user-tab-content {
  display: none;
  padding: 2rem 0;
}

.user-tab-content.active {
  display: block;
}

/* Grid de lotes */
.user-lotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.user-lote-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.user-lote-card:hover {
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
  transform: translateY(-3px);
}

.user-lote-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f3f4f6;
}

.user-lote-id {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
}

.user-lote-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.user-lote-detail {
  font-size: 0.9rem;
  color: #4b5563;
}

.user-lote-detail strong {
  color: #1f2937;
  font-weight: 600;
}

.user-lote-price {
  color: #10b981;
  font-weight: 700;
  font-size: 1.05rem;
}

/* Formulario de datos personales */
.user-form {
  max-width: 600px;
  margin-top: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.alert-success,
.alert-error {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Badges de estado */
.badge-status {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-new {
  background: #dbeafe;
  color: #1e40af;
}

.badge-accepted {
  background: #d1fae5;
  color: #065f46;
}

.badge-sent {
  background: #fef3c7;
  color: #92400e;
}

.badge-received {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-paid {
  background: #d1fae5;
  color: #047857;
  border: 2px solid #10b981;
}

.badge-cancelled {
  background: #fee2e2;
  color: #991b1b;
}

/* Detalle de lote */
.lote-detail-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 2rem 0;
  flex-wrap: wrap;
}

.lote-detail-date {
  color: #6b7280;
  font-size: 0.95rem;
}

.lote-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.lote-detail-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.75rem;
}

.lote-detail-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #1f2937;
}

/* Timeline de estado */
.lote-timeline {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lote-timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-left: 2rem;
  opacity: 0.4;
}

.lote-timeline-item.active {
  opacity: 1;
}

.lote-timeline-item::before {
  content: "";
  position: absolute;
  left: 0.6rem;
  top: 2rem;
  width: 2px;
  height: calc(100% + 1.5rem);
  background: #e5e7eb;
}

.lote-timeline-item:last-child::before {
  display: none;
}

.lote-timeline-dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: #e5e7eb;
  flex-shrink: 0;
  position: absolute;
  left: 0;
  top: 0.25rem;
}

.lote-timeline-item.active .lote-timeline-dot {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.lote-timeline-content strong {
  display: block;
  font-size: 0.95rem;
  color: #1f2937;
  margin-bottom: 0.25rem;
}

.lote-timeline-content p {
  font-size: 0.85rem;
  color: #6b7280;
  margin: 0;
}

/* ============================================
   ESTILO VIDEOJUEGO PARA SEGUIMIENTO DE LOTE
   ============================================ */

.game-status-container {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  margin: 2rem 0;
  width: 100%;
}

.game-status-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 255, 255, 0.03) 2px,
    rgba(255, 255, 255, 0.03) 4px
  );
  pointer-events: none;
}

.game-level-badge {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
  margin-bottom: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.game-level-number {
  font-size: 1.2rem;
  color: #1e1b4b;
}

.game-level-max {
  font-size: 0.9rem;
  color: #78350f;
  opacity: 0.8;
}

.game-status-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 1.5rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

/* Barra de progreso estilo videojuego */
.game-progress-wrapper {
  margin: 2rem 0;
  position: relative;
  z-index: 1;
}

.game-progress-bar {
  height: 40px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4);
  position: relative;
}

.game-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 17px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
  }
  50% {
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.9);
  }
}

.game-progress-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shine 2s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  100% {
    left: 200%;
  }
}

.game-progress-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.game-progress-percent {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 2px 8px rgba(251, 191, 36, 0.5);
  font-family: "Poppins", sans-serif;
}

.game-progress-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Logro completado */
.game-achievement {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 3px solid #10b981;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.4);
  animation: achievement-pop 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  z-index: 1;
}

@keyframes achievement-pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.game-achievement-cancelled {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  border-color: #ef4444;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
}

.game-achievement-icon {
  font-size: 3rem;
  animation: bounce-trophy 1s infinite;
}

@keyframes bounce-trophy {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.1);
  }
}

.game-achievement-text {
  flex: 1;
  color: white;
}

.game-achievement-text strong {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.game-achievement-text p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Siguiente paso */
.game-next-step {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.game-next-icon {
  font-size: 2.5rem;
  animation: target-pulse 2s infinite;
}

@keyframes target-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

.game-next-text {
  flex: 1;
  color: white;
}

.game-next-text strong {
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-next-text p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.95rem;
}

/* Hitos del juego */
.game-milestones {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.game-milestone {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  border-radius: 10px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.game-milestone-icon {
  font-size: 2rem;
  filter: grayscale(100%) opacity(0.4);
  transition: all 0.3s ease;
}

.game-milestone-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  transition: all 0.3s ease;
}

.game-milestone-completed {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
}

.game-milestone-completed .game-milestone-icon {
  filter: grayscale(0%) opacity(1);
  animation: milestone-unlock 0.5s ease;
}

@keyframes milestone-unlock {
  0% {
    transform: scale(0.5) rotate(-180deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.game-milestone-completed .game-milestone-label {
  color: #10b981;
}

.game-milestone-active {
  background: rgba(251, 191, 36, 0.2);
  border-color: rgba(251, 191, 36, 0.6);
  animation: milestone-pulse 1.5s infinite;
}

@keyframes milestone-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
  }
}

.game-milestone-active .game-milestone-icon {
  filter: grayscale(0%) opacity(1);
  animation: icon-bounce 1s infinite;
}

@keyframes icon-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.game-milestone-active .game-milestone-label {
  color: #fbbf24;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .game-status-container {
    padding: 1.5rem 1rem;
    margin: 1.5rem 0;
    border-radius: 12px;
  }

  .game-status-title {
    font-size: 1.4rem;
  }

  .game-progress-percent {
    font-size: 2rem;
  }

  .game-progress-bar {
    height: 32px;
  }

  .game-achievement {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .game-next-step {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 1.25rem;
  }

  .game-milestones {
    gap: 0.25rem;
    flex-wrap: nowrap;
  }

  .game-milestone {
    padding: 0.75rem 0.25rem;
    min-width: 0;
  }

  .game-milestone-icon {
    font-size: 1.5rem;
  }

  .game-milestone-label {
    font-size: 0.65rem;
    word-break: break-word;
  }
}

/* Resumen económico */
.lote-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.lote-summary-row:last-of-type {
  border-bottom: none;
}

.lote-summary-row span {
  color: #6b7280;
  font-size: 0.95rem;
}

.lote-summary-row strong {
  color: #1f2937;
  font-size: 1.05rem;
}

/* Sección de libros */
.lote-books-section {
  margin-top: 3rem;
}

.lote-books-section h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: #1f2937;
}

.lote-books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.lote-book-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.lote-book-card:hover {
  border-color: #667eea;
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.lote-book-cover {
  width: 100%;
  height: 250px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.lote-book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lote-book-no-cover {
  color: #9ca3af;
  font-size: 0.85rem;
  text-align: center;
}

.lote-book-info {
  padding: 1rem;
}

.lote-book-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f2937;
  margin-bottom: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lote-book-isbn {
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.5rem;
}

.lote-book-price {
  font-size: 1rem;
  margin-top: 0.5rem;
}

.lote-book-accepted {
  border-color: #10b981;
}

.lote-book-rejected {
  border-color: #ef4444;
  opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
  .user-stats-grid {
    grid-template-columns: 1fr;
  }

  .user-lotes-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .lote-detail-grid {
    grid-template-columns: 1fr;
  }

  .lote-books-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .lote-book-cover {
    height: 200px;
  }

  .user-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .user-tab {
    white-space: nowrap;
  }
}

.testimonial-author strong {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
}

.testimonial-author span {
  font-size: 0.875rem;
  color: #6b7280;
}

/* FAQ Section */
.faq-section {
  background: white;
  padding: 3rem 2rem;
  border-top: 2px solid #e5e7eb;
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  margin-top: 0;
  color: #1f2937;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.faq-item {
  background: #f9fafb;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: #667eea;
}

.faq-item[open] {
  border-color: #667eea;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.faq-question {
  padding: 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1f2937;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.faq-question:hover {
  color: #667eea;
}

.faq-question::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 700;
  color: #667eea;
  transition: transform 0.3s ease;
}

.faq-item[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.faq-answer p {
  margin: 0;
  color: #6b7280;
  line-height: 1.8;
}

.faq-cta {
  text-align: center;
}

/* Responsive para nuevas secciones */
@media (max-width: 768px) {
  /* Reducir padding lateral en móviles para todas las secciones */
  .recent-books-section,
  .trust-section,
  .stats-section,
  .how-it-works-section,
  .testimonials-section,
  .faq-section {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Reducir padding interno de contenedores */
  .trust-benefit,
  .how-step {
    padding: 1.25rem;
  }

  .trust-title,
  .how-title,
  .faq-title,
  .testimonials-title {
    font-size: 2rem;
  }

  .trust-benefits {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .how-step {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
  }

  .how-step-number {
    margin: 0 auto;
  }

  .how-steps {
    gap: 1rem;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .stat-label {
    font-size: 1rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .testimonial-card {
    padding: 1.25rem;
  }

  .faq-item {
    border-radius: 8px;
  }

  .faq-question {
    padding: 1rem;
    font-size: 1rem;
  }

  .faq-answer {
    padding: 1rem;
  }
}

/* Estilos del modal del escáner */
.scanner-modal {
  display: none;
  position: fixed !important;
  z-index: 999999;
  inset: 0; /* left: 0; top: 0; right: 0; bottom: 0; */
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  max-height: 100vh !important;
  background-color: #000;
  flex-direction: column;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  transform: none !important;
}

/* Fallback para navegadores que no soportan dvh */
@supports (height: 100dvh) {
  .scanner-modal {
    height: 100dvh !important;
    max-height: 100dvh !important;
  }
}

.scanner-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 10;
}

.scanner-header-left h3 {
  margin: 0;
  font-size: 1.1rem;
  color: white;
  font-weight: 600;
}

.scanner-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.scanner-cart-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #667eea;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.3s;
}

.scanner-cart-link:hover {
  background: #5568d3;
}

.scanner-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.scanner-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.scanner-viewport {
  position: relative;
  width: 100%;
  height: 50vh;
  max-height: 400px;
  background: #000;
  overflow: hidden;
  flex-shrink: 0;
}

.scanner-viewport video,
.scanner-viewport canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-book-info {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-top: 3px solid #667eea;
  position: relative;
  z-index: 10;
}

.scanner-book-details h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #1f2937;
  font-weight: 700;
  max-height: 3.3em;
  overflow: hidden;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.scanner-book-isbn {
  margin: 0 0 0.25rem 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.scanner-book-price {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #10b981;
}

.scanner-book-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.scanner-add-cart,
.scanner-continue {
  flex: 1;
  padding: 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  min-width: 150px;
}

.scanner-add-cart {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.scanner-add-cart:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.scanner-add-cart:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.scanner-continue {
  background: #f3f4f6;
  color: #374151;
}

.scanner-continue:hover {
  background: #e5e7eb;
}

.scanner-instructions {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 0.95rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.75rem 1.5rem;
  border-radius: 20px;
  margin: 0;
  z-index: 5;
  max-width: 90%;
}

@media (max-width: 768px) {
  .scanner-modal-header {
    padding: 0.75rem 1rem;
  }

  .scanner-header-left h3 {
    font-size: 1rem;
  }

  .scanner-cart-link {
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem;
  }

  .scanner-close {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }

  .scanner-book-info {
    padding: 1rem;
  }

  .scanner-book-actions {
    flex-direction: column;
  }

  .scanner-add-cart,
  .scanner-continue {
    width: 100%;
  }

  .scanner-instructions {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    bottom: 1rem;
  }
}

/* Estilos responsive para la tabla del carrito */
.cart-table-wrapper {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 2rem;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.cart-table thead {
  background-color: #f9fafb;
}

@media (max-width: 768px) {
  .cart-table-wrapper {
    overflow-x: visible;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }

  .cart-table tr {
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    background: white;
    box-sizing: border-box;
  }

  .cart-table td {
    text-align: left !important;
    padding: 0.5rem 0;
    border: none;
    position: relative;
    padding-left: 50%;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* Portada en móvil */
  .cart-table td[data-label="Portada"] {
    padding-left: 0;
    text-align: center !important;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
  }

  .cart-table td[data-label="Portada"]::before {
    display: none;
  }

  .cart-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #374151;
  }

  .cart-table td[data-label="Acciones"] {
    text-align: center !important;
    padding-left: 0;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
  }

  .cart-table td[data-label="Acciones"]::before {
    display: none;
  }

  .cart-table tfoot tr {
    border: none;
    padding: 1rem 0;
    margin: 0;
  }

  .cart-table tfoot td {
    display: inline-block;
    width: auto;
    padding: 0.5rem;
  }

  .cart-table tfoot td::before {
    display: none;
  }
}

/* Legacy styles - no longer used - can be deleted */
.scanner-modal-content,
.scanner-modal-body,
.scanner-result {
  display: none;
}

/* ============================================
   MARKETING DE ACTIVACIÓN
   ============================================ */

/* Banner de activación con estadísticas - estilo profesional */
.activation-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  margin: 1.5rem auto;
  max-width: 600px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.activation-text {
  margin: 0;
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.4;
  text-align: center;
}

.activation-text strong {
  color: #212529;
  font-weight: 600;
}

.activation-separator {
  margin: 0 0.5rem;
  color: #adb5bd;
}

.activation-highlight {
  color: #10b981;
  font-weight: 600;
}

/* Contenedor de banners - layout lado a lado en pantallas grandes */
.banners-container {
  display: flex;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 1400px;
  padding: 0 1rem;
}

/* Banner de primera venta con bono del 15% - diseño profesional con impacto */
.first-sale-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 2px solid #c4b5fd;
  border-radius: 12px;
  padding: 1.25rem 1.75rem;
  flex: 1;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
  overflow: hidden;
}

.first-sale-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
}

.first-sale-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
}

.first-sale-badge-text {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.first-sale-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.first-sale-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #5b21b6;
  line-height: 1.3;
}

.first-sale-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 400;
  line-height: 1.5;
}

/* Banner de códigos secretos - diseño misterioso y sutil */
.secret-codes-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
  border: 2px solid #1a1a1a;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  flex: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.secret-codes-banner:hover {
  border-color: #0a0a0a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.secret-codes-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.02) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.secret-codes-banner:hover .secret-codes-glow {
  opacity: 1;
}

.secret-codes-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.secret-codes-banner:hover .secret-codes-icon {
  opacity: 0.7;
}

.secret-codes-content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.secret-codes-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #a0a0a0;
  opacity: 0.6;
}

.secret-codes-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: #2a2a2a;
  letter-spacing: 0.3px;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.secret-codes-banner:hover .secret-codes-text {
  opacity: 0.8;
}

.secret-codes-arrow {
  font-size: 1.5rem;
  color: #6a6a6a;
  flex-shrink: 0;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.secret-codes-banner:hover .secret-codes-arrow {
  opacity: 0.6;
  transform: translateX(4px);
}

/* Mensaje de urgencia en resultado de valoración */
.activation-urgency-msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #dc2626;
}

.activation-fire {
  font-size: 1.2rem;
  animation: flicker 1.5s infinite;
}

@keyframes flicker {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Notificaciones de prueba social */
.activation-social-proof {
  background: rgba(255, 255, 255, 0.98);
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.activation-social-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 1.25rem 0;
  text-align: center;
}

.activation-social-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activation-social-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.3s ease;
  animation: slide-in 0.5s ease-out;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.activation-social-item:hover {
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.activation-social-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.activation-social-details {
  flex: 1;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.5;
}

.activation-social-details strong {
  color: #1f2937;
  font-weight: 600;
}

.activation-social-time {
  color: #9ca3af;
  font-size: 0.85rem;
  margin-left: 0.5rem;
  font-style: italic;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .activation-banner {
    padding: 0.75rem 1rem;
  }

  .activation-text {
    font-size: 0.9rem;
  }

  .banners-container {
    flex-direction: column;
    padding: 0 0.5rem;
  }

  .first-sale-banner {
    padding: 1rem 1.25rem;
    gap: 1rem;
    text-align: center;
  }

  .first-sale-badge {
    align-self: center;
  }

  .first-sale-title {
    font-size: 1.05rem;
  }

  .first-sale-subtitle {
    font-size: 0.8rem;
  }

  .secret-codes-banner {
    padding: 0.85rem 1.15rem;
    gap: 0.75rem;
  }

  .secret-codes-icon {
    font-size: 1.3rem;
  }

  .secret-codes-label {
    font-size: 0.6rem;
  }

  .secret-codes-text {
    font-size: 0.85rem;
  }

  .activation-social-proof {
    padding: 1rem;
    margin: 1.5rem 0;
  }

  .activation-social-title {
    font-size: 1.1rem;
  }

  .activation-social-item {
    padding: 0.85rem;
  }

  .activation-social-avatar {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .activation-social-details {
    font-size: 0.9rem;
  }

  .activation-urgency-msg {
    font-size: 0.85rem;
    padding: 0.6rem 0.85rem;
  }
}
