/* BeatLatin Home — Playlists actualizadas (product-lockup Apple)
 *
 * PC: 5 enteras + peek · móvil: 2 + peek
 * Rocket minify: no calc(var(a) + var(b))
 */

.bl-home-playlists {
	position: relative;
	overflow: visible;
	margin-bottom: 36px;
	font-family: var(--bl-font);
}

.bl-home-playlists__header {
	margin-bottom: 12px;
}

.bl-home-playlists__section-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2941176471;
	letter-spacing: -0.01em;
	color: var(--bl-system-primary, hsla(0, 0%, 100%, 0.92));
}

.bl-home-playlists__title-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: inherit;
	text-decoration: none;
}

.bl-home-playlists__title-link:hover {
	opacity: 0.92;
	color: inherit;
}

.bl-home-playlists__title-link .fa-chevron-right {
	font-size: 0.72em;
	opacity: 0.75;
}

.bl-home-playlists__shelf {
	position: relative;
	overflow: visible;
}

.bl-home-playlists__shelf-arrow {
	position: absolute;
	/* Centro vertical del artwork (resta bloque meta ~44px) */
	top: calc((100% - 44px) / 2);
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 52px;
	padding: 0 !important;
	margin: 0;
	border: none !important;
	border-radius: 1000px !important;
	cursor: pointer;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
	will-change: opacity;
	color: rgba(245, 245, 247, 0.72) !important;
	background: rgba(255, 255, 255, 0.10) !important;
	background-color: rgba(255, 255, 255, 0.10) !important;
	backdrop-filter: blur(24px) saturate(185%);
	-webkit-backdrop-filter: blur(24px) saturate(185%);
	box-shadow:
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.14),
		0 4px 14px rgba(0, 0, 0, 0.22) !important;
	transition:
		background-color 0.25s linear,
		color 0.25s linear,
		opacity 0.25s linear;
	-webkit-appearance: none;
	appearance: none;
	outline: none !important;
}

.bl-home-playlists__shelf-arrow[hidden] {
	display: none !important;
}

.bl-home-playlists__shelf-arrow-icon {
	width: 8.5px;
	height: 30.5px;
	fill: currentColor !important;
	flex-shrink: 0;
}

.bl-home-playlists__shelf-arrow-icon--right {
	transform: scaleX(-1);
}

.bl-home-playlists__shelf-arrow--left {
	left: 0;
	right: auto;
	translate: -10px -50%;
}

/* PC: 5 + peek · gap 14 · art cap 223.2px */
.bl-home-playlists__shelf-arrow--right {
	right: calc(14px + min(223.2px, calc((100% - 56px) / 5.04)) * 0.04);
	left: auto;
	translate: 10px -50%;
}

.bl-home-playlists__shelf-arrow:hover,
.bl-home-playlists__shelf-arrow:focus,
.bl-home-playlists__shelf-arrow:focus-visible,
.bl-home-playlists__shelf-arrow:active {
	color: #ffffff !important;
	background: rgba(255, 255, 255, 0.16) !important;
	background-color: rgba(255, 255, 255, 0.16) !important;
	border: none !important;
	outline: none !important;
}

.bl-home-playlists__shelf-arrow:focus-visible {
	opacity: 1;
	pointer-events: auto;
	outline: 2px solid rgba(255, 255, 255, 0.35) !important;
	outline-offset: 2px;
}

.bl-home-playlists.is-shelf-hover .bl-home-playlists__shelf-arrow:not([hidden]) {
	opacity: 1;
	pointer-events: auto;
}

.bl-home-playlists.is-at-start .bl-home-playlists__shelf-arrow--left {
	display: none !important;
}

.bl-home-playlists.is-at-end .bl-home-playlists__shelf-arrow--right {
	display: none !important;
}

.bl-home-playlists__viewport {
	overflow: hidden;
	width: 100%;
}

@media (min-width: 1025px) {
	.bl-home-playlists__viewport {
		box-sizing: border-box;
		width: calc(100% + var(--bl-bleed-left, 256px) + var(--bl-bleed-right, 12px));
		max-width: none;
		margin-left: calc(-1 * var(--bl-bleed-left, 256px));
		margin-right: calc(-1 * var(--bl-bleed-right, 12px));
		padding-left: var(--bl-bleed-left, 256px);
		padding-right: var(--bl-bleed-right, 12px);
	}
}

.bl-home-playlists__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 14px;
	list-style: none;
	margin: 0;
	padding: 0;
	transition: transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1);
	will-change: transform;
}

/* Desktop 1920: 5 enteras + peek · 4×14 = 56 · art cap Apple ~223.2px */
.bl-home-playlists__item {
	flex: 0 0 min(223.2px, calc((100% - 56px) / 5.04));
	width: min(223.2px, calc((100% - 56px) / 5.04));
	max-width: min(223.2px, calc((100% - 56px) / 5.04));
	min-width: 0;
	box-sizing: border-box;
}

.bl-home-playlists__card {
	position: relative;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.bl-home-playlists__art-wrap {
	position: relative;
}

.bl-home-playlists__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.bl-home-playlists__art {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 7px;
	overflow: hidden;
	background: var(--bl-art-bg, rgba(255, 255, 255, 0.06));
	isolation: isolate;
	box-shadow:
		0 1px 1px rgba(0, 0, 0, 0.01),
		0 2px 2px rgba(0, 0, 0, 0.01),
		0 4px 4px rgba(0, 0, 0, 0.02),
		0 8px 8px rgba(0, 0, 0, 0.03),
		0 14px 14px rgba(0, 0, 0, 0.03);
}

.bl-home-playlists__art img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bl-home-playlists__art-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: var(--bl-system-secondary, hsla(0, 0%, 100%, 0.55));
	font-size: 28px;
}

/* Scrim Apple --scrimOpacity */
.bl-home-playlists__shade {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: rgba(51, 51, 51, 0.3);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.1s ease-in;
	z-index: 1;
}

.bl-home-playlists__controls {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 2;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

.bl-home-playlists__play {
	position: absolute;
	left: 10px;
	bottom: 10px;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0 !important;
	margin: 0;
	border: none !important;
	border-radius: 50% !important;
	cursor: pointer;
	color: #fff !important;
	background: rgba(255, 255, 255, 0.22) !important;
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	box-shadow:
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.22),
		0 2px 8px rgba(0, 0, 0, 0.22);
	transition: background-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
}

.bl-home-playlists__play .bl-home-playlists__play-icon,
.bl-home-playlists__play .bl-home-playlists__pause-icon {
	display: block;
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.bl-home-playlists__play .bl-home-playlists__pause-icon {
	display: none;
}

.bl-home-playlists__card .bl-search-result__menu-wrap {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 3;
	pointer-events: auto;
}

.bl-home-playlists__options {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 28px !important;
	height: 28px !important;
	min-width: 28px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	cursor: pointer;
	color: #fff !important;
	background: rgba(255, 255, 255, 0.22) !important;
	backdrop-filter: blur(20px) saturate(180%);
	-webkit-backdrop-filter: blur(20px) saturate(180%);
	box-shadow:
		inset 0 0 0 0.5px rgba(255, 255, 255, 0.22),
		0 2px 8px rgba(0, 0, 0, 0.22);
}

/* product-lockup__content: margin-top 4px */
.bl-home-playlists__meta {
	margin-top: 4px;
	min-width: 0;
	text-align: start;
}

/* --callout · systemPrimary · clamp 2 */
.bl-home-playlists__title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	margin: 0;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2307692308;
	letter-spacing: -0.01em;
	color: var(--bl-system-primary, hsla(0, 0%, 100%, 0.92));
	text-decoration: none;
	word-break: break-word;
}

.bl-home-playlists__title:hover {
	color: var(--bl-system-primary, hsla(0, 0%, 100%, 0.92));
	text-decoration: underline;
}

.bl-home-playlists__card--no-nav .bl-home-playlists__title:hover {
	text-decoration: none;
}

/* --callout · systemSecondary · margin-top 1px */
.bl-home-playlists__author {
	margin-top: 1px;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2307692308;
	letter-spacing: -0.01em;
	color: var(--bl-system-secondary, hsla(0, 0%, 100%, 0.55));
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	line-clamp: 1;
	overflow: hidden;
}

.bl-home-playlists__tracks-json {
	display: none;
}

@media (hover: hover) and (pointer: fine) {
	.bl-home-playlists__card:hover .bl-home-playlists__shade,
	.bl-home-playlists__card:focus-within .bl-home-playlists__shade {
		opacity: 1;
	}

	.bl-home-playlists__card:hover .bl-home-playlists__controls,
	.bl-home-playlists__card:focus-within .bl-home-playlists__controls {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Reproduciendo: scrim + play (pausa) + ⋯ fijos — igual que Novedades */
.bl-home-playlists__card.now-playing .bl-home-playlists__shade {
	opacity: 1;
}

.bl-home-playlists__card.now-playing .bl-home-playlists__controls {
	opacity: 1;
	pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
	.bl-home-playlists__card.now-playing .bl-home-playlists__play {
		background: rgba(255, 255, 255, 0.34) !important;
	}
}

/* Touch: al tocar la card se muestran play + ⋯ (antes el click iba al single). */
@media (pointer: coarse) {
	.bl-home-playlists__card.is-touch-active .bl-home-playlists__shade,
	.bl-home-playlists__card.now-playing .bl-home-playlists__shade {
		opacity: 1;
	}

	.bl-home-playlists__card.is-touch-active .bl-home-playlists__controls,
	.bl-home-playlists__card.now-playing .bl-home-playlists__controls {
		opacity: 1;
		pointer-events: auto;
		visibility: visible;
	}
}

.bl-home-playlists__card--no-nav .bl-home-playlists__title {
	cursor: default;
}

.bl-home-playlists__card.now-playing:not(.paused) .bl-home-playlists__play-icon {
	display: none;
}

.bl-home-playlists__card.now-playing:not(.paused) .bl-home-playlists__pause-icon {
	display: block;
}

.bl-home-playlists__card.now-playing.paused .bl-home-playlists__play-icon {
	display: block;
}

.bl-home-playlists__card.now-playing.paused .bl-home-playlists__pause-icon {
	display: none;
}

/* Tablet: 3 + peek */
@media (max-width: 1024px) {
	.bl-home-playlists__track {
		gap: 14px;
	}

	.bl-home-playlists__item {
		flex: 0 0 calc((100% - 28px) / 3.04);
		width: calc((100% - 28px) / 3.04);
		max-width: calc((100% - 28px) / 3.04);
	}

	.bl-home-playlists__shelf-arrow--right {
		right: calc(14px + (100% - 28px) / 3.04 * 0.04);
	}
}

/* QHD: 6 + peek */
@media (min-width: 2560px) {
	.bl-home-playlists__track {
		gap: 16px;
	}

	.bl-home-playlists__item {
		flex: 0 0 calc((100% - 80px) / 6.04);
		width: calc((100% - 80px) / 6.04);
		max-width: calc((100% - 80px) / 6.04);
	}

	.bl-home-playlists__shelf-arrow--right {
		right: calc(16px + (100% - 80px) / 6.04 * 0.04);
	}
}

/* Móvil: 2 enteras + peek · swipe · sin flechas */
@media (max-width: 767px) {
	.bl-home-playlists {
		margin-bottom: 28px;
	}

	.bl-home-playlists__shelf-arrow {
		display: none !important;
	}

	.bl-home-playlists__viewport {
		touch-action: pan-y;
		-webkit-overflow-scrolling: touch;
		/* El JS hace axis-lock + preventDefault en swipe X */
	}

	.bl-home-playlists__track {
		gap: 12px;
	}

	/* 2 + peek 0.22 → / 2.22 · 1 gap × 12 = 12 */
	.bl-home-playlists__item {
		flex: 0 0 calc((100% - 12px) / 2.22);
		width: calc((100% - 12px) / 2.22);
		max-width: calc((100% - 12px) / 2.22);
	}
}

[data-theme="light"] .bl-home-playlists__section-title,
[data-theme="light"] .bl-home-playlists__title {
	color: var(--bl-system-primary, rgba(0, 0, 0, 0.88));
}

[data-theme="light"] .bl-home-playlists__author {
	color: var(--bl-system-secondary, rgba(0, 0, 0, 0.56));
}

[data-theme="light"] .bl-home-playlists__shelf-arrow,
[data-theme="light"] .bl-home-playlists__shelf-arrow:hover,
[data-theme="light"] .bl-home-playlists__shelf-arrow:focus,
[data-theme="light"] .bl-home-playlists__shelf-arrow:focus-visible,
[data-theme="light"] .bl-home-playlists__shelf-arrow:active {
	color: rgba(29, 29, 31, 0.55) !important;
	background: rgba(255, 255, 255, 0.78) !important;
	background-color: rgba(255, 255, 255, 0.78) !important;
	box-shadow:
		inset 0 0 0 0.5px rgba(0, 0, 0, 0.07),
		0 4px 14px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .bl-home-playlists__shelf-arrow:hover,
[data-theme="light"] .bl-home-playlists__shelf-arrow:focus-visible {
	color: rgba(29, 29, 31, 0.92) !important;
	background: rgba(255, 255, 255, 0.92) !important;
	background-color: rgba(255, 255, 255, 0.92) !important;
}
