/* ============================================================
   BuildLab.pro — Design System (light · blanco & azul)
   Única fuente de verdad de estilos globales.
   ============================================================ */

:root {
  --bl-primary: #3b82f6;
  --bl-primary-strong: #2563eb;
  --bl-primary-soft: #dbeafe;
  --bl-bg: #f6f9fe;
  --bl-surface: #ffffff;
  --bl-on-surface: #0f172a;
  --bl-muted: #475569;
  --bl-outline: #cdd9ec;
  --bl-error: #dc2626;
  --bl-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --bl-shadow-md: 0 4px 16px rgba(59, 130, 246, 0.09);
  --bl-shadow-lg: 0 12px 32px rgba(59, 130, 246, 0.14);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--bl-outline) transparent;
}

body {
  background-color: var(--bl-bg);
  background-image: radial-gradient(1100px 480px at 50% -8%, rgba(59, 130, 246, 0.08), transparent 62%);
  background-attachment: fixed;
  color: var(--bl-on-surface);
}

::selection {
  background: #bfdbfe;
  color: #172554;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bl-outline);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ---------- Material Symbols ---------- */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1;
}

/* ---------- Utilidades compartidas ---------- */
.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.card-lift {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--bl-shadow-lg);
}

.img-zoom {
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.group:hover .img-zoom {
  transform: scale(1.06);
}

/* ---------- Formularios ---------- */
input,
select,
textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--bl-primary) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.input-focus-ring:focus {
  box-shadow: 0 0 0 2px var(--bl-primary);
  border-color: var(--bl-primary);
}

/* ---------- Botones ---------- */
button {
  transition: transform 0.15s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    opacity 0.2s ease,
    filter 0.2s ease;
}
button.bg-primary {
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.32);
}
button.bg-primary:hover {
  filter: brightness(1.07);
}
button:active {
  transform: scale(0.98);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Accesibilidad: foco visible ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--bl-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* ---------- Header glassmorphism ---------- */
header.fixed {
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
}

/* ---------- Drawer ---------- */
.drawer {
  will-change: transform;
}

/* ---------- Modal ---------- */
#app-modal > div {
  animation: bl-pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bl-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Toasts ---------- */
.toast {
  animation: bl-slide 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes bl-slide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Imágenes de producto ---------- */
img {
  user-select: none;
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
