/* Amazon Campaign Booster — front-end styles */

.acb-btn {
	display: inline-block;
	padding: 11px 24px;
	border-radius: 8px;
	font-weight: 700;
	text-decoration: none;
	line-height: 1.2;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
	transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
	white-space: nowrap;
}
.acb-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .26);
	filter: brightness(1.04);
}
.acb-btn:active {
	transform: translateY(0);
}

/* ---------- Countdown ---------- */
.acb-countdown {
	display: inline-flex;
	gap: 6px;
	align-items: center;
}
.acb-cd-unit {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	background: rgba(0, 0, 0, .28);
	border-radius: 7px;
	padding: 5px 8px;
	min-width: 40px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 1px 2px rgba(0, 0, 0, .2);
}
.acb-cd-unit b {
	font-size: 17px;
	font-weight: 800;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.acb-cd-unit i {
	font-size: 9px;
	text-transform: uppercase;
	letter-spacing: .04em;
	opacity: .8;
	font-style: normal;
	margin-top: 2px;
}
.acb-cd-ended b {
	opacity: .4;
}

/* ---------- Sticky bar ---------- */
.acb-bar {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 99990;
	background: var(--acb-bg, #232f3e);
	background-image: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .12));
	color: var(--acb-text, #fff);
	box-shadow: 0 2px 16px rgba(0, 0, 0, .28);
	border-bottom: 2px solid var(--acb-accent, #ff9900);
	transform: translateY(-110%);
	transition: transform .35s cubic-bezier(.2, .8, .3, 1);
}
.acb-bar-bottom {
	transform: translateY(110%);
	box-shadow: 0 -2px 16px rgba(0, 0, 0, .28);
	border-bottom: 0;
	border-top: 2px solid var(--acb-accent, #ff9900);
}
.acb-bar-top {
	top: 0;
}
.acb-bar-bottom {
	bottom: 0;
}
.acb-bar.acb-show {
	transform: translateY(0);
}
.acb-bar-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
	padding: 10px 50px;
}
.acb-bar-text {
	font-weight: 700;
	font-size: 15px;
}
.acb-bar-close {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: .8;
}
.acb-bar-close:hover {
	opacity: 1;
}
body.acb-has-bar-top {
	padding-top: 56px;
}
body.acb-has-bar-bottom {
	padding-bottom: 56px;
}

/* ---------- Disclosure ---------- */
.acb-disclosure {
	display: block;
	margin-top: 10px;
	font-size: 11px;
	line-height: 1.4;
	opacity: .65;
}
.acb-inline .acb-disclosure {
	color: #555;
}

/* Lock background scroll when popup is open. */
body.acb-noscroll {
	overflow: hidden;
}

/* ---------- Popup ---------- */
.acb-popup-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, .72);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}
.acb-popup-overlay.acb-show {
	display: flex;
	animation: acb-fade .25s ease;
}
@keyframes acb-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}
.acb-popup {
	position: relative;
	background: #fff;
	color: #111;
	max-width: 440px;
	width: 100%;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 18px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
	animation: acb-pop .35s cubic-bezier(.2, .8, .3, 1.15);
	box-sizing: border-box;
}
@keyframes acb-pop {
	from { transform: translateY(16px) scale(.96); opacity: 0; }
	to { transform: translateY(0) scale(1); opacity: 1; }
}
.acb-pop-img img {
	width: 100%;
	display: block;
	border-radius: 18px 18px 0 0;
}
.acb-pop-body {
	padding: 32px 28px 28px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
}
.acb-pop-body h3 {
	margin: 0;
	padding: 0 8px;
	font-size: clamp(20px, 5vw, 25px);
	font-weight: 800;
	line-height: 1.25;
	color: #111;
}
.acb-pop-body p {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: #555;
}
.acb-pop-body .acb-countdown {
	margin: 2px 0;
	color: #fff;
	flex-wrap: wrap;
	justify-content: center;
}
.acb-pop-body .acb-cd-unit {
	background: var(--acb-bg, #232f3e);
	min-width: 46px;
}
.acb-pop-body .acb-btn {
	width: 100%;
	max-width: 280px;
	padding: 14px 24px;
	font-size: 16px;
	border-radius: 10px;
}
/* Close button — hardened against theme button styles. */
.acb-popup .acb-pop-close,
.acb-popup .acb-pop-close:hover,
.acb-popup .acb-pop-close:focus {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 34px !important;
	height: 34px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 34px !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box !important;
	background: rgba(17, 24, 39, .55) !important;
	color: #fff !important;
	border: 0 !important;
	border-radius: 50% !important;
	font-size: 22px !important;
	font-weight: 400;
	line-height: 1 !important;
	text-align: center;
	cursor: pointer;
	box-shadow: none !important;
	outline: none;
	z-index: 5;
	transition: background .15s ease, transform .15s ease;
}
.acb-popup .acb-pop-close:hover {
	background: rgba(17, 24, 39, .85) !important;
	transform: rotate(90deg);
}

/* ---------- In-content block ---------- */
.acb-inline {
	display: flex;
	gap: 18px;
	align-items: center;
	border: 1px solid rgba(0, 0, 0, .06);
	border-left: 4px solid var(--acb-accent, #ff9900);
	border-radius: 14px;
	padding: 20px;
	margin: 28px 0;
	background: linear-gradient(135deg, #fffdf8 0%, #fff6e9 100%);
	box-shadow: 0 6px 22px rgba(0, 0, 0, .07);
	transition: transform .2s ease, box-shadow .2s ease;
}
.acb-inline:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, .1);
}
.acb-in-img img {
	width: 140px;
	height: auto;
	border-radius: 10px;
	display: block;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}
.acb-in-body {
	flex: 1;
}
.acb-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	background: var(--acb-accent, #ff9900);
	color: #111;
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 4px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
	box-shadow: 0 2px 8px rgba(255, 153, 0, .35);
}
.acb-badge::before {
	content: "★";
	font-size: 10px;
}
.acb-in-body h4 {
	margin: 6px 0 8px;
	font-size: 20px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--acb-text, #111);
}
.acb-in-body p {
	margin: 0 0 14px;
	line-height: 1.5;
}
.acb-inline .acb-countdown {
	margin-bottom: 12px;
	color: #111;
}
.acb-inline .acb-cd-unit {
	background: rgba(0, 0, 0, .08);
}

/* ---------- Sidebar ---------- */
.acb-sidebar {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: var(--acb-bg, #232f3e);
	background-image: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .18));
	color: #fff;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
	border-top: 3px solid var(--acb-accent, #ff9900);
}
.acb-side-img img {
	width: 100%;
	display: block;
}
.acb-side-body {
	padding: 22px 18px;
}
.acb-side-body h4 {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 800;
	color: #fff;
}
.acb-side-body p {
	margin: 0 0 16px;
	opacity: .9;
	font-size: 14px;
	line-height: 1.5;
}
.acb-sidebar .acb-countdown {
	margin-bottom: 16px;
	justify-content: center;
	flex-wrap: wrap;
}
.acb-sidebar .acb-cd-unit {
	background: rgba(0, 0, 0, .3);
}

/* ---------- Automatic Editors Pick ---------- */
.acb-editors-pick {
	display: none;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--acb-pick-width, 340px);
	font-family: inherit;
	color: #1d2327;
}
.acb-editors-pick.acb-editors-pick-mounted {
	display: block;
}
.acb-editors-pick-floating {
	position: fixed;
	top: var(--acb-pick-top, 24px);
	right: var(--acb-pick-right, 16px);
	z-index: 9990;
	width: var(--acb-pick-width, 320px);
	max-height: calc(100vh - var(--acb-pick-top, 24px) - 24px);
	overflow-y: auto;
	scrollbar-width: thin;
}
.acb-editors-pick-in-sidebar {
	position: sticky;
	top: var(--acb-pick-top, 24px);
	margin: 0 auto 28px;
}
.acb-editors-pick-inline {
	margin: 32px auto;
}
.acb-editors-pick-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 10px;
	padding: 9px 14px;
	border: 1px solid #e87500;
	border-radius: 8px;
	background: linear-gradient(135deg, #ffc247, #ff8500);
	box-shadow: 0 5px 14px rgba(255, 133, 0, .24);
	font-size: 15px;
	font-weight: 800;
	line-height: 1.3;
	letter-spacing: .02em;
	color: #2d1b00;
	text-transform: uppercase;
}
.acb-editors-pick-label::before {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #232f3e;
	content: "★";
	font-size: 13px;
	color: #fff;
}
.acb-editors-pick-card {
	overflow: hidden;
	padding: 16px;
	border: 1px solid #dde2e7;
	border-top: 4px solid #ff8500;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
	text-align: center;
}
.acb-editors-pick-image {
	display: block;
	margin: 0 0 16px;
}
.acb-editors-pick-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 240px;
	object-fit: contain;
}
.acb-editors-pick-product-title {
	margin: 0 0 12px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.3;
	color: #18181b;
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
}
.acb-editors-pick-product-title a {
	color: inherit;
	text-decoration: none;
}
.acb-editors-pick-product-title a:hover,
.acb-editors-pick-product-title a:focus-visible {
	color: #c45500;
	text-decoration: underline;
}
.acb-editors-pick-description {
	margin: 0 0 14px;
	font-size: 13px;
	line-height: 1.55;
	color: #52525b;
	display: -webkit-box;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.acb-editors-pick-rating {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0 0 16px;
	font-size: 12px;
	color: #975a00;
}
.acb-editors-pick-stars {
	position: relative;
	display: inline-block;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 1px;
	color: #d6d6d6;
}
.acb-editors-pick-stars::before {
	content: "★★★★★";
}
.acb-editors-pick-stars::after {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--acb-rating-width, 0%);
	overflow: hidden;
	content: "★★★★★";
	color: #f59e0b;
	white-space: nowrap;
}
.acb-editors-pick .acb-btn {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 18px;
	background: #ff8500;
	color: #fff;
	font-size: 14px;
}
.acb-editors-pick .acb-btn:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 3px;
}

@media (max-width: 1099px) {
	.acb-editors-pick-floating {
		position: static;
		max-height: none;
		overflow: visible;
		margin: 32px auto;
	}
}

/* ---------- Sponsored Products for Creators ----------
   Sizes come from the custom properties the block prints inline, so the
   Settings screen fully controls the rendered card. Selectors are scoped
   through .acb-sponsored-block so theme rules for p/h2/h3/img cannot add
   their own margins back inside a card. */
.acb-sponsored-block {
	--acb-sp-cols: 3;
	--acb-sp-img: 78px;
	--acb-sp-font: 12px;
	--acb-sp-pad: 6px;
	--acb-sp-gap: 6px;
	--acb-sp-radius: 4px;
	--acb-sp-lines: 2;
	--acb-sp-accent: #ff8500;
	--acb-sp-line-height: 1.35;
	box-sizing: border-box;
	margin: 1.2em 0;
	padding: var(--acb-sp-pad);
	border: 1px solid #e5e7eb;
	border-radius: var(--acb-sp-radius);
	background: #fff;
	color: #1d2327;
	font-size: var(--acb-sp-font);
	line-height: var(--acb-sp-line-height);
}
.acb-sponsored-block * {
	box-sizing: border-box;
}
.acb-sponsored-block .acb-sponsored-card p,
.acb-sponsored-block .acb-sponsored-card h3,
.acb-sponsored-block .acb-sponsored-header h2,
.acb-sponsored-block .acb-sponsored-disclosure {
	margin: 0;
	padding: 0;
}

/* Editors Pick style — the default: white card, accent top edge, centred
   content and one full-width call to action. */
.acb-sponsored-style-pick {
	padding: 0;
	border: 0;
	background: none;
}
.acb-sponsored-style-pick .acb-sponsored-card {
	border: 1px solid #dde2e7;
	border-top: 3px solid var(--acb-sp-accent);
	border-radius: calc(var(--acb-sp-radius) + 2px);
	box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
	text-align: center;
}
.acb-sponsored-style-pick .acb-sponsored-card-body {
	align-items: center;
}
.acb-sponsored-style-plain,
.acb-sponsored-style-minimal {
	padding: 0;
	border: 0;
	background: none;
}
.acb-sponsored-style-minimal .acb-sponsored-card {
	border: 0;
	box-shadow: none;
}

.acb-sponsored-header {
	display: flex;
	align-items: center;
	gap: .4em;
	margin-bottom: var(--acb-sp-gap);
}
.acb-sponsored-kicker {
	padding: .1em .4em;
	border-radius: 3px;
	background: #232f3e;
	color: #fff;
	font-size: .75em;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.acb-sponsored-block .acb-sponsored-header h2 {
	font-size: 1.2em;
	font-weight: 700;
	line-height: 1.2;
}
.acb-sponsored-grid {
	display: grid;
	grid-template-columns: repeat(var(--acb-sp-cols), minmax(0, 1fr));
	gap: var(--acb-sp-gap);
}
.acb-sponsored-card {
	display: flex;
	min-width: 0;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: var(--acb-sp-radius);
	background: #fff;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.acb-sponsored-card:hover {
	border-color: var(--acb-sp-accent);
	box-shadow: 0 4px 14px rgba(15, 23, 42, .1);
}
.acb-sponsored-image {
	display: block;
	padding: calc(var(--acb-sp-pad) * .5);
	background: #fff;
	line-height: 0;
}
.acb-sponsored-block .acb-sponsored-image img {
	display: block;
	width: 100%;
	height: var(--acb-sp-img);
	max-width: 100%;
	margin: 0;
	object-fit: contain;
}
/* Square shape keeps every card identical whatever the source picture is. */
.acb-sponsored-img-square .acb-sponsored-image img {
	height: auto;
	aspect-ratio: 1 / 1;
}
/* Amazon serves a 1x1 placeholder for products with no picture. */
.acb-sponsored-image-empty {
	display: grid;
	place-items: center;
	min-height: var(--acb-sp-img);
	background: #f6f7f8;
}
.acb-sponsored-image-empty img {
	display: none;
}
.acb-sponsored-img-square .acb-sponsored-image-empty {
	min-height: 0;
	aspect-ratio: 1 / 1;
}
.acb-sponsored-image-empty::after {
	color: #c8ccd1;
	content: "\1F5BC";
	font-size: 1.6em;
	line-height: 1;
}
.acb-sponsored-card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: .3em;
	padding: var(--acb-sp-pad);
}
.acb-sponsored-block .acb-sponsored-meta {
	font-size: .8em;
	font-weight: 700;
	letter-spacing: .03em;
	color: #6b7280;
	text-transform: uppercase;
}
.acb-sponsored-block .acb-sponsored-card h3 {
	display: -webkit-box;
	overflow: hidden;
	/* Reserving the clamped height keeps the rating and button of every card
	   on the same baseline, so no card grows a gap to fill the grid row. */
	min-height: calc(var(--acb-sp-lines) * var(--acb-sp-line-height) * 1em);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--acb-sp-lines);
	font-size: 1.05em;
	font-weight: 700;
	line-height: var(--acb-sp-line-height);
}
.acb-sponsored-card h3 a {
	color: #18181b;
	text-decoration: none;
}
.acb-sponsored-card h3 a:hover,
.acb-sponsored-card h3 a:focus-visible {
	color: #c45500;
	text-decoration: underline;
}
.acb-sponsored-block .acb-sponsored-rating {
	display: flex;
	align-items: center;
	gap: .4em;
	font-size: .95em;
	color: #6b7280;
}
.acb-sponsored-style-pick .acb-sponsored-rating {
	justify-content: center;
}
.acb-sponsored-stars {
	position: relative;
	display: inline-block;
	color: #d6d6d6;
	font-size: 1.15em;
	letter-spacing: .5px;
	line-height: 1;
}
.acb-sponsored-stars::before {
	content: "★★★★★";
}
.acb-sponsored-stars::after {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--acb-rating-width, 0%);
	overflow: hidden;
	color: #f59e0b;
	content: "★★★★★";
	white-space: nowrap;
}
.acb-sponsored-block .acb-sponsored-price {
	font-size: 1.15em;
	font-weight: 800;
	color: #111827;
}
.acb-sponsored-cta {
	display: block;
	width: 100%;
	margin-top: .15em;
	padding: .55em .6em;
	border-radius: calc(var(--acb-sp-radius) + 1px);
	background: var(--acb-sp-accent);
	color: #fff;
	font-size: 1em;
	font-weight: 800;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
}
.acb-sponsored-cta:hover,
.acb-sponsored-cta:focus-visible {
	color: #fff;
	filter: brightness(.94);
}
.acb-sponsored-cta:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}
.acb-sponsored-block .acb-sponsored-disclosure {
	margin-top: .6em;
	font-size: .85em;
	line-height: 1.4;
	color: #6b7280;
}

@media (max-width: 800px) {
	.acb-sponsored-grid {
		grid-template-columns: repeat(min(var(--acb-sp-cols), 2), minmax(0, 1fr));
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
	.acb-sponsored-header {
		align-items: flex-start;
		flex-direction: column;
		gap: .35em;
	}
	.acb-sponsored-grid {
		grid-template-columns: repeat(min(var(--acb-sp-cols), 2), minmax(0, 1fr));
	}
	.acb-sponsored-cta {
		white-space: normal;
	}
	.acb-inline {
		flex-direction: column;
		text-align: center;
	}
	.acb-in-img img {
		width: 100%;
	}
	.acb-bar-inner {
		padding: 10px 40px;
		gap: 10px;
	}
	.acb-bar-text {
		font-size: 13px;
	}
	.acb-cd-unit {
		min-width: 32px;
		padding: 3px 5px;
	}
	/* Popup on phones: full-width sheet, tighter padding, smaller timer. */
	.acb-popup-overlay {
		padding: 10px;
		align-items: flex-end;
	}
	.acb-popup {
		border-radius: 16px;
	}
	.acb-pop-body {
		padding: 28px 18px 22px;
		gap: 14px;
	}
	.acb-pop-body p {
		font-size: 14px;
	}
	.acb-pop-body .acb-cd-unit {
		min-width: 40px;
		padding: 4px 6px;
	}
	.acb-pop-body .acb-cd-unit b {
		font-size: 15px;
	}
	.acb-pop-body .acb-btn {
		max-width: 100%;
	}
	.acb-editors-pick {
		max-width: calc(100% - 24px);
	}
	.acb-editors-pick-card {
		padding: 14px;
	}
}
