/* BPF Catalog front-end (rendered by the [bpf_catalog] shortcode). */

/* Editable page header (centered) */
.bpf-catalog-header {
	margin: 0 0 28px;
	text-align: center;
}

.bpf-catalog-header__title {
	margin: 0 0 14px;
	font-size: 34px;
	line-height: 1.15;
	font-weight: 700;
}

.bpf-catalog-header__message {
	color: #6b7280;
	font-size: 15px;
	line-height: 1.6;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.bpf-catalog-header__message p {
	margin: 0 0 10px;
}

/* Download-all bar (shown at the top and bottom, centered) */
.bpf-catalog-allbar {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}

.bpf-catalog-allbar--top {
	margin: 0 0 28px;
}

.bpf-catalog-allbar--bottom {
	margin: 32px 0 100px;
}

.bpf-catalog-all-btn {
	display: inline-block;
	padding: 12px 28px;
	background: #fff;
	color: #6b2fb3;
	border: 2px solid #6b2fb3;
	border-radius: 4px;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.bpf-catalog-all-btn:hover:not(:disabled) {
	background: #6b2fb3;
	color: #fff;
}

.bpf-catalog-all-btn:disabled {
	opacity: 0.6;
	cursor: default;
}

.bpf-catalog-all-progress {
	width: 100%;
	max-width: 420px;
}

.bpf-catalog-all-progress[hidden] {
	display: none;
}

.bpf-catalog-all-progress__bar {
	height: 10px;
	background: #e5e7eb;
	border-radius: 999px;
	overflow: hidden;
}

.bpf-catalog-all-progress__bar span {
	display: block;
	height: 100%;
	width: 0;
	background: #6b2fb3;
	transition: width 0.2s ease;
}

.bpf-catalog-all-warn {
	margin: 8px 0 0;
	font-size: 13px;
	font-weight: 600;
	color: #b45309;
}

.bpf-catalog-all-status {
	color: #555;
	font-size: 13px;
}

.bpf-catalog-grid {
	display: grid;
	grid-template-columns: repeat(var(--bpf-catalog-columns, 2), minmax(0, 1fr));
	gap: 24px;
	align-items: stretch;
}

.bpf-catalog-card {
	display: flex;
	gap: 18px;
	align-items: stretch;
	padding: 18px;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.bpf-catalog-card__media {
	flex: 0 0 120px;
	width: 120px;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}

.bpf-catalog-card__media img {
	width: 100%;
	height: auto;
	border-radius: 4px;
	display: block;
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.18);
}

.bpf-catalog-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

.bpf-catalog-card__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
}

.bpf-catalog-card__desc {
	margin: 0;
	color: #555;
	font-size: 14px;
	line-height: 1.5;
}

.bpf-catalog-card__desc p {
	margin: 0 0 8px;
}

.bpf-catalog-card__btn {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin-top: auto;
	padding: 10px 22px;
	background: #6b2fb3;
	color: #fff;
	border-radius: 4px;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: background 0.15s ease;
}

.bpf-catalog-card__btn:hover,
.bpf-catalog-card__btn:focus {
	background: #592699;
	color: #fff;
}

.bpf-catalog-empty {
	grid-column: 1 / -1;
	color: #777;
	font-style: italic;
}

@media (max-width: 640px) {
	.bpf-catalog-grid {
		grid-template-columns: 1fr;
	}
}
