/* Banner Widgets — Widget x Placement. Homepage + categorias. */

.cv2-bw {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 56px 0;
	box-sizing: border-box;
}

.cv2-bw__inner {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding-left: 16px;
	padding-right: 16px;
	box-sizing: border-box;
}

.cv2-bw__grid {
	display: grid;
	gap: 16px;
	width: 100%;
	align-items: stretch;
}

.cv2-bw__cell {
	/* container-type moved to .cv2-bw__layers — Safari collapses aspect-ratio cells with inline-size containment */
	position: relative;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 15px;
	overflow: hidden;
	background: #e8e2dc;
	text-decoration: none;
	color: inherit;
	min-width: 0;
	min-height: 1px;
}

.cv2-bw__cell--static {
	cursor: default;
}

.cv2-bw__cell picture {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 1px;
	/* Do not let picture participate in height calc; cell uses aspect-ratio */
	pointer-events: none;
}

.cv2-bw__cell img.cv2-bw__img,
.cv2-bw__cell img {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center;
	border: 0;
	pointer-events: auto;
}

.cv2-bw__cell--copy:after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 55%;
	background: linear-gradient(to top, rgba(20, 10, 16, 0.62) 0%, rgba(20, 10, 16, 0.18) 55%, transparent 100%);
	pointer-events: none;
}

.cv2-bw__copy {
	position: absolute;
	left: 0; right: 0; bottom: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	padding: 20px 22px;
	box-sizing: border-box;
	color: #fff;
	pointer-events: none;
}

.cv2-bw__title {
	display: block;
	font-family: Poppins, Helvetica, Arial, sans-serif;
	font-weight: 600;
	font-size: 18px;
	line-height: 1.2;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
}

.cv2-bw__sub {
	display: block;
	font-family: Inter, Manrope, Poppins, Arial, sans-serif;
	font-size: 13px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.86);
}

.cv2-bw__cta {
	display: inline-block;
	margin-top: 4px;
	font-family: Inter, Poppins, Helvetica, Arial, sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
}

/* —— Layout A: full panoramic —— */
.cv2-bw--a .cv2-bw__grid {
	grid-template-columns: 1fr;
}
.cv2-bw--a .cv2-bw__cell {
	aspect-ratio: 21 / 8;
}

/* —— Layout B: 50/50 —— */
.cv2-bw--b .cv2-bw__grid {
	grid-template-columns: 1fr 1fr;
}
.cv2-bw--b.cv2-bw--n1 .cv2-bw__grid {
	grid-template-columns: 1fr;
}
.cv2-bw--b .cv2-bw__cell {
	aspect-ratio: 4 / 3;
}

/* —— Layout C: 2/3 + 2 stacked —— */
.cv2-bw--c .cv2-bw__grid {
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
}
.cv2-bw--c .cv2-bw__cell--s1 {
	grid-column: 1;
	grid-row: 1 / span 2;
	aspect-ratio: 4 / 5;
}
.cv2-bw--c .cv2-bw__cell--s2,
.cv2-bw--c .cv2-bw__cell--s3 {
	aspect-ratio: 16 / 10;
	height: 100%;
}
.cv2-bw--c.cv2-bw--n2 .cv2-bw__cell--s2 {
	grid-row: 1 / span 2;
	height: auto;
	aspect-ratio: 4 / 5;
}
.cv2-bw--c.cv2-bw--n1 .cv2-bw__grid {
	grid-template-columns: 1fr;
	grid-template-rows: auto;
}
.cv2-bw--c.cv2-bw--n1 .cv2-bw__cell--s1 {
	grid-row: auto;
}

/* —— Layout D: full + 2 below —— */
.cv2-bw--d .cv2-bw__grid {
	grid-template-columns: 1fr 1fr;
}
.cv2-bw--d .cv2-bw__cell--s1 {
	grid-column: 1 / -1;
	aspect-ratio: 21 / 8;
}
.cv2-bw--d .cv2-bw__cell--s2,
.cv2-bw--d .cv2-bw__cell--s3 {
	aspect-ratio: 4 / 3;
}
.cv2-bw--d.cv2-bw--n1 .cv2-bw__grid {
	grid-template-columns: 1fr;
}

/* —— Layout E: 2 then 3 —— */
.cv2-bw--e .cv2-bw__grid {
	grid-template-columns: repeat(6, 1fr);
}
.cv2-bw--e .cv2-bw__cell--s1,
.cv2-bw--e .cv2-bw__cell--s2 {
	grid-column: span 3;
	aspect-ratio: 16 / 9;
}
.cv2-bw--e .cv2-bw__cell--s3,
.cv2-bw--e .cv2-bw__cell--s4,
.cv2-bw--e .cv2-bw__cell--s5 {
	grid-column: span 2;
	aspect-ratio: 4 / 3;
}
/* Layout E rail: always display:contents — slots na grelha (t1305 full-width mobile) */
.cv2-bw--e .cv2-bw__rail {
	display: contents;
}


/* —— Layout F: 1 then 3 —— */
.cv2-bw--f .cv2-bw__grid {
	grid-template-columns: repeat(3, 1fr);
}
.cv2-bw--f .cv2-bw__cell--s1 {
	grid-column: 1 / -1;
	aspect-ratio: 21 / 8;
}
.cv2-bw--f .cv2-bw__cell--s2,
.cv2-bw--f .cv2-bw__cell--s3,
.cv2-bw--f .cv2-bw__cell--s4 {
	aspect-ratio: 4 / 3;
}

/* —— Layout G: 3 equal —— */
.cv2-bw--g .cv2-bw__grid {
	grid-template-columns: 1fr 1fr 1fr;
}
.cv2-bw--g .cv2-bw__cell {
	aspect-ratio: 4 / 3;
}

@media only screen and (max-width: 767px) {
	.cv2-bw {
		padding: 40px 0;
	}
	.cv2-bw__grid {
		gap: 12px;
	}
	.cv2-bw--a .cv2-bw__cell {
		aspect-ratio: 4 / 5;
	}
	.cv2-bw--b .cv2-bw__grid {
		grid-template-columns: 1fr;
	}
	.cv2-bw--c .cv2-bw__grid {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: auto auto;
	}
	.cv2-bw--c .cv2-bw__cell--s1 {
		grid-column: 1 / -1;
		grid-row: auto;
		aspect-ratio: 4 / 5;
	}
	.cv2-bw--c .cv2-bw__cell--s2,
	.cv2-bw--c .cv2-bw__cell--s3 {
		aspect-ratio: 16 / 10;
		height: auto;
	}
	.cv2-bw--c.cv2-bw--n2 .cv2-bw__cell--s2 {
		grid-column: 1 / -1;
		grid-row: auto;
		aspect-ratio: 16 / 10;
	}
	.cv2-bw--d .cv2-bw__cell--s1 {
		aspect-ratio: 4 / 5;
	}
	.cv2-bw--e .cv2-bw__grid {
		grid-template-columns: 1fr;
	}
	.cv2-bw--e .cv2-bw__cell--s1,
	.cv2-bw--e .cv2-bw__cell--s2 {
		grid-column: auto;
		aspect-ratio: 16 / 9;
	}
	.cv2-bw--e .cv2-bw__rail {
		display: contents;
	}
	.cv2-bw--e .cv2-bw__cell--s3,
	.cv2-bw--e .cv2-bw__cell--s4,
	.cv2-bw--e .cv2-bw__cell--s5 {
		grid-column: auto;
		width: 100%;
		max-width: 100%;
		aspect-ratio: 4 / 3;
	}
	.cv2-bw--f .cv2-bw__cell--s1 {
		aspect-ratio: 4 / 5;
	}
	.cv2-bw__title {
		font-size: 15px;
	}
	.cv2-bw__copy {
		padding: 14px 16px;
	}
}

@media only screen and (max-width: 480px) {
	.cv2-bw--d .cv2-bw__grid {
		grid-template-columns: 1fr;
	}
	.cv2-bw--d .cv2-bw__cell--s1 {
		grid-column: auto;
	}
	/* t1349: rows custom tambem 1 por linha no telemovel (igual layout D) */
	.cv2-bw--rows .cv2-bw__row[data-cols] {
		grid-template-columns: 1fr;
	}
}


/* Categoria: cabe na area de conteudo, sem wrappers vazios (sem output se nao ha widgets). */
.cv2-bw--cat {
	padding: 40px 0;
}
.cv2-bw--cat .cv2-bw__inner {
	width: 100%;
	max-width: 1440px;
	margin: 0 auto;
	padding-left: 5px;
	padding-right: 5px;
	box-sizing: border-box;
}
#catalog .cv2-bw--cat .cv2-bw__inner,
.main-content .cv2-bw--cat .cv2-bw__inner {
	max-width: 1440px;
}


.cv2-bw__cell:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.cv2-bw__cell--text {
	display: -webkit-flex;
	display: flex;
	-webkit-align-items: center;
	align-items: center;
	-webkit-justify-content: center;
	justify-content: center;
	text-align: center;
}
.cv2-bw__cell--text:after {
	display: none;
}
.cv2-bw__cell--text .cv2-bw__copy {
	position: relative;
	left: auto;
	right: auto;
	bottom: auto;
	-webkit-align-items: center;
	align-items: center;
	padding: 28px 24px;
	width: 100%;
	box-sizing: border-box;
}
.cv2-bw__cell--text .cv2-bw__title {
	font-weight: 500;
	font-size: clamp(22px, 2.6vw, 40px);
	letter-spacing: 0.08em;
	line-height: 1.05;
}
.cv2-bw__cell--text .cv2-bw__sub {
	margin-top: 4px;
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}
.cv2-bw__cell--text .cv2-bw__sub:after {
	content: "";
	display: block;
	width: 28px;
	height: 1px;
	margin: 12px auto 0;
	background: currentColor;
	opacity: 0.5;
}
.cv2-bw__cell--dark .cv2-bw__title,
.cv2-bw__cell--dark .cv2-bw__sub,
.cv2-bw__cell--dark .cv2-bw__cta {
	color: #fff;
}
.cv2-bw__cell--light .cv2-bw__title,
.cv2-bw__cell--light .cv2-bw__sub,
.cv2-bw__cell--light .cv2-bw__cta {
	color: #1b1519;
}

/* Custom row layouts (quando layout_rows nao e o preset) */
.cv2-bw--rows .cv2-bw__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.cv2-bw--rows .cv2-bw__row {
	display: grid;
	gap: 16px;
	width: 100%;
	align-items: stretch;
}
.cv2-bw--rows .cv2-bw__row[data-cols="1"] { grid-template-columns: 1fr; }
.cv2-bw--rows .cv2-bw__row[data-cols="2"] { grid-template-columns: 1fr 1fr; }
.cv2-bw--rows .cv2-bw__row[data-cols="3"] { grid-template-columns: 1fr 1fr 1fr; }
.cv2-bw--rows .cv2-bw__row[data-cols="4"] { grid-template-columns: repeat(4, 1fr); }
.cv2-bw--rows .cv2-bw__row[data-cols="5"] { grid-template-columns: repeat(5, 1fr); }
.cv2-bw--rows .cv2-bw__row[data-cols="6"] { grid-template-columns: repeat(6, 1fr); }
.cv2-bw--rows .cv2-bw__cell { aspect-ratio: 4 / 3; }
.cv2-bw--rows .cv2-bw__row[data-cols="1"] .cv2-bw__cell { aspect-ratio: 21 / 8; }
@media only screen and (max-width: 767px) {
	.cv2-bw--rows .cv2-bw__inner,
	.cv2-bw--rows .cv2-bw__row { gap: 12px; }
	.cv2-bw--rows .cv2-bw__row[data-cols="1"] .cv2-bw__cell { aspect-ratio: 4 / 5; }
}

.cv2-bw__layers {
	container-type: inline-size;
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	width: 100%;
	height: 100%;
}
.cv2-bw__layer {
	position: absolute;
	transform: translate(-50%, -50%);
	max-width: 700px;
	line-height: 1.15;
	white-space: pre-wrap;
	text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.cv2-bw__layer--left { transform: translate(0, -50%); text-align: left; }
.cv2-bw__layer--right { transform: translate(-100%, -50%); text-align: right; }
.cv2-bw__layer--center { text-align: center; }
.cv2-bw__cell--layers:after { display: none; }

.cv2-bw__layer{font-synthesis:none;-webkit-font-smoothing:antialiased;}


/* Layer button + mobile overrides (t1247) */
.cv2-bw__layer {
	left: var(--bw-x, 50%);
	top: var(--bw-y, 50%);
}
.cv2-bw__layer--btn {
	display: inline-block;
	width: auto;
	border: 1px solid #fff;
	border-radius: 999px;
	background: #9D0048;
	text-shadow: none;
	letter-spacing: 0.08em;
	line-height: 1.2;
	box-sizing: border-box;
	white-space: nowrap;
	max-width: 92%;
	font-family: Inter, Manrope, Arial, sans-serif;
	font-weight: 700;
	text-decoration: none;
	/* Keep padding proportional when font is scaled via cqw (hero = 12px / 12+22) */
	padding: 1em 1.833em;
}
.cv2-bw__layer--btn:hover,
.cv2-bw__layer--btn:focus {
	background: #b30052;
}

/* t1336: desktop e mobile separados — o bloco "desktop" ja nao vaza para <768 (antes exigia !important) */
@media only screen and (min-width: 768px) {
	.cv2-bw__layers .cv2-bw__layer,
	.cv2-bw__layers .cv2-bw__layer--btn {
		font-size: max(8px, calc(var(--bw-sz, 24) * 100cqw / 1440));
	}
	.cv2-bw__layers .cv2-bw__layer--btn {
		padding: 1em 1.833em;
	}
	/* t1337: width so no CSS — sem inline a esmagar mobile */
	.cv2-bw__layer:not(.cv2-bw__layer--btn)[style*="--bw-w"] {
		width: min(var(--bw-w), 700px);
		max-width: min(var(--bw-w), 700px);
	}
	.cv2-bw__layer:not(.cv2-bw__layer--btn) {
		max-width: 700px;
		box-sizing: border-box;
	}
	.cv2-bw__layer--btn[style*="--bw-w"] {
		max-width: var(--bw-w);
	}
	.cv2-bw__layer--btn:not([style*="--bw-w"]) {
		max-width: 92%;
	}
}

@media only screen and (max-width: 767px) {
	.cv2-bw__layer {
		left: var(--bw-xm, var(--bw-x, 50%));
		top: var(--bw-ym, var(--bw-y, 50%));
		/* sem size_m: desk size escalado 1440→cell via cqw (ref editor 390) */
		font-size: max(8px, calc(var(--bw-sz, 24) * 100cqw / 1440));
	}
	/* t1351/t1352: size_m = px@390 no editor → escala com a largura do tile (cqw), igual BO */
	.cv2-bw__layer[style*="--bw-szm"] {
		font-size: max(8px, calc(var(--bw-szm) * 100cqw / 390));
	}
	.cv2-bw__layers .cv2-bw__layer--btn[style*="--bw-szm"] {
		font-size: max(8px, calc(var(--bw-szm) * 100cqw / 390));
	}
	/* largura em % do tile (nao px fixos da ref 390) */
	.cv2-bw__layer:not(.cv2-bw__layer--btn)[style*="--bw-wm"] {
		width: var(--bw-wm);
		max-width: var(--bw-wm);
	}
	.cv2-bw__layer--btn[style*="--bw-wm"] {
		max-width: var(--bw-wm);
	}
	.cv2-bw__layer--btn:not([style*="--bw-wm"]) {
		max-width: 92%;
	}
	.cv2-bw__layer--btn {
		padding: 1em 1.833em;
		letter-spacing: 0.08em;
		line-height: 1.2;
		white-space: nowrap;
	}
	.cv2-bw__cell {
		min-height: 120px;
	}
}

@supports (-webkit-touch-callout: none) {
	.cv2-bw__cell {
		width: 100%;
		max-width: 100%;
	}
	.cv2-bw__grid {
		width: 100%;
	}
	@media only screen and (max-width: 767px) {
		.cv2-bw__cell {
			min-height: 120px;
		}
	}
}


/* t1308→t1337: width desk so em min-width:768 — deixava de esmagar --bw-wm-px no mobile */
