/* ===== CSS Variables ===== */
:root {
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --accent-color: #06b6d4;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --background: #ffffff;
  --background-secondary: #f8fafc;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

body.loaded {
  opacity: 1;
}

/* ===== Container ===== */
.container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}



/* ===== Hero Section ===== */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1000px;
  text-align: center;
  position: relative;
  z-index: 10;
}

.hero-text {
  margin-bottom: 3rem;
  animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px);
  animation: slideInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.title-line:nth-child(1) { animation-delay: 0.2s; }
.title-line:nth-child(2) { animation-delay: 0.4s; }
.title-line:nth-child(3) { animation-delay: 0.6s; }

.highlight {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 0.8s forwards;
}

/* ===== Shopping Cart Animation ===== */
.cart-animation {
  position: relative;
  width: 320px;
  height: 200px;
  margin: 4rem auto;
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards;
}

.cart {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: bounce 2s ease-in-out infinite;
}

.cart-body {
  width: 96px;
  height: 64px;
  background: var(--primary-color);
  border-radius: 12px 12px 6px 6px;
  position: relative;
}

.cart-body::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 12px;
  right: 12px;
  height: 6px;
  background: var(--primary-dark);
  border-radius: 3px;
}

.cart-handle {
  position: absolute;
  top: -24px;
  right: -24px;
  width: 40px;
  height: 32px;
  border: 4px solid var(--primary-color);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

.cart-wheel {
  position: absolute;
  width: 19px;
  height: 19px;
  background: var(--text-primary);
  border-radius: 50%;
  bottom: -10px;
  animation: rotate 1s linear infinite;
}

.wheel-1 { left: 13px; }
.wheel-2 { right: 13px; animation-delay: 0.5s; }

.items {
  position: absolute;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
}

.item {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  opacity: 0;
  animation: itemFloat 3s ease-in-out infinite;
}

.item-1 {
  background: var(--success-color);
  left: -32px;
  animation-delay: 0s;
}

.item-2 {
  background: var(--warning-color);
  left: -12px;
  animation-delay: 1s;
}

.item-3 {
  background: var(--accent-color);
  left: 8px;
  animation-delay: 2s;
}



/* ===== Floating Elements ===== */
.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.float-element {
  position: absolute;
  font-size: 2rem;
  opacity: 0.1;
  animation: floatAround 20s linear infinite;
}

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

.element-2 {
  top: 60%;
  right: 15%;
  animation-delay: -5s;
}

.element-3 {
  top: 30%;
  right: 25%;
  animation-delay: -10s;
}

.element-4 {
  bottom: 30%;
  left: 20%;
  animation-delay: -15s;
}

/* ===== Features Preview ===== */
.features-preview {
  padding: 4rem 2rem;
  background: var(--background);
  opacity: 0;
  animation: fadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) 1.4s forwards;
}

.features-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  background: var(--background-secondary);
  border-radius: var(--border-radius-lg);
  text-align: center;
  transition: var(--transition);
  border: 1px solid var(--border-color);
  transform: translateY(20px);
  opacity: 0;
  animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.feature-card:nth-child(1) { animation-delay: 1.6s; }
.feature-card:nth-child(2) { animation-delay: 1.8s; }
.feature-card:nth-child(3) { animation-delay: 2s; }

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: pulse 2s ease-in-out infinite;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-card p {
  color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
  padding: 2rem;
  text-align: center;
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, -50%);
  }
  40% {
    transform: translate(-50%, -60%);
  }
  60% {
    transform: translate(-50%, -55%);
  }
}

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

@keyframes itemFloat {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  50% {
    opacity: 1;
    transform: translateY(-20px);
  }
  100% {
    opacity: 0;
    transform: translateY(-40px);
  }
}

@keyframes floatAround {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 0.1;
  }
  25% {
    transform: translate(30px, -30px) rotate(90deg);
    opacity: 0.2;
  }
  50% {
    transform: translate(-20px, -60px) rotate(180deg);
    opacity: 0.1;
  }
  75% {
    transform: translate(-50px, -30px) rotate(270deg);
    opacity: 0.15;
  }
  100% {
    transform: translate(0, 0) rotate(360deg);
    opacity: 0.1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .hero {
    padding: 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .cart-animation {
    width: 240px;
    height: 150px;
    margin: 2rem auto;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .features-preview {
    padding: 2rem 1rem;
  }
  
  .float-element {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .cart-animation {
    width: 200px;
    height: 130px;
  }
}

/* ===== Performance Optimizations ===== */
* {
  will-change: auto;
}

.hero-title,
.cart,
.float-element,
.feature-card {
  will-change: transform;
}

/* ===== Print Styles ===== */
@media print {
  .floating-elements,
  .cart-animation {
    display: none;
  }
}