/* Google Font */
body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  line-height: 1.6;
  color: #333;
  scroll-behavior: smooth;
}

/* Header */
header {
  background: #111;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
header h1 {
  font-size: 1.5rem;
}
nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 1rem;
}
nav a:hover {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  background: #f4f4f4;
  text-align: center;
  padding: 4rem 2rem;
}
.hero h2 {
  font-size: 2rem;
}
.hero .btn {
  display: inline-block;
  margin-top: 1rem;
  background: #333;
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  transition: background 0.3s;
}
.hero .btn:hover {
  background: #555;
}

/* Products */
.products {
  padding: 3rem 2rem;
  background: #fff;
}
.products h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.product-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}
.product-card {
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 8px;
  width: 250px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}
.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.product-card img {
  width: 100%;
  height: auto;
}
.product-card h3 {
  font-size: 1.1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.details-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  margin-top: 0.7rem;
  border-radius: 4px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  transition: background 0.3s, transform 0.3s;
}
.details-btn:hover {
  background: #0056b3;
  transform: scale(1.05);
}
.price {
  font-weight: bold;
  margin-top: 0.5rem;
}

/* Contact */
.contact {
  background: #f0f0f0;
  padding: 3rem 2rem;
}
.contact h2 {
  text-align: center;
  margin-bottom: 1rem;
}
form {
  max-width: 500px;
  margin: auto;
  display: flex;
  flex-direction: column;
}
form label {
  margin: 0.5rem 0 0.2rem;
}
form input,
form textarea {
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
form button {
  margin-top: 1rem;
  padding: 0.8rem;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
}
form button:hover {
  background: #555;
}
#formMessage {
  margin-top: 1rem;
  font-weight: bold;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  text-align: center;
}
#formMessage.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
footer {
  background: #111;
  color: #fff;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
footer .social-icons {
  display: flex;
  gap: 1rem;
}
footer .social-icons a {
  color: #fff;
  font-size: 1.5rem;
}
footer .social-icons a:hover {
  color: #ccc;
}
footer p {
  margin: 0;
}
@media (min-width: 600px) {
  footer {
    flex-direction: row;
    justify-content: space-between;
    padding: 1.5rem 3rem;
  }
}

/* Scroll-to-top */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  background: #007bff;
  color: white;
  border: none;
  padding: 0.7rem;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}
#scrollTopBtn:hover {
  background: #0056b3;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
}
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 90%;
  max-width: 400px;
  border-radius: 8px;
}
.close {
  color: #aaa;
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #000;
}

/* Responsive */
@media (max-width: 600px) {
  .product-grid {
    flex-direction: column;
    align-items: center;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  nav a {
    margin: 0.5rem 0;
  }
}