html {
  -webkit-text-size-adjust: 100%;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px auto;
  max-width: 1400px;
  padding: 0 20px;
  position: relative;
}

.section-title .line {
  width: 300px;
  height: 0;
  border-bottom: 3px dotted #999;
  margin: 0 20px;
}

.section-title .title-content {
  display: flex;
  max-width: 80%;
  align-items: center;
  background-color: rgb(249, 249, 249);
  padding: 0 10px;
}

.section-title .title-text {
  font-size: 1.4em;
  font-weight: bold;
  color: #333;
}

.products-limitpack-container {
  max-width: 900px;
  max-height: auto;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(550px, 1fr));
  gap: 20px;
  position: relative;
  justify-items: center;
}

.product-limit {
  width: 100%;
  max-width: 598px;
  position: relative;
}

.product-image-limited-container {
  width: 100%;
  height: 25%;
  bottom: 10%;
  position: absolute;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  z-index: 10;
}
.product-image-limited-badge-container
{
  width: 100%;
  height: 16%;
  bottom: 90%;
  position: absolute;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  z-index: 10;
}
.product-image-limited {
  width: 100%;
  object-fit: cover;
  height: auto;
  position: relative;
  display: block;
  z-index: 1;
}

.product-image-limited-container h2 {
  position: absolute;
  top: 38%; /* 画像の中央付近 */
  left: 6%;
  font-size: 26px;
  padding: 4px 8px;
  z-index: 3;
  transform: translateY(-50%);
  white-space: nowrap; 
}

.bonus-badge {
  position: absolute;
  top: 5%;
  left: 2%;
  background-color: #e74c3c;
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 5px 10px;
  text-align: center;
  border-radius: 5px;
  z-index: 3;
  white-space: nowrap;
}


.rest-count {
  position: absolute;
  bottom: 30%;
  left: 5%;
  color: rgb(164, 164, 164);
  font-size: 15px;
  font-weight: bold;
  padding: 5px 10px;
  text-align: center;
  z-index: 3;
  transform: translateY(50%);
  white-space: nowrap;
}


.product-image-limited-button-container
{
  width: 100%;
  height: 25%;
  bottom: 10%;
  position: absolute;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  z-index: 10;
}

.rest-pack-count {
  display: block;
  text-align: center;
  font-size: 12px; 
  font-weight: bold; 
  color: rgb(164, 164, 164);
  margin-top: 5px;
  margin-bottom: 5px; 
}

.limited-card button
{
  z-index: 20;
}
.limited-card {
  height: auto;
  width: 100%;
  max-width: 598px;
  aspect-ratio: 2 / 1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.limited-card:hover {
  opacity: 0.95;
}
.product-image-limited {
  z-index: 1; 
}
.limited-card button {
  height: 50px;
  width: 100px;
}
.align-items-center {
  z-index: 10;
}
.pack-button-limited.large-button {
  width: 180px;
  height: 40px;
  background-color: rgb(21, 197, 237);
  color: #fff;
  border: none;
  font-size: 18px;
  border-radius: 24px;
  cursor: pointer;
  font-weight: 600;
  z-index: 5;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(21, 197, 237, 0.3);
  }

  .pack-button-limited.large-button:disabled {
  background-color: #e2e8f0;
  color: #718096;
  white-space: nowrap;
  cursor: not-allowed;
  font-weight: 600;
  box-shadow: none;
  }
  .product-title {
    font-size: clamp(12px, 24px, 24px); 
  }

  .product-restriction {
    font-size: clamp(9px, 16px, 16px); 
    color: #9c9898;
  }

  .remaining-text {
      color: red;
  }

/* デスクトップ用（コンテナを中央に配置） */
@media (min-width: 769px) {
  .section-title {
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 768px) {
  .section-title {
    justify-content: flex-start !important;
    max-width: 100% !important;
    padding: 0 10px !important;
    margin: 40px 0 !important;
  }

  .section-title .line {
    width: 30px;
    margin: 0 5px 0 10px;
  }

  .section-title .title-content {
    margin-left: 0;
  }

  .limited-card {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
  }
  .products-limitpack-container {
    max-width: 598px;
    padding: 10px;
    position: relative;
    grid-template-columns: 1fr;
  }

  .product-limit {
    width: 100%;
    max-width: 100%;
    position: relative;
  }

  .product-image-limited-container {
    width: 100%;
    display: flex;
    position: absolute;
    align-items: flex-end;
    justify-content: center;
    bottom: 10%;
  }
  .limited-card button
  {
    z-index: 20;
  }
  .product-image-limited {
    width: 100%;
    height: auto;
    object-fit: cover; 
  }

  .product-image-limited-container h2 {
    font-size: 15px;
    top: 40%;
    left: 7%;
    transform: translateY(-50%);
  }

  .bonus-badge {
    font-size: 9px;
    top: 4%;
    left: 2%;
  }

  .rest-count {
    font-size: 12px;
    bottom: 25%;
    left: 6%;
    transform: translateY(50%);
  }

  .pack-button-limited.large-button {
    width: 125px;
    height: 30px;
    display: flex; 
    font-size: 14px;
    justify-content: center;
    align-items: center;
    font-weight: bold;
  }

  .product-title {
      font-size: clamp(12px, 14px, 18px);
  }

  .product-restriction {
    font-size: clamp(9px, 12px, 12px); 
  color: #9c9898;
  }


}
