/*
 * 965 Toys - P5 (RC3): top strip from owner content, FAQ page, contact page place card, blog archive and posts.
 * Uses the central tokens of 965-p1.css / 965-p2.css / 965-p4.css only (see docs/design/figma-values.md).
 */

/* ------------------------------------------------------------------ header top strip (owner text only) */
body.t965-no-topbar .whb-top-bar {
	display: none !important;
}
.t965-topbar-pending {
	display: inline-block;
	padding: 2px 10px;
	border: 1.5px dashed rgba(255, 255, 255, .75);
	border-radius: var(--t965-r-pill);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
}

/* ------------------------------------------------------------------ footer: no empty column for visitors */
/* The "تواصل" column is filled by [t965_footer_contact]; while the owner has not supplied any contact detail its body is
   empty for visitors, so the heading would stand alone. Shop managers still see the column with its placeholders. */
.t965-fcol:has(> div:empty) {
	display: none;
}

/* ------------------------------------------------------------------ FAQ page (Figma FAQ block on its own page) */
.t965-faq-page .t965-faq__grid--page {
	max-width: var(--t965-container);
	margin-bottom: var(--t965-space-7);
}
.t965-faq-page .t965-faq__item {
	border: 1px solid var(--t965-line);
}
.t965-faq-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--t965-space-4);
	margin: 0 0 var(--t965-section-y);
	padding: var(--t965-space-6);
	border-radius: var(--t965-r-lg);
	background: var(--t965-peach-soft);
}
.t965-faq-cta p {
	margin: 0;
	color: var(--t965-navy);
	font-size: 20px;
	font-weight: 800;
}
.t965-faq-cta .t965h-btn {
	margin-top: 0;
}

/* ------------------------------------------------------------------ contact page */
.t965-contact--form-only {
	grid-template-columns: minmax(0, 760px);
	justify-content: center;
}
.t965-contact__map--set {
	height: auto;
	min-height: 160px;
	padding: var(--t965-space-6);
	text-align: center;
	color: var(--t965-navy);
}
.t965-contact__address {
	font-weight: 700;
	line-height: 1.7;
}
.t965-contact__map--set .t965h-btn {
	margin-top: var(--t965-space-2);
}
.t965-contact__card .t965-contact__text {
	direction: rtl;
	text-align: start;
}

/* ------------------------------------------------------------------ blog (no Figma frame: store tokens, cards like the shop) */
body.t965-blog {
	background: var(--t965-cream);
}
/* WoodMart's page-title band is replaced by .t965-page-head on blog views (965-p5.php t965_blog_head). */
body.t965-blog article.post,
body.t965-blog .wd-post {
	font-family: var(--t965-font);
}
body.t965-blog .blog-post-loop .article-inner,
body.t965-blog .wd-post .wd-post-inner,
body.t965-blog .wd-post.blog-style-shadow .article-inner {
	overflow: hidden;
	border: 1.5px dashed var(--t965-dash);
	border-radius: var(--t965-r-card);
	background: var(--t965-card);
	box-shadow: none;
}
body.t965-blog .wd-post .wd-post-thumb,
body.t965-blog .wd-post .wd-post-img,
body.t965-blog .wd-post-image {
	overflow: hidden;
	border-radius: var(--t965-r-md);
}
body.t965-blog .wd-entities-title,
body.t965-blog .wd-post-title {
	color: var(--t965-navy);
	font-weight: 800;
	line-height: 1.35;
	text-transform: none;
}
body.t965-blog .wd-entities-title a {
	color: inherit;
}
/* Category badge: WoodMart paints the box (.wd-post-cat.wd-style-with-bg: red, square, fixed 2em height), so the pill is
   styled on that box, not on the inner link (a yellow pill inside a red rectangle was found in review). */
body.t965-blog .wd-post-cat.wd-style-with-bg {
	--wd-link-color: var(--t965-navy);
	--wd-link-color-hover: var(--t965-navy);
	height: auto;
	padding: 4px 12px;
	line-height: 1.5;
	border-radius: var(--t965-r-pill);
	background-color: var(--t965-yellow);
	color: var(--t965-navy);
	font-weight: 800;
	text-transform: none;
}
body.t965-blog .wd-post-cat.wd-style-with-bg a {
	color: inherit;
}
/* Masonry cards pull the badge over the top edge of the picture; without a picture (first child is the body) the card's
   overflow:hidden would cut it in half, so it sits inside the card instead. */
body.t965-blog .blog-design-masonry .wd-post-inner > .wd-post-content:first-child > .wd-post-cat {
	margin-top: 0;
}
body.t965-blog .wd-post-meta,
body.t965-blog .wd-post-date,
body.t965-blog .wd-modified-date {
	color: var(--t965-muted);
	font-size: var(--t965-fs-small);
}
/* No author on the storefront (965-p5.php hides name, link and avatar); the empty slot is removed too. */
body.t965-blog .wd-post-author,
body.t965-blog .wd-meta-author,
body.t965-blog .author-info,
body.t965-blog .wd-author-bio {
	display: none !important;
}
body.t965-blog .wd-entry-content,
body.t965-blog .wd-post-content,
body.t965-blog .entry-content {
	color: var(--t965-ink);
	font-size: 17px;
	line-height: 1.9;
}
body.t965-blog .wd-entry-content h2,
body.t965-blog .wd-entry-content h3 {
	color: var(--t965-navy);
	font-weight: 800;
}
body.t965-blog .wd-post-read-more a,
body.t965-blog .read-more-section a,
body.t965-blog a.more-link {
	display: inline-flex;
	padding: 10px 22px;
	border-radius: var(--t965-r-pill);
	background: var(--t965-yellow);
	color: var(--t965-navy);
	font-weight: 800;
	text-transform: none;
}
body.t965-blog .wd-pagination .page-numbers.current,
body.t965-blog .page-numbers.current {
	border-radius: var(--t965-r-pill);
	background: var(--t965-navy);
	color: #fff;
}

/* ------------------------------------------------------------------ shop toolbar on phones (RC2 fix) */
/* WoodMart turns the sort form into an icon button on phones (.wd-ordering-mb-icon, max-width 768.98px: a 30 px box
   with the select laid over it, transparent). The desktop label "الترتيب:" (965-p4.css) and the pill padding with
   !important (965-p2.css) made that select 54 px wide, so it stuck out 9 px at 390 px and cut the label. */
@media (max-width: 768.98px) {
	.woocommerce-ordering.wd-ordering-mb-icon {
		width: 42px;
		height: 42px;
		border: 1px solid var(--t965-line);
		border-radius: var(--t965-r-pill);
		background: #fff;
	}
	.woocommerce-ordering.wd-ordering-mb-icon::before {
		content: none;
	}
	.woocommerce-ordering.wd-ordering-mb-icon select,
	.woocommerce-ordering.wd-ordering-mb-icon .orderby {
		min-height: 0;
		padding: 0 !important;
		border: 0 !important;
		background: none !important;
	}
}

@media (max-width: 768px) {
	.t965-faq-cta {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
	.t965-faq-cta .t965h-btn {
		justify-content: center;
	}
	body.t965-blog .wd-entry-content,
	body.t965-blog .wd-post-content,
	body.t965-blog .entry-content {
		font-size: 16px;
	}
}
