/* AmzAI Product Showcase — frontend styles */

:root {
	--amzai-accent: #FF9900;
	--amzai-text: #0F1111;
	--amzai-muted: #565959;
	--amzai-border: #e3e6e6;
	--amzai-bg: #ffffff;
	--amzai-star: #FFA41C;
}

/* Box-sizing reset, scoped to our own components only (never the global
   page) — mirrors the same reset sticky.css already applies to
   .amzai-sticky. Without this, any element that mixes width:100% with
   its own padding/border (several of the mobile rules below do exactly
   that) renders wider than its container using the browser default
   content-box model, which is what actually causes overflow/clipping
   on narrow screens rather than a clean responsive layout. */
.amzai-card, .amzai-card *, .amzai-card *::before, .amzai-card *::after,
.amzai-grid, .amzai-grid *, .amzai-grid *::before, .amzai-grid *::after,
.amzai-carousel, .amzai-carousel *, .amzai-carousel *::before, .amzai-carousel *::after,
.amzai-table-wrap, .amzai-table-wrap *, .amzai-table-wrap *::before, .amzai-table-wrap *::after,
.amzai-comparison, .amzai-comparison *, .amzai-comparison *::before, .amzai-comparison *::after,
.amzai-box, .amzai-box *, .amzai-box *::before, .amzai-box *::after {
	box-sizing: border-box;
}

/* Safety net so none of our components can force the page itself to
   scroll horizontally on a narrow screen, even if something inside
   miscalculates (a long unbroken word in a title/brand name, etc). */
.amzai-grid, .amzai-carousel, .amzai-table-wrap, .amzai-comparison, .amzai-box {
	max-width: 100%;
}
.amzai-card__title, .amzai-table__title,
.amzai-chart-table__description, .amzai-comparison__title,
.amzai-buybar__brand-text {
	overflow-wrap: break-word;
	word-break: break-word;
}

/* Baseline reset so theme link styling (color, underline, border-bottom
   "fake underline") never bleeds into our cards/buttons before the more
   specific rules below apply their own intentional styling. */
.amzai-card a,
.amzai-card a:link,
.amzai-card a:visited,
.amzai-sticky a,
.amzai-sticky a:link,
.amzai-sticky a:visited,
.amzai-comparison a,
.amzai-comparison a:link,
.amzai-comparison a:visited {
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none;
}

.amzai-notice {
	padding: 10px 14px;
	background: #fff8e5;
	border: 1px solid #ffd97d;
	border-radius: 6px;
	font-size: 13px;
	color: #6b5300;
}
.amzai-notice--error {
	background: #fdecea;
	border-color: #f5b3ac;
	color: #7a271a;
}

/* Card ------------------------------------------------------------ */

.amzai-card {
	display: flex;
	flex-direction: column;
	background: var(--amzai-bg, #ffffff);
	border: 1px solid var(--amzai-border, var(--amzai-border-root, #e3e6e6));
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow .15s ease, transform .15s ease;
	height: 100%;
}
.amzai-card:hover {
	box-shadow: 0 6px 18px rgba(15, 17, 17, .08);
	transform: translateY(-2px);
}

.amzai-card__image-link {
	display: block;
	position: relative;
	background: #fafafa;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}
.amzai-card__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 14px;
	box-sizing: border-box;
}
.amzai-card__image--placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: repeating-linear-gradient(45deg, #f2f2f2, #f2f2f2 10px, #ececec 10px, #ececec 20px);
}

/* "Amazon" buybar — brand + price/CTA pill, replaces a plain CTA button
   when the Amazon badge option is on. Text-based brand label, not a
   reproduction of Amazon's trademarked logo artwork.
   !important is used throughout this block because theme stylesheets
   often target links with higher specificity (e.g. ".entry-content a"),
   which otherwise overrides our unmarked colors/underlines and leaves a
   stray blue "hyperlink" look on what should be a styled button. */
.amzai-card__buybar,
.amzai-card__buybar:link,
.amzai-card__buybar:visited,
.amzai-card__buybar:hover,
.amzai-card__buybar:focus {
	margin-top: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 8px 10px 8px 12px;
	border: 1px solid var(--amzai-border, #e3e6e6);
	border-bottom: 1px solid var(--amzai-border, #e3e6e6) !important;
	border-radius: 10px;
	background: #fff !important;
	text-decoration: none !important;
	box-shadow: none;
	transition: box-shadow .15s ease;
	min-width: 0;
	min-height: 1em;
}
.amzai-card__buybar:hover { box-shadow: 0 2px 10px rgba(15,17,17,.1); }

.amzai-buybar__brand {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	font-size: 13px;
	color: #131921 !important;
	text-decoration: none !important;
	white-space: nowrap;
	min-width: 0;
}
.amzai-buybar__brand-text { color: #131921 !important; text-decoration: none !important; }
.amzai-buybar__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: #131921;
	color: #fff !important;
	font-size: 12px;
	font-style: italic;
	font-weight: 800;
	text-decoration: none !important;
}
.amzai-buybar__icon-img {
	height: 20px;
	width: auto;
	max-width: 100px;
	flex: 0 0 auto;
	object-fit: contain;
}

.amzai-buybar__button {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--amzai-accent, #FF9900) !important;
	color: #111 !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 14px;
	padding: 8px 14px;
	border-radius: 20px;
	white-space: nowrap;
	flex: 0 0 auto;
	min-height: 1em;
}
.amzai-buybar__label { line-height: 1; color: inherit !important; text-decoration: none !important; }
.amzai-buybar__arrow { font-size: 16px; line-height: 1; color: inherit !important; text-decoration: none !important; }

.amzai-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 14px 14px;
	flex: 1;
}

.amzai-card__title,
.amzai-card__title:link,
.amzai-card__title:visited {
	font-size: 14px;
	line-height: 1.4;
	font-weight: 600;
	color: var(--amzai-text) !important;
	text-decoration: none !important;
	border-bottom: none !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.amzai-card__title:hover { color: var(--amzai-accent) !important; text-decoration: none !important; }

.amzai-card__rating {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--amzai-muted);
}
.amzai-stars { color: var(--amzai-star); letter-spacing: 1px; }
.amzai-card__review-count { color: var(--amzai-muted); }

.amzai-card__features {
	margin: 0;
	padding-left: 16px;
	font-size: 12px;
	color: var(--amzai-muted);
}
.amzai-card__features li { margin-bottom: 2px; }

.amzai-card__price-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 4px;
}
.amzai-card__price {
	font-size: 18px;
	font-weight: 700;
	color: var(--amzai-text);
}
.amzai-card__list-price {
	font-size: 13px;
	color: var(--amzai-muted);
	text-decoration: line-through;
}
.amzai-card__prime-badge {
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	background: #00A8E1;
	padding: 2px 6px;
	border-radius: 4px;
	letter-spacing: .02em;
}

.amzai-card__availability {
	font-size: 12px;
	color: #007600;
}

.amzai-card__cta,
.amzai-card__cta:link,
.amzai-card__cta:visited {
	margin-top: 8px;
	display: inline-block;
	text-align: center;
	background: var(--amzai-accent) !important;
	color: #111 !important;
	font-weight: 700;
	font-size: 13px;
	padding: 8px 12px;
	border-radius: 20px;
	text-decoration: none !important;
	border-bottom: none !important;
	box-shadow: none;
	transition: filter .15s ease;
	min-height: 1em;
}
.amzai-card__cta:hover { filter: brightness(0.93); text-decoration: none !important; }

/* Grid -------------------------------------------------------------- */

.amzai-grid {
	display: grid;
	grid-template-columns: repeat(var(--amzai-columns, 3), minmax(0, 1fr));
	gap: 18px;
	margin: 20px 0;
}
@media (max-width: 900px) {
	.amzai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.amzai-grid { grid-template-columns: 1fr; }
}

/* Optional heading above Chart --------------------------------------- */

.amzai-block-title {
	margin: 0 0 14px;
	font-size: 20px;
	font-weight: 700;
	color: var(--amzai-text, #0F1111);
}

/* Chart — a table: rank number, title, rating, description ------------ */

.amzai-chart-table { min-width: 420px; }
.amzai-chart-table__col-rank { width: 36px; text-align: center; }
.amzai-chart-table__col-image { width: 138px; }
.amzai-chart-table__image-link {
	width: 110px;
	height: 110px;
	border-radius: 8px;
}
.amzai-chart-table__col-info { min-width: 240px; padding-right: 20px; }
.amzai-chart-table__description {
	display: block;
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--amzai-muted, #565959);
	line-height: 1.4;
}

/* Screen-reader-only utility (visually hidden, still accessible) ----- */

.amzai-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Compact grid — image + Buy Now button only -------------------------- */

.amzai-grid--compact { gap: 10px; }
.amzai-card--compact { text-align: center; }
.amzai-card--compact .amzai-card__image-link { aspect-ratio: 1 / 1; }
.amzai-card--compact .amzai-card__image { padding: 10px; }
.amzai-card--compact .amzai-card__body { padding: 10px; align-items: center; gap: 0; }
.amzai-card__cta--compact {
	margin-top: 0;
	width: 100%;
	font-size: 12.5px;
	padding: 8px 6px;
}
@media (max-width: 900px) {
	.amzai-grid--compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.amzai-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
	.amzai-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Chart table — shared base styles (row, rank badge, title, CTA) ------ */

.amzai-table-wrap {
	margin: 20px 0;
	overflow-x: auto;
	border: 1px solid var(--amzai-border, #e3e6e6);
	border-radius: 10px;
}
.amzai-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
	background: var(--amzai-bg, #ffffff);
}
.amzai-table thead th {
	background: #fafafa;
	color: var(--amzai-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-align: left;
	padding: 12px 14px;
	border-bottom: 2px solid var(--amzai-accent, #FF9900);
}
.amzai-table tbody td {
	padding: 12px 14px;
	border-bottom: 1px solid var(--amzai-border, #e3e6e6);
	vertical-align: middle;
}
.amzai-table tbody tr:last-child td { border-bottom: none; }
.amzai-table tbody tr:hover { background: #fafafa; }

.amzai-table__rank {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--amzai-accent, #FF9900);
	color: #111;
	font-weight: 800;
	font-size: 12px;
}
.amzai-table__title,
.amzai-table__title:link,
.amzai-table__title:visited {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: var(--amzai-text) !important;
	text-decoration: none !important;
	border-bottom: none !important;
}
.amzai-table__title:hover { color: var(--amzai-accent) !important; }
.amzai-table__rating { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--amzai-muted); }
.amzai-table__col-price { white-space: nowrap; }
.amzai-table__col-price .amzai-card__price { display: block; }
.amzai-table__col-price .amzai-card__list-price { display: block; margin-top: 2px; }
.amzai-table__col-cta { white-space: nowrap; }
.amzai-table__buybar,
.amzai-table__buybar:link,
.amzai-table__buybar:visited { margin-top: 0; }

/* Chart table on mobile — instead of a cramped horizontally-scrolling
   table, each row becomes its own stacked mini-card: table/tbody/tr/td
   go display:block, and the cells inside a row lay out with flexbox so
   image + rank + title/description/price stack in a sensible order
   with the buy button spanning full width at the bottom. */
@media (max-width: 640px) {
	.amzai-table-wrap--chart {
		overflow-x: visible;
		border: none;
		background: transparent;
	}
	.amzai-chart-table {
		min-width: 0;
		width: 100%;
		border-collapse: separate;
		border-spacing: 0;
	}
	.amzai-chart-table,
	.amzai-chart-table tbody,
	.amzai-chart-table tr,
	.amzai-chart-table td {
		display: block;
		width: 100%;
	}
	.amzai-chart-table tr {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px 12px;
		padding: 12px;
		margin-bottom: 12px;
		background: var(--amzai-bg, #ffffff);
		border: 1px solid var(--amzai-border, #e3e6e6);
		border-radius: 10px;
	}
	.amzai-chart-table tr:last-child { margin-bottom: 0; }
	.amzai-chart-table td {
		padding: 0;
		border-bottom: none;
		width: auto;
	}
	.amzai-chart-table__col-rank { order: 1; }
	.amzai-chart-table__col-image { order: 2; }
	.amzai-chart-table__image-link { width: 104px; height: 104px; }
	.amzai-chart-table__col-info {
		order: 3;
		flex: 1 1 auto;
		min-width: 0;
		padding-right: 0;
	}
	.amzai-table__col-price { order: 4; }
	.amzai-table__col-cta {
		order: 5;
		flex: 1 1 100%;
		white-space: normal;
	}
	.amzai-table__col-cta a,
	.amzai-table__buybar { width: 100%; justify-content: center; }
}

/* Carousel — pure CSS radio-driven paging through Grid-view chunks ---- */

.amzai-carousel {
	margin: 24px 0;
}
.amzai-carousel__radio {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}
/* prev-column | viewport | next-column, side by side in normal flow —
   the nav buttons take their own flex space rather than sitting on top
   of the cards, so they can never visually overlap card content (e.g.
   the Amazon logo badge) regardless of card height or how the grid
   wraps on narrow screens. */
.amzai-carousel__row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.amzai-carousel__viewport {
	flex: 1 1 auto;
	min-width: 0;
}
.amzai-carousel__page { display: none; margin: 0; }

.amzai-carousel__navcol {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}
.amzai-carousel__navcol label { display: none; }
.amzai-carousel__nav {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid var(--amzai-border, #e3e6e6);
	background: #fff;
	color: var(--amzai-accent, #FF9900);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(15,17,17,.12);
	transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.amzai-carousel__nav:hover {
	background: var(--amzai-accent, #FF9900);
	color: #111;
	box-shadow: 0 4px 14px rgba(15,17,17,.18);
}
/* Single-page carousel: keep the arrows visible (consistent layout) but
   visibly disabled instead of hiding them — rendered as a <span>, not a
   <label>, so it needs its own display rule (the label activation rules
   above don't touch it). */
.amzai-carousel__navcol.is-disabled .amzai-carousel__nav {
	display: flex;
	opacity: .35;
	cursor: default;
	pointer-events: none;
	box-shadow: none;
}
.amzai-carousel__dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}
.amzai-carousel__dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	border: none;
	padding: 0;
	background: var(--amzai-border, #e3e6e6);
	cursor: pointer;
	transition: background .15s ease, transform .15s ease;
}
.amzai-carousel__dot:hover { transform: scale(1.2); }
@media (max-width: 560px) {
	.amzai-carousel__row { gap: 6px; }
	.amzai-carousel__nav { width: 32px; height: 32px; font-size: 16px; }
}
/* Below the grid's 1-column breakpoint, a page is a tall single-column
   stack — flanking it with two more flex columns for the arrows would
   leave a lot of dead space beside a short card. Overlaying the arrows
   on top of the viewport instead keeps the carousel compact. */
@media (max-width: 480px) {
	.amzai-carousel__row { position: relative; }
	.amzai-carousel__navcol {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		z-index: 2;
	}
	.amzai-carousel__navcol--prev { left: 4px; }
	.amzai-carousel__navcol--next { right: 4px; }
	.amzai-carousel__nav {
		width: 34px;
		height: 34px;
		background: rgba(255, 255, 255, .92);
	}
	.amzai-carousel__viewport { width: 100%; }
}

/* Page/nav/dot activation — purely structural (nth-of-type / nth-child),
   so this works for any number of carousel instances on a page without
   per-instance CSS. Covers up to 8 pages, comfortably more than a
   product list this plugin would ever chunk into. */
.amzai-carousel__radio:nth-of-type(1):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(1) { display: grid; }
.amzai-carousel__radio:nth-of-type(1):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(1) { display: flex; }
.amzai-carousel__radio:nth-of-type(1):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(1) { display: flex; }
.amzai-carousel__radio:nth-of-type(1):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(1) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(2):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(2) { display: grid; }
.amzai-carousel__radio:nth-of-type(2):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(2) { display: flex; }
.amzai-carousel__radio:nth-of-type(2):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(2) { display: flex; }
.amzai-carousel__radio:nth-of-type(2):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(2) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(3):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(3) { display: grid; }
.amzai-carousel__radio:nth-of-type(3):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(3) { display: flex; }
.amzai-carousel__radio:nth-of-type(3):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(3) { display: flex; }
.amzai-carousel__radio:nth-of-type(3):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(3) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(4):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(4) { display: grid; }
.amzai-carousel__radio:nth-of-type(4):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(4) { display: flex; }
.amzai-carousel__radio:nth-of-type(4):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(4) { display: flex; }
.amzai-carousel__radio:nth-of-type(4):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(4) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(5):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(5) { display: grid; }
.amzai-carousel__radio:nth-of-type(5):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(5) { display: flex; }
.amzai-carousel__radio:nth-of-type(5):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(5) { display: flex; }
.amzai-carousel__radio:nth-of-type(5):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(5) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(6):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(6) { display: grid; }
.amzai-carousel__radio:nth-of-type(6):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(6) { display: flex; }
.amzai-carousel__radio:nth-of-type(6):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(6) { display: flex; }
.amzai-carousel__radio:nth-of-type(6):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(6) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(7):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(7) { display: grid; }
.amzai-carousel__radio:nth-of-type(7):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(7) { display: flex; }
.amzai-carousel__radio:nth-of-type(7):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(7) { display: flex; }
.amzai-carousel__radio:nth-of-type(7):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(7) { background: var(--amzai-accent, #FF9900); }
.amzai-carousel__radio:nth-of-type(8):checked ~ .amzai-carousel__row .amzai-carousel__viewport .amzai-carousel__page:nth-child(8) { display: grid; }
.amzai-carousel__radio:nth-of-type(8):checked ~ .amzai-carousel__row .amzai-carousel__navcol--prev label:nth-child(8) { display: flex; }
.amzai-carousel__radio:nth-of-type(8):checked ~ .amzai-carousel__row .amzai-carousel__navcol--next label:nth-child(8) { display: flex; }
.amzai-carousel__radio:nth-of-type(8):checked ~ .amzai-carousel__dots .amzai-carousel__dot:nth-child(8) { background: var(--amzai-accent, #FF9900); }

/* Image hover-zoom preview — floating, appended to <body> so it always
   escapes the card's overflow:hidden (used for rounded corners) no
   matter where the card sits. See assets/js/image-zoom.js. ----------- */

.amzai-image-zoom-preview {
	position: fixed;
	z-index: 100000;
	width: 420px;
	height: 420px;
	background: #fff;
	border: 1px solid var(--amzai-border, #e3e6e6);
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(15, 17, 17, .28);
	padding: 16px;
	box-sizing: border-box;
	opacity: 0;
	transform: scale(.96);
	pointer-events: none;
	transition: opacity .12s ease, transform .12s ease;
}
.amzai-image-zoom-preview.is-visible {
	opacity: 1;
	transform: scale(1);
}
.amzai-image-zoom-preview img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}
@media (max-width: 560px) {
	/* No hover on touch devices, and the floating preview would just get
	   in the way — disabled entirely on mobile (see the matching guard
	   in assets/js/image-zoom.js, which skips setting the feature up at
	   all there). This is a CSS-only failsafe for browsers where the JS
	   guard's hover/pointer media query isn't supported. */
	.amzai-image-zoom-preview { display: none !important; }
}
@media (hover: none), (pointer: coarse) {
	.amzai-image-zoom-preview { display: none !important; }
}

/* Box (single product) --------------------------------------------- */

.amzai-box { max-width: 320px; margin: 20px 0; }
.amzai-box .amzai-card { box-shadow: 0 2px 10px rgba(15,17,17,.06); }

/* Comparison table ---------------------------------------------------- */

.amzai-comparison { overflow-x: auto; margin: 20px 0; -webkit-overflow-scrolling: touch; }
.amzai-comparison__table {
	width: 100%;
	border-collapse: collapse;
	min-width: 480px;
	/* Fixed layout, with only the label column given an explicit width
	   below, means every product column automatically shares the
	   remaining width equally — however many products there are (2 to
	   5) — instead of each column sizing to its own content, which is
	   what made a long title's column stretch wider than the others. */
	table-layout: fixed;
}
.amzai-comparison__label-col { width: 130px; }
.amzai-comparison__table th,
.amzai-comparison__table td {
	border: 1px solid var(--amzai-border);
	padding: 10px 12px;
	text-align: center;
	vertical-align: middle;
	font-size: 13px;
}
.amzai-comparison__table thead th {
	background: #fafafa;
	vertical-align: top;
}
.amzai-comparison__table thead th a {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-decoration: none;
	color: var(--amzai-text);
}
.amzai-comparison__table thead img { max-width: 100px; max-height: 100px; object-fit: contain; }
.amzai-comparison__title { font-size: 13px; font-weight: 600; }
.amzai-comparison__table tbody th {
	text-align: left;
	background: #fcfcfc;
	font-weight: 600;
	color: var(--amzai-muted);
}
.amzai-comparison__price { font-weight: 700; font-size: 15px; }
.amzai-comparison__count { color: var(--amzai-muted); font-size: 11px; }

/* Mobile: the label column stays pinned on the left while the rest of
   the table scrolls sideways underneath it, so you can always tell
   which row ("Price", "Rating", ...) you're looking at without
   scrolling back — the usual pattern for a table that's inherently
   wider than a phone screen and shouldn't be squeezed into a single
   column (that would defeat the point of a side-by-side comparison). */
@media (max-width: 640px) {
	.amzai-comparison__table th,
	.amzai-comparison__table td {
		padding: 8px;
		font-size: 12px;
	}
	.amzai-comparison__table thead img { max-width: 88px; max-height: 88px; }
	.amzai-comparison__label-col,
	.amzai-comparison__table tbody th {
		position: sticky;
		left: 0;
		z-index: 1;
		background: #fcfcfc;
	}
}
