/* Zyntra - Monte seu PC */
.zpb {
	--zpb-purple: #4E048E;
	--zpb-purple2: #7C62FF;
	--zpb-bg: #ffffff;
	--zpb-panel: #f6f5fb;
	--zpb-border: #e4e0ef;
	--zpb-text: #1e1b2e;
	--zpb-muted: #6b6880;
	--zpb-radius: 12px;
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 24px;
	align-items: start;
	max-width: 1200px;
	margin: 0 auto;
	color: var(--zpb-text);
	font-family: inherit;
}
.zpb * { box-sizing: border-box; }

.zpb-title { margin: 0 0 4px; font-size: 26px; font-weight: 800; }
.zpb-sub { margin: 0 0 20px; color: var(--zpb-muted); font-size: 14px; }

/* Slots */
.zpb-slots { display: flex; flex-direction: column; gap: 12px; }
.zpb-slot {
	background: var(--zpb-bg);
	border: 1px solid var(--zpb-border);
	border-radius: var(--zpb-radius);
	overflow: hidden;
	transition: border-color .2s, box-shadow .2s;
}
.zpb-slot.is-filled { border-color: var(--zpb-purple2); box-shadow: 0 2px 12px rgba(124,98,255,.12); }
.zpb-slot-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.zpb-slot-icon {
	width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px;
	background: linear-gradient(135deg, var(--zpb-purple), var(--zpb-purple2));
	display: inline-flex; align-items: center; justify-content: center;
	position: relative;
}
.zpb-slot-icon::before {
	content: ""; width: 20px; height: 20px;
	background: #fff; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
	-webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain;
	/* ícone genérico (chip) */
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M9 3v2H7a2 2 0 0 0-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2h2V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9m-2 4h10v10H7V7m2 2v6h6V9H9Z'/%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 fill='black' d='M9 3v2H7a2 2 0 0 0-2 2v2H3v2h2v2H3v2h2v2a2 2 0 0 0 2 2h2v2h2v-2h2v2h2v-2h2a2 2 0 0 0 2-2v-2h2v-2h-2v-2h2V9h-2V7a2 2 0 0 0-2-2h-2V3h-2v2h-2V3H9m-2 4h10v10H7V7m2 2v6h6V9H9Z'/%3E%3C/svg%3E");
}
.zpb-slot-label { flex: 1; font-weight: 700; font-size: 15px; }
.zpb-slot-label em { color: var(--zpb-purple2); font-style: normal; }
.zpb-open {
	background: var(--zpb-purple); color: #fff; border: 0; cursor: pointer;
	padding: 9px 18px; border-radius: 8px; font-weight: 700; font-size: 13px;
	transition: background .2s;
}
.zpb-open:hover { background: var(--zpb-purple2); }

/* Itens selecionados dentro do slot */
.zpb-slot-items:empty { display: none; }
.zpb-slot-items { border-top: 1px solid var(--zpb-border); }
.zpb-line { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--zpb-border); }
.zpb-line:last-child { border-bottom: 0; }
.zpb-line img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background:#fff; }
.zpb-line-name { flex: 1; font-size: 13px; line-height: 1.3; }
.zpb-line-price { font-weight: 700; font-size: 14px; white-space: nowrap; }
.zpb-line-remove { background: none; border: 0; color: #c0392b; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px; }

/* Resumo */
.zpb-summary {
	position: sticky; top: 20px;
	background: var(--zpb-panel); border: 1px solid var(--zpb-border);
	border-radius: var(--zpb-radius); padding: 18px;
}
.zpb-summary h3 { margin: 0 0 12px; font-size: 16px; }
.zpb-summary-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--zpb-muted); }
.zpb-summary-list .zpb-srow { display: flex; justify-content: space-between; gap: 8px; }
.zpb-summary-list .zpb-srow span:first-child { color: var(--zpb-text); }
.zpb-total-row { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 2px solid var(--zpb-border); }
.zpb-total { font-size: 22px; color: var(--zpb-purple); }
.zpb-checkout {
	width: 100%; margin-top: 14px; padding: 14px; border: 0; border-radius: 10px;
	background: linear-gradient(135deg, var(--zpb-purple), var(--zpb-purple2)); color: #fff;
	font-weight: 800; font-size: 15px; cursor: pointer; transition: opacity .2s, transform .1s;
}
.zpb-checkout:hover:not(:disabled) { transform: translateY(-1px); }
.zpb-checkout:disabled { opacity: .45; cursor: not-allowed; }
.zpb-note { margin: 10px 0 0; font-size: 11px; color: var(--zpb-muted); }

/* Modal */
.zpb-modal { position: fixed; inset: 0; background: rgba(20,15,40,.6); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
.zpb-modal[hidden] { display: none; }
.zpb-modal-box { background: #fff; width: 100%; max-width: 760px; max-height: 88vh; border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.zpb-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: linear-gradient(135deg, var(--zpb-purple), var(--zpb-purple2)); color: #fff; }
.zpb-modal-head h3 { margin: 0; font-size: 18px; }
.zpb-modal-close { background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.zpb-search { display: block; box-sizing: border-box; width: calc(100% - 40px) !important; max-width: calc(100% - 40px); margin: 14px auto 4px; padding: 10px 14px; border: 1px solid var(--zpb-border); border-radius: 8px; font-size: 14px; }
.zpb-modal-body { padding: 14px 20px 20px; overflow-y: auto; }
.zpb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.zpb-card { border: 1px solid var(--zpb-border); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.zpb-card img { width: 100%; height: 120px; object-fit: contain; background: #fff; }
.zpb-card-name { font-size: 13px; font-weight: 600; line-height: 1.3; min-height: 34px; }
.zpb-card-price { font-weight: 800; color: var(--zpb-purple); font-size: 15px; }
.zpb-card-price del { color: var(--zpb-muted); font-weight: 400; font-size: 12px; }
.zpb-add { margin-top: auto; background: var(--zpb-purple); color: #fff; border: 0; border-radius: 8px; padding: 9px; font-weight: 700; cursor: pointer; }
.zpb-add:hover { background: var(--zpb-purple2); }
.zpb-add:disabled { background: #bbb; cursor: not-allowed; }
.zpb-oos { font-size: 12px; color: #c0392b; font-weight: 700; text-align: center; }
.zpb-loading, .zpb-empty { text-align: center; color: var(--zpb-muted); padding: 30px; }

@media (max-width: 900px) {
	.zpb { grid-template-columns: 1fr; }
	.zpb-summary { position: static; order: 2; }
}
