/**
 * Catálogo CDP — estilos do front-end.
 */

.cdp-catalogo {
	--cdp-accent: #ff5a3c;
	--cdp-dark: #16233d;
	--cdp-text: #1f2a44;
	--cdp-muted: #7a869a;
	--cdp-card-bg: #f4f5f7;
	--cdp-radius: 18px;
	padding: 48px 0;
	box-sizing: border-box;
}

.cdp-catalogo *,
.cdp-single *,
.cdp-relacionados * {
	box-sizing: border-box;
}

.cdp-bg-claro {
	background: transparent;
	color: var(--cdp-text);
}

.cdp-bg-escuro {
	background: var(--cdp-dark);
	color: #fff;
}

.cdp-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Cabeçalho */
.cdp-cabecalho {
	margin-bottom: 28px;
}

.cdp-selo {
	display: inline-block;
	color: var(--cdp-accent);
	font-weight: 700;
	letter-spacing: 2px;
	font-size: 14px;
	text-transform: uppercase;
	margin-bottom: 4px;
}

.cdp-titulo {
	font-size: clamp(28px, 5vw, 48px);
	font-weight: 800;
	margin: 0;
	line-height: 1.1;
}

/* Grid */
.cdp-grid {
	display: grid;
	gap: 26px;
	grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 640px) {
	.cdp-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
	.cdp-cols-2 { grid-template-columns: repeat(2, 1fr); }
	.cdp-cols-3 { grid-template-columns: repeat(3, 1fr); }
	.cdp-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ====== Carrossel (estilo vertical) ======
   O nº de colunas (2/3/4) define quantos cards ficam visíveis numa ÚNICA
   linha; os itens excedentes viram carrossel horizontal com scroll-snap
   (swipe nativo). Ex.: 3 colunas + limite 5 = mostra 3 e desliza os outros 2.
   A sangria negativa leva o carrossel até as bordas da tela e o padding
   recompõe o alinhamento com o container, deixando um "peek" do próximo card. */
.cdp-grid.cdp-estilo-vertical {
	grid-template-columns: none;
	grid-auto-flow: column;
	grid-auto-columns: 82%; /* mobile: 1 card + espiada do próximo */
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding: 0 20px;
	-webkit-overflow-scrolling: touch;
	margin: 0 -20px;
	padding: 4px 20px 14px;
	scrollbar-width: none;
}
.cdp-grid.cdp-estilo-vertical::-webkit-scrollbar { display: none; }
.cdp-grid.cdp-estilo-vertical > .cdp-card { scroll-snap-align: start; }

/* Tablet: 2 por vez, alinhado ao container (sem sangria). */
@media (min-width: 640px) {
	.cdp-grid.cdp-estilo-vertical {
		margin: 0;
		padding: 4px 0 14px;
		scroll-padding: 0;
		grid-auto-columns: calc((100% - 26px) / 2);
	}
}

/* Desktop: honra o nº de colunas escolhido (26px = gap entre os cards). */
@media (min-width: 992px) {
	.cdp-grid.cdp-estilo-vertical.cdp-cols-2 { grid-auto-columns: calc((100% - 26px) / 2); }
	.cdp-grid.cdp-estilo-vertical.cdp-cols-3 { grid-auto-columns: calc((100% - 52px) / 3); }
	.cdp-grid.cdp-estilo-vertical.cdp-cols-4 { grid-auto-columns: calc((100% - 78px) / 4); }
}

/* Card */
.cdp-card {
	--cdp-accent: #ff5a3c;
	--cdp-dark: #16233d;
	--cdp-text: #1f2a44;
	--cdp-muted: #7a869a;
	--cdp-card-bg: #f4f5f7;
	background: var(--cdp-card-bg);
	border-radius: var(--cdp-radius, 18px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
	transition: transform .25s ease, box-shadow .25s ease;
}

.cdp-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 18px 40px rgba(15, 23, 42, .16);
}

.cdp-card-media {
	position: relative;
	aspect-ratio: 16 / 10;
	background-size: cover;
	background-position: center;
	background-color: #d8dce3;
}

/* Link invisível que cobre a foto para abrir o produto ao clicar na imagem. */
.cdp-card-media-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	text-indent: -9999px;
	overflow: hidden;
}

.cdp-badge-popular {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	background: var(--cdp-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	padding: 5px 10px;
	border-radius: 6px;
}

/* Botão de curtir — aparência base (pílula). O posicionamento sobre a foto
   é definido só quando ele está dentro da mídia (card vertical). */
.cdp-card-fav {
	position: relative;
	height: 34px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 0;
	background: rgba(0, 0, 0, .4);
	color: #fff;
	border-radius: 40px;
	backdrop-filter: blur(2px);
	cursor: pointer;
	font: inherit;
	line-height: 1;
	transition: background .18s, transform .15s;
}

/* Card vertical: coração sobreposto no canto superior direito da foto. */
.cdp-card-media .cdp-card-fav {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
	z-index: 2;
}

.cdp-card-fav:hover { background: rgba(0, 0, 0, .55); transform: translateY(-1px); }
.cdp-card-fav:disabled { opacity: .6; cursor: default; }

.cdp-fav-ico { fill: none; stroke: currentColor; stroke-width: 1.7; flex: 0 0 auto; }
.cdp-fav-count { font-size: 13px; font-weight: 700; }

.cdp-card-fav.is-liked { color: #ff5a3c; background: rgba(255, 255, 255, .92); }
.cdp-card-fav.is-liked .cdp-fav-ico { fill: currentColor; stroke: currentColor; }

.cdp-card-body {
	padding: 18px 20px 8px;
	flex: 1;
}

/* Rating */
.cdp-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}

.cdp-stars {
	display: inline-flex;
	font-size: 16px;
	line-height: 1;
	color: #d9dce2;
}

.cdp-star-full { color: #f5a623; }
.cdp-star-half {
	background: linear-gradient(90deg, #f5a623 50%, #d9dce2 50%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.cdp-rating-num {
	color: var(--cdp-accent);
	font-weight: 700;
	font-size: 14px;
}

.cdp-card-titulo {
	font-size: 20px;
	font-weight: 700;
	margin: 4px 0 6px;
	line-height: 1.25;
}

.cdp-card-titulo a {
	color: inherit;
	text-decoration: none;
}

.cdp-bg-escuro .cdp-card { color: var(--cdp-text); }

.cdp-card-sub {
	color: var(--cdp-muted);
	margin: 0 0 12px;
	font-size: 15px;
}

.cdp-card-info {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #55617a;
	font-size: 14px;
	margin: 6px 0;
}

.cdp-card-info svg { color: var(--cdp-accent); flex: 0 0 auto; }

.cdp-card-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 20px 20px;
}

.cdp-card-preco {
	color: var(--cdp-accent);
	font-size: 22px;
	font-weight: 800;
}

.cdp-btn-detalhes {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: var(--cdp-dark);
	color: #fff !important;
	text-decoration: none;
	padding: 11px 20px;
	border-radius: 40px;
	font-weight: 600;
	font-size: 14px;
	transition: background .2s ease;
	white-space: nowrap;
}

.cdp-btn-detalhes:hover { background: #0f1a30; }

.cdp-vazio {
	text-align: center;
	color: var(--cdp-muted);
	padding: 40px 0;
}

/* ============ CARD HORIZONTAL ============ */
.cdp-estilo-horizontal {
	gap: 30px;
}

/* No horizontal cada card já é largo: no máximo 2 colunas. */
@media (min-width: 992px) {
	.cdp-estilo-horizontal.cdp-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

.cdp-card-h {
	flex-direction: row;
	align-items: stretch;
}

.cdp-card-h .cdp-card-media {
	flex: 0 0 40%;
	max-width: 40%;
	aspect-ratio: auto;
	min-height: 240px;
	border-radius: 0;
}

.cdp-card-h-content {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cdp-card-h .cdp-card-body {
	padding: 18px 22px 6px;
}

.cdp-card-h-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 4px;
}

.cdp-card-h-top .cdp-rating { margin-bottom: 0; }

/* Coração como no exemplo: contorno claro, dentro do conteúdo (vira pílula com o contador). */
.cdp-card-h .cdp-card-fav {
	position: static;
	height: 34px;
	padding: 0 12px;
	flex: 0 0 auto;
	background: #fff;
	color: var(--cdp-accent);
	border: 1.5px solid #f0c3b8;
	border-radius: 40px;
	backdrop-filter: none;
}

.cdp-card-h .cdp-card-fav:hover { background: #fff5f2; }
.cdp-card-h .cdp-card-fav.is-liked { background: var(--cdp-accent); color: #fff; border-color: var(--cdp-accent); }

.cdp-card-h .cdp-card-titulo {
	font-size: 22px;
	margin: 2px 0 8px;
}

.cdp-card-h-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 0;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #e6e9ef;
}

.cdp-meta-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #55617a;
	font-size: 14px;
	padding: 0 16px;
	min-width: 0;
}

.cdp-meta-chip:first-child { padding-left: 0; }
.cdp-meta-chip + .cdp-meta-chip { border-left: 1px solid #e6e9ef; }
.cdp-meta-chip svg { color: var(--cdp-accent); flex: 0 0 auto; }
.cdp-meta-chip span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cdp-card-h .cdp-card-footer {
	margin-top: auto;
}

/* Empilha em telas menores. */
@media (max-width: 640px) {
	.cdp-card-h { flex-direction: column; }
	.cdp-card-h .cdp-card-media {
		flex-basis: auto;
		max-width: 100%;
		min-height: 200px;
		aspect-ratio: 16 / 10;
	}
}

/* ============ PÁGINA ÚNICA ============ */
.cdp-single {
	--cdp-accent: #ff5a3c;
	--cdp-dark: #16233d;
	--cdp-muted: #7a869a;
	padding: 40px 0 10px;
}

.cdp-single-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 34px;
}

@media (min-width: 900px) {
	.cdp-single-grid { grid-template-columns: 1.3fr 1fr; }
}

.cdp-gal-principal {
	position: relative;
	border-radius: var(--cdp-radius, 18px);
	overflow: hidden;
	background: #eef0f4;
	aspect-ratio: 4 / 3;
}

.cdp-gal-slide {
	margin: 0;
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity .4s ease;
}

.cdp-gal-slide.is-active { opacity: 1; }

.cdp-gal-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cdp-gal-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: rgba(22, 35, 61, .7);
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s;
}

.cdp-gal-nav:hover { background: var(--cdp-dark); }
.cdp-gal-prev { left: 14px; }
.cdp-gal-next { right: 14px; }

.cdp-gal-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 12px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.cdp-gal-thumb {
	flex: 0 0 auto;
	width: 78px;
	height: 60px;
	border: 2px solid transparent;
	border-radius: 10px;
	overflow: hidden;
	padding: 0;
	cursor: pointer;
	background: none;
	opacity: .65;
	transition: opacity .2s, border-color .2s;
}

.cdp-gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdp-gal-thumb.is-active { opacity: 1; border-color: var(--cdp-accent); }

.cdp-single-titulo {
	font-size: clamp(26px, 4vw, 38px);
	font-weight: 800;
	margin: 0 0 6px;
	line-height: 1.15;
}

.cdp-single-sub {
	color: var(--cdp-muted);
	font-size: 17px;
	margin: 0 0 14px;
}

.cdp-rating-single { margin-bottom: 16px; }

.cdp-single-preco {
	color: var(--cdp-accent);
	font-size: 32px;
	font-weight: 800;
	margin: 10px 0 18px;
}

.cdp-single-meta {
	list-style: none;
	padding: 0;
	margin: 0 0 22px;
}

.cdp-single-meta li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid #eceef2;
	font-size: 15px;
}

.cdp-single-meta svg { color: var(--cdp-accent); flex: 0 0 auto; }

.cdp-btn-whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #25d366;
	color: #fff !important;
	text-decoration: none;
	padding: 14px 26px;
	border-radius: 40px;
	font-weight: 700;
	font-size: 16px;
	box-shadow: 0 8px 20px rgba(37, 211, 102, .35);
	transition: transform .15s ease, box-shadow .2s;
}

.cdp-btn-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(37, 211, 102, .45); }

.cdp-single-detalhes { margin: 40px 0; }

.cdp-single-h2 {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 14px;
	position: relative;
	padding-bottom: 10px;
}

.cdp-single-h2::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 54px;
	height: 3px;
	background: var(--cdp-accent);
	border-radius: 3px;
}

.cdp-single-conteudo { font-size: 16px; line-height: 1.7; color: #3a465e; }
.cdp-single-conteudo img { max-width: 100%; height: auto; border-radius: 12px; }

.cdp-gal-vazia {
	background: #eef0f4;
	border-radius: 16px;
	padding: 60px 20px;
	text-align: center;
	color: var(--cdp-muted);
}

.cdp-single-credito {
	text-align: center;
	padding: 24px 0 40px;
	color: var(--cdp-muted);
	font-size: 14px;
}

.cdp-single-credito a { color: var(--cdp-accent); text-decoration: none; }

/* ============ RELACIONADOS / CARROSSEL ============ */
.cdp-relacionados {
	--cdp-accent: #ff5a3c;
	padding: 30px 0 50px;
}

.cdp-titulo-rel {
	font-size: clamp(22px, 3vw, 30px);
	margin-bottom: 22px;
}

.cdp-carousel { position: relative; }

.cdp-car-track {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	padding: 6px 2px 16px;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.cdp-car-track::-webkit-scrollbar { display: none; }

.cdp-car-item {
	flex: 0 0 85%;
	scroll-snap-align: start;
}

@media (min-width: 640px) { .cdp-car-item { flex-basis: 45%; } }
@media (min-width: 992px) { .cdp-car-item { flex-basis: 31%; } }

.cdp-car-nav {
	position: absolute;
	top: 40%;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: var(--cdp-dark, #16233d);
	box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
	cursor: pointer;
	font-size: 18px;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 3;
}

@media (min-width: 992px) { .cdp-car-nav { display: flex; } }

.cdp-car-prev { left: -14px; }
.cdp-car-next { right: -14px; }
