@charset "UTF-8";

/* ====================================
   商品リスト（Article）ページ専用スタイル（article テンプレート用）
   ※ stocks.css と同名クラスあり（.stocks-grid, .stock-card, .badge 等）
   ※ _main.php のテンプレート別自動読み込みにより同時には読み込まれない
   ==================================== */

/* ヘッダーセクション */
.page-header {
	margin-bottom: 1.5em;
}

.post-meta {
	text-align: right;
	font-size: 0.85em;
	color: light-dark(#666, #aaa);
	margin-top: -0.5em;
}

.post-meta .created {
	margin-right: 1em;
}

/* 販売先情報 */
.venue-info {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	margin: 1em 0;
	padding: 1em;
	background: light-dark(#f8f8f8, #2a2a2a);
	border-radius: 6px;
	border: 1px solid light-dark(#e0e0e0, #444);
}

/* 画像・地図エリア */
.venue-media {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.75em;
}

.venue-media-item {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 4px;
	background: light-dark(#e0e0e0, #333);
}

.venue-photo img {
	width: 100%;
	height: 100%;
	/* object-fit: cover; */
	object-fit: contain;
}

.venue-map iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.venue-details {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5em 1em;
}

.venue-name {
	font-weight: bold;
	font-size: 1.1em;
	color: light-dark(#333, #eee);
}

.venue-location {
	font-size: 0.9em;
	color: light-dark(#555, #bbb);
}

.venue-note {
	width: 100%;
	font-size: 0.85em;
	line-height: 1.6;
	color: light-dark(#666, #999);
}

@media (max-width: 767px) {
	.venue-media {
		grid-template-columns: 1fr;
	}
}

.description-header,
.description-footer {
	margin: 1em 0;
	line-height: 1.8;
}
.description-header p,
.description-footer p{
}
.description-header p + p,
.description-footer p + p{
	margin-top: 1em;
}

/* フィルターエリア */
.article-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1em;
	margin-bottom: 1em;
}

/* カテゴリフィルター */
.category-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

/* 売り切れ表示チェック */
.sold-filter {
	font-size: 0.85em;
	color: light-dark(#666, #aaa);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.3em;
}

.sold-filter input {
	cursor: pointer;
}

.filter-btn {
	padding: 0.3em 0.6em;
	border: 1px solid light-dark(#ddd, #555);
	border-radius: 3px;
	background: light-dark(#f5f5f5, #3a3a3a);
	color: light-dark(#555, #aaa);
	cursor: pointer;
	font-size: 0.8em;
}

.filter-btn:hover:not(:disabled) {
	background: light-dark(#eee, #1a1a1a);
	color: light-dark(#333, #ddd);
}

.filter-btn.active {
	background: light-dark(#333, #ddd);
	color: light-dark(#fff, #222);
	border-color: light-dark(#333, #ddd);
}

.filter-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ====================================
   生体グリッド - 詳細表示（デフォルト）
   ==================================== */

.stocks-grid {
	display: flex;
	flex-direction: column;
}

.stock-card {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 0.75em;
	align-items: start;
	padding: 1em 0;
	border-bottom: 1px solid light-dark(#ddd, #444);
}

/* 写真エリア */
.stock-photo-area {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

/* メイン写真 */
.stock-photo {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: 4px;
}

.stock-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	cursor: pointer;
}

/* 情報エリア */
.stock-info {
	display: flex;
	flex-direction: column;
	gap: 0.25em;
}

/* 名前行 */
.name-line {
	line-height: 1;
}

.name-line .species-name {
	font-weight: bold;
	font-size: 1.1em;
}

.name-line .variety {
	font-size: 0.9em;
	color: light-dark(#555, #bbb);
}

.name-line .scientific-name {
	font-size: 0.7em;
	font-style: italic;
	color: light-dark(#666, #999);
}

/* 基本情報行（産地・CB/WC・性別・価格を1行に） */
.info-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
}

.info-line .basic-info {
	font-weight: bold;
	color: light-dark(#444, #ddd);
}

.info-line .price {
	font-weight: bold;
	font-size: 1.25em;
	color: light-dark(#d32f2f, #ff6b6b);
}

/* 販売状況バッジ */
.badge {
	font-size: 0.7em;
	font-weight: normal;
	padding: 0.2em 0.6em;
	border-radius: 3px;
	margin-left: 0.5em;
	vertical-align: middle;
}

.badge-sold {
	background: light-dark(#ffebee, #5c2828);
	color: light-dark(#c62828, #ff8a80);
}

.badge-pending {
	background: light-dark(#fff3e0, #5c4a28);
	color: light-dark(#ef6c00, #ffb74d);
}

/* 商品説明（詳細表示のみ） */
.description {
	font-family: 'Noto Sans JP', sans-serif;
	font-size: 0.8em;
	line-height: 1.5;
	color: light-dark(#333, #ccc);
	margin: 0.5em 0 0;
	padding: .5em .75em;
	background: light-dark(#eee, #2a2a2a);
	max-height: max(20em,60vh);
	overflow-y: auto;
}

/* サブ写真（詳細表示のみ・写真エリア内に配置） */
.sub-photos {
	display: flex;
	gap: 4px;
	padding: 4px;
	flex-wrap: wrap;
	background: light-dark(#e8e8e8, #1a1a1a);
}

.sub-photos img {
	width: 72px;
	height: 72px;
	object-fit: cover;
	cursor: pointer;
	transition: opacity 0.2s;
}

.sub-photos img:hover {
	opacity: 0.8;
}

/* 個体なし表示 */
.no-stocks {
	padding: 3em;
	text-align: center;
	color: light-dark(#666, #999);
	background: light-dark(#f5f5f5, #2a2a2a);
	border-radius: 4px;
}

/* 売約済み・交渉中のオーバーレイ */
.stock-card[data-sale-status="2"],
.stock-card[data-sale-status="3"] {
	position: relative;
	padding-left: 1em;
	padding-right: 1em;
}

.stock-card[data-sale-status="2"]::after,
.stock-card[data-sale-status="3"]::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	pointer-events: none;
}

/* ====================================
   生体グリッド - 簡易表示（テーブル風）
   60pxサムネ + 横1行情報、高密度一覧
   ==================================== */

.stocks-grid--compact {
	gap: 1px;
	background: light-dark(#ddd, #444);
	border: 1px solid light-dark(#ddd, #444);
	border-radius: 4px;
	overflow: hidden;
}

.stocks-grid--compact .stock-card {
	grid-template-columns: 60px 1fr;
	align-items: center;
	padding: 0;
	border: none;
	border-radius: 0;
	background: light-dark(#fff, #2a2a2a);
}

.stocks-grid--compact .stock-photo {
	aspect-ratio: 1 / 1;
	width: 60px;
	border-radius: 0;
}


.stocks-grid--compact .name-line .species-name {
	font-size: 0.9em;
}

.stocks-grid--compact .name-line .variety {
	font-size: 0.8em;
}

.stocks-grid--compact .name-line .scientific-name {
	font-size: 0.65em;
}

.stocks-grid--compact .info-line {
	font-size: 0.75em;
}

.stocks-grid--compact .info-line .price {
	font-size: 1.1em;
}

.stocks-grid--compact .badge {
	font-size: 0.7em;
	padding: 0.1em 0.4em;
}

/* ====================================
   レスポンシブ対応
   ==================================== */

@media (max-width: 767px) {
	/* SP: 詳細表示は縦積み */
	.stock-card {
		grid-template-columns: 1fr;
	}

	.sub-photos img {
		width: 60px;
		height: 60px;
	}
}
