body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  background: #f5f7fb;
}

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 100;
  box-sizing: border-box;
}

.title {
  font-size: 16px;
  font-weight: bold;
}

.cart {
  position: relative;
  font-size: 22px;
  cursor: pointer;
}

/* バッジ */
.badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: red;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
}

/* コンテナ */

.container {
  padding: 72px 16px 16px; /* ヘッダー分余白 */
}

h1 {
  font-size: 20px;
  margin-bottom: 5px;
  text-align: center;
}
h2 {
  font-size: 16px;
  /* margin-bottom: 20px; */
  text-align: center;
}
h3 {
  font-size: 14px;
  /* margin-bottom: 30px; */
  text-align: center;
}
p {
  font-size: 12px;
  color: #666;
  text-align: center;
}

/* グリッド */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

/* カード */
.card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: 0.2s;
}

.card:active {
  transform: scale(0.97);
}

.card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.card-body {
  padding: 10px;
}

.name {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.price {
  color: #2a7cff;
  font-size: 13px;
  font-weight: bold;
}
.desc {
  font-size: 12px;
  color: #666;
  margin: 6px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* ←2行でカット */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* モーダル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  /* opacity: 0;
  pointer-events: none;
  transition: 0.2s; */
}

.modal-content {
  width: 90%;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}

.modal img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.modal-body {
  padding: 16px;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

.quantity {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 12px 0;
  gap: 10px;
}

.quantity button {
  width: 32px;
  height: 32px;
  border: none;
  background: #eee;
  border-radius: 8px;
  font-size: 18px;
}

.add-btn {
  width: 100%;
  padding: 12px;
  border: none;
  background: #2a7cff;
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
}

#modalPrice {
  color: #2a7cff;
  font-size: 18px;
  font-weight: bold;
  margin-top: 8px;
}

#totalPrice,
#confirmTotal {
  color: #2a7cff;
  font-size: 18px;
  font-weight: bold;
  margin-top: 8px;
}

/* スマホ最適化 */
@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
