/* ── Component Root ── */
.cbc-info-boxes {
	box-sizing: border-box;
	background: var(--cbc-info-boxes-bg, transparent);
	color: var(--cbc-info-boxes-text, #2b2d2a);
	gap: 0;
}

.cbc-info-boxes *,
.cbc-info-boxes *::before,
.cbc-info-boxes *::after {
	box-sizing: border-box;
}

/* ── SECTION 1: Header ── */
.cbc-info-boxes__header-section {
	width: 100%;
	padding: 0;
	padding-top: 40px;
}

.cbc-info-boxes__header-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	width: 100%;
	max-width: 846px;
	margin: 0 auto;
	padding: 0 80px 40px; /* padding-bottom 40px as requested */
}

.cbc-info-boxes__title {
	margin: 0;
	color: #2b2d2a;
	font-size: 54px;
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.cbc-info-boxes__subtitle {
	margin-top: 16px;
	color: #2b2d2a;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.35;
}

.cbc-info-boxes__search-label {
	display: block;
	width: 100%;
	max-width: 630px;
	margin-top: 40px;
}

.cbc-info-boxes__search-wrapper {
	position: relative;
	width: 100%;
}

.cbc-info-boxes__search-icon {
	position: absolute;
	top: 50%;
	left: 16px;
	transform: translateY(-50%);
	pointer-events: none;
	line-height: 0;
}

.cbc-info-boxes__search {
	width: 100%;
	height: 48px;
	border: 1px solid #c5c5c5;
	border-radius: 12px;
	padding: 12px 16px 12px 44px; /* JSON padding [16,12,16,12] */
	background: #ffffff;
	color: #2b2d2a;
	font: inherit;
	font-size: 16px;
	line-height: 1;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	text-align: left;
}

.cbc-info-boxes__search-wrapper--no-icon .cbc-info-boxes__search {
	padding-left: 16px;
}

.cbc-info-boxes__search::placeholder {
	color: #747474;
}

.cbc-info-boxes__search:focus {
	border-color: #2b2d2a;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Category Pills in Header */
.cbc-info-boxes__categories-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: center;
	margin-top: 40px;
	width: 100%;
	max-width: 846px;
}

.cbc-info-boxes__category-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 8px 24px;
	border: 2px solid #e1e1e1;
	border-radius: 24px;
	background: #ffffff;
	color: #2b2d2a;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	cursor: pointer;
	transition: all 0.2s ease;
}

.cbc-info-boxes__category-pill:hover,
.cbc-info-boxes__category-pill:focus-visible {
	border-color: #2b2d2a;
	outline: none;
}

.cbc-info-boxes__category-pill.is-active {
	background: #f3c539;
	border-color: #f3c539;
}

/* ── SECTION 2: Accordion ── */
.cbc-info-boxes__accordion-section {
	width: 100%;
	padding: 0;
}

.cbc-info-boxes__accordion-container {
	margin: 0 auto;
	padding: 80px 0;
}

.cbc-info-boxes__accordion-container > .cbc-info-boxes__accordion-header {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 40px;
	width: 100%;
}

.cbc-info-boxes__accordion-header-title {
	font-size: 24px;
	color: #747474;
	margin: 0;
	font-weight: 400;
}

.cbc-info-boxes__accordion-header-line {
	flex: 1 1 0%;
	height: 1px;
	min-height: 1px;
	background-color: #E2E2E2;
}

.cbc-info-boxes__accordion-header-link {
	font-size: 16px;
	color: #2b2d2a;
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-weight: 500;
}

.cbc-info-boxes__accordion-header-link:hover {
	text-decoration: underline;
}

.cbc-info-boxes__accordion-title-main {
	font-size: 54px;
	font-weight: 600;
	margin: 0 0 40px;
	color: #2b2d2a;
	line-height: 1.15;
}

/* Filters (Category and Order selects) – visible on all screens */
.cbc-info-boxes__filters {
	display: flex;
	gap: 16px;
	margin-bottom: 32px;
	width: 100%;
}

.cbc-info-boxes__select-wrapper {
	position: relative;
	flex: 0 1 auto;
	min-width: 550px;
}

.cbc-info-boxes__select-wrapper-small {
	position: relative;
	flex: 0 1 auto;
	min-width: 305px;
}

.cbc-info-boxes__category-dropdown,
.cbc-info-boxes__order-dropdown {
	width: 100%;
}

.cbc-info-boxes__category-dropdown .cbc-ui-dropdown-trigger,
.cbc-info-boxes__category-dropdown .cbc-ui-dropdown-option,
.cbc-info-boxes__order-dropdown .cbc-ui-dropdown-trigger,
.cbc-info-boxes__order-dropdown .cbc-ui-dropdown-option {
	font-family: inherit;
}

.cbc-info-boxes__filter-submit {
	flex: 0 0 auto;
	min-width: 112px;
}

.cbc-info-boxes__results-count {
	font-size: 16px;
	font-weight: 400;
	color: #2b2d2a;
	margin-bottom: 24px;
}

.cbc-info-boxes__count-number {
	font-weight: inherit;
}

/* Order By Bar Variant */
.cbc-info-boxes__order-bar-variant {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 32px;
	width: 100%;
}

.cbc-info-boxes__order-bar-line {
	flex: 1 1 0%;
	height: 1px;
	min-height: 1px;
	background-color: #E2E2E2;
}

.cbc-info-boxes__order-bar-select-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	flex: 0 0 305px;
	width: 305px;
}

/* Accordion items */
.cbc-info-boxes__accordion-list {
	width: 100%;
	transition: opacity 0.25s ease;
}

.cbc-info-boxes__accordion-item {
	width: 100%;
	border-bottom: 1px solid #e1e1e1;
	background: transparent;
}

.cbc-info-boxes__accordion-item:first-child {
	border-top: 1px solid #e1e1e1;
}

.cbc-info-boxes__accordion-item > .cbc-info-boxes__accordion-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 32px 20px 32px 0;
	cursor: pointer;
	list-style: none;
}

.cbc-info-boxes__accordion-header::-webkit-details-marker {
	display: none;
}

.cbc-info-boxes__accordion-title {
	text-align: left;
	font-size: 20px;
	font-weight: 500;
	margin: 0;
	color: #2b2d2a;
	line-height: 1.3;
}

.cbc-info-boxes__accordion-icon {
	display: block;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	margin: 0;
	transform: rotate(0deg);
	transform-origin: center;
	transition: transform 0.1s;
}

/* Rotate the complete reference icon around its center, as Bricks does. */
.cbc-info-boxes__accordion-item[open] .cbc-info-boxes__accordion-icon {
	transform: rotate(45deg);
}

.cbc-info-boxes__accordion-content {
	padding: 0 0 32px;
	color: #2b2d2a;
	font-size: 16px;
	line-height: 1.6;
}

.cbc-info-boxes__accordion-content p {
	margin: 0 0 16px;
}

.cbc-info-boxes__accordion-content p:last-child {
	margin-bottom: 0;
}

/* Load more */
.cbc-info-boxes__load-more-wrapper {
	display: flex;
	justify-content: center;
	margin: 0 auto;
}

.cbc-info-boxes__load-more {
	margin-top: 40px;
}

/* ── SECTION 3: Popular (Lo más preguntado) ── */
.cbc-info-boxes__popular-section {
	position: relative;
	isolation: isolate;
	width: 100%;
	padding: 0;
}

.cbc-info-boxes__popular-section::before {
	content: '';
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100vw;
	background: #f3f3f3;
	z-index: -1;
}

.cbc-info-boxes__popular-container {
	width: 100%;
	margin: 0 auto;
	padding: 80px 0;
	min-width: 0; /* Prevent flex blowout */
}

.cbc-info-boxes__popular-header {
	max-width: 877px;
	margin-bottom: 40px;
}

.cbc-info-boxes__popular-title {
	font-size: 42px;
	font-weight: 600;
	margin: 0 0 16px;
	color: #2b2d2a;
	line-height: 1.15;
}

.cbc-info-boxes__popular-subtitle {
	font-size: 20px;
	line-height: 1.4;
	color: #2b2d2a;
	text-align: left;
}

/* Card grid */
.cbc-info-boxes__grid {
	display: grid;
	width: 100%;
	min-width: 0;
	grid-template-columns: repeat(var(--cbc-info-boxes-columns, 3), minmax(0, 1fr));
	gap: var(--cbc-info-boxes-gap, 20px);
}

.cbc-info-boxes--columns-2 { --cbc-info-boxes-columns: 2; }
.cbc-info-boxes--columns-3 { --cbc-info-boxes-columns: 3; }
.cbc-info-boxes--columns-4 { --cbc-info-boxes-columns: 4; }

.cbc-info-boxes__card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-start;
	min-height: 238px;
	border-radius: var(--cbc-info-boxes-card-radius, 16px);
	padding: 20px;
	background: var(--cbc-info-boxes-card-bg, #ffffff);
	color: #2b2d2a;
}

.cbc-info-boxes__number {
	font-size: 24px;
	font-weight: 600;
	line-height: 1;
}

.cbc-info-boxes__question {
	margin: 16px 0 0;
	color: inherit;
	font-size: 20px;
	font-weight: 400;
	line-height: 1.3;
}

.cbc-info-boxes__description {
	margin-top: 14px;
	margin-bottom: 20px;
	color: inherit;
	font-size: 15px;
	line-height: 1.45;
	opacity: 0.85;
}

.cbc-info-boxes__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	margin-top: auto;
	padding: 8px 24px;
	border: 2px solid #e1e1e1;
	border-radius: 24px; /* JSON cornerRadius 24 */
	background: #ffffff;
	color: #2b2d2a;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cbc-info-boxes__button:hover,
.cbc-info-boxes__button:focus-visible {
	text-decoration: none;
	outline: none;
	color: #2b2d2a;
	background: #f3c539;
	border-color: #f3c539;
	box-shadow: 0 4px 28px 0 rgba(243, 197, 57, 0.70);
}

/* Carousel pagination dots (mobile) */
.cbc-info-boxes__carousel-pagination {
	display: none;
}

.cbc-info-boxes__carousel-status {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ── Responsive: Tablet ── */
@media (max-width: 991px) {
	.cbc-info-boxes__header-container {
		padding: 48px 40px 32px;
	}

	.cbc-info-boxes__title {
		font-size: 40px;
	}

	.cbc-info-boxes__accordion-container {
		padding: 24px 40px 64px;
	}

	.cbc-info-boxes__popular-container {
		padding: 48px 40px;
	}

	.cbc-info-boxes__popular-title {
		font-size: 34px;
	}

	.cbc-info-boxes__accordion-title-main {
		font-size: 40px;
		margin-bottom: 32px;
	}

	.cbc-info-boxes__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.cbc-info-boxes__filters {
		flex-wrap: wrap;
	}

	.cbc-info-boxes__select-wrapper {
		flex: 1 1 100%;
		min-width: 0;
	}

	.cbc-info-boxes__select-wrapper-small {
		flex: 1 1 calc(100% - 128px);
		min-width: 0;
	}
}

/* Match the reference accordion's mobile landscape icon size. */
@media (max-width: 767px) {
	.cbc-info-boxes__accordion-icon {
		width: 24px;
		height: 24px;
	}
}

/* ── Responsive: Mobile ── */
@media (max-width: 640px) {
	.cbc-info-boxes__header-section {
		padding-top: 20px;
	}

	.cbc-info-boxes__header-container {
		padding: 40px 20px 24px;
	}

	.cbc-info-boxes__title {
		font-size: 32px;
	}

	.cbc-info-boxes__subtitle {
		font-size: 17px;
	}

	.cbc-info-boxes__accordion-container {
		padding: 64px 20px 64px;
	}

	.cbc-info-boxes__accordion-header-title {
		font-size: 20px;
		color: #5f5f5f;
	}

	.cbc-info-boxes__accordion-header-link {
		display: none;
	}

	.cbc-info-boxes__filters {
		flex-direction: column;
	}

	.cbc-info-boxes__select-wrapper,
	.cbc-info-boxes__select-wrapper-small {
		min-width: 100%;
	}

	.cbc-info-boxes__order-bar-variant {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.cbc-info-boxes__order-bar-line {
		display: none;
	}

	.cbc-info-boxes__order-bar-select-wrapper {
		flex-basis: auto;
		width: 100%;
	}

	.cbc-info-boxes__filter-submit {
		align-self: center;
		width: auto;
	}

	.cbc-info-boxes__load-more {
		margin-top: 32px;
	}

	.cbc-info-boxes__popular-container {
		padding: 64px 20px;
	}

	.cbc-info-boxes__popular-title {
		font-size: 28px;
		font-weight: 500;
		line-height: 36px;
		margin: 0;
	}

	.cbc-info-boxes__accordion-title-main {
		font-size: 30px;
		margin-bottom: 24px;
	}

	.cbc-info-boxes__popular-header {
		margin-bottom: 20px;
	}

	.cbc-info-boxes__popular-subtitle {
		margin-top: 8px;
	}

	/* Carousel mode for grid on mobile */
	.cbc-info-boxes__grid {
		--cbc-info-boxes-mobile-card-width: min(312px, calc(100vw - 40px));
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding-inline: 20px;
		overscroll-behavior-x: contain;
		gap: 12px;
		padding-bottom: 0;
		scrollbar-width: none;
		-ms-overflow-style: none;
		/* Fix to allow cards to slide all the way to the screen edges */
		margin-left: -20px;
		margin-right: -20px;
		padding-left: 20px;
		padding-right: 20px;
		
		/* Prevent grid from expanding the page width */
		width: calc(100% + 40px);
		max-width: calc(100% + 40px);
		min-width: 0;
	}

	.cbc-info-boxes__grid::-webkit-scrollbar {
		display: none;
	}

	.cbc-info-boxes__card {
		flex: 0 0 var(--cbc-info-boxes-mobile-card-width);
		width: var(--cbc-info-boxes-mobile-card-width);
		min-width: 0;
		max-width: none;
		min-height: 214px;
		padding: 20px;
		border-radius: var(--cbc-info-boxes-card-radius, 12px);
		scroll-snap-align: start;
		scroll-snap-stop: always;
		overflow-wrap: anywhere;
	}

	/* Leave enough scrollable space to align the last card like the first. */
	.cbc-info-boxes__card:last-child {
		margin-inline-end: max(0px, calc(100% - var(--cbc-info-boxes-mobile-card-width)));
	}

	.cbc-info-boxes__number {
		font-size: 20px;
		font-weight: 700;
		line-height: 28px;
	}

	.cbc-info-boxes__question {
		margin-top: 12px;
		font-size: 16px;
		line-height: 24px;
	}

	.cbc-info-boxes__button {
		min-height: 32px;
		padding: 4px;
		border: 0;
		border-radius: 0;
		background: transparent;
		font-weight: 400;
		line-height: 24px;
	}

	.cbc-info-boxes__button:hover,
	.cbc-info-boxes__button:focus-visible {
		background: transparent;
		box-shadow: none;
		text-decoration: underline;
	}

	.cbc-info-boxes__button:focus-visible,
	.cbc-info-boxes__carousel-dot:focus-visible,
	.cbc-info-boxes__grid:focus-visible {
		outline: 2px solid #2b2d2a;
		outline-offset: -2px;
	}

	/* Show carousel dots on mobile */
	.cbc-info-boxes__carousel-pagination {
		display: flex;
		gap: 8px 12px;
		width: 100%;
		flex-wrap: wrap;
		margin-top: 28px;
		margin-bottom: -12px;
		align-items: center;
	}

	.cbc-info-boxes__carousel-pagination:empty,
	.cbc-info-boxes__carousel-pagination[hidden] {
		display: none;
	}

	.cbc-info-boxes__carousel-dot {
		display: flex;
		align-items: center;
		justify-content: center;
		flex: 1 0 24px;
		min-width: 24px;
		height: 24px;
		padding: 10px 0;
		border: 0;
		border-radius: 0;
		background: transparent;
		cursor: pointer;
	}

	.cbc-info-boxes__carousel-dot::before {
		content: '';
		display: block;
		width: 100%;
		height: 4px;
		border-radius: 2px;
		background: #e1e1e1;
		transition: background 0.3s ease;
	}

	.cbc-info-boxes__carousel-dot.active::before {
		background: #f3c539;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cbc-info-boxes__accordion-icon,
	.cbc-info-boxes__carousel-dot::before {
		transition: none;
	}
}
