/* base.css — Variables CSS, reset, tipografía
   Tu-Librería — modificar aquí colores y fuentes globales */

:root {
    --cream: #FAF8F4;
    --warm-white: #FFFFFF;
    --ink: #1A1814;
    --ink-muted: #6B6760;
    --ink-light: #A8A49E;
    --accent: #C8452A;
    --accent-light: #F5EAE7;
    --accent-hover: #A8381F;
    --gold: #C4922A;
    --gold-light: #FBF5E8;
    --border: #E8E4DD;
    --border-light: #F0EDE8;
    --surface: #F4F1EC;
    --success: #2D7A5C;
    --success-light: #E8F5EE;
    --tag-bg: #EEEAE3;
    --shadow-sm: 0 1px 3px rgba(26,24,20,0.06), 0 1px 2px rgba(26,24,20,0.04);
    --shadow-md: 0 4px 16px rgba(26,24,20,0.08), 0 2px 6px rgba(26,24,20,0.05);
    --shadow-lg: 0 12px 40px rgba(26,24,20,0.12);
    --radius: 6px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
  }

  html { scroll-behavior: smooth; }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--cream);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
  }

  /* ── LOADING SKELETON ── */
  @keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
  }
  .skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--border-light) 50%, var(--border) 75%);
    background-size: 400px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 4px;
  }

  /* ── ML BADGE ── */
  .ml-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: #FFF9EF; border: 1px solid #FFE099;
    border-radius: 6px; padding: 6px 12px; font-size: 12px;
    font-weight: 600; color: #8B6200; margin-top: 12px;
    width: 100%;
  }
  .ml-badge .ml-dot { width: 8px; height: 8px; border-radius: 50%; background: #F5A623; flex-shrink: 0; }

  .whatsapp-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 150;
    width: 52px; height: 52px; background: #25D366; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4); cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition); text-decoration: none;
  }
  .whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,0.5); }
  .whatsapp-float svg { width: 28px; height: 28px; color: white; pointer-events: none; }

  /* ── TOUCH ACTION — elimina delay de 300ms en todos los elementos interactivos ── */
  a, button, [role="button"], input[type="submit"], input[type="button"],
  .mob-cat-pill, .brand-tag, .nav-link, .card-wish, .card-add-btn,
  .qty-btn, .page-btn, .checkout-btn, .co-btn, .pd-add-btn, .mmf-btn {
    touch-action: manipulation;
  }

  /* ── PREFERS-REDUCED-MOTION — respeta preferencias de accesibilidad ── */
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }

  /* ── CART BADGE BUMP — animación al agregar ítems ── */
  @keyframes cart-bump {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.55); }
    65%  { transform: scale(0.88); }
    100% { transform: scale(1); }
  }
  .cart-count.bump { animation: cart-bump 0.38s cubic-bezier(0.34,1.56,0.64,1); }

  /* ── BUTTON PRESS FEEDBACK — feedback táctil en CTAs principales ── */
  .btn-primary:active,
  .checkout-btn:active,
  .auth-btn-primary:active,
  .co-btn-primary:active,
  .pd-add-btn:active,
  .pd-wa-btn:active,
  .card-add-btn:active,
  .mmf-cart:active,
  .mob-filter-trigger:active,
  .mfd-btn-apply:active {
    transform: scale(0.96) !important;
    transition-duration: 0.08s !important;
    box-shadow: none !important;
  }

  /* ── TOAST TYPES — colores semánticos ── */
  .toast.toast-success { background: var(--success); }
  .toast.toast-error   { background: #B91C1C; }
  .toast.toast-warn    { background: #92400E; }

  /* ── FOCUS RING — accesibilidad teclado ── */
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  button:focus-visible,
  a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
  }
