
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #eef2ff, #fce7f3);
  color: #1f2937;
  min-height: 100vh;
}

.hero {
  text-align: center;
  padding: 40px 20px;
  color: white;
  background: linear-gradient(120deg, #4338ca, #9333ea, #ec4899);
}

.hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  margin-bottom: 12px;
  text-shadow: 2px 3px 5px #312e81;
}

.hero p {
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

.toolbar {
  background: white;
  padding: 25px;
  border-radius: 18px;
  box-shadow: 0 8px 25px #312e8120;
}

.toolbar h2 {
  color: #7c3aed;
  margin-bottom: 20px;
}

.toolbar label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.input-row,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 15px;
}

input {
  flex: 1;
  min-width: 200px;
  padding: 13px;
  border: 2px solid #ddd6fe;
  border-radius: 9px;
  font-size: 15px;
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

button {
  border: none;
  padding: 13px 18px;
  border-radius: 9px;
  background: #6d28d9;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.25s, filter 0.25s;
}

button:hover {
  transform: translateY(-2px);
  filter: brightness(0.9);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.secondary {
  background: #0f766e;
}

.export {
  background: #ea580c;
}

#status {
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 25px 0;
}

.stat-box {
  padding: 22px;
  border-radius: 15px;
  background: linear-gradient(135deg, #dbeafe, #f3e8ff);
  box-shadow: 0 5px 15px #312e8110;
}

.stat-box span {
  display: block;
  color: #6d28d9;
  font-weight: bold;
  margin-bottom: 10px;
}

.stat-box strong {
  color: #312e81;
  font-size: 28px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 25px;
  perspective: 1000px;
}

.product-card {
  min-width: 0;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px #312e8120;
  transition: transform 0.35s, box-shadow 0.35s;
  transform-style: preserve-3d;
}

.product-card:hover {
  transform: rotateY(3deg) rotateX(2deg) translateY(-6px);
  box-shadow: 0 20px 35px #6d28d944;
}

.product-image {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe, #fce7f3);
  color: #6b7280;
  text-align: center;
}

.product-image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 15px;
  object-fit: contain;
  transition: transform 0.4s;
}

.product-card:hover .product-image img {
  transform: scale(1.08) rotate(-2deg);
}

.product-info {
  padding: 20px;
}

.product-title {
  color: #6d28d9;
  background: linear-gradient(90deg, #ede9fe, #fce7f3);
  padding: 10px;
  border-radius: 7px;
  font-size: 18px;
  line-height: 1.4;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.product-price {
  font-size: 23px;
  font-weight: bold;
  color: #059669;
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.product-rating {
  color: #b45309;
  margin-bottom: 10px;
  font-weight: bold;
}

.product-id {
  color: #64748b;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 15px;
  color: #64748b;
}

footer {
  text-align: center;
  padding: 25px;
  margin-top: 35px;
  background: #312e81;
  color: white;
}

@media (max-width: 600px) {
  .hero {
    padding: 30px 15px;
  }

  .container {
    padding: 0 12px;
  }

  .toolbar {
    padding: 18px;
  }

  .input-row {
    flex-direction: column;
  }

  .input-row input,
  .input-row button {
    width: 100%;
  }

  .stats {
    gap: 10px;
  }

  .stat-box {
    padding: 15px;
  }

  .stat-box strong {
    font-size: 23px;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .product-card:hover,
  button:hover {
    transform: none;
  }
}
