/* =========================================================================
   NOGOPAINT — Estilos de aplicación / componentes
   Consume los tokens de tokens.css. Mobile-first.
   ========================================================================= */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-default);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* La app vive dentro de un viewport mobile (.ng-app) */
.ng-app {
  font-family: var(--font-body);
  color: var(--text-default);
  background: var(--bg-base);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  letter-spacing: var(--tracking-tight);
  margin: 0;
  line-height: var(--leading-tight);
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* ---- Scroll area de la pantalla ---------------------------------------- */
.ng-screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.ng-screen::-webkit-scrollbar { width: 0; }
.ng-pad { padding: var(--space-4); }

/* =========================================================================
   BOTONES
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--tap-min);
  padding: 0 var(--space-5);
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 var(--space-4); font-size: var(--text-sm); border-radius: var(--radius-full); }
.btn--lg { min-height: 52px; font-size: var(--text-lg); }

.btn--primary { background: var(--accent); color: var(--text-on-primary); }
.btn--primary:hover { background: var(--accent-hover); }

/* CTA comercial (amarillo) — máxima conversión: Comprar / Agregar / Pagar */
.btn--cta { background: var(--cta); color: var(--cta-text); font-weight: var(--weight-bold); }
.btn--cta:hover { background: var(--cta-hover); }
.btn--cta:focus-visible { box-shadow: 0 0 0 3px rgba(242, 194, 0, 0.5); }

.btn--secondary {
  background: var(--bg-surface);
  color: var(--accent);
  border-color: var(--color-primary-200);
}
.btn--secondary:hover { background: var(--accent-soft); border-color: var(--color-primary-300); }

.btn--ghost { background: transparent; color: var(--text-default); }
.btn--ghost:hover { background: var(--bg-surface-alt); }

.btn--icon {
  min-width: var(--tap-min); padding: 0;
  background: transparent; color: var(--text-default);
}
.btn--icon:hover { background: var(--bg-surface-alt); }

/* =========================================================================
   FORM CONTROLS
   ========================================================================= */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-strong); }
.field__hint { font-size: var(--text-xs); color: var(--text-muted); }
.field__error { font-size: var(--text-xs); color: var(--color-error-600); font-weight: var(--weight-medium); }

.input, .select, .textarea {
  width: 100%;
  min-height: var(--tap-min);
  padding: 0 var(--space-3);
  font-size: var(--text-base);
  color: var(--text-strong);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  transition: border-color .15s, box-shadow .15s;
}
.textarea { padding: var(--space-3); min-height: 96px; resize: vertical; line-height: var(--leading-normal); }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--border-strong); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--focus-ring); box-shadow: var(--shadow-focus);
}
.input--error, .textarea--error { border-color: var(--color-error-600); }
.input:disabled, .select:disabled { background: var(--bg-surface-alt); color: var(--text-muted); cursor: not-allowed; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7385' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-8);
}

/* Checkbox / radio */
.choice { display: inline-flex; align-items: center; gap: var(--space-2); min-height: var(--tap-min); cursor: pointer; font-size: var(--text-base); color: var(--text-strong); }
.choice input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice__box {
  width: 22px; height: 22px; flex: none;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.choice__box--check { border-radius: var(--radius-sm); }
.choice__box--radio { border-radius: var(--radius-full); }
.choice input:checked + .choice__box { background: var(--accent); border-color: var(--accent); }
.choice input:focus-visible + .choice__box { box-shadow: var(--shadow-focus); }
.choice__box svg { opacity: 0; }
.choice input:checked + .choice__box svg { opacity: 1; }
.choice__dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; }
.choice input:checked + .choice__box--radio .choice__dot { opacity: 1; }

/* =========================================================================
   BADGES / TAGS
   ========================================================================= */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px var(--space-2);
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  line-height: 1.5;
}
.badge--primary { background: var(--accent-soft); color: var(--color-primary-700); }
.badge--success { background: var(--color-success-50); color: var(--color-success-600); }
.badge--warning { background: var(--color-warning-50); color: var(--color-warning-600); }
.badge--error   { background: var(--color-error-50); color: var(--color-error-600); }
.badge--neutral { background: var(--bg-surface-alt); color: var(--text-default); }
.badge--ship { background: var(--color-success-600); color: #fff; }

/* Badges comerciales vivos — promos, lanzamientos, destacados, líneas */
.badge--promo { background: var(--color-red-500);    color: #fff; }            /* ¡Oferta! / -20% */
.badge--new   { background: var(--color-yellow-500); color: var(--cta-text); }  /* Nuevo */
.badge--best  { background: var(--accent);           color: #fff; }            /* Más vendido */
.badge--line  { background: var(--accent-soft);      color: var(--accent-hover); } /* Línea Hogar */
.badge--hot   { background: var(--color-orange-500);  color: #fff; }            /* Liquidación */

.tag {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 4px var(--space-3);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  background: var(--bg-surface); color: var(--text-default);
  border: 1.5px solid var(--border-default);
}
.tag--active { background: var(--text-strong); color: #fff; border-color: var(--text-strong); }
.tag button { background: none; border: none; color: inherit; display: grid; place-items: center; padding: 0; }

/* =========================================================================
   CATEGORÍAS (líneas de producto) — acento por familia vía --category-color
   ========================================================================= */
.category-ultra      { --category-color: var(--category-ultra); }
.category-hogar      { --category-color: var(--category-hogar); }
.category-deluxe     { --category-color: var(--category-deluxe); }
.category-sinteticos { --category-color: var(--category-sinteticos); }
.category-artistica  { --category-color: var(--category-artistica); }

/* Chip de categoría: punto de color + etiqueta */
.cat-chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 4px var(--space-3); min-height: 32px;
  font-size: var(--text-sm); font-weight: var(--weight-semibold);
  color: var(--text-strong); background: var(--bg-surface);
  border: 1.5px solid var(--border-default); border-radius: var(--radius-full);
}
.cat-chip::before {
  content: ""; width: 12px; height: 12px; border-radius: var(--radius-full);
  background: var(--category-color, var(--accent));
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12);
}
.cat-chip--active {
  border-color: var(--category-color, var(--accent));
  background: color-mix(in srgb, var(--category-color, var(--accent)) 12%, #fff);
}
/* Barra/acento lateral de tarjeta de categoría */
.cat-accent { border-top: 3px solid var(--category-color, var(--accent)); }

/* =========================================================================
   SWATCHES (color)
   ========================================================================= */
.swatch {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  border: none; background: none; padding: 0; text-align: center; cursor: pointer;
}
.swatch__chip {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-md);
  border: 1px solid rgba(18,21,27,0.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
  transition: transform .12s, box-shadow .12s;
}
.swatch__name { font-size: var(--text-xs); color: var(--text-default); line-height: 1.25; }
.swatch:hover .swatch__chip { transform: scale(1.04); }
.swatch--active .swatch__chip {
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent);
}
.swatch--active .swatch__name { color: var(--text-strong); font-weight: var(--weight-semibold); }
.swatch__check {
  position: absolute; top: 6px; right: 6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg-surface); display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
}
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: var(--space-3);
}

/* =========================================================================
   SEGMENTED / PILLS (selector de presentación)
   ========================================================================= */
.segmented { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill {
  min-height: var(--tap-min); min-width: var(--tap-min);
  padding: 0 var(--space-4);
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-default);
  background: var(--bg-surface); color: var(--text-strong);
  font-weight: var(--weight-semibold); line-height: 1.1;
  transition: all .12s;
}
.pill small { font-size: var(--text-xs); font-weight: var(--weight-regular); color: var(--text-muted); }
.pill:hover { border-color: var(--border-strong); }
.pill--active { border-color: var(--accent); background: var(--accent-soft); color: var(--color-primary-700); }
.pill--active small { color: var(--color-primary-600); }
.pill:disabled { opacity: .4; cursor: not-allowed; }

/* =========================================================================
   CARDS
   ========================================================================= */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.pcard { display: flex; flex-direction: column; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.pcard:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pcard__media { position: relative; aspect-ratio: 4/3; background: var(--bg-surface-alt); }
.pcard__body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.pcard__name { font-family: var(--font-display); font-weight: var(--weight-semibold); color: var(--text-strong); font-size: var(--text-base); line-height: var(--leading-snug); }
.pcard__price { font-family: var(--font-display); font-weight: var(--weight-bold); color: var(--text-strong); font-size: var(--text-lg); }
.pcard__swatches { display: flex; gap: 4px; }
.pcard__sw { width: 16px; height: 16px; border-radius: 5px; border: 1px solid rgba(18,21,27,0.12); }

/* Placeholder de imagen con rayas */
.img-ph {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, var(--color-neutral-100) 0 10px, var(--color-neutral-200) 10px 20px);
  display: grid; place-items: center;
}
.img-ph span {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-muted);
  background: rgba(255,255,255,0.82); padding: 3px 8px; border-radius: var(--radius-sm);
}

/* Lata de pintura "renderizada" con CSS para la ficha/cards (color real) */
.can {
  position: absolute; inset: 0; display: grid; place-items: center;
}
.can__body {
  width: 56%; aspect-ratio: 0.82; border-radius: 8px 8px 10px 10px;
  position: relative;
  box-shadow: inset -10px 0 18px rgba(0,0,0,0.18), inset 10px 0 14px rgba(255,255,255,0.25), var(--shadow-sm);
}
.can__lid {
  position: absolute; top: -7%; left: 8%; right: 8%; height: 14%;
  border-radius: 50%/100%;
  background: linear-gradient(#fff8, #0002);
}
.can__label {
  position: absolute; left: 8%; right: 8%; top: 30%; bottom: 12%;
  background: rgba(255,255,255,0.92); border-radius: 4px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px;
}
.can__label b { font-family: var(--font-display); font-size: 11px; color: var(--text-strong); letter-spacing: -0.01em; }
.can__label small { font-size: 8px; color: var(--text-muted); }
.can__handle {
  position: absolute; top: -2%; left: 50%; transform: translateX(-50%);
  width: 62%; height: 18%; border: 2px solid rgba(0,0,0,0.22);
  border-bottom: none; border-radius: 50% 50% 0 0;
}

.product-photo {
  position: absolute;
  inset: 0;
  background: var(--bg-surface-alt);
}
.product-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.pcard:hover .product-photo__img { transform: scale(1.04); }
.product-photo__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18,21,27,0.04), rgba(18,21,27,0.36));
}
.product-photo__chip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.92);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  backdrop-filter: blur(8px);
}
.product-photo__chip span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(18,21,27,0.14);
  flex: none;
}
.product-photo--compact .product-photo__chip {
  right: 8px;
  bottom: 8px;
  padding: 5px 7px;
}

/* =========================================================================
   HEADER / NAV
   ========================================================================= */
.ng-ship-bar {
  background: var(--color-success-600); color: #fff;
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  text-align: center; padding: 6px var(--space-3);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.ng-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle);
}
.ng-header__bar { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); min-height: 56px; }
.wordmark { font-family: var(--font-display); font-weight: var(--weight-bold); font-size: var(--text-xl); color: var(--text-strong); letter-spacing: -0.03em; }
.wordmark b { color: var(--accent); }
.wordmark-note { font-size: 8px; color: var(--text-muted); font-family: var(--font-mono); display:block; line-height:1; margin-top:1px;}

.searchbar { display: flex; align-items: center; gap: var(--space-2); flex: 1; background: var(--bg-surface-alt); border-radius: var(--radius-full); padding: 0 var(--space-3); min-height: 40px; color: var(--text-muted); }
.searchbar input { border: none; background: none; outline: none; flex: 1; font-size: var(--text-sm); color: var(--text-strong); }

.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: var(--weight-bold);
  display: grid; place-items: center; padding: 0 5px;
}

/* Bottom tab nav (mobile) */
.tabbar {
  display: flex; background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar__item {
  flex: 1; border: none; background: none;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-2) 0 calc(var(--space-2) + 2px);
  color: var(--text-muted); font-size: 10px; font-weight: var(--weight-medium);
  min-height: var(--tap-min);
}
.tabbar__item--active { color: var(--accent); }

/* =========================================================================
   FILTROS (chips horizontal scroll)
   ========================================================================= */
.filter-row { display: flex; gap: var(--space-2); overflow-x: auto; padding: var(--space-3) var(--space-4); }
.filter-row::-webkit-scrollbar { display: none; }

/* =========================================================================
   DRAWER / BOTTOM SHEET
   ========================================================================= */
.overlay { position: absolute; inset: 0; background: rgba(18,21,27,0.5); z-index: var(--z-drawer); animation: fade .2s both; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 1);
  background: var(--bg-surface); border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  max-height: 92%; display: flex; flex-direction: column;
  animation: slideup .28s cubic-bezier(.2,.8,.2,1) both;
  box-shadow: var(--shadow-lg);
}
.sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: var(--border-default); margin: var(--space-3) auto var(--space-2); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--space-4) var(--space-3); border-bottom: 1px solid var(--border-subtle); }
.sheet__body { overflow-y: auto; padding: var(--space-4); }
.sheet__foot { border-top: 1px solid var(--border-subtle); padding: var(--space-4); background: var(--bg-surface); }

/* Entradas: el estado final (visible) es la BASE; sólo animamos DESDE oculto
   cuando el navegador realmente reproduce animaciones. Si el entorno congela
   el reloj de animación, el contenido permanece visible (no se oculta). */
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideup { from { transform: translateY(10px); } to { transform: translateY(0); } }
@keyframes pop { from { transform: scale(.98); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .overlay, .sheet, .bubble, .toast { animation: none !important; }
}

/* =========================================================================
   BOT / ASISTENTE
   ========================================================================= */
.bot { display: flex; flex-direction: column; height: 100%; }
.bot__head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border-subtle); }
.bot__avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full); flex: none;
  background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
  display: grid; place-items: center; color: #fff;
}
.bot__name { font-family: var(--font-display); font-weight: var(--weight-semibold); color: var(--text-strong); font-size: var(--text-base); }
.bot__status { font-size: var(--text-xs); color: var(--color-success-600); display: flex; align-items: center; gap: 4px; }
.bot__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--color-success-600); }

.bot__feed { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); background: var(--bg-base); }
.bubble {
  max-width: 84%; padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm); line-height: var(--leading-normal);
  animation: pop .25s ease both;
  opacity: 1;
}
.bubble--bot {
  align-self: flex-start; background: var(--bg-surface); color: var(--text-strong);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) 4px;
  border: 1px solid var(--border-subtle);
}
.bubble--user {
  align-self: flex-end; background: var(--accent); color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 4px var(--radius-lg);
}
.bot__quick { display: flex; flex-wrap: wrap; gap: var(--space-2); align-self: flex-start; max-width: 92%; }
.quick {
  border: 1.5px solid var(--color-primary-200); background: var(--bg-surface);
  color: var(--color-primary-700); border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-4); font-size: var(--text-sm); font-weight: var(--weight-medium);
  min-height: 40px;
}
.quick:hover { background: var(--accent-soft); }
.bot__input { display: flex; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border-subtle); background: var(--bg-surface); align-items: flex-end; }

.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; }
.typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* Tarjeta de resultado del cálculo */
.calc-card {
  background: linear-gradient(150deg, var(--color-primary-700), var(--color-primary-900));
  color: #fff; border-radius: var(--radius-lg); padding: var(--space-5);
  align-self: stretch; max-width: 100%;
}
.calc-card__big { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: var(--weight-bold); line-height: 1; }
.calc-card__row { display: flex; align-items: baseline; gap: var(--space-2); }
.calc-line { display: flex; justify-content: space-between; font-size: var(--text-sm); padding: var(--space-2) 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
.calc-line:last-child { border-bottom: none; }

/* =========================================================================
   TOAST
   ========================================================================= */
.toast-wrap { position: absolute; left: 0; right: 0; bottom: 84px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: var(--space-2); align-items: center; pointer-events: none; padding: 0 var(--space-4); }
.toast {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--text-strong); color: #fff;
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  box-shadow: var(--shadow-lg); animation: fade .25s both; max-width: 100%;
}
.toast--success { background: var(--color-success-600); }

/* =========================================================================
   UTILIDADES
   ========================================================================= */
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); } .gap-2 { gap: var(--space-2); } .gap-3 { gap: var(--space-3); } .gap-4 { gap: var(--space-4); }
.col { display: flex; flex-direction: column; }
.muted { color: var(--text-muted); }
.strong { color: var(--text-strong); }
.t-xs { font-size: var(--text-xs); } .t-sm { font-size: var(--text-sm); } .t-lg { font-size: var(--text-lg); }
.t-2xl { font-size: var(--text-2xl); } .t-3xl { font-size: var(--text-3xl); }
.fw-6 { font-weight: var(--weight-semibold); } .fw-7 { font-weight: var(--weight-bold); }
.disp { font-family: var(--font-display); }
.mt-1{margin-top:var(--space-1)}.mt-2{margin-top:var(--space-2)}.mt-3{margin-top:var(--space-3)}.mt-4{margin-top:var(--space-4)}.mt-6{margin-top:var(--space-6)}
.mb-2{margin-bottom:var(--space-2)}.mb-3{margin-bottom:var(--space-3)}.mb-4{margin-bottom:var(--space-4)}
.sec-title { font-size: var(--text-xl); font-weight: var(--weight-bold); }
.divider { height: 1px; background: var(--border-subtle); }
.stock-ok { color: var(--color-success-600); } .stock-low { color: var(--color-warning-600); } .stock-no { color: var(--color-error-600); }
.link { color: var(--accent); font-weight: var(--weight-semibold); text-decoration: none; }
.price-strike { text-decoration: line-through; color: var(--text-muted); font-weight: var(--weight-regular); font-size: .8em; }

/* =========================================================================
   HERO — "La pared que se pinta sola"
   Animación CSS pura (transform/opacity + left%), respeta prefers-reduced-motion.
   Estructura compartida entre HomeScreen y DtHome — overrides de escritorio
   viven en desktop.css dentro de @media (min-width: 860px).
   ========================================================================= */
.paint-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-4) var(--space-6);
  background: linear-gradient(160deg, var(--bg-surface) 0%, var(--accent-soft) 100%);
}
.paint-hero__copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.paint-hero__copy h1 { margin: 0; color: var(--text-strong); font-size: var(--text-3xl); line-height: 1.12; }
.paint-hero__copy p { margin: 0; max-width: 320px; color: var(--text-default); line-height: var(--leading-normal); }

/* ---- Escena ilustrada: pared + franja + rodillo (decorativa, aria-hidden) ---- */
.paint-hero__visual {
  position: relative;
  height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.paint-hero__wall {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bg-surface-alt);
}
.paint-hero__paint {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 26px;
  margin-top: -13px;
  background: var(--ph-color, var(--accent));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .32),
    inset 0 -3px 5px rgba(18, 21, 27, .14);
  transform-origin: left center;
  transform: scaleX(0);
  animation: ph-paint 7s cubic-bezier(.65, 0, .35, 1) infinite;
}
.paint-hero__roller {
  position: absolute;
  top: 50%;
  left: -8%;
  width: 56px;
  height: 35px;
  margin-top: -17px;
  filter: drop-shadow(0 3px 6px rgba(18, 21, 27, .2));
  animation: ph-roller 7s cubic-bezier(.65, 0, .35, 1) infinite;
}
.paint-hero__roller svg { display: block; width: 100%; height: 100%; }
.paint-hero__roller-drum   { fill: var(--ph-color, var(--accent)); stroke: var(--color-primary-800); }
.paint-hero__roller-cap    { fill: var(--color-primary-800); }
.paint-hero__roller-handle { fill: none; stroke: var(--color-primary-800); }
.paint-hero__drop {
  position: absolute;
  top: 60%;
  right: 22%;
  color: var(--ph-color, var(--accent));
  opacity: .5;
  line-height: 0;
}
.paint-hero__drop svg { fill: currentColor; stroke: none; }

/* ---- Elementos flotantes — offsets siempre positivos: cero riesgo de overflow ---- */
.paint-hero__can {
  position: absolute;
  left: var(--space-3);
  bottom: var(--space-3);
  width: 70px;
  height: 92px;
}
.paint-hero__chips {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 64%;
}
.paint-hero__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-primary-800);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
}
/* ---- Selector interactivo de color: repinta la escena en vivo ---- */
.paint-hero__picker { display: flex; flex-direction: column; gap: 8px; }
.paint-hero__picker-label { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-muted); }
.paint-hero__picker-row { display: flex; flex-wrap: wrap; gap: 10px; }
.paint-hero__pick {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  border: 2px solid var(--bg-surface);
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 1.5px var(--border-subtle), var(--shadow-xs);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.paint-hero__pick:hover { transform: translateY(-2px); }
.paint-hero__pick:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.paint-hero__pick.is-active { box-shadow: 0 0 0 1.5px var(--bg-surface), 0 0 0 3.5px var(--accent), var(--shadow-sm); }
.paint-hero__pick svg { opacity: 0; filter: drop-shadow(0 1px 1.5px rgba(18, 21, 27, .5)); transition: opacity .15s ease; }
.paint-hero__pick.is-active svg { opacity: 1; }
.paint-hero__advisor {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  max-width: 168px;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.paint-hero__advisor-calc {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-strong);
  line-height: 1.25;
}
.paint-hero__advisor-calc b { color: var(--accent); font-weight: var(--weight-bold); }
.paint-hero__advisor-tag { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: var(--text-muted); }

/* ---- Animación: franja + rodillo sincronizados (mismo timing → loop sin salto) ---- */
@keyframes ph-paint {
  0%, 6%    { transform: scaleX(0); opacity: 1; }
  46%, 84%  { transform: scaleX(1); opacity: 1; }
  92%       { transform: scaleX(1); opacity: 0; }
  93%, 100% { transform: scaleX(0); opacity: 0; }
}
@keyframes ph-roller {
  0%, 6%    { left: -8%; opacity: 1; transform: translateY(0) rotate(0deg); }
  16%       { transform: translateY(-2px) rotate(-3deg); }
  26%       { transform: translateY(0) rotate(0deg); }
  36%       { transform: translateY(-2px) rotate(3deg); }
  46%, 84%  { left: 94%; opacity: 1; transform: translateY(0) rotate(0deg); }
  92%       { left: 94%; opacity: 0; transform: translateY(-6px) rotate(-8deg); }
  93%, 100% { left: -8%; opacity: 0; transform: translateY(0) rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .paint-hero__paint, .paint-hero__roller { animation: none !important; }
  .paint-hero__paint  { transform: scaleX(1); opacity: 1; }
  .paint-hero__roller { opacity: 0; }
}
