:root {
  --green-light: #eaf5ea;
  --green-mid: #a8d5a8;
  --green-dark: #4c8c4a;
  --text-main: #2f3b2f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
  background: var(--green-light);
  color: var(--text-main);
  padding-bottom: 165px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--green-dark);
  color: #fff;
  padding: 14px 92px;
  text-align: center;
}

.home-button {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-size: 0.85rem;
  font-weight: bold;
  cursor: pointer;
}

.home-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

#thanks-home-button {
  display: block;
  margin: 24px auto 0;
  padding: 12px 36px;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
}

.site-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.customer-section {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-section label {
  font-weight: bold;
}

.required-badge {
  background: #e0604c;
  color: #fff;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.customer-section input {
  padding: 10px;
  border: 1px solid var(--green-mid);
  border-radius: 6px;
  font-size: 1rem;
}

.category-block {
  margin-bottom: 28px;
}

.category-title {
  background: var(--green-mid);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 1.1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.category-title::after {
  content: "▾";
  transition: transform 0.2s ease;
}

.category-block.collapsed .category-title::after {
  transform: rotate(-90deg);
}

.category-block.collapsed .product-grid {
  display: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.product-card .product-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background: #f4faf4;
  border-radius: 6px;
}

.product-name {
  font-size: 0.95rem;
  font-weight: bold;
  margin: 4px 0 0;
}

.product-capacity {
  font-size: 0.8rem;
  color: #5a6a5a;
}

.product-price {
  font-size: 1rem;
  font-weight: bold;
  color: var(--green-dark);
}

.product-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-qty-row label {
  font-size: 0.85rem;
}

.product-qty-row select {
  padding: 6px;
  border-radius: 6px;
  border: 1px solid var(--green-mid);
  font-size: 1rem;
}

.product-subtotal {
  font-size: 0.85rem;
  text-align: right;
  color: #5a6a5a;
}

.order-summary {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid var(--green-mid);
  padding: 12px 20px;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.1);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
  font-size: 1rem;
  padding: 2px 0;
}

#order-button {
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 8px auto 0;
  padding: 12px;
  font-size: 1.05rem;
  font-weight: bold;
  color: #fff;
  background: var(--green-dark);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

#order-button:disabled {
  background: #b9c9b9;
  cursor: not-allowed;
}

#order-message {
  max-width: 900px;
  margin: 6px auto 0;
  text-align: center;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.screen {
  max-width: 700px;
  margin: 24px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
}

.screen h2 {
  margin-top: 0;
}

.confirm-name {
  font-weight: bold;
}

.confirm-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.confirm-item-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--green-light);
  font-size: 0.95rem;
}

.confirm-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.confirm-buttons button {
  flex: 1;
  padding: 12px;
  font-size: 1.05rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

#confirm-submit-button {
  color: #fff;
  background: var(--green-dark);
}

.secondary-button {
  color: var(--green-dark);
  background: #fff;
  border: 1px solid var(--green-mid) !important;
}

#confirm-message {
  text-align: center;
  margin-top: 10px;
}

.thanks-message {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--green-dark);
  padding: 30px 0;
}

.price-note {
  margin: 2px 0 8px;
  font-size: 0.75rem;
  color: #6b7a6b;
  text-align: right;
}

.no-image {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f1;
  color: #8a988a;
  font-size: 0.8rem;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .site-header {
    padding: 12px 10px 12px 104px;
    text-align: left;
  }
  .site-header h1 {
    font-size: 0.95rem;
    line-height: 1.35;
  }
}

.line-status {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #06a33a;
}

.thanks-order-no {
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  margin: 12px 0 0;
}

.thanks-line-note {
  text-align: center;
  font-size: 0.9rem;
  color: #5a6a5a;
  margin: 8px 0 0;
}
