/* ─── Variables for ManMan Theme ─────────────────────────────────────────── */
.manman-vinyl-collection,
.manman-vinyl-nav-header,
.manman-vinyl-coming-soon-section,
.manman-vinyl-featured-section {
	--mm-bg-main:         #FAF7F2;
	--mm-bg-panel:        #EAE3D5;
	--mm-bg-card:         #FFFFFF;
	--mm-text-dark:       #3E332A;
	--mm-text-muted:      #82756A;
	--mm-accent-primary:  #C55E2B;
	--mm-accent-hover:    #A64E22;
	--mm-border:          #D8CEBE;
	--mm-radius-sm:       8px;
	--mm-radius-md:       12px;
	--mm-focus-ring:      rgba(197, 94, 43, 0.2);
	--mm-font-outfit:     "Outfit", "Inter", -apple-system, system-ui, sans-serif;
	--mm-font-sans:       "Inter", -apple-system, system-ui, sans-serif;
	--mm-font-serif:      "Playfair Display", "Lora", "Merriweather", "Times New Roman", serif;
}

.manman-vinyl-collection {
	margin: 2rem auto;
	font-family: var(--mm-font-sans);
	color: var(--mm-text-dark);
	width: 100%;
	clear: both;
	box-sizing: border-box;
}

.manman-vinyl-empty,
.manman-vinyl-no-results {
	text-align: center;
	padding: 3rem 2rem;
	background: var(--mm-bg-main);
	border: 1px dashed var(--mm-border);
	border-radius: var(--mm-radius-md);
	color: var(--mm-text-muted);
	font-size: 1.1rem;
	margin-top: 1rem;
}

/* ─── Navigation Header ───────────────────────────────────────────────────── */
.manman-vinyl-nav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 1rem;
	padding: 1.5rem 2rem;
	background: #111111;
	color: #fff;
	border-radius: var(--mm-radius-md);
	margin-bottom: 2rem;
	box-sizing: border-box;
}

.manman-vinyl-nav-brand {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.manman-vinyl-nav-icon svg {
	display: block;
	flex-shrink: 0;
}

.manman-vinyl-nav-title {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	color: #fff;
	font-family: var(--mm-font-serif);
	line-height: 1.2;
}

.manman-vinyl-nav-subtitle {
	font-size: 0.85rem;
	color: #888;
	margin-top: 0.2rem;
	font-family: var(--mm-font-sans);
}

.manman-vinyl-nav-tabs {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.manman-vinyl-nav-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1.25rem;
	border-radius: 999px;
	font-size: 0.9rem;
	font-weight: 600;
	color: #999;
	text-decoration: none !important;
	transition: all 0.2s ease;
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.1);
	font-family: var(--mm-font-sans);
}

.manman-vinyl-nav-tab:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	text-decoration: none !important;
}

.manman-vinyl-nav-tab.is-active {
	background: var(--mm-accent-primary);
	color: #fff !important;
	border-color: var(--mm-accent-primary);
}

.manman-vinyl-nav-count {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 999px;
	padding: 0.05rem 0.5rem;
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.6;
}

.manman-vinyl-nav-tab.is-active .manman-vinyl-nav-count {
	background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
	.manman-vinyl-nav-header {
		flex-direction: column;
		align-items: flex-start;
		padding: 1.25rem 1.5rem;
	}
	.manman-vinyl-nav-title { font-size: 1.2rem; }
}

/* ─── Toolbar (Search + Filters) ─────────────────────────────────────────── */
.manman-vinyl-toolbar {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: stretch;
	margin-bottom: 2.5rem;
}

/* Search bar + tab buttons sit on the same row */
.manman-vinyl-search-row {
	display: flex;
	align-items: flex-start; /* anchor to top so buttons align with the input, not the count para */
	gap: 1rem;
	padding-top: 10px;
}

.manman-vinyl-search-bar {
	flex: 1 1 0;
	min-width: 0;
}

/* ─── Inline tab buttons (Collection / Incoming) ──────────────────────────── */
.manman-vinyl-tab-buttons {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	height: 48px; /* matches .manman-vinyl-search-input height exactly */
}

.manman-vinyl-tab {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.55rem 1.1rem;
	border-radius: 40px;
	font-size: 0.82rem;
	font-weight: 600;
	font-family: var(--mm-font-outfit);
	letter-spacing: 0.02em;
	text-decoration: none !important;
	border: 1.5px solid var(--mm-border);
	color: var(--mm-text-muted);
	background: transparent;
	transition: border-color 0.2s, color 0.2s, background 0.2s;
	white-space: nowrap;
}

.manman-vinyl-tab:hover {
	border-color: var(--mm-accent-primary);
	color: var(--mm-accent-primary);
}

.manman-vinyl-tab.is-active {
	background: var(--mm-accent-primary);
	border-color: var(--mm-accent-primary);
	color: #fff;
}

.manman-vinyl-tab .manman-vinyl-nav-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.4em;
	padding: 0 0.35em;
	height: 1.4em;
	border-radius: 99px;
	font-size: 0.78em;
	font-weight: 700;
	background: rgba(255,255,255,0.22);
	color: inherit;
}

.manman-vinyl-tab:not(.is-active) .manman-vinyl-nav-count {
	background: rgba(0,0,0,0.08);
}

@media (max-width: 600px) {
	.manman-vinyl-search-row { flex-wrap: wrap; }
	.manman-vinyl-tab-buttons { width: 100%; justify-content: flex-end; }
}

.manman-vinyl-search-inner {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.manman-vinyl-search-icon {
	position: absolute;
	left: 1rem;
	display: flex;
	align-items: center;
	color: var(--mm-text-muted);
	pointer-events: none;
}

.manman-vinyl-search-input {
	width: 100%;
	height: 48px;
	padding: 0 2.75rem 0 3rem;
	font-size: 1rem;
	font-family: var(--mm-font-sans);
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-radius-sm);
	background: #FFFFFF;
	color: var(--mm-text-dark);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
}

.manman-vinyl-search-input::placeholder { color: #B5A89D; }

.manman-vinyl-search-input:focus {
	border-color: var(--mm-accent-primary);
	box-shadow: 0 0 0 3px var(--mm-focus-ring);
}

.manman-vinyl-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

.manman-vinyl-search-clear {
	position: absolute;
	right: 0.75rem;
	display: flex;
	align-items: center;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--mm-text-muted);
	padding: 0;
	transition: color 0.15s ease;
}

.manman-vinyl-search-clear:hover { color: var(--mm-accent-primary); }

.manman-vinyl-search-count {
	margin: 0.5rem 0 0 0.2rem;
	font-size: 0.85rem;
	color: var(--mm-text-muted);
	font-style: italic;
	min-height: 1.2em;
}

/* ─── Filters ─────────────────────────────────────────────────────────────── */
.manman-vinyl-filters {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	width: 100%;
}

.manman-vinyl-filters select {
	height: 48px;
	padding: 0 2.5rem 0 1.25rem;
	border: 1px solid var(--mm-border);
	border-radius: var(--mm-radius-sm);
	background-color: var(--mm-bg-main);
	font-size: 0.95rem;
	font-weight: 500;
	font-family: var(--mm-font-sans);
	color: var(--mm-text-dark);
	outline: none;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2382756A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	background-size: 1rem;
	transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
	flex: 1;
	min-width: 130px;
	box-sizing: border-box;
}

.manman-vinyl-filters select:hover,
.manman-vinyl-filters select:focus {
	border-color: var(--mm-accent-primary);
	background-color: #FFFFFF;
}

.manman-vinyl-filters select:focus {
	box-shadow: 0 0 0 3px var(--mm-focus-ring);
}

/* ─── Grid ────────────────────────────────────────────────────────────────── */
.manman-vinyl-grid {
	display: grid;
	grid-template-columns: repeat(var(--manman-cols, 4), minmax(180px, 1fr));
	gap: 1.5rem;
	width: 100%;
	align-items: stretch; /* all cards in a row grow to match the tallest one */
}

@media (max-width: 1024px) {
	.manman-vinyl-grid {
		grid-template-columns: repeat(min(var(--manman-cols, 4), 4), minmax(150px, 1fr));
	}
}

@media (max-width: 640px) {
	.manman-vinyl-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}

	/* Tighter card text on narrow 2-col grid */
	.manman-vinyl-card-body {
		padding: 0.65rem 0.75rem 0.75rem;
		gap: 0.15rem;
	}

	/*
	 * On mobile, drop the line-clamp so the title wraps freely.
	 * CSS Grid equalises row height to the tallest card — no overlap, no clipping.
	 * Reset the -webkit-box display back to block so the title behaves normally.
	 */
	.manman-vinyl-title {
		font-size: 0.8rem;
		line-height: 1.3;
		display: block;
		-webkit-line-clamp: unset;
		overflow: visible;
		white-space: normal;
	}

	.manman-vinyl-artist {
		font-size: 0.75rem;
		margin: 0 0 0.25rem 0;
	}

	/* Smaller badges so they fit side by side even on narrow cards */
	.manman-badge {
		font-size: 0.6rem;
		padding: 0.1rem 0.32rem;
	}
}

/* ─── Card ────────────────────────────────────────────────────────────────── */
.manman-vinyl-card {
	background: var(--mm-bg-card);
	border-radius: var(--mm-radius-md);
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(62, 51, 42, 0.07);
	border: 1px solid var(--mm-border);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	display: flex;
	flex-direction: column;
	cursor: default;
	height: 100%; /* fill the grid cell so all cards in a row share the same height */
}

.manman-vinyl-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 24px rgba(62, 51, 42, 0.12);
	border-color: var(--mm-accent-primary);
}

/* ─── Cover image area ────────────────────────────────────────────────────── */
.manman-vinyl-cover {
	position: relative;
	overflow: hidden;
	border-bottom: 1px solid var(--mm-border);
}

/* Ghost cover shield — invisible overlay that intercepts right-clicks so
   "Save Image As" is never offered on the actual <img> element. */
.manman-cover-shield {
	position: absolute;
	inset: 0;
	z-index: 10;
	background: transparent;
	cursor: default;
	-webkit-user-drag: none;
	user-drag: none;
}

/* ─── Vinyl disc placeholder ──────────────────────────────────────────────── */
/*
 * Always rendered; the actual cover image is stacked on top via position:absolute.
 * When a record has no cover (or the image 404s), the animated vinyl disc shows.
 */
.manman-vinyl-placeholder {
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #141414;
	display: flex;
	align-items: center;
	justify-content: center;
}

.manman-vinyl-disc {
	width: 76%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: radial-gradient(
		circle at center,
		var(--label-color, #c0392b) 0%,
		var(--label-color, #c0392b) 21%,
		#141414 22.5%,
		#252525 25%,
		#141414 27.5%,
		#252525 30%,
		#141414 32.5%,
		#252525 35%,
		#141414 37.5%,
		#252525 40%,
		#1a1a1a 100%
	);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow:
		0 0 0 2.5px #0a0a0a,
		inset 0 1px 3px rgba(255, 255, 255, 0.04);
}

.manman-vinyl-initials {
	font-size: 1.15rem;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.82);
	letter-spacing: 0.05em;
	user-select: none;
	font-family: var(--mm-font-outfit);
}

/* Cover image sits absolutely on top of the placeholder */
.manman-vinyl-cover-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: 2;
	transition: transform 0.4s ease, opacity 0.2s;
}

.manman-vinyl-card:hover .manman-vinyl-cover-img {
	transform: scale(1.03);
}

/* ─── Coming-soon ribbon ──────────────────────────────────────────────────── */
.manman-vinyl-badge-coming-soon {
	position: absolute;
	top: 1rem;
	right: -2rem;
	background: var(--mm-accent-primary);
	color: #FFFFFF;
	padding: 0.4rem 3rem;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	transform: rotate(45deg);
	z-index: 10;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	font-family: var(--mm-font-sans);
}

/* ─── Card body ───────────────────────────────────────────────────────────── */
/*
 * Cards within the same grid row are always the same height because CSS Grid
 * stretches all cells in a row to match the tallest one. No fixed height or
 * clipping needed — just let content breathe naturally.
 */
.manman-vinyl-card-body {
	padding: 0.85rem 1rem 0.95rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	flex: 1;       /* stretch to fill remaining card height after the image */
	min-height: 0; /* prevent flex blowout */
}

.manman-vinyl-title {
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--mm-text-dark);
	font-family: var(--mm-font-outfit);
	/* Allow wrapping up to 2 lines; clip anything beyond that */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.35;
	margin: 0;
}

.manman-vinyl-artist {
	font-size: 0.82rem;
	color: var(--mm-text-muted);
	font-family: var(--mm-font-outfit);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin: 0 0 0.4rem 0;
}

/* ─── Meta badges (Phase 3) ───────────────────────────────────────────────── */
.manman-vinyl-meta {
	display: flex;
	flex-wrap: wrap; /* wrap badges onto a second line rather than clipping */
	gap: 0.28rem;
	margin-top: 0.1rem;
}

.manman-badge {
	font-size: 0.68rem;
	font-weight: 700;
	padding: 0.12rem 0.42rem;
	border-radius: 3px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	white-space: nowrap;
	font-family: var(--mm-font-outfit);
}

/* Color-coded by badge type — matching Individual Vinyl Collection Page */
.manman-badge-genre { background: #fae8e6; color: #a93226; }
.manman-badge-year  { background: #e6eef7; color: #1f6390; }
.manman-badge-lang  { background: #e8f5eb; color: #1e7e34; }

/* ─── Pagination ──────────────────────────────────────────────────────────── */
.manman-vinyl-pagination {
	margin-top: 3rem;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 0.5rem;
	position: relative;
	min-height: 48px;
}

.manman-vinyl-page-info {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--mm-text-dark);
	padding: 0 1.25rem;
	min-width: 120px;
	text-align: center;
	user-select: none;
}

.manman-vinyl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--mm-bg-main);
	color: var(--mm-accent-primary);
	border: 2px solid var(--mm-accent-primary);
	border-radius: var(--mm-radius-sm);
	text-decoration: none;
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: all 0.2s ease;
	flex-shrink: 0;
}

.manman-vinyl-btn:hover {
	background: var(--mm-accent-primary);
	color: #FFFFFF;
	transform: scale(1.05);
	text-decoration: none;
}

.manman-vinyl-btn:active { transform: scale(0.95); }

.manman-vinyl-btn[aria-disabled="true"],
.manman-vinyl-btn.is-disabled {
	pointer-events: none;
	border-color: var(--mm-border);
	color: var(--mm-text-muted);
	background: transparent;
	opacity: 0.5;
}

/* ─── Loading state ───────────────────────────────────────────────────────── */
.manman-vinyl-grid.is-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ─── Featured Section ────────────────────────────────────────────────────── */
.manman-vinyl-show-all {
	margin-top: 3rem;
	text-align: center;
}

.manman-vinyl-show-all-btn {
	display: inline-block;
	padding: 1rem 2.5rem;
	background: var(--mm-accent-primary);
	color: #FFFFFF !important;
	text-decoration: none !important;
	border-radius: var(--mm-radius-sm);
	font-weight: 700;
	font-size: 1.1rem;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(197, 94, 43, 0.2);
	font-family: var(--mm-font-sans);
}

.manman-vinyl-show-all-btn:hover {
	background: var(--mm-accent-hover);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(197, 94, 43, 0.3);
}

.manman-vinyl-show-all-btn:active { transform: translateY(0); }

.manman-vinyl-featured-section,
.manman-vinyl-coming-soon-section {
	margin-bottom: 4rem;
}
