/*
 * Akibara QuickView — trigger en card + sheet <dialog>.
 *
 * Bottom-sheet en móvil (donde vive el 70% del tráfico), modal centrado en
 * desktop. Tokens --aki-* del theme con fallback. El anillo de foco lo pinta
 * el theme (--aki-focus-ring en button:focus-visible): acá NO se declara
 * ningún outline (lección de los anillos dobles, 2026-07-27).
 */

.akb-qv-trigger {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin-top: 4px;
	padding: 6px 10px;
	color: var(--aki-gray-300, #b0b0b0);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	touch-action: manipulation;
	cursor: pointer;
	background: transparent;
	border: 1px solid var(--aki-border-light, #333);
	border-radius: 3px;
}

.akb-qv-trigger:hover {
	color: var(--aki-white, #fff);
	border-color: var(--aki-gray-300, #b0b0b0);
}

/* ─── Sheet ────────────────────────────────────────────────────── */

.akb-qv {
	box-sizing: border-box;
	width: min(560px, calc(100vw - 32px));
	max-height: min(82dvh, 720px);
	padding: 0;
	overflow: hidden auto;
	color: var(--aki-gray-100, #f0f0f0);
	background: var(--aki-surface-2, #1a1a1a);
	border: 1px solid rgb(255 255 255 / 18%);
	border-radius: 6px;
	box-shadow: 0 24px 80px rgb(0 0 0 / 55%);
}

.akb-qv::backdrop {
	background: rgb(0 0 0 / 72%);
}

.akb-qv__head {
	position: sticky;
	top: 0;
	box-sizing: border-box;
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 12px 12px 12px 16px;
	background: var(--aki-surface-3, #222);
	border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.akb-qv__title {
	margin: 0;
	color: var(--aki-white, #fff);
	font-size: 18px;
	line-height: 1.3;
}

.akb-qv__close {
	box-sizing: border-box;
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	color: var(--aki-white, #fff);
	touch-action: manipulation;
	cursor: pointer;
	background: transparent;
	border: 1px solid rgb(255 255 255 / 28%);
	border-radius: 3px;
}

.akb-qv__close:hover {
	background: rgb(255 255 255 / 10%);
}

.akb-qv__body {
	display: grid;
	grid-template-columns: 132px 1fr;
	gap: 16px;
	padding: 16px;
}

.akb-qv__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	aspect-ratio: 2 / 3;
	object-fit: cover;
}

.akb-qv__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin-bottom: 10px;
	font-size: 14px;
}

.akb-qv__synopsis {
	margin: 0 0 14px;
	color: var(--aki-gray-300, #b0b0b0);
	font-size: 14px;
	line-height: 1.6;
}

.akb-qv__actions {
	margin-bottom: 12px;
}

.akb-qv__actions .button,
.akb-qv__actions .add_to_cart_button {
	width: 100%;
	text-align: center;
}

.akb-qv__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--aki-red-text, #ff4756);
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ─── Bottom-sheet móvil ───────────────────────────────────────── */

@media (max-width: 767px) {
	.akb-qv {
		position: fixed;
		inset: auto 0 0 0;
		width: 100%;
		max-width: none;
		max-height: 84dvh;
		margin: 0;
		padding-bottom: env(safe-area-inset-bottom, 0px);
		border-right: 0;
		border-bottom: 0;
		border-left: 0;
		border-radius: 12px 12px 0 0;
		animation: akb-qv-rise 0.22s ease-out;
	}

	.akb-qv__body {
		grid-template-columns: 104px 1fr;
	}
}

@keyframes akb-qv-rise {
	from { transform: translateY(24px); opacity: 0.4; }
	to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.akb-qv {
		animation: none;
	}
}
