/* ===================================
   WISHLIST.COM.UA - DESIGN SYSTEM CSS
   Mobile-First CSS Foundation
   =================================== */

/* ===== CSS Variables ===== */
:root {
  /* ===== Color Palette ===== */
  /* Primary - Brand Colors */
  --primary-50:  #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-200: #bae6fd;
  --primary-300: #7dd3fc;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;   /* Main brand color */
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;

  /* Secondary - Accent Colors */
  --secondary-50:  #fdf4ff;
  --secondary-100: #fae8ff;
  --secondary-200: #f5d0fe;
  --secondary-300: #f0abfc;
  --secondary-400: #e879f9;
  --secondary-500: #d946ef;  /* Accent color */
  --secondary-600: #c026d3;
  --secondary-700: #a21caf;
  --secondary-800: #86198f;
  --secondary-900: #701a75;

  /* Neutral - Grays */
  --neutral-0:   #ffffff;
  --neutral-50:  #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-300: #cbd5e1;
  --neutral-400: #94a3b8;
  --neutral-500: #64748b;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-800: #1e293b;
  --neutral-900: #0f172a;

  /* Success */
  --success-50: #f0fdf4;
  --success-100: #dcfce7;
  --success-500: #10b981;
  --success-600: #059669;
  --success-700: #047857;
  
  /* Warning */
  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-600: #d97706;
  --warning-700: #b45309;
  
  /* Error */
  --error-500: #ef4444;
  --error-600: #dc2626;
  
  /* Red (for likes) */
  --red-50: #fef2f2;
  --red-100: #fee2e2;
  --red-500: #ef4444;
  --red-600: #dc2626;

  /* ===== Spacing System (8px base) ===== */
  --space-1:  0.25rem;  /* 4px */
  --space-2:  0.5rem;   /* 8px */
  --space-3:  0.75rem;  /* 12px */
  --space-4:  1rem;     /* 16px */
  --space-5:  1.25rem;  /* 20px */
  --space-6:  1.5rem;   /* 24px */
  --space-8:  2rem;     /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */

  /* ===== Mobile-First Typography ===== */
  /* Mobile typography (smaller) */
  --text-xs:   0.75rem;  /* 12px */
  --text-sm:   0.875rem; /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg:   1.125rem; /* 18px */
  --text-xl:   1.25rem;  /* 20px */
  --text-2xl:  1.5rem;   /* 24px */
  --text-3xl:  1.875rem; /* 30px */
  --text-4xl:  2.25rem;  /* 36px */
  --text-5xl:  3rem;     /* 48px */
  --text-6xl:  3.75rem;  /* 60px */

  /* ===== Font Weights ===== */
  --font-light:  300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;

  /* ===== Border Radius ===== */
  --radius-sm: 0.25rem;   /* 4px */
  --radius-md: 0.375rem;  /* 6px */
  --radius-lg: 0.5rem;    /* 8px */
  --radius-xl: 0.75rem;   /* 12px */
  --radius-2xl: 1rem;     /* 16px */

  /* ===== 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);

  /* ===== Mobile-First Breakpoints ===== */
  --breakpoint-xs:  360px;
  --breakpoint-sm:  640px;
  --breakpoint-md:  768px;
  --breakpoint-lg:  1024px;
  --breakpoint-xl:  1280px;

  /* ===== Touch Targets ===== */
  --touch-target-sm: 44px;   /* Minimum */
  --touch-target-md: 48px;   /* Comfortable */
  --touch-target-lg: 56px;   /* Large */

  /* ===== Mobile Spacing ===== */
  --mobile-padding: var(--space-4);     /* 16px */
  --mobile-margin: var(--space-3);      /* 12px */
  --mobile-gap: var(--space-2);         /* 8px */

  /* ===== Desktop Spacing ===== */
  --desktop-padding: var(--space-6);    /* 24px */
  --desktop-margin: var(--space-5);     /* 20px */
  --desktop-gap: var(--space-4);        /* 16px */
}

/* ===== Desktop Typography (larger) ===== */
@media (min-width: 768px) {
  :root {
    --text-xs:   0.75rem;  /* 12px */
    --text-sm:   0.875rem; /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg:   1.125rem; /* 18px */
    --text-xl:   1.25rem;  /* 20px */
    --text-2xl:  1.5rem;   /* 24px */
    --text-3xl:  1.875rem; /* 30px */
    --text-4xl:  2.25rem;  /* 36px */
    --text-5xl:  3rem;     /* 48px */
    --text-6xl:  3.75rem;  /* 60px */
  }
}

/* ===== Base Styles ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  margin: 0;
  padding: 0;
}

/* ===== Typography Utilities ===== */
.text-xs   { font-size: var(--text-xs); }
.text-sm   { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg   { font-size: var(--text-lg); }
.text-xl   { font-size: var(--text-xl); }
.text-2xl  { font-size: var(--text-2xl); }
.text-3xl  { font-size: var(--text-3xl); }
.text-4xl  { font-size: var(--text-4xl); }
.text-5xl  { font-size: var(--text-5xl); }

.font-light    { font-weight: var(--font-light); }
.font-normal   { font-weight: var(--font-normal); }
.font-medium   { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold     { font-weight: var(--font-bold); }

/* ===== Color Utilities ===== */
.text-primary-500 { color: var(--primary-500); }
.text-primary-600 { color: var(--primary-600); }
.text-neutral-600 { color: var(--neutral-600); }
.text-neutral-700 { color: var(--neutral-700); }
.text-neutral-800 { color: var(--neutral-800); }

.bg-primary-500 { background-color: var(--primary-500); }
.bg-primary-50  { background-color: var(--primary-50); }
.bg-neutral-50  { background-color: var(--neutral-50); }

/* ===== Button Styles ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
}

.btn-primary:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--neutral-100);
  color: var(--neutral-700);
  border-color: var(--neutral-300);
}

.btn-secondary:hover {
  background-color: var(--neutral-200);
  border-color: var(--neutral-400);
  transform: translateY(-1px);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

/* ===== Card Styles ===== */
.card {
  background: var(--neutral-0);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  overflow: hidden;
}

.card-body {
  padding: var(--space-4);
}

@media (min-width: 768px) {
  .card-body {
    padding: var(--space-6);
  }
}

/* ===== Container ===== */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container-custom {
    padding: 0 var(--space-6);
  }
}

/* ===== Spacing Utilities ===== */
.p-1  { padding: var(--space-1); }
.p-2  { padding: var(--space-2); }
.p-3  { padding: var(--space-3); }
.p-4  { padding: var(--space-4); }
.p-6  { padding: var(--space-6); }
.p-8  { padding: var(--space-8); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-8 { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.py-12 { padding-top: var(--space-12); padding-bottom: var(--space-12); }
.py-16 { padding-top: var(--space-16); padding-bottom: var(--space-16); }

.m-2  { margin: var(--space-2); }
.m-4  { margin: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ===== Grid System ===== */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }

@media (min-width: 768px) {
  .grid {
    gap: var(--space-6);
  }
  
  .md\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ===== Text Alignment ===== */
.text-center { text-align: center; }
.text-left   { text-align: left; }

@media (min-width: 768px) {
  .md\:text-center { text-align: center; }
  .md\:text-left   { text-align: left; }
}

/* ===== User Avatar Styles ===== */
.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.user-avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  color: white;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}

/* ===== User Link Styles ===== */
.user-link {
  color: var(--primary-600);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: var(--font-medium);
}

.user-link:hover {
  color: var(--primary-700);
  text-decoration: underline;
}

/* ===== Wish Meta Styles ===== */
.wish-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  padding: var(--space-3);
  background: var(--neutral-50);
  border-radius: var(--radius-lg);
}

.wish-meta-info {
  flex: 1;
  min-width: 0;
}

.wish-owner {
  font-weight: var(--font-medium);
  color: var(--neutral-800);
  margin-bottom: 2px;
}

.wish-list-name {
  font-size: var(--text-sm);
  color: var(--neutral-600);
}

.wish-date {
  font-size: var(--text-xs);
  color: var(--neutral-500);
  white-space: nowrap;
}

/* ===== Responsive Avatar Sizes ===== */
@media (min-width: 768px) {
  .user-avatar {
    width: 48px;
    height: 48px;
    font-size: var(--text-base);
  }
  
  .user-avatar-placeholder {
    font-size: var(--text-base);
  }
}

/* ===== Wishlist User Section Styles ===== */
.wishlist-user {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  background: var(--neutral-50);
  border-radius: var(--radius-lg);
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: var(--font-medium);
  color: var(--neutral-800);
  margin-bottom: 2px;
}

.user-username {
  font-size: var(--text-sm);
  color: var(--neutral-600);
}

/* ===== Wish Cards Grid Styles ===== */
.wishes-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

@media (min-width: 768px) {
  .wishes-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .wishes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .wishes-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===== Wish Card Styles ===== */
.wish-card {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.wish-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-300);
}

.wish-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--neutral-50);
}

.wish-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wish-card:hover .wish-image {
  transform: scale(1.05);
}

.wish-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--secondary-50) 100%);
  color: var(--primary-500);
}

.wish-price-badge {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: var(--success-500);
  color: white;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.wish-priority-badge {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  background: var(--warning-500);
  color: white;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
}

.wish-content {
  padding: var(--space-4);
}

.wish-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--neutral-800);
  margin-bottom: var(--space-2);
  line-height: 1.3;
}

.wish-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.wish-title a:hover {
  color: var(--primary-600);
}

.wish-description {
  font-size: var(--text-sm);
  color: var(--neutral-600);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}

.wish-stats {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.wish-stat {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  color: var(--neutral-600);
}

.wish-stat i {
  color: var(--primary-500);
}

.like-btn {
  background: none;
  border: none;
  color: var(--neutral-400);
  cursor: pointer;
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.like-btn:hover {
  color: var(--red-500);
  background: var(--red-50);
}

.like-btn.liked {
  color: var(--red-500);
}

.status-badge {
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.status-completed {
  background: var(--success-50);
  color: var(--success-600);
}

.status-pending {
  background: var(--warning-50);
  color: var(--warning-600);
}

.wish-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.wish-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.wish-btn-primary {
  background: var(--primary-500);
  color: white;
  border-color: var(--primary-500);
}

.wish-btn-primary:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: white;
}

.wish-btn-outline {
  background: transparent;
  color: var(--primary-600);
  border-color: var(--primary-300);
}

.wish-btn-outline:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-700);
}

/* ===== Hero Ideas Animation ===== */
.hero-ideas-container {
  margin-bottom: var(--space-8);
  position: relative;
}

.hero-ideas-wrapper {
  position: relative;
  min-height: 160px;
  overflow: hidden;
}

.hero-idea {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.hero-idea.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-idea-content {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--secondary-50) 100%);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.hero-idea-content:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-300);
}

.hero-idea-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  margin-top: var(--space-1);
}

.hero-idea-text {
  flex: 1;
}

.hero-idea-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--neutral-800);
  margin: 0 0 var(--space-2) 0;
  line-height: 1.3;
}

.hero-idea-description {
  font-size: var(--text-base);
  color: var(--neutral-600);
  line-height: 1.6;
  margin: 0;
}

.hero-ideas-indicators {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.hero-idea-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: var(--neutral-300);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.hero-idea-indicator:hover {
  background: var(--primary-400);
  transform: scale(1.1);
}

.hero-idea-indicator.active {
  background: var(--primary-500);
  transform: scale(1.2);
}

/* Desktop styles */
@media (min-width: 768px) {
  .hero-ideas-wrapper {
    min-height: 180px;
  }
  
  .hero-idea-content {
    padding: var(--space-8);
  }
  
  .hero-idea-icon {
    font-size: 3rem;
  }
  
  .hero-idea-title {
    font-size: var(--text-2xl);
  }
  
  .hero-idea-description {
    font-size: var(--text-lg);
  }
  
  .hero-ideas-indicators {
    margin-top: var(--space-6);
  }
  
  .hero-idea-indicator {
    width: 14px;
    height: 14px;
  }
}

/* Mobile optimization */
@media (max-width: 767px) {
  .hero-idea-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-3);
  }
  
  .hero-idea-icon {
    margin-top: 0;
  }
}