/* GM Product Cards — referência gm-oficial-licencas.com.br */

ul.products li.product.gm-product-card {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	position: relative;
	overflow: visible;
	align-self: start;
}

.gm-product-card__inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 15px;
	overflow: visible;
	transition: border-radius 0.22s ease, border-color 0.22s ease;
	position: relative;
	z-index: 1;
}

.gm-product-card:hover {
	filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.12));
	z-index: 4;
}

.gm-product-card:hover .gm-product-card__inner,
.gm-product-card__inner:hover {
	border-radius: 15px 15px 0 0 !important;
	border-bottom: none !important;
	z-index: 5;
}

/* Imagem */
.gm-product-card__image-link {
	display: block;
	overflow: hidden;
	line-height: 0;
	border-radius: 15px 15px 0 0;
}

.gm-product-card__image-link img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}

.gm-product-card__inner:hover .gm-product-card__image-link img {
	transform: scale(1.03);
}

/* Corpo do card */
.gm-product-card__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 16px 14px 18px;
	flex: 1;
}

/* Título — sobrescreve cor primária do Elementor */
.elementor-widget-woocommerce-products .gm-product-card .woocommerce-loop-product__title,
.elementor-widget-wc-archive-products .gm-product-card .woocommerce-loop-product__title,
.gm-product-card .woocommerce-loop-product__title {
	font-family: "Montserrat", sans-serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: #1a1a1a !important;
	margin: 0 0 10px;
	padding: 0;
}

/* Preço */
.elementor-widget-woocommerce-products .gm-product-card .price,
.elementor-widget-wc-archive-products .gm-product-card .price,
.gm-product-card .price {
	font-family: "Montserrat", sans-serif;
	font-size: 26px;
	font-weight: 700;
	color: #1a1a1a !important;
	margin: 0 0 6px;
	line-height: 1.2;
}

.gm-product-card .price del {
	display: none;
}

.gm-product-card .price ins {
	text-decoration: none;
}

.gm-product-card .price .woocommerce-Price-amount,
.gm-product-card .price .woocommerce-Price-amount .amount,
.gm-product-card .price ins .amount {
	color: #1a1a1a !important;
}

.gm-product-card .price .woocommerce-Price-currencySymbol {
	font-size: inherit;
}

.gm-product-card .price .amount bdi {
	white-space: nowrap;
}

/* Parcelamento — sempre em uma linha */
.gm-product-card__installments {
	display: block;
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: #333;
	margin: 0;
	line-height: 1.2;
	white-space: nowrap !important;
	word-break: keep-all !important;
	overflow-wrap: normal !important;
	width: 100%;
	text-align: center;
}

.gm-product-card__installments strong {
	display: inline;
	font-weight: 700;
}

/* Botões — extensão contínua do card, cresce para baixo */
.gm-product-card__actions {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	width: 100%;
	height: 42px;
	display: flex;
	align-items: stretch;
	gap: 0;
	box-sizing: border-box;
	padding: 0;
	margin-top: -1px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-top: none;
	border-radius: 0 0 15px 15px;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.22s ease, visibility 0.22s ease, transform 0.28s ease;
	z-index: 6;
	pointer-events: none;
}

.gm-product-card:hover .gm-product-card__actions,
.gm-product-card__actions:hover {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(0) !important;
	pointer-events: auto !important;
}

/* Reset total dos botões dentro do card */
.gm-product-card__actions a.gm-btn {
	flex: 1 1 0;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-sizing: border-box !important;
	min-height: 42px !important;
	height: 42px !important;
	max-height: 42px !important;
	margin: 0 !important;
	padding: 0 10px !important;
	font-family: "Montserrat", sans-serif !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	border-radius: 0 !important;
	border: none !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	float: none !important;
	width: auto !important;
	vertical-align: top !important;
}

.gm-product-card__actions a.gm-btn--espiar {
	background: #fff !important;
	color: #1a1a1a !important;
	border-right: 1px solid #1a1a1a !important;
	border-radius: 0 0 0 15px !important;
}

.gm-product-card__actions a.gm-btn--espiar:hover {
	background: #f5f5f5 !important;
	color: #1a1a1a !important;
}

.gm-product-card__actions a.gm-btn--comprar,
.gm-product-card__actions a.gm-btn--comprar.button,
.gm-product-card__actions a.gm-btn--comprar.add_to_cart_button {
	background: #1a1a1a !important;
	color: #fff !important;
	border-radius: 0 0 15px 0 !important;
}

.gm-product-card__actions a.gm-btn--comprar:hover,
.gm-product-card__actions a.gm-btn--comprar.button:hover {
	background: #333 !important;
	color: #fff !important;
}

.gm-product-card__actions a.gm-btn--comprar.added {
	background: #2e7d32 !important;
	border-color: #2e7d32 !important;
}

/* Esconde botão padrão do WooCommerce caso apareça */
.gm-product-card > .button,
.gm-product-card > .add_to_cart_button:not(.gm-btn--comprar) {
	display: none !important;
}

/* Elementor widget — grid de produtos */
.elementor-widget-woocommerce-products .gm-product-card__inner,
.elementor-widget-wc-archive-products .gm-product-card__inner {
	height: 100%;
}

.elementor-widget-woocommerce-products ul.products li.product.gm-product-card,
.elementor-widget-wc-archive-products ul.products li.product.gm-product-card {
	display: flex;
	flex-direction: column;
}

.elementor-widget-woocommerce-products ul.products,
.elementor-widget-wc-archive-products ul.products {
	overflow: visible;
}

.elementor-widget-woocommerce-products,
.elementor-widget-woocommerce-products .elementor-widget-container,
.elementor-widget-woocommerce-products .woocommerce,
.elementor-widget-wc-archive-products,
.elementor-widget-wc-archive-products .elementor-widget-container,
.elementor-widget-wc-archive-products .woocommerce {
	overflow: visible !important;
}

/* Touch devices: painel sempre visível como extensão do card */
@media (hover: none) {
	.gm-product-card {
		filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.1));
	}

	.gm-product-card__inner {
		border-radius: 15px 15px 0 0;
		border-bottom: none;
		box-shadow: none;
	}

	.gm-product-card__actions {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
	}
}

@media (max-width: 767px) {
	.gm-product-card .woocommerce-loop-product__title {
		font-size: 14px;
	}

	.gm-product-card .price {
		font-size: 22px;
	}

	.gm-product-card__installments {
		font-size: 11px;
	}

	.gm-product-card__actions a.gm-btn {
		font-size: 12px !important;
		min-height: 40px !important;
		height: 40px !important;
		max-height: 40px !important;
	}
}
