/* ========== Index Page Styles ========== */

/* ========== Hero Section ========== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  background: linear-gradient(135deg, #FFFFFF 0%, #FFF1F2 50%, #FFE4E6 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 100% 80% at 80% 10%, rgba(244,63,94,0.08) 0%, transparent 50%),
    radial-gradient(ellipse 80% 60% at 10% 90%, rgba(251,113,133,0.1) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(253,164,175,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='1' fill='%23F43F5E' fill-opacity='0.06'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--gray-800);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(244,63,94,0.08);
  border: 1px solid rgba(244,63,94,0.15);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--red-600);
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  background: var(--red-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--gray-900);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 18px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 14px 28px;
  font-size: 15px;
  border-radius: var(--radius-lg);
}

.btn-hero-primary {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: var(--white);
  box-shadow: var(--shadow-pink);
  border: none;
}

.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(244,63,94,0.30);
}

.btn-hero-ghost {
  background: var(--white);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-hero-ghost:hover {
  border-color: var(--gray-300);
  box-shadow: var(--shadow-md);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--gray-200);
}

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

.stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--gray-900);
}

.stat-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* ========== Services Section ========== */
.services {
  padding: 100px 0;
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--red-50);
  color: var(--red-500);
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--gray-500);
  max-width: 600px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-card {
  position: relative;
  padding: 40px 32px;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-xl);
  transition: all 0.4s ease;
  overflow: hidden;
  text-align: center;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red-500), var(--red-600));
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(244,63,94,0.03) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s;
}

.service-card:hover {
  border-color: transparent;
  box-shadow: 0 20px 50px rgba(244,63,94,0.12);
  transform: translateY(-8px);
}

.service-card:hover::before {
  opacity: 1;
}

.service-card:hover::after {
  opacity: 1;
}

.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(244,63,94,0.25);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(244,63,94,0.35);
}

.service-icon svg {
  width: 36px;
  height: 36px;
  color: var(--white);
}

.service-card h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.service-card p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.8;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--red-500);
  position: relative;
  z-index: 1;
}

.service-link:hover {
  gap: 10px;
}

/* ========== Products Section (Source Code Mall) ========== */
.products {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.product-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s ease;
  border: 1px solid var(--gray-100);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  border-color: transparent;
}

.product-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  background: var(--red-500);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
}

.product-badge.new {
  background: linear-gradient(135deg, var(--gray-700), var(--gray-800));
}

.product-badge.hot {
  background: linear-gradient(135deg, var(--red-400), var(--red-500));
}

.product-info {
  padding: 20px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--red-500);
}

.product-price span {
  font-size: 14px;
  font-weight: 500;
}

.product-sales {
  font-size: 13px;
  color: var(--gray-400);
}

.view-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

/* ========== Features Section ========== */
.features {
  padding: 100px 0;
  background: var(--white);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.feature-item {
  text-align: center;
  padding: 24px;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--red-400), var(--red-500));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: var(--shadow-pink);
}

.feature-icon svg {
  width: 32px;
  height: 32px;
  color: var(--white);
}

.feature-item h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 14px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ========== CTA Section ========== */
.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 50%, #FECDD3 100%);
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(244,63,94,0.08), transparent);
}

.cta-content {
  position: relative;
  text-align: center;
  color: var(--gray-800);
}

.cta h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--gray-900);
}

.cta p {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 32px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .service-card {
    padding: 32px 24px;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .hero-stats {
    gap: 24px;
  }
  
  .stat-value {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .product-info {
    padding: 16px;
  }
  
  .product-title {
    font-size: 15px;
  }
  
  .product-price {
    font-size: 18px;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
}
