/*
 * IB Navigation — Shop page and blog parts (shop, shop-list, blog, blog-archive, blog-post).
 * Enqueued only where one of those parts can print (Assets::on_pages_context()).
 * Class names carried over from the approved mockups (sh-, bl-, ar-), renamed to the
 * plugin's own prefix: ibnav-shop-*, ibnav-blog-*, ibnav-article-*.
 * Tokens: titles 'ABeeZee' weight 200; body text inherited (IBM Plex Sans, rgb(64,64,64),
 * 17.64px); cards white, 1px solid #e5e5e5, radius 12px; eyebrow 12px uppercase,
 * letter-spacing .12em, red rgb(184,0,0); green rgb(54,99,54) for active pills and the
 * "Choose" button; grey meta rgb(110,110,110).
 */

/* ---------- Shop ---------- */

.ibnav-shop-head {
	width: 100%;
	text-align: left;
}
.ibnav-shop-title {
	text-align: left !important;
	margin: 0 !important;
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 39px;
}
.ibnav-shop-intro {
	font-size: 17.64px;
	color: rgb(64, 64, 64);
	max-width: 62ch;
	margin: 10px 0 36px;
	text-align: left;
}
.ibnav-shop-depts {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
	margin: 0 0 56px;
}
.ibnav-shop-dept {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}
.ibnav-shop-dept-img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	background: #f2f2f2;
	height: auto !important;
}
.ibnav-shop-dept-img img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}
.ibnav-shop-dept-body {
	padding: 14px 16px 18px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ibnav-shop-dept-title {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 21px;
	margin: 0;
	color: rgb(33, 33, 33);
}
.ibnav-shop-dept-text {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.45;
	color: rgb(96, 96, 96);
}
.ibnav-shop-dept-link {
	color: rgb(54, 99, 54);
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	margin-top: auto;
}

.ibnav-shop-list-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
	width: 100%;
	margin: 0 0 20px;
	text-align: left;
}
.ibnav-shop-list-head h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 24px;
	margin: 0;
}
.ibnav-shop-list-count {
	color: rgb(110, 110, 110);
	font-size: 15px;
}
.ibnav-shop-list-sort {
	margin-left: auto;
}
.ibnav-shop-list-sort .woocommerce-ordering {
	margin: 0;
}
.ibnav-shop-list-sort select {
	font-size: 15px;
	color: rgb(64, 64, 64);
	border: 1px solid rgba(128, 128, 128, .35);
	border-radius: 8px;
	padding: 8px 12px;
	background: #fff;
}

@media (max-width: 900px) {
	.ibnav-shop-depts {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.ibnav-shop-dept {
		flex-direction: row;
		align-items: center;
	}
	.ibnav-shop-dept-img {
		flex: 0 0 96px;
		width: 96px;
		height: 96px;
	}
	.ibnav-shop-dept-body {
		padding: 10px 14px;
	}
	.ibnav-shop-dept-link {
		display: none;
	}
	.ibnav-shop-dept-title {
		font-size: 19px;
	}
	.ibnav-shop-dept-text {
		font-size: 13.5px;
	}
	/* The sort control stays visible on the phone (Matteo: the mockup hides it, he does not
	   want that) — full width, under the title, never next to it. */
	.ibnav-shop-list-head {
		flex-direction: column;
		align-items: flex-start;
	}
	.ibnav-shop-list-sort {
		margin-left: 0;
		width: 100%;
	}
	.ibnav-shop-list-sort select {
		width: 100%;
	}
}

/* ---------- Blog ---------- */

.ibnav-blog-wrap {
	width: 100%;
	text-align: left;
}
.ibnav-blog-head h1 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 39px;
	margin: 0;
	color: rgb(33, 33, 33);
	line-height: 1.15;
}
.ibnav-blog-intro {
	font-size: 17.64px;
	color: rgb(64, 64, 64);
	max-width: 62ch;
	margin: 10px 0 28px;
}
.ibnav-blog-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 36px;
}
.ibnav-blog-pills a {
	font-size: 14px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid rgba(128, 128, 128, .3);
	color: rgb(64, 64, 64);
	text-decoration: none;
	background: #fff;
}
.ibnav-blog-pills a.on {
	background: rgb(54, 99, 54);
	border-color: rgb(54, 99, 54);
	color: #fff;
}
.ibnav-blog-eyebrow {
	font-size: 12px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: rgb(184, 0, 0);
	text-decoration: none;
	display: inline-block;
}
.ibnav-blog-meta {
	font-size: 14px;
	color: rgb(110, 110, 110);
}
.ibnav-blog-more {
	color: rgb(54, 99, 54);
	font-weight: 600;
	text-decoration: none;
}

.ibnav-blog-feat {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
	margin: 0 0 40px;
	text-decoration: none;
	color: inherit;
}
.ibnav-blog-feat-img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 360px;
	background: #f2f2f2;
	height: auto !important;
}
.ibnav-blog-feat-img img {
	width: 100%;
	height: 100%;
	min-height: 360px;
	object-fit: cover;
	display: block;
}
.ibnav-blog-feat-body {
	padding: 36px 40px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	justify-content: center;
}
.ibnav-blog-feat-body h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 32px;
	line-height: 1.2;
	margin: 0;
	color: rgb(33, 33, 33);
}
.ibnav-blog-feat-body p {
	margin: 0;
	font-size: 17.64px;
	line-height: 1.55;
	color: rgb(64, 64, 64);
}

.ibnav-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0 0 48px;
}
.ibnav-blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
}
.ibnav-blog-card-img {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	background: #f2f2f2;
	height: auto !important;
}
.ibnav-blog-card-img img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	display: block;
	height: auto !important;
}
.ibnav-blog-card-body {
	padding: 18px 22px 22px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	flex: 1;
}
.ibnav-blog-card-body h3 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 22px;
	line-height: 1.25;
	margin: 0;
	color: rgb(33, 33, 33);
}
.ibnav-blog-card-text {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.5;
	color: rgb(80, 80, 80);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.ibnav-blog-card-body .ibnav-blog-meta {
	margin-top: auto;
}

.ibnav-blog-pag {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 8px 0 48px;
}
.ibnav-blog-pag .page-numbers {
	font-size: 14px;
	padding: 7px 14px;
	border-radius: 999px;
	border: 1px solid rgba(128, 128, 128, .3);
	color: rgb(64, 64, 64);
	text-decoration: none;
	background: #fff;
}
.ibnav-blog-pag .page-numbers.current {
	background: rgb(54, 99, 54);
	border-color: rgb(54, 99, 54);
	color: #fff;
}
.ibnav-blog-pag .page-numbers.dots {
	border: 0;
	background: none;
	padding: 7px 4px;
}

.ibnav-blog-sec {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 24px;
	margin: 0;
}

/* ---------- Article ---------- */

/* Two columns: the reading column and a sticky rail (approved mockup
   threads/proto/article/article-two-col.html, area decision (418)). */
.ibnav-article-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 56px;
	align-items: start;
	width: 100%;
}
.ibnav-article-main {
	min-width: 0;
}

.ibnav-article {
	text-align: left;
}
.ibnav-article h1 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 42px;
	line-height: 1.18;
	margin: 10px 0 14px;
	color: rgb(33, 33, 33);
}
.ibnav-article-lead {
	font-size: 21px;
	line-height: 1.55;
	color: rgb(64, 64, 64);
	margin: 0 0 18px;
}
.ibnav-article-cover {
	width: 100%;
	margin: 24px 0 32px;
	display: block;
	border-radius: 12px;
	aspect-ratio: 16 / 7;
	object-fit: cover;
	height: auto;
}
.ibnav-article-body {
	text-align: left;
}
.ibnav-article-body p,
.ibnav-article-body li {
	font-size: 18px;
	line-height: 1.75;
	color: rgb(64, 64, 64);
	margin: 0 0 18px;
	max-width: 68ch;
}
.ibnav-article-body h2 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 28px;
	margin: 44px 0 14px;
	color: rgb(33, 33, 33);
	scroll-margin-top: 120px;
}
.ibnav-article-body h3 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 22px;
	margin: 28px 0 10px;
}
.ibnav-article-body a {
	color: rgb(184, 0, 0);
}
.ibnav-article-body ul,
.ibnav-article-body ol {
	padding-left: 24px;
}

/* A picture inside the text: no frame of its own, the image carries the border. */
.ibnav-article-body figure {
	margin: 24px 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	text-align: left;
}
.ibnav-article-body figure img {
	max-height: 200px;
	width: auto;
	max-width: 100%;
	border: 1px solid rgba(128, 128, 128, .25);
	border-radius: 10px;
	background: #fff;
	padding: 8px;
	box-sizing: border-box;
	display: block;
}
.ibnav-article-body figcaption {
	font-size: 14px;
	color: rgb(110, 110, 110);
	margin-top: 8px;
	text-align: left;
}

/* Two pictures that tell the same thing, side by side (Render\ArticleContent::pair_figures()). */
.ibnav-article-pair {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 26px 0;
	max-width: 68ch;
}
.ibnav-article-pair figure {
	margin: 0;
}
.ibnav-article-pair figure img {
	max-height: 210px;
	width: 100%;
	object-fit: contain;
}

/* The rail: sticky, two boxes (index, flags). */
.ibnav-article-rail {
	position: sticky;
	top: 110px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.ibnav-article-box {
	border: 1px solid rgba(128, 128, 128, .25);
	border-radius: 12px;
	background: #fff;
	padding: 20px 22px;
}
.ibnav-article-box h3 {
	font-family: 'ABeeZee', sans-serif;
	font-weight: 200;
	font-size: 19px;
	margin: 0 0 12px;
	color: rgb(33, 33, 33);
}
.ibnav-article-index a {
	display: block;
	font-size: 15.5px;
	line-height: 1.45;
	color: rgb(64, 64, 64);
	text-decoration: none;
	padding: 7px 0;
	border-top: 1px solid rgba(128, 128, 128, .18);
}
.ibnav-article-index a:first-of-type {
	border-top: 0;
}
.ibnav-article-index a:hover {
	color: rgb(184, 0, 0);
}

.ibnav-article-flags .ibnav-article-prod-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 0;
}
.ibnav-article-flags .ibnav-article-prod {
	padding: 10px;
	flex-wrap: wrap;
	row-gap: 8px;
}
.ibnav-article-flags .ibnav-article-prod-name {
	font-size: 15px;
	line-height: 1.3;
}
.ibnav-article-flags .ibnav-article-prod-img,
.ibnav-article-flags .ibnav-article-prod-img img {
	width: 56px;
	height: 56px;
}
.ibnav-article-flags .ibnav-article-prod-img {
	flex: 0 0 56px;
}
.ibnav-article-flags .ibnav-article-prod-btn {
	font-size: 11px;
	padding: 8px 10px;
}

/* Product row, shared with the «Keep reading»-adjacent card style above. */
.ibnav-article-prod-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 14px;
}
.ibnav-article-prod {
	display: flex;
	gap: 16px;
	align-items: center;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	padding: 12px;
	text-decoration: none;
	color: rgb(33, 33, 33);
}
.ibnav-article-prod-img {
	display: block;
	width: 84px;
	height: 84px;
	border-radius: 8px;
	background: #f2f2f2;
	flex: 0 0 84px;
}
.ibnav-article-prod-img img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.ibnav-article-prod-name {
	flex: 1;
}
.ibnav-article-prod-btn {
	border: 0;
	box-shadow: none;
	margin-left: auto;
	background: rgb(54, 99, 54);
	color: #fff;
	border-radius: 8px;
	font-size: 12px;
	text-transform: uppercase;
	padding: 10px 14px;
	letter-spacing: .04em;
	white-space: nowrap;
}

/* «Keep reading»: full width, below the grid — not part of it. */
.ibnav-article-more {
	margin-top: 64px;
	text-align: left;
}
.ibnav-article-more > h2 {
	margin: 0 0 20px;
}

@media (max-width: 900px) {
	.ibnav-blog-feat {
		grid-template-columns: 1fr;
	}
	.ibnav-blog-feat-img,
	.ibnav-blog-feat-img img {
		min-height: 0;
		aspect-ratio: 16 / 10;
		height: auto !important;
	}
	.ibnav-blog-feat-body {
		padding: 22px;
	}
	.ibnav-blog-feat-body h2 {
		font-size: 26px;
	}
	.ibnav-blog-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.ibnav-blog-head h1 {
		font-size: 32px;
	}
}

/* Phone: one column, the rail after the text, no longer sticky; the index box hidden
   (the approved mockup keeps only the flags box on a phone). */
@media (max-width: 1100px) {
	.ibnav-article-grid {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.ibnav-article-rail {
		position: static;
	}
	.ibnav-article-index {
		display: none;
	}
	.ibnav-article h1 {
		font-size: 32px;
	}
	.ibnav-article-prod-list {
		grid-template-columns: 1fr;
	}
	.ibnav-article-cover {
		aspect-ratio: 16 / 10;
	}
}

/* ----------------------------------------------------------------------
 * The blocks the written pages are made of (Resellers, Contributor Program,
 * Affiliation Program, Careers, Impressum): a page is ordinary text in
 * wp-admin, these classes give it the shop's look. Approved mockups:
 * threads/proto/pages/ (area decision (421)).
 * -------------------------------------------------------------------- */
.ibnav-page { width: 100%; text-align: left; }
.ibnav-page-eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgb(184,0,0); }
.ibnav-page h1 { font-family: 'ABeeZee', sans-serif; font-weight: 200; font-size: 42px; line-height: 1.15; margin: 8px 0 18px; color: rgb(33,33,33); max-width: 22ch; }
.ibnav-page-lead { font-size: 21px; line-height: 1.6; color: rgb(64,64,64); max-width: 62ch; margin: 0 0 28px; }
.ibnav-page-cta { display: inline-block; background: rgb(54,99,54); color: #fff; border-radius: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 16px 24px; text-decoration: none; }
.ibnav-page-cta-note { font-size: 15px; color: rgb(110,110,110); margin: 12px 0 0; }
.ibnav-page-blocks { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 24px; margin: 56px 0 0; }
.ibnav-page-block { border: 1px solid rgba(128,128,128,.25); border-radius: 12px; background: #fff; padding: 28px 30px; }
.ibnav-page-block h2 { font-family: 'ABeeZee', sans-serif; font-weight: 200; font-size: 24px; margin: 0 0 10px; color: rgb(33,33,33); }
.ibnav-page-block p { margin: 0; font-size: 17.64px; line-height: 1.65; color: rgb(64,64,64); }
.ibnav-page h2.ibnav-page-sec { font-family: 'ABeeZee', sans-serif; font-weight: 200; font-size: 28px; margin: 64px 0 24px; color: rgb(33,33,33); }
.ibnav-page-steps { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.ibnav-page-step { display: flex; gap: 16px; align-items: flex-start; }
.ibnav-page-step > span { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; background: rgb(54,99,54); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.ibnav-page-step h3 { font-family: 'ABeeZee', sans-serif; font-weight: 200; font-size: 20px; margin: 4px 0 6px; color: rgb(33,33,33); }
.ibnav-page-step p { margin: 0; font-size: 16px; line-height: 1.55; color: rgb(96,96,96); }
.ibnav-page-faq { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px 40px; }
.ibnav-page-faq h3 { font-size: 17.64px; margin: 0 0 6px; color: rgb(33,33,33); font-weight: 600; }
.ibnav-page-faq p { margin: 0; font-size: 16.5px; line-height: 1.6; color: rgb(64,64,64); }
.ibnav-page-legal { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 10px 24px; border: 1px solid rgba(128,128,128,.25); border-radius: 12px; padding: 26px 30px; background: #fff; max-width: 760px; }
.ibnav-page-legal dt { color: rgb(110,110,110); font-size: 15.5px; }
.ibnav-page-legal dd { margin: 0; font-size: 17px; color: rgb(33,33,33); }
.ibnav-page-close { margin: 72px 0 0; border: 1px solid rgba(128,128,128,.25); border-radius: 12px; background: #fff; padding: 36px 40px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.ibnav-page-close p { margin: 0; font-family: 'ABeeZee', sans-serif; font-weight: 200; font-size: 26px; color: rgb(33,33,33); max-width: 30ch; }
.ibnav-page-form { margin: 64px 0 0; }

@media (max-width: 900px) {
	.ibnav-page h1 { font-size: 32px; }
	.ibnav-page-lead { font-size: 19px; }
	.ibnav-page-blocks,
	.ibnav-page-steps,
	.ibnav-page-faq { grid-template-columns: 1fr; }
	.ibnav-page-legal { grid-template-columns: 1fr; gap: 4px 0; }
	.ibnav-page-legal dd { margin-bottom: 12px; }
	.ibnav-page-close { flex-direction: column; align-items: flex-start; padding: 24px; }
}
