/**
 * ZADI - Main CSS
 * Core variables, reset, utilities
 * Design System Foundation
 */

/* ============================================
   GOOGLE FONTS - Nunito
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700;800;900&display=swap');

/* ============================================
   CSS CUSTOM PROPERTIES (Variables)
   ============================================ */
:root {
  /* Primary Colors */
  --zadi-accent: #ff1844;
  --zadi-accent-dark: #e0153a;
  --zadi-accent-light: #ff6b8a;
  
  /* Neutral Colors */
  --zadi-bg: #f6f6f6;
  --zadi-surface: #ffffff;
  --zadi-surface-dark: #f8f9fa;
  --zadi-border: #e0e0e0;
  
  /* Text Colors */
  --zadi-text-primary: #2d3436;
  --zadi-text-secondary: #636e72;
  --zadi-text-muted: #b2bec3;
  
  /* Status Colors */
  --zadi-success: #00b894;
  --zadi-warning: #fdcb6e;
  --zadi-error: #d63031;
  --zadi-info: #74b9ff;
  
  /* Gradients */
  --zadi-gradient-primary: linear-gradient(135deg, #ff1844 0%, #ff6b8a 100%);
  --zadi-gradient-dark: linear-gradient(135deg, #2d3436 0%, #636e72 100%);
  
  /* Typography */
  --font-family-base: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-family-mono: 'Courier New', Courier, monospace;
  
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 2rem;      /* 32px */
  --font-size-4xl: 2.5rem;    /* 40px */
  
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  --font-weight-black: 900;
  
  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;
  
  /* Spacing (8px grid system) */
  --spacing-1: 0.5rem;   /* 8px */
  --spacing-2: 1rem;     /* 16px */
  --spacing-3: 1.5rem;   /* 24px */
  --spacing-4: 2rem;     /* 32px */
  --spacing-5: 2.5rem;   /* 40px */
  --spacing-6: 3rem;     /* 48px */
  --spacing-8: 4rem;     /* 64px */
  --spacing-10: 5rem;    /* 80px */
  
  /* Border Radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  --radius-full: 9999px;  /* Fully rounded */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-accent: 0 10px 30px rgba(255, 24, 68, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Z-index Scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--zadi-text-primary);
  background-color: var(--zadi-bg);
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  width: 100%;
  max-width: 100vw;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--zadi-text-primary);
  margin-bottom: var(--spacing-2);
}

h1 { font-size: var(--font-size-3xl); font-weight: var(--font-weight-extrabold); }
h2 { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }
h3 { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }
h4 { font-size: var(--font-size-lg); font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }
h6 { font-size: var(--font-size-sm); font-weight: var(--font-weight-semibold); }

p {
  margin-bottom: var(--spacing-2);
  line-height: var(--line-height-relaxed);
}

a {
  color: var(--zadi-accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--zadi-accent-dark);
  text-decoration: underline;
}

strong, b {
  font-weight: var(--font-weight-bold);
}

small {
  font-size: var(--font-size-sm);
  color: var(--zadi-text-secondary);
}

code {
  font-family: var(--font-family-mono);
  font-size: 0.875em;
  background-color: var(--zadi-surface-dark);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--zadi-accent);
}

/* ============================================
   LANDING PAGE STYLES
   ============================================ */
.hero-section {
  background: linear-gradient(135deg, #ff1844 0%, #ff6b8a 100%);
  color: white;
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

.min-vh-75 {
  min-height: 75vh;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-description {
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-search {
  margin-bottom: 3rem;
}

.search-form .input-group {
  max-width: 600px;
  margin: 0 auto;
}

.search-form .form-control {
  border-radius: 2rem 0 0 2rem;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-form .btn {
  border-radius: 0 2rem 2rem 0;
  padding: 1rem 2rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-stats {
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.hero-image {
  position: relative;
  z-index: 2;
}

.hero-cards {
  position: relative;
  height: 400px;
}

.floating-card {
  position: absolute;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: float 3s ease-in-out infinite;
  max-width: 200px;
}

.floating-card.card-1 {
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-card.card-2 {
  top: 50%;
  right: 20%;
  animation-delay: 1s;
}

.floating-card.card-3 {
  bottom: 20%;
  left: 30%;
  animation-delay: 2s;
}

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

.deals-section {
  padding: 4rem 0;
}

.section-header {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--zadi-text-primary);
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--zadi-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.vendors-section {
  padding: 4rem 0;
}

.vendor-card {
  transition: all 0.3s ease;
  border: 1px solid var(--zadi-border);
}

.vendor-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.vendor-logo-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--zadi-gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 auto;
}

.vendor-name {
  font-weight: 600;
  color: var(--zadi-text-primary);
  margin-bottom: 0.5rem;
}

.vendor-industry {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.how-it-works-section {
  padding: 4rem 0;
}

.step-card {
  padding: 2rem 1rem;
}

.step-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--zadi-gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 8px 25px rgba(255, 24, 68, 0.3);
}

.step-title {
  font-weight: 600;
  color: var(--zadi-text-primary);
  margin-bottom: 1rem;
}

.step-description {
  color: var(--zadi-text-secondary);
  line-height: 1.6;
}

.cta-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--zadi-accent) 0%, var(--zadi-accent-light) 100%);
  color: white;
}

/* Vendor Logo */
.vendor-logo img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}

.cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-description {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.cta-buttons .btn {
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: 2rem;
  margin: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .search-form .form-control,
  .search-form .btn {
    padding: 0.875rem 1.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .floating-card {
    max-width: 150px;
  }
  
  .hero-cards {
    height: 300px;
  }
  
  .cta-title {
    font-size: 2rem;
  }
  
  .cta-buttons .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 2rem 0;
    min-height: auto;
  }
  
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }
  
  .hero-search {
    margin-bottom: 1.5rem;
  }
  
  .hero-stats {
    margin-top: 1rem;
  }
  
  .hero-stats .stat-item {
    text-align: center;
  }
  
  .hero-stats .stat-number {
    font-size: 1.25rem;
  }
  
  .hero-stats .stat-label {
    font-size: 0.75rem;
  }
  
  .search-form .input-group {
    flex-direction: column;
  }
  
  .search-form .form-control {
    border-radius: 2rem;
    margin-bottom: 1rem;
  }
  
  .search-form .btn {
    border-radius: 2rem;
  }
  
  /* Remove min-height on mobile */
  .min-vh-75 {
    min-height: auto !important;
  }
  
  .floating-card {
    display: none; /* Hide on very small screens */
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text Utilities */
.text-primary { color: var(--zadi-text-primary) !important; }
.text-secondary { color: var(--zadi-text-secondary) !important; }
.text-muted { color: var(--zadi-text-muted) !important; }
.text-accent { color: var(--zadi-accent) !important; }
.text-success { color: var(--zadi-success) !important; }
.text-warning { color: var(--zadi-warning) !important; }
.text-error { color: var(--zadi-error) !important; }
.text-info { color: var(--zadi-info) !important; }
.text-white { color: #ffffff !important; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

.font-light { font-weight: var(--font-weight-light) !important; }
.font-normal { font-weight: var(--font-weight-normal) !important; }
.font-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-bold { font-weight: var(--font-weight-bold) !important; }
.font-extrabold { font-weight: var(--font-weight-extrabold) !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-capitalize { text-transform: capitalize !important; }

/* Background Utilities */
.bg-primary { background-color: var(--zadi-bg) !important; }
.bg-surface { background-color: var(--zadi-surface) !important; }
.bg-accent { background-color: var(--zadi-accent) !important; }
.bg-success { background-color: var(--zadi-success) !important; }
.bg-warning { background-color: var(--zadi-warning) !important; }
.bg-error { background-color: var(--zadi-error) !important; }
.bg-info { background-color: var(--zadi-info) !important; }
.bg-gradient { background: var(--zadi-gradient-primary) !important; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: var(--spacing-1) !important; }
.m-2 { margin: var(--spacing-2) !important; }
.m-3 { margin: var(--spacing-3) !important; }
.m-4 { margin: var(--spacing-4) !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: var(--spacing-1) !important; }
.mt-2 { margin-top: var(--spacing-2) !important; }
.mt-3 { margin-top: var(--spacing-3) !important; }
.mt-4 { margin-top: var(--spacing-4) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: var(--spacing-1) !important; }
.mb-2 { margin-bottom: var(--spacing-2) !important; }
.mb-3 { margin-bottom: var(--spacing-3) !important; }
.mb-4 { margin-bottom: var(--spacing-4) !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: var(--spacing-1) !important; }
.p-2 { padding: var(--spacing-2) !important; }
.p-3 { padding: var(--spacing-3) !important; }
.p-4 { padding: var(--spacing-4) !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: var(--spacing-1) !important; }
.pt-2 { padding-top: var(--spacing-2) !important; }
.pt-3 { padding-top: var(--spacing-3) !important; }
.pt-4 { padding-top: var(--spacing-4) !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: var(--spacing-1) !important; }
.pb-2 { padding-bottom: var(--spacing-2) !important; }
.pb-3 { padding-bottom: var(--spacing-3) !important; }
.pb-4 { padding-bottom: var(--spacing-4) !important; }

/* Display Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flex Utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }

.align-start { align-items: flex-start !important; }
.align-center { align-items: center !important; }
.align-end { align-items: flex-end !important; }
.align-stretch { align-items: stretch !important; }

.gap-1 { gap: var(--spacing-1) !important; }
.gap-2 { gap: var(--spacing-2) !important; }
.gap-3 { gap: var(--spacing-3) !important; }
.gap-4 { gap: var(--spacing-4) !important; }

/* Border Utilities */
.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Shadow Utilities */
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }
.shadow-accent { box-shadow: var(--shadow-accent) !important; }
.shadow-none { box-shadow: none !important; }

/* Width & Height Utilities */
.w-full { width: 100% !important; }
.h-full { height: 100% !important; }
.min-h-screen { min-height: 100vh !important; }

/* Position Utilities */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Overflow Utilities */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* Cursor Utilities */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

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

.animate-fade-in { animation: fadeIn var(--transition-base); }
.animate-fade-in-up { animation: fadeInUp var(--transition-base); }
.animate-slide-in-right { animation: slideInRight var(--transition-base); }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ============================================
   ACCESSIBILITY
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
*:focus {
  outline: 2px solid var(--zadi-accent);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--zadi-accent);
  outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  a, a:visited {
    text-decoration: underline;
  }
  
  a[href]:after {
    content: " (" attr(href) ")";
  }
  
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  
  h2, h3, p {
    orphans: 3;
    widows: 3;
  }
  
  h2, h3 {
    page-break-after: avoid;
  }
}

