.ybsb-grid-wrapper {
	position: relative;
}

.ybsb-grid-items {
	transition: opacity 0.18s ease-in-out, transform 0.18s ease-in-out;
}

.ybsb-grid-items.ybsb-grid-items-leaving {
	opacity: 0;
	transform: translateY(6px);
	pointer-events: none;
}

.ybsb-grid-items.ybsb-grid-items-entering > .ybsb-card {
	opacity: 0;
	transform: translateY(10px);
}

.ybsb-grid-items > .ybsb-card {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.35s ease, transform 0.35s ease;
	transition-delay: var(--ybsb-card-in-delay, 0ms);
}

.ybsb-grid-spinner {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease-in-out;
	pointer-events: none;
	z-index: 5;
}

.ybsb-grid-wrapper.ybsb-loading .ybsb-grid-spinner {
	opacity: 1;
	visibility: visible;
}

.ybsb-grid-spinner-ring {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 3px solid var(--ybsb-grid-spinner-track, rgba(0, 0, 0, 0.1));
	border-top-color: var(--ybsb-grid-spinner-color, currentColor);
	animation: ybsb-grid-spin 0.7s linear infinite;
}

@keyframes ybsb-grid-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.ybsb-grid-items,
	.ybsb-grid-items > .ybsb-card,
	.ybsb-grid-spinner {
		transition: none !important;
		animation: none !important;
	}
	.ybsb-grid-items.ybsb-grid-items-leaving,
	.ybsb-grid-items.ybsb-grid-items-entering > .ybsb-card {
		opacity: 1 !important;
		transform: none !important;
	}
}

.ybsb-grid-items {
	display: grid;
	grid-template-columns: repeat(var(--ybsb-columns, 4), 1fr);
	column-gap: var(--ybsb-column-gap, 20px);
	row-gap: var(--ybsb-row-gap, 20px);
}

.ybsb-no-results {
	grid-column: 1 / -1;
	text-align: left;
	padding: 40px 0;
}

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

.ybsb-card {
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
	align-self: start;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Style shadow preset - No shadow at rest, a soft lifted shadow on
   hover */
.ybsb-card-shadow-preset .ybsb-card {
	box-shadow: none;
}
.ybsb-card-shadow-preset .ybsb-card:hover {
	box-shadow: 5px 20px 30px rgba(0, 0, 0, 0.2);
}

.ybsb-card-image-wrap {
	position: relative;
}

.ybsb-card-image-link {
	display: block;
	height: 100%;
}

.ybsb-card-image {
	position: relative;
	overflow: hidden;
	background-color: #f2f2f2;
}

.ybsb-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

/* Hover effect intensities - card lifts, image zooms. Chosen per-widget
   via the "Hover Effect" Style control, applied as a class on the grid
   wrapper so it's easy to scope and easy to turn off entirely (none). */
.ybsb-card-hover-subtle .ybsb-card:hover {
	transform: translateY(-3px);
}
.ybsb-card-hover-subtle .ybsb-card:hover .ybsb-card-image img {
	transform: scale(1.04);
}

.ybsb-card-hover-normal .ybsb-card:hover {
	transform: translateY(-6px);
}
.ybsb-card-hover-normal .ybsb-card:hover .ybsb-card-image img {
	transform: scale(1.08);
}

.ybsb-card-hover-strong .ybsb-card:hover {
	transform: translateY(-10px);
}
.ybsb-card-hover-strong .ybsb-card:hover .ybsb-card-image img {
	transform: scale(1.12);
}

.ybsb-card-description {
	display: none;
}

.ybsb-card-description p {
	margin: 0;
}

.ybsb-card-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.ybsb-card-title-row {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	border-style: none;
}

.ybsb-card-category {
	text-decoration: none;
	text-transform: uppercase;
	font-size: 0.75em;
	letter-spacing: 0.03em;
	width: fit-content;
	display: inline-block;
}

.ybsb-card-title-link {
	text-decoration: none;
	color: inherit;
}

.ybsb-card-title {
	font-weight: 600;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.ybsb-card-chips {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 6px;
}

.ybsb-chip {
	display: inline-flex;
	align-items: center;
	white-space: nowrap;
	line-height: 1;
}

.ybsb-card-price {
	font-weight: 600;
}

.ybsb-card-price del {
	font-weight: 400;
	margin-right: 6px;
	text-decoration: line-through;
}

.ybsb-card-price ins {
	text-decoration: none;
}

/* ---- Button Column ----
   Spans the entire height of the price/details row via align-items:stretch on its
   parent, with its own background and an optional divider border
   separating it from the details column. */

.ybsb-card-icon-button {
	flex-shrink: 0;
	background-color: #1a1a1a;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	position: relative;
	--ybsb-btn-hover-duration: 300ms;
	transition: background-color var(--ybsb-btn-hover-duration, 300ms) ease-in-out,
	            color var(--ybsb-btn-hover-duration, 300ms) ease-in-out;
}

.ybsb-card-icon-button-icon {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	position: relative;
	z-index: 1;
	color: #ffffff;
	transition: transform var(--ybsb-btn-hover-duration, 300ms) ease-in-out;
}

.ybsb-card-icon-button.ybsb-icon-hover-grow:hover .ybsb-card-icon-button-icon {
	transform: scale(var(--ybsb-icon-hover-scale, 1.25));
}

.ybsb-card-icon-button.ybsb-icon-hover-rotate:hover .ybsb-card-icon-button-icon {
	transform: rotate(var(--ybsb-icon-hover-rotate, 90deg));
}

.ybsb-card-icon-button-icon svg,
.ybsb-card-icon-button-icon i {
	display: block;
}

.ybsb-card-icon-button-icon svg {
	fill: #ffffff;
	width: 18px;
	height: 18px;
}

.ybsb-card-icon-button-icon i {
	font-size: 18px;
}

/* Pure-CSS tooltip - text comes from the data-tooltip attribute set in
   PHP, so no JS is needed and the widget stays functional even if
   scripts fail to load for any reason. */
.ybsb-card-icon-button[data-tooltip] {
	position: relative;
}

.ybsb-card-icon-button[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background-color: #1a1a1a;
	color: #ffffff;
	font-size: 12px;
	line-height: 1.4;
	white-space: nowrap;
	padding: 6px 10px;
	border-radius: 4px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	z-index: 10;
}

.ybsb-card-icon-button[data-tooltip]:hover::after,
.ybsb-card-icon-button[data-tooltip]:focus-visible::after {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Same slide hover mechanic as elsewhere in the plugin - a pseudo-element
   sweeps in on hover, direction picked via class, color/speed from
   Elementor-set custom properties. Uses an animatable clip-path
   reveal on a box that stays at its true full size the whole time,
   rather than scaling the box from 0 - scaling a box with a large
   border-radius shrinks its rendered size while the radius stays a
   fixed pixel value, so at small scale factors the corners become
   disproportionately round and the sweep reads as a rounded pill
   "flying in" instead of a flat color wipe (worse the larger the
   radius). clip-path reveals the real, correctly-rounded box
   progressively instead of resizing it. */
.ybsb-card-icon-button[class*="ybsb-slide-"]::before {
	content: '';
	position: absolute;
	inset: 0;
	background-color: var(--ybsb-btn-slide-color, transparent);
	border-radius: inherit;
	z-index: 0;
	transition: clip-path var(--ybsb-btn-hover-duration, 300ms) ease-in-out;
}

.ybsb-card-icon-button.ybsb-slide-left::before {
	clip-path: inset( 0 100% 0 0 );
}
.ybsb-card-icon-button.ybsb-slide-left:hover::before {
	clip-path: inset( 0 0 0 0 );
}

.ybsb-card-icon-button.ybsb-slide-right::before {
	clip-path: inset( 0 0 0 100% );
}
.ybsb-card-icon-button.ybsb-slide-right:hover::before {
	clip-path: inset( 0 0 0 0 );
}

.ybsb-card-icon-button.ybsb-slide-top::before {
	clip-path: inset( 0 0 100% 0 );
}
.ybsb-card-icon-button.ybsb-slide-top:hover::before {
	clip-path: inset( 0 0 0 0 );
}

.ybsb-card-icon-button.ybsb-slide-bottom::before {
	clip-path: inset( 100% 0 0 0 );
}
.ybsb-card-icon-button.ybsb-slide-bottom:hover::before {
	clip-path: inset( 0 0 0 0 );
}

/* ---- Pagination ---- */

.ybsb-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	margin-top: 24px;
}

.ybsb-pagination:empty {
	display: none;
	margin-top: 0;
}

.ybsb-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	border-radius: 4px;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.ybsb-page-link.ybsb-page-active {
	font-weight: 600;
}

/* ---- List layout ---- */
/* This single rule has broken once already (a later Column Mode style
   control out-specificitied it despite matching class-count, due to
   cascade order). !important here is deliberate insurance against that
   exact class of regression happening again - this is the one grid-
   column value that must never lose to anything else. */

.ybsb-grid-items.ybsb-layout-list {
	grid-template-columns: 1fr !important;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card {
	flex-direction: row;
	align-items: stretch;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-image-wrap {
	flex-shrink: 0;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-image {
	aspect-ratio: unset;
	width: 100%;
	height: 100%;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-body {
	flex: 1 1 auto;
	flex-shrink: 1;
	min-width: 0;
	min-height: 0;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-description {
	display: block;
}

.ybsb-page-arrow svg,
.ybsb-page-arrow i {
	display: block;
}

.ybsb-page-link.ybsb-page-disabled {
	opacity: 0.4;
	pointer-events: none;
}

/* ---- Hover Reveal card style ----
   Pills and description+buttons occupy the same absolute position and
   crossfade via opacity. Card height is fixed; only image height and
   the category tag change on hover. */

.ybsb-card-style-hover-reveal {
	--ybsb-hr-speed: 600ms;
}

.ybsb-card-style-hover-reveal .ybsb-card-image-wrap,
.ybsb-card-style-hover-reveal .ybsb-card-body {
	flex-shrink: 0;
}

.ybsb-card-style-hover-reveal .ybsb-card-image {
	aspect-ratio: unset !important;
	width: 100% !important;
	transition: height var(--ybsb-hr-speed, 600ms) ease;
}

.ybsb-card-style-hover-reveal .ybsb-card-category {
	display: block;
	max-height: 30px;
	overflow: hidden;
	opacity: 1;
	transition: max-height var(--ybsb-hr-speed, 600ms) ease,
	            margin-bottom var(--ybsb-hr-speed, 600ms) ease,
	            opacity calc(var(--ybsb-hr-speed, 600ms) / 2) ease;
}

.ybsb-card-style-hover-reveal:hover .ybsb-card-category {
	max-height: 0;
	margin-bottom: 0;
	opacity: 0;
}

.ybsb-card-hr-title-price {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	flex-shrink: 0;
}

.ybsb-card-hr-title-price .ybsb-card-title-link {
	flex: 1 1 auto;
	min-width: 0;
}

.ybsb-card-style-hover-reveal .ybsb-card-title {
	min-height: 0 !important;
}

.ybsb-card-hr-swap {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.ybsb-card-hr-pills-layer,
.ybsb-card-hr-detail-layer {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transition: opacity calc(var(--ybsb-hr-speed, 600ms) / 2) ease;
}

.ybsb-card-hr-pills-layer {
	opacity: 1;
	pointer-events: auto;
}

.ybsb-card-hr-detail-layer {
	opacity: 0;
	pointer-events: none;
}

.ybsb-card-style-hover-reveal:hover .ybsb-card-hr-pills-layer {
	opacity: 0;
	pointer-events: none;
}

.ybsb-card-style-hover-reveal:hover .ybsb-card-hr-detail-layer {
	opacity: 1;
	pointer-events: auto;
}

.ybsb-card-style-hover-reveal .ybsb-card-description {
	display: block;
	flex: 1 1 auto;
	overflow: hidden;
}

.ybsb-card-hr-buttons {
	display: flex;
	align-items: stretch;
	flex-shrink: 0;
	margin-top: auto;
}

.ybsb-card-style-hover-reveal .ybsb-card-hr-buttons .ybsb-card-icon-button {
	flex: 1 1 0;
}

/* Both hover-row tooltips were getting clipped by the card's
   overflow:hidden when they overflowed their narrower 50%-width
   buttons. Wrap instead of forcing one line, and cap width so they can
   never extend past the card's edges. */
.ybsb-card-style-hover-reveal .ybsb-card-icon-button[data-tooltip]::after {
	white-space: normal;
	max-width: 160px;
	width: max-content;
	text-align: center;
}

/* ---- Hover Reveal in List layout ----
   List mode toggles a class on already-rendered markup (no re-render).
   Row height comes from its own "Row Height" control in List Layout
   (Style tab) - completely separate from Grid's Card Height control,
   each scoped so it can only ever match its own layout.

   Image fills the full row height (not aspect-ratio-derived - stretched
   to match Row Height exactly, whatever width is set in Image Width).
   Category/pills/description all show at once (no crossfade). The
   description area flex-grows to fill whatever vertical space is left
   after the pills row, and clips with overflow:hidden if the row isn't
   tall enough - so the buttons row (inside that same flexed area, held
   to the bottom via margin-top:auto - see the shared .ybsb-card-hr-buttons
   rule above) always sits at the bottom edge of the row, never shifting
   position based on description length, and only fades in on hover. */

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal {
	align-items: stretch;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-image-wrap {
	height: 100%;
	flex-shrink: 0;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-image,
.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal:hover .ybsb-card-image {
	height: 100% !important;
	width: 100% !important;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-category,
.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal:hover .ybsb-card-category {
	max-height: none !important;
	opacity: 1 !important;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-hr-swap {
	position: static;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-hr-pills-layer {
	position: static;
	opacity: 1 !important;
	pointer-events: auto !important;
	flex: 0 0 auto;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-hr-detail-layer,
.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal:hover .ybsb-card-hr-detail-layer {
	position: static;
	opacity: 1 !important;
	pointer-events: auto !important;
	flex: 1 1 auto;
	min-height: 0;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal .ybsb-card-hr-buttons {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.25s ease;
}

.ybsb-grid-items.ybsb-layout-list .ybsb-card-style-hover-reveal:hover .ybsb-card-hr-buttons {
	opacity: 1;
	pointer-events: auto;
}
/* ---- Donor Car Ribbon ---- */

.ybsb-card-donor-ribbon {
	position: absolute;
	z-index: 5;
	white-space: nowrap;
	pointer-events: none;
	line-height: 1.2;
}

.ybsb-card-donor-ribbon-top-left {
	top: var(--ybsb-donor-ribbon-offset, 10px);
	left: var(--ybsb-donor-ribbon-offset, 10px);
}

.ybsb-card-donor-ribbon-top-right {
	top: var(--ybsb-donor-ribbon-offset, 10px);
	right: var(--ybsb-donor-ribbon-offset, 10px);
}

.ybsb-card-donor-ribbon-bottom-left {
	bottom: var(--ybsb-donor-ribbon-offset, 10px);
	left: var(--ybsb-donor-ribbon-offset, 10px);
}

.ybsb-card-donor-ribbon-bottom-right {
	bottom: var(--ybsb-donor-ribbon-offset, 10px);
	right: var(--ybsb-donor-ribbon-offset, 10px);
}