/**
 * ORTOTECNIK — SISTEMA DE DISEÑO ÁUREO Y TOKENS CANÓNICOS
 * ══════════════════════════════════════════════════════════════
 * Proporción Áurea (Phi = 1.618) y Sucesión de Fibonacci
 * Arquitectura Fisiológica: Piel y Sentidos (UI/UX)
 * ══════════════════════════════════════════════════════════════
 */

/* ══════════════════════════════════════════════════════════════
   8. BUSCADOR CLÍNICO SPOTLIGHT UNIVERSAL (CMD+K / CTRL+K)
   ══════════════════════════════════════════════════════════════ */
.orto-spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 13, 27, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  padding-left: 13px;
  padding-right: 13px;
  opacity: 0;
  visibility: hidden;
  transition: all var(--orto-duration-fast) var(--orto-ease);
}

.orto-spotlight-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.orto-spotlight-card {
  background: var(--orto-superficie);
  border: 1px solid var(--orto-border);
  border-radius: var(--orto-radius-lg);
  box-shadow: var(--orto-shadow-spotlight);
  width: 100%;
  max-width: 640px;
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: all var(--orto-duration-normal) var(--orto-ease);
  display: flex;
  flex-direction: column;
}

.orto-spotlight-backdrop.open .orto-spotlight-card {
  transform: scale(1) translateY(0);
}

.orto-spotlight-header {
  display: flex;
  align-items: center;
  padding: 13px 21px;
  border-bottom: 1.5px solid var(--orto-border);
  gap: 13px;
  background: var(--orto-fondo-suave);
}

.orto-spotlight-search-icon {
  width: 22px;
  height: 22px;
  stroke: var(--orto-teal);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.orto-spotlight-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: var(--orto-font-16);
  font-weight: 600;
  color: var(--orto-text);
  outline: none;
}

.orto-spotlight-input::placeholder {
  color: var(--orto-placeholder);
  font-weight: 400;
}

/* Aviso cuando no hay búsqueda o no hay resultados, y su enlace al catálogo */
.orto-spotlight-vacio { padding: var(--orto-space-21); text-align: center; color: var(--orto-text); font-size: var(--orto-font-13); }
.orto-spotlight-mas { margin-top: var(--orto-space-8); }
.orto-spotlight-mas a { color: var(--orto-teal-texto); font-weight: 700; }

.orto-spotlight-badge-esc {
  font-family: inherit;
  background: var(--orto-border);
  color: var(--orto-text);
  font-size: var(--orto-font-11);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--orto-border-dark);
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
}

.orto-spotlight-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.orto-spotlight-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 13px;
  border-radius: var(--orto-radius-md);
  text-decoration: none;
  color: var(--orto-text);
  transition: all var(--orto-duration-fast) var(--orto-ease);
}

.orto-spotlight-item:hover,
.orto-spotlight-item.focused {
  background: var(--orto-teal-light);
  transform: translateX(3px);
}

/* Página de la tienda en la búsqueda rápida: su icono en el mismo lugar que la foto de un producto */
.orto-spotlight-item-ico {
  width: 44px; height: 44px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: var(--orto-teal-light); color: var(--orto-teal-texto);
  font-size: var(--orto-font-21);
}

.orto-spotlight-item-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--orto-fondo-suave);
  object-fit: contain;
  flex-shrink: 0;
  border: 1px solid var(--orto-border);
}

.orto-spotlight-item-info {
  flex: 1;
  min-width: 0;
}

.orto-spotlight-item-name {
  font-size: var(--orto-font-13);
  font-weight: 700;
  color: var(--orto-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.orto-spotlight-item-meta {
  font-size: var(--orto-font-13);
  color: var(--orto-muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.orto-spotlight-item-price {
  font-size: var(--orto-font-13);
  font-weight: 800;
  color: var(--orto-teal-texto);
}

.orto-spotlight-footer {
  padding: 8px 21px;
  background: var(--orto-bg);
  border-top: 1px solid var(--orto-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--orto-font-13);
  color: var(--orto-muted);
}

.orto-spotlight-keys {
  display: flex;
  align-items: center;
  gap: 13px;
}

.orto-spotlight-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.orto-spotlight-key kbd {
  background: var(--orto-superficie);
  border: 1px solid var(--orto-border-dark);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: var(--orto-font-11);
  font-weight: 700;
  color: var(--orto-text);
  box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

/* ══════════════════════════════════════════════════════════════
   9. BOTONES SOCIALES NATIVOS (SIGN IN WITH APPLE & GOOGLE)
   ══════════════════════════════════════════════════════════════ */
.orto-btn-apple {
  background: var(--marca-apple-fondo);
  color: var(--marca-apple-texto);
  border: none;
  border-radius: var(--orto-radius-md);
  padding: 13px 21px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: var(--orto-font-13);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all var(--orto-duration-fast) var(--orto-ease);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.orto-btn-apple:hover {
  background: var(--marca-apple-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.orto-btn-apple svg {
  width: 18px;
  height: 18px;
  fill: var(--marca-apple-texto);
}

.orto-btn-google {
  background: var(--marca-google-fondo);
  color: var(--marca-google-texto);
  border: 1.5px solid var(--orto-border-dark);
  border-radius: var(--orto-radius-md);
  padding: 13px 21px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: var(--orto-font-13);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: all var(--orto-duration-fast) var(--orto-ease);
}

.orto-btn-google:hover {
  background: var(--marca-google-hover);
  border-color: var(--marca-google-borde-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Indicador de atajo en la barra de búsqueda principal */
.orto-search-shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 2px 5px;
  font-size: var(--orto-font-11);
  font-weight: 800;
  color: var(--orto-muted);
  margin-right: 8px;
  pointer-events: none;
  user-select: none;
}

/* ══════════════════════════════════════════════════════════════
   10. TOUCH TARGETS Y ACCESIBILIDAD MÓVIL (WCAG AA)
   ══════════════════════════════════════════════════════════════ */
.ci-qty button,
.qty-btn,
.ci-del,
.pwish,
.s-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--orto-teal, #00897B);
  outline-offset: 2px;
}

/* Transiciones Áureas Canónicas Globales */
a, button, input, select, textarea {
  transition: all var(--orto-duration-normal, 250ms) var(--orto-ease, cubic-bezier(0.4, 0.0, 0.2, 1));
}

/* ══════════════════════════════════════════════════════════════
   15. TARJETAS Y CONTENEDORES CLÍNICOS (REUTILIZABLES)
   ══════════════════════════════════════════════════════════════ */
.orto-card {
  background: var(--orto-superficie);
  border: 1px solid var(--orto-border);
  border-radius: var(--orto-radius-lg);
  padding: var(--orto-space-21);
  box-shadow: var(--orto-shadow-sm);
  transition: box-shadow var(--orto-duration-normal) var(--orto-ease);
}

.orto-card:hover {
  box-shadow: var(--orto-shadow-md);
}

/* ══════════════════════════════════════════════════════════════
   16. ALERTAS CLÍNICAS IN-PAGE (REEMPLAZO DE alert())
   ══════════════════════════════════════════════════════════════ */
.orto-alert {
  padding: 13px 13px;
  border-radius: var(--orto-radius-sm);
  font-size: var(--orto-font-13);
  font-weight: 600;
  display: none;
  margin-bottom: 13px;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.orto-alert.show {
  display: block;
}

.orto-alert-error {
  background: var(--orto-red-light, #FEF2F2);
  color: var(--orto-red, #EF4444);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.orto-alert-success {
  background: var(--orto-green-light, #ECFDF5);
  color: var(--orto-green-dark, #059669);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.orto-alert-warning {
  background: var(--orto-gold-light, #FEF3C7);
  color: var(--orto-ambar-texto);
  border: 1px solid rgba(255, 207, 63, 0.3);
}
