/* =========================================================
   SHOP THE LOOK
   Desktop (>=769px): horizontal product grid + right summary
   Mobile  (<=768px): compact vertical list
   ========================================================= */

.zaa-stl {
	margin: 40px 0;
	font-family: inherit;
	color: #1a1a1a;
	display: flex;
	gap: 40px;
	align-items: flex-start;
}

/* ---------- PRODUCTS AREA ---------- */
.zaa-stl-products {
	flex: 1;
	display: grid;
	gap: 25px;
	min-width: 0;
}

.zaa-stl.zaa-count-1 .zaa-stl-products { grid-template-columns: minmax(0, 320px); }
.zaa-stl.zaa-count-2 .zaa-stl-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.zaa-stl.zaa-count-3 .zaa-stl-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.zaa-stl.zaa-count-4 .zaa-stl-products { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- SLIDER (desktop only, 5+ products) ----------
   Keeps everything on a single line: shows up to 4 cards and lets the rest be
   reached by free horizontal scroll (drag, trackpad, shift+wheel, or the
   scrollbar). Counts 1–4 keep the plain grid above. Wrapped in a desktop-only
   media query so it can never affect the mobile vertical list. */
@media (min-width: 769px) {
	.zaa-stl.zaa-scroll .zaa-stl-products {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-behavior: smooth;
		padding-bottom: 12px;
		cursor: grab;
		scrollbar-width: thin;
		scrollbar-color: #c9c9c9 transparent;
	}
	.zaa-stl.zaa-scroll .zaa-stl-products.is-dragging {
		cursor: grabbing;
		scroll-behavior: auto;
		user-select: none;
	}
	/* Four visible cards = three 25px gaps. Extra cards overflow and scroll. */
	.zaa-stl.zaa-scroll .zaa-row {
		flex: 0 0 calc((100% - 3 * 25px) / 4);
	}
	.zaa-stl.zaa-scroll .zaa-stl-products::-webkit-scrollbar {
		height: 8px;
	}
	.zaa-stl.zaa-scroll .zaa-stl-products::-webkit-scrollbar-thumb {
		background: #c9c9c9;
		border-radius: 4px;
	}
	.zaa-stl.zaa-scroll .zaa-stl-products::-webkit-scrollbar-track {
		background: transparent;
	}
}

/* ROW = a single product card (desktop) */
.zaa-row {
	position: relative;
	min-width: 0;
}

.zaa-row.zaa-needs-variation .zaa-row-img {
	box-shadow: 0 0 0 2px #d63638;
}

/* PLUS between cards (desktop): centered on the image's vertical middle,
   sitting in the gap between cards. */
.zaa-plus {
	position: absolute;
	top: 50%;
	right: -12px;
	transform: translate(50%, -50%);
	z-index: 3;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	border: 1px solid #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	line-height: 1;
	color: #333;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

/* IMAGE */
.zaa-row-img {
	position: relative;
	display: block;
	overflow: visible; /* allow the + to peek into the gap */
}

.zaa-row-img-link {
	display: block;
	overflow: hidden;
}

.zaa-row-img-link img {
	width: 100%;
	display: block;
	margin: 0;
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

/* CHECKBOX (square) — sits top-left over the image on desktop */
.zaa-checkbox {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	display: inline-flex;
	cursor: pointer;
}

/* the mobile-column checkbox is hidden on desktop */
.zaa-checkbox--mobile {
	display: none;
}

.zaa-row-check {
	display: none;
}

.zaa-checkbox input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.zaa-checkbox-box {
	width: 24px;
	height: 24px;
	border: 1px solid #1a1a1a;
	background: #fff;
	display: inline-block;
	transition: all 0.15s ease;
}

.zaa-checkbox input:checked + .zaa-checkbox-box {
	background: #1a1a1a;
	box-shadow: inset 0 0 0 4px #fff;
}

.zaa-checkbox input:focus-visible + .zaa-checkbox-box {
	outline: 2px solid #1a1a1a;
	outline-offset: 2px;
}

/* SIZE BUTTONS — shared look */
.zaa-row-sizes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	justify-content: flex-start;
}

/* overlay version sits near the bottom of the image (desktop), centered */
.zaa-row-sizes--overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 2;
	justify-content: center;
	gap: 4px;

	/* Com dois atributos são duas réguas empilhadas: viram coluna, e o teto
	   com rolagem garante que o seletor nunca engula a foto por mais cores
	   que o produto tenha. */
	flex-direction: column;
	align-items: center;
	max-height: 62%;
	overflow-y: auto;
	padding: 0 6px;
	scrollbar-width: thin;
}

.zaa-row-sizes--overlay::-webkit-scrollbar {
	width: 4px;
}

.zaa-row-sizes--overlay::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, .25);
	border-radius: 2px;
}

.zaa-row-sizes--overlay .zaa-attr-group {
	gap: 0;
}

.zaa-row-sizes--overlay .zaa-attr-options {
	/* "safe center" centraliza quando cabe e volta a alinhar à esquerda
	   quando transborda — com "center" puro o começo da régua fica
	   inalcançável pela rolagem. O par de declarações é de propósito:
	   navegador sem suporte a safe ignora a segunda e fica com a primeira. */
	justify-content: center;
	justify-content: safe center;
	gap: 3px;
	/* Respiro para a borda do botão ativo não ser cortada pela rolagem. */
	padding: 1px 0 2px;
}

/* inline version (used on mobile) is hidden on desktop */
.zaa-row-sizes--inline {
	display: none;
}

/* Grupo por atributo (Cor, Numeração...). */
.zaa-attr-group {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
	/* Âncora do esmaecido de rolagem (mobile) e das setas (desktop). */
	position: relative;
}

.zaa-attr-label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #767676;
}

/* MINI SLIDER POR ATRIBUTO — padrão em qualquer largura.
   Cada atributo é UMA régua que rola na horizontal em vez de quebrar em
   várias linhas. Era a quebra que empurrava os tamanhos para baixo e comia a
   foto num produto com sete cores. Quando as opções cabem, nada muda: sem
   transbordo não há rolagem nem seta. */
.zaa-attr-options {
	display: flex;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	gap: 6px;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	/* A barra nativa não cabe numa régua de 24px sobre a foto: a rolagem é
	   por arrasto/trackpad no mobile e pelas setas no desktop. */
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.zaa-attr-options::-webkit-scrollbar {
	display: none;
}

/* SETAS DA RÉGUA (desktop)
   No mobile a régua rola com o dedo; no desktop não existe gesto equivalente,
   então cada régua que transborda ganha um par de setas. Elas aparecem só no
   hover do card (ou no foco, para quem navega por teclado) — em repouso a
   thumb continua tão limpa quanto antes. Quem decide se a régua transborda é
   o JS, pela classe is-scrollable. */
.zaa-attr-nav {
	display: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	width: 18px;
	height: 18px;
	padding: 0;
	border: 1px solid #d9d9d9;
	border-radius: 50%;
	background: #fff;
	color: #1a1a1a;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.zaa-attr-nav:hover {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

.zaa-attr-nav--prev { left: 0; }
.zaa-attr-nav--next { right: 0; }

@media (min-width: 769px) {
	.zaa-attr-group.is-scrollable .zaa-attr-nav {
		display: inline-flex;
		opacity: 0;
		pointer-events: none;
		transition: opacity .15s ease;
	}

	.zaa-row:hover .zaa-attr-group.is-scrollable .zaa-attr-nav,
	.zaa-attr-group.is-scrollable:focus-within .zaa-attr-nav {
		opacity: 1;
		pointer-events: auto;
	}

	/* No começo (ou no fim) da régua a seta daquele lado não tem para onde
	   levar. Vem DEPOIS da regra acima de propósito: mesma especificidade,
	   então a última é a que vale. */
	.zaa-attr-group.at-start .zaa-attr-nav--prev,
	.zaa-attr-group.at-end .zaa-attr-nav--next {
		display: none;
	}
}

.zaa-size-btn {
	/* Era width fixo de 34px, desenhado para P/M/G. Nome de cor ("CARAMELO",
	   "PRATA VELHA") estourava a caixa e invadia o botão vizinho — os rótulos
	   apareciam embolados uns sobre os outros. Agora a largura acompanha o
	   texto e o 34px vira piso, para tamanho curto seguir quadradinho. */
	min-width: 34px;
	width: auto;
	height: 34px;
	padding: 0 8px;
	border: 1px solid #1a1a1a;
	background: #fff;
	color: #1a1a1a;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	/* Dentro da régua rolável o botão mantém o tamanho e ancora o snap. */
	flex: 0 0 auto;
	scroll-snap-align: start;
}

/* overlay (desktop) buttons are smaller and tighter */
/* Sobre a foto o botão é miúdo: cabem duas réguas sem cobrir o produto.
   Nome de cor comprido ("CARAMELO/ONÇA") é cortado com reticências e o nome
   inteiro fica no title — melhor que estourar a largura da imagem. */
.zaa-row-sizes--overlay .zaa-size-btn {
	min-width: 24px;
	width: auto;
	max-width: 92px;
	height: 24px;
	padding: 0 6px;
	font-size: 10px;
	letter-spacing: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	display: inline-block;
	line-height: 22px;
}

.zaa-size-btn:hover {
	background: #f0f0f0;
}

.zaa-size-btn.active {
	background: #1a1a1a;
	color: #fff;
	border-color: #1a1a1a;
}

/* SOLD-OUT SIZE — greyed out, not clickable, with a diagonal strike (X look).
   The size stays visible so customers see it exists but is unavailable. */
.zaa-size-btn.zaa-size-soldout {
	position: relative;
	border-color: #cfcfcf;
	color: #b5b5b5;
	background: #f3f3f3;
	cursor: not-allowed;
	pointer-events: none;
	overflow: hidden;
}

.zaa-size-btn.zaa-size-soldout:hover {
	background: #f3f3f3;
}

/* diagonal line across the button */
.zaa-size-btn.zaa-size-soldout::after {
	content: "";
	position: absolute;
	top: 50%;
	left: -10%;
	width: 120%;
	height: 1px;
	background: #c0c0c0;
	transform: rotate(-45deg);
	transform-origin: center;
}

/* INFO (name + price below image on desktop) */
.zaa-row-info {
	text-align: center;
	padding-top: 14px;
}

.zaa-row-name {
	display: block;
	font-size: 15px;
	font-weight: 400;
	color: #333;
	text-decoration: none;
	margin-bottom: 6px;
	line-height: 1.3;
}

.zaa-row-name:hover {
	text-decoration: underline;
}

.zaa-row-price {
	font-size: 17px;
	font-weight: 700;
	color: #1a1a1a;
}

.zaa-price-unavailable {
	font-weight: 600;
	font-style: italic;
	color: #999;
	font-size: 15px;
}

/* UNAVAILABLE */
.zaa-row.zaa-unavailable .zaa-row-img-link img {
	filter: grayscale(1);
	opacity: 0.55;
}

.zaa-row.zaa-unavailable .zaa-row-img-link,
.zaa-row.zaa-unavailable .zaa-row-name {
	pointer-events: none;
}

.zaa-row.zaa-unavailable .zaa-row-name {
	color: #999;
}

.zaa-soldout-badge {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	background: rgba(0, 0, 0, 0.78);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	padding: 6px 12px;
	white-space: nowrap;
	z-index: 2;
}

/* ---------- SUMMARY PANEL (right column, desktop) ---------- */
.zaa-stl-summary {
	width: 300px;
	flex-shrink: 0;
}

.zaa-stl-heading {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	margin: 0 0 14px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e5e5e5;
}

.zaa-stl-intro {
	font-size: 15px;
	color: #555;
	margin: 0 0 30px;
	line-height: 1.5;
}

.zaa-total-value {
	font-size: 34px;
	font-weight: 800;
	color: #1a1a1a;
	margin-bottom: 18px;
	line-height: 1;
}

.zaa-buy-btn {
	width: 100%;
	padding: 18px;
	background: #1a1a1a;
	color: #fff;
	border: none;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
}

.zaa-buy-btn:hover {
	background: #333;
}

.zaa-buy-btn:disabled {
	opacity: 0.6;
	cursor: wait;
}

.zaa-buy-btn.clicked {
	transform: scale(0.99);
}

/* =========================================================
   MOBILE  (<=768px) — switch to compact vertical list
   ========================================================= */
@media (max-width: 768px) {
	/* Re-stack everything in a single column:
	   heading -> intro -> products -> footer */
	.zaa-stl {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		max-width: none;
		width: 100%;
	}

	/* aside dissolves so its children flow in the section's flex order */
	.zaa-stl-summary {
		display: contents;
	}

	.zaa-stl-heading  { order: 0; margin-bottom: 14px; }
	.zaa-stl-intro    { order: 1; margin-bottom: 22px; }
	.zaa-stl-footer   { order: 3; margin-top: 28px; }

	/* Force single-column stack on mobile, overriding the desktop
	   .zaa-count-N grid rules (which have higher specificity). */
	.zaa-stl.zaa-count-1 .zaa-stl-products,
	.zaa-stl.zaa-count-2 .zaa-stl-products,
	.zaa-stl.zaa-count-3 .zaa-stl-products,
	.zaa-stl.zaa-count-4 .zaa-stl-products {
		order: 2;
		display: flex;
		flex-direction: column;
		gap: 22px;
		grid-template-columns: none;
	}

	/* ROW becomes a horizontal strip: image | info | checkbox column.
	   Matches the original full-width proportions: wider image, the info
	   block fills the middle, and the checkbox sits in its own right column
	   separated by a visible divider line. */
	.zaa-row {
		position: relative;
		display: grid;
		grid-template-columns: 120px 1fr 56px;
		gap: 0;
		align-items: stretch;
		background: #f7f5f3;
		border: 1px solid #d6d6d6;
	}

	.zaa-row-img {
		grid-column: 1;
		overflow: hidden;
	}

	.zaa-row-img-link img {
		aspect-ratio: auto;
		height: 100%;
		min-height: 130px;
	}

	/* desktop overlay checkbox hidden; mobile column checkbox shown */
	.zaa-checkbox--desktop { display: none; }
	.zaa-checkbox--mobile  { display: inline-flex; }

	/* checkbox lives in its own right-hand column, separated by a divider,
	   vertically centered */
	.zaa-row-check {
		display: flex;
		grid-column: 3;
		align-items: center;
		justify-content: center;
		border-left: 1px solid #e2e2e2;
	}

	.zaa-checkbox--mobile {
		position: static;
		top: auto;
		left: auto;
	}

	.zaa-checkbox-box {
		width: 20px;
		height: 20px;
	}
	.zaa-checkbox input:checked + .zaa-checkbox-box {
		box-shadow: inset 0 0 0 3px #fff;
	}

	/* overlay sizes hidden, inline sizes shown */
	.zaa-row-sizes--overlay { display: none; }

	.zaa-row-info {
		text-align: left;
		padding: 12px 12px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		grid-column: 2;
		min-width: 0;
	}

	.zaa-row-name { font-size: 14px; }
	.zaa-row-price { font-size: 15px; margin-bottom: 10px; }

	/* Era width fixo de 26px — a mesma armadilha do desktop: nome de cor
	   estourava a caixa e escrevia por cima do botão vizinho. */
	.zaa-size-btn {
		min-width: 26px;
		width: auto;
		height: 26px;
		font-size: 11px;
		padding: 0 7px;
	}

	/* A régua já é slider na base; aqui só o ajuste fino do mobile. */
	.zaa-attr-options {
		gap: 4px;
		/* A borda do botão ativo encosta na base sem o respiro. */
		padding: 1px 0 3px;
	}

	/* Esmaecido na borda direita avisa que há mais para rolar. Só aparece
	   quando sobra conteúdo — quem decide é o JS, senão a faixa fica com um
	   degradê fantasma mesmo com três cores. No desktop o aviso é a seta:
	   sobre a foto este degradê branco viraria uma mancha. */
	.zaa-attr-group.is-scrollable::after {
		content: '';
		position: absolute;
		right: 0;
		bottom: 3px;
		width: 28px;
		height: 26px;
		pointer-events: none;
		background: linear-gradient(to right, rgba(255, 255, 255, 0), #fff 78%);
	}

	.zaa-row-sizes--inline {
		display: flex;
		flex-direction: column;
		gap: 6px;
	}

	/* PLUS sits centered in the 22px gap between stacked rows.
	   It lives inside .zaa-row-img, so we anchor it to the whole row
	   (image is made static below) and push its center to gap/2 = 11px. */
	.zaa-plus {
		top: auto;
		right: auto;
		left: 50%;
		bottom: -11px;
		transform: translate(-50%, 50%);
	}
	.zaa-row-img { position: static; }

	.zaa-total-value { font-size: 28px; }

	.zaa-soldout-badge { font-size: 11px; padding: 5px 10px; }
}

/* =========================================================
   PROGRESSIVE KIT DISCOUNT — incentive list + de/por total
   ========================================================= */
.zaa-stl-discount {
	margin: 0 0 18px;
	padding: 14px 16px;
	background: #faf7f2;
	border: 1px solid #e7e0d5;
	border-radius: 8px;
}

.zaa-stl-discount-title {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b6155;
	margin-bottom: 10px;
}

.zaa-stl-discount-tiers {
	list-style: none;
	margin: 0;
	padding: 0;
}

.zaa-stl-tier {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 8px;
	border-radius: 6px;
	font-size: 14px;
	color: #555;
	transition: background 0.15s ease, color 0.15s ease;
}

.zaa-stl-tier + .zaa-stl-tier {
	margin-top: 2px;
}

.zaa-stl-tier-pct {
	font-weight: 700;
	color: #1a1a1a;
}

/* Active (reached) tier */
.zaa-stl-tier-active {
	background: #1a1a1a;
	color: #fff;
}
.zaa-stl-tier-active .zaa-stl-tier-pct {
	color: #fff;
}

/* de/por total */
.zaa-stl-total-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-bottom: 14px;
}

.zaa-stl-total-original {
	font-size: 15px;
	color: #999;
	text-decoration: line-through;
	line-height: 1;
}

.zaa-stl-total-saved {
	font-size: 13px;
	font-weight: 600;
	color: #1a7f37;
	line-height: 1.2;
}

@media (max-width: 768px) {
	.zaa-stl-discount {
		margin-bottom: 14px;
		padding: 12px 14px;
	}
	.zaa-stl-tier {
		font-size: 13px;
	}
}
