@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@500&display=swap');

.psp-wrap {
	--psp-bg: #16140f;
	--psp-surface: #211e18;
	--psp-surface-2: #2a2419;
	--psp-text: #efeae0;
	--psp-text-muted: #a69c89;
	--psp-accent: #c98a3b;
	--psp-line: rgba(239, 234, 224, 0.12);

	background: var(--psp-bg);
	color: var(--psp-text);
	padding: 48px clamp(16px, 4vw, 48px);
	border-radius: 6px;
	box-sizing: border-box;
	font-family: 'Inter', -apple-system, sans-serif;
}
.psp-wrap * { box-sizing: border-box; }
.psp-empty, .psp-empty-msg {
	color: var(--psp-text-muted);
	font-style: italic;
	font-family: 'Inter', sans-serif;
}

/* ---------- Tabs (shared visual language with the gallery plugin) ---------- */

.psp-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--psp-line);
}
.psp-tab {
	font-family: 'Fraunces', serif;
	font-weight: 600;
	font-size: 1rem;
	color: var(--psp-text-muted);
	background: transparent;
	border: 1px solid var(--psp-line);
	border-radius: 999px;
	padding: 10px 20px;
	cursor: pointer;
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.psp-tab:hover { color: var(--psp-text); border-color: var(--psp-accent); }
.psp-tab:focus-visible { outline: 2px solid var(--psp-accent); outline-offset: 3px; }
.psp-tab.is-active { color: var(--psp-bg); background: var(--psp-accent); border-color: var(--psp-accent); }
.psp-tab-count { font-family: 'IBM Plex Mono', monospace; font-size: 0.62rem; opacity: 0.75; }

/* ---------- Grid ---------- */

.psp-grid {
	display: grid;
	gap: 26px;
}
@media (max-width: 1100px) { .psp-grid { grid-template-columns: repeat(3, 1fr) !important; } }
@media (max-width: 780px)  { .psp-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px)  { .psp-grid { grid-template-columns: 1fr !important; } }

/* ---------- Card ---------- */

.psp-card {
	background: var(--psp-surface);
	border: 1px solid var(--psp-line);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.psp-slider {
	position: relative;
	aspect-ratio: 4 / 3;
	background: var(--psp-surface-2);
	overflow: hidden;
}
.psp-slides { position: relative; width: 100%; height: 100%; }
.psp-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.5s ease;
}
.psp-slide.is-active { opacity: 1; }
.psp-slide img { width: 100%; height: 100%; object-fit: cover; }
.psp-slide-empty {
	background: repeating-linear-gradient(45deg, var(--psp-surface) 0 2px, transparent 2px 14px);
}

.psp-slide-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(22, 20, 15, 0.55);
	border: 1px solid rgba(239, 234, 224, 0.25);
	color: var(--psp-text);
	width: 30px;
	height: 30px;
	border-radius: 999px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.25s ease, background 0.25s ease;
}
.psp-slider:hover .psp-slide-nav { opacity: 1; }
.psp-slide-nav:hover { background: var(--psp-accent); border-color: var(--psp-accent); }
.psp-slide-prev { left: 10px; }
.psp-slide-next { right: 10px; }

.psp-slide-dots {
	position: absolute;
	bottom: 10px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 6px;
}
.psp-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: rgba(239, 234, 224, 0.35);
	transition: background 0.25s ease, transform 0.25s ease;
}
.psp-dot.is-active { background: var(--psp-accent); transform: scale(1.3); }

.psp-card-body {
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.psp-card-title {
	font-family: 'Fraunces', serif;
	font-weight: 600;
	font-size: 1.05rem;
	margin: 0;
}
.psp-card-desc {
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--psp-text-muted);
	margin: 0;
	flex: 1;
}
.psp-card-link {
	margin-top: 4px;
	font-family: 'IBM Plex Mono', monospace;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--psp-accent);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: fit-content;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease;
}
.psp-card-link:hover { border-color: var(--psp-accent); }

@media (prefers-reduced-motion: reduce) {
	.psp-slide, .psp-slide-nav, .psp-dot { transition: none !important; }
}
