/* Adicionar tamanho direto das listagens (inc/quickadd.php) */

.product-small .box-text {
	position: relative;
}

/* ---------- Botão do saco com + (canto inferior direito da foto) ---------- */
.product-small .giaw-qa__btn {
	position: absolute;
	right: 8px;
	bottom: calc(100% + 8px);
	z-index: 19;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50% !important;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
	color: #111;
	cursor: pointer;
	line-height: 1;
	min-height: 0;
}
.product-small .giaw-qa__btn:hover,
.product-small .giaw-qa.is-open .giaw-qa__btn {
	background: #111;
	color: #fff;
}
.product-small .giaw-qa__btn:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* ---------- Painel de tamanhos (sobre a foto, na largura do cartão) ---------- */
.product-small .giaw-qa__panel {
	position: absolute;
	right: 8px;
	bottom: calc(100% + 52px);
	left: 8px;
	z-index: 19;
	display: none;
	box-sizing: border-box;
	padding: 12px;
	border-radius: var(--giaw-r-card, 5px);
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 6px 24px rgba(0, 0, 0, .16);
}
/* Ponte para o rato não "largar" o painel ao passar do botão para ele */
.product-small .giaw-qa__panel::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 52px;
}
.product-small .giaw-qa.is-open .giaw-qa__panel,
.product-small .giaw-qa:focus-within .giaw-qa__panel {
	display: block;
}
@media (hover: hover) {
	.product-small .giaw-qa:hover .giaw-qa__panel {
		display: block;
	}
}
.product-small .giaw-qa__title {
	display: block;
	margin: 0 0 8px;
	color: #111;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.product-small .giaw-qa__sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.product-small .giaw-qa__size {
	box-sizing: border-box;
	min-width: 40px;
	height: 34px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid #cfcfcf;
	border-radius: var(--giaw-r-btn, 5px) !important;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	min-height: 0;
}
.product-small .giaw-qa__size:hover:not(:disabled) {
	border-color: #111;
	background: #111;
	color: #fff;
}
.product-small .giaw-qa__size.is-out {
	border-color: #e0e0e0;
	background-color: #f5f5f5;
	background-image: linear-gradient(to top left, transparent calc(50% - .031rem), #8a8a8a, transparent calc(50% + .031rem));
	color: #8a8a8a;
	cursor: not-allowed;
}
.product-small .giaw-qa__size.is-busy {
	opacity: .5;
	cursor: progress;
}
.product-small .giaw-qa__size.is-added {
	border-color: #111;
	background: #111;
	color: #fff;
}
.product-small .giaw-qa__size.is-added::after {
	content: " \2713";
}
.product-small .giaw-qa__msg {
	display: block;
	margin: 8px 0 0;
	color: #111;
	font-size: 11px;
	font-weight: 600;
}
.product-small .giaw-qa__msg:empty {
	display: none;
}
.product-small .giaw-qa__msg.is-error {
	color: #c8101a;
}

/* =====================================================================
   Mais discreto: botão pequeno, só aparece quando o cartão tem o rato por cima (desktop);
   em ecrãs de toque fica sempre visível mas suave. Painel e ponte ajustados ao novo tamanho.
   ===================================================================== */
.product-small .giaw-qa__btn {
	width: 30px;
	height: 30px;
	background: rgba(255, 255, 255, .92);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
	opacity: 0;
	transition: opacity .15s ease, background-color .15s ease, color .15s ease;
}
.product-small .giaw-qa__btn svg {
	width: 16px;
	height: 16px;
}
.product-small:hover .giaw-qa__btn,
.product-small .giaw-qa.is-open .giaw-qa__btn,
.product-small .giaw-qa:focus-within .giaw-qa__btn,
.product-small .giaw-qa:hover .giaw-qa__btn {
	opacity: 1;
}
@media (hover: none) {
	.product-small .giaw-qa__btn {
		opacity: .9;
	}
}
.product-small .giaw-qa__panel {
	bottom: calc(100% + 46px);
}
.product-small .giaw-qa__panel::after {
	height: 46px;
}
