/**
 * Sevilla Privé — página de produto
 * Referência visual: Newcop — no desktop, fotos em grelha de 2 colunas à esquerda e resumo fixo
 * à direita (marca, nome, preço, tallas em caixas, botão preto a toda a largura, garantias);
 * no telemóvel, fotos deslizáveis a toda a largura.
 */

.fsp-product {
	padding-top: 14px;
}

@media (min-width: 1024px) {
	.fsp-product {
		padding-top: 40px;
	}
}

.fsp-product__breadcrumb {
	margin-bottom: 14px;
}

@media (min-width: 1024px) {
	.fsp-product__breadcrumb {
		margin-bottom: 14px;
	}
}

.fsp-product__top {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

@media (min-width: 1024px) {
	.fsp-product__top {
		grid-template-columns: minmax(0, 62fr) minmax(0, 33fr);
		gap: 5%;
		align-items: start;
	}
}

/* ---------------------------------------------------------------------------
 * Galeria
 * ------------------------------------------------------------------------- */

.fsp-gallery-viewer {
	min-width: 0;
}

@media (max-width: 1023px) {
	.fsp-gallery-viewer {
		margin-inline: calc(var(--fsp-gutter) * -1);
	}
}

.fsp-gallery-viewer__main {
	position: relative;
}

.fsp-gallery-viewer__track {
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.fsp-gallery-viewer__track::-webkit-scrollbar {
	display: none;
}

.fsp-gallery-viewer__slide {
	flex: 0 0 100%;
	aspect-ratio: 1 / 1;
	background: var(--fsp-color-soft);
	scroll-snap-align: start;
	cursor: zoom-in;
}

/* Desktop: todas as fotos numa grelha de 2 colunas (sem deslizar). */
@media (min-width: 1024px) {
	.fsp-gallery-viewer__track {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2px;
		overflow: visible;
		scroll-snap-type: none;
	}

	.fsp-gallery-viewer__slide:only-child {
		grid-column: 1 / -1;
		aspect-ratio: 4 / 3;
	}
}

.fsp-gallery-viewer:not([data-zoom]) .fsp-gallery-viewer__slide {
	cursor: default;
}

.fsp-site .fsp-gallery-viewer__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Uma só foto (a toda a largura da coluna) ou opção "foto inteira": sem cortes. */
.fsp-site .fsp-gallery-viewer__slide:only-child img,
.fsp-cards-contain .fsp-site .fsp-gallery-viewer__slide img {
	object-fit: contain;
	mix-blend-mode: multiply;
}

.fsp-gallery-viewer__zoom {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.9);
	color: #000;
	cursor: pointer;
}

.fsp-gallery-viewer__zoom .fsp-icon {
	width: 18px;
	height: 18px;
}

@media (min-width: 1024px) {
	.fsp-gallery-viewer__zoom {
		display: none;
	}
}

.fsp-gallery-viewer__dots {
	position: absolute;
	left: 50%;
	bottom: 14px;
	display: flex;
	gap: 6px;
	transform: translateX(-50%);
}

.fsp-gallery-viewer__dot {
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.22);
	transition: background-color var(--fsp-duration);
}

.fsp-gallery-viewer__dot.is-active {
	background: #000;
}

@media (min-width: 1024px) {
	.fsp-gallery-viewer__dots {
		display: none;
	}
}

.fsp-gallery-viewer__thumbs {
	display: none;
}

/* Visualizador em ecrã inteiro. */
.fsp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.98);
}

.fsp-lightbox[hidden] {
	display: none;
}

.fsp-lightbox__img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
}

.fsp-lightbox__btn {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.06);
	color: #000;
	cursor: pointer;
}

.fsp-lightbox__btn .fsp-icon {
	width: 22px;
	height: 22px;
}

.fsp-lightbox__close {
	top: 16px;
	right: 16px;
}

.fsp-lightbox__prev {
	left: 16px;
}

.fsp-lightbox__next {
	right: 16px;
}

/* ---------------------------------------------------------------------------
 * Resumo
 * ------------------------------------------------------------------------- */

.fsp-product__summary {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-width: 0;
}

@media (min-width: 1024px) {
	.fsp-product__summary {
		position: sticky;
		top: calc(var(--fsp-admin-bar) + var(--fsp-header-total) + 16px);
		padding-top: 6px;
	}
}

.fsp-product__head {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-right: 44px;
}

.fsp-product__head .fsp-product__wishlist {
	position: absolute;
	top: -6px;
	right: -6px;
}

.fsp-product__brand {
	color: var(--fsp-color-text);
	font-size: 14px;
	letter-spacing: -0.01em;
}

.fsp-product__brand a:hover {
	text-decoration: underline;
}

.fsp-product__title {
	font-family: var(--fsp-font-body);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.03em;
}

.fsp-product__wishlist {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
}

.fsp-product__rating {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--fsp-color-muted);
	font-size: 13px;
}

.fsp-product__price {
	font-size: 14px;
	font-weight: 700;
	padding-bottom: 12px;
}

@media (min-width: 1024px) {
	.fsp-product__price {
		padding-bottom: 28px;
	}
}

.fsp-product__price del {
	font-weight: 400;
}

.fsp-product__tax {
	margin-top: -20px;
	color: var(--fsp-color-muted);
	font-size: 12px;
}

.fsp-product__excerpt {
	font-size: 14px;
	line-height: 1.55;
}

/* Formulário de compra (nativo do WooCommerce). */
.fsp-product__cart form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 6px;
	margin: 0;
}

.fsp-product__cart form.variations_form {
	display: block;
}

.fsp-product__cart .quantity {
	flex-shrink: 0;
}

.fsp-product__cart .single_add_to_cart_button,
.fsp-product__cart button.button.alt {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-width: 200px;
	min-height: 54px;
	padding: 12px 24px;
	border: 1px solid var(--fsp-color-button);
	border-radius: var(--fsp-radius);
	background: var(--fsp-color-button);
	color: var(--fsp-color-button-text);
	font-family: var(--fsp-font-accent);
	font-size: 18px;
	font-weight: 500;
	letter-spacing: -0.03em;
	cursor: pointer;
	transition: opacity var(--fsp-duration) var(--fsp-ease), background-color var(--fsp-duration) var(--fsp-ease), color var(--fsp-duration) var(--fsp-ease);
}

/* "Comprar ahora": linha inteira, contorno, por baixo do "Añadir al carrito". */
.fsp-product__cart button.fsp-buy-now {
	flex: 1 0 100%;
	background: transparent;
	color: var(--fsp-color-button);
}

.fsp-product__cart button.fsp-buy-now:hover {
	opacity: 1;
	background: var(--fsp-color-button);
	color: var(--fsp-color-button-text);
}

.fsp-product__cart button.fsp-buy-now.is-loading::after {
	border-color: var(--fsp-color-button);
	border-right-color: transparent;
}

.fsp-product__cart .single_add_to_cart_button:hover {
	opacity: 0.85;
}

.fsp-product__cart .single_add_to_cart_button.disabled,
.fsp-product__cart .single_add_to_cart_button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.fsp-product__cart .stock {
	width: 100%;
	margin: 0;
	font-size: 13px;
}

.fsp-product__cart .stock.out-of-stock {
	color: var(--fsp-color-sale);
}

.fsp-product__cart .stock.in-stock {
	color: #1e7a34;
}

/* Variações: tallas em caixas, numa grelha (como na referência). */
.fsp-product__cart table.variations {
	width: 100%;
	margin-bottom: 14px;
	border: 0;
	border-collapse: collapse;
}

.fsp-product__cart table.variations tr {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 14px;
}

.fsp-product__cart table.variations th,
.fsp-product__cart table.variations td {
	padding: 0;
	border: 0;
	text-align: left;
}

.fsp-product__cart table.variations th label {
	font-size: 14px;
	font-weight: 400;
}

.fsp-product__cart table.variations .fsp-selected-value {
	margin-left: 0;
	font-weight: 600;
}

.fsp-product__cart .reset_variations {
	display: inline-block;
	margin-top: 8px;
	color: var(--fsp-color-muted);
	font-size: 12px;
	text-decoration: underline;
}

.fsp-product__cart .fsp-variation-select select {
	width: 100%;
	height: 46px;
	padding: 0 12px;
	border: 1px solid #d6d6d6;
	border-radius: 0;
	background: var(--fsp-color-bg);
	font: inherit;
}

/* Com os botões ativos, o <select> nativo fica oculto (continua a ser usado pelo WooCommerce). */
.fsp-product__cart .fsp-swatches ~ .reset_variations,
.fsp-has-swatches .fsp-variation-select {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.fsp-has-swatches .reset_variations {
	position: static !important;
	width: auto;
	height: auto;
	clip: auto;
}

.fsp-swatches {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
	gap: 3px;
}

@media (min-width: 1024px) {
	.fsp-swatches {
		grid-template-columns: repeat(7, minmax(0, 1fr));
	}
}

.fsp-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	height: 44px;
	padding: 0 6px;
	border: 1px solid #000;
	border-radius: 0;
	background: var(--fsp-color-bg);
	color: var(--fsp-color-text);
	font-family: var(--fsp-font-body);
	font-size: 14px;
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: background-color var(--fsp-duration) var(--fsp-ease), color var(--fsp-duration) var(--fsp-ease);
}

.fsp-swatch:hover {
	background: var(--fsp-color-soft);
}

.fsp-swatch[aria-checked="true"] {
	border-color: var(--fsp-color-text);
	background: var(--fsp-color-text);
	color: var(--fsp-color-bg);
}

.fsp-swatch.is-unavailable {
	border-color: #d6d6d6;
	color: #b5b5b5;
	background: linear-gradient(to top left, transparent calc(50% - 0.5px), #d6d6d6 50%, transparent calc(50% + 0.5px));
}

.fsp-product__cart .woocommerce-variation {
	margin-bottom: 10px;
}

.fsp-product__cart .woocommerce-variation-price .price {
	font-size: 14px;
	font-weight: 700;
}

.fsp-product__cart .woocommerce-variation-add-to-cart {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.fsp-product__cart label.fsp-qty-label {
	width: 100%;
	font-size: 14px;
}

/* Ações (pergunta / partilhar) e garantias. */
.fsp-product__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.fsp-product__action {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.fsp-product__action .fsp-icon {
	width: 18px;
	height: 18px;
}

.fsp-product__action:hover {
	opacity: 0.65;
}

.fsp-product__info {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 12px 0 0;
	padding: 0;
	font-size: 14px;
	letter-spacing: -0.01em;
	list-style: none;
}

.fsp-product__info li {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.fsp-product__info .fsp-icon {
	width: 20px;
	height: 20px;
	stroke-width: 1.3;
}

.fsp-product__info strong {
	font-weight: 400;
}

/* ---------------------------------------------------------------------------
 * Descrição / informação adicional / avaliações
 * ------------------------------------------------------------------------- */

.fsp-tabs {
	max-width: 700px;
	margin: 40px 0 0;
	padding-bottom: 32px;
}

@media (min-width: 1024px) {
	.fsp-tabs {
		margin-top: 64px;
	}
}

.fsp-tabs__list {
	display: flex;
	gap: 24px;
	overflow-x: auto;
	scrollbar-width: none;
}

.fsp-tabs__tab {
	flex-shrink: 0;
	padding: 0 0 6px;
	border: 0;
	border-bottom: 1px solid transparent;
	background: none;
	color: var(--fsp-color-muted);
	font: inherit;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.02em;
	cursor: pointer;
}

.fsp-tabs__tab.is-active {
	border-bottom-color: var(--fsp-color-text);
	color: var(--fsp-color-text);
}

.fsp-tabs__list:has(.fsp-tabs__tab:only-child) .fsp-tabs__tab {
	border-bottom-color: transparent;
}

.fsp-tabs__panel {
	max-width: none;
	margin: 0;
	padding-top: 18px;
	color: var(--fsp-color-text);
	font-size: 14px;
	line-height: 1.5;
	letter-spacing: -0.01em;
}

.fsp-tabs__panel table.woocommerce-product-attributes {
	width: 100%;
	border-collapse: collapse;
}

.fsp-tabs__panel table.woocommerce-product-attributes th,
.fsp-tabs__panel table.woocommerce-product-attributes td {
	padding: 10px 0;
	border-bottom: 1px solid var(--fsp-color-border);
	text-align: left;
	vertical-align: top;
}

.fsp-tabs__panel table.woocommerce-product-attributes th {
	width: 30%;
	font-weight: 600;
}

.fsp-tabs__panel table.woocommerce-product-attributes p {
	margin: 0;
}
