/*
 * 2026-11 renew float — PC 최근 본 + AI 추천 레일 · 모바일 맨 위로
 * 시안: sense2_float.html / sense2_m_main_view2.html
 * PC: absolute + 스크롤 추종 (레거시 quickmenu와 동일). 접힘 = 우측 끝 탭.
 */

body.renew-shop .quickmenu {
	display: none;
}

/* PC rail — 72px · 스크롤에 따라 top 갱신 · 접기/펼치기 opacity+slide */
.renew-float {
	z-index: 160;
	position: absolute;
	/* JS가 .renew-hero 아래로 park. 초기 220은 히어로 침입 → 충분히 아래 기본값 */
	top: 1200px;
	right: 16px;
	display: none;
	flex-direction: column;
	align-items: center;
	width: 72px;
	padding: 12px 0 0;
	border: 1px solid var(--renew-line);
	background: var(--renew-surface);
	box-shadow: 0 12px 32px rgba(20, 50, 58, 0.08);
	font-family: var(--renew-sans);
	color: var(--renew-ink);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(10px);
	/* top 추종 + 접기/펼치기 — display:none 대신 opacity/transform */
	transition:
		top 0.45s cubic-bezier(0.22, 0.7, 0.25, 1),
		opacity 0.28s var(--renew-ease),
		visibility 0.28s var(--renew-ease),
		transform 0.28s var(--renew-ease);
	will-change: top, opacity, transform;
}

/* Route pin 스크롤 중 — top 추종 transition만 끄기 (fixed 전환 없이 플리커 방지) */
html.is-renew-route-pinning .renew-float,
html.is-renew-route-pinning .renew-float-reopen {
	transition:
		opacity 0.28s var(--renew-ease),
		visibility 0.28s var(--renew-ease),
		transform 0.28s var(--renew-ease);
}

@media (min-width: 992px) {
	.renew-float.is-ready {
		display: flex;
	}

	.renew-float.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateX(0);
	}

	/* display:none 금지 — 트랜지션용으로 자리만 숨김 */
	.renew-float.is-collapsed {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transform: translateX(14px);
	}
}

.renew-float__label {
	margin: 0;
	padding: 0 6px;
	font-size: 10px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	color: var(--renew-muted);
}

.renew-float__label strong {
	display: block;
	margin-top: 2px;
	font-weight: 500;
	color: var(--renew-ink);
}

.renew-float__label--ai {
	color: var(--renew-accent);
}

.renew-float__label--ai strong {
	color: var(--renew-accent);
	font-weight: 500;
}

.renew-float__thumbs {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.renew-float__thumb {
	z-index: 0;
	position: relative;
	display: block;
	width: 52px;
	height: 64px;
	background: var(--renew-bg-warm);
	overflow: hidden;
}

.renew-float__thumb img {
	position: absolute;
	inset: 10%;
	display: block;
	width: 80%;
	height: 80%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.renew-float__thumb-dot {
	z-index: 1;
	position: absolute;
	top: 3px;
	right: 3px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--renew-accent);
}

.renew-float__rule {
	width: 40px;
	height: 1px;
	margin: 4px 0;
	background: var(--renew-line);
}

.renew-float__ai {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.renew-float__ai[hidden] {
	display: none;
}

.renew-float__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	width: 100%;
	margin-top: 6px;
	border-top: 1px solid var(--renew-line);
}

/* button. 접두 — custom.css button:hover #26c0bb 차단 */
button.renew-float__action {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-right: 1px solid var(--renew-line);
	border-radius: 0;
	background: transparent;
	background-color: transparent;
	box-shadow: none;
	color: var(--renew-muted);
	font-size: 13px;
	transition:
		background-color var(--renew-dur-fast) var(--renew-ease),
		color var(--renew-dur-fast) var(--renew-ease);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

button.renew-float__action:last-child {
	border-right: 0;
	color: var(--renew-ink);
}

/* 차분한 stone 배경 (opacity 대신) */
button.renew-float__action:hover,
button.renew-float__action:active {
	background: var(--renew-bg-warm);
	background-color: var(--renew-bg-warm);
	box-shadow: none;
	color: var(--renew-ink);
}

button.renew-float__action:focus-visible {
	outline: var(--renew-focus, 2px solid var(--renew-accent));
	outline-offset: -2px;
}

button.renew-float__action .renew-icon {
	display: block;
}

/*
 * 접힘 탭 (W4) — 오른쪽 끝 · 최근 1썸네일 + Viewed N / AI N + chevron
 * border-right:0 으로 화면 가장자리에 붙음
 */
button.renew-float-reopen {
	z-index: 160;
	position: absolute;
	top: 1200px;
	right: 0;
	display: none;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	width: auto;
	margin: 0;
	padding: 12px 8px;
	border: 1px solid var(--renew-line);
	border-right: 0;
	border-radius: 0;
	background: var(--renew-surface);
	background-color: var(--renew-surface);
	box-shadow: 0 12px 32px rgba(20, 50, 58, 0.08);
	color: var(--renew-ink);
	font-family: var(--renew-sans);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(12px);
	transition:
		top 0.45s cubic-bezier(0.22, 0.7, 0.25, 1),
		background-color var(--renew-dur-fast) var(--renew-ease),
		opacity 0.28s var(--renew-ease),
		visibility 0.28s var(--renew-ease),
		transform 0.28s var(--renew-ease);
	will-change: top, opacity, transform;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

button.renew-float-reopen:hover,
button.renew-float-reopen:active {
	background: var(--renew-bg-warm);
	background-color: var(--renew-bg-warm);
	box-shadow: 0 12px 32px rgba(20, 50, 58, 0.08);
	color: var(--renew-ink);
}

button.renew-float-reopen:focus-visible {
	outline: var(--renew-focus, 2px solid var(--renew-accent));
	outline-offset: 2px;
}

@media (min-width: 992px) {
	/* is-ready: 레이아웃 유지 · is-visible: 페이드/슬라이드 인 */
	button.renew-float-reopen.is-ready {
		display: flex;
	}

	button.renew-float-reopen.is-visible {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateX(0);
	}
}

.renew-float-reopen__thumb {
	position: relative;
	display: block;
	width: 52px;
	height: 64px;
	background: var(--renew-bg-warm);
	overflow: hidden;
	pointer-events: none;
}

.renew-float-reopen__thumb img {
	position: absolute;
	inset: 10%;
	display: block;
	width: 80%;
	height: 80%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.renew-float-reopen__meta {
	margin: 0;
	font-size: 10px;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
	color: var(--renew-ink);
}

.renew-float-reopen__ai {
	color: var(--renew-accent);
}

.renew-float-reopen__chev {
	display: block;
	color: var(--renew-ink);
}

/* hover card — 시안: 이미지(72) | 텍스트+액션 */
.renew-float-card {
	z-index: 170;
	position: fixed;
	display: none;
	box-sizing: border-box;
	grid-template-columns: 72px minmax(0, 1fr);
	column-gap: 14px;
	align-items: start;
	width: 280px;
	padding: 14px;
	border: 1px solid var(--renew-line);
	background: var(--renew-surface);
	box-shadow: 0 24px 48px rgba(20, 50, 58, 0.14);
	font-family: var(--renew-sans);
	color: var(--renew-ink);
	pointer-events: auto;
}

.renew-float-card.is-open {
	display: grid;
}

a.renew-float-card__media {
	position: relative;
	display: block;
	width: 72px;
	aspect-ratio: 4 / 5;
	background: var(--renew-bg-warm);
	overflow: hidden;
	color: inherit;
	text-decoration: none;
}

a.renew-float-card__media:hover,
a.renew-float-card__media:active {
	color: inherit;
	text-decoration: none;
}

.renew-float-card__media img {
	position: absolute;
	inset: 10%;
	display: block;
	width: 80%;
	height: 80%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.renew-float-card__main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	min-width: 0;
}

a.renew-float-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	margin: 0;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

a.renew-float-card__body:hover,
a.renew-float-card__body:active {
	color: inherit;
	text-decoration: none;
}

a.renew-float-card__body:hover .renew-float-card__name {
	opacity: 0.72;
}

.renew-float-card__brand {
	margin: 0;
	font-size: 10px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--renew-muted);
}

.renew-float-card__name {
	margin: 3px 0 0;
	font-family: var(--renew-serif-en);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: var(--renew-ls-tight);
	transition: opacity var(--renew-dur-fast) var(--renew-ease);
}

.renew-float-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 6px 0 0;
	font-size: 13px;
	line-height: 1.3;
}

.renew-float-card__was {
	font-size: 12px;
	color: var(--renew-muted);
	text-decoration: line-through;
}

.renew-float-card__was:empty {
	display: none;
}

.renew-float-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	font-size: 12px;
	color: var(--renew-muted);
}

.renew-float-card__rating .renew-icon {
	flex: none;
	color: var(--renew-ink);
}

.renew-float-card__reason {
	margin: 6px 0 0;
	font-family: var(--renew-serif-en);
	font-size: 14px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.35;
	color: var(--renew-accent);
}

.renew-float-card__reason:empty {
	display: none;
}

.renew-float-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
}

/* 시안 .btn.f — pill 36px · renew fill (custom a:hover 틸 차단) */
a.renew-float-card__bag {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	height: 36px;
	padding: 0 14px;
	border-radius: var(--renew-radius-pill, 999px);
	border: 1px solid transparent;
	background: var(--renew-ink);
	background-color: var(--renew-ink);
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: var(--renew-surface, #fff);
	text-decoration: none;
	white-space: nowrap;
	transition:
		background-color var(--renew-dur-fast) var(--renew-ease),
		color var(--renew-dur-fast) var(--renew-ease);
}

a.renew-float-card__bag:hover,
a.renew-float-card__bag:active {
	background: var(--renew-ink-deep, #0f262c);
	background-color: var(--renew-ink-deep, #0f262c);
	color: var(--renew-surface, #fff);
	text-decoration: none;
	opacity: 1;
}

button.renew-float-card__wish {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border-radius: var(--renew-radius-pill, 999px);
	border: 1px solid transparent;
	background: transparent;
	background-color: transparent;
	box-shadow: inset 0 0 0 1px var(--renew-ink);
	color: var(--renew-ink);
	transition:
		background-color var(--renew-dur-fast) var(--renew-ease),
		color var(--renew-dur-fast) var(--renew-ease),
		opacity var(--renew-dur-fast) var(--renew-ease);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

button.renew-float-card__wish:hover,
button.renew-float-card__wish:active {
	background: var(--renew-bg-warm);
	background-color: var(--renew-bg-warm);
	box-shadow: inset 0 0 0 1px var(--renew-ink);
	color: var(--renew-ink);
	opacity: 1;
}

button.renew-float-card__wish.is-on {
	background: var(--renew-ink);
	background-color: var(--renew-ink);
	box-shadow: none;
	color: var(--renew-surface, #fff);
}

button.renew-float-card__wish.is-on:hover,
button.renew-float-card__wish.is-on:active {
	background: var(--renew-ink-deep, #0f262c);
	background-color: var(--renew-ink-deep, #0f262c);
	color: var(--renew-surface, #fff);
}

/* 모바일 맨 위로 — sense2_m_main_view2 */
button.renew-float-top {
	z-index: 160;
	position: fixed;
	right: 16px;
	bottom: 16px;
	display: none;
	justify-content: center;
	align-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	border: 1px solid var(--renew-line);
	background: rgba(255, 255, 255, 0.94);
	background-color: rgba(255, 255, 255, 0.94);
	box-shadow: 0 6px 18px rgba(20, 50, 58, 0.14);
	color: var(--renew-ink);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
	transition:
		opacity var(--renew-dur) var(--renew-ease),
		visibility var(--renew-dur) var(--renew-ease),
		transform var(--renew-dur) var(--renew-ease);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

button.renew-float-top:hover,
button.renew-float-top:active {
	background: rgba(255, 255, 255, 0.94);
	background-color: rgba(255, 255, 255, 0.94);
	color: var(--renew-ink);
}

button.renew-float-top .renew-icon {
	display: block;
}

@media (max-width: 991px) {
	button.renew-float-top.is-visible {
		display: inline-flex;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		transform: translateY(0);
	}

	button.renew-float-top {
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	}

	body.renew-header-lock button.renew-float-top {
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.renew-float,
	button.renew-float-reopen,
	button.renew-float-top {
		transition: none;
		will-change: auto;
		transform: none;
	}
}
