@charset "utf-8";

/* =========================================
   Heading
   ========================================= */
.product-list__heading {
    margin: 0 auto 30px auto;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.6;
}

/* =========================================
   Model List（flex版）
   ========================================= */

.model-list {
	width:96%;
	margin:20px auto;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.model-list .model-card {
	flex: 0 0 calc((100% - 20px * 3) / 4); /* PC: 4列 */
	min-width: 0;
}

/* =========================================
   Model Card
   ========================================= */

.model-card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 10px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: box-shadow 0.2s, border-color 0.2s;
	text-decoration: none;
	color: inherit;
}

.model-card:hover {
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	border-color: #ccc;
}

/* 商品画像 */
.model-card__img-box {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;   /* はみ出し防止 */
}

.model-card__img-box img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.model-card__img-box--empty {
    color: #ccc;
    font-size: 12px;
}

/* SP */
@media (max-width: 600px) {
    .model-card__img-box {
        height: 140px;
    }
}

/* 型番 */
.model-card__model {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 1.2rem;
	color: #333;
}

/* 商品名 */
.model-card__name {
	height:70px;
	font-size:11px;
	line-height: 1.4;
	color: #555;
	flex-grow: 1;
}

/* 価格 */
.model-card__price {
	font-weight: bold;
	color: #0a58ca;
	text-align: right;
	font-size: 0.9rem;
}

/* 在庫バッジエリア */
.model-card__meta {
	padding:5px 0 0 0;
	display: flex;
	flex-wrap: wrap;
	flex-direction:row-reverse;
	gap: 4px;
	border-top:1px solid #eee;
}

/* =========================================
   Badge
   ========================================= */

.badge {
	display: block;
	padding: 0;
	background: #fff;
	font-size: 11px;
	font-weight:bold;
}
.badge--price{
	/*position:absolute;
	bottom:10px;
	right:10px;*/
}


/* =========================================
   Responsive
   ========================================= */

@media (max-width: 900px) {
	.model-list .model-card {
		flex: 0 0 calc((100% - 20px * 2) / 3); /* タブレット: 3列 */
	}
}

@media (max-width: 600px) {
	.model-list {
		gap: 10px;
	}
	.model-list .model-card {
		flex: 0 0 calc((100% - 10px) / 2); /* SP: 2列 */
		padding: 10px;
	}
	.model-card__img {
		height: 140px;
	}
	.model-card__img--empty {
		height: 140px;
	}
	.model-card__code {
		font-size: 1rem;
	}
	.model-card__name {
		font-size: 0.85rem;
	}
}
