/* Criativa - Loja: layout dos cards de produto (listagem, categorias, busca) */

/* ---------- Grade ---------- */
ul.products.isotope,
body ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 24px;
	width: 100% !important;
	height: auto !important;
	margin: 0 0 32px !important;
	padding: 0 !important;
	list-style: none;
	position: static !important;
}
ul.products::before,
ul.products::after { display: none !important; content: none !important; }

/* ---------- Card ---------- */
body ul.products li.product {
	position: static !important;
	transform: none !important;
	left: auto !important;
	top: auto !important;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	min-width: 0;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 14px;
	padding: 12px 12px 14px !important;
	overflow: hidden;
	text-align: left !important;
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
body ul.products li.product:hover {
	box-shadow: 0 10px 26px rgba(0, 0, 0, .10);
	border-color: #dcdcdc;
	transform: translateY(-2px) !important;
}

/* ---------- Imagem (quadrada, sem distorcer) ---------- */
ul.products li.product .mfn-li-product-row-image { width: 100%; }
ul.products li.product .image_frame,
ul.products li.product .image_wrapper,
ul.products li.product .image_wrapper > a {
	display: block;
	width: 100%;
	border: 0 !important;
	box-shadow: none !important;
}
ul.products li.product .image_wrapper img {
	display: block;
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
	border-radius: 8px;
}

/* ---------- Texto ---------- */
ul.products li.product .desc {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 6px;
	padding: 12px 2px 0 !important;
	margin: 0 !important;
	text-align: left !important;
	background: none !important;
}
ul.products li.product .desc h4.mfn-woo-product-title,
ul.products li.product .desc h4 {
	margin: 0 !important;
	font-size: 15px;
	line-height: 1.3;
	font-weight: 700;
	color: #1d1d1d;
	text-align: left !important;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	min-height: 2.6em;
}
ul.products li.product .desc h4 a { color: inherit; }

/* Preço */
ul.products li.product .desc .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 8px;
	margin: 0 !important;
	text-align: left !important;
	color: #111;
}
ul.products li.product .desc .price del {
	order: 1;
	color: #8a8a8a;
	font-size: 13px;
	font-weight: 400;
	opacity: 1;
}
ul.products li.product .desc .price ins { order: 2; background: none; text-decoration: none; }
ul.products li.product .desc .price .amount,
ul.products li.product .desc .price ins .amount {
	font-size: 21px;
	font-weight: 800;
	color: #111;
}
ul.products li.product .desc .price del .amount { font-size: 13px; font-weight: 400; color: #8a8a8a; }

/* Parcelamento */
ul.products li.product .installment-prices-for-woocommerce,
ul.products li.product .installment-prices-for-woocommerce p {
	margin: 0 !important;
	padding: 0 !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	font-weight: 500;
	color: #2a7a46 !important;
	text-align: left !important;
}
ul.products li.product .installment-prices-for-woocommerce .amount { font-size: 13px !important; font-weight: 700; color: #2a7a46 !important; }

/* Produto sem preço */
ul.products li.product:not(:has(.price)) .mfn-li-product-row-button::before {
	content: "Preço sob consulta";
	display: block;
	width: 100%;
	text-align: left !important;
	font-size: 15px;
	font-weight: 700;
	color: #555;
	margin-bottom: 2px;
}

/* ---------- Botões (empilhados, sempre no pé do card) ---------- */
ul.products li.product .mfn-li-product-row-button {
	margin-top: auto;
	padding-top: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	text-align: left !important;
}
ul.products li.product .mfn-li-product-row-button .screen-reader-text { position: absolute; }
ul.products li.product .mfn-li-product-row-button a.button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100% !important;
	margin: 0 !important;
	padding: 11px 12px !important;
	border-radius: 10px;
	font-size: 14px !important;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	box-shadow: none;
	text-transform: none;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
/* Produto sem preço/estoque: o tema mostra "Ler mais"; esconder (sobra só o WhatsApp) */
ul.products li.product .mfn-li-product-row-button a.button:not(.add_to_cart_button) { display: none !important; }

/* Principal: adicionar ao carrinho */
ul.products li.product .mfn-li-product-row-button a.button:not(.wa-shop-button) {
	background: #f1ca00 !important;
	color: #111 !important;
	border: 2px solid #f1ca00 !important;
}
ul.products li.product .mfn-li-product-row-button a.button:not(.wa-shop-button):hover {
	background: #d9b500 !important;
	border-color: #d9b500 !important;
}
ul.products li.product .mfn-li-product-row-button a.added_to_cart { background: #111 !important; color: #fff !important; border-color: #111 !important; }
/* Secundário: pedir pelo WhatsApp */
ul.products li.product .mfn-li-product-row-button a.wa-shop-button {
	background: #fff !important;
	color: #11823f !important;
	border: 2px solid #25d366 !important;
}
ul.products li.product .mfn-li-product-row-button a.wa-shop-button:hover {
	background: #25d366 !important;
	color: #fff !important;
}
/* Sem preço/estoque: o WhatsApp é a ação principal */
ul.products li.product .mfn-li-product-row-button a.wa-shop-button:only-of-type {
	background: #25d366 !important;
	color: #fff !important;
}

/* Botão do WhatsApp: sem ícone/recuo herdado do plugin (texto centralizado) */
ul.products li.product .mfn-li-product-row-button a.wa-shop-button {
	background-image: none !important;
	padding-left: 12px !important;
	padding-right: 12px !important;
	text-indent: 0 !important;
}
ul.products li.product .mfn-li-product-row-button a.wa-shop-button::before,
ul.products li.product .mfn-li-product-row-button a.wa-shop-button::after {
	display: none !important;
	content: none !important;
}

/* ---------- Celular: 2 colunas compactas ---------- */
@media (max-width: 640px) {
	body ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	body ul.products li.product { padding: 8px 8px 10px !important; border-radius: 12px; }
	ul.products li.product .desc { padding-top: 8px !important; gap: 4px; }
	ul.products li.product .desc h4.mfn-woo-product-title,
	ul.products li.product .desc h4 { font-size: 13px; }
	ul.products li.product .desc .price .amount,
	ul.products li.product .desc .price ins .amount { font-size: 17px; }
	ul.products li.product .installment-prices-for-woocommerce,
	ul.products li.product .installment-prices-for-woocommerce p,
	ul.products li.product .installment-prices-for-woocommerce .amount { font-size: 11.5px !important; }
	ul.products li.product .mfn-li-product-row-button a.button { padding: 10px 6px !important; font-size: 12.5px !important; }
}
