/* Nexcore Commerce — wishlist, comparar e portes grátis. */

/* Botões nos produtos */
.ncc-list-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: calc(var(--ncc-gap) * 0.5);
	margin-top: calc(var(--ncc-gap) * 0.5);
}

.ncc-wishlist-button,
.ncc-compare-button {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.4em 0.8em;
	border: 1px solid var(--ncc-border);
	border-radius: var(--ncc-radius);
	background: var(--ncc-surface);
	color: var(--ncc-text);
	font: inherit;
	font-size: 0.9em;
	cursor: pointer;
}
.ncc-wishlist-button:hover,
.ncc-compare-button:hover { border-color: var(--ncc-primary); }

.ncc-wishlist-icon {
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s-7.5-4.6-9.5-9.2C1 8.2 3.4 4.5 7 4.5c2 0 3.4 1.1 5 3 1.6-1.9 3-3 5-3 3.6 0 6 3.7 4.5 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s-7.5-4.6-9.5-9.2C1 8.2 3.4 4.5 7 4.5c2 0 3.4 1.1 5 3 1.6-1.9 3-3 5-3 3.6 0 6 3.7 4.5 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ncc-wishlist-button.ncc-is-active { color: var(--ncc-accent); border-color: var(--ncc-accent); }
.ncc-wishlist-button.ncc-is-active .ncc-wishlist-icon {
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.5-9.2C1 8.2 3.4 4.5 7 4.5c2 0 3.4 1.1 5 3 1.6-1.9 3-3 5-3 3.6 0 6 3.7 4.5 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.5-9.2C1 8.2 3.4 4.5 7 4.5c2 0 3.4 1.1 5 3 1.6-1.9 3-3 5-3 3.6 0 6 3.7 4.5 7.3C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E");
}
.ncc-compare-button.ncc-is-active { color: var(--ncc-primary); border-color: var(--ncc-primary); }

/* Barra fixa "Ver comparação" */
.ncc-compare-bar {
	position: fixed;
	z-index: 999;
	right: var(--ncc-gap);
	bottom: var(--ncc-gap);
}
.ncc-compare-bar a {
	display: block;
	padding: 0.7em 1.2em;
	border-radius: var(--ncc-radius);
	background: var(--ncc-primary);
	color: var(--ncc-surface);
	font-family: var(--ncc-font);
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
}

/* Página da wishlist */
.ncc-wishlist-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: var(--ncc-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ncc-wishlist-item {
	display: flex;
	flex-direction: column;
	gap: calc(var(--ncc-gap) * 0.5);
	padding: calc(var(--ncc-gap) * 0.75);
	border: 1px solid var(--ncc-border);
	border-radius: var(--ncc-radius);
}
.ncc-wishlist-item a:not(.ncc-list-buy) { color: inherit; text-decoration: none; }
.ncc-wishlist-item img { width: 100%; height: auto; border-radius: calc(var(--ncc-radius) * 0.75); }
.ncc-wishlist-name { display: block; font-weight: 600; margin-top: 0.4em; }
.ncc-wishlist-remove,
.ncc-compare-remove {
	align-self: flex-start;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ncc-muted);
	font: inherit;
	font-size: 0.85em;
	text-decoration: underline;
	cursor: pointer;
}
.ncc-list-empty { color: var(--ncc-muted); }

/* Comprar (wishlist e comparação): cores próprias, não as do link do tema. */
.ncc-list-buy {
	display: block;
	padding: 0.6em 1em;
	border-radius: var(--ncc-radius);
	background: var(--ncc-primary);
	color: var(--ncc-surface);
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}
.ncc-list-buy:hover,
.ncc-list-buy:focus { color: var(--ncc-surface); opacity: 0.9; }
/* Mais específico do que o sublinhado dos temas (".page-content a" no Hello). */
.ncc-wishlist-item a.ncc-list-buy,
.ncc-compare-table a.ncc-list-buy { color: var(--ncc-surface); text-decoration: none; }

/* Tabela de comparação */
.ncc-compare-scroll { overflow-x: auto; }
.ncc-compare-table { width: 100%; border-collapse: collapse; font-family: var(--ncc-font); }
.ncc-compare-table th,
.ncc-compare-table td {
	padding: 0.7em;
	border-bottom: 1px solid var(--ncc-border);
	text-align: left;
	vertical-align: top;
	min-width: 160px;
}
.ncc-compare-table thead img { display: block; width: 120px; height: auto; margin-bottom: 0.5em; }
.ncc-compare-table thead a { color: inherit; text-decoration: none; font-weight: 600; }
.ncc-compare-table tbody th { color: var(--ncc-muted); font-weight: 500; }
.ncc-compare-differs td { background: color-mix(in srgb, var(--ncc-accent) 6%, transparent); }

/* Portes grátis */
.ncc-free-shipping {
	margin: 0 0 var(--ncc-gap);
	padding: calc(var(--ncc-gap) * 0.75);
	border: 1px solid var(--ncc-border);
	border-radius: var(--ncc-radius);
	background: var(--ncc-surface);
	color: var(--ncc-text);
	font-family: var(--ncc-font);
}
.ncc-free-shipping[hidden] { display: none; }
.ncc-free-shipping-text { margin: 0 0 0.5em; }
.ncc-free-shipping-bar {
	height: 6px;
	overflow: hidden;
	border-radius: 999px;
	background: var(--ncc-border);
}
.ncc-free-shipping-bar span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--ncc-primary);
	transition: width 0.3s ease;
}
.ncc-free-shipping--reached .ncc-free-shipping-bar span { background: var(--ncc-success); }

@media (prefers-reduced-motion: reduce) {
	.ncc-free-shipping-bar span { transition: none; }
}
