/**
 * Power to Move — single product page (Figma "Projeto - Detalhe").
 *
 * Builds on shop.css (hero, breadcrumb, buttons, chip). Colours come from the
 * Blocksy palette; see the legend at the top of shop.css.
 *
 * Breakpoints match Blocksy: tablet ≤ 999.98px, mobile ≤ 689.98px.
 */

/* ------------------------------------------------------------------ */
/* Product: gallery + info                                              */
/* ------------------------------------------------------------------ */

.ptm-product {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
	gap: 24px;
	padding-top: 80px;
	padding-bottom: 80px;
	color: var(--theme-palette-color-2);
}

.ptm-product h2,
.ptm-product p,
.ptm-product ul,
.ptm-popular h2 {
	margin: 0;
}

.ptm-product .ptm-icon,
.ptm-popular .ptm-icon {
	flex-shrink: 0;
}

/* Gallery ------------------------------------------------------------ */

.ptm-gallery {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	gap: 24px;
}

.ptm-gallery.has-thumbs {
	grid-template-columns: 85px minmax(0, 1fr);
}

.ptm-gallery__thumbs {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ptm-gallery__thumb {
	position: relative;
	display: block;
	width: 85px;
	height: 103px;
	min-height: 0;
	padding: 0;
	overflow: visible;
	border: 0;
	border-radius: 3px;
	background-color: var(--theme-palette-color-11);
	cursor: pointer;
}

.ptm-gallery__thumb img {
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: cover;
}

.ptm-gallery__thumb.is-product-shot img {
	padding: 12px;
	object-fit: contain;
	mix-blend-mode: multiply;
}

/* Active thumb: green ring outside, thin white gap inside. */
.ptm-gallery__thumb[aria-current="true"] {
	box-shadow: 0 0 0 2px var(--theme-palette-color-12);
}

.ptm-gallery__thumb[aria-current="true"]::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 3px solid var(--theme-palette-color-8);
	border-radius: inherit;
	pointer-events: none;
}

.ptm-gallery__thumb:focus-visible {
	outline: 2px solid var(--theme-palette-color-2);
	outline-offset: 4px;
}

.ptm-gallery__play-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background-color: var(--theme-palette-color-8);
	box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-palette-color-4) 25%, transparent);
	color: var(--theme-palette-color-2);
	transform: translate(-50%, -50%);
}

.ptm-gallery__play-badge .ptm-icon {
	width: 9px;
	height: 12px;
	margin-left: 2px;
}

.ptm-gallery__stage {
	position: relative;
	min-width: 0;
}

.ptm-gallery__track {
	position: relative;
	display: flex;
	margin: 0;
	padding: 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	list-style: none;
	border-radius: 12px;
}

.ptm-gallery__track::-webkit-scrollbar {
	display: none;
}

.ptm-gallery__track:focus-visible {
	outline: 2px solid var(--theme-palette-color-2);
	outline-offset: 4px;
}

.ptm-gallery__slide {
	position: relative;
	flex: 0 0 100%;
	aspect-ratio: 519 / 629;
	overflow: hidden;
	border-radius: 12px;
	background-color: var(--theme-palette-color-11);
	scroll-snap-align: start;
}

.ptm-gallery__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ptm-gallery__slide.is-product-shot .ptm-gallery__image {
	padding: 10%;
	object-fit: contain;
	mix-blend-mode: multiply;
}

.ptm-gallery__slide iframe,
.ptm-gallery__slide video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background-color: var(--theme-palette-color-4);
}

.ptm-gallery__play {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: 72px;
	height: 72px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--theme-palette-color-8);
	box-shadow: 0 4px 16px color-mix(in srgb, var(--theme-palette-color-4) 25%, transparent);
	color: var(--theme-palette-color-2);
	cursor: pointer;
	transform: translate(-50%, -50%);
	transition: transform 0.15s ease;
}

.ptm-gallery__play[hidden] {
	display: none;
}

.ptm-gallery__play:hover {
	transform: translate(-50%, -50%) scale(1.06);
}

.ptm-gallery__play .ptm-icon {
	width: 18px;
	height: 23px;
	margin-left: 4px;
}

.ptm-gallery__arrow {
	position: absolute;
	top: 50%;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--theme-palette-color-2);
	color: var(--theme-palette-color-1);
	cursor: pointer;
	transform: translateY(-50%);
	transition: background-color 0.15s ease, color 0.15s ease;
}

.ptm-gallery__arrow:hover {
	background-color: var(--theme-palette-color-1);
	color: var(--theme-palette-color-2);
}

.ptm-gallery__arrow--prev {
	left: 31px;
}

.ptm-gallery__arrow--next {
	right: 31px;
}

.ptm-gallery__arrow .ptm-icon {
	width: 14px;
	height: 10px;
}

/* Info ---------------------------------------------------------------- */

.ptm-product__info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	min-width: 0;
	padding-left: 48px;
}

a.ptm-chip {
	color: var(--theme-palette-color-2);
	text-decoration: none;
}

a.ptm-chip:hover {
	background-color: var(--theme-palette-color-1);
	color: var(--theme-palette-color-2);
}

.ptm-product .ptm-product__title {
	font-size: 48px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.0125em;
	color: var(--theme-palette-color-4);
}

.ptm-product-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 20px 48px;
	padding: 0;
	list-style: none;
}

.ptm-product-specs__item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.ptm-product__description {
	display: flex;
	flex-direction: column;
	gap: 24px;
	font-size: 18px;
	line-height: 1.3;
	color: color-mix(in srgb, var(--theme-palette-color-2) 80%, transparent);
}

.ptm-product__description ul,
.ptm-product__description ol {
	padding: 0;
	list-style: none;
}

.ptm-product__description li {
	position: relative;
	margin: 0;
	padding-left: 27px;
}

/* Square bullets, as in the design. */
.ptm-product__description ul > li::before {
	content: "";
	position: absolute;
	top: calc(0.65em - 2.5px);
	left: 8px;
	width: 5px;
	height: 5px;
	background-color: currentColor;
}

.ptm-product__description ol {
	counter-reset: ptm-list;
}

.ptm-product__description ol > li::before {
	counter-increment: ptm-list;
	content: counter(ptm-list) ".";
	position: absolute;
	left: 4px;
}

.ptm-product__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.ptm-product__actions .ptm-button-secondary {
	padding-inline: 24px;
}

/* ------------------------------------------------------------------ */
/* Equipamentos mais procurados                                         */
/* ------------------------------------------------------------------ */

.ptm-popular {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 50px;
	padding-top: 80px;
	padding-bottom: 80px;
	color: var(--theme-palette-color-2);
}

.ptm-popular .ptm-popular__title {
	max-width: 814px;
	font-size: 38px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-align: center;
	text-wrap: balance;
	color: var(--theme-palette-color-4);
}

.ptm-popular__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 44px;
	width: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ptm-popular-card__link {
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: var(--theme-palette-color-2);
	text-decoration: none;
}

.ptm-popular-card__link:hover {
	color: var(--theme-palette-color-2);
}

.ptm-popular-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 384 / 480;
	padding: 9%;
	overflow: hidden;
	border-radius: 12px;
	background-color: var(--theme-palette-color-11);
}

.ptm-popular-card__image {
	width: 100%;
	height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 0.3s ease;
}

.ptm-popular-card__link:hover .ptm-popular-card__image {
	transform: scale(1.04);
}

.ptm-popular-card__footer {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.ptm-popular-card__name {
	font-size: 24px;
	line-height: 25px;
	letter-spacing: -0.025em;
	color: var(--theme-palette-color-4);
}

.ptm-popular-card__more {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
	font-size: 16px;
	font-weight: 500;
	line-height: 25px;
	white-space: nowrap;
}

.ptm-popular-card__more .ptm-icon {
	width: 16px;
	height: 14px;
	transition: transform 0.15s ease;
}

.ptm-popular-card__link:hover .ptm-popular-card__more .ptm-icon {
	transform: translateX(4px);
}

/* ------------------------------------------------------------------ */
/* Tablet                                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 999.98px) {
	.ptm-product {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
		padding-top: 32px;
		padding-bottom: 48px;
	}

	/* Swipeable carousel: no thumbs or arrows, next image peeking. */
	.ptm-gallery.has-thumbs {
		grid-template-columns: minmax(0, 1fr);
	}

	.ptm-gallery__thumbs,
	.ptm-gallery__arrow {
		display: none;
	}

	.ptm-gallery__track {
		gap: 16px;
		/* Run the carousel to the right edge of the screen. */
		margin-right: calc((100% - 100vw) / 2);
		border-radius: 0;
	}

	.ptm-gallery__slide {
		flex-basis: min(312px, 80%);
		aspect-ratio: 312 / 378;
		border-radius: 8px;
	}

	.ptm-gallery__slide:last-child {
		margin-right: calc((100vw - 100%) / 2);
	}

	.ptm-product__info {
		padding-left: 0;
	}

	.ptm-product .ptm-product__title {
		font-size: 32px;
		font-weight: 500;
		line-height: 1.1;
		letter-spacing: 0;
		color: var(--theme-palette-color-2);
	}

	.ptm-product__description {
		font-size: 16px;
	}

	.ptm-popular {
		align-items: stretch;
		gap: 24px;
		padding-top: 40px;
		padding-bottom: 48px;
	}

	.ptm-popular .ptm-popular__title {
		font-size: 28px;
		font-weight: 500;
		line-height: 1.1;
		letter-spacing: 0;
		text-align: left;
	}

	.ptm-popular__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 24px;
	}

	.ptm-popular > .ct-button {
		align-self: center;
		margin-top: 8px;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile                                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 689.98px) {
	/* The mobile breadcrumb already has 24px below it. */
	.ptm-product {
		padding-top: 0;
	}

	/* Breadcrumb shortened to "Categoria / Produto". */
	.single-product .ptm-breadcrumb li:not(:nth-last-child(-n + 2)) {
		display: none;
	}

	.single-product .ptm-breadcrumb li:nth-last-child(2) .ptm-icon--slash {
		display: none;
	}

	.ptm-product-specs {
		flex-direction: column;
	}

	.ptm-product-specs__text {
		gap: 2px;
	}

	.ptm-product__actions {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.ptm-popular__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
	}

	.ptm-popular-card__media {
		aspect-ratio: 350 / 382;
		padding: 6%;
	}
}
