@charset "UTF-8";

/* 全体レイアウト */
body {
    margin: 0 auto;
    max-width: 1200px;
}

/* タイトル */
h1 {
    display: table;
    font-size: 26px;
    margin-left: 0;
    width: 100%;

    span {
        background: whitesmoke no-repeat left;
        background-size: 200px;
        display: table-cell;
        height: 100px;
        padding-left: 220px;
        vertical-align: middle;
    }
}

/* サブカテゴリ全体 */
#subcate-wrap {
    h2 {
        border-bottom: 1px solid gray;
        border-left: 2px solid green;
        font-weight: bold;
        margin-left: 0;
        margin-right: 0;
        padding: 5px 0 5px 5px;
    }
    p {
        margin: 1em;
    }
    .orange {
        color: orangered;
        font-weight: bold;
    }

    /* --- トップブロック --- */
    #top-block {
        font-size: 14px;
        line-height: 1.6em;
        margin-bottom: 30px;

        p {
            font-size: 14px;
            line-height: 1.6em;
            margin-left: 0;
            margin-right: 0;
        }
        img {
            margin: 5px;
        }
        h3 {
            color: forestgreen;
            font-size: 15px;
            font-weight: bold;
            margin: 20px 0 10px;
        }
        .image-box {
            float: left;
            margin-bottom: 10px;
            margin-right: 10px;
            height: 200px;
            width: 280px;
            overflow: hidden;
        }
		.card-list {
		display: flex;
		flex-direction: column;
		gap: 24px;
		max-width: 800px;
		margin: 0 auto;

			.card {
			background: #fff;
			border-radius: 8px;
			box-shadow: 0 2px 8px #0001;
			padding: 0;
			overflow: hidden;
			display: flex;
			flex-direction: row;
			min-height: 150px;

				.card-image {
					flex: 4; /* 左4割 */
					max-width: 40%;
					background: #f5f5f5;
					display: flex;
					align-items: center;
					justify-content: center;
					overflow: hidden;

					img {
						width: 100%;
						height: 100%;
						object-fit: contain;
						display: block;
					}
				}

				.card-content {
					flex: 6; /* 右6割 */
					max-width: 60%;
					padding: 10px;
					display: flex;
					flex-direction: column;
					justify-content: center;
				}
				.card-content.full {
					flex: 1 1 100%;
					max-width: 100%;
				}
			}
		}
	}

    .list {
        margin: 0;

		.padding {
            display: none;
        }
    }

    #product-list-block {
        .list {
            display: flex;
            flex-wrap: wrap;
        }
        .product-box {
            background: whitesmoke;
            display: inline-block;
            margin: 0 0 10px;
            margin-right: 4px;
            padding-bottom: 32px;
            position: relative;
            vertical-align: top;
            width: 252px;

            &:last-child {
                margin-right: 0;
            }
            h4 {
                font-size: 14px;
                font-weight: bold;
                line-height: 1.2em;
                margin: 10px 0 5px;
                padding: 0 5px;
                text-align: center;

                a {
                    color: darkred;
                    text-decoration: none;

                    &:hover {
                        text-decoration: underline;
                    }
                }
            }
            .product-review-score {
                margin: 5px 0;
                text-align: center;

                a {
                    text-decoration: none;
                }
            }
            p {
                margin: 10px 0;
                padding: 0 10px;
            }
            p.description {
                max-height: 7em;
                line-height: 1.4em;
                margin: 5px 0 10px;
                overflow: hidden;
                clear: both;
            }
            p.product-link {
                margin: 0 60px;
                padding: 0;
                position: absolute;
                bottom: 5px;
                width: calc(100% - 120px);

                a {
                    background: darkorange;
                    border: 2px solid lightgray;
                    color: white;
                    display: block;
                    font-size: 15px;
                    line-height: 2em;
                    text-align: center;
                    text-decoration: none;

                    &:hover {
                        border-color: brown;
                        color: white;
                        opacity: 0.6;
                    }
                    i {
                        margin-right: 3px;
                    }
                }
            }
            div.column {
                padding: 0 5px;
            }
            div.productImg {
                float: left;
                margin-bottom: 5px;

                &:hover {
                    opacity: 0.6;
                }
            }
            div.productList {
                padding-left: 135px;
                text-align: right;
            }
        }
    }
    img.trim-center {
        position: relative;
        left: 50%;
        top: 50%;
        height: auto;
        width: 100%;
        transform: translate(-50%, -50%);
    }
    span.productSpecialPrice,
    span.productSalePrice,
    .stockWarning,
    span.coming {
        color: #ff0000;
        font-weight: bold;
    }
    span.productSpecialPriceSale {
        color: #ff0000;
        text-decoration: line-through;
    }
    img.viewDetail {
        margin: 1em 0em;
    }

    /* --- レシピ --- */
    #recipe-block {
        .list {
            display: flex;
            flex-wrap: wrap;
        }
        .recipe-box {
            display: inline-block;
            margin: 10px 10px 0 0;
            vertical-align: top;
            width: 130px;

            &:last-child {
                margin-right: 0;
            }
            a {
                text-decoration: none;

                &:hover img {
                    opacity: 0.5;
                }
            }
            .recipe-image-box {
                display: block;
                height: 100px;
                width: 130px;
                overflow: hidden;
            }
            .recipe-title {
                color: brown;
                display: block;
                font-weight: bold;
            }
            .recipe-by {
                color: gray;
                font-size: 12px;
                font-weight: normal;
                white-space: nowrap;
            }
        }
    }
}
