/* -------------------------------------------------------------------------
 * Blog: article layout that sits on top of the prose styles in components.css
 *
 * Only loaded on singular posts and the blog index. Everything here is scoped
 * to the article body so it cannot leak into pages, shop or product screens.
 * ---------------------------------------------------------------------- */

.cooprtim-single .cooprtim-layout__main {
	max-inline-size: min(100%, 56rem);
	margin-inline: auto;
}

.cooprtim-single .cooprtim-entry__header {
	margin-block-end: var(--cooprtim-space-5);
}

.cooprtim-single .cooprtim-entry__eyebrow {
	color: var(--cooprtim-color-honey-dark, #8a5a00);
	font-weight: 600;
	letter-spacing: 0.04em;
}

.cooprtim-single .cooprtim-entry__title {
	font-family: var(--cooprtim-font-display);
	font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.5rem);
	line-height: 1.28;
	margin-block: 0.35em 0.5em;
	text-wrap: balance;
}

.cooprtim-entry__content.cooprtim-prose {
	font-size: 1.0625rem;
	line-height: 1.95;
	color: var(--cooprtim-color-ink-soft);
}

.cooprtim-entry__content.cooprtim-prose > p:first-of-type {
	font-size: 1.15rem;
	color: var(--cooprtim-color-ink);
}

/* Lead paragraph */
.cooprtim-entry__content .ct-lead {
	font-size: 1.15rem;
	line-height: 1.9;
	color: var(--cooprtim-color-ink);
}

/* Section headings get a small honey rule so long reads stay scannable */
.cooprtim-entry__content h2 {
	padding-block-start: 0.35em;
	border-block-start: 2px solid rgba(184, 134, 11, 0.25);
}

.cooprtim-entry__content h3 {
	font-size: 1.15rem;
}

/* Tables ------------------------------------------------------------------ */
.cooprtim-entry__content .ct-table-wrap {
	overflow-x: auto;
	margin-block: 2em;
	border: 1px solid rgba(31, 58, 44, 0.12);
	border-radius: 14px;
	background: #fffdf7;
	-webkit-overflow-scrolling: touch;
}

.cooprtim-entry__content table {
	width: 100%;
	min-inline-size: 34rem;
	border-collapse: collapse;
	font-size: 0.95rem;
	line-height: 1.7;
}

.cooprtim-entry__content thead th {
	background: rgba(184, 134, 11, 0.12);
	color: var(--cooprtim-color-ink);
	font-family: var(--cooprtim-font-display);
	text-align: start;
	padding: 0.85rem 1rem;
	border-block-end: 1px solid rgba(31, 58, 44, 0.15);
}

.cooprtim-entry__content tbody td {
	padding: 0.85rem 1rem;
	border-block-end: 1px solid rgba(31, 58, 44, 0.08);
	vertical-align: top;
}

.cooprtim-entry__content tbody tr:last-child td {
	border-block-end: 0;
}

.cooprtim-entry__content tbody th {
	padding: 0.85rem 1rem;
	text-align: start;
	font-weight: 600;
	color: var(--cooprtim-color-ink);
	background: rgba(31, 58, 44, 0.03);
	border-block-end: 1px solid rgba(31, 58, 44, 0.08);
}

/* Callouts ---------------------------------------------------------------- */
.cooprtim-entry__content .ct-note {
	margin-block: 2em;
	padding: 1.05rem 1.25rem;
	border-inline-start: 4px solid var(--cooprtim-color-honey, #b8860b);
	background: rgba(184, 134, 11, 0.08);
	border-radius: 10px;
	font-size: 0.98rem;
}

.cooprtim-entry__content .ct-note p:last-child {
	margin-block-end: 0;
}

.cooprtim-entry__content .ct-note--warning {
	border-inline-start-color: #b3492f;
	background: rgba(179, 73, 47, 0.07);
}

/* FAQ --------------------------------------------------------------------- */
.cooprtim-entry__content .ct-faq {
	margin-block: 2em;
	display: grid;
	gap: 0.75rem;
}

.cooprtim-entry__content .ct-faq details {
	background: #fff;
	border: 1px solid rgba(31, 58, 44, 0.12);
	border-radius: 12px;
	padding: 0.15rem 0.35rem;
}

.cooprtim-entry__content .ct-faq summary {
	cursor: pointer;
	padding: 0.85rem 0.75rem;
	font-weight: 600;
	font-family: var(--cooprtim-font-display);
	color: var(--cooprtim-color-ink);
	list-style: none;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

.cooprtim-entry__content .ct-faq summary::-webkit-details-marker {
	display: none;
}

.cooprtim-entry__content .ct-faq summary::after {
	content: "+";
	color: var(--cooprtim-color-honey-dark, #8a5a00);
	font-weight: 700;
}

.cooprtim-entry__content .ct-faq details[open] summary::after {
	content: "–";
}

.cooprtim-entry__content .ct-faq details > p {
	padding: 0 0.75rem 0.9rem;
	margin: 0;
	font-size: 0.98rem;
}

/* Sources ----------------------------------------------------------------- */
.cooprtim-entry__content .ct-sources {
	margin-block: 2.4em;
	padding: 1.25rem 1.35rem;
	background: var(--cooprtim-color-sand, #faf5e9);
	border-radius: 14px;
	font-size: 0.92rem;
}

.cooprtim-entry__content .ct-sources h2,
.cooprtim-entry__content .ct-sources h3 {
	margin-block-start: 0;
	border: 0;
	padding: 0;
	font-size: 1.05rem;
}

.cooprtim-entry__content .ct-sources ol {
	margin-block-end: 0;
	padding-inline-start: 1.2em;
}

.cooprtim-entry__content .ct-sources li + li {
	margin-block-start: 0.45em;
}

.cooprtim-entry__content .ct-sources a {
	color: var(--cooprtim-color-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* In-article product CTA -------------------------------------------------- */
.cooprtim-entry__content .ct-cta {
	margin-block: 2.6em;
	padding: 1.5rem 1.5rem;
	border: 1px solid rgba(31, 58, 44, 0.12);
	border-radius: 18px;
	background: linear-gradient(180deg, #fffdf7, #faf5e9);
}

.cooprtim-entry__content .ct-cta h2 {
	margin-block-start: 0;
	border: 0;
	padding: 0;
	font-size: 1.2rem;
}

.cooprtim-entry__content .ct-cta ul {
	margin-block-end: 0.9rem;
}

.cooprtim-entry__content .ct-cta__note {
	font-size: 0.9rem;
	color: var(--cooprtim-color-ink-muted);
	margin-block-end: 0;
}

/* Long-word safety for Arabic URLs and citations */
.cooprtim-entry__content {
	overflow-wrap: anywhere;
}

@media (max-width: 600px) {
	.cooprtim-entry__content.cooprtim-prose {
		font-size: 1.0125rem;
		line-height: 1.9;
	}

	.cooprtim-entry__content table {
		min-inline-size: 30rem;
	}
}

/* Product cards inside the article (same shape as the shop cards) */
.cooprtim-entry__content .ct-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin: 1.4em 0 1.2em;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.cooprtim-entry__content .ct-products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.cooprtim-entry__content .ct-product {
	margin: 0;
	list-style: none;
}

.cooprtim-entry__content .ct-product__link {
	display: flex;
	flex-direction: column;
	block-size: 100%;
	background: #fff;
	border: 1px solid rgba(31, 58, 44, 0.12);
	border-radius: 14px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cooprtim-entry__content .ct-product__link:hover,
.cooprtim-entry__content .ct-product__link:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(31, 58, 44, 0.12);
}

.cooprtim-entry__content .ct-product__media {
	display: block;
	aspect-ratio: 1 / 1;
	background: #f7f2e5;
	overflow: hidden;
}

.cooprtim-entry__content .ct-product__media img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	display: block;
}

.cooprtim-entry__content .ct-product__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px 12px 12px;
}

.cooprtim-entry__content .ct-product__name {
	font-family: var(--cooprtim-font-display);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1.55;
	color: var(--cooprtim-color-ink);
}

.cooprtim-entry__content .ct-product__price {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--cooprtim-color-honey-dark, #8a5a00);
}

.cooprtim-entry__content .ct-product__price del {
	font-weight: 400;
	opacity: 0.6;
	font-size: 0.85em;
}

.cooprtim-entry__content .ct-links {
	margin-block: 0.4em 0.6em;
	font-size: 0.95rem;
}

/* Price ranges should not break across lines in a narrow card */
.cooprtim-entry__content .ct-product__price .woocommerce-Price-amount {
	white-space: nowrap;
}

/*
 * Article covers are 1200x630 with the headline baked into the right half.
 * The 4/3 card frame cropped exactly that away, so post cards keep the cover's
 * own ratio and anchor to the right edge (RTL start) when a shorter ratio does
 * crop.
 */
.cooprtim-blog .cooprtim-card__media,
.cooprtim-archive .cooprtim-card__media {
	aspect-ratio: 16 / 9;
}

.cooprtim-blog .cooprtim-card__media img,
.cooprtim-archive .cooprtim-card__media img {
	object-position: right center;
}

/* -------------------------------------------------------------------------
 * Article blocks rendered by inc/article.php: related products + related
 * articles. These sit outside .cooprtim-entry__content, so they are scoped to
 * the article shell and never touch the shop or the body prose.
 * ---------------------------------------------------------------------- */

.cooprtim-single .ct-block {
	margin-block: 3rem 0;
	padding-block-start: 2rem;
	border-block-start: 1px solid rgba(31, 58, 44, 0.12);
}

.cooprtim-single .ct-block__title {
	margin: 0 0 1.25rem;
	padding: 0;
	border: 0;
	font-family: var(--cooprtim-font-display);
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
	line-height: 1.4;
	color: var(--cooprtim-color-ink);
}

.cooprtim-single .ct-block__note {
	margin-block: 0.9rem 0;
	font-size: 0.86rem;
	color: var(--cooprtim-color-ink-muted);
}

/* Products: 2 / 3 / 4 */
.cooprtim-single .ct-products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.9rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 760px) {
	.cooprtim-single .ct-products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1rem;
	}
}

@media (min-width: 1100px) {
	.cooprtim-single .ct-products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.cooprtim-single .ct-product {
	min-inline-size: 0;
	margin: 0;
	list-style: none;
}

.cooprtim-single .ct-product__card {
	display: flex;
	flex-direction: column;
	block-size: 100%;
	background: #fff;
	border: 1px solid rgba(31, 58, 44, 0.12);
	border-radius: 16px;
	overflow: hidden;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cooprtim-single .ct-product__card:hover {
	transform: translateY(-3px);
	border-color: rgba(169, 115, 31, 0.4);
	box-shadow: 0 18px 34px -24px rgba(31, 58, 44, 0.65);
}

.cooprtim-single .ct-product__media {
	display: block;
	aspect-ratio: 1 / 1;
	background: #f7f2e5;
	overflow: hidden;
}

.cooprtim-single .ct-product__img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.cooprtim-single .ct-product__card:hover .ct-product__img {
	transform: scale(1.04);
}

.cooprtim-single .ct-product__body {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 0.7rem 0.8rem 0.85rem;
}

.cooprtim-single .ct-product__name {
	margin: 0;
	font-family: var(--cooprtim-font-display);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.55;
	color: var(--cooprtim-color-ink);
}

.cooprtim-single .ct-product__name a {
	color: inherit;
	text-decoration: none;
}

.cooprtim-single .ct-product__price {
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--cooprtim-color-honey-dark, #8a5a00);
	white-space: nowrap;
	line-height: 1.5;
}

.cooprtim-single .ct-product__price .woocommerce-Price-amount {
	white-space: nowrap;
}

.cooprtim-single .ct-product__add {
	margin-block-start: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 2.25rem;
	padding: 0.35rem 0.75rem;
	border-radius: 999px;
	background: var(--cooprtim-color-honey, #b8860b);
	color: #fff;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.15s ease;
}

.cooprtim-single .ct-product__add:hover,
.cooprtim-single .ct-product__add:focus-visible {
	filter: brightness(1.08);
	color: #fff;
}

.cooprtim-single .ct-product__add--link {
	background: transparent;
	color: var(--cooprtim-color-ink);
	border: 1px solid rgba(31, 58, 44, 0.22);
}

.cooprtim-single .ct-product__add.loading {
	opacity: 0.7;
	pointer-events: none;
}

/* Related articles: 1 / 2 / 3 */
.cooprtim-single .ct-related {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 600px) {
	.cooprtim-single .ct-related {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 960px) {
	.cooprtim-single .ct-related {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.cooprtim-single .ct-related__item {
	min-inline-size: 0;
	margin: 0;
	list-style: none;
}

.cooprtim-single .ct-related__card {
	display: flex;
	flex-direction: column;
	block-size: 100%;
	background: #fff;
	border: 1px solid rgba(31, 58, 44, 0.12);
	border-radius: 16px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.cooprtim-single .ct-related__card:hover {
	transform: translateY(-3px);
	border-color: rgba(169, 115, 31, 0.4);
	box-shadow: 0 18px 34px -24px rgba(31, 58, 44, 0.65);
}

.cooprtim-single .ct-related__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: #f2ecdd;
	overflow: hidden;
}

.cooprtim-single .ct-related__media img {
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: right center;
	display: block;
	transition: transform 0.3s ease;
}

.cooprtim-single .ct-related__card:hover .ct-related__media img {
	transform: scale(1.03);
}

.cooprtim-single .ct-related__body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	padding: 0.85rem 0.95rem 1rem;
}

.cooprtim-single .ct-related__eyebrow {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--cooprtim-color-honey-dark, #8a5a00);
}

.cooprtim-single .ct-related__title {
	font-family: var(--cooprtim-font-display);
	font-size: 1.02rem;
	font-weight: 700;
	line-height: 1.55;
	color: var(--cooprtim-color-ink);
}

.cooprtim-single .ct-related__excerpt {
	font-size: 0.86rem;
	line-height: 1.75;
	color: var(--cooprtim-color-ink-muted);
}

@media (prefers-reduced-motion: reduce) {
	.cooprtim-single .ct-product__card,
	.cooprtim-single .ct-product__img,
	.cooprtim-single .ct-related__card,
	.cooprtim-single .ct-related__media img {
		transition: none;
	}
}
