/* Pixel Conjuntos — frontend */

.pixel-conjunto {
	border: 1px solid #ececec;
	border-radius: 10px;
	padding: 20px;
	margin: 20px 0;
	background: #fff;
}

.pixel-conjunto-title {
	margin: 0 0 16px;
	font-size: 1.25rem;
}

.pixel-conjunto-parts {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.pixel-conjunto-part {
	flex: 1 1 200px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

.pixel-part-thumb img {
	width: 100%;
	height: auto;
	border-radius: 8px;
	display: block;
}

.pixel-part-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.pixel-part-role {
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #888;
}

.pixel-part-name {
	font-weight: 600;
	line-height: 1.3;
}

.pixel-part-price {
	color: #444;
	font-size: 0.95rem;
}

.pixel-part-variation {
	margin-top: 4px;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	width: 100%;
	max-width: 100%;
}

.pixel-conjunto-discount-note {
	margin: 16px 0 0;
	padding: 8px 12px;
	background: #f6f7e8;
	border-radius: 6px;
	font-size: 0.9rem;
}

.pixel-conjunto-footer {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #ececec;
}

.pixel-conjunto-total {
	font-size: 1.05rem;
}

.pixel-conjunto-total-label {
	color: #777;
	margin-right: 6px;
}

.pixel-conjunto-total-value {
	font-weight: 700;
}

.pixel-conjunto-add-btn {
	cursor: pointer;
	width: 100%;
	text-align: center;
	justify-content: center;
}

.pixel-conjunto-add-btn[disabled] {
	opacity: 0.6;
	cursor: default;
}

.pixel-conjunto-message {
	margin-top: 12px;
	font-size: 0.9rem;
	min-height: 1.2em;
}

.pixel-conjunto-message[data-kind='error'] {
	color: #b32d2e;
}

.pixel-conjunto-message[data-kind='success'] {
	color: #1a7f37;
}

@media ( max-width: 600px ) {
	.pixel-conjunto-parts {
		flex-direction: column;
	}
}

/* ===== Layout horizontal ===== */
.pixel-conjunto.pixel-layout-horizontal .pixel-conjunto-parts {
	flex-direction: column;
	gap: 12px;
}

.pixel-conjunto.pixel-layout-horizontal .pixel-conjunto-part {
	flex: 1 1 100%;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	border: 1px solid #f0f0f0;
	border-radius: 8px;
	padding: 10px;
}

.pixel-conjunto.pixel-layout-horizontal .pixel-part-thumb {
	flex: 0 0 88px;
	width: 88px;
}

.pixel-conjunto.pixel-layout-horizontal .pixel-part-info {
	flex: 1 1 auto;
}

@media ( max-width: 600px ) {
	.pixel-conjunto.pixel-layout-horizontal .pixel-conjunto-part {
		align-items: flex-start;
	}
}

/* ===== Seletor: botões/swatches ===== */
.pixel-part-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 6px;
}

/* Modo "buttons" — estilo próprio do plugin */
.pixel-selector-buttons .pixel-swatch {
	border: 1px solid #ccc;
	background: #fff;
	color: #222;
	padding: 7px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.85rem;
	line-height: 1;
	min-width: 38px;
	transition: all 0.15s ease;
}

.pixel-selector-buttons .pixel-swatch:hover {
	border-color: #888;
}

.pixel-selector-buttons .pixel-swatch.is-active {
	border-color: #111;
	background: #111;
	color: #fff;
}

.pixel-selector-buttons .pixel-swatch.is-color {
	width: 30px;
	height: 30px;
	min-width: 0;
	padding: 0;
	border-radius: 50%;
	overflow: hidden;
}

.pixel-selector-buttons .pixel-swatch.is-color .pixel-swatch-label {
	position: absolute;
	left: -9999px;
}

.pixel-selector-buttons .pixel-swatch.is-color.is-active {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
}

/* Modo "flatsome" — o tema estiliza .ux-swatch; só garantimos o layout e um
   destaque de fallback caso o tema não marque o selecionado. */
.pixel-selector-flatsome .pixel-swatch.is-color .pixel-swatch-label {
	position: absolute;
	left: -9999px;
}

.pixel-selector-flatsome .pixel-swatch.is-active {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

/* ===== Esgotados (cortados, não-clicáveis) ===== */
.pixel-swatch {
	position: relative;
}

.pixel-swatch.is-oos {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
	color: #999;
}

/* Linha diagonal por cima do botão/chip */
.pixel-swatch.is-oos::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		to top right,
		transparent calc(50% - 1px),
		#b32d2e calc(50% - 1px),
		#b32d2e calc(50% + 1px),
		transparent calc(50% + 1px)
	);
	pointer-events: none;
}

.pixel-swatch.is-oos .pixel-swatch-label {
	text-decoration: line-through;
}

/* Esgotado no dropdown */
.pixel-part-variation option:disabled {
	color: #aaa;
	text-decoration: line-through;
}
