@charset "UTF-8";

/*-------------------------------------------
 手動棚　共通設定
-------------------------------------------*/
.cp-shelf{
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2.6em 1.6em;
}

.cp-shelf__item{
	display: flex;
    flex-direction: column;
}

.cp-shelf__label-box{
    flex-grow:1;
    margin-bottom: 6px;
}

.cp-shelf__label{
	width: 100%;
    border: 1px solid #dddddd;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.3;
    color: #575757;;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 3px;

}

.cp-shelf__label--hidden{
    visibility: hidden;
}

a.cp-shelf__link{
	text-decoration: none;
    color: #222222;
}


.cp-shelf__img-box{
	display: block;
	/* 挿入される書影によって調整 */
	padding-top: min(140%, 250px);
	position: relative;
	margin-bottom: 6px;
}

.cp-shelf__img-box-inner{
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* タイトルがない場合のマージン */
.cp-shelf__link + .cp-shelf__btns{
	margin-top: 6px;
}

.cp-shelf__img{
	display: block;
    margin: 0 auto;
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    -o-object-fit: contain;
    object-fit: contain;
    border-radius: 0;

}

.cp-shelf__title{
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.5em;
    margin-bottom: 8px;
    min-height: 36px;
}

.cp-shelf__btns{
	display: grid;
	gap: 6px;
}


.cp-shelf__btn{
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 3px .2em;
	line-height: 1;
	font-size: clamp(11px , 2.8vw , 14px);
    opacity: 1;
	border-radius: 8px;
}

a.cp-shelf__btn--trial{
	line-height: 1;
	text-align: center;
	border: 1px solid #009141;
	color: #009141;
	text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 8px;
}

a.cp-shelf__btn--buy{
	line-height: 1;
	text-align: center;
	border: 1px solid #009141;
	background: #009141;
	color: #FFF;
	text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 8px;
}

/* 画像が正方形の場合 */
.shelf-square .cp-shelf__img-box{
    padding-top: min(100%, 250px);
}

/* ボタンがない時にはこのclassを追加 */
a.cp-shelf__btn--hidden{
	visibility: hidden;
}

@media screen and (min-width:600px) {
    .cp-shelf__title{
        -webkit-line-clamp: 1;
        min-height: 18px;
    }
}

@media screen and (min-width:769px) {
	.cp-shelf{
		grid-template-columns: repeat(6, 1fr);
	}
}

/* ラベルの色を変更 */
.shelf-label--bg-red .cp-shelf__label{
	border: 1px solid #cc0033;
	background: #cc0033;
	color: #FFFFFF;
	font-weight: bold;
}

.shelf-label--bg-green .cp-shelf__label{
	border: 1px solid #009141;
	background: #009141;
	color: #FFFFFF;
	font-weight: bold;
}

.shelf-label--bg-yellow .cp-shelf__label{
	border: 1px solid #535353;
	background: #ffff08;
	color: #222222;
	font-weight: bold;
}

.shelf-label--red .cp-shelf__label{
	border: 1px solid #cc0033;
	color: #cc0033;
	font-weight: bold;
}

.shelf-label--green .cp-shelf__label{
	border: 1px solid #009141;
	color: #009141;
	font-weight: bold;
}