.slick-slider {
    margin-bottom: 30px;
}

.slick-dots {
    position: absolute;
    display: block;
    width: 100%;
    padding: 0;
    list-style: none;
    text-align: center;
}

.slick-dots li {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0 5px;
    padding: 0;

    cursor: pointer;
}

.slick-dots li button {
    font-size: 0;
    line-height: 0;
    display: block;
    width: 20px;
    height: 20px;
    padding: 5px;
    cursor: pointer;
    color: transparent;
    border: 0;
    outline: none;
    background: transparent;
}

.slick-dots li button:hover,
.slick-dots li button:focus {
    outline: none;
}

.slick-dots li button:hover:before,
.slick-dots li button:focus:before {
    opacity: 1;
}

.slick-dots li button:before {
    content: " ";
    line-height: 20px;
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    text-align: center;
    opacity: .25;
    background-color: black;
    border-radius: 50%;

}

.slick-dots li.slick-active button:before {
    opacity: .75;
    background-color: black;
}

.slick-dots li button.thumbnail img {
    width: 0;
    height: 0;
}

.ec-price__unit-tax {
    font-size: 16px;
    color: #000;
}

.ec-productRole .custom-ec-productRole__description-1 {
    display: none;
    padding: 8px;
    border: 4px dotted #eee;
}

.ec-productRole .custom-ec-productRole__description-2 {
    margin: 0;
    padding: 0;
}

.ec-productRole .custom-ec-productRole__description-2 p:not(:last-child) {
    margin-bottom: 1em;
}

/* 商品説明：長文時のアコーディオン（ぼかしフェード） */
.custom-product-description-accordion {
    position: relative;
    margin: 24px 0;
}

.custom-product-description-accordion.is-collapsible {
    --product-desc-collapse-height: 12em;   /* 折りたたみ時の本文の高さ */
    --product-desc-fade-height: 8em;        /* ぼかしフェードの高さ */
    --product-desc-toggle-offset: 3em;    /* ボタン位置：大きいほど上、小さいほど下 */
}

.custom-product-description-accordion.is-collapsible .custom-product-description-accordion__content {
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-product-description-accordion.is-collapsible.is-collapsed .custom-product-description-accordion__content {
    max-height: var(--product-desc-collapse-height);
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 45%,
        rgba(0, 0, 0, 0.85) 62%,
        rgba(0, 0, 0, 0.45) 78%,
        rgba(0, 0, 0, 0.12) 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 45%,
        rgba(0, 0, 0, 0.85) 62%,
        rgba(0, 0, 0, 0.45) 78%,
        rgba(0, 0, 0, 0.12) 92%,
        transparent 100%
    );
}

.custom-product-description-accordion__fade {
    position: absolute;
    left: 0;
    right: 0;
    height: var(--product-desc-fade-height, 8em);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.08) 18%,
        rgba(255, 255, 255, 0.28) 38%,
        rgba(255, 255, 255, 0.55) 58%,
        rgba(255, 255, 255, 0.78) 76%,
        rgba(255, 255, 255, 0.92) 90%,
        #fff 100%
    );
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 22%,
        rgba(0, 0, 0, 0.65) 48%,
        #000 72%,
        #000 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.25) 22%,
        rgba(0, 0, 0, 0.65) 48%,
        #000 72%,
        #000 100%
    );
}

.custom-product-description-accordion.is-collapsible.is-collapsed .custom-product-description-accordion__fade {
    opacity: 1;
    visibility: visible;
    top: calc(var(--product-desc-collapse-height) - var(--product-desc-fade-height));
    bottom: auto;
}

.custom-product-description-accordion.is-collapsible.is-expanded .custom-product-description-accordion__content {
    -webkit-mask-image: none;
    mask-image: none;
}

.custom-product-description-accordion__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: none;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
}

.custom-product-description-accordion.is-collapsible.is-collapsed .custom-product-description-accordion__toggle {
    position: absolute;
    top: calc(var(--product-desc-collapse-height) - var(--product-desc-toggle-offset));
    left: 0;
    right: 0;
    z-index: 2;
    margin-top: 0;
    transition: opacity 0.3s ease;
}

.custom-product-description-accordion.is-expanded .custom-product-description-accordion__toggle {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    margin-top: 8px;
    transition: margin-top 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-product-description-accordion__toggle-icon {
    font-size: 10px;
    transition: transform 0.3s;
}

.custom-product-description-accordion.is-expanded .custom-product-description-accordion__toggle-icon {
    transform: rotate(180deg);
}

.custom-product-description-accordion__toggle-label--collapse {
    display: none;
}

.custom-product-description-accordion.is-expanded .custom-product-description-accordion__toggle-label--expand {
    display: none;
}

.custom-product-description-accordion.is-expanded .custom-product-description-accordion__toggle-label--collapse {
    display: inline;
}

.ec-price__price {
    margin-bottom: 8px;
}

.ec-price .carton-price {
    font-size: 12px;
    color: #000;
}

/* 商品詳細：販売価格下の注釈 */
.carton-price-detail {
    display: block;
    font-size: 12px;
    color: #000;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 12px;
}

.carton-price-detail--warn {
    color: #DE5D50;
}

.ec-productRole .ec-productRole__tags {
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 20px;
    border-bottom: none;
    padding-bottom: 0;
}

.ec-blockBtn--action,
.ec-blockBtn--cancel,
.custom-button {
    width: 90%;
}

.custom-button-3 .ec-blockBtn--cancel {
    width: 90%;
}

.custom-button-block-1 {
    display: flex;
    width: 100%;
    margin-top: 14px;
    margin-bottom: 8px;
}

.custom-button-block-2 {
    display: flex;
    width: 100%;
    margin-bottom: 16px;
}

.custom-button-1,
.custom-button-2,
.custom-button-3,
.custom-button-4 {
    width: 50%;
}

.custom-button-4 .unavailable {
    line-height: 28px;
}

.custom-button-2 {
    align-self: flex-end;
}

.custom-button-3:hover,
.custom-button-4:hover {
    opacity: 0.6;
}

.custom-button-3 a .ec-blockBtn--cancel {
    background-color: blue;
    border-color: blue;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-button-3 a:hover {
    text-decoration: none;
}

.custom-button-4 .ec-blockBtn--cancel {
    background-color: #E0A800;
    border-color: #E0A800;
    color: black;
}

.custom-button-3 a .ec-blockBtn--cancel p {
    line-height: 1em;
}

.custom-button-3-title {
    margin-bottom: 4px;
}

.custom-button-3-subtitle {
    font-weight: normal;
    font-size: 12px;
}

.ec-productRole .custom-ec-productRole__btn {
    width: auto;
    width: initial;
    min-width: auto;
    min-width: initial;
}

.ec-numberInput {
    display: flex;
    align-items: center;
}

.ec-numberInput input {
    margin: 0 8px;
}

.custom-spec-table-area {
    width: 100%;
    margin: 16px 0;
}

.custom-spec-title {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
}

.custom-spec-table {
    width: 100%;
    border: 1px solid #eee;
}

.custom-spec-table {
    font-size: 14px;
}

.custom-spec-table ul li::before {
    content: '・';
}

.custom-spec-table tr:nth-child(odd) {
    background-color: #eee;
}

.custom-spec-table-area td {
    padding: 4px 16px;
}

.custom-spec-name {
    width: 25%;
    min-width: 100px;
    vertical-align: top;
    text-align: justify;
    text-align-last: justify;
    text-justify: inter-ideograph;
}

.custom-spec {
    width: 75%;
    vertical-align: middle;
}

.custom-spec ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.custom-spec ul li+li {
    margin-top: 4px
}

.custom-spec-code-list {
    list-style: disc;
    padding-left: 1.2em;
}

.custom-spec-material-link {
    margin-left: 0.5em;
    font-size: 12px;
    color: #586e8a;
    text-decoration: underline;
    white-space: nowrap;
}

.custom-spec-material-link:hover {
    color: #3d5266;
}

.custom-notes,
.custom-remarks {
    font-size: 14px;
}

.custom-remarks ul li::before {
    content: '※';
}

/* 備考・注意事項・特記事項のテンプレートリスト：.custom-spec-table の「・」を上書きし、※のみ表示（注意事項と同じ before 方式） */
.custom-spec-table .custom-notice-list {
    list-style: none;
}
.custom-spec-table .custom-notice-list li::before {
    content: '※';
}

.slide-item img {
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-right: 2px solid rgba(0, 0, 0, 0.3);
    width: 100%;
    height: auto;
    display: block;
}

/* slick 初期化前は先頭スライドのみ表示（縦積みちらつき・レイアウト崩れ回避） */
.item_visual:not(.slick-initialized) .slide-item {
    display: none;
}
.item_visual:not(.slick-initialized) .slide-item:first-child {
    display: block;
}

.slideThumb img {
    border: 1px solid rgba(0, 0, 0, 0.5);
}

.item_visual {
    /* メイン画像下のドット型ページネーション（.slick-dots）はフロー直下に配置されるため、
       次要素（キャプション）との間隔分の余白 */
    margin-bottom: 40px;
}

.custom-main-img-caption {
    /* ul のブラウザデフォルト margin-top をリセットしつつ、メイン画像のドットとの間隔を明示 */
    margin-top: 16px;
}

/* メイン画像 左右ナビゲーション矢印（◀▶・半透明・PC/SP 共通）。
   slick 標準の .slick-prev/.slick-next を .item_visual スコープで上書きしている。 */
.item_visual .slick-prev,
.item_visual .slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease;
}
.item_visual .slick-prev { left: 10px; }
.item_visual .slick-next { right: 10px; }
.item_visual .slick-prev:hover,
.item_visual .slick-next:hover,
.item_visual .slick-prev:focus,
.item_visual .slick-next:focus {
    background: rgba(0, 0, 0, 0.55);
    outline: none;
}
.item_visual .slick-prev::before,
.item_visual .slick-next::before {
    /* slick.css 標準の font-family: 'slick' とアイコン文字を上書きして ◀▶ をくっきり表示 */
    font-family: inherit;
    font-size: 18px;
    line-height: 1;
    color: #fff;
    opacity: 1;
}
.item_visual .slick-prev::before { content: '\25C0'; } /* ◀ */
.item_visual .slick-next::before { content: '\25B6'; } /* ▶ */

/* スマホ版は画面が狭いので矢印・余白を少し小さめに */
@media (max-width: 768px) {
    .item_visual .slick-prev,
    .item_visual .slick-next {
        width: 36px;
        height: 36px;
    }
    .item_visual .slick-prev { left: 6px; }
    .item_visual .slick-next { right: 6px; }
    .item_visual .slick-prev::before,
    .item_visual .slick-next::before {
        font-size: 16px;
    }
}

/* 画像枚数 21〜40 枚: ドット小サイズ */
.item_visual--dots-small .slick-dots li,
.item_visual--dots-small .slick-dots li button {
    width: 14px;
    height: 14px;
}
.item_visual--dots-small .slick-dots li {
    margin: 0 3px;
}
.item_visual--dots-small .slick-dots li button {
    padding: 3px;
}
.item_visual--dots-small .slick-dots li button:before {
    width: 8px;
    height: 8px;
    line-height: 14px;
}

/* 画像枚数 41 枚以上: ドット極小サイズ */
.item_visual--dots-tiny .slick-dots li,
.item_visual--dots-tiny .slick-dots li button {
    width: 10px;
    height: 10px;
}
.item_visual--dots-tiny .slick-dots li {
    margin: 0 1px;
}
.item_visual--dots-tiny .slick-dots li button {
    padding: 2px;
}
.item_visual--dots-tiny .slick-dots li button:before {
    width: 6px;
    height: 6px;
    line-height: 10px;
}

.custom-main-img-caption {
    font-size: 12px;
    margin-bottom: 24px;
}

.custom-main-img-caption li::before {
    content: "※";
}

.custom-ec-header {
    padding: 0 20px;
    margin-bottom: 16px;
}

.custom-ec-header .ec-productRole,
.custom-ec-header .ec-productRole__code,
.custom-ec-header .ec-productRole__category {
    border-bottom: none;
    padding: 0;
}

.custom-ec-header .ec-headingTitle {
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.custom-ec-header .ec-productRole__code {
    color: #DE5D50;
    font-weight: bold;
    font-size: calc(1em + 2pt);
}

.product-code-default {
    color: #DE5D50;
    font-weight: bold;
    font-size: calc(1em + 2pt);
}

/* 商品詳細テーブル内の品番：完売は薄く＋取り消し線、欠品・完売ラベルは赤文字 */
.custom-spec-table .product-code-display--soldout .product-code-display__value {
    opacity: 0.5;
    text-decoration: line-through;
}
.custom-spec-table .product-code-status {
    color: #DE5D50;
    font-weight: bold;
    margin-left: 0.25em;
}
.custom-spec-table .product-code-status:empty {
    display: none;
}
.custom-spec-code-list .product-code-display {
    display: inline;
}

.product-status-label {
    color: #DE5D50;
    font-weight: bold;
}

/* タグ（カテゴリ下・品番上）：青地に白抜きカード */
.custom-product-tags-card {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0 20px;
    margin: 0 0 12px 0;
}
.custom-product-tags-card .custom-tag-card-item {
    display: inline-block;
    padding: 4px 8px;
    background-color: transparent;
    color: #000;
    font-size: 0.9em;
    border-radius: 4px;
    border: 1px solid #2563eb;
    font-weight: 500;
}
.custom-product-tags-card .custom-tag-card-item a {
    color: inherit;
    text-decoration: none;
}
.custom-product-tags-card .custom-tag-card-item:has(a) {
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.custom-product-tags-card .custom-tag-card-item:has(a):hover {
    background-color: #2563eb;
    color: #fff;
}
.custom-product-tags-card .custom-tag-card-item:has(a):hover a {
    color: #fff;
}
.custom-category-area {
    margin-bottom: 8px;
}

.custom-category-area ul {
    list-style: none;
    padding: 0 20px;
    margin: 0;
}

.custom-special-page-links {
    padding: 0 20px;
    margin: 0;
}

ul.custom-main-notice {
    list-style: none;
    padding: 0;
    margin: 0;
    color: red;
}

ul.custom-main-notice li {
    padding-bottom: 10px;
}

.custom-fax-download {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 10px;
}

/* リンク見た目は customize.css の a.custom-fax-download__link */

/* 軽減税率・日本製バッジ */
.taxRate-tag {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.taxRate-tag img {
    width: 100px;
    height: auto;
}

@media (max-width: 768px) {
    .custom-main-img-caption {
        display: none;
    }

    .ec-productRole .ec-productRole__title .ec-headingTitle {
        font-size: 28px;
    }
}

/* 画像ズームモーダル */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 3;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0,0,0);
  background-color: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s;
}

.custom-modal .modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
}

.custom-modal .modal-header {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 4;
}

.custom-modal .modal-close-btn {
  background: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
  display: flex;
  justify-content: center;
  transition: background-color 0.2s;
}

.custom-modal .modal-close-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.custom-modal .modal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
}

.custom-modal img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  margin: auto;
}

/* 拡大モーダル：商品画像の前後ナビ（メインスライダーと同系の ◀▶） */
.custom-modal--with-gallery .modal-body img {
  max-width: calc(90% - 120px);
}

.custom-modal .modal-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #333;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.custom-modal .modal-nav-btn:hover,
.custom-modal .modal-nav-btn:focus {
  background: rgba(255, 255, 255, 1);
  outline: none;
}

.custom-modal .modal-nav-btn--prev {
  left: max(12px, 2vw);
}

.custom-modal .modal-nav-btn--next {
  right: max(12px, 2vw);
}

@media (max-width: 768px) {
  .custom-modal--with-gallery .modal-body img {
    max-width: calc(100% - 88px);
  }

  .custom-modal .modal-nav-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}

.custom-modal img.order-flow-modal-image {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
}

.clickable-image:hover {
  cursor: zoom-in;
}

.custom-modal img:hover {
  cursor: zoom-out;
}

@media (max-width: 768px) {
  /* スマホ版ではメイン画像が十分大きいので拡大モーダル機能は無効化
     （JS が style="display: flex" を直書きするため !important で上書き） */
  .custom-modal {
    display: none !important;
  }
  .clickable-image:hover {
    cursor: default;
  }
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* モーダルオーバーレイ（概算見積／カート用共通） */
#mask,
#cart-option-mask {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

/* メインモーダル（概算見積／カート用共通） */
#modal,
#cart-option-modal {
  background: #fff;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  padding: 0;
  border-radius: 12px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  /* 高さが足りない場合はモーダル内をスクロールさせる */
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* モーダルヘッダー */
.custom-modal-header {
  background: #f8f9fa;
  padding: 20px 24px;
  border-bottom: 1px solid #e9ecef;
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* モーダルタイトル */
.custom-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 20px 0;
  text-align: center;
}

/* モーダルコンテナ */
.custom-modal-container {
  display: flex;
  min-height: 400px;
}

/* 左側ボックス */
.custom-modal-left-box {
  flex: 1;
  padding: 24px;
  background: #f8f9fa;
  border-right: 1px solid #e9ecef;
}

/* 右側ボックス */
.custom-modal-right-box {
  flex: 1;
  /* 左右バランスのとれた余白を確保してテーブルが広がりすぎないようにする */
  padding: 24px;
  background: #fff;
}

/* サブタイトル */
.custom-modal-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid #fe8f00;
}

/* 数量選択ボックス */
.custom-modal-qty-box {
  margin-bottom: 24px;
}

.custom-modal-qty-box table {
  width: 100%;
  border-collapse: collapse;
}

.custom-modal-qty-box td {
  padding: 8px 0;
  border: none;
}

.custom-modal-qty-box select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.custom-modal-qty-box .table-left {
  padding-left: 12px;
  font-size: 14px;
  color: #6c757d;
}

/* 数量フォームの数値は右揃え（カートモーダル・概算モーダル共通） */
.custom-modal-qty-box select {
  text-align: right;
  padding-right: 8px;
}

/* 規格選択ボックス */
.custom-modal-spec-box {
  margin-bottom: 24px;
}

.custom-modal-spec-box select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

/* オプション選択ボックス */
.custom-modal-option-box {
  margin-bottom: 8px;
}

.custom-modal-option-box table {
  width: 100%;
  border-collapse: collapse;
}

.custom-modal-option-box tr {
  /* オプション行の下線は不要 */
  border-bottom: none;
}

.custom-modal-option-box td {
  /* 行間を少し詰める */
  padding: 8px 0;
  border: none;
}

.custom-modal-option-box label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.custom-modal-option-box input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.1);
}

.custom-modal-option-box .table-left {
  text-align: right;
  font-size: 14px;
  color: #6c757d;
}

/* 支払い方法ボックス */
.custom-modal-payment-box {
  margin-bottom: 24px;
}

.custom-modal-payment-box table {
  width: 100%;
  border-collapse: collapse;
}

.custom-modal-payment-box tr {
  border-bottom: 1px solid #f1f3f4;
}

.custom-modal-payment-box td {
  padding: 12px 0;
  border: none;
}

.custom-modal-payment-box label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.custom-modal-payment-box input[type="radio"] {
  margin-right: 8px;
  transform: scale(1.1);
}

/* 名入れ選択ボックス */
.custom-modal-nameprint-box {
  margin-bottom: 24px;
}

.custom-modal-nameprint-box table {
  width: 100%;
  border-collapse: collapse;
}

.custom-modal-nameprint-box td {
  padding: 8px 0;
  border: none;
}

.custom-modal-nameprint-box label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.custom-modal-nameprint-box input[type="radio"] {
  margin-right: 8px;
  transform: scale(1.1);
}

.custom-modal-nameprint-box select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.custom-modal-nameprint-box select:focus {
  outline: none;
  border-color: #fe8f00;
  box-shadow: 0 0 0 2px rgba(254, 143, 0, 0.25);
}

.custom-modal-nameprint-box a.cart-nameprint-inquiry-btn {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background-color: blue;
  border: 1px solid blue;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.custom-modal-nameprint-box a.cart-nameprint-inquiry-btn:hover {
  opacity: 0.75;
  color: #fff;
  text-decoration: none;
}

.custom-nameprint-note a.cart-nameprint-inquiry-btn {
  display: inline;
  padding: 0;
  font-size: inherit;
  line-height: inherit;
  color: blue;
  background: none;
  border: none;
  border-radius: 0;
}

.custom-nameprint-note a.cart-nameprint-inquiry-btn:hover {
  opacity: 0.75;
  color: blue;
}

/* 算出条件テーブル */
.custom-modal-table-term {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.custom-modal-table-term tr {
  border-bottom: 1px solid #f1f3f4;
}

.custom-modal-table-term td {
  /* 右側に少し余白を持たせる */
  padding: 8px 8px 8px 0;
  border: none;
}

.custom-modal-table-label {
  font-size: 13px;
  color: #6c757d;
  /* 改行しない程度の幅を確保しつつ、右セルの領域も残す */
  width: 130px;
  vertical-align: top;
}

.custom-modal-table-value {
  font-size: 14px;
  color: #333;
}

/* 概算金額テーブル */
.custom-modal-table-calc {
  width: 100%;
  border-collapse: collapse;
}

/* 算出条件・概算金額テーブル（実際のtable要素）を親幅いっぱいに展開 */
.custom-modal-table-term table,
.custom-modal-table-calc table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.custom-modal-table-calc tr {
  border-bottom: 1px solid #f1f3f4;
}

.custom-modal-table-calc tr:last-child {
  /* 合計行の下線も他と同じ薄いグレーに統一 */
  border-bottom: 1px solid #f1f3f4;
  font-weight: 600;
}

.custom-modal-table-calc td {
  padding: 12px 0;
  border: none;
}

.custom-modal-table-calc .custom-modal-table-label {
  font-size: 14px;
  color: #333;
  /* 算出条件と概算金額のラベル幅を揃える */
  width: 130px;
}

.custom-modal-table-calc .custom-modal-table-value {
  font-size: 14px;
  color: #333;
  text-align: right;
  font-weight: 500;
}


/* 合計金額行 */
.custom-total {
  background: #f8f9fa;
  font-weight: 600;
}

.custom-total .custom-modal-table-label {
  color: #333;
  font-size: 16px;
}

.custom-total .custom-modal-table-value {
  color: #fe8f00;
  font-size: 18px;
  font-weight: 700;
}

/* 非表示クラス */
.custom-hidden {
  display: none !important;
}

/* アクティブクラス */
.custom-active {
  display: table-row !important;
}

/* custom-activeが適用されたtd要素のパディングを強制適用 */
.custom-modal-table-calc td.custom-active {
  padding: 12px 0 !important;
  display: table-cell !important;
}

/* 閉じるボタン（概算見積／カート用共通） */
#close,
#cart-option-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: #6c757d;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.2s;
}

#close:hover,
#cart-option-close:hover {
  background: #495057;
}

#close::before,
#cart-option-close::before {
  content: "×";
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  #modal {
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    /* 縦スクロールを有効化 */
  }

  .custom-modal-container {
    flex-direction: column;
    min-height: auto;
    /* 最小高さを自動に */
  }

  .custom-modal-left-box {
    border-right: none;
    border-bottom: 1px solid #e9ecef;
  }

  .custom-modal-left-box,
  .custom-modal-right-box {
    padding: 16px;
  }
}

/* オプション注意書き */
ul.custom-modal-option-notice {
  padding: 0 0 0 20px;
  list-style: none;
  font-size: 11px;
  color: #6c757d;
  margin: 0 0 16px 0;
  font-style: italic;
}

ul.custom-modal-option-notice li:before {
  content: '※';
}

/* オプションなしメッセージ */
.custom-no-options {
  font-size: 14px;
  color: #6c757d;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

.modal-td-comment {
  font-size: 12px;
  margin: 4px 0 0 0;
}

.modal-td-comment a {
  color: #fe8f00;
  text-decoration: none;
}

.modal-td-comment a:hover {
  text-decoration: underline;
}

/* オプション料金の明細行スタイル */
.custom-option-detail {
  background: #f8f9fa;
}

.custom-option-detail-label {
  padding-left: 24px !important;
  font-size: 12px !important;
  color: #6c757d !important;
  position: relative;
}

.custom-option-detail-label::before {
  content: "└ ";
  position: absolute;
  left: 12px;
  color: #adb5bd;
}

.custom-option-detail .custom-modal-table-value {
  font-size: 12px !important;
  color: #6c757d !important;
}

/* オプション料金の親行スタイル */
#custom-option-total-row {
  border-top: 1px solid #e9ecef;
  border-bottom: 1px solid #e9ecef;
  background: #fff;
}

#custom-option-total-row .custom-modal-table-label {
  font-weight: normal;
  color: #333;
}

#custom-option-total-row .custom-modal-table-value {
  font-weight: normal;
  color: #333;
}

/* 名入れ方法セクション */
.custom-nameprint-methods-section {
  position: relative;
  margin: 32px 0;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.custom-nameprint-methods-section--has-template {
  padding-bottom: 72px;
}

.custom-nameprint-section-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #fe8f00;
}

.custom-nameprint-methods-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.custom-nameprint-method-item {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.3s ease;
}

.custom-nameprint-method-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.custom-nameprint-method-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.custom-nameprint-method-image {
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  margin-bottom: 12px;
  display: block;
}

.custom-nameprint-area {
  font-size: 14px;
  color: #495057;
  margin: 12px 0;
  line-height: 1.6;
}

.custom-nameprint-area-label {
  font-weight: 600;
  color: #333;
  margin-right: 8px;
}

.custom-nameprint-detail-link {
  margin: 16px 0 0 0;
  font-size: 14px;
}

.custom-nameprint-detail-link a {
  color: #fe8f00;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.custom-nameprint-detail-link a:hover {
  color: #e67e00;
  text-decoration: underline;
}

.custom-nameprint-note {
  font-size: 12px;
  color: #6c757d;
  margin: 24px 0 0 0;
  padding: 12px;
  background: #fff;
  border-left: 4px solid #fe8f00;
  line-height: 1.6;
}

.custom-umbrella-panel-notice {
  font-size: 12px;
  color: #6c757d;
  margin: 12px 0 0 0;
  padding: 0 0 0 8px;
  background: #fff;
  border-left: 4px solid #fe8f00;
  line-height: 1.6;
}

.custom-nameprint-template-download {
  position: absolute;
  right: 24px;
  bottom: 16px;
  margin: 0;
}

a.custom-nameprint-template-download__link {
  display: inline-block;
  padding: 8px 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  background-color: blue;
  border: 1px solid blue;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

a.custom-nameprint-template-download__link:hover {
  opacity: 0.75;
  color: #fff;
  text-decoration: none;
}

/* レスポンシブデザイン（名入れセクション） */
@media (max-width: 1024px) {
  .custom-nameprint-methods-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .custom-nameprint-methods-section {
    margin: 24px 0;
    padding: 16px;
  }

  .custom-nameprint-section-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .custom-nameprint-methods-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .custom-nameprint-method-item {
    padding: 16px;
  }

  .custom-nameprint-method-title {
    font-size: 14px;
  }

  .custom-nameprint-method-image {
    max-width: 100%;
  }

  .custom-nameprint-methods-section--has-template {
    padding-bottom: 88px;
  }

  .custom-nameprint-template-download {
    right: 16px;
    bottom: 16px;
    left: 16px;
    text-align: right;
  }

  a.custom-nameprint-template-download__link {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
}

/* 名入れでのご注文の流れセクション */
.custom-order-flow-section {
  margin: 32px 0;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.custom-order-flow-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #fe8f00;
}

.custom-order-flow-text {
  font-size: 14px;
  color: #495057;
  line-height: 1.8;
  margin: 0 0 24px 0;
}

.custom-order-flow-image {
  width: 100%;
  margin-top: 24px;
}

.custom-order-flow-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* レスポンシブデザイン（ご注文の流れセクション） */
@media (max-width: 768px) {
  .custom-order-flow-section {
    margin: 24px 0;
    padding: 16px;
  }

  .custom-order-flow-title {
    font-size: 18px;
    margin-bottom: 20px;
  }

  .custom-order-flow-text {
    font-size: 14px;
  }
}

/* 関連商品セクション枠（カード本体は detail.twig 内スタイル＋テーマの ec-shelfGrid） */
.custom-related-product-section {
  margin: 32px 0;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 8px;
}

.custom-related-product-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #fe8f00;
}

@media (max-width: 768px) {
  .custom-related-product-section {
    margin: 24px 0;
    padding: 16px;
  }

  .custom-related-product-title {
    font-size: 18px;
    margin-bottom: 20px;
  }
}

/* 追従商品ヘッダー（サイトヘッダー直下・スクロール時スライドイン） */
.custom-product-sticky-trigger {
  height: 0;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

.custom-product-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--site-header-height, 80px);
  z-index: 1;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e5e5e5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    visibility 0.35s ease;
  will-change: transform, opacity;
}

.custom-product-sticky-bar.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.custom-product-sticky-bar__inner {
  max-width: 1130px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: 6px 14px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
}

.custom-product-sticky-bar__label {
  color: #666;
  font-weight: normal;
}

.custom-product-sticky-bar__code {
  flex: 0 0 auto;
  font-weight: bold;
}

.custom-product-sticky-bar__code .custom-product-sticky-bar__code-value {
  font-size: inherit;
  color: #DE5D50;
  font-weight: bold;
}

.custom-product-sticky-bar__name {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-product-sticky-bar__name .product-status-label {
  font-size: inherit;
}

.custom-product-sticky-bar__price {
  flex: 0 0 auto;
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  font-weight: bold;
  white-space: nowrap;
}

.custom-product-sticky-bar__price-main,
.custom-product-sticky-bar__price-tax {
  white-space: nowrap;
}

.custom-product-sticky-bar__price-tax {
  font-weight: normal;
  font-size: 12px;
  color: #555;
}

.custom-product-sticky-bar__carton {
  flex: 0 0 auto;
  color: #444;
  white-space: nowrap;
}

@media (min-width: 769px) {
  .custom-product-sticky-bar__inner {
    flex-wrap: nowrap;
  }
}

@media (max-width: 768px) {
  .custom-product-sticky-bar__inner {
    padding: 8px 16px;
    gap: 4px 10px;
    font-size: 12px;
  }

  .custom-product-sticky-bar__name {
    flex: 1 1 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .custom-product-sticky-bar__price-tax {
    font-size: 11px;
  }
}

/* 追従フッター（カート・概算見積・問い合わせ） */
.custom-product-sticky-footer-trigger {
  height: 0;
  width: 100%;
  pointer-events: none;
  visibility: hidden;
}

.custom-product-sticky-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e5e5e5;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease,
    visibility 0.35s ease;
  will-change: transform, opacity;
}

.custom-product-sticky-footer.is-visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.custom-product-sticky-footer__inner {
  max-width: 1130px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
}

.custom-product-sticky-footer__btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity 0.2s ease;
}

.custom-product-sticky-footer__btn:hover:not(:disabled) {
  opacity: 0.85;
  text-decoration: none;
}

.custom-product-sticky-footer__btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.custom-product-sticky-footer__btn--cart {
  color: #fff;
  background-color: #DE5D50;
  border-color: #DE5D50;
}

.custom-product-sticky-footer__btn--estimate {
  color: #000;
  background-color: #E0A800;
  border-color: #E0A800;
}

.custom-product-sticky-footer__btn--contact {
  color: #fff;
  background-color: #2563eb;
  border-color: #2563eb;
}

.custom-product-sticky-footer__contact-title {
  display: block;
  font-weight: bold;
}

.custom-product-sticky-footer__contact-sub {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: normal;
  line-height: 1.2;
}

body.product_page.is-product-sticky-footer-visible {
  padding-bottom: var(--product-sticky-footer-height, 68px);
}

body.product_page.is-product-sticky-footer-visible .ec-blockTopBtn {
  bottom: calc(var(--product-sticky-footer-height, 68px) + 10px);
}

@media (max-width: 768px) {
  .custom-product-sticky-footer__inner {
    padding: 8px 12px;
    gap: 6px;
  }

  .custom-product-sticky-footer__btn {
    min-height: 44px;
    padding: 6px 4px;
    font-size: 11px;
  }

  .custom-product-sticky-footer__contact-sub {
    font-size: 9px;
  }
}