/**
 * Skins "Card de Produto — Loja" (grupo `card-produto`) — BASE comum (dependência de cada skin).
 *
 * Tokens (sobrescrevíveis pelo widget/tema):
 *   --dshe-pcard-accent     destaque (seta, selo "Novo", foco)
 *   --dshe-pcard-ink        texto principal
 *   --dshe-pcard-muted      texto secundário (tipo, descrição, nota)
 *   --dshe-pcard-line       linhas/bordas
 *   --dshe-pcard-surface    fundo do card (Horizontal, Catálogo, Galeria…)
 *   --dshe-pcard-photo      fundo da área da foto
 *   --dshe-pcard-dark       fundo escuro (Editorial, Imersiva, botão)
 *   --dshe-pcard-danger     "Últimas unidades" / "Oferta"
 *   --dshe-pcard-highlight  "Em destaque"
 *
 * Lista: o contêiner recebe `dsh-skin-grid dsh-skin-grid--card-produto dsh-skin-grid--card-produto-{variante}`
 * (DSH_Skins::grid_classes). Colunas e espaço vêm de `--dsh-skin-cols` / `--dsh-skin-gap` (controles
 * do widget). Estrutura do card: .dshe-pcard > .dshe-pcard__link (bloco inteiro clicável) >
 * __photo (img, __detail, __index, __badge) + __info (__kind, __title, __desc, __purchase|__bottom).
 */
.dsh-skin-grid--card-produto {
	--dsh-skin-cols-v: var(--dsh-skin-cols, 4);
	--dsh-skin-gap-v: var(--dsh-skin-gap, 24px);
	display: grid;
	grid-template-columns: repeat(var(--dsh-skin-cols-v), minmax(0, 1fr));
	gap: var(--dsh-skin-gap-v);
	align-items: stretch;
}

.dshe-pcard {
	--dshe-pcard-accent-v: var(--dshe-pcard-accent, var(--e-global-color-accent, #214dff));
	--dshe-pcard-ink-v: var(--dshe-pcard-ink, #15181c);
	--dshe-pcard-muted-v: var(--dshe-pcard-muted, #626873);
	--dshe-pcard-line-v: var(--dshe-pcard-line, #d3d7d8);
	--dshe-pcard-surface-v: var(--dshe-pcard-surface, #fff);
	--dshe-pcard-photo-v: var(--dshe-pcard-photo, #e7e9e7);
	--dshe-pcard-dark-v: var(--dshe-pcard-dark, #15181c);
	--dshe-pcard-danger-v: var(--dshe-pcard-danger, #c92c38);
	--dshe-pcard-highlight-v: var(--dshe-pcard-highlight, #f0df8a);
	position: relative;
	min-width: 0;
	margin: 0;
	color: var(--dshe-pcard-ink-v);
}

.dshe-pcard *,
.dshe-pcard *::before,
.dshe-pcard *::after {
	box-sizing: border-box;
}

.dshe-pcard p {
	margin: 0;
}

/* Bloco clicável. */
.dshe-pcard__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
	color: inherit;
	text-decoration: none;
	transition: transform .25s ease;
}

.dshe-pcard__link:hover,
.dshe-pcard__link:focus {
	color: inherit;
	text-decoration: none;
}

.dshe-pcard__link:focus-visible {
	outline: 3px solid var(--dshe-pcard-accent-v);
	outline-offset: 5px;
}

/* Foto (+ camada de overlay do widget no ::before). */
.dshe-pcard__photo {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: var(--dshe-pcard-photo-v);
}

.dshe-pcard__photo::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	transition: background .24s ease, opacity .24s ease;
}

.dshe-pcard__photo img,
.dshe-pcard img.dshe-pcard__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
	transition: transform .35s ease, opacity .3s ease;
}

/* Selo. */
.dshe-pcard__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	max-width: calc(100% - 28px);
	padding: 7px 10px;
	background: var(--dshe-pcard-accent-v);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .03em;
	line-height: 1.2;
}

.dshe-pcard__badge--low,
.dshe-pcard__badge--sale {
	background: var(--dshe-pcard-danger-v);
}

.dshe-pcard__badge--sold {
	background: var(--dshe-pcard-dark-v);
}

.dshe-pcard__badge--featured {
	background: var(--dshe-pcard-highlight-v);
	color: var(--dshe-pcard-ink-v);
}

/* Texto. */
.dshe-pcard__info {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
	padding: 22px 0 0;
}

.dshe-pcard__kind {
	font-size: 11px;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--dshe-pcard-muted-v);
}

.dshe-pcard__title {
	font-size: 25px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -.025em;
	margin: 8px 0 10px;
	color: inherit;
}

.dshe-pcard__desc {
	font-size: 14px;
	line-height: 1.6;
	color: var(--dshe-pcard-muted-v);
	margin: 0 0 20px;
}

/* Preço empilhado + botão (famílias Vitrine/Horizontal/Catálogo/Editorial). */
.dshe-pcard__purchase {
	margin-top: auto;
	display: grid;
	gap: 12px;
}

.dshe-pcard__price {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.dshe-pcard__price-label {
	font-size: 12px;
}

.dshe-pcard__price-amount {
	font-size: 29px;
	font-weight: 600;
	line-height: 1.2;
}

.dshe-pcard__price-note {
	font-size: 11px;
	color: var(--dshe-pcard-muted-v);
}

.dshe-pcard__price-regular {
	font-size: 12px;
	color: var(--dshe-pcard-muted-v);
}

.dshe-pcard__buy {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 44px;
	padding: 11px 12px;
	background: var(--dshe-pcard-dark-v);
	border: 1px solid var(--dshe-pcard-dark-v);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	transition: background .2s, border-color .2s, color .2s;
}

.dshe-pcard__link:hover .dshe-pcard__buy {
	background: var(--dshe-pcard-accent-v);
	border-color: var(--dshe-pcard-accent-v);
	color: #fff;
}

.dshe-pcard.is-sold .dshe-pcard__buy {
	background: #e6e8e7;
	border-color: #e6e8e7;
	color: #646b70;
}

/* Preço compacto + ação (famílias Imersiva/Galeria/Carrossel/Assimétrica/Essencial/Biblioteca). */
.dshe-pcard__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	align-items: flex-end;
	margin-top: auto;
}

.dshe-pcard__price--compact {
	display: grid;
	gap: 3px;
}

.dshe-pcard__price--compact .dshe-pcard__price-label {
	font-size: 11px;
}

.dshe-pcard__price--compact .dshe-pcard__price-amount {
	font-size: 25px;
	line-height: 1;
}

.dshe-pcard__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 600;
}

/* Seta (SVG first-party). */
.dshe-pcard__arrow {
	width: 1.1em;
	height: 1.1em;
	flex-shrink: 0;
	fill: currentColor;
	transition: transform .24s ease;
}

.dshe-pcard__cta .dshe-pcard__arrow {
	width: 20px;
	height: 20px;
	color: var(--dshe-pcard-accent-v);
}

/* ---------- Família "ficha" (.dshe-pcard--products): Vitrine, Horizontal, Catálogo, Editorial ---------- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {

	.dshe-pcard--products .dshe-pcard__link:hover,
	.dshe-pcard--products .dshe-pcard__link:focus-visible {
		transform: translateY(-5px);
	}
}

/* ---------- Família "exploração" (.dshe-pcard--explore): Imersiva, Galeria, Carrossel, Assimétrica, Essencial ---------- */
.dshe-pcard--explore .dshe-pcard__photo {
	aspect-ratio: 3 / 4;
}

.dshe-pcard--explore .dshe-pcard__info {
	padding: 22px 0;
}

.dshe-pcard--explore .dshe-pcard__title {
	font-size: 28px;
	line-height: 1.05;
	margin: 9px 0;
}

.dshe-pcard--explore .dshe-pcard__desc {
	margin: 0 0 24px;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.dshe-pcard--explore .dshe-pcard__link:hover {
		transform: translateY(-4px);
	}
}

@media (max-width: 600px) {
	.dshe-pcard--explore .dshe-pcard__title {
		font-size: 24px;
	}
}

@media (hover: hover) and (pointer: fine) {
	.dshe-pcard__link:hover .dshe-pcard__photo>img:not(.dshe-pcard__detail) {
		transform: scale(1.04);
	}

	.dshe-pcard__link:hover .dshe-pcard__arrow {
		transform: translate(2px, -2px);
	}
}

@media (max-width: 700px) {
	.dshe-pcard__title {
		font-size: 22px;
	}

	.dshe-pcard__desc {
		font-size: 12px;
	}

	.dshe-pcard__price-amount {
		font-size: 25px;
	}

	.dshe-pcard__buy {
		font-size: 12px;
	}

	.dshe-pcard__badge {
		top: 9px;
		left: 9px;
		max-width: calc(100% - 18px);
		font-size: 10px;
	}

	.dshe-pcard__cta {
		font-size: 11px;
	}

	.dshe-pcard__bottom {
		gap: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.dshe-pcard__link,
	.dshe-pcard img,
	.dshe-pcard__buy,
	.dshe-pcard__arrow {
		transition: none;
	}

	.dshe-pcard__link:hover,
	.dshe-pcard__link:hover img,
	.dshe-pcard__link:hover .dshe-pcard__arrow {
		transform: none;
	}
}