/* UB AdSense Ready – front end. Uses Blocksy's colour variables when available. */
:root {
	--ub-accent: var(--theme-palette-color-1, #8a3b12);
	--ub-text: var(--theme-text-color, #2b2b2b);
	--ub-muted: #6b6b6b;
	--ub-border: var(--theme-border-color, #e4ddd3);
	--ub-soft: #faf7f2;
}

/* ---------- Ad spaces ---------- */
.ub-ad {
	clear: both;
	margin: 28px auto;
	max-width: 100%;
	min-height: 100px; /* reserves room so the page doesn't jump when ads load */
	text-align: center;
	overflow: hidden;
}
.ub-ad-label {
	display: block;
	margin-bottom: 4px;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--ub-muted);
}
.ub-ad .ub-ad-unit + .ub-ad-unit { margin-top: 12px; }
.ub-ad--ub-ad-header,
.ub-ad--ub-ad-footer {
	width: min(1200px, calc(100% - 32px));
	min-height: 90px;
}
.ub-ad--sticky { position: sticky; top: 90px; min-height: 250px; }
.ub-ad--placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px;
	border: 2px dashed #c9a37d;
	border-radius: 8px;
	background: repeating-linear-gradient(45deg, #fffaf3, #fffaf3 10px, #fff4e6 10px, #fff4e6 20px);
	color: #8a5a2b;
	font-size: 13px;
	line-height: 1.5;
}
ul.products li.ub-ad-row,
.products .ub-ad-row {
	grid-column: 1 / -1;
	width: 100%;
	list-style: none;
	margin: 0;
}

/* ---------- Book page ---------- */
.ub-facts-line {
	margin: 4px 0 14px;
	color: var(--ub-muted);
	font-size: 15px;
}
.ub-book {
	max-width: 820px;
	font-size: 17px;
	line-height: 1.75;
	color: var(--ub-text);
}
.ub-book p { margin: 0 0 1em; }
.ub-sec { margin: 0 0 2em; }
.ub-sec h2 {
	margin: 0 0 .6em;
	font-size: 1.3em;
	line-height: 1.3;
}
.ub-sec--note {
	padding: 18px 20px;
	border-left: 4px solid var(--ub-accent);
	background: var(--ub-soft);
	border-radius: 0 8px 8px 0;
}
.ub-details {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}
.ub-details th,
.ub-details td {
	padding: 9px 12px;
	border-bottom: 1px solid var(--ub-border);
	text-align: left;
	vertical-align: top;
}
.ub-details th { width: 34%; font-weight: 600; background: var(--ub-soft); }
.ub-faq details {
	border: 1px solid var(--ub-border);
	border-radius: 8px;
	padding: 12px 16px;
	margin-bottom: 10px;
}
.ub-faq summary { cursor: pointer; font-weight: 600; }
.ub-faq details p { margin: 10px 0 0; }
.ub-disclosure { font-size: 14px; color: var(--ub-muted); }
.ub-explore ul { margin: 0; padding-left: 1.2em; columns: 2; }
.ub-explore li span { color: var(--ub-muted); font-size: .9em; }
@media (max-width: 600px) {
	.ub-book { font-size: 16px; }
	.ub-explore ul { columns: 1; }
	.ub-details th { width: 42%; }
}

/* ---------- Category intro ---------- */
.ub-cat-intro {
	max-width: 900px;
	margin: 0 0 24px;
	padding: 20px 22px;
	background: var(--ub-soft);
	border: 1px solid var(--ub-border);
	border-radius: 10px;
	font-size: 16px;
	line-height: 1.7;
}
.ub-cat-intro__title { margin: 0 0 .5em; font-size: 1.25em; }
.ub-cat-intro p:last-child { margin-bottom: 0; }
.ub-cat-intro__count { color: var(--ub-muted); font-size: 14px; }

/* ---------- Legal links + contact form ---------- */
.ub-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 10px;
	padding: 14px 16px;
	font-size: 14px;
	border-top: 1px solid var(--ub-border);
}
.ub-legal span { color: var(--ub-muted); }
.ub-contact { max-width: 620px; }
.ub-contact label { display: block; font-weight: 600; margin-bottom: 4px; }
.ub-contact input,
.ub-contact textarea { width: 100%; }
.ub-contact .ub-hp { position: absolute; left: -9999px; }
.ub-form-ok { padding: 12px 16px; background: #e8f5e9; border-radius: 6px; }
.ub-form-err { padding: 12px 16px; background: #fdecea; border-radius: 6px; }
