/* Supporto Catalog: plugin cards, plugin pages, pricing and docs. Bright marketplace look. */

:root {
	--spc-blue: var(--wp--preset--color--brand, #2547f5);
	--spc-blue2: var(--wp--preset--color--brand-dark, #1b34c4);
	--spc-navy: var(--wp--preset--color--night, #0d1b3e);
	--spc-sun: var(--wp--preset--color--accent, #ffd23f);
	--spc-coral: var(--wp--preset--color--coral, #ff6b57);
	--spc-mint: var(--wp--preset--color--mint, #3dd6a6);
	--spc-peri: var(--wp--preset--color--periwinkle, #9db1ff);
	--spc-soft: var(--wp--preset--color--surface, #f3f6ff);
	--spc-line: var(--wp--preset--color--line, #e1e7fb);
	--spc-muted: var(--wp--preset--color--muted, #4b5b85);
}

/* Colour tiles, one per plugin */
.spc-art--1 { background: var(--spc-sun); }
.spc-art--2 { background: var(--spc-coral); }
.spc-art--3 { background: var(--spc-mint); }
.spc-art--4 { background: var(--spc-peri); }

/* Buttons */
.spc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 22px;
	border-radius: 14px;
	background: var(--spc-blue);
	color: #fff !important;
	font-weight: 800;
	line-height: 1.2;
	text-decoration: none !important;
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.spc-btn:hover {
	background: var(--spc-blue2);
}

.spc-btn--accent {
	background: var(--spc-sun);
	color: var(--spc-navy) !important;
}

.spc-btn--accent:hover {
	background: #fff;
}

.spc-btn--ghost {
	background: #fff;
	color: var(--spc-navy) !important;
}

.spc-btn--ghost:hover {
	background: var(--spc-soft);
}

.spc-btn--ghost-dark {
	background: var(--spc-navy);
}

.spc-btn--ghost-dark:hover {
	background: var(--spc-blue);
}

.spc-btn--link {
	background: transparent;
	color: #fff !important;
	text-decoration: underline !important;
	text-underline-offset: 4px;
	padding-inline: 8px;
}

.spc-btn--link:hover {
	background: transparent;
}

.spc-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	background: #fff;
	color: var(--spc-navy);
	font-size: 0.75rem;
	font-weight: 800;
}

.spc-tag--pro {
	background: var(--spc-sun);
}

/* Plugin cards */
.spc-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
}

.spc-card {
	display: flex;
	flex-direction: column;
	padding: 12px;
	border-radius: 26px;
	background: var(--spc-soft);
	color: var(--spc-navy) !important;
	text-decoration: none !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.spc-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 20px 40px rgba(37, 71, 245, 0.15);
}

.spc-art {
	position: relative;
	display: grid;
	place-items: center;
	height: 150px;
	border-radius: 18px;
	color: var(--spc-navy);
	overflow: hidden;
}

.spc-art::before {
	content: "";
	position: absolute;
	width: 130px;
	height: 130px;
	right: -30px;
	bottom: -40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.35);
}

.spc-art svg {
	position: relative;
	width: 64px;
	height: 64px;
}

.spc-card-body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
	padding: 16px 10px 8px;
}

.spc-card h3 {
	margin: 0;
	font-size: 1.2rem;
	line-height: 1.2;
}

.spc-card-text {
	color: var(--spc-muted);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.spc-card-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: auto;
	padding-top: 10px;
	font-weight: 800;
	font-size: 0.875rem;
}

.spc-free {
	padding: 4px 10px;
	border-radius: 999px;
	background: #fff;
	font-size: 0.75rem;
}

/* Plugin page hero, inside the theme blue card */
.sp-hero--plugin {
	display: block !important;
}

.spc-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: 40px;
	align-items: center;
}

.spc-hero-icon {
	display: grid;
	place-items: center;
	width: 76px;
	height: 76px;
	margin-bottom: 18px;
	border-radius: 22px;
	color: var(--spc-navy);
}

.spc-hero-icon svg {
	width: 40px;
	height: 40px;
}

.spc-hero h1 {
	margin: 4px 0 14px;
	color: #fff;
	font-size: clamp(2.2rem, 4.2vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
}

.spc-hero-lead {
	margin: 0 0 26px;
	color: #dfe5ff;
	font-size: 1.15rem;
	line-height: 1.55;
}

.spc-hero-art img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 20px;
	box-shadow: 0 24px 50px rgba(13, 27, 62, 0.35);
	transform: rotate(2deg);
}

.spc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.spc-crumbs {
	margin: 0 0 6px;
	font-size: 0.875rem;
	font-weight: 700;
}

.spc-crumbs a {
	color: var(--spc-blue);
}

.spc-hero .spc-crumbs a {
	color: #c7d1ff;
}

.spc-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
}

.spc-meta li {
	padding: 6px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 700;
}

/* Intro text under the screenshots */
.sp-plugin-intro p {
	color: var(--spc-muted);
	font-size: 1.125rem;
	line-height: 1.7;
}

/* Screenshot gallery: one large shot, the rest in a grid */
.spc-gallery {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
}

.spc-shot {
	margin: 0;
	padding: 10px;
	border-radius: 22px;
	background: var(--spc-soft);
}

.spc-shot.is-main {
	grid-column: span 2;
	grid-row: span 2;
}

.spc-shot a {
	position: relative;
	display: block;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
}

.spc-shot img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 11;
	object-fit: cover;
	object-position: top left;
	transition: transform 0.3s ease;
}

.spc-shot.is-main img {
	aspect-ratio: 16 / 12.4;
}

.spc-shot a:hover img {
	transform: scale(1.04);
}

.spc-zoom {
	position: absolute;
	right: 10px;
	bottom: 10px;
	width: 38px;
	height: 38px;
	border-radius: 12px;
	background: var(--spc-navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M20 20l-4.5-4.5M11 8.5v5M8.5 11h5'/%3E%3C/svg%3E") center / 20px no-repeat;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.spc-shot a:hover .spc-zoom,
.spc-shot a:focus-visible .spc-zoom {
	opacity: 1;
	transform: none;
}

.spc-shot figcaption {
	padding: 10px 6px 4px;
	color: var(--spc-muted);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
}

/* Popup viewer */
.spc-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: grid;
	grid-template-columns: 64px 1fr 64px;
	align-items: center;
	padding: 30px 16px;
	background: rgba(13, 27, 62, 0.92);
	backdrop-filter: blur(6px);
}

.spc-lb[hidden] {
	display: none;
}

html.spc-lb-open {
	overflow: hidden;
}

.spc-lb-fig {
	grid-column: 2;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-height: 100%;
}

.spc-lb-fig img {
	max-width: 100%;
	max-height: calc(100vh - 140px);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.spc-lb-fig figcaption {
	display: flex;
	gap: 16px;
	justify-content: space-between;
	width: 100%;
	max-width: 900px;
	margin-top: 14px;
	color: #fff;
	font-weight: 600;
}

.spc-lb-count {
	color: var(--spc-sun);
	white-space: nowrap;
}

.spc-lb button {
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 16px;
	background: #fff;
	color: var(--spc-navy);
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
}

.spc-lb button:hover {
	background: var(--spc-sun);
}

.spc-lb button[hidden] {
	display: none;
}

.spc-lb-prev {
	grid-column: 1;
	grid-row: 1;
}

.spc-lb-next {
	grid-column: 3;
	grid-row: 1;
	justify-self: end;
}

.spc-lb-close {
	position: absolute;
	top: 18px;
	right: 18px;
	font-size: 1.8rem !important;
}

.sp-doc-body a[data-spc-lightbox] {
	cursor: zoom-in;
}

/* Features */
.spc-features {
	display: grid;
	grid-template-columns: 1fr;
	gap: 18px;
}

.spc-groups {
	columns: 3 260px;
	column-gap: 34px;
}

.spc-group {
	break-inside: avoid;
	margin-bottom: 22px;
}

.spc-group h4 {
	margin-top: 0 !important;
}

.spc-col h3 {
	margin-bottom: 22px !important;
}

.spc-col {
	padding: 30px;
	border-radius: 26px;
	background: var(--spc-soft);
}

.spc-col--pro {
	background: var(--spc-navy);
	color: #e3e8ff;
}

.spc-col h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 8px;
	font-size: 1.3rem;
	color: inherit;
}

.spc-col--pro h3 {
	color: #fff;
}

.spc-col h4 {
	margin: 22px 0 10px;
	color: var(--spc-muted);
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.spc-col--pro h4 {
	color: var(--spc-sun);
}

.spc-col ul {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.spc-col li {
	position: relative;
	padding-left: 30px;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.spc-col li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 1px;
	width: 19px;
	height: 19px;
	border-radius: 6px;
	background: var(--spc-mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230d1b3e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat;
}

.spc-col--pro li::before {
	background-color: var(--spc-sun);
}

.spc-col--pro strong {
	color: #fff;
}

/* Pricing */
.spc-pricing {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	scroll-margin-top: 140px;
}

.spc-price-card {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 28px;
	border-radius: 26px;
	background: var(--spc-soft);
}

.spc-price-card.is-featured {
	background: var(--spc-navy);
	color: #fff;
}

.spc-price-card.is-featured::before {
	content: "Best value";
	align-self: flex-start;
	order: -1;
	margin-bottom: 12px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--spc-sun);
	color: var(--spc-navy);
	font-size: 0.75rem;
	font-weight: 800;
}

.spc-price-card h3 {
	margin: 0 0 8px;
	font-size: 1.15rem;
	color: inherit;
}

.spc-amount {
	display: flex;
	align-items: baseline;
	gap: 2px;
	margin: 0 0 8px;
}

.spc-amount span {
	font-size: 1.2rem;
	font-weight: 800;
}

.spc-amount strong {
	font-size: 2.8rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1;
}

.spc-amount em {
	margin-left: 6px;
	font-style: normal;
	font-size: 0.875rem;
	font-weight: 600;
	opacity: 0.7;
}

.spc-price-note {
	margin: 0 0 20px;
	color: var(--spc-muted);
	font-size: 0.9375rem;
}

.spc-price-card.is-featured .spc-price-note {
	color: #c7d1ff;
}

.spc-price-card .spc-btn {
	margin-top: auto;
}

.spc-price-card.is-featured .spc-btn {
	background: var(--spc-sun);
	color: var(--spc-navy) !important;
}

.spc-price-card.is-featured .spc-btn:hover {
	background: #fff;
}

.spc-fine {
	margin-top: 16px;
	color: var(--spc-muted);
	font-size: 0.875rem;
	font-weight: 600;
}

/* FAQ styles live in the theme (shared with the home page). */

.spc-changelog {
	max-width: 860px;
}

.spc-release {
	padding: 22px 26px;
	border-radius: 20px;
	background: var(--spc-soft);
}

.spc-release h4 {
	display: inline-block;
	margin: 0 0 8px;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--spc-navy);
	color: #fff;
	font-size: 0.875rem;
}

.spc-release ul {
	margin: 0;
	font-weight: 600;
}

/* Docs */
.sp-hero--docs {
	display: block !important;
}

.spc-docs-search {
	display: flex;
	max-width: 640px;
	margin-top: 26px;
	padding: 6px;
	border-radius: 18px;
	background: #fff;
}

.spc-docs-search input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: 0;
	background: transparent;
	color: var(--spc-navy);
	font: inherit;
	font-weight: 500;
	outline: none;
}

.spc-docs-search button {
	padding: 0 22px;
	border: 0;
	border-radius: 14px;
	background: var(--spc-coral);
	color: #fff;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
}

.spc-hub {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.spc-hub-card {
	padding: 28px;
	border-radius: 26px;
	background: var(--spc-soft);
}

.spc-hub-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	color: var(--spc-navy) !important;
	font-size: 1.25rem;
	font-weight: 800;
	text-decoration: none;
}

.spc-hub-icon {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	color: var(--spc-navy);
}

.spc-hub-icon svg {
	width: 24px;
	height: 24px;
}

.spc-hub-card ul {
	display: grid;
	gap: 6px;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
}

.spc-hub-card li a {
	display: block;
	padding: 8px 12px;
	border-radius: 10px;
	background: #fff;
	color: var(--spc-navy);
	font-weight: 600;
	text-decoration: none;
}

.spc-hub-card li a:hover {
	color: var(--spc-blue);
}

.spc-hub-all {
	font-weight: 800;
}

.spc-hub-all::after {
	content: " \2192";
}

.spc-doc-nav {
	position: sticky;
	top: 150px;
	padding: 22px;
	border-radius: 22px;
	background: var(--spc-soft);
	font-size: 0.9375rem;
}

.spc-doc-nav-root {
	display: block;
	margin-bottom: 10px;
	color: var(--spc-navy) !important;
	font-weight: 800;
	text-decoration: none;
}

.spc-doc-nav ol {
	margin: 0 0 14px;
	padding-left: 20px;
}

.spc-doc-nav li {
	margin-bottom: 6px;
}

.spc-doc-nav a {
	color: var(--spc-navy);
	font-weight: 600;
	text-decoration: none;
}

.spc-doc-nav a:hover {
	color: var(--spc-blue);
}

.spc-doc-nav a.is-current {
	color: var(--spc-blue);
	font-weight: 800;
}

.spc-doc-nav-plugin {
	display: block;
	margin-top: 8px;
	padding: 10px 12px;
	border-radius: 12px;
	background: #fff;
	color: var(--spc-blue) !important;
	font-weight: 800;
}

.spc-doc-list {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
	counter-reset: d;
}

.spc-doc-list li {
	counter-increment: d;
}

.spc-doc-list a {
	position: relative;
	display: block;
	padding: 18px 20px 18px 66px;
	border-radius: 18px;
	background: var(--spc-soft);
	color: inherit !important;
	text-decoration: none;
	transition: transform 0.15s ease;
}

.spc-doc-list a:hover {
	transform: translateX(4px);
}

.spc-doc-list a::before {
	content: counter(d);
	position: absolute;
	left: 18px;
	top: 18px;
	width: 32px;
	height: 32px;
	border-radius: 10px;
	background: var(--spc-sun);
	color: var(--spc-navy);
	font-weight: 800;
	line-height: 32px;
	text-align: center;
}

.spc-doc-list li:nth-child(4n+2) a::before { background: var(--spc-coral); }
.spc-doc-list li:nth-child(4n+3) a::before { background: var(--spc-mint); }
.spc-doc-list li:nth-child(4n+4) a::before { background: var(--spc-peri); }

.spc-doc-list strong {
	display: block;
	color: var(--spc-navy);
	font-size: 1.05rem;
}

.spc-doc-list span {
	display: block;
	margin-top: 4px;
	color: var(--spc-muted);
	font-size: 0.9375rem;
}

.spc-pager {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-top: 40px;
}

.spc-pager a {
	padding: 16px 20px;
	border-radius: 18px;
	background: var(--spc-soft);
	color: var(--spc-navy);
	font-weight: 800;
	text-decoration: none;
}

.spc-pager a:hover {
	background: var(--spc-navy);
	color: #fff;
}

.spc-pager span {
	display: block;
	font-size: 0.8125rem;
	font-weight: 600;
	opacity: 0.7;
}

.spc-next {
	grid-column: 2;
	text-align: right;
}

/* Guide content */
.sp-doc-body img {
	max-width: 100%;
	height: auto;
	border-radius: 16px;
	box-shadow: 0 0 0 1px var(--spc-line);
}

.sp-doc-body figure {
	margin: 24px 0;
}

.sp-doc-body figure.half img {
	max-width: 70%;
}

.sp-doc-body figcaption {
	margin-top: 8px;
	color: var(--spc-muted);
	font-size: 0.875rem;
	font-weight: 600;
}

.sp-doc-body table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	border-radius: 16px;
	background: var(--spc-soft);
	font-size: 0.9375rem;
}

.sp-doc-body th,
.sp-doc-body td {
	padding: 12px 14px;
	border-bottom: 1px solid #fff;
	text-align: left;
	vertical-align: top;
}

.sp-doc-body th {
	background: var(--spc-navy);
	color: #fff;
}

.sp-doc-body .note {
	padding: 16px 18px;
	border-radius: 16px;
	background: #fff6d6;
}

.sp-doc-body .card {
	margin-bottom: 12px;
	padding: 18px 20px;
	border-radius: 18px;
	background: var(--spc-soft);
}

.sp-doc-body .card h3 {
	margin-top: 0;
}

.sp-doc-body .grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.sp-doc-body .yes {
	color: #138a63;
	font-weight: 800;
}

.sp-doc-body .no {
	color: #9aa6c4;
}

@media (max-width: 1000px) {
	.spc-grid,
	.spc-gallery {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.spc-pricing {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.spc-hero {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 700px) {
	.spc-grid,
	.spc-gallery,
	.spc-features,
	.spc-pricing,
	.spc-hub,
	.sp-doc-body .grid2,
	.spc-pager {
		grid-template-columns: 1fr;
	}

	.spc-next {
		grid-column: 1;
	}

	.spc-doc-nav {
		position: static;
	}

	.spc-hero-art img {
		transform: none;
	}
}

@media (max-width: 700px) {
	.spc-shot.is-main {
		grid-column: auto;
		grid-row: auto;
	}

	.spc-lb {
		grid-template-columns: 1fr;
		padding: 70px 10px 20px;
	}

	.spc-lb-fig {
		grid-column: 1;
	}

	.spc-lb-prev,
	.spc-lb-next {
		position: absolute;
		bottom: 18px;
	}

	.spc-lb-prev {
		left: 18px;
	}

	.spc-lb-next {
		right: 18px;
	}
}
