/* style.css */
:root {
  --primary-bg: #FFF8F2;
  --accent: #E3D5CA;
  --text-color: #333;
  --font-family: 'Dancing Script', cursive;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.6;
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar {
  position: sticky;
  top: 0;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.navbar.hide {
  transform: translateY(-100%);
}

.navbar nav {
  display: flex;
  justify-content: center;
  padding: 10px 0px;
}

.navbar button {
  border: none;
  background: none;
  margin: 0px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 20px;
  border-right: 1px solid #ccc;
  padding: 5px 20px;
}

.navbar button:first-child {
  border-left: 1px solid #ccc;
}

.section {
  padding: 0px;
  /* border-bottom: 1px solid #eee; */
}

.home .banner {
  height: auto;
  background-color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 32px;
}

p {
  text-align: center;
}

#about-text, #story-text {
  white-space: pre-wrap;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.product-item {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-align: center;
}

.product-item img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}

.price {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: var(--accent);
}

.contact {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 20px;
}

.contact-link {
  display: inline-block;
  padding: 10px 15px;
  background: var(--accent);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-color);
  font-size: 16px;
}

.contact-link:hover {
  opacity: 0.8;
}

@media (max-width: 400px) {
  .navbar nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 兩欄 */
    gap: 5px 0px; /* 元素之間的間距，可自行調整 */
    padding: 10px;
  }

  .navbar button {
    padding: 10px;
    text-align: center;
  }

  .navbar button:nth-child(odd) {
    border-left: 1px solid #ccc;
  }

  .navbar button:nth-child(even) {
    border-right: 1px solid #ccc;
  }

  .contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    justify-items: center;
  }

  .section {
    padding: 40px 10px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}