/* Ad & Product Boxes: front end. Colours come from CSS variables set on each box; these are only fallbacks. */
.adpb-slot {
	clear: both;
	margin: 1.5em 0;
	box-sizing: border-box;
	max-width: 100%;
}
.adpb-label {
	margin: 0 0 4px;
	font-size: 12px;
	line-height: 1.2;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #595959;
}
@media (max-width: 767px) {
	.adpb-hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
	.adpb-hide-desktop { display: none !important; }
}
.adpb-products {
	padding: 14px;
	border: 1px solid var(--adpb-border, #d9d9d9);
	border-radius: 6px;
	background: var(--adpb-bg, #fff);
	color: var(--adpb-text, #333);
}
.adpb-products p { margin: 0 0 8px; }
.adpb-disclosure {
	font-size: 13px;
	line-height: 1.4;
	opacity: .85;
}
.adpb-title {
	font-size: 1.15em;
	line-height: 1.3;
	color: var(--adpb-title, #1a1a1a);
}
.adpb-products .adpb-list {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.adpb-products .adpb-item {
	display: flex;
	margin: 0;
	padding: 0;
	gap: 12px;
	min-width: 0;
}
.adpb-products .adpb-img { flex: 0 0 auto; }
.adpb-products .adpb-img img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 0;
	border: 0;
	box-shadow: none;
}
.adpb-products .adpb-body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	align-items: flex-start;
}
.adpb-products a.adpb-name {
	color: var(--adpb-title, #1a1a1a);
	font-weight: 600;
	line-height: 1.35;
	text-decoration: none;
	overflow-wrap: anywhere;
}
/* Only boxes of a rule with "Max title length" above 0 (class adpb-clamp): the title link stops at two lines. */
.adpb-products.adpb-clamp a.adpb-name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
	max-height: 2.7em;
}
.adpb-products a.adpb-name:hover,
.adpb-products a.adpb-name:focus { text-decoration: underline; }
.adpb-price { font-weight: 700; color: var(--adpb-text, #333); }
.adpb-rating { font-size: 13px; }
.adpb-products a.adpb-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 4px;
	background: var(--adpb-btn-bg, #1a56db);
	color: var(--adpb-btn-text, #fff);
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
}
.adpb-products a.adpb-btn:hover,
.adpb-products a.adpb-btn:focus { filter: brightness(.92); }
.adpb-products a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Card: products side by side, image on top. */
.adpb-layout-card .adpb-list { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.adpb-layout-card .adpb-item {
	flex-direction: column;
	padding: 10px;
	border: 1px solid var(--adpb-border, #d9d9d9);
	border-radius: 6px;
}
.adpb-layout-card .adpb-img { align-self: center; }

/* Row: one product per line, image on the left. */
.adpb-layout-row .adpb-list { grid-template-columns: 1fr; }
.adpb-layout-row .adpb-item { align-items: center; }
.adpb-layout-row .adpb-img img { width: 120px; height: auto; }

/* Compact: small image, name and button on one line when there is room. */
.adpb-layout-compact .adpb-list { grid-template-columns: 1fr; gap: 8px; }
.adpb-layout-compact .adpb-item { align-items: center; }
.adpb-layout-compact .adpb-img img { width: 56px; height: auto; }
.adpb-layout-compact .adpb-body { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
@media (max-width: 480px) {
	.adpb-layout-row .adpb-img img { width: 90px; }
}

/* Ad iframes keep the height from their own height="" attribute. Some themes set "iframe { height: auto }", which collapses them to 150px and crops the ad.
   max-width stays 100%, so a wide banner (728x90) still shrinks on a phone. */
.adpb-ad iframe {
	max-width: 100%;
	height: revert-layer;
}

/* Ad alignment (the classes are only added when the rule asks for it). The label follows the same side. */
.adpb-align-center,
.adpb-align-left,
.adpb-align-right {
	display: flex;
	flex-direction: column;
}
.adpb-align-center { align-items: center; text-align: center; }
.adpb-align-left { align-items: flex-start; text-align: left; }
.adpb-align-right { align-items: flex-end; text-align: right; }

/* Mobile-only screen positions. Hidden with visibility/opacity (not display:none) so the ad network can measure the ad; shown by front.js.
   767 / 768 is the same breakpoint as the "Show on" classes above (ADPB_MOBILE_MAX). */
@media (min-width: 768px) {
	.adpb-mobile { display: none !important; }
}
.adpb-mobile {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	box-sizing: border-box;
}
.adpb-mobile.adpb-on {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}
.adpb-close {
	position: absolute;
	top: 0;
	right: 0;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #fff;
	color: #1a1a1a;
	font: 28px/44px Arial, sans-serif;
	text-align: center;
	cursor: pointer;
	box-shadow: none;
}
.adpb-close:focus-visible { outline: 2px solid #1a56db; outline-offset: -3px; }
.adpb-mbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 -2px 8px rgba(0, 0, 0, .18);
	transform: translateY(100%);
	transition: transform .25s ease;
}
.adpb-mbar.adpb-on { transform: none; }
.adpb-mbar .adpb-close {
	top: -44px;
	border-radius: 6px 0 0 0;
	box-shadow: 0 -2px 4px rgba(0, 0, 0, .12);
}
.adpb-minner { max-width: 100%; margin: 0 auto; }
.adpb-mbar .adpb-minner { text-align: center; }
body.adpb-bar-on { padding-bottom: calc(var(--adpb-bar-space, 66px) + env(safe-area-inset-bottom, 0px)); }
.adpb-mpop {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99995;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	background: rgba(0, 0, 0, .6);
}
.adpb-dialog {
	position: relative;
	box-sizing: border-box;
	max-width: 100%;
	max-height: 100%;
	overflow: auto;
	padding: 44px 12px 12px;
	border-radius: 8px;
	background: #fff;
	-webkit-overflow-scrolling: touch;
}
.adpb-dialog .adpb-close { border-radius: 0 8px 0 0; }
.adpb-dialog:focus { outline: 0; }
