/* Mundo Ofertas · componentes. Solo tokens (var(--…)); ningún color literal. Prefijo mo-. */
body { margin: 0; font-family: var(--font-sans); background: var(--bg); color: var(--text); }
.mo-stage { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5); padding: var(--space-6); }
.mo-stage-col { flex-direction: column; align-items: flex-start; }
.mo-grid { display: grid; gap: var(--space-6); padding: var(--space-6); }
.mo-note { font-family: var(--font-sans); font-size: 12px; line-height: 1.4; color: var(--text-muted); }

/* ---------- Botones ---------- */
.mo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--space-12); padding: 0 var(--space-6); border-radius: var(--radius-sticker);
  border: 2px solid var(--border-strong); font-family: var(--font-display); font-weight: 800;
  font-size: 16px; letter-spacing: .01em; line-height: 1; cursor: pointer; user-select: none;
  box-shadow: var(--shadow-sticker);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.mo-btn:hover:not(:disabled), .mo-btn.is-hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-sticker-lg); }
.mo-btn:active:not(:disabled), .mo-btn.is-active { transform: translate(3px, 3px); box-shadow: none; }
.mo-btn:focus-visible, .mo-btn.is-focus { outline: 3px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
.mo-btn:disabled, .mo-btn.is-disabled {
  cursor: not-allowed; background: var(--bg-sunken); color: var(--text-muted); border-color: var(--border-soft);
  box-shadow: none; transform: none; opacity: .7;
}
.mo-btn-primary { background: var(--brand-fill); color: var(--on-brand-fill); }
.mo-btn-primary:hover:not(:disabled), .mo-btn-primary.is-hover { background: var(--primary-600); }
.mo-btn-primary:active:not(:disabled), .mo-btn-primary.is-active { background: var(--primary-700); }
.mo-btn-cart { background: var(--cta-fill); color: var(--on-cta-fill); }
.mo-btn-cart:hover:not(:disabled), .mo-btn-cart.is-hover { background: var(--success-600); }
.mo-btn-cart:active:not(:disabled), .mo-btn-cart.is-active { background: var(--success-700); color: var(--on-brand-fill); }
.mo-btn-transfer { background: var(--ink-900); color: var(--ink-50); box-shadow: var(--shadow-sticker-brand); }
.mo-btn-transfer:hover:not(:disabled), .mo-btn-transfer.is-hover { background: var(--ink-800); }
.mo-btn-transfer:active:not(:disabled), .mo-btn-transfer.is-active { box-shadow: none; }
.mo-btn-sm { min-height: 44px; padding: 0 var(--space-4); font-size: 13px; }
.mo-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Insignias ---------- */
.mo-badge {
  display: inline-flex; align-items: center; gap: var(--space-1); padding: 7px 14px; border-radius: var(--radius-pill);
  border: 2.5px solid var(--border-strong); box-shadow: var(--shadow-sticker-sm);
  font-family: var(--font-display); font-size: 12px; font-weight: 800; letter-spacing: .08em; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
}
.mo-badge svg { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.mo-badge-oferta { background: var(--flash-fill); color: var(--on-flash-fill); }
.mo-badge-descuento { background: var(--brand-fill); color: var(--on-brand-fill); }
.mo-badge-flash { background: var(--coral-fill); color: var(--on-coral-fill); animation: mo-pulse 1.4s ease-in-out infinite; }
.mo-badge-stock { background: var(--success-soft); color: var(--on-success-soft); border-color: var(--success-text); box-shadow: none; }
.mo-badge-luca {
  gap: 10px; padding: 8px 16px; border-radius: var(--radius-md); background: var(--ink-900); color: var(--ink-50);
  border: 1.5px dashed var(--ink-300); box-shadow: none; position: relative;
}
.mo-badge-luca .mo-luca-price { font-size: 20px; letter-spacing: -.02em; }
.mo-badge-luca svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mo-badge-luca.is-unlocked { border: 2px solid var(--flash-fill); color: var(--flash-fill); }
.mo-seal {
  display: inline-grid; place-items: center; width: 84px; height: 84px; background: var(--flash-fill); color: var(--on-flash-fill);
  font-family: var(--font-display); font-weight: 800; text-align: center; line-height: .95; border: 2.5px solid var(--border-strong);
  clip-path: polygon(50% 0, 60% 9%, 73% 4%, 78% 17%, 92% 18%, 90% 32%, 100% 41%, 92% 52%, 98% 65%, 85% 70%, 82% 84%, 69% 83%, 60% 95%, 50% 87%, 40% 95%, 31% 83%, 18% 84%, 15% 70%, 2% 65%, 8% 52%, 0 41%, 10% 32%, 8% 18%, 22% 17%, 27% 4%, 40% 9%);
}
.mo-seal b { display: block; font-size: 24px; letter-spacing: -.03em; }
.mo-seal span { font-size: 12px; letter-spacing: .2em; }
@keyframes mo-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

/* ---------- Precios ---------- */
.mo-price { display: flex; flex-direction: column; gap: var(--space-2); }
.mo-price-old {
  font-family: var(--font-sans); font-size: 16px; font-weight: 500; line-height: 1.2; color: var(--urgent-text);
  text-decoration-line: line-through; text-decoration-color: var(--flash-fill); text-decoration-thickness: 2px; font-variant-numeric: tabular-nums;
}
.mo-price-now { font-family: var(--font-display); font-weight: 800; line-height: 1; letter-spacing: -.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.mo-price-now.is-xl { font-size: 48px; }
.mo-price-now.is-lg { font-size: 32px; }
.mo-price-now .mo-cur { font-size: .5em; vertical-align: .7em; margin-right: .08em; letter-spacing: 0; }
.mo-price-save {
  display: inline-flex; align-items: center; align-self: flex-start; padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--success-soft); color: var(--on-success-soft); font-family: var(--font-sans); font-size: 13px; font-weight: 700;
}

/* ---------- Urgencia ---------- */
.mo-stock { display: grid; gap: var(--space-2); width: 100%; max-width: 320px; font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--urgent-text); }
.mo-stock-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.mo-stock-label { display: inline-flex; align-items: center; gap: var(--space-2); }
.mo-stock-label svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.mo-stock-count { font-family: var(--font-display); font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.mo-stock-count small { font-family: var(--font-sans); font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.mo-stock-track { box-sizing: border-box; height: 22px; padding: 3px; border-radius: var(--radius-pill); border: 2px solid var(--border-strong); background: var(--bg-sunken); overflow: hidden; }
.mo-stock-fill {
  height: 100%; width: var(--stock, 30%); min-width: 16px; border-radius: var(--radius-pill); background-color: var(--flash-fill);
  background-image: repeating-linear-gradient(135deg, var(--flash-700) 0 5px, transparent 5px 12px);
  background-size: 17px 17px; animation: mo-stripes 2.4s linear infinite;
}
.mo-stock.is-ok { color: var(--success-text); }
.mo-stock.is-ok .mo-stock-fill { background-color: var(--success-text); background-image: none; animation: none; }
@keyframes mo-stripes { from { background-position: 0 0; } to { background-position: 17px 0; } }
.mo-countdown { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 800; font-variant-numeric: tabular-nums; }
.mo-countdown-cell {
  display: grid; place-items: center; min-width: 44px; height: 48px; padding: 0 8px; border-radius: var(--radius-sm);
  background: var(--ink-900); color: var(--ink-50); font-size: 24px; line-height: 1; border: 1.5px solid var(--ink-600); box-shadow: 2px 2px 0 0 var(--flash-fill);
}
.mo-countdown-sep { color: var(--urgent-text); font-size: 24px; animation: mo-blink 1s steps(1) infinite; }
.mo-countdown-lab { display: grid; gap: 4px; justify-items: center; }
.mo-countdown-lab small { font-family: var(--font-sans); font-size: 12px; font-weight: 700; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; }
@keyframes mo-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: .25; } }

/* ---------- Cápsulas de categoría ---------- */
.mo-cat { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-pill); }
.mo-cat svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mo-cat svg .mo-dot { fill: currentColor; stroke: none; }
.mo-cat-tech { background: var(--primary-100); color: var(--primary-700); }
.mo-cat-hogar { background: var(--success-100); color: var(--success-700); }
.mo-cat-herramientas { background: var(--flash-100); color: var(--flash-700); }
.mo-cat-belleza { background: var(--coral-100); color: var(--coral-700); }
.mo-cat-juguetes { background: var(--primary-500); color: var(--on-brand-fill); }
.mo-cat-luca { background: var(--ink-900); color: var(--ink-50); outline: 1.5px dashed var(--flash-fill); outline-offset: -4px; }
.mo-cat-item { display: grid; justify-items: center; gap: var(--space-2); width: 104px; text-align: center; }

/* ---------- Tarjeta de producto ---------- */
.mo-card {
  position: relative; display: grid; gap: var(--space-4); width: 288px; padding: var(--space-4); border-radius: var(--radius-card);
  background: var(--bg-raised); border: 2px solid var(--border-strong); box-shadow: var(--shadow-sticker); color: var(--text);
}
.mo-card-media { position: relative; display: grid; place-items: center; height: 160px; border-radius: var(--radius-md); background: var(--primary-100); color: var(--primary-700); }
.mo-card-media svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mo-card-media svg .mo-dot { fill: currentColor; stroke: none; }
.mo-card-media .mo-badge { position: absolute; top: 10px; left: 10px; }
.mo-card-title { margin: 0; font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
.mo-card-meta { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-muted); }

/* ---------- Botón: cargando ---------- */
.mo-btn.is-loading, .mo-btn[aria-busy="true"] { position: relative; pointer-events: none; color: transparent; }
.mo-btn.is-loading::after, .mo-btn[aria-busy="true"]::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--on-brand-fill); border-right-color: transparent; animation: mo-spin .7s linear infinite;
}
.mo-btn-cart.is-loading::after, .mo-btn-cart[aria-busy="true"]::after { border-color: var(--on-cta-fill); border-right-color: transparent; }
.mo-btn.is-loading svg, .mo-btn[aria-busy="true"] svg { visibility: hidden; }
@keyframes mo-spin { to { transform: rotate(360deg); } }

/* ---------- Campo de texto (búsqueda, cupón) ---------- */
.mo-field { display: grid; gap: 6px; width: 100%; max-width: 320px; font-family: var(--font-sans); }
.mo-field-label { font-size: 14px; font-weight: 700; color: var(--text); }
.mo-input {
  box-sizing: border-box; width: 100%; min-height: var(--space-12); padding: 0 var(--space-4); border-radius: var(--radius-sticker);
  border: 2px solid var(--border-strong); background: var(--bg-raised); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; font-weight: 500; line-height: 1.5;
}
.mo-input::placeholder { color: var(--text-muted); opacity: 1; }
.mo-input:focus-visible, .mo-input.is-focus { outline: 3px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
.mo-input[aria-invalid="true"], .mo-input.is-error { border-color: var(--urgent-text); }
.mo-input:disabled, .mo-input.is-disabled { cursor: not-allowed; background: var(--bg-sunken); color: var(--text-muted); border-color: var(--border-soft); }
.mo-field-msg { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.mo-field-msg.is-error { color: var(--urgent-text); font-weight: 700; }
.mo-field-msg.is-ok { color: var(--success-text); font-weight: 700; }

/* ---------- Cabecera con buscador y carrito ---------- */
.mo-header { display: flex; align-items: center; gap: var(--space-4); min-height: var(--space-16); padding: var(--space-3) var(--space-4); background: var(--brand-fill); border-bottom: 2px solid var(--ink-900); }
.mo-header .mo-input { flex: 1 1 auto; max-width: 576px; border-color: var(--ink-900); }
.mo-header > a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }
.mo-header-full { display: none; height: 44px; }
.mo-header-mark { display: block; height: 40px; }
@media (min-width: 640px) { .mo-header:not(.is-compact) .mo-header-full { display: block; } .mo-header:not(.is-compact) .mo-header-mark { display: none; } }
.mo-cart-btn {
  position: relative; display: inline-grid; place-items: center; flex: none; width: var(--space-12); height: var(--space-12); padding: 0;
  border-radius: var(--radius-sticker); border: 2px solid var(--ink-900); background: var(--ink-900); color: var(--ink-50); cursor: pointer;
}
.mo-cart-btn:focus-visible { outline: 3px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
.mo-cart-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mo-cart-count {
  position: absolute; top: -8px; right: -8px; display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 4px;
  border-radius: var(--radius-pill); border: 2px solid var(--ink-900); background: var(--flash-fill); color: var(--on-flash-fill);
  font-family: var(--font-display); font-size: 12px; font-weight: 800; line-height: 1;
}

/* ---------- Aviso (toast) ---------- */
.mo-toast {
  display: flex; align-items: flex-start; gap: var(--space-3); max-width: 384px; padding: var(--space-3) var(--space-4); box-sizing: border-box;
  border-radius: var(--radius-sticker); border: 2px solid var(--border-strong); box-shadow: var(--shadow-sticker);
  background: var(--bg-raised); color: var(--text); font-family: var(--font-sans); font-size: 14px; line-height: 1.5;
  animation: mo-pop .35s cubic-bezier(.2, .8, .3, 1.2) both;
}
.mo-toast svg { flex: none; width: 20px; height: 20px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.mo-toast p { margin: 0; }
.mo-toast strong { display: block; font-family: var(--font-display); font-weight: 700; }
.mo-toast-success { background: var(--success-soft); color: var(--on-success-soft); border-color: var(--success-text); }
.mo-toast-error { background: var(--flash-100); color: var(--ink-900); border-color: var(--flash-700); }
.mo-toast-info { background: var(--primary-100); color: var(--ink-900); border-color: var(--primary-700); }
.mo-toast-close { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -10px -14px -10px auto; padding: 0; background: none; border: 0; color: inherit; cursor: pointer; border-radius: var(--radius-sticker); }
.mo-toast-close:focus-visible { outline: 3px solid transparent; outline-offset: 2px; box-shadow: var(--focus-ring); }
@keyframes mo-pop { 0% { transform: scale(.8); opacity: 0; } 70% { transform: scale(1.04); } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Utilidades de accesibilidad ---------- */
.mo-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (forced-colors: active) {
  .mo-stock-fill { background-color: Highlight; background-image: none; forced-color-adjust: none; }
  .mo-badge, .mo-seal { border: 2px solid CanvasText; }
  .mo-price-old { text-decoration-color: CanvasText; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .mo-badge-flash, .mo-stock-fill, .mo-countdown-sep, .mo-toast { animation: none; }
  .mo-btn { transition: none; }
  .mo-btn.is-loading::after, .mo-btn[aria-busy="true"]::after { animation-duration: 1.6s; }
}
