
/* Base settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
               Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}
header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
header h1 {
  font-size: 2.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
header p {
  font-size: 1rem;
}
main {
  display: flex;
  flex-direction: column;
}
.product {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
  margin: 0.5rem 1rem;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.product img {
  max-width: 350px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}
.product .details {
  text-align: center;
}
.product .details h2 {
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.product .details p {
  margin-bottom: 1rem;
}
.product .details button {
  padding: 0.75rem 1.5rem;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s ease;
}
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.875rem;
}

/* Light mode */
@media (prefers-color-scheme: light) {
  body {
    background: #f5f5f7;
    color: #1d1d1f;
  }
  header p {
    color: #6e6e73;
  }
  .product {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  .product .details p {
    color: #6e6e73;
  }
  .product .details button {
    background: #0070c9;
    color: #ffffff;
  }
  .product .details button:hover {
    background: #005bb5;
  }
  footer {
    color: #6e6e73;
  }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body {
    background: #1c1c1e;
    color: #f5f5f7;
  }
  header p {
    color: #8e8e93;
  }
  .product {
    background: #2c2c2e;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }
  .product .details p {
    color: #8e8e93;
  }
  .product .details button {
    background: #0a84ff;
    color: #ffffff;
  }
  .product .details button:hover {
    background: #0060df;
  }
  footer {
    color: #8e8e93;
  }
}
