/* ============================================
   AZCAPO CLASIFICADOS — Design System
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  /* Colors — Base */
  --bg-primary: #FAFAFA;
  --bg-secondary: #F0F0F0;
  --bg-surface: #FFFFFF;
  --bg-surface-hover: #E8E8E8;
  --bg-surface-elevated: #FFFFFF;
  --bg-overlay: rgba(250, 250, 250, 0.95);

  /* Colors — Text */
  --text-primary: #121212;
  --text-secondary: #333333;
  --text-muted: #616161;
  --text-inverse: #FFFFFF;

  /* Colors — Accent Gradient */
  --accent-start: #e53935;
  --accent-end: #ff7043;
  --accent-gradient: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  --accent-gradient-hover: linear-gradient(135deg, #ef5350, #ff8a65);

  /* Colors — Category Accents */
  --cat-vehiculos: #3b82f6;
  --cat-casas: #10b981;
  --cat-electrodomesticos: #f97316;
  --cat-computo: #06b6d4;
  --cat-videojuegos: #8b5cf6;
  --cat-musica: #ec4899;
  --cat-mascotas: #f59e0b;
  --cat-oficina: #64748b;
  --cat-varios: #14b8a6;

  /* Colors — Semantic */
  --success: #22c55e;
  --warning: #eab308;
  --error: #ef4444;
  --info: #3b82f6;

  /* Colors — Glass */
  --glass-bg: #FFFFFF;
  --glass-border: #e53935;
  --glass-border-hover: #d32f2f;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 20px rgba(229, 57, 53, 0.3);
  --shadow-glow-lg: 0 0 40px rgba(229, 57, 53, 0.4), 0 0 80px rgba(255, 112, 67, 0.15);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-Index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Layout */
  --header-height: 70px;
  --max-width: 1280px;
  --sidebar-width: 280px;
}

/* ---- CSS Reset ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(229, 57, 53, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  bottom: -30%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(255, 112, 67, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

img, video, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}

/* ---- Utility Classes ---- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
}

/* ---- Keyframe Animations ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 15px rgba(229, 57, 53, 0.3), 0 0 30px rgba(255, 112, 67, 0.1); }
  50% { box-shadow: 0 0 25px rgba(229, 57, 53, 0.5), 0 0 50px rgba(255, 112, 67, 0.2); }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(229, 57, 53, 0.4); }
  50% { border-color: rgba(255, 112, 67, 0.4); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes toastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ---- Selection ---- */
::selection {
  background: rgba(229, 57, 53, 0.35);
  color: var(--text-primary);
}
