/* ==========================================================================
   PROVEEDOR77 — Sistema de Diseño Corporativo & Marketplace Mayorista
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Paleta Corporativa Oficial PROVEEDOR77 (85% Azul Empresas Polar + 15% Acento Cálido de Conversión) */
  --polar-blue: #00338d;
  --polar-blue-deep: #001d51;
  --polar-blue-mid: #134cb1;
  --polar-cyan: #33ccff;
  --polar-coral: #f53f5b;
  --polar-red: #d01f21;
  --polar-gold: #f8a907;

  /* 15% Acento Cálido para Disparadores de Conversión (CTAs de Compra, Carrito y Badge 77) */
  --warm-cta: #f53f5b;
  --warm-orange: #ff6a00;
  --warm-cta-gradient: linear-gradient(135deg, #f53f5b 0%, #ff6a00 65%, #f8a907 100%);
  --warm-cta-gradient-hover: linear-gradient(135deg, #d01f21 0%, #f53f5b 55%, #ff6a00 100%);
  --warm-cta-shadow: 0 4px 14px rgba(245, 63, 91, 0.36), 0 2px 6px rgba(255, 106, 0, 0.22);
  --warm-cta-shadow-hover: 0 6px 20px rgba(245, 63, 91, 0.48), 0 3px 10px rgba(255, 106, 0, 0.32);

  /* 85% Base Institucional Azul Empresas Polar */
  --p77-coral: #00338d;
  --p77-red-dark: #001d51;
  --p77-orange: #134cb1;
  --p77-gradient: linear-gradient(135deg, #00338d 0%, #134cb1 60%, #0284c7 100%);
  --p77-gradient-hover: linear-gradient(135deg, #001d51 0%, #00338d 55%, #134cb1 100%);
  --p77-gradient-soft: linear-gradient(135deg, rgba(0, 51, 141, 0.06) 0%, rgba(51, 204, 255, 0.08) 100%);
  --p77-shadow: 0 4px 14px rgba(0, 51, 141, 0.32);
  --p77-shadow-hover: 0 6px 20px rgba(0, 51, 141, 0.45);

  /* Aliases para retrocompatibilidad total */
  --ali-red: var(--p77-coral);
  --ali-red-dark: var(--p77-red-dark);
  --ali-orange: var(--p77-orange);
  --ali-gradient: var(--p77-gradient);
  --ali-gradient-hover: var(--p77-gradient-hover);
  --ali-gradient-soft: var(--p77-gradient-soft);
  --ali-shadow: var(--p77-shadow);
  --ali-shadow-hover: var(--p77-shadow-hover);
  
  /* Color Oficial Corporativo Polar: Azul Institucional #00338d + Marino #001d51 + Real #134cb1 */
  --bw9-blue-deep: #001d51;
  --bw9-blue-dark: #011b4e;
  --bw9-blue-mid: #00338d;
  --bw9-blue-metallic: #134cb1;
  --bw9-blue-highlight: #33ccff;
  --bw9-gradient: linear-gradient(135deg, #001d51 0%, #00338d 50%, #134cb1 85%, #00266b 100%);
  --bw9-gradient-hover: linear-gradient(135deg, #00266b 0%, #134cb1 50%, #1d5ed1 85%, #00338d 100%);
  --bw9-gradient-active: linear-gradient(135deg, #001233 0%, #001d51 50%, #00338d 100%);
  --bw9-shadow: 0 4px 14px rgba(0, 29, 81, 0.38), 0 2px 6px rgba(0, 51, 141, 0.25);
  --bw9-shadow-hover: 0 6px 20px rgba(0, 29, 81, 0.48), 0 3px 10px rgba(19, 76, 177, 0.35);
  
  /* Tonos neutros modernos */
  --ink: #001d51;            /* Azul Marino Profundo Polar */
  --ink-secondary: #1e3a6d;  /* Azul Pizarra Corporativo */
  --muted: #526585;          /* Gris Azulado Polar */
  --muted-light: #8da0be;    /* Gris Claro */
  --paper: #f6f9fc;          /* Fondo corporativo limpio con matiz hielo */
  --white: #ffffff;
  --line: #dbe4f0;           /* Borde corporativo suave */
  --line-strong: #b8cae0;    /* Borde corporativo medio */
  
  /* Acentos y estados */
  --coral: #00338d;          /* Azul Corporativo Principal Empresas Polar */
  --teal: #10b981;           /* Verde esmeralda de ganancia/éxito */
  --teal-dark: #059669;
  --yellow: #f8a907;         /* Dorado Polar de advertencia/estrellas */
  --blue: #134cb1;           /* Azul Polar secundario */
  
  /* Sombras multidimensionales */
  --shadow-sm: 0 1px 3px rgba(0, 29, 81, 0.06), 0 1px 2px rgba(0, 29, 81, 0.04);
  --shadow-md: 0 4px 16px -2px rgba(0, 29, 81, 0.08), 0 2px 6px -2px rgba(0, 29, 81, 0.05);
  --shadow-lg: 0 12px 30px -4px rgba(0, 29, 81, 0.12), 0 4px 12px -2px rgba(0, 29, 81, 0.06);
  --shadow-glow: 0 4px 20px rgba(0, 51, 141, 0.28);
  
  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Contenedores y Sistema Responsive Unificado (Desde Móviles hasta Monitores 27"+) */
  --content-max-width: 1320px;
  --container-padding: clamp(14px, 3.5vw, 36px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: #dbeafe !important;
  color: #001d51 !important;
}

::-moz-selection {
  background: #dbeafe !important;
  color: #001d51 !important;
}

html, body {
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

img, picture, video, canvas, svg {
  max-width: 100%;
  height: auto;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Trust Bar Superior (Estilo Cinta Corporativa Empresas Polar)
   ========================================================================== */
.trust-bar {
  background: linear-gradient(90deg, #001d51 0%, #00338d 50%, #134cb1 100%);
  color: #ffffff;
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 29, 81, 0.25);
  position: relative;
  z-index: 100;
  border-bottom: 2px solid #33ccff;
}

.trust-scroll {
  display: flex;
  gap: 48px;
  animation: scroll 28s linear infinite;
  white-space: nowrap;
}

.trust-item {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==========================================================================
   Encabezado y Barra de Navegación (Top Bar)
   ========================================================================== */
.topbar {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
  transform: translateZ(0);
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--container-padding);
  max-width: var(--content-max-width);
  margin: 0 auto;
  min-height: 52px;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform .15s ease;
}

.brand:hover {
  transform: scale(1.02);
}

.brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--warm-cta-gradient);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 19px;
  font-weight: 800;
  font-style: italic;
  margin-left: 2px;
  box-shadow: 0 2px 8px rgba(245, 63, 91, 0.35);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.top-meta, .sku, .eyebrow, .count, .route-label, .product-price span {
  font-family: 'JetBrains Mono', monospace;
}

.top-meta {
  color: var(--muted);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-pill.user-pill-link {
  cursor: pointer;
}

.user-pill.user-pill-link:hover {
  background: #e2e8f0;
  border-color: #23528f;
  color: #183a68;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
}

.user-pill.user-pill-link:active {
  transform: translateY(0);
}

.user-pill.admin {
  background: #fff7ed;
  border-color: #ffedd5;
  color: #c2410c;
  font-weight: 700;
}

.user-pill.guest {
  color: var(--muted);
  background: #f8fafc;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #94a3b8;
}

.status-dot.online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.top-logout-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all .15s ease;
}

.top-logout-link:hover {
  background: #fff0f0;
  color: #dc2626;
  text-decoration: underline;
}

.top-login-link {
  font-size: 12px;
  font-weight: 700;
  color: #0d9488;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 6px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  transition: all .15s ease;
}

.top-login-link:hover {
  background: #dcfce7;
  color: #047857;
}

.topbar-nav-wrap {
  width: 100%;
  background: #fafbfc;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  position: relative;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap; /* Continuar una línea bajo la otra de forma natural en desktop */
  gap: 6px 10px;
  padding: 6px var(--container-padding) 8px;
  max-width: var(--content-max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.main-nav a {
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all .16s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.main-nav a:hover {
  color: var(--coral);
  background: #ffffff;
  border-color: rgba(0, 51, 141, 0.2);
  box-shadow: 0 2px 6px rgba(0, 29, 81, 0.06);
  transform: translateY(-1px);
}

.main-nav a.admin-nav-link {
  color: #00338d !important;
  font-weight: 700 !important;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.main-nav a.admin-nav-link:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #001d51 !important;
  box-shadow: 0 2px 6px rgba(0, 51, 141, 0.14);
}

.main-nav a.admin-nav-link.active {
  background: #dbeafe !important;
  border-color: #00338d !important;
  color: #001d51 !important;
  font-weight: 800 !important;
  box-shadow: 0 0 0 2px rgba(0, 51, 141, 0.25) !important;
}

.cart-link {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  background: #fff5f5 !important;
  color: #d01f21 !important;
  border: 1.5px solid rgba(245, 63, 91, 0.35) !important;
  padding: 7px 16px !important;
  border-radius: var(--radius-full) !important;
  font-weight: 700 !important;
  font-size: 13.5px !important;
  text-decoration: none !important;
  transition: all .2s ease !important;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(245, 63, 91, 0.12);
}

.cart-link:hover {
  background: var(--warm-cta-gradient) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: var(--warm-cta-shadow);
  transform: translateY(-1px);
}

.cart-link:hover span {
  background: #ffffff !important;
  color: #d01f21 !important;
}

.cart-link span {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  place-items: center;
  color: #ffffff;
  background: var(--warm-cta-gradient);
  border-radius: var(--radius-full);
  font: 700 11px 'JetBrains Mono', monospace;
  transition: all .18s ease;
}

/* ==========================================================================
   Contenedor Principal y Layout
   ========================================================================== */
.shell {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 18px var(--container-padding) 80px;
  box-sizing: border-box;
  width: 100%;
}

.page-heading {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.compact-heading {
  display: block;
  max-width: 100%;
}

.page-heading h1 {
  font-family: 'Outfit', sans-serif;
  max-width: 100%;
  margin: 0 0 6px 0;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--coral);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}

.lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.route-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.proceso-graphic-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 29, 81, 0.08), 0 2px 10px rgba(0, 51, 141, 0.06);
  border: 1px solid var(--line);
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.proceso-graphic-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 29, 81, 0.12), 0 4px 16px rgba(0, 51, 141, 0.12);
}

.proceso-graphic-card picture {
  display: block;
  width: 100%;
}

.proceso-graphic-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.route-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--ali-gradient);
}

.route-label {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--coral);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0, 51, 141, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

.route-card strong {
  display: block;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}

.route-card i {
  color: var(--coral);
  font-style: normal;
  padding: 0 4px;
}

.route-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   Notificaciones y Alertas
   ========================================================================== */
.notice {
  margin: -10px 0 30px;
  padding: 16px 20px;
  font-size: 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  border-left: 5px solid var(--teal);
}

.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-left: 5px solid var(--coral);
}

/* ==========================================================================
   MÓDULO ESTELAR: ALIEXPRESS IMPORTADOR & COTIZADOR
   ========================================================================== */
.aliexpress-import-card {
  margin: 36px 0 44px;
  padding: 34px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 2px solid #00338d;
  box-shadow: 0 10px 30px -5px rgba(0, 51, 141, 0.12), var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.aliexpress-import-card::after {
  content: 'ALIEXPRESS CHOICE';
  position: absolute;
  top: 18px;
  right: -32px;
  transform: rotate(45deg);
  background: var(--ali-gradient);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 38px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  letter-spacing: .08em;
}

.ali-header {
  margin-bottom: 24px;
}

.ali-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.ali-badge {
  background: var(--ali-gradient);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font: 700 11px 'JetBrains Mono', monospace;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 51, 141, 0.3);
}

.ali-brand h2 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  font-size: 24px;
  letter-spacing: -.02em;
  font-weight: 800;
  color: var(--ink);
}

.ali-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 860px;
}

.ali-input-group {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-top: 20px;
}

.ali-input-group input {
  flex: 1;
  min-height: 52px;
  font-size: 15px;
  background: #f8fafc;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  transition: all .2s ease;
  color: var(--ink);
}

.ali-input-group input:focus {
  background: #ffffff;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(0, 51, 141, 0.15);
  outline: none;
}

.ali-action-btn {
  background: var(--bw9-gradient);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
  white-space: nowrap;
  padding: 0 28px;
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border: 0;
  cursor: pointer;
  box-shadow: var(--bw9-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: all .2s ease;
}

.ali-action-btn:hover {
  background: var(--bw9-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--bw9-shadow-hover);
  color: #ffffff !important;
}

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

.ali-preview-container {
  margin-top: 28px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.ali-preview-grid {
  display: grid;
  grid-template-columns: 180px 1fr 360px;
  gap: 28px;
  align-items: start;
}

.ali-thumb-box {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.ali-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.ali-thumb-box:hover img {
  transform: scale(1.05);
}

.ali-details h3 {
  font-family: 'Outfit', sans-serif;
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ink);
}

.ali-field-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.ali-field-row label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ali-field-row input {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.ali-pricing-card {
  padding: 22px;
  background: linear-gradient(180deg, #f8fbff 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.ali-pricing-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 12px;
  border-bottom: 1px solid #bfdbfe;
  padding-bottom: 6px;
  letter-spacing: .04em;
}

.ali-pricing-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
}

.ali-pricing-table td {
  padding: 6px 0;
  color: var(--ink-secondary);
}

.ali-pricing-table td:last-child {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.ali-pricing-table .row-profit {
  color: var(--teal-dark) !important;
  font-weight: 700;
}

.ali-pricing-table .row-total {
  border-top: 2px dashed #93c5fd;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 17px;
  padding-top: 10px;
}

.ali-add-cart-btn {
  width: 100%;
  margin-top: 16px;
  background: var(--warm-cta-gradient);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  min-height: 48px;
  justify-content: center;
  border-radius: var(--radius-md);
  box-shadow: var(--warm-cta-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  transition: all .2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
}

.ali-add-cart-btn:hover {
  background: var(--warm-cta-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--warm-cta-shadow-hover);
  color: #ffffff !important;
}

.ali-add-cart-btn:active {
  background: linear-gradient(135deg, #b91c1c 0%, #ea580c 100%);
  transform: translateY(0);
}

.provider-aliexpress {
  background: var(--ali-gradient);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font: 700 10.5px 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
  box-shadow: 0 2px 6px rgba(0, 51, 141, 0.25);
}

/* ==========================================================================
   Categorías Destacadas (Estilo Tienda Corporativa Polar & Marketplace)
   ========================================================================== */
.category-cards, .cat-section {
  margin-bottom: 44px;
}

.cat-section-header, .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cat-section-header h2, .cat-section-header h3 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  font-size: clamp(20px, 3.2vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}

.cat-view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coral);
  font-weight: 700;
  text-decoration: none;
  font-size: 13.5px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(0, 51, 141, 0.06);
  border: 1px solid rgba(0, 51, 141, 0.18);
  transition: all .2s ease;
  white-space: nowrap;
}

.cat-view-all-link:hover {
  background: var(--ali-gradient);
  color: #ffffff;
  border-color: transparent;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(0, 51, 141, 0.25);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(182px, 1fr));
  gap: 16px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  gap: 10px;
  padding: 18px 14px 16px;
  background: #ffffff;
  border: 1.5px solid #dbe5f4;
  border-radius: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform .32s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .32s cubic-bezier(0.22, 1, 0.36, 1), background .28s ease, border-color .28s ease;
  cursor: pointer;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 8px 22px rgba(10, 30, 75, 0.06), 0 1px 3px rgba(10, 30, 75, 0.04);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #33ccff 0%, #7be2ff 50%, #33ccff 100%);
  box-shadow: 0 0 14px rgba(51, 204, 255, 0.85);
  opacity: 0;
  transition: opacity .25s ease;
}

.category-card:hover {
  border-color: #33ccff !important;
  background: linear-gradient(175deg, #001a4d 0%, #002f80 55%, #0044b3 100%) !important;
  box-shadow: 0 18px 36px -4px rgba(0, 32, 96, 0.36), 0 4px 12px rgba(0, 0, 0, 0.14) !important;
  transform: translateY(-5px) !important;
}

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

.category-card.active {
  border-color: #33ccff !important;
  border-width: 1.5px !important;
  background: linear-gradient(175deg, #001a4d 0%, #002f80 55%, #0044b3 100%) !important;
  box-shadow: 0 16px 34px -4px rgba(0, 32, 96, 0.36), 0 0 0 3px rgba(51, 204, 255, 0.2) !important;
}

.category-card.active:hover {
  border-color: #7be2ff !important;
  background: linear-gradient(175deg, #00143d 0%, #00276e 55%, #003ca0 100%) !important;
  box-shadow: 0 20px 40px rgba(0, 24, 72, 0.45), 0 0 0 3px rgba(51, 204, 255, 0.28) !important;
  transform: translateY(-5px) !important;
}

.category-card.active::before {
  opacity: 1;
}

.category-card .cat-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
  border: 1px solid rgba(0, 51, 141, 0.14);
  border-radius: 16px;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0, 51, 141, 0.08);
  transition: transform .34s cubic-bezier(0.22, 1, 0.36, 1), box-shadow .3s ease;
  flex-shrink: 0;
  overflow: hidden;
}

.category-card .cat-icon.cat-icon-3d {
  width: 100%;
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  box-shadow: none !important;
  overflow: visible;
  padding: 2px 4px;
}

.category-card .cat-icon img.cat-svg-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.category-card .cat-icon img.cat-3d-img {
  max-width: 92%;
  max-height: 98px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 12px rgba(7, 22, 54, 0.22));
  transition: transform .38s cubic-bezier(0.22, 1, 0.36, 1), filter .36s ease;
}

.category-card:hover .cat-icon:not(.cat-icon-3d) {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 6px 16px rgba(0, 51, 141, 0.2);
}

.category-card:hover .cat-icon.cat-icon-3d {
  transform: none;
  box-shadow: none !important;
}

.category-card:hover .cat-icon img.cat-3d-img {
  transform: translateY(-6px) scale(1.09);
  filter: drop-shadow(0 16px 18px rgba(0, 8, 30, 0.5)) drop-shadow(0 0 14px rgba(51, 204, 255, 0.22));
}

.category-card.active .cat-icon img.cat-3d-img {
  transform: translateY(-4px) scale(1.06);
  filter: drop-shadow(0 16px 20px rgba(0, 8, 30, 0.54)) drop-shadow(0 0 14px rgba(51, 204, 255, 0.24));
}

.category-card .cat-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  width: 100%;
}

.category-card .cat-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14.5px;
  line-height: 1.25;
  color: #0a1b3d;
  transition: color .2s ease;
  word-break: break-word;
  text-align: center;
  width: 100%;
}

.category-card.active .cat-name {
  color: #ffffff !important;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 12, 40, 0.45);
}

.category-card:hover .cat-name,
.category-card.active:hover .cat-name {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 18, 51, 0.6);
}

.category-card .cat-count-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #00338d;
  background: #eef4ff;
  padding: 2px 11px;
  border-radius: var(--radius-full);
  border: 1px solid #d7e5ff;
  transition: all .22s ease;
}

.category-card.active .cat-count-badge {
  background: #ffffff !important;
  color: #002060 !important;
  font-weight: 800 !important;
  border-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(0, 16, 52, 0.28) !important;
}

.category-card:hover .cat-count-badge,
.category-card.active:hover .cat-count-badge {
  background: #ffffff !important;
  color: #002060 !important;
  font-weight: 800 !important;
  border-color: #ffffff !important;
  box-shadow: 0 3px 8px rgba(0, 29, 81, 0.3) !important;
}

.category-card .cat-arrow-mobile {
  display: none;
}

/* Hover & estado activo Verde Bio para Energía Alternativa */
.category-card[data-cat-slug="energia-alternativa"] .cat-icon:not(.cat-icon-3d) {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: rgba(22, 163, 74, 0.25);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.12);
}

.category-card[data-cat-slug="energia-alternativa"]::before {
  background: linear-gradient(90deg, #4ade80 0%, #86efac 50%, #4ade80 100%) !important;
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.85) !important;
}

.category-card[data-cat-slug="energia-alternativa"]:hover,
.category-card[data-cat-slug="energia-alternativa"].active:hover {
  border-color: #22c55e !important;
  background: linear-gradient(175deg, #14532d 0%, #15803d 55%, #16a34a 100%) !important;
  box-shadow: 0 16px 34px -4px rgba(22, 163, 74, 0.42), 0 4px 10px rgba(0, 0, 0, 0.12) !important;
}

.category-card[data-cat-slug="energia-alternativa"]:hover .cat-icon:not(.cat-icon-3d) {
  box-shadow: 0 6px 16px rgba(20, 83, 45, 0.28);
}

.category-card[data-cat-slug="energia-alternativa"]:hover .cat-name,
.category-card[data-cat-slug="energia-alternativa"].active:hover .cat-name {
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(5, 46, 22, 0.6);
}

.category-card[data-cat-slug="energia-alternativa"]:hover .cat-count-badge,
.category-card[data-cat-slug="energia-alternativa"].active:hover .cat-count-badge {
  background: #ffffff !important;
  color: #15803d !important;
  border-color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(20, 83, 45, 0.28) !important;
}

.category-card[data-cat-slug="energia-alternativa"].active {
  border-color: #22c55e !important;
  background: linear-gradient(175deg, #14532d 0%, #15803d 55%, #16a34a 100%) !important;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.34), 0 0 0 3px rgba(74, 222, 128, 0.22) !important;
}

.category-card[data-cat-slug="energia-alternativa"].active .cat-name {
  color: #ffffff !important;
}

.category-card[data-cat-slug="energia-alternativa"].active .cat-count-badge {
  background: #ffffff !important;
  color: #15803d !important;
  border-color: #ffffff !important;
}

@media (max-width: 520px) {
  .category-card[data-cat-slug="energia-alternativa"]:hover .cat-arrow-mobile,
  .category-card[data-cat-slug="energia-alternativa"].active .cat-arrow-mobile {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
  }
}

/* Adaptación Mobile Inteligente para Categorías */
@media (max-width: 520px) {
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .category-card {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 11px 14px;
    gap: 12px;
    border-radius: 16px;
  }
  .category-card::before {
    left: 14px;
    right: 14px;
    height: 3px;
  }
  .category-card .cat-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
    border-radius: 12px;
  }
  .category-card .cat-icon.cat-icon-3d {
    width: 68px;
    height: 54px;
    padding: 0;
  }
  .category-card .cat-icon img.cat-3d-img {
    max-width: 66px;
    max-height: 52px;
    filter: drop-shadow(0 6px 8px rgba(7, 22, 54, 0.2));
  }
  .category-card .cat-icon img.cat-svg-icon {
    width: 28px;
    height: 28px;
  }
  .category-card .cat-content {
    align-items: flex-start;
    text-align: left;
    flex: 1;
    min-width: 0;
    gap: 4px;
  }
  .category-card .cat-name {
    font-size: 13.5px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .category-card .cat-count-badge {
    font-size: 11px;
    padding: 2px 8px;
  }
  .category-card .cat-arrow-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--coral);
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
    transition: transform .2s ease, background .2s ease, color .2s ease;
  }
  .category-card.active .cat-arrow-mobile {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
  }
  .category-card:hover .cat-arrow-mobile {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
  }
}

/* ==========================================================================
   Buscador Global y Tarjetas de Productos
   ========================================================================== */
.ebay-search-container {
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 34px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: 40px;
}

.ebay-header-banner {
  margin-bottom: 26px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.ebay-brand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}

.ebay-logo-text {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.02em;
}

.ebay-logo-text span {
  color: var(--coral);
}

.serpapi-status {
  font: 700 11px 'JetBrains Mono', monospace;
  color: var(--teal-dark);
  background: #ecfdf5;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #a7f3d0;
}

.ebay-search-form {
  margin-bottom: 30px;
  background: #f8fafc;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.ebay-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  color: var(--muted);
  font: 700 11px 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-group input, .form-group select {
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: 14px 'Plus Jakarta Sans', sans-serif;
  color: var(--ink);
  transition: border-color .15s ease;
}

.form-group input:focus, .form-group select:focus {
  border-color: var(--coral);
  outline: 2px solid rgba(0, 51, 141, 0.2);
}

.form-group.span-2 { grid-column: span 2; }
.form-group .required { color: var(--coral); }
.form-group.form-actions { grid-column: span 3; justify-content: flex-end; }

.ebay-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  width: 100%;
  background: var(--bw9-gradient);
  color: #ffffff !important;
  border: 0;
  border-radius: var(--radius-sm);
  font: 700 14px 'Outfit', sans-serif;
  cursor: pointer;
  transition: all .2s ease;
  box-shadow: var(--bw9-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ebay-submit-btn:hover {
  background: var(--bw9-gradient-hover);
  box-shadow: var(--bw9-shadow-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Guía de Catálogo Exclusivo AliExpress
   ========================================================================== */
.ali-guide-container {
  margin: 32px 0 20px;
}

.ali-guide-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.guide-step:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 51, 141, 0.3);
}

.guide-step .step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ali-gradient);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 51, 141, 0.3);
}

.guide-step h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--dark);
}

.guide-step p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================================
   Carrito y Desglose de Costos (Estética E-commerce)
   ========================================================================== */
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: 28px;
  align-items: start;
}

.cart-page {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr);
}

.catalog-panel, .form-block, .purchase-output {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
}

.forms-panel {
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2 {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.count {
  padding: 6px 12px;
  color: var(--coral);
  background: #eff6ff;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border: 1px solid rgba(0, 51, 141, 0.18);
}

.cart-items {
  display: grid;
  gap: 16px;
}

.cart-item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color .2s ease;
}

.cart-item:hover {
  border-color: var(--line-strong);
}

.cart-item strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}

.cart-item small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font: 12px 'JetBrains Mono', monospace;
}

.cart-item > .price-part-item {
  flex: 1 0 100%;
  margin-top: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

.cart-item > .price-part-item > summary {
  cursor: pointer;
  color: var(--coral);
  font: 700 11px 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .04em;
  user-select: none;
}

.cart-item > .price-part-item > summary:hover {
  text-decoration: underline;
}

.price-part {
  margin-top: 10px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}

.price-part-pieces {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.price-part-pieces li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font: 11px 'JetBrains Mono', monospace;
}

.price-part-pieces strong {
  color: var(--ink);
}

.price-part-math {
  width: 100%;
  font-size: 12.5px;
  border-collapse: collapse;
}

.price-part-math td {
  padding: 5px 0;
  color: var(--ink-secondary);
}

.price-part-math td:last-child {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.price-part-subtotal td {
  border-top: 1px solid var(--line);
  font-weight: 700;
}

.price-part-sale td {
  border-top: 1px solid var(--line);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--coral);
}

.price-part-profit td {
  color: var(--teal-dark) !important;
  font-weight: 700;
}

.cart-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cart-controls button {
  min-height: 32px;
  width: 32px;
  margin: 0;
  padding: 0;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
}

.cart-controls button:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: var(--line-strong);
}

.cart-controls .cart-qty-input {
  width: 50px;
  height: 32px;
  min-height: 32px;
  margin: 0;
  padding: 0 4px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
  font: 700 13px 'JetBrains Mono', monospace;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cart-controls .cart-qty-input:focus {
  outline: 2px solid var(--coral);
}

.cart-controls .remove-button {
  color: #ef4444 !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 22px !important;
}

.cart-controls .remove-button:hover {
  transform: scale(1.15);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 2px solid var(--line);
}

.cart-total span {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-secondary);
}

.cart-total strong {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--coral);
}

.cart-cost-totals {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: baseline;
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  font: 11px 'JetBrains Mono', monospace;
  text-transform: uppercase;
  background: #f8fafc;
}

.cart-cost-totals strong {
  color: var(--ink);
}

.cart-cost-totals .cost-profit, .cart-cost-totals .cost-profit strong {
  color: var(--teal-dark) !important;
}

/* ==========================================================================
   Botón Vaciar Carrito (Identidad PROVEEDOR77)
   ========================================================================== */
.cart-clear-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
}

.cart-clear-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 42px !important;
  padding: 10px 18px !important;
  font-family: 'Outfit', -apple-system, sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  color: #ff4747 !important;
  background: #fff1f1 !important;
  border: 1px solid #fed7d7 !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: 0 2px 6px rgba(255, 71, 71, 0.08) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cart-clear-btn:hover:not(:disabled) {
  color: #ffffff !important;
  background: var(--bw9-gradient) !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--bw9-shadow) !important;
}

.cart-clear-btn:active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2) !important;
}

.cart-login-btn,
.cart-checkout-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 48px !important;
  margin-top: 14px !important;
  padding: 13px 22px !important;
  font-family: 'Outfit', -apple-system, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  letter-spacing: -0.2px !important;
  color: #ffffff !important;
  background: var(--warm-cta-gradient) !important;
  border: 0 !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-shadow: var(--warm-cta-shadow) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-sizing: border-box !important;
}

.cart-login-btn:hover,
.cart-checkout-btn:hover:not(:disabled) {
  color: #ffffff !important;
  background: var(--warm-cta-gradient-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--warm-cta-shadow-hover) !important;
  text-decoration: none !important;
}

.cart-login-btn:active,
.cart-checkout-btn:active:not(:disabled) {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(245, 63, 91, 0.25) !important;
}

.cart-checkout-btn:disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.cart-login-btn .btn-arrow,
.cart-checkout-btn .btn-arrow {
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  transition: transform 0.2s ease !important;
  display: inline-block !important;
}

.cart-login-btn:hover .btn-arrow,
.cart-checkout-btn:hover:not(:disabled) .btn-arrow {
  transform: translateX(4px) !important;
}

/* ==========================================================================
   Formularios y Botones Globales
   ========================================================================== */
form {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 600;
}

input:not([type="checkbox"]):not([type="radio"]), select {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: #ffffff;
  font: 14px 'Plus Jakarta Sans', sans-serif;
  border-radius: var(--radius-sm);
  transition: all .15s ease;
}

input[type="checkbox"], input[type="radio"] {
  width: auto;
  min-height: 0;
  padding: 0;
  box-sizing: border-box;
}

input:focus, select:focus {
  outline: 2px solid rgba(0, 51, 141, 0.25);
  border-color: var(--coral);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  margin-top: 4px;
  padding: 0 24px;
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--bw9-gradient);
  font: 700 14px 'Outfit', sans-serif;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all .2s ease;
  box-shadow: var(--bw9-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

button:hover:not(:disabled), .btn:hover {
  background: var(--bw9-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--bw9-shadow-hover);
  color: #ffffff;
}

button:active:not(:disabled), .btn:active {
  background: var(--bw9-gradient-active);
  transform: translateY(0);
}

.dark-button, .btn.dark {
  background: var(--ink);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.dark-button:hover:not(:disabled), .btn.dark:hover {
  background: #1e293b;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

/* Botones con Acento Cálido de Conversión (15% Warm CTA sobre 85% Azul Polar) */
.btn-prov77,
.hero-cta-register {
  background: var(--warm-cta-gradient) !important;
  color: #ffffff !important;
  border: 0 !important;
  box-shadow: var(--warm-cta-shadow) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

.btn-prov77:hover,
.hero-cta-register:hover {
  background: var(--warm-cta-gradient-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--warm-cta-shadow-hover) !important;
  color: #ffffff !important;
}

.btn-prov77:active,
.hero-cta-register:active {
  background: linear-gradient(135deg, #b91c1c 0%, #ea580c 100%) !important;
  transform: translateY(0) !important;
}

/* Botones de Copiar y OCR Proveedor77 */
button.copy-btn, .copy-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 36px !important;
  height: 36px !important;
  padding: 0 16px !important;
  font: 700 12.5px 'Outfit', -apple-system, sans-serif !important;
  background: var(--bw9-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  white-space: nowrap !important;
  box-shadow: var(--bw9-shadow) !important;
  text-transform: none !important;
  letter-spacing: .02em !important;
  margin-top: 0 !important;
  flex-shrink: 0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
}
button.copy-btn:hover, .copy-btn:hover {
  background: var(--bw9-gradient-hover) !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: var(--bw9-shadow-hover) !important;
}
button.copy-btn:active, .copy-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2) !important;
}
button.copy-btn.copied, .copy-btn.copied {
  background: #059669 !important;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35) !important;
  color: #ffffff !important;
}

.ocr-upload-btn {
  background: var(--bw9-gradient) !important;
  color: #ffffff !important;
  border: 0 !important;
  padding: 10px 20px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  font-size: 13.5px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: var(--bw9-shadow) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35) !important;
  transition: all .15s ease !important;
  min-height: 40px !important;
}
.ocr-upload-btn:hover {
  background: var(--bw9-gradient-hover) !important;
  color: #ffffff !important;
  transform: translateY(-1.5px) !important;
  box-shadow: var(--bw9-shadow-hover) !important;
}

/* ==========================================================================
   Badges y Proveedores
   ========================================================================== */
.provider-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font: 700 10px 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.provider-ebay {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.provider-amazon {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.shipping-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font: 600 11px 'JetBrains Mono', monospace;
}

.shipping-free {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.shipping-paid {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.cart-shipping {
  display: block;
  margin-top: 4px;
  font: 11px 'JetBrains Mono', monospace;
}

.estimate-flag { color: #d97706; }
.verified-flag { color: var(--teal-dark); }

/* ==========================================================================
   Pie de Página (Site Footer — Identidad Empresas Polar)
   ========================================================================== */
.site-footer {
  background: #001d51;
  color: #ffffff;
  padding: 56px 0 96px;
  margin-top: 80px;
  border-top: 4px solid #33ccff;
  width: 100%;
  box-sizing: border-box;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 32px;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  box-sizing: border-box;
  width: 100%;
}

.footer-agencies-bar {
  max-width: var(--content-max-width);
  margin: 0 auto 24px;
  padding: 20px var(--container-padding) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-sizing: border-box;
  width: 100%;
}

.footer-agencies-text {
  font-size: 12.5px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-agencies-pill {
  background: rgba(255, 255, 255, 0.96);
  padding: 7px 16px;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
}

.footer-col h4 {
  margin: 0 0 18px;
  color: #33ccff;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
}

.footer-col p {
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.6;
}

.footer-col a {
  display: block;
  color: #cbd5e1;
  font-size: 13.5px;
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s ease;
}

.footer-col a:hover {
  color: #33ccff;
  padding-left: 4px;
}

.footer-social-wrap {
  margin-top: 16px;
}

.footer-social-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #93c5fd;
  margin-bottom: 10px;
}

.footer-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-col a.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  margin: 0;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.footer-col a.footer-social-link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: currentColor;
}

.footer-col a.footer-social-link:hover {
  transform: translateY(-2px);
  color: #ffffff;
  padding: 7px 12px;
}

.footer-col a.footer-social-link.is-ig:hover {
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 55%, #8134af 100%);
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(221, 42, 123, 0.4);
}

.footer-col a.footer-social-link.is-fb:hover {
  background: #1877f2;
  border-color: #1877f2;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.4);
}

.footer-col a.footer-social-link.is-tt:hover {
  background: #0f172a;
  border-color: #25f4ee;
  box-shadow: 0 4px 14px rgba(37, 244, 238, 0.35);
}

.footer-bottom {
  border-top: 1px solid rgba(51, 204, 255, 0.2);
  padding-top: 24px;
  color: #94a3b8;
  font: 11px 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .06em;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  box-sizing: border-box;
  width: 100%;
  text-align: center;
}

/* ==========================================================================
   Media Queries & Responsividad Global PROVEEDOR77
   ========================================================================== */
.how-it-works-box {
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  border: 2px solid #bfdbfe;
  border-radius: var(--radius-lg);
  padding: 36px 36px 40px;
  box-shadow: 0 8px 30px rgba(0, 51, 141, 0.08);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

.how-it-works-quote {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  border-left: 6px solid var(--coral);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 51, 141, 0.06);
  box-sizing: border-box;
}

.how-it-works-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  box-sizing: border-box;
}

.how-it-works-pillar {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
  min-width: 0;
}

.how-it-works-pillar:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #33ccff;
}

.pay-receipt-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 24px;
  align-items: start;
}

.my-orders-table-wrap, .admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.my-orders-table {
  min-width: 1020px;
}

.admin-table {
  min-width: 1000px;
}

.store-products-grid,
.ali-store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

@media (max-width: 1399px) {
  .store-products-grid,
  .ali-store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 960px) and (max-width: 1280px) {
  .store-products-grid,
  .ali-store-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
  .store-card-img-wrap {
    width: 112px;
    height: 112px;
  }
}

@media (max-width: 959px) and (min-width: 769px) {
  .store-products-grid,
  .ali-store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 1024px) {
  .main-nav a {
    min-height: 36px;
    padding: 6px 11px;
  }
}

@media (max-width: 900px) {
  .ali-preview-grid { grid-template-columns: 1fr; }
  .ali-input-group { flex-direction: column; }
  .ali-action-btn { width: 100%; }
  .workspace, .cart-page, .page-heading { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .ebay-form-grid { grid-template-columns: 1fr; }
  .form-group.span-2, .form-group.form-actions { grid-column: span 1; }
}

@media (max-width: 800px) {
  .topbar-main {
    padding: 8px 4vw;
  }
  .main-nav {
    padding: 6px 4vw 8px;
    gap: 6px 8px;
  }
  .main-nav a {
    font-size: 12.5px;
    padding: 7px 11px;
    min-height: 36px;
  }
}

@media (max-width: 640px) {
  .shell {
    padding: 20px 14px 84px !important;
  }
  .topbar-nav-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 34px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(250, 251, 252, 0) 0%, #fafbfc 88%);
  }
  .main-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 6px 34px 8px 12px !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .main-nav::-webkit-scrollbar {
    display: none;
  }
  .main-nav a {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    font-size: 12.5px !important;
    padding: 7px 12px !important;
    min-height: 36px !important;
  }
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .page-heading {
    display: block !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
  }
  .page-heading h1 {
    font-size: clamp(24px, 5.5vw, 32px) !important;
    margin: 0 0 6px 0 !important;
  }
  .how-it-works-box {
    padding: 20px 14px 24px !important;
  }
  .how-it-works-quote {
    padding: 16px 14px !important;
    margin-bottom: 18px !important;
  }
  .how-it-works-pillars {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .how-it-works-pillar {
    padding: 18px 14px !important;
  }
  .store-products-grid,
  .ali-store-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .store-product-card,
  .ali-store-card {
    padding: 18px 14px !important;
    border-radius: 14px !important;
  }
  .catalog-search-card {
    padding: 18px 14px !important;
    border-radius: 14px !important;
  }
  .pay-receipt-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .form-block.standalone-form {
    padding: 20px 14px !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .footer-bottom {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
  .footer-agencies-bar {
    padding: 18px 14px 0 !important;
    justify-content: center;
    text-align: center;
  }
  .footer-agencies-text {
    justify-content: center;
  }
  .footer-agencies-pill {
    width: 100%;
    justify-content: space-around !important;
    gap: 10px !important;
  }
  .site-footer {
    padding: 40px 0 88px !important;
    margin-top: 48px;
  }
}

@media (max-width: 600px) {
  .topbar-main {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
  }
  .topbar-actions {
    display: contents;
  }
  .brand {
    font-size: 18px;
    order: 1;
  }
  .brand span {
    font-size: 15px;
    padding: 2px 6px;
  }
  .cart-link {
    order: 2;
    padding: 6px 12px !important;
    font-size: 12.5px !important;
  }
  .top-meta {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 5px;
    border-top: 1px dashed rgba(226, 232, 240, 0.9);
    font-size: 11.5px;
    gap: 6px;
  }
  .user-pill {
    max-width: calc(100% - 108px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11.5px;
    padding: 3px 9px;
  }
  .top-logout-link, .top-login-link {
    font-size: 11.5px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  .main-nav {
    padding: 5px 34px 7px 10px !important;
    gap: 6px !important;
  }
  .main-nav a {
    font-size: 12px !important;
    padding: 7px 11px !important;
    min-height: 36px !important;
  }
  .ali-field-row { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .store-card-img-wrap {
    width: 90px !important;
    height: 90px !important;
  }
  .cart-link span {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 18px !important;
  }
  .brand span {
    font-size: 15px !important;
    padding: 1px 5px !important;
  }
  .cart-link {
    padding: 5px 10px !important;
    font-size: 11.5px !important;
  }
  .user-pill {
    max-width: calc(100% - 98px) !important;
  }
  .top-meta {
    font-size: 10.5px !important;
  }
}

@media (max-height: 480px) and (orientation: landscape) {
  .topbar {
    position: static !important;
  }
  .topbar-main {
    padding: 6px 16px !important;
    min-height: 42px !important;
  }
  .main-nav {
    padding: 4px 16px 6px !important;
  }
  .home-hero {
    padding-top: 12px !important;
    padding-bottom: 18px !important;
    gap: 14px !important;
  }
}

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  input[type="tel"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* ==========================================================================
   Breakpoints de Alta Resolución (Monitores 27", 32", QHD 1440p y 4K)
   ========================================================================== */
@media (min-width: 1440px) {
  :root {
    --content-max-width: 1440px;
    --container-padding: 36px;
  }
  .home-hero h1 {
    font-size: clamp(30px, 3vw, 48px) !important;
  }
}

@media (min-width: 1800px) {
  :root {
    --content-max-width: 1680px;
    --container-padding: 44px;
  }
  .home-hero {
    gap: 5vw !important;
    padding-top: 28px !important;
    padding-bottom: 44px !important;
  }
  .home-hero h1 {
    font-size: 48px !important;
  }
  .store-products-grid,
  .ali-store-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 26px !important;
  }
  .store-card-img-wrap {
    width: 170px;
    height: 170px;
  }
  .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)) !important;
    gap: 20px !important;
  }
}

@media (min-width: 2400px) {
  :root {
    --content-max-width: 1860px;
    --container-padding: 52px;
  }
  .home-hero h1 {
    font-size: 54px !important;
  }
}

/* ==========================================================================
   Variaciones de Productos AliExpress (Pills y Grupos)
   ========================================================================== */
.admin-var-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.admin-var-pill:hover {
  border-color: #134cb1;
  color: #00338d;
  transform: translateY(-1px);
}
.admin-var-pill.active {
  border: 2px solid #00338d !important;
  background: #eff6ff !important;
  color: #00338d !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(0, 51, 141, 0.15);
}

/* ==========================================================================
   Botón Flotante Interactivo de WhatsApp
   ========================================================================== */
.whatsapp-float-wrapper {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.whatsapp-float-tooltip {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  opacity: 0.95;
  transform: translateX(0);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.whatsapp-float-wrapper:hover .whatsapp-float-tooltip {
  opacity: 1;
  transform: translateX(-4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}

.whatsapp-tooltip-status {
  width: 8px;
  height: 8px;
  background-color: #25D366;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #25D366;
  animation: whatsapp-status-blink 2s infinite ease-in-out;
}

@keyframes whatsapp-status-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.whatsapp-float-btn {
  pointer-events: auto;
  position: relative;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.25s ease;
}

.whatsapp-float-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55), 0 4px 10px rgba(0, 0, 0, 0.2);
}

.whatsapp-float-btn:active {
  transform: scale(0.96);
}

.whatsapp-badge-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.8;
  animation: whatsapp-wave 2.2s infinite cubic-bezier(0.24, 0, 0.38, 1);
  pointer-events: none;
}

@keyframes whatsapp-wave {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.45);
    opacity: 0;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

.whatsapp-icon {
  width: 32px;
  height: 32px;
  fill: #ffffff;
  transition: transform 0.2s ease;
}

.whatsapp-float-btn:hover .whatsapp-icon {
  transform: rotate(5deg) scale(1.05);
}

@media (max-width: 1180px), (max-height: 500px) {
  .whatsapp-float-tooltip {
    display: none !important;
  }
  .whatsapp-float-wrapper {
    bottom: 18px;
    right: 18px;
  }
  .whatsapp-float-btn {
    width: 52px;
    height: 52px;
  }
  .whatsapp-icon {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 640px), (max-height: 500px) {
  .whatsapp-float-wrapper {
    bottom: 14px;
    right: 14px;
  }
  .whatsapp-float-btn {
    width: 46px;
    height: 46px;
    opacity: 0.94;
  }
  .whatsapp-icon {
    width: 24px;
    height: 24px;
  }
}

/* Píldoras rápidas del Simulador de WhatsApp */
.chat-quick-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.chat-quick-pill:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
  transform: translateY(-1px);
}

/* ==========================================================================
   SISTEMA DE FAVORITOS ESTILO MERCADO LIBRE (PROVEEDOR77)
   ========================================================================== */

/* Botón estilo Mercado Libre con animación de latido */
.ml-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  padding: 6px 14px;
  min-height: 36px;
  cursor: pointer;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  user-select: none;
  text-decoration: none;
  outline: none;
}

.ml-fav-btn:hover {
  background: #f8fafc;
  border-color: #3483fa;
  color: #1e3a8a;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(52, 131, 250, 0.16);
}

.ml-fav-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Ícono SVG de corazón Mercado Libre */
.ml-fav-heart-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  stroke: #64748b;
  stroke-width: 2;
  fill: transparent;
  transition: fill 0.22s ease, stroke 0.22s ease, transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ml-fav-btn:hover .ml-fav-heart-icon {
  stroke: #3483fa;
  transform: scale(1.08);
}

/* Estado Marcado (Favorito Activo estilo Mercado Libre) */
.ml-fav-btn.is-favorite {
  background: #eff6ff;
  border-color: #3483fa;
  color: #1d4ed8;
  box-shadow: 0 3px 12px rgba(52, 131, 250, 0.18);
}

.ml-fav-btn.is-favorite .ml-fav-heart-icon {
  fill: #3483fa;
  stroke: #3483fa;
}

/* Animación de latido (Heartbeat / Scale) al hacer clic */
.ml-fav-btn.animate-pulse .ml-fav-heart-icon {
  animation: mlHeartBeat 0.48s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes mlHeartBeat {
  0% { transform: scale(1); }
  22% { transform: scale(1.38); }
  45% { transform: scale(0.88); }
  70% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* Contador de favoritos */
.ml-fav-badge {
  background: #f1f5f9;
  color: #475569;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s ease;
}

.ml-fav-btn.is-favorite .ml-fav-badge {
  background: #dbeafe;
  color: #1e40af;
}

/* Variante compacta circular */
.ml-fav-circle-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   MODAL DE INVITACIÓN A INICIAR SESIÓN (GUEST USERS)
   ========================================================================== */
.fav-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.fav-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.fav-modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 460px;
  width: 100%;
  padding: 32px 28px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  text-align: center;
  position: relative;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

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

.fav-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.fav-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.fav-modal-icon-wrap {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 6px 18px rgba(52, 131, 250, 0.2);
}

.fav-modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 22px;
}

.fav-modal-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
  margin: 0 0 24px;
}

.fav-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fav-modal-login-btn {
  background: var(--bw9-gradient);
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  padding: 13px 20px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-block;
  box-shadow: var(--bw9-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fav-modal-login-btn:hover {
  background: var(--bw9-gradient-hover);
  transform: translateY(-2px);
  box-shadow: var(--bw9-shadow-hover);
  color: #ffffff !important;
}

.fav-modal-register-btn {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  color: #334155 !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 10px;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s ease;
}

.fav-modal-register-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a !important;
}

/* ==========================================================================
   PANEL ADMINISTRADOR: KPI DE FAVORITOS & TABLA DE LEADS
   ========================================================================== */
.admin-favorites-leads-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 34px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.admin-fav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.admin-fav-title-wrap h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-fav-title-wrap p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

/* Tarjeta KPI destacada */
.kpi-card-favorite {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: 14px;
  padding: 18px 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.08);
  position: relative;
  overflow: hidden;
}

.kpi-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
  flex-shrink: 0;
}

.kpi-content {
  flex: 1;
}

.kpi-number {
  font-family: 'Outfit', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: #0369a1;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-label {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0c4a6e;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-badge {
  background: #0284c7;
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

/* Botón de exportación a CSV */
.btn-export-csv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  text-decoration: none;
}

.btn-export-csv:hover {
  background: #1e293b;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.28);
}

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

/* Tabla de Leads */
.admin-leads-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.admin-leads-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.admin-leads-table th {
  background: #f8fafc;
  color: #475569;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 2px solid #e2e8f0;
}

.admin-leads-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
}

.admin-leads-table tr:last-child td {
  border-bottom: none;
}

.admin-leads-table tr:hover td {
  background: #f8fafc;
}

.lead-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-right: 10px;
  vertical-align: middle;
}

.lead-date-pill {
  display: inline-block;
  background: #f1f5f9;
  color: #64748b;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ==========================================================================
   Visor de Imágenes y Tarjetas Ampliadas de Productos (Lightbox)
   ========================================================================== */
.store-card-body-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
  align-items: stretch;
  width: 100%;
}

.store-card-media-col {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.store-card-img-wrap {
  width: 100% !important;
  height: 220px !important;
  flex-shrink: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: zoom-in;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
  user-select: none;
  padding: 6px;
  box-sizing: border-box;
}

.store-card-thumbs {
  justify-content: center !important;
  width: 100%;
}

@media (min-width: 1800px) {
  .store-card-img-wrap {
    height: 240px !important;
  }
}

@media (max-width: 768px) {
  .store-card-img-wrap {
    height: 215px !important;
  }
}

.store-card-img-wrap:hover,
.store-card-img-wrap:focus-visible {
  border-color: #00338d;
  box-shadow: 0 6px 22px rgba(0, 51, 141, 0.2);
  transform: translateY(-2px);
  outline: none;
}

.store-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  background: #ffffff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

.store-card-img-wrap:hover img,
.store-card-img-wrap:focus-visible img {
  transform: scale(1.08);
}

.store-img-zoom-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 2.5px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  pointer-events: none;
  opacity: 0.9;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.store-card-img-wrap:hover .store-img-zoom-badge,
.store-card-img-wrap:focus-visible .store-img-zoom-badge {
  background: var(--ali-gradient);
  opacity: 1;
  transform: scale(1.05);
}

/* Modal Lightbox de Pantalla Completa */
.product-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

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

.product-lightbox-container {
  max-width: 960px;
  width: 100%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-lightbox-overlay.active .product-lightbox-container {
  transform: scale(1);
}

.product-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
}

.lightbox-title-area {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.lightbox-title-area h4 {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox-close-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 17px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  flex-shrink: 0;
}

.lightbox-close-btn:hover {
  background: #00338d;
  border-color: #33ccff;
  transform: rotate(90deg);
}

.lightbox-action-btn {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  flex-shrink: 0;
}

.lightbox-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.lightbox-tool-btn {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  width: 32px;
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.lightbox-tool-btn span {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.lightbox-tool-btn:hover {
  background: #00338d;
  border-color: #38bdf8;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 51, 141, 0.4);
}

.product-lightbox-body {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  overflow: auto;
  min-height: 280px;
}

.lightbox-img-wrapper {
  max-width: 100%;
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none !important;
  border: none !important;
  padding: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.lightbox-img-wrapper img,
.product-lightbox-img-wrap img,
#admin-lb-img,
#lightbox-main-img {
  max-width: 100% !important;
  max-height: 62vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  display: block !important;
  margin: 0 auto !important;
}

.product-lightbox-footer {
  padding: 10px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 520px) {
  .store-card-img-wrap {
    width: 115px;
    height: 115px;
  }
  .store-img-zoom-badge .zoom-text {
    display: none;
  }
  .lightbox-img-wrapper {
    max-height: 60vh;
    padding: 6px;
  }
  .lightbox-img-wrapper img {
    max-height: 58vh;
  }
}

/* Reglas de visualización y filtrado para tarjetas de tienda AliExpress */
.ali-store-card {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .2s ease, border-color .2s ease, opacity .2s ease;
}

.ali-store-card.category-hidden {
  display: none !important;
}

#panel-ordenes {
  scroll-margin-top: 110px;
}

#ali-store-products-section {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   TIPOGRAFÍA Y JUSTIFICACIÓN ELEGANTE (PROVEEDOR77)
   ========================================================================== */
p,
.lead,
.text-justify,
.hero-justified-title,
.hero-justified-lead,
.wholesale-header-title,
.wholesale-header-desc,
.how-it-works-quote,
.how-it-works-pillar p,
.feature-card p,
.admin-ali-aggregator-box p,
.admin-wholesale-box p,
.page-heading .lead,
.section-heading p,
.form-footnote,
.client-login-section p,
.admin-login-box .lead,
.tracking-info p,
.pay-instruction-box p,
.cat-section-header p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.hero-justified-title,
.hero-justified-lead,
.wholesale-header-title,
h1, h2, h3 {
  hyphens: none !important;
  -webkit-hyphens: none !important;
}

@media (max-width: 640px) {
  p,
  .lead,
  .text-justify,
  .how-it-works-quote,
  .how-it-works-quote p,
  .how-it-works-pillar p,
  .feature-card p,
  .page-heading .lead,
  .section-heading p,
  .about-us-section p {
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }
  .how-it-works-quote,
  .how-it-works-quote p,
  .how-it-works-pillar p,
  .feature-card p,
  .page-heading .lead,
  .about-us-section p,
  .catalog-search-card p,
  .section-heading p {
    text-align: left !important;
  }
}

/* Excepciones puntuales que deben permanecer centradas o alineadas */
.text-center,
.text-center p,
.empty-state,
.empty-state p,
.trust-item,
.cart-count,
.status-badge,
.hero-badge-tag,
.admin-badge,
.btn,
.nav-item,
.topbar,
.brand {
  text-align: initial;
}

.category-card,
.cat-name,
.cat-count-badge {
  text-align: center !important;
}

@media (max-width: 520px) {
  .category-card,
  .category-card .cat-name,
  .category-card .cat-count-badge {
    text-align: left !important;
  }
}

/* ==========================================================================
   Estandarización de Logos de Agencias de Envío (MRW, ZOOM, DOMESA, TEALCA)
   ========================================================================== */
.agency-logos-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  flex-wrap: nowrap;
  width: auto;
  box-sizing: border-box;
}

.agency-logo-item {
  height: 24px;
  max-height: 24px;
  width: auto;
  max-width: 80px;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.04));
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.agency-logo-item:hover {
  transform: translateY(-1px) scale(1.06);
}

@media (max-width: 640px) {
  .agency-logos-wrap {
    justify-content: space-between;
    width: 100%;
    gap: 12px;
  }
  .agency-logo-item {
    flex: 1 1 0;
    max-width: 23%;
    min-width: 0;
  }
}

@media (max-width: 480px) {
  .agency-logos-wrap {
    gap: 8px;
  }
  .agency-logo-item {
    height: 20px;
    max-height: 20px;
  }
}

/* Grid de publicaciones y lotes mayoristas */
.admin-publications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.admin-wholesale-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 20px;
}

/* Optimizaciones para móvil Android en sesión de Administrador y Catálogo */
@media (max-width: 640px) {
  .admin-ali-aggregator-box {
    padding: 14px 12px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
  }
  .admin-bookmarklet-card {
    padding: 12px 14px !important;
  }
  .admin-bookmarklet-card div[style*="flex:1 1 360px"] {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  #admin-quick-lot-select {
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 6px !important;
  }
  #admin-ali-form {
    flex-direction: column !important;
    gap: 10px !important;
  }
  #admin-ali-form > div {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  #admin-ali-form .cotizar-btn,
  #admin-ali-btn,
  #admin-manual-product-btn {
    width: 100% !important;
    flex: 1 1 100% !important;
    justify-content: center !important;
    white-space: normal !important;
    text-align: center !important;
    min-height: 46px !important;
  }
  .admin-ali-preview-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .admin-ali-preview-grid > div:first-child {
    width: 100% !important;
    align-items: center !important;
  }
  #admin-custom-var-form > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  #admin-batch-save-top-btn {
    width: 100% !important;
    margin-top: 8px !important;
  }
  .admin-publications-grid,
  #admin-publications-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .admin-publication-card {
    padding: 12px !important;
  }
  .admin-publication-card .btn {
    font-size: 11px !important;
    padding: 6px 8px !important;
    min-height: 32px !important;
    white-space: normal !important;
    text-align: center !important;
  }
  .admin-wholesale-grid,
  #wholesale-lots-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .wholesale-lot-card {
    padding: 12px !important;
  }
}

@media (max-width: 520px) {
  .ali-store-card {
    padding: 14px 12px !important;
  }
  .ali-store-card h3 {
    font-size: 13.5px !important;
    line-height: 1.35 !important;
  }
  .ml-fav-btn {
    padding: 4px 8px !important;
    min-height: 28px !important;
    gap: 4px !important;
  }
  .ml-fav-btn .ml-fav-text {
    display: none !important;
  }
  .ml-fav-heart-icon {
    width: 18px !important;
    height: 18px !important;
  }
  .ml-fav-badge {
    font-size: 10.5px !important;
    padding: 1px 5px !important;
  }
  .category-pill-badge {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .store-card-img-wrap {
    width: 100% !important;
    height: 215px !important;
    flex-shrink: 0 !important;
  }
}


/* === Galería de 3 miniaturas en tarjeta de producto === */
.store-card-media-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.store-card-thumbs {
  display: flex;
  gap: 6px;
  justify-content: center;
  width: 100%;
}

.store-thumb-btn {
  width: 42px;
  height: 42px;
  padding: 2px;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.store-thumb-btn:hover {
  border-color: #00338d;
  transform: translateY(-1px);
}

.store-thumb-btn.active {
  border-color: #00338d;
  box-shadow: 0 0 0 2px rgba(0, 51, 141, 0.18);
}

.store-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* === Botones de navegación en Lightbox === */
.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: background 0.15s ease, transform 0.15s ease;
}

.lightbox-nav-btn:hover {
  background: #00338d;
  border-color: #38bdf8;
  transform: translateY(-50%) scale(1.06);
}

.lightbox-nav-prev {
  left: 14px;
}

.lightbox-nav-next {
  right: 14px;
}

.lightbox-counter-pill {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Optimización de fluidez de scroll en móvil (sin jank ni re-pintados GPU)
   ========================================================================== */
.store-product-card {
  contain: layout style;
}

.category-card {
  contain: layout style;
}

@media (max-width: 768px) {
  .category-card .cat-icon img.cat-3d-img,
  .category-card.active .cat-icon img.cat-3d-img,
  .category-card:hover .cat-icon img.cat-3d-img {
    filter: none !important;
  }
  .store-product-card,
  .category-card {
    box-shadow: 0 2px 8px rgba(10, 30, 75, 0.06);
  }
}
