/* Cool Minimalistic UI */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Montserrat:wght@700&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #23272f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}
.brand-logo {
  position: absolute;
  left: 2rem;
  top: 1.5rem;
  font-family: 'Montserrat', 'Inter', Arial, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ff3366;
  letter-spacing: 0.03em;
  background: #fff2f6cc;
  padding: 0.3rem 1.1rem 0.3rem 0.9rem;
  border-radius: 1.2rem;
  box-shadow: 0 2px 8px rgba(255,51,102,0.07);
  z-index: 2;
}
header {
  position: relative;
  background: linear-gradient(90deg, #6366f1 0%, #60a5fa 100%);
  padding: 2.5rem 1rem 1.5rem 1rem;
  box-shadow: 0 2px 16px rgba(99,102,241,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  border-radius: 0 0 1.5rem 1.5rem;
}
header h1 {
  font-family: 'Montserrat', 'Inter', 'Segoe UI', Arial, sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(99,102,241,0.10);
}
.header-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}
#searchInput {
  padding: 0.6rem 1.2rem;
  border: 1.5px solid #e0e7ff;
  border-radius: 12px;
  font-size: 1.08rem;
  width: 240px;
  background: #f6f7f9;
  color: inherit;
  transition: border 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(99,102,241,0.04);
}
#searchInput:focus {
  border: 1.5px solid #6366f1;
  outline: none;
  box-shadow: 0 2px 8px rgba(99,102,241,0.10);
}
#darkModeToggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.4rem 0.7rem;
  transition: background 0.2s, color 0.2s;
  color: #fff;
  box-shadow: 0 1px 4px rgba(99,102,241,0.08);
}
#darkModeToggle:hover {
  background: #6366f1;
  color: #fff;
}
main {
  flex: 1;
  padding: 2.5rem 1rem 1.5rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.2rem;
}
.product-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(99,102,241,0.08);
  padding: 1.5rem 1.2rem 1.5rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1.5px solid #f0f0f0;
  transition: box-shadow 0.22s, border 0.18s, transform 0.22s;
  will-change: transform, box-shadow;
}
.product-card:hover {
  box-shadow: 0 12px 36px rgba(99,102,241,0.18);
  border: 1.5px solid #6366f1;
  transform: translateY(-6px) scale(1.03);
}
.product-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 1.1rem;
  border-radius: 10px;
  background: #f6f7f9;
  box-shadow: 0 1px 4px rgba(99,102,241,0.04);
}
.product-title {
  font-size: 1.13rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #23272f;
}
.product-desc {
  font-size: 1.01rem;
  color: #6b7280;
  margin-bottom: 0.7rem;
  text-align: center;
}
.product-price {
  font-size: 1.09rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}
.buy-btn {
  background: linear-gradient(90deg, #6366f1 0%, #60a5fa 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.01em;
  box-shadow: 0 1px 4px rgba(99,102,241,0.08);
}
.buy-btn:hover {
  background: linear-gradient(90deg, #60a5fa 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.13);
}
footer {
  background: #fff;
  color: #888;
  text-align: center;
  padding: 1.3rem 1rem 1.3rem 1rem;
  font-size: 1.01rem;
  margin-top: 2.5rem;
  border-top: 1px solid #ececec;
  border-radius: 1rem 1rem 0 0;
}

/* Cool Dark mode styles */
body.dark {
  background: linear-gradient(135deg, #232272 0%, #23272a 100%);
  color: #e6e6e6;
}
body.dark header {
  background: linear-gradient(90deg, #232272 0%, #23272a 100%);
  color: #e6e6e6;
  box-shadow: 0 2px 16px rgba(99,102,241,0.18);
}
body.dark header h1 {
  color: #fff;
  text-shadow: 0 2px 8px rgba(99,102,241,0.18);
}
body.dark #searchInput {
  background: #23272a;
  color: #e6e6e6;
  border: 1.5px solid #23272a;
  box-shadow: 0 1px 4px rgba(99,102,241,0.10);
}
body.dark #searchInput:focus {
  border: 1.5px solid #60a5fa;
  box-shadow: 0 2px 8px rgba(99,102,241,0.18);
}
body.dark #darkModeToggle {
  background: #23272a;
  color: #a5b4fc;
}
body.dark #darkModeToggle:hover {
  background: #181a1b;
  color: #fff;
}
body.dark .product-card {
  background: #23272a;
  color: #e6e6e6;
  box-shadow: 0 2px 16px rgba(99,102,241,0.18);
  border: 1.5px solid #23272a;
}
body.dark .product-card:hover {
  box-shadow: 0 12px 36px rgba(99,102,241,0.22);
  border: 1.5px solid #60a5fa;
}
body.dark .product-title {
  color: #fff;
}
body.dark .product-desc {
  color: #b3b3b3;
}
body.dark .product-price {
  color: #a5b4fc;
}
body.dark .buy-btn {
  background: linear-gradient(90deg, #a5b4fc 0%, #60a5fa 100%);
  color: #23272a;
  box-shadow: 0 1px 4px rgba(99,102,241,0.13);
}
body.dark .buy-btn:hover {
  background: linear-gradient(90deg, #60a5fa 0%, #a5b4fc 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99,102,241,0.22);
}
body.dark footer {
  background: #181a1b;
  color: #b3b3b3;
  border-top: 1px solid #23272a;
  border-radius: 1rem 1rem 0 0;
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.2rem;
  }
  .product-grid {
    gap: 1.1rem;
  }
  main {
    padding: 1.2rem 0.2rem 0.7rem 0.2rem;
  }
  .product-card {
    padding: 0.9rem 0.5rem 1rem 0.5rem;
  }
  #searchInput {
    width: 120px;
    font-size: 0.97rem;
  }
  .brand-logo {
    left: 0.7rem;
    top: 0.7rem;
    font-size: 1rem;
    padding: 0.18rem 0.7rem 0.18rem 0.6rem;
  }
}