/* Página de produto - fase A (ver inc/pdp.php). Tudo com escopo em body.single-product. */

/* ---------- Preço: um só bloco ---------- */
body.single-product .product-info .price-wrapper .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin: 0;
}
body.single-product .product-info .price-wrapper .price,
body.single-product .product-info .price-wrapper .price * {
	font-family: inherit;
}
body.single-product .product-info .price-wrapper .price ins {
	order: 1;
	background: none;
	text-decoration: none;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.1;
}
body.single-product .product-info .price-wrapper .price del {
	order: 2;
	color: #6b6b6b;
	font-size: 16px;
	font-weight: 500;
	opacity: 1;
}
/* "Poupa X €" (snippet POUPA X): discreto, em vez de outra linha vermelha grande */
body.single-product .giw-saving-msg,
body.single-product .giw-saving-msg * {
	color: #111 !important;
	font-family: inherit;
}
body.single-product .giw-saving-msg {
	margin: 6px 0 14px;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
}

/* ---------- Tamanhos ---------- */
body.single-product .ux-swatches .ux-swatch--label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	min-height: 48px;
	margin: 0 8px 8px 0;
	padding: 0 14px;
	border: 1px solid #cfcfcf;
	border-radius: var(--giaw-r-btn, 5px);
	background-color: #fff;
	box-shadow: none;
	color: #111;
	font-size: 13px;
	font-weight: 600;
}
body.single-product .ux-swatches .ux-swatch--label:hover:not(.selected):not(.disabled) {
	border-color: #111;
	box-shadow: none;
}
body.single-product .ux-swatches .ux-swatch--label.selected,
body.single-product .ux-swatches .ux-swatch--label[aria-checked="true"] {
	border-color: #111;
	background-color: #111;
	box-shadow: none;
	color: #fff;
}
/* Sem stock: a diagonal do Flatsome mantém-se, o resto fica mais claro */
body.single-product .ux-swatches .ux-swatch--label.disabled {
	border-color: #e0e0e0;
	background-color: #f5f5f5;
	color: #8a8a8a;
	opacity: 1;
}
body.single-product .ux-swatches .ux-swatch--label:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}
body.single-product .reset_variations {
	font-size: 12px;
}
/* "Só 2 em stock" */
body.single-product .woocommerce-variation .stock {
	margin: 4px 0 14px;
	font-size: 12px;
	font-weight: 600;
	color: #555;
}
body.single-product .woocommerce-variation .stock.out-of-stock {
	color: #c8101a;
}

/* ---------- Quantidade + botão principal ---------- */
body.single-product .woocommerce-variation-add-to-cart,
body.single-product form.cart:not(.variations_form) {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 10px;
}
body.single-product .ux-quantity.quantity {
	display: inline-flex;
	align-items: stretch;
	flex: none;
	height: 48px;
	margin: 0;
}
body.single-product .ux-quantity .ux-quantity__button {
	box-sizing: border-box;
	width: 44px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #cfcfcf;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-size: 16px;
	line-height: 1;
}
body.single-product .ux-quantity input.qty {
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	min-height: 0;
	margin: 0 -1px;
	padding: 0;
	border: 1px solid #cfcfcf;
	background: #fff;
	box-shadow: none;
	color: #111;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}
body.single-product .ux-quantity input.qty::-webkit-inner-spin-button,
body.single-product .ux-quantity input.qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
body.single-product .single_add_to_cart_button {
	flex: 1 1 180px;
	height: 48px;
	min-height: 0;
	margin: 0;
	padding: 0 24px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .06em;
	text-transform: uppercase;
}
/* Sem tamanho escolhido: botão claramente inativo + dica */
body.single-product .single_add_to_cart_button.disabled,
body.single-product .single_add_to_cart_button:disabled {
	background: #9a9a9a !important;
	opacity: 1;
	cursor: not-allowed;
}
body.single-product .woocommerce-variation-add-to-cart-disabled::after {
	content: "Escolhe um tamanho para continuar.";
	flex: 1 0 100%;
	font-size: 12px;
	color: #555;
}

/* ---------- Apoio ao cliente: três botões iguais ---------- */
a.button.apoio-ao-cliente {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 44px;
	min-height: 0;
	margin: 0;
	padding: 0 22px;
	border: 1.5px solid #111 !important;
	background: #fff !important;
	background-image: none !important;
	box-shadow: none !important;
	color: #111 !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .06em;
	text-shadow: none;
	text-transform: uppercase;
}
a.button.apoio-ao-cliente::before,
a.button.apoio-ao-cliente::after {
	display: none;
}
a.button.apoio-ao-cliente:hover {
	background: #111 !important;
	color: #fff !important;
}
a.button.apoio-ao-cliente i {
	margin: 0;
	font-size: 1.2em;
}

/* ---------- Barra "Adicionar" colada ao fundo (Flatsome) só em telemóvel ---------- */
@media (min-width: 850px) {
	body.single-product .sticky-add-to-cart-wrapper,
	body.single-product .sticky-add-to-cart {
		display: none !important;
	}
}

/* ---------- Preço, preço antigo e poupança na mesma linha ---------- */
body.single-product .product-info .price-wrapper {
	display: inline-block;
	margin: 0 12px 14px 0;
	vertical-align: baseline;
}
body.single-product .product-info .giw-saving-msg {
	display: inline-block;
	margin: 0 0 14px;
	vertical-align: baseline;
}
/* O € do tema vem pequeno e levantado: aqui acompanha o número */
body.single-product .product-info .price-wrapper .woocommerce-Price-currencySymbol,
body.single-product .product-info .giw-saving-msg .woocommerce-Price-currencySymbol {
	font-size: inherit;
	font-weight: inherit;
	vertical-align: baseline;
}
/* Preço antigo: riscado fino, sem negrito */
body.single-product .product-info .price-wrapper .price del,
body.single-product .product-info .price-wrapper .price del * {
	font-weight: 500;
}

/* ---------- Aviso de promoção (YITH): "2 POR 38€" ---------- */
body.single-product .ywdpd-notices-wrapper .show_note_on_apply_products {
	margin: 4px 0 18px;
	padding: 12px 14px;
	border-radius: var(--giaw-r-btn, 5px);
	background: #f7f7f7;
}
body.single-product .ywdpd-notices-wrapper .show_note_on_apply_products p {
	margin: 0;
	font-size: 13px;
	line-height: 1.5;
	color: #333;
}
body.single-product .ywdpd-notices-wrapper .show_note_on_apply_products p:first-child {
	margin-bottom: 2px;
}
body.single-product .ywdpd-notices-wrapper .show_note_on_apply_products span[style*="font-size"] {
	font-size: 20px !important;
	font-weight: 800;
	letter-spacing: .01em;
	color: #111;
}

/* ---------- Outras cores do produto (miniaturas antes dos tamanhos) ---------- */
body.single-product .product_page_by_atributes_select_item,
body.single-product .product_page_by_atributes_select_item_fix {
	display: inline-block;
	box-sizing: border-box;
	width: 64px;
	aspect-ratio: 4 / 5;
	margin: 0 8px 12px 0;
	border: 1px solid #cfcfcf;
	border-radius: var(--giaw-r-btn, 5px);
	box-shadow: none;
	object-fit: cover;
	object-position: center 20%;
	vertical-align: top;
}
body.single-product .product_page_by_atributes_select_item:hover {
	border-color: #111;
}
/* A cor em que estás: contorno preto (mesma lógica do tamanho escolhido) */
body.single-product .product_page_by_atributes_select_item_fix {
	border-color: #111;
	box-shadow: 0 0 0 1px #111;
}
body.single-product a:has(> .product_page_by_atributes_select_item),
body.single-product a:has(> .product_page_by_atributes_select_item_fix) {
	display: inline-block;
	vertical-align: top;
}
body.single-product a:focus-visible > .product_page_by_atributes_select_item,
body.single-product a:focus-visible > .product_page_by_atributes_select_item_fix {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* "Completa o look": mesma linguagem das miniaturas (sem sombras pesadas) */
body.single-product .select_crosssell_item {
	box-sizing: border-box;
	aspect-ratio: 4 / 5;
	margin: 0 8px 8px 0;
	border: 1px solid #cfcfcf;
	border-radius: var(--giaw-r-btn, 5px);
	box-shadow: none;
	object-fit: cover;
	object-position: center 20%;
	vertical-align: top;
}
body.single-product .select_crosssell_item:hover {
	border-color: #111;
}
@media (max-width: 549px) {
	body.single-product .product_page_by_atributes_select_item,
	body.single-product .product_page_by_atributes_select_item_fix {
		width: 56px;
	}
}

/* ---------- Sem preço repetido por baixo dos tamanhos ---------- */
body.single-product .single_variation .woocommerce-variation-price {
	display: none;
}
body.single-product .woocommerce-variation.single_variation {
	margin: 0;
	padding: 0;
	border: 0;
}

/* ---------- Topo da coluna de informação alinhado com o topo da primeira foto ----------
   O Flatsome mete .product-info{padding-top:10px} e .product-stacked-info{padding:5vh 5% 2vh} (flatsome-shop.css) */
body.single-product .product-info.summary {
	padding-top: 0;
}
body.single-product .product-stacked-info {
	padding-top: 0;
}

/* ---------- Etiquetas da galeria (−20%, Unissexo): numa só fila, mesmo tamanho e raio, como nas listagens ---------- */
body.single-product .badge-container.is-larger {
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 6px;
	width: auto;
	margin: 12px !important;
}
body.single-product .badge-container.is-larger .badge {
	position: static;
	width: auto;
	height: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
}
body.single-product .badge-container.is-larger .badge-inner {
	position: static;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	height: 26px !important;
	min-height: 0;
	padding: 0 10px !important;
	border-radius: var(--giaw-r-btn, 5px) !important;
	font-size: 12px !important;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .04em;
	text-transform: uppercase;
	white-space: nowrap;
}
body.single-product .badge-container.is-larger .badge-inner span {
	font-size: inherit !important;
	line-height: 1;
}
body.single-product .badge-container.is-larger .badge-inner.new-bubble,
body.single-product .badge-container.is-larger .badge-inner.new-bubble-auto {
	font-weight: 600;
	letter-spacing: .06em;
}

/* Idem na galeria: .callout.badge.badge-square tem largura fixa no Flatsome */
body.single-product .badge-container.is-larger .callout.badge.badge-square,
body.single-product .badge-container.is-larger .badge.badge-square,
body.single-product .badge-container.is-larger .badge {
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	height: auto !important;
	flex: none;
}
body.single-product .badge-container.is-larger .badge .badge-inner {
	width: auto !important;
	min-width: 0 !important;
}

/* =====================================================================
   Telemóvel (até 549px): proporções da página de produto
   ===================================================================== */
@media (max-width: 549px) {
	/* Título e preço mais contidos */
	body.single-product .product-info .product-title.product_title {
		font-size: 20px !important;
		line-height: 1.25;
	}
	body.single-product .product-info .price-wrapper .price ins {
		font-size: 24px;
	}
	body.single-product .product-info .price-wrapper .price del {
		font-size: 14px;
	}
	body.single-product .product-info .price-wrapper {
		margin-right: 10px;
	}
	body.single-product .product-info .giw-saving-msg,
	body.single-product .product-info .giw-saving-msg * {
		font-size: 12px !important;
	}

	/* Os 6 tamanhos (XS...XXXL) cabem numa só fila */
	body.single-product .ux-swatches .ux-swatch--label {
		min-width: 46px;
		min-height: 44px;
		margin: 0 6px 6px 0;
		padding: 0 8px;
		font-size: 12px;
	}

	/* Botão principal numa só linha */
	body.single-product .single_add_to_cart_button {
		padding: 0 12px;
		font-size: 12px;
		letter-spacing: .04em;
		white-space: nowrap;
	}
	body.single-product .ux-quantity .ux-quantity__button {
		width: 40px;
	}
	body.single-product .ux-quantity input.qty {
		width: 44px;
	}
}

/* ---------- Barra "Adicionar" do fundo (Flatsome, só em telemóvel): botão no estilo do site ---------- */
body.single-product .sticky-add-to-cart .sticky-add-to-cart-select-options-button {
	box-sizing: border-box;
	height: 44px;
	min-height: 0;
	margin: 0 0 0 8px !important;
	padding: 0 18px;
	border-radius: var(--giaw-r-btn, 5px) !important;
	background: var(--giaw-red, #d90000) !important;
	color: #fff !important;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: .06em;
	text-transform: uppercase;
	white-space: nowrap;
}
body.single-product .sticky-add-to-cart .sticky-add-to-cart-select-options-button.is-ready {
	background: #111 !important;
}

/* Etiquetas informativas da galeria a 90% (a promoção a 100%), como nas listagens */
body.single-product .badge-container.is-larger .badge-inner.new-bubble,
body.single-product .badge-container.is-larger .badge-inner.new-bubble-auto {
	opacity: .9;
}

/* Coração da wishlist na galeria: mesmo botão da listagem (círculo branco, sem contorno, ícone centrado) */
body.single-product .product-images .image-tools .wishlist-button {
	display: grid !important;
	place-items: center;
	box-sizing: border-box;
	width: 34px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, .92) !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
	color: #111 !important;
	line-height: 1;
}
body.single-product .product-images .image-tools .wishlist-button:hover {
	background: #111 !important;
	color: #fff !important;
}
body.single-product .product-images .image-tools .wishlist-button i {
	position: static !important;
	top: auto !important;
	display: block;
	margin: 0 !important;
	font-size: 16px;
	line-height: 1 !important;
}
body.single-product .product-images .image-tools {
	margin: 6px;
	padding: 0 !important;
}

/* Telemóvel: etiquetas e coração mais pequenos na foto */
@media (max-width: 549px) {
	body.single-product .badge-container.is-larger {
		gap: 4px;
		margin: 8px !important;
	}
	body.single-product .badge-container.is-larger .badge-inner {
		height: 22px !important;
		padding: 0 8px !important;
		font-size: 11px !important;
		letter-spacing: .03em;
	}
	body.single-product .product-images .image-tools .wishlist-button {
		width: 30px;
		height: 30px;
		background: rgba(255, 255, 255, .85) !important;
		box-shadow: none;
	}
	body.single-product .product-images .image-tools .wishlist-button i {
		font-size: 15px;
	}
}

/* Telemóvel/tablet (galeria empilhada): miniaturas mais coladas à foto principal e espaço entre as miniaturas e o título */
@media (max-width: 849px) {
	html body.single-product .product-gallery .product-gallery-stacked-thumbnails {
		margin-top: -10px !important;
	}
	html body.single-product .product-info .product-stacked-info {
		padding-top: 18px !important;
	}
	html body.single-product .product-info .product-stacked-info .product-title {
		margin-top: 0 !important;
	}
}

/* Telemóvel/tablet: miniaturas da galeria mais juntas e folga de 2px entre variações (tamanhos e outras cores) */
@media (max-width: 849px) {
	html body.single-product .product-gallery .product-thumbnails.row-small {
		margin-right: -3px !important;
		margin-left: -3px !important;
	}
	html body.single-product .product-gallery .product-thumbnails.row-small .col {
		padding-right: 3px !important;
		padding-left: 3px !important;
	}
	html body.single-product .ux-swatches {
		gap: 2px !important;
	}
	html body.single-product .ux-swatches .ux-swatch--label {
		margin: 0 !important;
	}
	html body.single-product .product_page_by_atributes_select_item,
	html body.single-product .product_page_by_atributes_select_item_fix {
		margin: 0 2px 2px 0 !important;
	}
}

/* "NOVO" na galeria: mesma etiqueta das listagens (preto, texto branco, raio dos botões), com o tamanho das outras da fila */
body.single-product .badge-container.is-larger .new-badge-text {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	position: static !important;
	height: 26px;
	margin: 0 !important;
	padding: 0 10px !important;
	border: 0 !important;
	border-radius: var(--giaw-r-btn, 5px);
	background: #111 !important;
	color: #fff !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: .06em;
	line-height: 1;
	opacity: .9;
}
body.single-product .badge-container.is-larger .new-badge-text[hidden] {
	display: none;
}
@media (max-width: 549px) {
	body.single-product .badge-container.is-larger .new-badge-text {
		height: 22px;
		padding: 0 8px !important;
		font-size: 11px !important;
	}
}
