/**
 * CCD Hub Cloud — Website Marketplace public archive and single pages
 *
 * Compatible with Astra and Spectra block layouts.
 *
 * @package CcdHubCloud
 */

.ccd-hub-packs-archive,
.ccd-hub-pack-single {
	box-sizing: border-box;
	margin: 0 auto;
	max-width: 1200px;
	padding: 0 1rem 3rem;
	width: 100%;
}

.ccd-hub-marketplace-header {
	margin: 0 0 2rem;
	max-width: 720px;
	text-align: center;
}

.ccd-hub-marketplace-header__eyebrow {
	color: var(--ast-global-color-0, #2271b1);
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	margin: 0 0 0.75rem;
	text-transform: uppercase;
}

.ccd-hub-marketplace-header__title {
	font-size: clamp(2rem, 4vw, 2.75rem);
	line-height: 1.15;
	margin: 0 0 0.75rem;
}

.ccd-hub-marketplace-header__description {
	color: inherit;
	font-size: 1.05rem;
	line-height: 1.7;
	margin: 0 auto;
	opacity: 0.85;
}

.ccd-hub-packs-archive__filters {
	background: var(--ast-global-color-5, #f8fafc);
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 12px;
	margin: 0 0 1.5rem;
	padding: 1rem;
}

.ccd-hub-packs-archive__filters-row {
	align-items: stretch;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ccd-hub-packs-archive__search,
.ccd-hub-packs-archive__category,
.ccd-hub-packs-archive__sort {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
	color: inherit;
	font: inherit;
	min-height: 44px;
	padding: 0.65rem 0.9rem;
}

.ccd-hub-packs-archive__search {
	flex: 1 1 220px;
}

.ccd-hub-packs-archive__category,
.ccd-hub-packs-archive__sort {
	flex: 0 1 180px;
}

.ccd-hub-packs-archive__submit {
	flex: 0 0 auto;
}

.ccd-hub-packs-archive__reset {
	align-self: center;
	color: inherit;
	font-size: 0.95rem;
	opacity: 0.85;
	text-decoration: none;
}

.ccd-hub-packs-archive__reset:hover,
.ccd-hub-packs-archive__reset:focus {
	opacity: 1;
	text-decoration: underline;
}

.ccd-hub-packs-archive__results,
.ccd-hub-packs-archive__empty {
	color: inherit;
	margin: 0 0 1.5rem;
}

.ccd-hub-packs-archive__results {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.95rem;
	gap: 0.5rem 1rem;
	justify-content: space-between;
}

.ccd-hub-packs-archive__results-page {
	opacity: 0.75;
}

.ccd-hub-packs-archive__empty {
	text-align: center;
}

.ccd-hub-packs-archive__grid {
	display: grid;
	gap: 1.75rem;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.ccd-hub-pack-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.ccd-hub-pack-card:hover,
.ccd-hub-pack-card:focus-within {
	box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
	transform: translateY(-2px);
}

.ccd-hub-pack-card__media,
.ccd-hub-pack-card__media-link {
	display: block;
	text-decoration: none;
}

.ccd-hub-pack-card__media {
	aspect-ratio: 16 / 10;
	background: #f3f4f6;
	overflow: hidden;
	position: relative;
}

.ccd-hub-pack-card__media img,
.ccd-hub-pack-card__image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ccd-hub-pack-card__placeholder {
	background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
	height: 100%;
	width: 100%;
}

.ccd-hub-pack-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	left: 0.75rem;
	position: absolute;
	top: 0.75rem;
	z-index: 2;
}

.ccd-hub-pack-card__badge {
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	padding: 0.3rem 0.55rem;
	text-transform: uppercase;
}

.ccd-hub-pack-card__badge--featured {
	background: var(--ast-global-color-0, #2271b1);
	color: #fff;
}

.ccd-hub-pack-card__badge--sale {
	background: #dc2626;
	color: #fff;
}

.ccd-hub-pack-card__badge--version {
	background: rgba(255, 255, 255, 0.92);
	color: #0f172a;
	text-transform: none;
}

.ccd-hub-pack-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.75rem;
	padding: 1.35rem;
}

.ccd-hub-pack-card__category,
.ccd-hub-pack-single__category {
	color: inherit;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	margin: 0;
	opacity: 0.75;
	text-transform: uppercase;
}

.ccd-hub-pack-card__title,
.ccd-hub-pack-single__title {
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	line-height: 1.3;
	margin: 0;
}

.ccd-hub-pack-card__title a {
	color: inherit;
	text-decoration: none;
}

.ccd-hub-pack-card__title a:hover,
.ccd-hub-pack-card__title a:focus {
	text-decoration: underline;
}

.ccd-hub-pack-card__description,
.ccd-hub-pack-single__description-content {
	color: inherit;
	display: -webkit-box;
	flex: 1;
	font-size: 0.95rem;
	line-height: 1.6;
	margin: 0;
	opacity: 0.85;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}

.ccd-hub-pack-card__price,
.ccd-hub-pack-single__price {
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1.4;
	margin: 0;
}

.ccd-hub-pack-card__price .amount,
.ccd-hub-pack-single__price .amount {
	font-weight: inherit;
}

.ccd-hub-pack-card__actions,
.ccd-hub-pack-single__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: auto;
}

.ccd-hub-pack-card__button {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 6px;
	display: inline-flex;
	flex: 1 1 auto;
	font-size: 0.95rem;
	font-weight: 600;
	justify-content: center;
	line-height: 1.4;
	min-height: 44px;
	padding: 0.65rem 1rem;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ccd-hub-pack-card__button--demo {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}

.ccd-hub-pack-card__button--demo:hover,
.ccd-hub-pack-card__button--demo:focus {
	opacity: 0.85;
	text-decoration: none;
}

.ccd-hub-pack-card__button--primary {
	background: var(--ast-global-color-0, #2271b1);
	border-color: var(--ast-global-color-0, #2271b1);
	color: #fff;
}

.ccd-hub-pack-card__button--primary:hover,
.ccd-hub-pack-card__button--primary:focus {
	background: var(--ast-global-color-1, #135e96);
	border-color: var(--ast-global-color-1, #135e96);
	color: #fff;
	text-decoration: none;
	transform: translateY(-1px);
}

.ccd-hub-pack-card__button--disabled {
	cursor: not-allowed;
	opacity: 0.72;
	pointer-events: none;
}

.ccd-hub-packs-archive__pagination {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	margin-top: 2.5rem;
}

.ccd-hub-packs-archive__page-numbers {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

.ccd-hub-packs-archive__page-link {
	align-items: center;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	color: inherit;
	display: inline-flex;
	font-size: 0.95rem;
	font-weight: 600;
	justify-content: center;
	min-height: 42px;
	min-width: 42px;
	padding: 0.45rem 0.85rem;
	text-decoration: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.ccd-hub-packs-archive__page-link:hover,
.ccd-hub-packs-archive__page-link:focus {
	border-color: var(--ast-global-color-0, #2271b1);
	color: var(--ast-global-color-0, #2271b1);
	text-decoration: none;
}

.ccd-hub-packs-archive__page-link.is-current {
	background: var(--ast-global-color-0, #2271b1);
	border-color: var(--ast-global-color-0, #2271b1);
	color: #fff;
}

.ccd-hub-packs-archive__page-link--prev,
.ccd-hub-packs-archive__page-link--next {
	padding-inline: 1rem;
}

.ccd-hub-pack-single__back {
	margin: 0 0 1rem;
}

.ccd-hub-pack-single__back a {
	color: inherit;
	text-decoration: none;
}

.ccd-hub-pack-single__back a:hover,
.ccd-hub-pack-single__back a:focus {
	text-decoration: underline;
}

.ccd-hub-pack-single__hero {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	margin-bottom: 2rem;
}

.ccd-hub-pack-single__featured {
	border-radius: 8px;
	overflow: hidden;
}

.ccd-hub-pack-single__featured img,
.ccd-hub-pack-single__featured .ccd-hub-pack-card__placeholder {
	display: block;
	height: auto;
	min-height: 280px;
	object-fit: cover;
	width: 100%;
}

.ccd-hub-pack-single__summary {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	justify-content: center;
}

.ccd-hub-pack-single__section-title {
	font-size: 1.35rem;
	margin: 0 0 1rem;
}

.ccd-hub-pack-single__gallery,
.ccd-hub-pack-single__description {
	margin-bottom: 2rem;
}

.ccd-hub-pack-single__gallery-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.ccd-hub-pack-single__gallery-item {
	margin: 0;
}

.ccd-hub-pack-single__gallery-item img {
	border-radius: 8px;
	display: block;
	height: auto;
	width: 100%;
}

.ccd-hub-pack-single__description-content > :first-child {
	margin-top: 0;
}

.ccd-hub-pack-single__description-content > :last-child {
	margin-bottom: 0;
}

@media (max-width: 921px) {
	.ccd-hub-pack-single__hero {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	.ccd-hub-marketplace-header {
		text-align: left;
	}

	.ccd-hub-packs-archive__filters-row,
	.ccd-hub-pack-card__actions,
	.ccd-hub-pack-single__actions,
	.ccd-hub-packs-archive__pagination {
		flex-direction: column;
	}

	.ccd-hub-packs-archive__search,
	.ccd-hub-packs-archive__category,
	.ccd-hub-packs-archive__sort,
	.ccd-hub-packs-archive__submit,
	.ccd-hub-pack-card__button,
	.ccd-hub-packs-archive__page-link,
	.ccd-hub-packs-archive__page-link--prev,
	.ccd-hub-packs-archive__page-link--next {
		width: 100%;
	}

	.ccd-hub-packs-archive__grid {
		grid-template-columns: 1fr;
	}
}
