/*
Theme Name: Serum Child 2025
Template: serum_tcd096
Version: 1.0
*/

/* ========== ご注文フォーム調整 ========== */
.product-item {
  margin: 2em auto;
  padding: 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  max-width: 600px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.product-controls {
  display: flex;
  gap: 1em;
  flex-wrap: wrap;
}
input.price-field,
input[readonly] {
  width: 120px;
  max-width: 100%;
  padding: 4px 8px;
  box-sizing: border-box;
}
#total-price {
  font-size: 1.2em;
  font-weight: bold;
  margin-top: 1em;
}
@media (max-width: 768px) {
  .product-item {
    max-width: 100%;
    padding: 1em;
  }
  .product-image {
    max-width: 100%;
    height: auto;
  }
  input.price-field,
  input[readonly] {
    width: 100%;
  }
  .product-controls {
    flex-direction: column;
  }
}

/* 注文画像をやや大きめに */
.product-item img.product-image,
.wpcf7-form img.product-image {
  width: 220px !important;
  max-width: none !important;
  height: auto !important;
  display: block;
  margin-bottom: 0.5em;
}
.product-item input[type="number"],
.product-item input[type="text"][readonly],
.wpcf7-form input[type="number"],
.wpcf7-form input[type="text"][readonly],
input.price-field {
  width: 120px !important;
  max-width: 120px !important;
}
@media (max-width: 768px) {
  .product-item img.product-image,
  .wpcf7-form img.product-image {
    width: 100% !important;
    max-width: 100% !important;
  }
  .product-item input[type="number"],
  .product-item input[type="text"][readonly],
  .wpcf7-form input[type="number"],
  .wpcf7-form input[type="text"][readonly],
  input.price-field {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 住所欄の高さ */
textarea[name="address"] {
  height: 2.5em !important;
  resize: none !important;
}

/* ========== スマホでのはみ出し対策 ========== */
/* 横スクロールの防止のみを残す */
html, body {
  overflow-x: hidden !important;
}

/* 画像・iframe は親テーマの挙動を優先させるため、max-width:100% の強制を外す */

/* 見出しや本文の折返し */
h1, h2, h3, p, .catchphrase, .site-description {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100% !important;
  box-sizing: border-box;
}

/* カレンダー・アクセス地図の横スクロール防止 */
#calendar,
.access,
.map,
.wpgmza_map {
  max-width: 100% !important;
  overflow-x: auto;
}
