/*-----------------------------------------------
商品一覧ページデザイン
-------------------------------------------------*/
.site-main ul.products.columns-3 li.product,
.header-widget-region ul.products.columns-3 li.product{
    width: 100%;
}



/* ================================================= */
/* ★ 1列リスト表示に切り替えたい条件 (例: 可変商品のみ、または混合) */
/* ================================================= */

/* 可変商品のみのカテゴリ、または混合カテゴリの場合に1列に上書き */
.cat-only-variable-products.woocommerce ul.products.products,
.cat-mixed-product-types.woocommerce ul.products.products,
.cat-only-simple-products.woocommerce ul.products.products,
.post-type-archive-product.woocommerce ul.products.products,
.product-template-default.woocommerce ul.products.products {
    display: block ; 

}

/* 該当するli.productの調整 */
.cat-only-variable-products.woocommerce ul.products li.product,
.cat-mixed-product-types.woocommerce ul.products li.product,
.cat-only-simple-products.woocommerce ul.products li.product,
.post-type-archive-product.woocommerce ul.products li.product,
.product-template-default.woocommerce ul.products.products{
    width: 100% ;
    margin-bottom:0;
}

.custom-product-row {
    display: flex;
    gap: 2rem;
    padding: 2rem 0;
    border-bottom: 1px solid #ddd;
    align-items: flex-start;
    height:250px;
}

.custom-product-left picture {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    width:250px;
    height: 100%;
}

.custom-product-left img {
    width: 100%;
    height: 100%;
    object-fit:contain;
}

.custom-product-center {
    flex: 1;
    text-align: left;
    border-right: 1px solid;
    height: 100%;
}

.custom-product-title {
    margin-bottom: 0.5rem;
    text-decoration: underline;
}

.custom-product-sku {
    font-size: 14px;
    color: #555;
    margin-bottom: 0.5rem;
}

.custom-product-excerpt {
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.custom-product-right {
    width: 220px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.view-product-btn {
    display: block;
    padding: 0.8rem 1rem;
    text-decoration: none;
    position: absolute;
    right:0;
    bottom:0;
}



.button-group-features{
    display: flex;
    justify-content: space-between;
}


.button-group-features span{
    text-align: center;
    width:100%;
    border-radius: 10px;
    margin:10px 5px 10px 5px ;
}

.custom-category-demo{
    background-color:#00bfff;
}

.custom-category-youtube{
    background-color: #dc143c;
    color: #fff;
}

.catalog-btn:hover,
.view-product-btn:hover {
    opacity: 0.8;
}

/* ---------------------------------------
  スマホ表示（768px 以下）
  商品一覧を縦積みレイアウトに切り替え
---------------------------------------- */
@media (max-width: 860px) {

    /* 1行の横並び → 縦積みに変更 */
    .custom-product-row {
        display: block !important;
        height: auto;
        padding: 1.5rem 0;
    }

    .custom-product-left picture {
        width:100%;
    }

    /* 左画像（上に来る）*/
    .custom-product-left img {
        width: 100%;
        margin: 0 auto 1rem;
        display: block;
    }

    /* 中央（タイトル・品番・説明） */
    .custom-product-center {
        border: none !important;
        width: 100%;
        margin-bottom: 1rem;
    }


    /* 右側（カタログ & デモ機/動画 & 商品を見る） */
    .custom-product-right {
        width: 100%;
        text-align: left;
        display: block;
        margin-top: 1rem;
    }

    /* ▼ ボタンは縦方向に並べる */
    .custom-product-right .button-group-features {
        display: flex;
        justify-content: flex-start;

    }

    /* カタログボタン */
    .custom-product-right .custom-catalog-link {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* 商品を見るボタンを左寄せ＋位置固定解除 */
    .view-product-btn {
        position: static !important;
        margin-top: 1rem;
        padding:0;
        display: inline-block;
    }
}


/*-----------------------------------------------
商品表示ページデザイン
-------------------------------------------------*/

/* バリエーション商品の場合、価格、SKU、見積ボタンを非表示にする */
.single-product .summary .cart .button,
.woocommerce div.product.is-variable .product-sku-above-price, /* 1で追加したSKU */
.woocommerce div.product.is-variable .price,                 /* 価格 */
.woocommerce div.product.is-variable .my-quote-button,
.woocommerce div.product.is-variable .summary,       /* 見積もりボタン (カスタムボタンのクラス名に合わせる) */
/* ここに個数表示要素のクラス名を追加 */
.woocommerce div.product.is-variable .product-quantity { 
    display: none !important; 
}

/*-----------------------------------------------
商品メイン画像　一部製品仕様ギャラリーと共有
-------------------------------------------------*/

/* ギャラリー全体 */
.product-gallery-wrapper {
    max-width: 500px;
    margin-bottom: 20px;
    display: inline-block;
}

/* メインスライダー */
.product-main-swiper {
    width: 100%;
    margin-bottom: 10px;
}

.product-main-swiper .swiper-slide {
    aspect-ratio: 4 / 3; /* 正方形 */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.product-main-swiper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* サムネイルと矢印を包むコンテナ */
.thumbs-navigation-wrapper {
    position: relative;
    padding: 0 40px; /* 矢印を表示するスペースを左右に確保 */
    margin-top: 10px;
}

/* サムネイルスライダー（横並び） */
.product-thumbs-swiper {
    margin-top: 15px;
    overflow: hidden;
}

/* 矢印の共通設定（メイン画像用と干渉しないよう調整） */
.thumbs-navigation-wrapper .swiper-button-next,
.thumbs-navigation-wrapper .swiper-button-prev {
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    margin-top: 0; /* Swiper既定値をリセット */
}

/* 矢印の左右位置 */
.thumbs-navigation-wrapper .thumb-prev {
    left: 0;
}
.thumbs-navigation-wrapper .thumb-next {
    right: 0;
}

/* 矢印のサイズ微調整（必要に応じて） */
.thumbs-navigation-wrapper .swiper-button-next::after,
.thumbs-navigation-wrapper .swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
    position: absolute;
    top: 40%;
    z-index: 10;
    cursor: pointer;
}

.product-thumbs-swiper .swiper-slide {
    width: 100px;
    opacity: 0.6;
    cursor: pointer;
    transition: 0.2s;
}

.product-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #1e73be;
}

.product-thumbs-swiper img {
    width: 100%;
    height: auto;
    cursor: pointer;
}

@media (max-width: 860px) {
  .product-gallery-wrapper {
    max-width:100%;
  }
}

/* メイン画像拡大エリア */
/* ▼ 各スライドを相対位置にしてボタンを固定 */
.product-main-swiper .swiper-slide {
    position: relative;
}

/* ▼ 虫眼鏡ボタン（右上に変更） */
.zoom-btn {
    position: absolute;
    right: 10px;
    top: 10px; /* ← 右上に変更 */
    background: #f5f5f5 ;
    color: #000;
    border: none;
    padding: 6px 8px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 10;
}
.zoom-btn:hover {
    background: #a9a9a9 ;
}

/* ▼ モーダル（初期非表示） */
#zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

/* ▼ モーダル内画像 */
#zoom-modal img {
    max-width: 92%;
    max-height: 92%;
    display: block;
    margin: auto;
    border-radius: 4px;
}

/* ▼ モーダルの × ボタン（右上固定） */
#zoom-modal .close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 100000;
}
#zoom-modal .close-modal:hover {
    color: #ddd;
}

.woocommerce-Price-amount{
    padding-right:10px;
}

/* -------------------------------------------------- */
/* 縦型テーブルの横展開レイアウト調整 */
/* -------------------------------------------------- */
/* カスタムテーブル全体を写真や概要の下に配置するための調整 */
.custom-quote-form {
    /* 左右両方の浮動要素（商品画像や概要）をクリアして、新しい行から開始させる */
    clear: both; 
    
    /* 必要に応じて上部に少し余白を追加 */
    margin-top: 20px;
}


/*--------------------------------------------------------
数量入力フィールドの変更
--------------------------------------------------------*/


/* 数量入力フィールドの標準の上下矢印を非表示にする (Chrome/Edge/Safari/Firefox対応) */
.quantity input[type="number"]::-webkit-inner-spin-button,
.quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.quantity input[type="number"] {
    appearance: auto;
    -moz-appearance: textfield; /* Firefox */
    text-align: center;
}

/* カスタムボタンと入力フィールドのスタイル */
.quantity-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1ede9;
    border-radius: 10px;
    width: fit-content;
}

.quantity-wrapper .qty-btn {
    display: block;
    text-align: center;
    user-select: none;
    font-size: 25px;
    padding: 0 20px;
    cursor: pointer;
    user-select: none;
}

.quantity .qty-btn.minus {

    border-radius: 4px 0 0 4px;
}
.quantity .qty-input {
    flex-grow: 1;
    border-left: none;
    border-right: none;
    width:60px;
}
.quantity .qty-btn.plus {
    border-radius: 0 4px 4px 0;
    
}

/* 無効化された見積もりボタンのスタイル */
.js-add-to-quote-btn.disabled,
.js-add-to-quote-simple-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* クリックイベントを完全に無効にする */
}

/* 数量入力フィールド（input.qty）のスタイル */
.quantity-wrapper .qty { 
    /* input.qty や input.qty-input をターゲットにする */
    flex-grow: 1;
    border-left: none;
    border-right: none;
    width:60px;
    border: none; /* カスタムボタンと一体化させるためにborderを削除 */
    background: transparent; /* 背景を透明に */
}

/*--------------------------------------------------
商品価格・在庫テーブル
--------------------------------------------------*/
.vertical-table-container {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-collapse: collapse;
}

/* --- 左列（項目名） --- */
.vertical-header-column {
  display: flex;
  flex-direction: column;
  flex: 0 0 100px; /* 固定幅（変更可） */
  background: #fafafa;
  border-right: 1px solid #ddd;
}

.vertical-header-column .header-cell {
/* heightを固定値にして、すべての行の高さを強制的に統一する */
    height: 60px; /* ★ min-height ではなく height を使用 */
    
    /* 成長を無効化し、高さを固定に準拠させる */
    flex: 0 0 auto; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    box-sizing: border-box;
}

/* --- 右側の商品データエリア --- */
.variation-data-wrapper {
  display: flex;
  flex: 1;
  overflow-x: auto;
  gap: 10px;
  background: #fff;
}

/* --- 各商品のカラム --- */
.variant-data-column {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #fff;
  min-width: 200px; /* カラム幅（可変にしたい場合は%でもOK） */
  box-sizing: border-box;
}

/* --- 各セル（tdに相当）--- */
.variant-data-column .data-cell {
/* heightを固定値にして、THと高さを一致させる */
    height: 60px; /* ★ THの高さ (60px) と合わせる */
    
    /* 成長を無効化し、高さを固定に準拠させる */
    flex: 0 0 auto; 

    /* その他の設定はそのまま利用 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    padding: 8px;
    box-sizing: border-box;
    text-align: center;
}

/* 最後の行（ボタンなど）には下線を付けない */
.variant-data-column .data-cell:last-child {
  border-bottom: none;
}

/* --- スクロールバー調整（見やすく） --- */
.variation-data-wrapper::-webkit-scrollbar {
  height: 8px;
}
.variation-data-wrapper::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}
.variation-data-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.variant-data-column .data-cell,
.vertical-header-column .header-cell {
    /* 最小高さではなく、高さを固定（これでボーダーが揃いやすい） */
    height: 60px; /* 例として60pxに設定（ボタンや入力が入る高め） */

    flex: 0 0 auto; /* ★ 必須: flex-growを無効化し、高さを固定する */
    /* その他の設定はそのまま利用 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
    padding: 8px;
    box-sizing: border-box;
    text-align: center;
  }

/* 最後の行（ボタンなど）には下線を付けない */
/* (PHP側でボタンを最後の行にしているため、border-bottom: none; はこれでOKです) */
.variant-data-column .data-cell:last-child {
border-bottom: none;
}

/* ボタンラッパー内のボタンを縦並びにする */
.quote-buy-buttons-wrapper {
    display: flex;
    flex-direction: column; /* 縦並びにする */
    gap: 5px; /* ボタン間のスペース */
    width: 100%;
}

/* 見積もりボタンと数量入力ボタンの表示制御 */
.quantity-cell {
    /* 数量入力のセルも高さを確保 */
    min-height: 48px; /* ボタンの高さに合わせるなど */
}

/* --- ボタンセルは高さを自動調整し、中身を縦並びにする --- */
.quote-button-cell {
    /* ボタンセルはコンテンツに合わせて高さを取る */
    height: auto !important; 
    flex: 1 0 auto !important; /* 残りのスペースを埋めるように調整 */
    align-items: flex-start; /* ボタンを上端に寄せる */
    padding-top: 10px;
    padding-bottom: 10px;
}

/* ボタンラッパー内のボタンを縦並びにする */
.quote-buy-buttons-wrapper {
    display: flex;
    flex-direction: column; /* 縦並びにする */
    gap: 5px; 
    width: 100%;
}

/* ボタンデザイン */
.quote-buy-buttons-wrapper button {
  width: 100%;
  padding: 8px;
  border-radius: 5px;
  border: none;
  background-color: #f2f2f2;
  cursor: pointer;
}

.quote-buy-buttons-wrapper button:hover {
  background-color: #e5e5e5;
}

/*ボタンがない場合などのメッセージ表記*/
.message-placeholder {
    margin-top: 8px;
    padding: 6px 10px;
    font-size: 14px;
    text-align: center;
    background: #edf6fc;
    color: #333;
    border-top: 1px dotted #000;
    border-bottom: 1px dotted #000;
    width:100%;
}

.in-stock{
  margin:0;
}

.out-of-stock{
  margin: 0;
}

/* レスポンシブ対応 */
@media (max-width: 1024px) {
  .variant-data-column {
    flex: 0 1 calc(33.333% - 20px);
  }
}
@media (max-width: 768px) {
  .variant-data-column {
    flex: 0 1 calc(50% - 20px);
  }
}
@media (max-width: 480px) {
  .variant-data-column {
    flex: 0 1 100%;
  }
}

/*----------------------------------------------------
購入先一覧のモーダルウィンドウ
----------------------------------------------------*/

/* === モーダル全体 === */
.custom-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0; /* top, right, bottom, left: 0; と同義 */
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px); /* 背景をうっすらぼかして高級感UP */
    overflow-y: auto;
}

/* === モーダルボックス === */
.custom-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: relative;
    animation: modal-fadein 0.3s ease;
}

/* === 閉じるボタン === */
.custom-modal-close-btn {
    position: absolute;
    top: 12px;
    right: 16px;
    color: #888;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}
.custom-modal-close-btn:hover {
    color: #000;
}

/* === 見出し === */
.custom-modal-content h3 {
    margin-top: 0;
    text-align: center;
    font-size: 1.2rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* === 購入先ボタン === */
.buy-buttons-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}
.buy-buttons-wrapper a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 80px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}
.buy-buttons-wrapper a:hover {
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}
.buy-buttons-wrapper img {
    max-width: 190px;
    max-height: 60px;
    object-fit: contain;
}

/* === アニメーション === */
@keyframes modal-fadein {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/*
既存の広すぎるセレクタによる display: none !important; 
を打ち消すためのCSSを追加
*/

/* 購入はこちらボタンを最優先で表示 */
.single-product .buy-here-btn {
    display: inline-block ; /* 優先度を上げて強制表示 */
    /* 見積もりボタンと並べるための調整 (例) */
    margin-top: 10px;
    clear: both; 
}

/*アズワン様の注文ボタンを法人限定と記載*/
.buy-option-separator {
  width: 100%;
  text-align: center;
  font-weight: bold;
  margin: 20px 0 10px;
  font-size: 16px;
  color: #555;
  border-top: 1px solid;
}


/*----------------------------------------------------
製品詳細情報記載欄
----------------------------------------------------*/
.single-product div.product {
    overflow: visible ;
}

.dummy-height-for-simple{
    clear: both;
    height: 20px; /* 可変でもOK。float 解除 + 下げる */
}

/* 1. flex を使わずに wrapper を block */
.product-content-wrapper {
    width: 100%;
    margin-top: 40px;
    display: block;
}

/* 2. 内部を flex にする */
.inner-flex {
    display:flex;
    flex-direction:row-reverse;
    gap:30px;
    align-items:flex-start;
    min-width:0;
}

.product-toc li a {
    padding: 10px 0;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 500;
    display: block;
}

.product-toc li a:hover{
    color:#0168b7;
}

/* 3. メインコンテンツの設定 */
.product-main-content {
    flex-grow: 1; /* 残りのスペースをすべて使用して広がる */
}

/* 目次リストの見た目を整える */
.product-toc {
    list-style: none; /* リストの点（・）を削除 */
    padding: 0;
    margin: 0;
}

.product-main-content section {
    background: #fff;
    padding: 25px 30px;
    margin-bottom: 40px;
    border-radius: 8px;
    border: 1px solid #eee;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.product-main-content section h2 {
    border-left: 4px solid #0073aa;
    padding-left: 10px;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

@media screen and (max-width: 768px) {
    .inner-flex {
      display: block;
    }

    .product-sidebar {
      width:100%;
      margin-bottom: 20px;
      position:static;
      top:0px;
    }
    .product-sidebar ul{
      display: grid;
      grid-template-columns: repeat(2, 1fr); /* 4列表示 */
      gap: 20px; /* カード間の余白 */
    }

    .dummy-height-for-simple{
    clear: both;
    height: 0; /* 可変でもOK。float 解除 + 下げる */
    }

}


/* =================================================
WooCommerce 商品ページ 安定CSS
================================================= */

/* -------------------------------
基本安定化
--------------------------------*/

*,
*::before,
*::after{
box-sizing:border-box;
}

body{
overflow-x:hidden;
}

.site{
overflow-x:visible;
}

.product-main-content img{
max-width:100%;
height:auto;
}


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

.product-main-content{
flex-grow:1;
min-width:0;
}

/* sticky目次 */

.product-sidebar{
background:#fafafa;
padding:20px;
border-radius:8px;
border:1px solid #eee;
position:sticky;
top:250px;
width:16rem;
height:fit-content;
box-shadow:0 2px 6px rgba(0,0,0,0.06);
align-items: flex-start; /* ← ⭐ これ非常に重要 */
}


/* =================================================
仕様ギャラリー
================================================= */

.spec-gallery{
    display:flex;
    gap:25px;
    align-items:flex-start;
    width:100%;
    margin:30px 0;
}

.spec-main-swiper{
    aspect-ratio: 4 / 3;
    flex:1 1 auto;
    min-width:0;
    max-width:650px;
}

.spec-main-swiper img{
    width:100%;
    display:block;
    border:1px solid #ccc;
    height: 100%;
    object-fit: contain;
}

/* サムネ */

.spec-thumbs-swiper{
    width:120px;
    height:300px;
    margin-left:10px;
}

.spec-thumbs-swiper .swiper-slide {
    opacity: 0.5;
    cursor: pointer;
}

.spec-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #007bff;
}

.spec-thumbs-swiper .image-wrap{
    height: 100%;
}

.spec-thumbs-swiper img{
    aspect-ratio: 4 / 3;
    width:100%;
    height: 100%;
    display: block;
    border:1px solid #ddd;
    object-fit: contain;
}

.spec-thumbs-swiper .swiper-wrapper{
flex-direction:column!important;
}

/* =================================================
仕様テーブル
================================================= */

.spec-table,
.simple-specs,
.variable-specs{
width:100%;
border-collapse:collapse;
background:#fff;
min-width: max-content; /* 横スクロールを成立させる */
}

/* simple商品 */

.simple-specs th{
width:30%;
background:#f5f5f5;
}

.simple-specs th,
.simple-specs td{
border:1px solid #ccc;
padding:8px 12px;
text-align:left;
white-space:normal;
}

/* variable商品 */

.variable-specs th,
.variable-specs td{
border:1px solid #ccc;
padding:8px 12px;
text-align:center;
white-space:nowrap;
display: table-cell;
}

/* stickyヘッダー */

.variable-specs thead th{
position:sticky;
top:0;
background:#e5e5e5;
z-index:20;
}

.simple-specs th:first-child,.variable-specs thead th:first-child{
    position: sticky;
    left: 0;
    background: #e5e5e5; /* 上ヘッダーとは微妙に色を変えるのがポイント */
    z-index: 30;
}

/* sticky品番列 */

.variable-specs th:first-child,
.variable-specs td:first-child{
position:sticky;
left:0;
background:#fff;
z-index:10;
}

/* 縦横スクロール */

.table-scroll-wrapper{
width:100%;
max-width: 100%;
max-height: 500px;
overflow: auto;
-webkit-overflow-scrolling:touch;
border:1px solid #ddd;
position: relative;
border-radius:8px;
margin-bottom:20px;
}

.table-scroll-wrapper table{
min-width:auto;
}

/* variable商品のみ横スクロール */

.variable-specs{
min-width:600px;
}

/* =================================================
特長テーブル
================================================= */
.feature-table th:first-child{
background:#f5f5f5;
}

.feature-table th,
.feature-table td{
    white-space:normal;
    word-break:break-word;
    min-width:150px;
}

/* =================================================
simple商品スマホカード
================================================= */

@media (max-width:860px){

html{
overflow-x:hidden;
}

.product-content-wrapper{
overflow-x:hidden;
}

.simple-specs tr{
display:block;
border:1px solid #ddd;
border-radius:8px;
margin-bottom:12px;
background:#fff;
box-shadow:0 1px 4px rgba(0,0,0,0.08);
}

.simple-specs th,
.simple-specs td{
display:block;
width:100%;
border:none;
padding:6px 12px;
white-space:normal !important;
word-break:break-word;
overflow-wrap:anywhere;
}

.simple-specs th{
    font-weight:600;
}

.simple-specs td{
    font-size:15px;
}

}


/* =================================================
スマホレイアウト
================================================= */

@media (max-width:860px){

.inner-flex{
display:block;
}

.product-sidebar{
position:static;
width:100%;
margin-bottom:20px;
}

.spec-gallery{
flex-direction:column;
}

.spec-main-swiper{
width:100%;
max-width:none;
}

.spec-thumbs-swiper{
width:100%;
height:70px;
margin-left:0;
}

.spec-thumbs-swiper .swiper-wrapper{
flex-direction:row!important;
}

.spec-thumbs-swiper .swiper-slide{
width:90px!important;
}

}

/*----------------------------------------------------
製品図面ダウンロードテーブル
----------------------------------------------------*/

/* ダウンロードリンクのスタイル */
.drawing-download-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}
.drawing-download-link:hover {
    background-color: #005177;
}

/* データがない場合のスタイル */
.no-drawing-data {
    color: #888;
    font-size: 0.9em;
}

/*----------------------------------------------------
製品動画ギャラリー
----------------------------------------------------*/
/* product-video-gallery のスタイル */
.product-video-gallery {
    display: flex;
    flex-wrap: wrap; /* 画面幅に応じて折り返す */
    gap: 20px;
    margin-bottom: 20px;
}

/* レスポンシブ対応のためのコンテナ */
.video-wrapper {
    /* 必要に応じて動画の最大幅を設定 */
    width: 100%; 
    flex-grow: 1;
    position: relative;
    padding-bottom: 56.25%; /* 16:9のアスペクト比を維持 (315/560 * 100 = 56.25) */
    height: 0;
    overflow: hidden;
}

/* iframe をコンテナいっぱいに広げる */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/*----------------------------------------------------
Q&A一覧
----------------------------------------------------*/

#faq .qa-item {
    padding: 12px 0;
}

#faq .qa-question {
    margin-bottom: 6px;
    font-size: clamp(1rem, 1.2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 0.5em;
}

#faq .qa-q-label {
  position: relative;
  background: #0073aa;
  color: #fff;
  font-weight: bold;
  font-size: 0.8rem;
  padding: 0.2em 0.6em;
  border-radius: 6px;
  line-height: 1;
  margin-top: 0.2em;
}

/* 吹き出しの三角 */
#faq .qa-q-label::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -9px;
  border-width: 5px;
  border-style: solid;
  border-color: #0073aa transparent transparent transparent;
}

#faq .qa-answer {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    margin-left: 1em;
    background-color: #fafafa;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    border: 1px solid #eee;
}

#faq .qa-label {
    flex: 0 0 auto;
    margin-right: 0.5em;
    font-weight: bold;
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 0 0.6em;
    background: #ff0000;
    border-radius: 6px;
    font-size: 0.8rem;
    color:#fff;
}

#faq .qa-label::before {
    content: "";
    position: absolute;
    top: 23px;
    left: 9px;
    border-width: 8px;
    border-style: solid;
    border-color: #ff0000 transparent transparent transparent;
}

#faq .qa-text {
    flex: 1;
    font-size: clamp(0.95rem, 1.1vw, 1.05rem);
    line-height: 1.8;
}

#faq .qa-text p {
    margin: 0 0 0.5em;
}

@media (max-width: 768px) {
    #faq .qa-item {
    margin-bottom: 1.5rem;
    padding:1rem;
    }

    #faq .qa-question {
    font-size: 1rem;
    line-height: 1.5;
    }

    #faq .qa-answer {
    padding: 0.75rem;
    margin-left: 0.5em;
    padding: 0.8rem;
    }

    #faq .qa-label {
    font-weight: bold;
    }

    #faq .qa-text {
    line-height: 1.8;
    }

    #faq .qa-question {
    margin-bottom: 0.5rem;
    }

}

/*----------------------------------------------------
ダウンロード・問合せ
----------------------------------------------------*/
/* ダウンロード・問合せセクション */
.document-contact-wrapper h3 {
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
}

.document-contact-wrapper .item-grid {
    display: grid;
    /* 3列表示 */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px;
    margin-bottom: 40px;
}

/* カードのスタイル */
.document-contact-wrapper .grid-item a {
    display: block;
    text-decoration: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    height: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
    text-align: center;
}

.document-contact-wrapper .grid-item a:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.document-contact-wrapper .card-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.document-contact-wrapper .card-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.document-contact-wrapper .card-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #eeeeee; /* ボタンの色 */
    border-radius: 4px;
    font-size: 0.9em;
    margin-top: 10px;
}

.document-contact-wrapper .contact-card .card-button {
    background-color: #28a745; /* 問い合わせは別色 */
}

/*----------------------------------------------------
セール表示
----------------------------------------------------*/

.wc-block-grid__product-onsale,.onsale{
    position: relative;
    background: #dc143c ;
    color: white;
    font-size:18px;
    border:none;
    margin: 0;        /* 標準マージンをリセット */
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 3px;
    line-height: 1;
}

/* 標準のセールバッジのスタイル */
.custom-product-left .onsale {
    position: absolute;
    top: 10px;        /* 上からの位置 */
    left: 10px;       /* 左からの位置 */
    z-index: 10;
}

/* ★ 期間表示のスタイル（セールバッジの横に配置する調整） */
.custom-product-left .sale-period-info {
    position: absolute;
    top: 11px;        /* セールバッジと同じ高さ */
    left: 90px;       /* セールバッジの幅+余白分、右にずらす (おおよその値) */
    z-index: 10;
    padding: 5px 10px;
    line-height: 1;
}
.single-product div.product .single-sale-period-info::before,
.custom-product-left .sale-period-info::before{
    font-family: FontAwesome;
    font-weight: 900;/*矢印の太さ*/
    font-size: 12px;/*矢印のサイズ*/
    color: #dc143c ;/*矢印の色（黒）*/
    content:"\f054";
    margin-right: 6px;
}

.single-product div.product .single-sale-period-info,
.custom-product-left .sale-period-info{
    background-color: #eeeeee;
    border-radius: 4px;
    font-size: 14px;
}

/* ================================================= */
/* 商品詳細ページ (Single Product) のセール期間調整 */
/* ================================================= */
/* セール情報全体を横並びにするための調整（もし縦に並ぶ場合） */
.single-product div.product .single-sale-period-info {
    display: inline-block; /* インラインブロックで横並びを試みる */
    margin-right: 15px; /* セールバッジと期間の間に隙間を空ける */
    /* その他フォントサイズなど、見た目の調整 */
    position: absolute;
    top: 2px;
    left: 80px;
    font-weight: bold;
    padding: 0 10px;
}


/*----------------------------------------------------
読みこみ時のちらつき防止
----------------------------------------------------*/

/* 商品ページ：JS制御エリアは初期非表示 */
.single-product .quote-buy-buttons-wrapper,
.single-product .js-add-to-quote-btn,
.single-product .js-add-to-quote-simple-btn,
.single-product .quantity,
.single-product .buy-here-btn,
.single-product .js-quote-message,
.single-product .simple-quote-message {
  visibility: hidden;
}

/* JS初期化後に表示を許可 */
.single-product.buy-options-initialized .quote-buy-buttons-wrapper,
.single-product.buy-options-initialized .js-add-to-quote-btn,
.single-product.buy-options-initialized .js-add-to-quote-simple-btn,
.single-product.buy-options-initialized .quantity,
.single-product.buy-options-initialized .buy-here-btn,
.single-product.buy-options-initialized .js-quote-message,
.single-product.buy-options-initialized .simple-quote-message {
  visibility: visible;
}

/*----------------------------------------------------
ページトップへ戻るボタン
----------------------------------------------------*/


.page-top {
  position: fixed !important;
  right: -80px;
  bottom: 80px; /* ★ここを変更 */

  width: 60px;
  height: 80px;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  background: #0d62aa;
  color: #fff;

  border-radius: 10px 0 0 10px;
  cursor: pointer;

  opacity: 0;
  visibility: hidden;

  transition: all .3s ease;
  z-index: 9999;
}

.page-top.is-active {
  right: 0;
  opacity: 1;
  visibility: visible;
}

.page-top i {
  font-size: 26px;
  margin-bottom: 4px;
}

.page-top p {
  margin: 0;
  font-size: 13px;
  letter-spacing: 2px;
}

/*
展示会に出展中の表示
*/

.single-product div.product .summary .product_title {
    display: inline-block;
    vertical-align: middle;
}
.exhi-title-wrap {
    display: inline-block;
    vertical-align: middle;
}

.exhi-badge {
  background: #e60023;
  color: #fff;
  padding: 4px 8px;
  font-size: 12px;
  margin-left: 5px;
}

.exhi-title-wrap {
  display: inline-block;
  margin-left: 10px;
}

.summary h1.product_title {
  display: inline-block;
}

/*
関連部品
*/

.related-parts-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
    gap:20px;
}

@media (max-width:768px){

    .related-parts{  position:relative;}

    .related-parts-grid{
        display:flex;
        gap:12px;
        overflow-x:auto;
        padding-bottom:10px;

        scroll-snap-type:x mandatory;
        -webkit-overflow-scrolling:touch;

        scrollbar-width:none;
        justify-content:flex-start;
    }

    .related-parts-grid::scroll-button(*){
        border: none;
        font-size: 2rem;
        background: none;
        opacity: 0.7;
        cursor: pointer;
        position: absolute;  
        top: 50%;   
        transform:translateY(-50%);
        width:44px;
        height:44px;
        cursor:pointer;
    }

    .related-parts-grid::scroll-button(left) {
        content: "◀" / "前へ";
        font-size:1.5rem;
        left: 4px;
    }

    .related-parts-grid::scroll-button(right) {
        content: "▶" / "次へ";
        font-size:1.5rem;
        right: 4px;
    }

    .related-parts-grid::-webkit-scrollbar{
        display:none;
    }

    .related-parts-grid .product-card{
        flex:0 0 180px;
        width:180px;

        scroll-snap-align:start;
    }
}