/*-----------------------------------------------
商品一覧ページデザイン
-------------------------------------------------*/
.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 img {
    width: 250px;
    height: auto;
}

.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;
    word-wrap: break-word;
}

.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: 768px) {

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

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

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

    .custom-product-excerpt {
        white-space: nowrap;
    }

    /* 右側（カタログ & デモ機/動画 & 商品を見る） */
    .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-thumbs-swiper {
    width: 100%;
    margin-top: 10px;
}

.product-thumbs-swiper .swiper-slide {
    width: 20%;
    opacity: 0.5;
}

.product-thumbs-swiper .swiper-slide-thumb-active {
    opacity: 1;
}

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

@media (max-width: 768px) {
  .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;
}

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

.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 解除 + 下げる */
    }

}


/*----------------------------------------------------
製品詳細情報テーブル
----------------------------------------------------*/
.spec-table tbody tr:nth-child(2n) td {
    background-color: transparent !important;
}
/* スクロール用ラッパー */
.table-scroll-wrapper {
    width: 100%;
    max-width: 1000px; /* これは必要 */
    flex: 1 1 auto;    /* ← これを追加するとレイアウトが安定します */
    max-height: 500px;
    overflow: auto;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* テーブル本体 */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    min-width: max-content; /* 横スクロールを成立させる */
    background: white;
}

.simple-specs th, .simple-specs td, 
.variable-specs th, .variable-specs td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    white-space: nowrap;
    text-align: center;
    display: table-cell;
}
.simple-specs th {
    width: 30%; /* 縦型テーブルのヘッダー幅を調整 */
    background-color: #f5f5f5;
}
.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;
}

.simple-specs td:first-child,.variable-specs td:first-child{
    position: sticky;
    left: 0;
    z-index: 10;
}

/* 行 hover （全列） */
.simple-specs tbody tr:hover td,
.variable-specs tbody tr:hover td {
    background-color: #f0f0f0 !important;
}

/*------------------------------------
 SKU ギャラリー（レイアウト最適化）
------------------------------------*/
.sku-custom-gallery {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    width: 100%;
    margin: 30px 0;      /* ←余白追加 */
    box-sizing: border-box;
}

/*------------------
 メイン画像 Swiper
------------------*/
.main-swiper {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 650px;     /* ←安定のため追加 */
}

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

/*------------------
 サムネイル（PC）
------------------*/
.thumbs-swiper {
    width: 120px;
    height: 500px;
    margin-left: 10px;     /* ←右端に詰まりすぎる問題の解決 */
}

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

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

.thumbs-swiper img {
    width: 100%;
    display: block;
    border: 1px solid #ddd;
}

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

/*------------------
 スマホ（横並び）
------------------*/
@media (max-width: 768px) {

    .sku-custom-gallery {
        flex-direction: column;
    }

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

    .thumbs-swiper {
        width: 100%;
        height: 110px;
        overflow: hidden;
        margin-left: 0;  /* SP は不要 */
    }

    .thumbs-swiper .swiper-slide {
        width: 90px !important;
        height: fit-content;
    }

    .thumbs-swiper .swiper-wrapper {
        flex-direction: row !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 {
    font-weight: bold;
    margin-bottom: 6px;
}

#faq .qa-answer {
    padding: 0.5rem 1rem 0.5rem 1rem;
    margin-left: 1em;
    display: flex;
    background-color: #fafafa;
    border-radius: 10px;
}

/*----------------------------------------------------
ダウンロード・問合せ
----------------------------------------------------*/
/* ダウンロード・問合せセクション */
.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;
}
