/* The products of the page stay in view. Loaded only on sites where aw_theme_product_rail is 1. */
.aw-product-rail-on .aw-product-rail,
.aw-product-rail-on .aw-product-bar {
	box-sizing: border-box;
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
}
.aw-product-rail-on .aw-product-rail.is-away,
.aw-product-rail-on .aw-product-bar.is-away {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}
.aw-product-rail-on .aw-product-rail__close {
	display: grid;
	place-items: center;
	width: 2rem;
	height: 2rem;
	flex: none;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--wp--preset--color--muted);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}
.aw-product-rail-on .aw-product-rail__close:hover { background: rgba(0, 0, 0, 0.06); }

/* Column: from 1360 px there is room next to the 720 px text */
.aw-product-rail-on .aw-product-rail { display: none; }
@media (min-width: 1360px) {
	.aw-product-rail-on .aw-product-rail {
		position: fixed;
		z-index: 40;
		top: 50%; /* product-rail.js places it below the menu bar and the page photo */
		left: calc(50% + 360px + 2rem);
		display: flex;
		flex-direction: column;
		width: 272px;
		max-height: calc(100vh - 10rem);
		transform: translateY(-50%);
		padding: 1rem;
		overflow: hidden;
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 14px;
		background: #fff;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	}
	.aw-product-rail-on .aw-product-rail.is-away { transform: translateY(calc(-50% + 6px)); }
	.aw-product-rail-on .aw-product-bar { display: none; }
}
.aw-product-rail-on .aw-product-rail > .aw-product-rail__close { position: absolute; top: 0.5rem; right: 0.5rem; }
.aw-product-rail-on .aw-product-rail__title { margin: 0 2rem 0.75rem 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
/* Only the products scroll in a low column: the title and the affiliate note stay visible. */
.aw-product-rail-on .aw-product-rail__list { display: flex; flex-direction: column; flex: 0 1 auto; gap: 0.75rem; min-height: 0; overflow-y: auto; }
.aw-product-rail-on .aw-product-rail__list > *,
.aw-product-rail-on .aw-product-rail__title,
.aw-product-rail-on .aw-product-rail__more,
.aw-product-rail-on .aw-product-rail__note { flex: none; }
.aw-product-rail-on .aw-product-rail .aw-product-card {
	display: grid;
	grid-template-columns: 64px 1fr;
	gap: 0.75rem;
	margin: 0;
	padding: 0 0 0.75rem;
	border: 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 0;
	box-shadow: none;
	background: none;
}
.aw-product-rail-on .aw-product-rail .aw-product-card:not(:has(.aw-product-card__media)) { grid-template-columns: 1fr; }
.aw-product-rail-on .aw-product-rail .aw-product-card__media { width: 64px; height: 64px; margin: 0; padding: 0; background: #fff; }
.aw-product-rail-on .aw-product-rail .aw-product-card__image { width: 100%; height: 100%; object-fit: contain; }
.aw-product-rail-on .aw-product-rail .aw-product-card__body { display: block; padding: 0; min-width: 0; }
.aw-product-rail-on .aw-product-rail .aw-product-card__title {
	display: -webkit-box;
	margin: 0 0 0.25rem;
	overflow: hidden;
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}
.aw-product-rail-on .aw-product-rail .aw-product-card__price { margin: 0 0 0.375rem; font-size: 0.875rem; line-height: 1.3; }
.aw-product-rail-on .aw-product-rail .aw-product-card__cta { margin: 0; }
.aw-product-rail-on .aw-product-rail .aw-button.wp-element-button { min-height: 0; padding: 0.3rem 0.625rem; font-size: 0.8125rem; }
.aw-product-rail-on .aw-product-rail__more {
	margin-top: 0.75rem;
	padding: 0.5rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 10px;
	background: #fff;
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}
.aw-product-rail-on .aw-product-rail__more[hidden] { display: none; }
.aw-product-rail-on .aw-product-rail__note { margin: 0.75rem 0 0; color: var(--wp--preset--color--muted); font-size: 0.75rem; line-height: 1.4; }

/* Bar: small and medium screens */
.aw-product-rail-on .aw-product-bar {
	position: fixed;
	z-index: 40;
	right: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-height: 64px;
	padding: 0.5rem 0.5rem 0.5rem 0.75rem;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	background: #fff;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
@media (min-width: 1360px) {
	.aw-product-rail-on .aw-product-bar { display: none; }
}
.aw-product-rail-on .aw-product-bar.is-away { transform: translateY(8px); }
.aw-product-rail-on .aw-product-bar__thumb { flex: none; width: 48px; height: 48px; }
.aw-product-rail-on .aw-product-bar__thumb[hidden] { display: none; }
.aw-product-rail-on .aw-product-bar__thumb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.aw-product-rail-on .aw-product-bar__text { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.aw-product-rail-on .aw-product-bar__title { overflow: hidden; font-size: 0.9375rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.aw-product-rail-on .aw-product-bar__count { color: var(--wp--preset--color--muted); font-size: 0.8125rem; }
.aw-product-rail-on .aw-product-bar__button {
	flex: none;
	min-height: 40px;
	padding: 0 0.875rem;
	border: 0;
	border-radius: 10px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--on-accent);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
}
@media (max-width: 1359px) {
	.aw-product-rail-on.aw-has-product-bar { padding-bottom: 64px; }
	.aw-product-rail-on.aw-has-product-bar .aw-to-top { bottom: 80px; }
}
