/* =========================================================
   Cards
   ========================================================= */

.bestbay-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	float: none;
	width: auto;
	background: var(--bestbay-surface);
	border: 1px solid var(--bestbay-border);
	border-radius: var(--bx-radius-global);
	overflow: hidden;
    transition: box-shadow .2s linear;
}

.bestbay-card__image {
	display: block;
	flex-shrink: 0;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #eef1f5;
}

.bestbay-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translate3d(0, 0, 0) scale(1);
	transform-origin: center center;
	backface-visibility: hidden;
	transition: transform 350ms cubic-bezier(0.4, 0, 0.25, 1);
}

.bestbay-card:hover {
	box-shadow: 0 6px 24px 0 rgba(18, 43, 70, .12);
}

.bestbay-card:hover .bestbay-card__image img {
	transform: translate3d(0, 0, 0) scale(1.03);
}

/* Hero card: full-bleed image with content over a readable gradient. */
.bestbay-card--hero {
	position: relative;
	min-height: 520px;
	isolation: isolate;
	color: #fff;
}

.bestbay-card--hero .bestbay-card__image {
	position: absolute;
	inset: 0;
	z-index: 0;
	height: 100%;
	aspect-ratio: auto;
}

.bestbay-card--hero .bestbay-card__image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.bestbay-card--hero::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
	background: linear-gradient(
		180deg,
		rgba(10, 18, 30, 0) 22%,
		rgba(10, 18, 30, .18) 48%,
		rgba(10, 18, 30, .88) 100%
	);
	pointer-events: none;
}

.bestbay-card--hero .bestbay-card__body {
	position: relative;
	z-index: 2;
	justify-content: flex-end;
	min-height: 100%;
	color: #fff;
	pointer-events: none;
}

.bestbay-card--hero .bestbay-card__body a {
	pointer-events: auto;
}

.bestbay-card--hero .bestbay-card__category a,
.bestbay-card--hero .bestbay-card__title a,
.bestbay-card--hero .bestbay-card__date,
.bestbay-card--hero .bestbay-card__comments,
.bestbay-card--hero .bestbay-card__comments a,
.bestbay-card--hero .bestbay-card__author-name {
	color: #fff;
}

.bestbay-card--hero .bestbay-card__category a {
	color: rgba(255, 255, 255, .86);
}

.bestbay-card--hero .bestbay-card__excerpt {
	color: rgba(255, 255, 255, .9);
}

.bestbay-card--hero .bestbay-card__meta {
	margin-top: 14px;
	border-top: 1px solid rgba(255, 255, 255, .28);
}

.bestbay-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 20px;
}

.bestbay-card__category {
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.bestbay-card__category a {
	color: var(--bestbay-accent);
	text-decoration: none;
}

.bestbay-card__title {
    word-break: break-word;
	margin: 8px 0;
	font-size: 1.1rem;
	line-height: 1.3;
}

.bestbay-card--hero .bestbay-card__title {
	font-size: clamp(1.5rem, 2.5vw, 2.25rem);
}

.bestbay-card__title a {
	color: var(--bestbay-ink);
	text-decoration: none;
}

.bestbay-card__excerpt {
	margin: 0 0 14px;
	color: var(--bestbay-muted);
	font-size: .94rem;
}

.bestbay-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: auto;
	padding-top: 12px;
	font-size: 14px;
}

.bestbay-card__author {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.bestbay-card__author-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.bestbay-card__author-info {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	line-height: 1.2;
}

.bestbay-card__author-name {
	font-weight: normal;
}

.bestbay-card__date {
	font-size: 0.875rem;
}

.bestbay-card__comments {
	flex-shrink: 0;
	margin-left: auto;
}

.bestbay-card__comments a {
	display: inline-flex;
	align-items: center;
	padding: 5px 10px;
	font-size: 14px;
}

.bestbay-card__comments .bb-icon-comment-square {
	font-size: 18px;
	margin-right: 5px;
}

.bestbay-card__comments a:hover,
.bestbay-card--hero .bestbay-card__comments a:hover {
	color: var(--bestbay-muted);
	background-color: #f2f4f5;
	border-radius: 8px;
}

.bestbay-card__category a:focus-visible,
.bestbay-card__title a:focus-visible,
.bestbay-card__comments a:focus-visible {
	outline: 2px solid var(--bestbay-accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* =========================================================
   Content layout
   ========================================================= */

/*
 * Layout container for main content.
 * Sidebar is now outside this container to prevent
 * it from squeezing the post grid.
 */

.bestbay-content-layout {
	display: block;
	width: 100%;
	clear: both;
}

.bestbay-content-layout > #primary {
	min-width: 0;
	width: 100%;
	float: none;
}

.bestbay-post-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 20px;
	row-gap: 36px;
}


/* =========================================================
   Load More control
   ========================================================= */

.bestbay-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 32px;
	clear: both;
}

.bestbay-load-more-wrap[hidden] {
	display: none !important;
}

.bestbay-btn {
	display: inline-flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	position: relative;
	padding: 12px 32px;
	border: 1px solid var(--bestbay-border);
	border-radius: var(--bx-radius-global);
	background: var(--bestbay-surface);
	color: var(--bestbay-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
	transition: all .2s ease;
}
.bestbay-btn:focus-visible {
	outline: 2px solid var(--bestbay-accent);
	outline-offset: 3px;
}

.bestbay-btn:hover {
	border-color: var(--bestbay-accent);
	color: var(--bestbay-accent);
}

.bestbay-btn:visited,
.bestbay-btn:focus,
.bestbay-btn:focus-visible,
.bestbay-btn:active {
	color: var(--bestbay-ink);
}

.bestbay-btn.is-loading .bestbay-btn-text {
	opacity: 0;
	visibility: hidden;
}

.bestbay-btn-spinner {
	display: none;
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 3px solid var(--bestbay-border);
	border-top-color: var(--bestbay-accent);
	border-radius: 50%;
	animation: bestbay-spin 1s linear infinite;
}

.bestbay-btn.is-loading .bestbay-btn-spinner {
	display: block;
}

.bestbay-btn:disabled {
	cursor: wait;
	opacity:.7;
}

.bestbay-btn[aria-disabled="true"] {
	cursor: wait;
	opacity: .7;
}

.bestbay-load-status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

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

/* =========================================================
   Advertisement
   ========================================================= */

.bestbay-ad {
	margin-bottom: 30px;
	padding: 30px;
	border: 1px solid var(--bestbay-border);
	border-radius: var(--bx-radius-global);
	background: var(--bestbay-surface);
	text-align: center;
	color: var(--bestbay-muted);
}

/* Fallback per browser senza:focus-visible */
@supports not selector(:focus-visible) {
.bestbay-card__category a:focus,
.bestbay-card__title a:focus,
.bestbay-card__comments a:focus,
.bestbay-btn:focus {
 outline: 2px solid var(--bestbay-accent);
 outline-offset: 3px;
	}
}
/* Pattern: niente animazioni per chi le evita */
@media (prefers-reduced-motion: reduce) {
.bestbay-card__image img {
 transition: none;
	}
.bestbay-card:hover .bestbay-card__image img {
 transform: none;
	}
}
