/* CSS Document */

#main{
	margin-bottom: clamp(80px, calc(160 / 992 * 100dvw), 160px);
}

#detail{
	display: grid;
	grid-template-columns: var(--wrap);
	justify-content: center;
	margin-top: clamp(16px, calc(32 / 992 * 100dvw), 32px);
	& h2{
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 0.5em;
		font-weight: 700;
		font-size: clamp(20px, calc(36 / 768 * 100dvw), 36px);
		letter-spacing: 0.1em;
		&:before{
			content: "";
			width: 4px;
			height: 1em;
			background: var(--color-theme);
			transform: translateY(calc(0.825em - 50%));
		}
	}
	#text{
		margin-top: clamp(24px, calc(32 / 992 * 100dvw), 32px);
	}
	#photo{
		grid-row: 2;
		margin-top: clamp(24px, calc(32 / 992 * 100dvw), 32px);
	}
	#status{
		grid-row: 3;
		margin-top: clamp(24px, calc(32 / 992 * 100dvw), 32px);
	}
	#cart{
		margin-top: clamp(40px, calc(80 / 992 * 100dvw), 80px);
	}
	@media (min-width: 992px) {
		#photo,
		#status{
			width: calc(50% - 20px);
		}
		#photo{
			grid-column: 1;
			align-self: start;
		}
		#status{
			grid-column: 1;
			grid-row: 2;
			justify-self: end;
			align-self: start;
		}
	}
}

#text{
	font-weight: 500;
}

#photo{
	& img{
		aspect-ratio: 3 / 2;
		object-fit: contain;
		background: #eee;
		border-radius: 4px;
	}
}

#status{
	& dl{
		display: grid;
		border-bottom: 1px solid #dedede;
	}
	& dt,
	& dd{
		padding: 1em;
		font-weight: 500;
	}
	& dt{
		display: grid;
		column-gap: 1em;
		background: var(--color-theme);
		color: #fff;
		font-weight: 700;
		z-index: 1;
		&.acids{
			grid-template-columns: 1fr auto;
			&:after{
				content: "\5FC5\9808";
				align-self: start;
				display: grid;
				align-items: center;
				min-height: 16px;
				padding: 0.25em 0.5em;
				background: var(--color-error);
				border-radius: 2px;
				color: #fff;
				font-weight: 700;
				font-size: 12px;
				letter-spacing: 0.05em;
				line-height: 1;
				transform: translateY(0.4em);
			}
		}
	}
	& dd{
		& a:not(:hover){
			text-decoration: none;
		}
	}
	@media (min-width: 576px) {
		& dl{
			grid-template-columns: auto 1fr;
		}
		& dt,
		& dd{
			border-top: 1px solid #dedede;
		}
		& dt{
			min-width: 10em;
			max-width: 20em;
		}
	}
}

#cart{
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	grid-gap: 16px 24px;
	& p{
		width: 100%;
		margin-bottom: 16px;
		text-align: center;
	}
	& ul{
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		grid-gap: 16px 24px;
	}
	& li{
		display: contents;
	}
	& a{
		display: grid;
		align-items: center;
		min-width: min(100%, 420px);
		min-height: clamp(48px, calc(64 / 768 * 100dvw), 64px);
		padding: 0.25em 1.5em;
		background: #fff;
		border: 1px solid currentColor;
		border-radius: clamp(24px, calc(32 / 768 * 100dvw), 32px);
		color: var(--color-theme);
		font-weight: 700;
		font-size: clamp(14px, calc(18 / 768 * 100dvw), 18px);
		text-align: center;
		text-decoration: none;
		cursor: pointer;
		&:hover{
			background: var(--color-theme);
			border-color: transparent;
			color: #fff;
		}
		&[data-id]{
			&.deleteCart{
				background: #ddd;
				border-color: transparent;
				color: inherit;
			}
			&.limit{
				background: #ccc;
				border-color: transparent;
				color: inherit;
				pointer-events: none;
			}
		}
		&.cart{
			grid-template-columns: 1fr auto;
			align-items: center;
			column-gap: 0.5em;
			padding: 0.25em 1.5em 0.25em 2em;
			&:after{
				content: "";
				aspect-ratio: 1;
				width: 16px;
				background: currentColor;
				-webkit-mask: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polyline points="5.6 3.2 10.4 8 5.6 12.8" style="fill: none; stroke: black; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"/></svg>') no-repeat center / 16px;
			}
			@media (min-width: 768px) {
				&:after{
					-webkit-mask-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><polyline points="4.8 1.6 11.2 8 4.8 14.4" style="fill: none; stroke: black; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2px;"/></svg>');
				}
			}
		}
	}
}







