.pb-poke-wrapper {
	margin: 1.5em 0;
	font-size: 0.95em;
	box-sizing: border-box;
	max-width: 100%;
}

.pb-poke-wrapper * {
	box-sizing: border-box;
}

@media (max-width: 600px) {
	.pb-poke-wrapper {
		padding: 0 16px;
	}

	.pb-group-items {
		gap: 0.4em;
	}

	.pb-item {
		font-size: 0.85em;
		padding: 0.4em 0.75em;
	}
}

.pb-group {
	margin-bottom: 1.25em;
}

.pb-group-header {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5em;
	margin-bottom: 0.5em;
}

.pb-group-name {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	font-size: 0.9em;
	padding: 0.25em 0.9em;
	border-radius: 999px;
	background: var(--pb-accent, #2f9e8f);
	color: #fff;
}

.pb-group-hint {
	opacity: 0.75;
	font-size: 0.85em;
}

.pb-group-items {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.pb-item {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.45em 0.9em;
	border: 1.5px solid var(--pb-accent, #2f9e8f);
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.9em;
	user-select: none;
	transition: background-color 0.15s ease, color 0.15s ease;
	color: inherit;
}

.pb-item input {
	margin: 0;
}

.pb-item:has(input:checked),
.pb-item.is-checked {
	background: var(--pb-accent, #2f9e8f);
	color: #fff;
}

.pb-item input:disabled {
	cursor: not-allowed;
}

.pb-item:has(input:disabled):not(:has(input:checked)) {
	opacity: 0.4;
}

.pb-item-block {
	display: inline-flex;
	flex-direction: column;
	gap: 0.3em;
	max-width: 100%;
}

.pb-item-qty {
	justify-content: space-between;
	gap: 0.6em;
	flex: 0 1 auto;
}

.pb-item-qty.is-checked {
	background: var(--pb-accent, #2f9e8f);
	color: #fff;
}

.pb-item-label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pb-qty-controls {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	flex: 0 0 auto;
}

.pb-qty-btn {
	width: 1.5em;
	height: 1.5em;
	min-width: 1.5em;
	flex: 0 0 auto;
	line-height: 1;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.12);
	color: inherit;
	cursor: pointer;
	font-size: 1em;
	padding: 0;
}

.pb-item-qty.is-checked .pb-qty-btn {
	background: rgba(255, 255, 255, 0.25);
}

.pb-qty-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* !important porque muchos temas traen un reset global tipo
   "input[type=number]{width:100%}" que si no, gana por especificidad
   y hace que el contador ocupe todo el ancho disponible. */
.pb-poke-wrapper .pb-qty-input {
	width: 1.8em !important;
	max-width: 1.8em !important;
	flex: 0 0 auto !important;
	text-align: center;
	border: none;
	background: transparent;
	color: inherit;
	font-size: 1em;
	padding: 0 !important;
	-moz-appearance: textfield;
}

.pb-qty-input::-webkit-outer-spin-button,
.pb-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.pb-item-style {
	border: 1.5px solid var(--pb-accent, #2f9e8f);
	border-radius: 999px;
	padding: 0.3em 0.7em;
	font-size: 0.8em;
	background: transparent;
	color: inherit;
}

.pb-item-style:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.pb-group-invalid .pb-group-name {
	background: #c0392b;
}

.pb-group-error {
	color: #c0392b;
	font-size: 0.85em;
	font-weight: 600;
	margin: -0.25em 0 0.6em;
}

.pb-price-summary {
	margin-top: 1em;
	font-weight: 700;
	font-size: 1.05em;
}

.pb-total-amount {
	color: var(--pb-accent, #2f9e8f);
}

/*
 * El botón "Añadir al carrito" y el selector de cantidad quedan después de
 * nuestro bloque en el HTML, pero algunos temas (BeTheme) los flotan (float:
 * left) sin limpiar el flotante, y terminan visualmente "flotando" en medio
 * de la página en vez de quedar debajo del total. Se fuerza que queden en
 * flujo normal, en una fila prolija, justo debajo del precio con extras.
 * Este CSS solo se carga en páginas de producto con Poke Builder activo,
 * así que no afecta a ningún otro producto de la tienda.
 */
.woocommerce-variation-add-to-cart,
form.cart .quantity,
form.cart .single_add_to_cart_button {
	float: none !important;
	clear: both;
}

.woocommerce-variation-add-to-cart {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.75em;
	margin-top: 1em;
}
