/* 部分テンプレート(利用規約) */
.term_label {
  font-size: 14px;
  display: -webkit-box;
}
.term_label > a {
  color: #386F81;
}

/* ecforce側からAJAXで返されるモーダルのデザイン用CSS(Smartphone) */
@media screen and (max-width: 480px) {
  .modal-scrollable {
    position: fixed;
    top: 0;
  }
  .modal-scrollable .modal {
    padding: 20px 10%;
    overflow-y: scroll;
    max-height: 100vh;
  }
  .modal-scrollable .modal .modal-header {
    text-align: right;
  }
  .modal-scrollable .modal .modal-header .close {
    font-size: 30px;
  }
  .modal-scrollable .modal .modal-title {
    font-size: 18px;
    text-align: center;
    font-weight: bold;
  }
  .modal-scrollable .modal .modal-body {
    margin: 30px 0;
  }
  .modal-scrollable .modal .modal-body p {
    margin: 5px 0;
    font-size: 13px;
  }
  .modal-scrollable .modal .modal-body form {
    margin: 10px 0;
  }
  .modal-scrollable .modal .modal-body form .form-group {
    margin: 15px 0;
  }
  .modal-scrollable .modal .modal-body form label {
    font-size: 15px;
    font-weight: bold;
  }
  .modal-scrollable .modal .modal-body form input {
    border: solid 1px #ddd;
    font-size: 16px;
    width: 100%;
    padding: 10px;
    margin-top: 5px;
  }
  .modal-scrollable .modal .modal-body form a {
    background: #386F81;
    color: #fff;
    padding: 15px;
    width: 100%;
    display: block;
    text-align: center;
  }
  .modal-scrollable .modal .modal-body form a.disabled {
    background: #aaa;
    cursor: default;
  }
}

/* ecforce側からAJAXで返されるモーダルのデザイン用CSS(PC) */
@media screen and (min-width: 480px) {
  .modal-scrollable {
    position: fixed;
    top: 0;
  }
  .modal-scrollable .modal {
    padding: 60px 25%;
  }
  .modal-scrollable .modal .modal-header {
    text-align: right;
  }
  .modal-scrollable .modal .modal-header .close {
    font-size: 30px;
  }
  .modal-scrollable .modal .modal-title {
    font-size: 20px;
    text-align: center;
    font-weight: bold;
  }
  .modal-scrollable .modal .modal-body {
    margin: 30px 0;
  }
  .modal-scrollable .modal .modal-body p {
    margin: 5px 0;
  }
  .modal-scrollable .modal .modal-body form {
    margin: 10px 0;
  }
  .modal-scrollable .modal .modal-body form .form-group {
    margin: 20px 0;
  }
  .modal-scrollable .modal .modal-body form label {
    font-weight: bold;
  }
  .modal-scrollable .modal .modal-body form input {
    border: solid 1px #ddd;
    font-size: 16px;
    width: 100%;
    padding: 10px;
    margin-top: 5px;
  }
  .modal-scrollable .modal .modal-body form a {
    margin-top: 50px;
    background: #386F81;
    color: #fff;
    padding: 15px;
    width: 100%;
  }
  .modal-scrollable .modal .modal-body form a.disabled {
    background: #aaa;
    cursor: default;
  }
}

/* SKU画像項目用(smartphone) */
@media screen and (max-width: 480px) {
  .c-product_img {
    display: block;
  }
  #sub-images-view {
    max-width: 100%;
    display: block;
  }
  .img-wrap {
    width: 100%;
    max-height: 100%;
    align-items: center;
    padding: 0;
    list-style: none;
    display: flex;
  }
  .img-box {
    margin: 2px;
  }
  .img-thumbnail {
    width: 100% !important;
    pointer-events: auto;
  }
  .img-box:hover {
    opacity: 0.8;
  }
  .product-thumbnail {
    max-height: 125px;
    max-width: 125px;
  }
  #main-img {
    height: auto;
    object-fit: contain;
  }
}

/* SKU画像項目用(PC) */
@media screen and (min-width: 480px) {
  .c-product_img {
    display: flex;
    justify-content: space-around;
  }
  #sub-images-view {
    max-width: 15%;
    display: flex;
    flex-direction: column;
  }
  .img-wrap {
    width: 100%;
    max-height: 100%;
    align-items: center;
    padding: 0;
    list-style: none;
  }
  .img-wrap:nth-child(n+2) {
    display: none;
  }
  .img-box {
    width: 100% !important;
    margin: 2px;
  }
  .img-thumbnail {
    width: 100% !important;
    pointer-events: auto;
  }
  .img-box:hover {
    opacity: 0.8;
  }
  .product-thumbnail {
    max-height: 125px;
    max-width: 125px;
  }
  #main-img {
    width: 70%;
    height: auto;
    object-fit: contain;
  }
}

.recommend_product_padding {
  padding-top: 80px;
  padding-bottom: 100px;
}

/* ========================================================================
   商品詳細ページレイアウト
   ======================================================================== */

/* PC表示: 左右2カラムレイアウト（左:商品画像、右:商品情報） */
@media screen and (min-width: 769px) {
  .p-product_content__inner {
    display: flex;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    align-items: flex-start;
  }

  /* 商品画像エリア */
  .p-product_content__inner__img {
    flex: 0 0 50%;
    max-width: 600px;
  }

  /* 商品情報エリア */
  .p-product_content__inner__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
  }

  /* 商品タイトルを太文字に */
  .c-product_info__title {
    font-weight: bold !important;
  }

  /* 商品説明を購入ボタンの下、内容物の上に移動 */
  .c-product_info__description#product-description {
    order: 70;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #494949 !important;
    font-size: 16px !important;
    line-height: 1.8;
  }

  /* 商品詳細情報（内容物、配送、注意事項など）を商品説明の下に */
  .c-product_info__caution,
  .c-product_info__option,
  .c-product_info__extra_text_from_product_category,
  #option01,
  #option02,
  #option03 {
    order: 80;
    color: #494949 !important;
    font-size: 16px !important;
    line-height: 1.8;
  }

  /* 内容がある要素のみグレー背景を適用 */
  .c-product_info__caution:not(:empty),
  .c-product_info__option:not(:empty),
  .c-product_info__extra_text_from_product_category:not(:empty),
  #option01:not(:empty),
  #option02:not(:empty),
  #option03:not(:empty) {
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
  }

  /* 購入ボタン関連の要素の順序 */
  .c-product_info__form__buttons {
    order: 50;
  }

  /* お気に入りボタン */
  .c-product_info__favorite {
    order: 60;
  }

  /* 商品画像のスタイル調整 */
  .c-product_img__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
  }

  /* 商品画像はスライドショー表示（デフォルト） */
  /* グリッドレイアウトは使用しない */
}

/* タブレット・モバイル表示: 縦並びレイアウト */
@media screen and (max-width: 768px) {
  .p-product_content__inner {
    display: block;
    padding: 20px 5px; /* 左右の余白をさらに狭く */
  }

  .p-product_content__inner__img {
    margin-bottom: 24px;
    padding: 0 5px; /* 画像エリアの余白を狭く */
  }

  .p-product_content__inner__info {
    padding: 0 5px; /* テキストエリアの余白を狭く */
  }

  /* 商品タイトルを太文字に（モバイル） */
  .c-product_info__title {
    font-weight: bold !important;
  }

  /* 商品説明のスタイル（モバイル） */
  .c-product_info__description#product-description {
    color: #494949 !important;
    font-size: 15px !important;
    line-height: 1.8;
    margin-top: 20px;
  }

  /* 商品詳細情報（内容物、配送、注意事項など）のスタイル（モバイル） */
  .c-product_info__caution,
  .c-product_info__option,
  .c-product_info__extra_text_from_product_category,
  #option01,
  #option02,
  #option03 {
    color: #494949 !important;
    font-size: 15px !important;
    line-height: 1.8;
  }

  /* 内容がある要素のみグレー背景を適用（モバイル） */
  .c-product_info__caution:not(:empty),
  .c-product_info__option:not(:empty),
  .c-product_info__extra_text_from_product_category:not(:empty),
  #option01:not(:empty),
  #option02:not(:empty),
  #option03:not(:empty) {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
  }

  /* モバイルでもスライドショー表示を使用 */
}

/* ========================================================================
   価格表示に「円(税込)」を追加
   ======================================================================== */

/* メイン価格表示 */
#sales-price-include-tax::after,
.sales_price_include_tax::after {
  content: "(税込)";
}

#list-price-include-tax::after,
.list_price_include_tax::after {
  content: "(税込)";
}

/* セット商品・関連商品の価格 */
.co-sales_price_include_tax::after {
  content: "(税込)";
}

/* ========================================================================
   商品詳細ページボタンスタイル
   ======================================================================== */

/* 単品購入・定期購入ボタンは白背景（u-color__btn--bg--reverseを維持） */
#product-show-view label.u-color__btn--bg--reverse,
#product-show-view .c-product_info__form__submit.u-color__btn--bg--reverse,
#product-show-view label#label-single-product,
#product-show-view label[for="btn-single-product"],
#product-show-view input[name="co_selling_product"] + label,
#product-show-view .btn-half,
#product-show-view .c-product_info__form__submit.btn-half,
#product-show-view button.btn-half {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  transition: opacity 0.3s ease !important;
  font-weight: 600 !important;
  opacity: 1;
}

#product-show-view label.u-color__btn--bg--reverse:hover,
#product-show-view .c-product_info__form__submit.u-color__btn--bg--reverse:hover,
#product-show-view label#label-single-product:hover,
#product-show-view input[name="co_selling_product"] + label:hover,
#product-show-view .btn-half:hover,
#product-show-view .c-product_info__form__submit.btn-half:hover,
#product-show-view button.btn-half:hover {
  opacity: 0.7 !important;
}

/* 選択された単品購入・定期購入ボタン（白背景・太枠） */
#product-show-view input[name="co_selling_product"]:checked + label,
#product-show-view .btn-half:has(input:checked) {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #000000 !important;
  border: 3px solid #000000 !important;
  opacity: 1 !important;
}

/* カートに商品を追加ボタンは黒背景 */
#product-show-view .c-product_info__form__buttons .c-product_info__form__submit.u-color__btn--bg,
#product-show-view button#btn-add.u-color__btn--bg,
#product-show-view .c-product_info__form__buttons .c-product_info__form__submit,
#product-show-view button#btn-add,
#product-show-view .js-product__add-cart button {
  background-color: #000000 !important;
  background: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #000000 !important;
  transition: opacity 0.3s ease !important;
  font-weight: 600 !important;
  opacity: 1;
}

#product-show-view .c-product_info__form__buttons .c-product_info__form__submit.u-color__btn--bg:hover,
#product-show-view button#btn-add.u-color__btn--bg:hover,
#product-show-view .c-product_info__form__buttons .c-product_info__form__submit:hover,
#product-show-view button#btn-add:hover,
#product-show-view .js-product__add-cart button:hover {
  opacity: 0.7 !important;
}

/* 購入手続きへボタンは白背景 */
#product-show-view .c-product_info__form__submit--async,
#product-show-view button#btn-add.c-product_info__form__submit {
  background-color: #ffffff !important;
  background: #ffffff !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  transition: opacity 0.3s ease !important;
  font-weight: 600 !important;
  opacity: 1;
}

#product-show-view .c-product_info__form__submit--async:hover,
#product-show-view button#btn-add.c-product_info__form__submit:hover {
  opacity: 0.7 !important;
}
