/**
 * Price list downloads — public page + My Account panel.
 * Responsive: phone / tablet / desktop.
 */

body.sophia-pld-page .wp-block-post-title,
body.sophia-pld-page .entry-title {
	display: none !important;
}

body.sophia-pld-page {
	background-color: var(--wp--preset--color--body-background, #fdf6f2) !important;
	overflow-x: clip;
}

body.sophia-pld-page .wp-site-blocks,
body.sophia-pld-page .wp-site-blocks main {
	background: transparent !important;
}

body.sophia-pld-page .wp-site-blocks main {
	margin-top: 0;
	padding-top: 0 !important;
	padding-bottom: var(--wp--custom--spacing--main-block-gap, clamp(40px, 5.5vw, 91px));
}

body.sophia-pld-page .wp-block-post-content,
body.sophia-pld-page .entry-content.wp-block-post-content {
	max-width: none !important;
	padding-inline: 0 !important;
	width: 100%;
}

body.sophia-pld-page .wp-block-post-content > .sophia-pld,
body.sophia-pld-page .entry-content > .sophia-pld {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin-inline: 0;
}

.sophia-pld {
	--pld-ink: #1a1a1a;
	--pld-muted: #686868;
	--pld-line: #eddfd4;
	--pld-accent: var(--wp--preset--color--tan-brown, #954e26);
	--pld-accent-deep: var(--wp--preset--color--chocolate-dim, #bd6230);
	--pld-soft: var(--wp--preset--color--secondary, #fbede5);
	--pld-panel: #ffffff;
	--pld-shadow: 0 14px 32px rgba(85, 80, 80, 0.1);
	--pld-pad-x: clamp(16px, 4vw, 48px);
	font-family: var(--wp--preset--font-family--switzer, Switzer, system-ui, sans-serif);
	color: var(--pld-ink);
	padding: clamp(20px, 3.5vw, 36px) var(--pld-pad-x) 8px;
	box-sizing: border-box;
}

.sophia-pld__hero {
	max-width: min(720px, 100%);
	margin: 0 auto clamp(22px, 4vw, 36px);
	text-align: center;
}

.sophia-pld__eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--pld-accent);
}

.sophia-pld__title {
	margin: 0 0 10px;
	font-family: var(--wp--preset--font-family--merriweather, Merriweather, serif);
	font-size: clamp(26px, 5.2vw, 42px);
	font-weight: 700;
	line-height: 1.18;
	color: var(--pld-accent);
	overflow-wrap: anywhere;
}

.sophia-pld__lead {
	margin: 0 auto;
	max-width: 34em;
	font-size: clamp(14px, 2.4vw, 16px);
	line-height: 1.55;
	color: var(--pld-muted);
}

.sophia-pld__vip-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 18px;
	margin: 20px auto 0;
	max-width: 720px;
	padding: 16px 18px;
	border-radius: 16px;
	border: 1px solid var(--pld-line);
	background: linear-gradient(135deg, #fff8f3 0%, #fff 55%, #fbede5 100%);
	text-align: left;
	box-shadow: var(--pld-shadow);
	animation: sophia-pld-fade-up 0.55s ease both;
}

.sophia-pld__vip-icon {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--pld-soft);
	color: var(--pld-accent);
	flex-shrink: 0;
}

.sophia-pld__vip-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1 1 160px;
	min-width: 0;
}

.sophia-pld__vip-copy strong {
	font-size: 15px;
	color: var(--pld-ink);
}

.sophia-pld__vip-copy span {
	font-size: 13px;
	color: var(--pld-muted);
	line-height: 1.4;
}

.sophia-pld__vip-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 18px;
	min-height: 44px;
	border-radius: 999px;
	background: var(--pld-accent);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.2s ease;
	white-space: nowrap;
}

.sophia-pld__vip-cta:hover {
	background: var(--pld-accent-deep);
	transform: translateY(-1px);
}

.sophia-pld__empty {
	max-width: 640px;
	margin: 0 auto;
	padding: clamp(28px, 5vw, 40px) clamp(18px, 4vw, 28px);
	border-radius: 18px;
	background: var(--pld-panel);
	border: 1px dashed var(--pld-line);
	text-align: center;
	color: var(--pld-muted);
}

.sophia-pld__list {
	list-style: none;
	margin: 0 auto;
	padding: 0;
	max-width: min(920px, 100%);
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2.5vw, 18px);
}

.sophia-pld__card {
	display: flex;
	align-items: center;
	gap: clamp(14px, 2.5vw, 22px);
	padding: clamp(16px, 2.5vw, 22px) clamp(16px, 2.5vw, 24px);
	border-radius: 18px;
	background: var(--pld-panel);
	border: 1px solid var(--pld-line);
	box-shadow: var(--pld-shadow);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
	animation: sophia-pld-fade-up 0.5s ease both;
	box-sizing: border-box;
	width: 100%;
}

.sophia-pld__card:nth-child(2) { animation-delay: 0.06s; }
.sophia-pld__card:nth-child(3) { animation-delay: 0.12s; }
.sophia-pld__card:nth-child(4) { animation-delay: 0.18s; }

@media (hover: hover) and (pointer: fine) {
	.sophia-pld__card:hover {
		transform: translateY(-2px);
		border-color: color-mix(in srgb, var(--pld-accent) 35%, var(--pld-line));
		box-shadow: 0 18px 36px rgba(85, 80, 80, 0.14);
	}
}

.sophia-pld__card-main {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
	flex: 1 1 auto;
	min-width: 0;
}

.sophia-pld__card-head {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.sophia-pld__card-icon {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: var(--pld-soft);
	color: var(--pld-accent);
	flex-shrink: 0;
}

.sophia-pld__card-icon[data-type="excel"],
.sophia-pld__card-icon[data-type="csv"] {
	background: #eef6ef;
	color: #2f6b3a;
}

.sophia-pld__card-body {
	flex: 1 1 auto;
	min-width: 0;
}

.sophia-pld__card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	align-items: center;
	margin: 0;
	min-width: 0;
}

.sophia-pld__badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	background: var(--pld-soft);
	color: var(--pld-accent);
}

.sophia-pld__size,
.sophia-pld__updated {
	font-size: 12px;
	color: var(--pld-muted);
}

.sophia-pld__card-title {
	margin: 0 0 2px;
	font-family: var(--wp--preset--font-family--merriweather, Merriweather, serif);
	font-size: clamp(17px, 2.4vw, 21px);
	font-weight: 700;
	line-height: 1.35;
	color: var(--pld-ink);
	overflow-wrap: anywhere;
	word-break: break-word;
}

.sophia-pld__card-desc {
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--pld-muted);
}

.sophia-pld__card-action {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

.sophia-pld__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 11px 20px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
	box-sizing: border-box;
	-webkit-tap-highlight-color: transparent;
}

.sophia-pld__btn-label--short {
	display: none;
}

.sophia-pld__btn--primary {
	background: var(--pld-accent);
	color: #fff !important;
	border: 1px solid var(--pld-accent);
}

.sophia-pld__btn--primary:hover {
	background: var(--pld-accent-deep);
	border-color: var(--pld-accent-deep);
	transform: translateY(-1px);
}

.sophia-pld__btn--locked {
	background: #fff;
	color: var(--pld-accent) !important;
	border: 1px solid color-mix(in srgb, var(--pld-accent) 45%, var(--pld-line));
}

.sophia-pld__btn--locked:hover {
	background: var(--pld-soft);
	transform: translateY(-1px);
}

/* My Account panel */
.sophia-pld-account {
	margin-bottom: 18px;
}

.sophia-pld-account__card {
	display: flex;
	gap: 18px;
	align-items: flex-start;
	padding: 22px 24px;
	border-radius: 18px;
	background: linear-gradient(135deg, #fff 0%, #fff8f3 100%);
	border: 1px solid var(--pld-line, #eddfd4);
	box-shadow: 0 12px 28px rgba(85, 80, 80, 0.08);
}

.sophia-pld-account__icon {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--wp--preset--color--secondary, #fbede5);
	color: var(--wp--preset--color--tan-brown, #954e26);
	flex-shrink: 0;
}

.sophia-pld-account__title {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 700;
	color: var(--wp--preset--color--tan-brown, #954e26);
}

.sophia-pld-account__text {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #686868;
}

.sophia-pld-account__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	min-height: 44px;
	border-radius: 999px;
	background: var(--wp--preset--color--tan-brown, #954e26);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	transition: background 0.2s ease, transform 0.2s ease;
}

.sophia-pld-account__btn:hover {
	background: var(--wp--preset--color--chocolate-dim, #bd6230);
	transform: translateY(-1px);
}

@keyframes sophia-pld-fade-up {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------- Tablet (portrait / small landscape) ---------- */
@media (max-width: 1024px) {
	.sophia-pld {
		/* leave room for Products List float tab on the left */
		padding-left: max(var(--pld-pad-x), 28px);
		padding-right: max(var(--pld-pad-x), 20px);
	}

	.sophia-pld__list {
		max-width: min(760px, 100%);
	}
}

@media (min-width: 721px) and (max-width: 1024px) {
	.sophia-pld__hero {
		margin-bottom: 28px;
	}

	.sophia-pld__card {
		padding: 20px 22px;
	}

	.sophia-pld__card-icon {
		width: 52px;
		height: 52px;
	}

	.sophia-pld__btn {
		min-width: 148px;
	}
}

/* ---------- Phone + narrow tablet ---------- */
@media (max-width: 720px) {
	.sophia-pld {
		padding-top: 18px;
		padding-bottom: 4px;
		/* Products List float (~36px) + breathing room */
		padding-left: max(16px, env(safe-area-inset-left, 0px));
		padding-right: max(16px, env(safe-area-inset-right, 0px));
	}

	.sophia-pld__hero {
		margin-bottom: 18px;
		padding-inline: 4px;
	}

	.sophia-pld__eyebrow {
		font-size: 10px;
		letter-spacing: 0.12em;
	}

	.sophia-pld__title {
		font-size: clamp(24px, 7.2vw, 30px);
		margin-bottom: 8px;
	}

	.sophia-pld__lead {
		font-size: 14px;
		line-height: 1.5;
		max-width: 28em;
	}

	.sophia-pld__vip-banner {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding: 14px 14px;
		border-radius: 14px;
		margin-top: 16px;
	}

	.sophia-pld__vip-icon {
		width: 40px;
		height: 40px;
	}

	.sophia-pld__vip-cta {
		width: 100%;
	}

	.sophia-pld__list {
		gap: 12px;
	}

	.sophia-pld__card {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
		border-radius: 16px;
	}

	.sophia-pld__card-main {
		width: 100%;
		gap: 10px;
	}

	.sophia-pld__card-head {
		width: 100%;
	}

	.sophia-pld__card-icon {
		width: 48px;
		height: 48px;
		border-radius: 12px;
	}

	.sophia-pld__card-icon svg {
		width: 24px;
		height: 24px;
	}

	.sophia-pld__card-meta {
		gap: 6px 8px;
		margin-bottom: 5px;
	}

	.sophia-pld__badge {
		padding: 2px 8px;
		font-size: 10px;
	}

	.sophia-pld__size,
	.sophia-pld__updated {
		font-size: 11px;
	}

	.sophia-pld__card-title {
		font-size: 17px;
		line-height: 1.3;
		margin-bottom: 2px;
	}

	.sophia-pld__card-desc {
		font-size: 13px;
	}

	.sophia-pld__card-action {
		width: 100%;
	}

	.sophia-pld__btn {
		width: 100%;
		min-height: 48px;
		padding: 12px 16px;
		font-size: 15px;
		border-radius: 14px;
	}

	.sophia-pld__btn-label--full {
		display: none;
	}

	.sophia-pld__btn-label--short {
		display: inline;
	}

	.sophia-pld-account__card {
		flex-direction: column;
		padding: 18px;
		gap: 12px;
	}

	.sophia-pld-account__btn {
		width: 100%;
		justify-content: center;
	}
}

/* Very small phones */
@media (max-width: 380px) {
	.sophia-pld__card-icon {
		width: 44px;
		height: 44px;
	}

	.sophia-pld__title {
		font-size: 22px;
	}

	.sophia-pld__card-meta {
		row-gap: 4px;
	}
}

/* Wide tablet / small desktop: two-up when multiple cards */
@media (min-width: 900px) and (max-width: 1199px) {
	.sophia-pld__list:has(.sophia-pld__card:nth-child(2)) {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		max-width: min(980px, 100%);
	}

	.sophia-pld__list:has(.sophia-pld__card:nth-child(2)) .sophia-pld__card {
		flex-direction: column;
		align-items: stretch;
		height: 100%;
	}

	.sophia-pld__list:has(.sophia-pld__card:nth-child(2)) .sophia-pld__card-action {
		margin-top: auto;
	}

	.sophia-pld__list:has(.sophia-pld__card:nth-child(2)) .sophia-pld__btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sophia-pld__card,
	.sophia-pld__vip-banner,
	.sophia-pld__btn,
	.sophia-pld__vip-cta,
	.sophia-pld-account__btn {
		animation: none !important;
		transition: none !important;
	}
}
