/*
Name: USER VOICE（使ってみた感想）ページ 専用CSS
Path: /review/css/review.css
*/

/* ==========================================================================
   共通
   ========================================================================== */
/* .rv-side-card では display:flex を直接指定しているため、hidden属性のUA既定
   スタイル（display:none）が上書きされてしまいます。明示的に優先させる。 */
[hidden] {
	display: none !important;
}

.p-review .rv-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
}

.p-review .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	border-radius: 24px;
	font-size: 15px;
	font-weight: bold;
	letter-spacing: 0.05em;
	text-decoration: none;
	box-sizing: border-box;
}

.p-review .btn-primary {
	background: #457456;
	color: #fff;
}

.p-review .btn-primary:hover {
	opacity: 0.85;
}

.p-review .btn-secondary {
	background: #fff;
	color: #457456;
	border: 1px solid #457456;
}

.p-review .btn-secondary:hover {
	background: #F4F5F3;
}

/* ==========================================================================
   MV
   ========================================================================== */
.rv-mv {
	max-width: 1280px;
	margin: 0 auto;
}

@media screen and (min-width: 1001px) {
	.rv-mv {
		/* デスクトップは#headerがposition:fixedのため、その高さ分を確保 */
		margin-top: 70px;
	}
}

.rv-mv img {
	display: block;
	width: 100%;
	height: auto;
}

/* ==========================================================================
   商品セレクター
   ========================================================================== */
.rv-selector {
	padding: 50px 0 40px;
}

.rv-selector__ttl {
	margin: 0 0 24px;
	font-size: 24px;
	font-weight: bold;
	letter-spacing: 0.05em;
	color: #457456;
	text-align: center;
}

.rv-selector__wrap {
	position: relative;
}

.rv-selector__list {
	display: flex;
	flex-wrap: nowrap;
	justify-content: flex-start;
	gap: 24px;
	margin: 0 0 -14px;
	padding: 0 0 14px;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	touch-action: pan-x;
	cursor: grab;
}

.rv-selector__list:active {
	cursor: grabbing;
}

.rv-selector__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: opacity 0.2s, visibility 0.2s;
}

.rv-selector__nav:hover {
	background: rgba(0, 0, 0, 0.75);
}

.rv-selector__nav.is-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.rv-selector__nav--prev {
	left: -24px;
}

.rv-selector__nav--next {
	right: -24px;
}

.rv-selector__nav-arrow {
	display: block;
	width: 10px;
	height: 10px;
	border-top: 2px solid #fff;
	border-right: 2px solid #fff;
}

.rv-selector__nav--prev .rv-selector__nav-arrow {
	transform: rotate(-135deg);
	margin-right: -2px;
}

.rv-selector__nav--next .rv-selector__nav-arrow {
	transform: rotate(45deg);
	margin-left: -2px;
}

.rv-selector__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.rv-selector__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ddd;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}

.rv-selector__dot.is-active {
	background: #457456;
	transform: scale(1.25);
}

.rv-selector__list::-webkit-scrollbar {
	display: none;
}

.rv-selector__item {
	position: relative;
	flex: 0 0 calc((100% - 24px * 3) / 4);
	scroll-snap-align: start;
	padding: 20px 16px 16px;
	background: #F4F5F3;
	border: 2px solid transparent;
	border-radius: 8px;
	text-align: center;
	transition: background 0.2s, border-color 0.2s;
}

.rv-selector__item img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto;
	-webkit-user-drag: none;
	user-select: none;
}

.rv-selector__check {
	display: none;
	position: absolute;
	top: 10px;
	left: 10px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #457456;
}

.rv-selector__check::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 6px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: translate(-50%, -60%) rotate(-45deg);
}

.rv-selector__arrow {
	display: none;
	position: absolute;
	left: 50%;
	bottom: -14px;
	width: 0;
	height: 0;
	transform: translateX(-50%);
	border-left: 12px solid transparent;
	border-right: 12px solid transparent;
	border-top: 14px solid #457456;
}

.rv-selector__item.is-active {
	background: #fff;
	border-color: #457456;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.rv-selector__item.is-active .rv-selector__check {
	display: block;
}

.rv-selector__item.is-active .rv-selector__arrow {
	display: block;
}

/* ==========================================================================
   口コミエリア（review-box は review-card.css で管理）
   ========================================================================== */
.rv-voice {
	padding: 40px 0 60px;
	background: #F4F5F3;
}

.rv-voice .review-box {
	background: transparent;
	padding: 0;
}

.rv-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 16px;
	background: #fff;
	border-radius: 8px;
	padding: 40px 20px;
	margin-bottom: 20px;
}

.rv-rating__label {
	font-size: 14px;
	font-weight: bold;
	color: #457456;
}

.rv-rating__stars {
	position: relative;
	display: inline-block;
	font-size: 20px;
	letter-spacing: 2px;
	line-height: 1;
	color: #ddd;
}

.rv-rating__stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #EBC172;
}

.rv-rating__score {
	font-size: 32px;
	font-weight: bold;
	line-height: 1;
	color: #457456;
}

.rv-rating__count {
	font-size: 14px;
	color: #999;
}

.rv-rating__note {
	margin: 8px 0 20px;
	font-size: 12px;
	color: #999;
	text-align: center;
}

.rv-review-more {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	margin: 24px auto 0;
	padding: 8px;
	background: none;
	border: none;
	color: #457456;
	font-size: 14px;
	font-weight: bold;
	letter-spacing: 0.05em;
	cursor: pointer;
}

.rv-review-more:hover {
	opacity: 0.7;
}

.rv-review-more::after {
	content: "";
	width: 8px;
	height: 8px;
	border-right: 2px solid #457456;
	border-bottom: 2px solid #457456;
	transform: rotate(45deg);
	margin-top: -4px;
}

.review-card.is-entering {
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.review-card.is-entering.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.rv-review-more[hidden] {
	display: none;
}

.rv-voice__inner {
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

.rv-voice__main {
	flex: 1;
	min-width: 0;
}

.rv-voice__side {
	width: 280px;
	flex-shrink: 0;
	position: sticky;
	top: 132px;
}

.rv-side-card {
	background: #fff;
	border-radius: 8px;
	padding: 20px;
	text-align: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.rv-side-card img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto 12px;
}

.rv-side-card__name {
	margin: 0 0 8px;
	font-size: 15px;
	font-weight: bold;
	line-height: 1.5;
	color: #272727;
}

.rv-side-card__stars {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-bottom: 16px;
}

.rv-side-card__stars-visual {
	position: relative;
	display: inline-block;
	font-size: 16px;
	letter-spacing: 1px;
	line-height: 1;
	color: #ddd;
}

.rv-side-card__stars-fill {
	position: absolute;
	top: 0;
	left: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #EBC172;
}

.rv-side-card__score {
	font-size: 14px;
	font-weight: bold;
	color: #272727;
}

.rv-side-card__btns {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* ==========================================================================
   レスポンシブ（SP/タブレット）
   ========================================================================== */
@media screen and (max-width: 1000px) {
	.rv-rating {
		padding: 28px 16px;
		gap: 6px 12px;
	}

	.rv-rating__score {
		font-size: 26px;
	}

	.rv-selector {
		padding: 30px 0 30px;
	}

	.rv-selector__ttl {
		font-size: 18px;
		margin-bottom: 16px;
	}

	.rv-selector__item {
		padding: 12px 8px 8px;
	}

	.rv-voice {
		padding: 24px 0 40px;
	}

	.rv-voice__inner {
		flex-direction: column;
	}

	.rv-voice__side {
		width: 100vw;
		margin: 0 -20px;
		position: sticky;
		bottom: 0;
		top: auto;
		z-index: 10;
		background: #fff;
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
	}

	.rv-side-card {
		max-width: 420px;
		margin: 0 auto;
		box-shadow: none;
	}

	.rv-side-card__btns {
		flex-direction: row;
		gap: 8px;
	}

}

/* PC/タブレットまでは角丸カードのカルーセル。ここではスマートフォンだけ、
   端末幅まで見切れさせるための余白(bleed)を書き戻す。 */
@media screen and (max-width: 680px) {
	.rv-selector__list {
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 10px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		scroll-padding-left: 20px;
		touch-action: pan-x;
		padding: 0 20px 14px;
		margin: 0 -20px -14px;
	}

	.rv-selector__list::-webkit-scrollbar {
		display: none;
	}

	.rv-selector__item {
		flex: 0 0 65%;
		scroll-snap-align: start;
	}

	.rv-selector__nav {
		display: none;
	}

	.rv-voice__side {
		width: 100vw;
		max-width: none;
		margin: 0 -20px;
		position: sticky;
		bottom: 0;
		top: auto;
		z-index: 10;
		box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
	}

	.rv-side-card {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px 12px;
		text-align: left;
		border-radius: 0;
		padding: 12px 16px;
	}

	.rv-side-card__pic {
		display: block;
		flex-basis: 100%;
	}

	.rv-side-card__pic img {
		width: 100%;
		height: auto;
		margin: 0;
	}

	.rv-side-card__stars {
		flex-basis: 100%;
		justify-content: flex-start;
		margin-bottom: 0;
	}

	.rv-side-card__btns {
		flex-direction: row;
		flex-basis: 100%;
		width: 100%;
		gap: 8px;
	}

	.rv-side-card__btns .btn {
		flex: 1;
		height: 40px;
		font-size: 13px;
		white-space: nowrap;
	}
}
