/* ---------------------------------------------------------------- */
/* Card de produto (base, compartilhado por grade e carrossel)      */
/* ---------------------------------------------------------------- */
.panel-product-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.panel-product-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.panel-product-link {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.panel-product-image {
	width: 100%;
	overflow: hidden;
	background: #fafafa;
	position: relative;
}

.panel-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.panel-product-title {
	font-size: 14px;
	margin: 10px 12px 4px;
	line-height: 1.4;
	color: #1a1a1a;
}

.panel-product-category {
	margin: 0 12px 4px;
	font-size: 12px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.panel-product-price {
	margin: 0 12px 12px;
	font-size: 14px;
	font-weight: 600;
	color: #2c2c2c;
}

.panel-product-price del {
	color: #999;
	font-weight: 400;
	margin-right: 6px;
	font-size: 12px;
}

.panel-product-price ins {
	text-decoration: none;
	color: #2c2c2c;
}

/* ---------------------------------------------------------------- */
/* Botões de tamanho (compartilhado)                                */
/* ---------------------------------------------------------------- */
.panel-product-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 4px 12px 8px;
}

.panel-product-sizes.panel-centered {
	justify-content: center;
}

.panel-size-btn {
	min-width: 36px;
	padding: 4px 10px;
	font-size: 12px;
	font-weight: 600;
	border: 1px solid #ddd;
	background: #fff;
	color: #333;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.15s ease;
	line-height: 1.2;
}

.panel-size-btn:hover {
	border-color: #999;
	background: #f5f5f5;
}

.panel-size-btn:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

/* Estado SELECIONADO de tamanho — contraste forte, independente de hover */
.panel-size-btn.is-active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
	border-width: 2px;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a;
	font-weight: 700;
	position: relative;
	z-index: 1;
}

.panel-size-btn.is-active:hover {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a;
}

/* ---------------------------------------------------------------- */
/* Opções de cor (compartilhado)                                    */
/* ---------------------------------------------------------------- */
.panel-product-colors {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 12px 14px;
}

.panel-product-colors.panel-centered {
	justify-content: center;
}

/* Bolinhas de cor no grid: círculo sólido, sem texto */
.panel-product-card .panel-color-btn {
	--panel-swatch-bg: #f3f3f3;
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	width: 22px;
	height: 22px;
	min-width: 22px;
	min-height: 22px;
	padding: 0;
	margin: 0;
	font-size: 0;
	line-height: 0;
	text-indent: -9999px;
	overflow: hidden;
	background-color: var(--panel-swatch-bg);
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
	vertical-align: middle;
	flex-shrink: 0;
	transition: box-shadow 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.panel-product-card .panel-color-btn:hover {
	background-color: var(--panel-swatch-bg);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.18);
	transform: scale(1.08);
}

.panel-product-card .panel-color-btn:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 3px;
}

/* Selecionado: anel branco + anel escuro + leve escala — legível em preto e branco */
.panel-product-card .panel-color-btn.is-active {
	box-shadow:
		0 0 0 2px #ffffff,
		0 0 0 4px #1a1a1a,
		0 1px 4px rgba(0, 0, 0, 0.25);
	transform: scale(1.12);
	border-color: #1a1a1a;
	z-index: 1;
	position: relative;
}

.panel-product-card .panel-color-btn.is-active:hover {
	box-shadow:
		0 0 0 2px #ffffff,
		0 0 0 4px #1a1a1a,
		0 1px 4px rgba(0, 0, 0, 0.25);
	transform: scale(1.12);
}

/* Combinação sem variação disponível (cor ou tamanho) */
.panel-product-card .panel-color-btn.is-unavailable,
.panel-product-card .panel-size-btn.is-unavailable {
	opacity: 0.35;
	cursor: not-allowed;
}

.panel-product-card .panel-size-btn.is-unavailable {
	text-decoration: line-through;
}

.panel-product-card .panel-color-btn.is-unavailable:hover,
.panel-product-card .panel-size-btn.is-unavailable:hover {
	box-shadow: none;
	transform: none;
}

/* ---------------------------------------------------------------- */
/* MODELO 1 — Card compacto                                         */
/* ---------------------------------------------------------------- */
.panel-product-template-1 .panel-product-title {
	font-size: 13px;
	margin-top: 10px;
}

.panel-product-template-1 .panel-product-category {
	font-size: 11px;
}

.panel-product-template-1 .panel-product-price {
	font-size: 13px;
	margin-bottom: 10px;
}

.panel-product-template-1 .panel-product-colors {
	margin-bottom: 14px;
	margin-top: 2px;
}

/* ---------------------------------------------------------------- */
/* MODELO 2 — Card com imagem grande e controles                    */
/* ---------------------------------------------------------------- */
.panel-product-template-2 {
	display: flex;
	flex-direction: column;
}

.panel-product-template-2 .panel-product-image-wrap {
	position: relative;
}

.panel-product-template-2 .panel-product-body {
	padding: 4px 0 4px;
}

.panel-product-template-2 .panel-product-title {
	font-size: 14px;
}

.panel-product-template-2 .panel-product-category {
	font-size: 12px;
}

.panel-product-template-2 .panel-product-price {
	margin-bottom: 8px;
}

/* Controles de ação no canto superior direito */
.panel-product-template-2 .panel-product-actions {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	z-index: 2;
}

.panel-action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: rgba(255,255,255,0.95);
	border: 1px solid rgba(0,0,0,0.08);
	color: #333;
	text-decoration: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.06);
	transition: all 0.15s ease;
	cursor: pointer;
}

.panel-action-btn:hover {
	background: #fff;
	color: #000;
	box-shadow: 0 2px 6px rgba(0,0,0,0.12);
	transform: scale(1.05);
}

.panel-action-btn svg {
	display: block;
}

.panel-product-template-2 .panel-product-sizes {
	margin-bottom: 6px;
}

.panel-product-template-2 .panel-product-colors {
	margin-top: 4px;
}

/* ---------------------------------------------------------------- */
/* MODELO 3 — Card centralizado / catálogo                          */
/* ---------------------------------------------------------------- */
.panel-product-template-3 {
	background: #fefcf7;
	border-color: #efe7d7;
}

.panel-product-template-3:hover {
	box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.panel-product-template-3 .panel-product-image {
	margin: 16px 16px 0;
	width: calc(100% - 32px);
	border-radius: 8px;
}

.panel-product-template-3 .panel-product-body {
	padding: 16px 8px 0;
}

.panel-product-template-3 .panel-product-body.panel-centered,
.panel-product-template-3 .panel-centered {
	text-align: center;
}

.panel-product-template-3 .panel-product-category {
	font-size: 12px;
	color: #a08060;
	margin: 0 0 4px;
}

.panel-product-template-3 .panel-product-title {
	font-size: 15px;
	margin: 4px 8px 8px;
}

.panel-product-template-3 .panel-product-price {
	font-size: 15px;
	margin: 4px 12px 12px;
	color: #1a1a1a;
}

.panel-product-template-3 .panel-product-sizes {
	margin: 4px 12px 8px;
}

.panel-product-template-3 .panel-size-btn {
	border-radius: 999px;
	min-width: 40px;
	padding: 6px 12px;
	background: transparent;
}

.panel-product-template-3 .panel-size-btn.is-active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
	border-width: 2px;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #1a1a1a;
	font-weight: 700;
}

.panel-product-template-3 .panel-product-colors {
	margin: 8px 12px 20px;
}

.panel-product-template-3 .panel-color-btn {
	width: 24px;
	height: 24px;
	min-width: 24px;
	min-height: 24px;
	padding: 0;
	border-radius: 50%;
}

/* ---------------------------------------------------------------- */
/* Grade de produtos                                                */
/* ---------------------------------------------------------------- */
.panel-grid {
	display: grid;
	grid-template-columns: repeat(var(--panel-grid-columns, 4), 1fr);
	gap: 20px;
}

@media (max-width: 1024px) {
	.panel-grid {
		grid-template-columns: repeat(min(3, var(--panel-grid-columns, 4)), 1fr);
	}
}

@media (max-width: 640px) {
	.panel-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 14px;
	}
}

@media (max-width: 400px) {
	.panel-grid {
		grid-template-columns: 1fr;
	}
}

.panel-loja-empty {
	color: #777;
	font-style: italic;
}

/* ---------------------------------------------------------------- */
/* Carrossel                                                         */
/* ---------------------------------------------------------------- */
.panel-carrossel {
	position: relative;
	padding: 0 44px;
}

.panel-carrossel-viewport {
	overflow: hidden;
}

.panel-carrossel-track {
	display: flex;
	will-change: transform;
	cursor: grab;
}

.panel-carrossel-track.is-dragging {
	cursor: grabbing;
	transition: none !important;
}

.panel-carrossel-slide {
	flex: 0 0 auto;
	padding: 0 10px;
	box-sizing: border-box;
	user-select: none;
}

.panel-carrossel-slide img {
	pointer-events: none;
}

.panel-carrossel-prev,
.panel-carrossel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	z-index: 2;
}

.panel-carrossel-prev:hover,
.panel-carrossel-next:hover {
	background: #f2f2f2;
}

.panel-carrossel-prev {
	left: 0;
}

.panel-carrossel-next {
	right: 0;
}

/* ---------------------------------------------------------------- */
/* Ajustes responsivos gerais para os cards                         */
/* ---------------------------------------------------------------- */
@media (max-width: 640px) {
	.panel-product-sizes {
		gap: 5px;
	}
	.panel-size-btn {
		min-width: 32px;
		padding: 4px 8px;
		font-size: 11px;
	}
	.panel-product-card .panel-color-btn {
		width: 20px;
		height: 20px;
		min-width: 20px;
		min-height: 20px;
		padding: 0;
	}
	.panel-product-template-3 .panel-product-image {
		margin: 12px 12px 0;
		width: calc(100% - 24px);
	}
}

@media (max-width: 480px) {
	.panel-action-btn {
		width: 30px;
		height: 30px;
	}
	.panel-action-btn svg {
		width: 14px;
		height: 14px;
	}
}

/* ---------------------------------------------------------------- */
/* Proporção global da imagem (aplicada aos 3 templates)            */
/*                                                                  */
/* Valores exatos:                                                   */
/*   vertical    →  9:16 (mais alto e estreito)                      */
/*   quadrado    →  1:1  (perfeitamente quadrado)                    */
/*   retangular  →  4:5  (levemente mais alto que largo)            */
/* ---------------------------------------------------------------- */
.panel-product-image--vertical {
	aspect-ratio: 9 / 16;
}

.panel-product-image--square {
	aspect-ratio: 1 / 1;
}

.panel-product-image--rectangular {
	aspect-ratio: 4 / 5;
}

/* Especificidade extra para garantir que a proporção vença o default */
.panel-product-card .panel-product-image--vertical   { aspect-ratio: 9 / 16; }
.panel-product-card .panel-product-image--square     { aspect-ratio: 1 / 1; }
.panel-product-card .panel-product-image--rectangular{ aspect-ratio: 4 / 5; }


/* ---------------------------------------------------------------- */
/* Página individual do produto — botões de cor com fundo + texto    */
/* ---------------------------------------------------------------- */
.panel-single-color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 12px;
}

.panel-single-color-btn {
	--panel-swatch-bg: #f3f3f3;
	--panel-swatch-fg: #000000;
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 36px;
	padding: 6px 16px;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: none;
	text-decoration: none;
	background-color: var(--panel-swatch-bg);
	color: var(--panel-swatch-fg);
	border: 1px solid rgba(0, 0, 0, 0.22);
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	transition: box-shadow 0.15s ease, opacity 0.15s ease, transform 0.12s ease;
}

.panel-single-color-btn:hover {
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.panel-single-color-btn:focus-visible {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

.panel-single-color-btn.is-active,
.panel-single-color-btn[aria-checked="true"] {
	box-shadow:
		0 0 0 2px #ffffff,
		0 0 0 4px #1a1a1a,
		0 1px 4px rgba(0, 0, 0, 0.2);
	border-width: 2px;
	border-color: #1a1a1a;
	font-weight: 700;
	position: relative;
	z-index: 1;
}

.panel-single-color-btn.is-disabled,
.panel-single-color-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* Esconde o <select> nativo do atributo de cor quando os botões Panel estão ativos */
.variations select.panel-color-select-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}


/* ---------------------------------------------------------------- */
/* Preço único na página do produto (evita R$ min + preço variação) */
/* ---------------------------------------------------------------- */
.single-product div.product .summary > p.price.panel-price-hidden,
.single-product div.product .summary > .price.panel-price-hidden {
	display: none !important;
}

/* Nossos botões de cor dentro do container escondido do CFVSW não devem aparecer */
.cfvsw-hidden-select .panel-single-color-swatches {
	display: none !important;
}

/* Swatches de COR do Variation Swatches Woo pintados pelo Panel */
.cfvsw-swatches-container[swatches-attr="attribute_pa_cor"] .cfvsw-swatches-option.panel-cfvsw-colored,
.cfvsw-swatches-container[swatches-attr*="cor"] .cfvsw-swatches-option.panel-cfvsw-colored,
.cfvsw-swatches-container[swatches-attr*="color"] .cfvsw-swatches-option.panel-cfvsw-colored {
	border-color: rgba(0, 0, 0, 0.25) !important;
	color: var(--panel-swatch-fg, #fff) !important;
	background-color: var(--panel-swatch-bg, #ccc) !important;
	background: var(--panel-swatch-bg, #ccc) !important;
	min-width: 40px !important;
	padding: 6px 14px !important;
	border-radius: 999px !important;
	font-weight: 600 !important;
}

.cfvsw-swatches-container[swatches-attr="attribute_pa_cor"] .cfvsw-swatches-option.panel-cfvsw-colored .cfvsw-swatch-inner,
.cfvsw-swatches-container[swatches-attr*="cor"] .cfvsw-swatches-option.panel-cfvsw-colored .cfvsw-swatch-inner,
.cfvsw-swatches-container[swatches-attr*="color"] .cfvsw-swatches-option.panel-cfvsw-colored .cfvsw-swatch-inner {
	background: transparent !important;
	color: inherit !important;
	border: none !important;
	box-shadow: none !important;
}

/* ---------------------------------------------------------------- */
/* CFVSW — estado SELECIONADO bem visível (cor e tamanho)            */
/* Reutiliza .cfvsw-selected-swatch / .cfvsw-selected-label do plugin */
/* ---------------------------------------------------------------- */
.cfvsw-swatches-option.cfvsw-selected-swatch,
.cfvsw-swatches-option.cfvsw-selected-label {
	box-shadow:
		0 0 0 2px #ffffff,
		0 0 0 4px #1a1a1a,
		0 1px 4px rgba(0, 0, 0, 0.2) !important;
	border-color: #1a1a1a !important;
	border-width: 2px !important;
	outline: none !important;
	position: relative;
	z-index: 2;
	font-weight: 700 !important;
	transform: scale(1.04);
}

/* Garante legibilidade do texto interno quando selecionado */
.cfvsw-swatches-option.cfvsw-selected-swatch .cfvsw-swatch-inner,
.cfvsw-swatches-option.cfvsw-selected-label .cfvsw-swatch-inner {
	font-weight: 700 !important;
}

/* Cores pintadas pelo Panel + selecionadas: anel permanece visível em branco/preto */
.cfvsw-swatches-option.panel-cfvsw-colored.cfvsw-selected-swatch,
.cfvsw-swatches-option.panel-cfvsw-colored.cfvsw-selected-label {
	box-shadow:
		0 0 0 2px #ffffff,
		0 0 0 4px #1a1a1a,
		0 1px 4px rgba(0, 0, 0, 0.25) !important;
}
