/* ========================================
   UDWAY Design System - Shared Styles
   ======================================== */

:root {
  /* Colors */
  --color-canvas: #fdfcf8;
  --color-surface: #f1efe9;
  --color-ink: #1c1917;
  --color-ink-subtle: #4a4a4a;
  --color-amber: #f59e0b;
  --color-amber-dark: #d97706;
  --color-forest: #365c2d;
  --color-red: #ef4444;

  /* Shadows */
  --shadow-soft: 0 10px 40px -10px rgba(28, 25, 23, 0.08);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.3);
  --shadow-glow-hover: 0 0 32px rgba(245, 158, 11, 0.5);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 999px;
}

/* Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-canvas);
  color: var(--color-ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

[x-cloak] {
  display: none !important;
}

/* Typography */
.font-display {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-brand {
  font-family: "Satoshi", "Inter", sans-serif;
}

/* Glass Morphism */
.glass-panel {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-light {
  background: rgba(253, 252, 248, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* Gradient Overlays */
.gradient-overlay {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.3) 40%,
    transparent 100%
  );
}

.gradient-left {
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    transparent 100%
  );
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--color-amber);
  color: var(--color-ink);
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--color-amber-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: transparent;
  color: var(--color-ink);
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-ink);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--color-ink);
  color: var(--color-canvas);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  color: var(--color-ink);
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-surface);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-amber);
}

/* Cards */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.card-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.7s ease;
}

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

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-pill);
}

.badge-amber {
  background: var(--color-amber);
  color: white;
}

.badge-forest {
  background: var(--color-forest);
  color: white;
}

.badge-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Heart Button */
.heart-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.heart-btn:hover {
  transform: scale(1.1);
  background: white;
}

.heart-btn:hover svg {
  color: var(--color-amber);
  fill: var(--color-amber);
}

/* Category Circles */
.cat-circle {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.cat-circle:hover {
  background: white;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(28, 25, 23, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.cat-circle:hover svg {
  color: var(--color-amber);
}

/* Tabs */
.tab-btn {
  padding: 16px 24px;
  font-weight: 500;
  color: var(--color-ink);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  border-bottom-color: var(--color-surface);
}

.tab-btn.active {
  color: var(--color-amber);
  border-bottom-color: var(--color-amber);
}

/* Form Inputs */
.input {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-surface);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  transition: all 0.3s ease;
}

.input:focus {
  outline: none;
  background: white;
  border-color: var(--color-amber);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

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

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

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Hide scrollbar */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Safe area for mobile nav */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Smooth image transitions */
.smooth-image {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Text clamp */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-wrap-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}
