/**
 * Tela em Branco com Padrão — miniaturas dos padrões e seção "Assim ela chega" +
 * "3 ideias de cores". Só carrega na página deste produto (pcc-telas-padrao.php).
 * Cores e cantos do visual da página do produto (pcc-product-page.css):
 * azul #00aaff na escolha, lilás #f1e5fc / #9a7bbf, textos #212529 / #576471.
 */

/* ---------------------------------------------------------------------------
 * Escolha do padrão: miniaturas quadradas (o pcc-product-page.css transforma
 * swatch em pílula de texto; aqui volta a ser foto).
 * ------------------------------------------------------------------------ */
/* 1.1.2 (24/11/2026, escolha do dono: opção D do plano
 * https://claude.ai/artifact/6x8aUND9kbHG9rDfDq9qus): nada desliza.
 * Computador: os padrões todos, 6 por linha. Celular: 2 linhas (10) e o botão
 * "Ver todos os padrões" (telas-padrao.js) abre o resto ali mesmo; o escolhido
 * sempre fica entre os 10 da frente.
 * A tabela de variações vira bloco só nesta página: como tabela de largura
 * automática, o Firefox/Zen a media pela miniatura (1 coluna de 46 px, 1.1.0) e não
 * deixava a linha crescer com a grade aberta (os padrões cobriam o preço). As
 * linhas já são flex no tema; a célula ocupa a largura toda. */
.pcc-tp-produto table.variations,
.pcc-tp-produto table.variations > tbody {
	display: block;
	width: 100%;
}

/* Célula em bloco: como flex, o Firefox calcula a altura da grade antes de saber a
 * largura e a linha fica mais baixa que a grade aberta. */
.pcc-tp-produto table.variations td.value:has(> .ct-variation-swatches[data-swatches-type="image"]) {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
}

.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"] {
	display: grid;
	flex: 0 0 100%;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 6px;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
}

.pcc-tp-mais {
	display: block;
	flex: 0 0 100%;
	width: 100%;
	margin: 10px 0 0;
	padding: 10px 12px;
	border: 1.5px dashed #9a7bbf;
	border-radius: 12px;
	background: #faf6fe;
	color: #4b3a63;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
}

.pcc-tp-mais:focus-visible {
	outline: 3px solid #00aaff;
	outline-offset: 2px;
}

@media (max-width: 689px) {
	.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"]:not(.pcc-tp-aberto) > .ct-swatch-container.pcc-tp-depois {
		display: none !important;
	}
}

@media (min-width: 690px) {
	/* Todos à vista, 6 por linha, miniaturas de ~62 px como antes. */
	.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"] {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		max-width: 400px;
	}

	.pcc-tp-mais {
		display: none;
	}
}

/* O que vem e o que não vem, logo antes do preço */
.pcc-tp-aviso {
	margin: 4px 0 14px;
	padding: 0;
	list-style: none;
	font-size: 13px;
	line-height: 1.45;
	color: #576471;
}

.pcc-tp-aviso li {
	position: relative;
	margin: 0 0 6px;
	padding: 8px 10px 8px 34px;
	border-radius: 10px;
}

.pcc-tp-aviso b {
	color: #212529;
}

.pcc-tp-aviso li::before {
	position: absolute;
	left: 10px;
	top: 8px;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
	color: #fff;
}

.pcc-tp-aviso__sim {
	background: #f0fdf4;
}

.pcc-tp-aviso__sim::before {
	content: "✓";
	background: #16a34a;
}

.pcc-tp-aviso__nao {
	background: #fff7ed;
}

.pcc-tp-aviso__nao::before {
	content: "!";
	background: #ea8a1a;
}

.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"] .ct-swatch-container {
	width: auto;
	height: auto !important;
	padding: 2px !important;
	margin: 0;
	border: 2px solid transparent;
	border-radius: 10px !important;
	background: #fff;
	aspect-ratio: 1 / 1;
}

.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"] .ct-swatch {
	width: 100% !important;
	height: 100% !important;
	border-radius: 7px !important;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(33, 37, 41, 0.12);
}

.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"] .ct-swatch img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0 !important;
}

.pcc-tp-produto .variations .ct-variation-swatches[data-swatches-type="image"] .ct-swatch-container[aria-pressed="true"] {
	border-color: #00aaff;
	background: #e6f7ff;
}

/* ---------------------------------------------------------------------------
 * Seção
 * ------------------------------------------------------------------------ */
.pcc-tp {
	clear: both;
	margin: 8px 0 32px;
	padding: 20px 16px 16px;
	border: 1px solid #ece6f4;
	border-radius: 16px;
	background: #fff;
	color: #212529;
}

.pcc-tp__chapeu {
	margin: 0 0 4px;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #9a7bbf;
}

.pcc-tp__h2 {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
}

.pcc-tp__intro,
.pcc-tp__desc {
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #576471;
}

.pcc-tp__h3 {
	margin: 0 0 6px;
	font-size: 15px;
	font-weight: 700;
}

.pcc-tp__h3--ideias {
	margin-top: 22px;
	margin-bottom: 10px;
}

.pcc-tp__h4 {
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
}

.pcc-tp__estilo {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 8px;
	border-radius: 999px;
	background: #f1e5fc;
	font-size: 11px;
	font-weight: 600;
	color: #6d4f93;
	vertical-align: 1px;
}

/* Foto (abre ampliada) */
.pcc-tp__foto {
	position: relative;
	display: block;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 0 0 1px rgba(33, 37, 41, 0.1);
	background: #f6f4f9;
	aspect-ratio: 1 / 1;
}

.pcc-tp__foto img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pcc-tp__lupa {
	position: absolute;
	right: 6px;
	bottom: 6px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212529' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E") center / 15px no-repeat;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

/* Assim ela chega */
.pcc-tp__chega {
	display: grid;
	grid-template-columns: minmax(0, 40%) minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.pcc-tp__chega-foto {
	margin: 0;
}

/* Listas de tons e de cores */
.pcc-tp__lista {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pcc-tp__lista li {
	display: grid;
	grid-template-columns: 14px minmax(0, 1fr) auto;
	gap: 8px;
	align-items: baseline;
	margin: 0;
	padding: 4px 0;
	border-bottom: 1px dashed #ece6f4;
	font-size: 13px;
	line-height: 1.35;
}

.pcc-tp__lista li:last-child {
	border-bottom: 0;
}

.pcc-tp__bola {
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--pcc-tp-cor, #ccc);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.16);
	align-self: center;
}

.pcc-tp__bola--livre {
	background: #fff;
	box-shadow: inset 0 0 0 1.5px #9aa3ad;
}

.pcc-tp__item b {
	font-weight: 600;
}

.pcc-tp__item small {
	display: block;
	font-size: 11px;
	color: #8a96a3;
}

.pcc-tp__qtd {
	font-size: 12.5px;
	font-variant-numeric: tabular-nums;
	color: #576471;
	white-space: nowrap;
}

.pcc-tp__total {
	margin: 6px 0 0;
	font-size: 12px;
	color: #8a96a3;
}

/* 3 ideias: no celular, uma por linha (foto ao lado das cores) */
.pcc-tp__ideias {
	display: grid;
	gap: 14px;
}

.pcc-tp__ideia {
	display: grid;
	grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	padding-top: 14px;
	border-top: 1px solid #ece6f4;
}

.pcc-tp__ideia:first-child {
	padding-top: 0;
	border-top: 0;
}

/* Sempre há um padrão escolhido: o "Limpar" voltaria à galeria geral por AJAX */
.pcc-tp-produto .variations_form .reset_variations {
	display: none !important;
}

.pcc-tp__nas-fotos {
	margin: 18px 0 0;
	padding: 10px 12px 10px 36px;
	border-radius: 10px;
	background: #f1e5fc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d4f93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='9' cy='10' r='1.6'/%3E%3Cpath d='M21 16l-5-5-8 8'/%3E%3C/svg%3E") 10px 50% / 18px no-repeat;
	font-size: 13.5px;
	line-height: 1.45;
	color: #4b3a63;
}

.pcc-tp__livre {
	margin: 18px 0 0;
	padding: 12px 14px;
	border: 1px dashed #c9bde0;
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #576471;
}

.pcc-tp__dica {
	margin: 16px 0 0;
	padding: 10px 12px;
	border-radius: 10px;
	background: #f7f3fc;
	font-size: 12.5px;
	line-height: 1.5;
	color: #576471;
}

/* Foto ampliada */
.pcc-tp__zoom {
	width: min(94vw, 760px);
	max-height: 94vh;
	padding: 12px;
	border: 0;
	border-radius: 14px;
	background: #fff;
}

.pcc-tp__zoom::backdrop {
	background: rgba(20, 16, 30, 0.72);
}

.pcc-tp__zoom img {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(94vh - 80px);
	object-fit: contain;
	border-radius: 8px;
}

.pcc-tp__zoom form {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 8px;
}

.pcc-tp__fechar {
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1e5fc;
	color: #212529;
	font-size: 22px;
	line-height: 34px;
	cursor: pointer;
}

.pcc-tp__zoom-legenda {
	margin: 8px 2px 0;
	font-size: 13px;
	color: #576471;
}

/* Computador: chega com foto de 240 px e as 3 ideias lado a lado */
@media (min-width: 690px) {
	.pcc-tp {
		padding: 28px 28px 22px;
	}

	.pcc-tp__h2 {
		font-size: 22px;
	}

	.pcc-tp__chega {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 24px;
	}

	.pcc-tp__chega-texto {
		max-width: 460px;
	}

	.pcc-tp__ideias {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
		max-width: 960px;
	}

	.pcc-tp__ideia {
		grid-template-columns: 1fr;
		padding-top: 0;
		border-top: 0;
	}
}
