body {
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  background: #fafafa;
}

/* ===== Header & Footer ===== */
header {
  background: #f5f5f5;
  padding: 12px 16px;
  text-align: center;
}

header a img {
  max-height: 60px;
  max-width: 200px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto 10px auto;
}

nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  text-align: center;
}

nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
  display: inline-block;
}

.contact {
  text-align: center;
  padding: 15px;
  background: #fff;
}

footer {
  background: #036635;
  color: #fff;
  text-align: center;
  padding: 20px;
  margin-top: 20px;
}

/* ===== Grid Produk (pusat + auto-resize) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;   /* lebar maksimum katalog */
  margin: 0 auto;      /* supaya grid selalu di tengah */
  padding: 20px;
}

/* ===== Card Produk ===== */
.product {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  padding: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.product img {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #fafafa;
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.product:hover img {
  transform: scale(1.05);
}

.product h3 {
  margin: 6px 0;
  font-size: 16px;
}

.price {
  font-weight: bold;
  color: #036635;
  margin: 4px 0 10px 0;
}

/* ===== Tombol ===== */
.buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: auto;
  gap: 6px;
}

.buttons a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  text-align: center;
  min-width: 100px;
  transition: background 0.3s ease, transform 0.2s ease;
}

.buttons a.shopee { background: #ff6600; }
.buttons a.tokopedia { background: #0dbc79; }
.buttons a.detail { background: #333; }

.buttons a:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.buttons a.shopee:hover { background: #e65500; }
.buttons a.tokopedia:hover { background: #0aa267; }
.buttons a.detail:hover { background: #111; }

main { min-height: 60vh; }

h1 a {
  color: inherit;
  text-decoration: none;
}

/* ===== Responsive Tablet ===== */
@media screen and (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 10px;
  }

  header a img {
    max-height: 40px;
    max-width: 150px;
  }

  .buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .buttons a {
    width: 100%;
  }
}

/* ===== Responsive HP kecil ===== */
@media screen and (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }

  header a img {
    max-height: 35px;
    max-width: 120px;
  }
}




