/* ======================================================
   商品詳細レイアウト
   ※他ページに影響を与えないよう、ここにまとめて定義しています。
========================================================= */

/* コンテナ全体 */
.product_detail_container {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}

/* 左側：画像エリア */
.product_gallery {
    width: 100%;
}
.main_image_wrap {
    border: 1px solid #ccc;
    background: #fff;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.main_image_wrap img {
    width: 100%;
    height: auto;
    display: block;
}
.thumbnail_list {
    display: -webkit-flex;
    display: flex;
    gap: 10px;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
}
.thumb_img_wrap {
    width: calc(25% - 8px); /* 4枚横並び（余白10pxを考慮） */
    box-sizing: border-box;
    cursor: pointer;
}
.thumb_img_wrap img {
    width: 100%;
    height: auto;
    border: 2px solid #ddd;
    padding: 2px;
    background: #fff;
    transition: all 0.2s ease;
    border-radius: 2px;
    box-sizing: border-box;
}
.thumb_img_wrap:hover img {
    opacity: 0.8;
    border-color: #357451;
}
.thumb_img_wrap.active img {
    border-color: #7ab03d; /* アクティブ時の枠線カラー */
}

/* プレースホルダー時のアクティブ枠線調整 */
.thumb_img_wrap.active .image-placeholder {
    border-color: #7ab03d;
    background: linear-gradient(135deg, #e1ebdf 0%, #f0f7ef 100%);
}

/* 右側：商品情報エリア */
.product_info {
    width: 100%;
}
.product_meta {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #ccc;
}
.product_price {
    font-size: 24px;
    font-weight: bold;
    color: #e60012;
    margin-top: 10px;
}
.product_price span {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* 商品特徴リスト */
.feature_sec {
    margin-bottom: 35px;
}

/* 仕様表テーブル */
.spec_sec {
    margin-bottom: 35px;
}
.tbl_pt01 th {
    width: 25%; /* テーブルの項目幅を一定に固定 */
}

/* PDF・間伐材などの編集エリア */
.edit_action_box {
    background: #fcfbf6;
    border: 2px solid #e1ebdf;
    padding: 25px;
    margin-top: 30px;
    border-radius: 6px;
}
.edit_action_box p {
    font-size: 13px;
    line-height: 1.6;
}
.pdf_btn_wrap {
    margin-top: 20px;
}
.pdf_btn_wrap a {
    display: inline-block;
    padding: 12px 25px;
    color: #FFF;
    background: #c0392b; /* PDFらしいレッド */
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: 0.3s;
}
.pdf_btn_wrap a:hover {
    background: #a93226;
    text-decoration: none;
}
.pdf_btn_wrap i {
    margin-right: 8px;
}

/* WordPress動的出力アノテーション表示用スタイル */
.wp-annotation {
    font-size: 11px;
    color: #0073aa;
    background: #f0f6fb;
    border-left: 3px solid #0073aa;
    padding: 5px 8px;
    margin-bottom: 10px;
    font-family: monospace;
}

/* ======================================================
   タブレット・PCサイズ時の2カラム切り替え (768px以上)
 ========================================================= */
@media screen and (min-width: 768px) {
    .product_detail_container {
        -webkit-flex-direction: row;
        flex-direction: row;
        gap: 40px;
    }
    .product_gallery {
        width: 45%; /* 左側が45% */
        position: -webkit-sticky;
        position: sticky;
        top: 105px; /* スクロール時に追従 */
        height: -webkit-fit-content;
        height: fit-content;
    }
    .product_info {
        width: 50%; /* 右側が50% */
        margin-left: auto;
    }
    .product_detail_container {
        margin-top: 60px;
    }
}
