/*
 * ML Promoções - Estilos públicos
 * Abordagem Mobile First: regras base para telas pequenas,
 * ampliadas progressivamente via media queries min-width.
 */

.mlp-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem;
	box-sizing: border-box;
	background-color: #f5f5f5;
}

.mlp-container * {
	box-sizing: border-box;
}

/* Filtro por categoria: combobox + botão "Filtrar" */
.mlp-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 0;
	margin-bottom: 1rem;
}

.mlp-filter__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #333333;
	width: 100%;
}

.mlp-filter__select {
	flex: 1 1 200px;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #cccccc;
	border-radius: 0.5rem;
	background-color: #ffffff;
	font-size: 0.95rem;
	color: #333333;
	max-width: 100%;
}

.mlp-filter__button {
	flex: 0 0 auto;
	min-height: 44px;
	padding: 0.5rem 1.25rem;
	border: none;
	border-radius: 0.5rem;
	background-color: #ffe600;
	color: #333333;
	font-weight: 700;
	font-size: 0.95rem;
	cursor: pointer;
}

.mlp-filter__button:hover {
	filter: brightness(0.95);
}

.mlp-loading {
	text-align: center;
	padding: 1rem;
	color: #666666;
}

.mlp-empty {
	text-align: center;
	padding: 2rem 1rem;
	color: #666666;
}

/* Grade de produtos: 1 coluna em telas pequenas (mobile first) */
.mlp-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	width: 100%;
}

.mlp-card {
	background-color: #ffffff;
	border-radius: 0.75rem;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	width: 100%;
}

.mlp-card__link {
	text-decoration: none;
	color: inherit;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.mlp-card__image-wrap {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: #fafafa;
}

.mlp-card__image {
	max-width: 100%;
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.mlp-card__body {
	padding: 0.75rem 1rem;
	flex-grow: 1;
}

.mlp-card__title {
	font-size: 0.95rem;
	font-weight: 400;
	color: #333333;
	margin: 0 0 0.5rem;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mlp-card__price {
	font-size: 1.3rem;
	font-weight: 700;
	color: #333333;
	margin: 0 0 0.25rem;
}

.mlp-card__installments {
	font-size: 0.85rem;
	color: #00a650;
	margin: 0 0 0.25rem;
}

.mlp-card__shipping {
	font-size: 0.8rem;
	font-weight: 600;
	color: #00a650;
	margin: 0;
}

.mlp-card__button {
	display: block;
	text-align: center;
	background-color: #ffe600;
	color: #333333;
	font-weight: 700;
	text-decoration: none;
	padding: 0.85rem 1rem;
	min-height: 44px;
	line-height: 1.2;
	margin: 0 1rem 1rem;
	border-radius: 0.5rem;
}

.mlp-card__button:hover {
	filter: brightness(0.95);
}

/* Tablet: 2 colunas */
@media (min-width: 600px) {
	.mlp-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Desktop: 4 colunas */
@media (min-width: 992px) {
	.mlp-grid {
		grid-template-columns: repeat(4, 1fr);
	}

	.mlp-container {
		padding: 2rem 1rem;
	}
}

/* Paginação: botões numerados com "Anterior" / "Próxima" */
.mlp-pagination {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.4rem;
	margin-top: 1.5rem;
	width: 100%;
}

.mlp-pagination__item {
	min-width: 44px;
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1px solid #e0e0e0;
	border-radius: 0.5rem;
	background-color: #ffffff;
	color: #333333;
	font-size: 0.9rem;
	cursor: pointer;
}

.mlp-pagination__item.is-active {
	background-color: #ffe600;
	border-color: #ffe600;
	font-weight: 700;
}

.mlp-pagination__item:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.mlp-pagination__nav {
	font-weight: 600;
}
