/* ======================================= */
/* 0. 基本リセットと共通スタイル */
/* ======================================= */
body {
    font-family: "Meiryo", "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Arial, sans-serif;
    background-color: #f5f3f2; /* ページ全体の薄い背景色 */
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    margin: 0 auto; /* 中央寄せ */
}
.container::after {
	content: "Copyright © 2025 ベロフジャパン株式会社 All rights Reserved.";
	display: block;
	background-color: #000;
	padding: 20px 20px;
	color: #999;
	text-align: center;
	font-size: 12px;
}

h1, h2, h3 {
    padding: 8px 5px 5px 15px;
    margin: 0 0 20px 0;
	display: inline-block;
	line-height: 1em;
	position: relative;
}
h2, h3 {
    padding: 8px 5px 5px 30px;
}
h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 100%;
  background-color: #0075a9; 
  transform: skewX(-15deg);
  z-index: 0;
}

#search,#caution,#result {
	background-color: #fff;
	padding: 30px;
	margin-bottom: 40px;
	border-radius: 12px;
}

/* ======================================= */
/* 1. ヘッダーとナビゲーション */
/* ======================================= */
.header {
    text-align: center;
    padding: 30px 0px;
	max-width: 100%;
    margin: 0 auto 30px auto;
	background-color: #000;
}

.header h1 {
    font-size: 38px;
    border-left: none;
    text-align: left;
    padding: 0 10px;
    margin: 0;
	line-height: 1.25em;
	color: #fff;
}
.main-content {
	max-width: 1000px;
    margin: 0 auto;
	padding: 10px;
}

/* ======================================= */
/* 2. 検索フォームセクション (検索ページ) */
/* ======================================= */
.search-section {
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fcfcfc;
}

.search-form-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px dashed #ddd; /* 点線で区切り */
    padding: 10px 0;
}

.search-form-group label {
    font-weight: bold;
    min-width: 150px;
    color: #555;
}

.required {
    color: #c9302c; /* 赤色で必須項目を強調 */
    font-size: 0.8em;
    margin-left: 5px;
    font-weight: normal;
}

select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1; /* 幅を広げる */
    max-width: 400px;
    background-color: #fff;
    font-size: 16px;
}

.primary-button {
    display: block;
    width: 250px;
    margin: 20px auto 0;
    padding: 12px 20px;
    background-color: #0075a9;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
	border: 1px solid #0075a9;
    border-radius: 0px;
    cursor: pointer;
    transition: 0.3s;
	border-radius: 5px;
}

.primary-button:hover {
    opacity: 0.75;
}


/* ボタンが押せない（無効化）状態のスタイル */
.primary-button:disabled,
button:disabled.primary-button {
	filter: grayscale(1);
	opacity: 0.4;
    cursor: not-allowed; /* マウスカーソルを禁止マークに */
}

.primary-button:disabled:hover,
button:disabled.primary-button:hover {
}

.secondary-button {
    display: block;
    width: 150px;
    margin: 20px auto 0;
    padding: 10px 15px;
    background-color: #e65c00; 
    color: white;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 3px 0 #b34700;
    transition: background-color 0.2s;    
}

/* ======================================= */
/* 3. 結果セクション (結果ページ) */
/* ======================================= */

/* 検索条件表示ボックス */
.conditions-box {
    border: 3px solid #0056b3; /* 青い太枠 */
    padding: 15px;
    margin-bottom: 40px;
    background-color: #f0f8ff; /* 薄い青の背景 */
}

.re-search-link {
    display: inline-block;
    background-color: #6c757d;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    margin-top: 10px;
    font-size: 0.9em;
}

.conditions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.conditions-table th, .conditions-table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
}

.conditions-table th {
    background-color: #e9ecef;
    width: 150px;
    font-weight: bold;
}

/* タブのスタイル */
.tabs-container {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #ccc;
}

.tab {
    padding: 10px 20px;
    border: 1px solid #ccc;
    border-bottom: none;
    margin-right: 5px;
    cursor: pointer;
    background-color: #e9ecef;
    font-weight: bold;
    text-align: center;
}

.tab.active {
    background-color: #0056b3; /* アクティブなタブはブランドカラー */
    color: white;
    border-color: #0056b3;
    position: relative;
    top: 1px;
}

/* 個別結果アイテムのスタイル */
.result-item {
    padding: 20px 0;
    margin-bottom: 20px;
    background-color: #fff;
	position: relative;
}
.product-title {
	display: block;
	text-align: center;
    font-size: 1.25em;
    color: #000;
    margin: 0 0 20px 0;
	border: 1px solid #eee;
    padding: 20px;
	position: relative;
	border-radius: 5px;
}
.product-title a {
    color: #000;
	text-decoration: none;
}
.product-title a:hover {
	text-decoration: underline;
}
.product-title::before {
	content: "";
	display: block;
	position: absolute;
	top: -33px;
	left: -40px;
	right: -40px;
	height: 5px;
	background-color: #f5f3f2;
}

.product-info {
    display: flex;
    gap: 0px 20px;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 0px 0px 20px 0px;
	position: relative;
	margin-bottom: 40px;
}
.product-info:last-child {
	margin-bottom: 0px;
}

.image-placeholder {
    width: 150px;
    height: 150px;
    background-color: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    border: 1px solid #ccc;
    flex-shrink: 0;
    max-width: 100%;
	margin-bottom: 10px;
}

.image-placeholder img {
    max-width: 100%;
    height: auto;
    display: block;
}

.item-details {
    flex: 1; /* 残りの横幅をすべて使う */
    min-width: 250px;
	margin-bottom: 10px;
}

/* --- 備考欄（右側） --- */
.item-remarks {
    flex: 1 1 100%; /* 横幅を100%に強制することで、次の行（下）に回り込ませる */
    margin-top: 10px; /* 詳細との間に少し隙間を作る */
    padding: 15px 15px;
    background-color: #fff;
    border: 1px dotted #ccc;
	border-radius: 5px;
    font-size: 0.9em;
    box-sizing: border-box; /* パディングを含めた幅計算にする */
}

.remarks-title {
    font-weight: bold;
    color: #666;
    border-bottom: 1px solid #eee;
    margin: 0 0 10px 0;
    display: block;
}

.tag {
    display: inline-block;
    padding: 3px 8px;
    margin-right: 5px;
    font-size: 0.8em;
    font-weight: bold;
    border-radius: 3px;
}

.new-tag {
    background-color: #c9302c; /* 赤 */
    color: white;
}

.feature-list {
    margin: 10px 0 10px 0;
    padding-left: 20px;
}

.details-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-bottom: 5px;
}

.details-table th, .details-table td {
    border: 1px solid #ccc;
    padding: 5px 10px;
}

.details-table th {
    background-color: #f0f0f0;
    width: 130px;
}

.external-link {
    color: #007bff;
    text-decoration: underline;
}

/* 2段目：exchange_image (製品画像+テーブルの幅に合わせる) */
.exchange-image-container {
    flex: 1 1 100%; /* 横幅いっぱい */
    margin-top: 10px;
}

.exchange-image-container img {
    width: 100%;     /* コンテナの幅いっぱいに広げる */
    max-width: 100%; /* はみ出し防止 */
    height: auto;
    display: block;
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* 3段目：備考欄 (100%幅で下に配置) */
.item-remarks {
    flex: 1 1 100%;
    margin-top: 15px;
    padding: 15px;
    border: 1px dotted #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.order-button-container {
    flex: 1 1 100%;
    text-align: right;
    margin-top: 15px;
}

.order-button {
    background-color: #df8127; /* 橙 */
    color: black;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* --- スマホ表示（画面幅768px以下）の調整 --- */
@media (max-width: 768px) {
    .product-info {
        flex-direction: column; /* 縦並びにする */
        align-items: center; /* 中央寄せ */
    }
    
    .image-placeholder {
        width: 100%; /* 横幅いっぱいに広げる（またはお好みのサイズに） */
        max-width: 300px; /* 大きくなりすぎない制限 */
		height: auto;
    }
	.search-form-group {
		display: block;
	}
	.search-form-group label {
		display: block;
	}
	.search-form-group select {
		display: block;
		width: 100%;
		max-width: 100%;
	}
}

/* --- レスポンシブ調整 --- */
@media (max-width: 900px) {
    .item-details {
        flex: 1 1 100%; /* 詳細を横いっぱいに */
		width: 100%;
    }
    .item-remarks {
        flex: 1 1 100%; /* 備考も横いっぱいに（詳細の下に回る） */
		width: 100%;
    }
}